@supertokens-plugins/tenant-discovery-nodejs
Public root exports for @supertokens-plugins/tenant-discovery-nodejs 0.2.1.
Package version: 0.2.1
Generated from the packed release’s root declaration, ./dist/index.d.ts. Only exports reachable from that root are
listed. See the immutable release source.
Public root exports
| Export | Kind |
|---|---|
default |
Constant |
init |
Constant |
PLUGIN_ID |
Constant |
default
Published from the emitted _default declaration.
Root export:
export { PLUGIN_ID, _default as default, init };
Resolved declaration:
import * as _shared_js from '@shared/js';
import * as supertokens_node_types from 'supertokens-node/types';
declare const _default: {
init: (config?: (SuperTokensPluginTenantDiscoveryPluginConfig & {
override?: ((oI: _shared_js.OverridableFunctions<OverrideableTenantFunctionImplementation>) => _shared_js.OverridableFunctions<OverrideableTenantFunctionImplementation>) | undefined;
}) | undefined) => supertokens_node_types.SuperTokensPlugin;
};
init
Root export:
export { PLUGIN_ID, _default as default, init };
Resolved declaration:
import * as _shared_js from '@shared/js';
import { UserContext, SuperTokensPlugin } from 'supertokens-node/types';
declare const init: (config?: (SuperTokensPluginTenantDiscoveryPluginConfig & {
override?: ((oI: _shared_js.OverridableFunctions<OverrideableTenantFunctionImplementation>) => _shared_js.OverridableFunctions<OverrideableTenantFunctionImplementation>) | undefined;
}) | undefined) => SuperTokensPlugin;
PLUGIN_ID
Root export:
export { PLUGIN_ID, _default as default, init };
Resolved declaration:
declare const PLUGIN_ID = "supertokens-plugin-tenant-discovery";
Required signature types
These declarations are not additional package-root exports. They are included because the public signatures above depend on them.
MinimalTenantDetails
type MinimalTenantDetails = {
tenantId: string;
displayName: string;
};
OverrideableTenantFunctionImplementation
import { UserContext, SuperTokensPlugin } from 'supertokens-node/types';
type OverrideableTenantFunctionImplementation = {
getTenantIdFromEmail: (email: string) => Promise<string>;
getTenants: (userContext?: UserContext) => Promise<MinimalTenantDetails[]>;
isValidTenant: (tenantId: string, userContext?: UserContext) => Promise<boolean>;
isRestrictedEmailDomain: (emailDomain: string) => boolean;
isTenantAllowedForEmail: (email: string, tenantId: string) => boolean;
};
SuperTokensPluginTenantDiscoveryPluginConfig
type SuperTokensPluginTenantDiscoveryPluginConfig = {
enableTenantListAPI?: boolean;
};