Skip to main content
Version: 0.14.0 (Latest)

๐Ÿท๏ธ Types

Shared TypeScript types are exported from the types namespace. They are type-only contracts: import them with import type when a runtime namespace is not otherwise needed.

import type {types} from '@nodeblocks/backend-sdk';

type AuthSecrets = types.AuthSecrets;
type MailService = types.MailService;
type GoogleOAuthDriver = types.GoogleOAuthDriver;

Export modulesโ€‹

The namespace re-exports these source modules:

ModuleKey contracts
authenticationAuthSecrets, token info types, Authenticator, TokenVerification
emailEmailConfig, MailData, MailOptions, MailService
httpHttpStatusCode
oauthprovider constants, OAuth driver, callback, profile, and request types
organizationOrganizationMember
utilsObjectPath, ObjectPathsMatchingTuple, SameLengthArray

Types that describe route and service composition live in primitives, not types: for example RouteConfig, RouteHandlerPayload, Service, ServiceDefinition, and Validator.

See Drivers ยป for provider contracts, Authentication Utilities ยป for token contracts, and Route ยป for composition contracts.