🏷️ 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:
| Module | Key contracts |
|---|---|
authentication | AuthSecrets, token info types, Authenticator, TokenVerification |
email | EmailConfig, MailData, MailOptions, MailService |
http | HttpStatusCode |
oauth | provider constants, OAuth driver, callback, profile, and request types |
organization | OrganizationMember |
utils | ObjectPath, 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.