Skip to main content

@supertokens-plugins/profile-details-nodejs

Classes

Implementation

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:13

Constructors

Constructor
new Implementation(pluginConfig: SuperTokensPluginProfileDetailsNormalisedConfig): Implementation;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:39

Parameters
Returns

Implementation

Properties

PropertyModifierTypeDefault valueDefined in
buildFormDatapublic(this: Implementation, profile: BaseProfile, session: SessionContainerInterface, userContext?: Record<string, any>) => BaseFormFieldPayload[]undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:172
buildProfilepublic(this: Implementation, formData: BaseFormFieldPayload[], existingProfile: BaseProfile, session: SessionContainerInterface, userContext?: Record<string, any>) => BaseProfileundefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:153
defaultStorageHandlerGetpublic(this: Implementation, userId: string, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<{ profile: Record<string, BaseFormSection>; }>undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:43
defaultStorageHandlerSetpublic(this: Implementation, userId: string, payload: { profile: Record<string, BaseFormSection>; }, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:57
getFieldValueFromThirdPartyUserInfopublic(this: Implementation, providerId: string, field: any, rawUserInfoFromProvider: any, profile: BaseProfile) => BaseProfileundefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:84
getPluginFormFieldspublic(this: Implementation, session: SessionContainerInterface, userContext?: Record<string, any>) => any[]undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:72
getProfilepublic(this: Implementation, userId: string, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseProfile>undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:114
getSectionspublic(this: Implementation, session: SessionContainerInterface, userContext?: Record<string, any>) => BaseFormSection[]undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:185
sectionsprotectedBaseFormSection[][]supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:16
updateProfilepublic(this: Implementation, userId: string, payload: BaseFormFieldPayload[], session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>undefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:130
instancestaticImplementationundefinedsupertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:14

Methods

getInstanceOrThrow()
static getInstanceOrThrow(): Implementation;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:27

Returns

Implementation

init()
static init(pluginConfig: SuperTokensPluginProfileDetailsNormalisedConfig): Implementation;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:18

Parameters
Returns

Implementation

reset()
static reset(): void;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/implementation.ts:35

Returns

void

Type Aliases

BaseFormSection

type BaseFormSection = any;

SuperTokensPluginProfileDetailsConfig

type SuperTokensPluginProfileDetailsConfig = 
| {
registerSectionsForProgressiveProfiling?: boolean;
sections?: BaseFormSection[];
}
| undefined;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/types.ts:3

SuperTokensPluginProfileDetailsImplementation

type SuperTokensPluginProfileDetailsImplementation = {
thirdPartyFieldMap: (originalImplementation: ThirdPartyFieldMap) => ThirdPartyFieldMap;
};

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/types.ts:10

Properties

PropertyTypeDefined in
thirdPartyFieldMap(originalImplementation: ThirdPartyFieldMap) => ThirdPartyFieldMapsupertokens-plugins/packages/profile-details-nodejs/src/types.ts:11

SuperTokensPluginProfileDetailsNormalisedConfig

type SuperTokensPluginProfileDetailsNormalisedConfig = {
registerSectionsForProgressiveProfiling: boolean;
sections: BaseFormSection[];
};

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/types.ts:14

Properties

ThirdPartyFieldMap()

type ThirdPartyFieldMap = (providerId: string, field: BaseFormSection & {
sectionId: string;
}, rawUserInfoFromProvider: any, profile: BaseFormSection) => BaseFormSection[string];

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/types.ts:19

Parameters

ParameterType
providerIdstring
fieldBaseFormSection & { sectionId: string; }
rawUserInfoFromProviderany
profileBaseFormSection

Returns

BaseFormSection[string]

Variables

default

default: {
getProfile: (userId: string, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseProfile>;
getSections: (session: SessionContainerInterface, userContext?: Record<string, any>) => BaseFormSection[];
init: any;
PLUGIN_ID: string;
PLUGIN_VERSION: string;
updateProfile: (userId: string, profile: BaseFormFieldPayload[], session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>;
};

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/index.ts:27

Type Declaration

NameTypeDefined in
getProfile()(userId: string, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseProfile>supertokens-plugins/packages/profile-details-nodejs/src/index.ts:27
getSections()(session: SessionContainerInterface, userContext?: Record<string, any>) => BaseFormSection[]supertokens-plugins/packages/profile-details-nodejs/src/index.ts:27
initanysupertokens-plugins/packages/profile-details-nodejs/src/index.ts:27
PLUGIN_IDstringsupertokens-plugins/packages/profile-details-nodejs/src/index.ts:27
PLUGIN_VERSIONstringsupertokens-plugins/packages/profile-details-nodejs/src/index.ts:27
updateProfile()(userId: string, profile: BaseFormFieldPayload[], session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>supertokens-plugins/packages/profile-details-nodejs/src/index.ts:27

DEFAULT_REGISTER_SECTIONS_FOR_PROGRESSIVE_PROFILING

const DEFAULT_REGISTER_SECTIONS_FOR_PROGRESSIVE_PROFILING: true = true;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:12

enableDebugLogs

enableDebugLogs: any;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/logger.ts:4

HANDLE_BASE_PATH

const HANDLE_BASE_PATH: "/plugin/supertokens-plugin-profile-details";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:5

init

const init: any;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/plugin.ts:20

logDebugMessage

logDebugMessage: any;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/logger.ts:4

METADATA_KEY

const METADATA_KEY: "supertokens-plugin-profile-details";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:7

METADATA_PROFILE_KEY

const METADATA_PROFILE_KEY: "st-profile" = "st-profile";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:8

PLUGIN_ID

const PLUGIN_ID: "supertokens-plugin-profile-details" = "supertokens-plugin-profile-details";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:1

PLUGIN_SDK_VERSION

const PLUGIN_SDK_VERSION: string[];

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:3

PLUGIN_VERSION

const PLUGIN_VERSION: "0.0.1" = "0.0.1";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:2

SUPERTOKENS_PLUGIN_PROGRESSIVE_PROFILING_ID

const SUPERTOKENS_PLUGIN_PROGRESSIVE_PROFILING_ID: "supertokens-plugin-progressive-profiling" = "supertokens-plugin-progressive-profiling";

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/constants.ts:10

Functions

getProfile()

function getProfile(
userId: string,
session: SessionContainerInterface,
userContext?: Record<string, any>): Promise<BaseProfile>;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/index.ts:10

Parameters

ParameterType
userIdstring
sessionSessionContainerInterface
userContext?Record<string, any>

Returns

Promise<BaseProfile>

getSections()

function getSections(session: SessionContainerInterface, userContext?: Record<string, any>): BaseFormSection[];

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/index.ts:23

Parameters

ParameterType
sessionSessionContainerInterface
userContext?Record<string, any>

Returns

BaseFormSection[]

updateProfile()

function updateProfile(
userId: string,
profile: BaseFormFieldPayload[],
session: SessionContainerInterface,
userContext?: Record<string, any>): Promise<void>;

Defined in: supertokens-plugins/packages/profile-details-nodejs/src/index.ts:14

Parameters

ParameterType
userIdstring
profileBaseFormFieldPayload[]
sessionSessionContainerInterface
userContext?Record<string, any>

Returns

Promise<void>