メインコンテンツまでスキップ
バージョン: 🚧 Canary

🏷️ Types

Shared TypeScript types are exported from the types namespace. Import type contracts with import type when a runtime namespace is not otherwise needed. The namespace also exports the runtime constants OAUTH_LOGIN and OAUTH_SIGNUP.

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.