Skip to main content

@supertokens-plugins/progressive-profiling-nodejs

Classes

Implementation

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:10

Constructors

Constructor
new Implementation(): Implementation;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:40

Returns

Implementation

Properties

PropertyModifierTypeDefault valueDefined in
areAllSectionsCompletedpublic(this: Implementation, __namedParameters: { recipeUserId: string; tenantId: string; userContext: any; userId: string; }) => Promise<boolean>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:360
defaultStorageHandlerGetFieldspublic(this: Implementation, __namedParameters: { pluginFormFields: Pick<FormField, "id" | "defaultValue"> & { sectionId: string; }[]; session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<ProfileFormData>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:59
defaultStorageHandlerSetFieldspublic(this: Implementation, __namedParameters: { data: ProfileFormData; pluginFormFields: Pick<FormField, "id" | "defaultValue"> & { sectionId: string; }[]; session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<void>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:85
existingSectionsprotectedFormSection & { storageHandlerId: string; }[][]supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:13
existingStorageHandlersprotectedRecord<string, Pick<Parameters<RegisterSections>[0], "set" | "get">>{}supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:14
getAllSectionspublic(this: Implementation, input: { session: SessionContainerInterface; userContext?: Record<string, any>; }) => FormSection & { storageHandlerId: string; }[]undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:156
getSectionValuespublic(this: Implementation, __namedParameters: { session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<{ data: ProfileFormData; status: string; }>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:296
getSessionUserSectionspublic(this: Implementation, __namedParameters: { session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<{ sections: { completed: any; description: SharedFormSection; fields: any; id: SharedFormSection; label: SharedFormSection; }[]; status: string; }>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:164
isSectionValidpublic(this: Implementation, __namedParameters: { data: ProfileFormData; section: FormSection; session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<any>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:336
metadataprotectedanyundefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:15
registerSectionspublicRegisterSectionsundefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:129
setSectionValuespublic(this: Implementation, __namedParameters: { data: ProfileFormData; session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise< | { errors: any; status: string; } | { errors?: undefined; status: string; }>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:193
storeCompletedSectionspublic(this: Implementation, __namedParameters: { sectionsCompleted: Record<string, boolean>; session: SessionContainerInterface; userContext: any; userId: string; }) => Promise<void>undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:370
validateFieldpublic(this: Implementation, __namedParameters: { field: FormField; session: SessionContainerInterface; userContext?: Record<string, any>; value: FormFieldValue; }) => string | string[]undefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:317
instancestaticImplementationundefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:11
ProgressiveProfilingCompletedClaimstaticBooleanClaimundefinedsupertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:17

Methods

getInstanceOrThrow()
static getInstanceOrThrow(): Implementation;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:28

Returns

Implementation

init()
static init(): Implementation;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:19

Returns

Implementation

reset()
static reset(): void;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/implementation.ts:36

Returns

void

Type Aliases

FormSection

type FormSection = Omit<BaseFormSection, "completed">;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:14

RegisterSections()

type RegisterSections = (payload: {
get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseFormSection>;
sections: FormSection[];
set: (data: BaseFormSection, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>;
storageHandlerId: string;
}) => void;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:16

Parameters

ParameterType
payload{ get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseFormSection>; sections: FormSection[]; set: (data: BaseFormSection, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>; storageHandlerId: string; }
payload.get(session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<BaseFormSection>
payload.sectionsFormSection[]
payload.set(data: BaseFormSection, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>
payload.storageHandlerIdstring

Returns

void

SuperTokensPluginProfileProgressiveProfilingConfig

type SuperTokensPluginProfileProgressiveProfilingConfig = {
sections?: FormSection[];
};

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:4

Properties

SuperTokensPluginProfileProgressiveProfilingNormalisedConfig

type SuperTokensPluginProfileProgressiveProfilingNormalisedConfig = Required<SuperTokensPluginProfileProgressiveProfilingConfig>;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:7

UserMetadataConfig

type UserMetadataConfig = {
sectionsCompleted: Record<string, boolean>;
};

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:10

Properties

PropertyTypeDefined in
sectionsCompletedRecord<string, boolean>supertokens-plugins/packages/progressive-profiling-nodejs/src/types.ts:11

Variables

default

default: {
getAllSections: (input: {
session: SessionContainerInterface;
userContext?: Record<string, any>;
}) => FormSection & {
storageHandlerId: string;
}[];
getSectionValues: (input: {
session: SessionContainerInterface;
userContext?: Record<string, any>;
}) => Promise<{
data: ProfileFormData;
status: string;
}>;
init: any;
PLUGIN_ID: string;
PLUGIN_VERSION: string;
registerSections: (payload: {
get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<ProfileFormData>;
sections: FormSection[];
set: (data: ProfileFormData, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>;
storageHandlerId: string;
}) => void;
setSectionValues: (input: {
data: ProfileFormData;
session: SessionContainerInterface;
userContext?: Record<string, any>;
}) => Promise<
| {
errors: any;
status: string;
}
| {
errors?: undefined;
status: string;
}>;
};

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:31

Type Declaration

NameTypeDefined in
getAllSections()(input: { session: SessionContainerInterface; userContext?: Record<string, any>; }) => FormSection & { storageHandlerId: string; }[]supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:38
getSectionValues()(input: { session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise<{ data: ProfileFormData; status: string; }>supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:35
initanysupertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:32
PLUGIN_IDstringsupertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:33
PLUGIN_VERSIONstringsupertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:34
registerSections()(payload: { get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<ProfileFormData>; sections: FormSection[]; set: (data: ProfileFormData, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>; storageHandlerId: string; }) => voidsupertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:37
setSectionValues()(input: { data: ProfileFormData; session: SessionContainerInterface; userContext?: Record<string, any>; }) => Promise< | { errors: any; status: string; } | { errors?: undefined; status: string; }>supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:36

DEFAULT_SECTIONS

const DEFAULT_SECTIONS: FormSection[] = [];

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:12

enableDebugLogs

enableDebugLogs: any;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/logger.ts:4

HANDLE_BASE_PATH

const HANDLE_BASE_PATH: "/plugin/supertokens-plugin-progressive-profiling";

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:10

init

const init: any;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/plugin.ts:16

logDebugMessage

logDebugMessage: any;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/logger.ts:4

METADATA_KEY

const METADATA_KEY: "supertokens-plugin-progressive-profiling";

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:7

METADATA_PROFILE_KEY

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

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:8

PLUGIN_ID

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

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:3

PLUGIN_SDK_VERSION

const PLUGIN_SDK_VERSION: string[];

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:5

PLUGIN_VERSION

const PLUGIN_VERSION: "0.0.1" = "0.0.1";

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/constants.ts:4

Functions

getAllSections()

function getAllSections(input: {
session: SessionContainerInterface;
userContext?: Record<string, any>;
}): FormSection & {
storageHandlerId: string;
}[];

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:26

Parameters

ParameterType
input{ session: SessionContainerInterface; userContext?: Record<string, any>; }
input.sessionSessionContainerInterface
input.userContext?Record<string, any>

Returns

FormSection & { storageHandlerId: string; }[]

getSectionValues()

function getSectionValues(input: {
session: SessionContainerInterface;
userContext?: Record<string, any>;
}): Promise<{
data: ProfileFormData;
status: string;
}>;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:10

Parameters

ParameterType
input{ session: SessionContainerInterface; userContext?: Record<string, any>; }
input.sessionSessionContainerInterface
input.userContext?Record<string, any>

Returns

Promise<{ data: ProfileFormData; status: string; }>

registerSections()

function registerSections(payload: {
get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<ProfileFormData>;
sections: FormSection[];
set: (data: ProfileFormData, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>;
storageHandlerId: string;
}): void;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:22

Parameters

ParameterType
payload{ get: (session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<ProfileFormData>; sections: FormSection[]; set: (data: ProfileFormData, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>; storageHandlerId: string; }
payload.get(session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<ProfileFormData>
payload.sectionsFormSection[]
payload.set(data: ProfileFormData, session: SessionContainerInterface, userContext?: Record<string, any>) => Promise<void>
payload.storageHandlerIdstring

Returns

void

setSectionValues()

function setSectionValues(input: {
data: ProfileFormData;
session: SessionContainerInterface;
userContext?: Record<string, any>;
}): Promise<
| {
errors: any;
status: string;
}
| {
errors?: undefined;
status: string;
}>;

Defined in: supertokens-plugins/packages/progressive-profiling-nodejs/src/index.ts:14

Parameters

ParameterType
input{ data: ProfileFormData; session: SessionContainerInterface; userContext?: Record<string, any>; }
input.dataProfileFormData
input.sessionSessionContainerInterface
input.userContext?Record<string, any>

Returns

Promise< | { errors: any; status: string; } | { errors?: undefined; status: string; }>