@supertokens-plugins/progressive-profiling-react
Public root exports for @supertokens-plugins/progressive-profiling-react 0.3.1.
Package version: 0.3.1
Plugin protocol version (PLUGIN_VERSION): 0.0.1
The protocol version is an internal plugin compatibility constant. It is not the npm package version.
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 |
PLUGIN_VERSION |
Constant |
usePluginContext |
Constant |
UserProfileWrapper |
Constant |
default
Published from the emitted _default declaration.
Root export:
export default _default;
Resolved declaration:
declare const _default: {
init: (config?: (import('./types').SuperTokensPluginProfileProgressiveProfilingConfig & {
override?: ((oI: import('@shared/js').OverridableFunctions<import('./types').SuperTokensPluginProfileProgressiveProfilingImplementation>) => import('@shared/js').OverridableFunctions<import('./types').SuperTokensPluginProfileProgressiveProfilingImplementation>) | undefined;
}) | undefined) => import('supertokens-auth-react').SuperTokensPlugin;
usePluginContext: () => {
pluginConfig: import('./types').SuperTokensPluginProfileProgressiveProfilingConfig;
componentMap: import('./types').FormInputComponentMap;
querier: ReturnType<typeof import('@shared/react').getQuerier>;
api: ReturnType<typeof import('./api').getApi>;
t: (key: import('./types').TranslationKeys, replacements?: Record<string, string>) => string;
ProgressiveProfilingCompletedClaim: import('supertokens-auth-react/recipe/session').BooleanClaim;
};
PLUGIN_ID: string;
PLUGIN_VERSION: string;
UserProfileWrapper: () => import("react/jsx-runtime").JSX.Element | null;
};
init
Root export:
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { ProgressiveProfilingWrapper } from './progressive-profiling-wrapper';
export { init, usePluginContext, PLUGIN_ID, PLUGIN_VERSION, ProgressiveProfilingWrapper as UserProfileWrapper };
Resolved declaration:
import { SuperTokensPluginProfileProgressiveProfilingConfig, SuperTokensPluginProfileProgressiveProfilingImplementation, FormInputComponentMap, TranslationKeys } from './types';
import { SuperTokensPlugin } from 'supertokens-auth-react';
export declare const init: (config?: (SuperTokensPluginProfileProgressiveProfilingConfig & {
override?: ((oI: import('@shared/js').OverridableFunctions<SuperTokensPluginProfileProgressiveProfilingImplementation>) => import('@shared/js').OverridableFunctions<SuperTokensPluginProfileProgressiveProfilingImplementation>) | undefined;
}) | undefined) => SuperTokensPlugin;
PLUGIN_ID
Root export:
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { ProgressiveProfilingWrapper } from './progressive-profiling-wrapper';
export { init, usePluginContext, PLUGIN_ID, PLUGIN_VERSION, ProgressiveProfilingWrapper as UserProfileWrapper };
Resolved declaration:
export declare const PLUGIN_ID = "supertokens-plugin-progressive-profiling";
PLUGIN_VERSION
Root export:
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { ProgressiveProfilingWrapper } from './progressive-profiling-wrapper';
export { init, usePluginContext, PLUGIN_ID, PLUGIN_VERSION, ProgressiveProfilingWrapper as UserProfileWrapper };
Resolved declaration:
export declare const PLUGIN_VERSION = "0.0.1";
usePluginContext
Root export:
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { ProgressiveProfilingWrapper } from './progressive-profiling-wrapper';
export { init, usePluginContext, PLUGIN_ID, PLUGIN_VERSION, ProgressiveProfilingWrapper as UserProfileWrapper };
Resolved declaration:
import { SuperTokensPluginProfileProgressiveProfilingConfig, SuperTokensPluginProfileProgressiveProfilingImplementation, FormInputComponentMap, TranslationKeys } from './types';
import { getQuerier } from '@shared/react';
import { getApi } from './api';
import { BooleanClaim } from 'supertokens-auth-react/recipe/session';
declare const usePluginContext: () => {
pluginConfig: SuperTokensPluginProfileProgressiveProfilingConfig;
componentMap: FormInputComponentMap;
querier: ReturnType<typeof getQuerier>;
api: ReturnType<typeof getApi>;
t: (key: TranslationKeys, replacements?: Record<string, string>) => string;
ProgressiveProfilingCompletedClaim: BooleanClaim;
};
UserProfileWrapper
Published from the emitted ProgressiveProfilingWrapper declaration.
Root export:
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { ProgressiveProfilingWrapper } from './progressive-profiling-wrapper';
export { init, usePluginContext, PLUGIN_ID, PLUGIN_VERSION, ProgressiveProfilingWrapper as UserProfileWrapper };
Resolved declaration:
export declare const ProgressiveProfilingWrapper: () => import("react/jsx-runtime").JSX.Element | null;
Required signature types
These declarations are not additional package-root exports. They are included because the public signatures above depend on them.
defaultTranslationsProgressiveProfiling
export declare const defaultTranslationsProgressiveProfiling: {
readonly en: {
readonly PL_PP_NO_SECTIONS: "No sections found";
readonly PL_PP_SECTION_PROFILE_START_LABEL: "Profile";
readonly PL_PP_SECTION_PROFILE_START_DESCRIPTION: "Before advancing any further, you will have to go through a quick {steps} step process for setting up your profile. This is only done once.";
readonly PL_PP_SECTION_PROFILE_END_LABEL: "Profile";
readonly PL_PP_SECTION_PROFILE_END_DESCRIPTION: "You have completed the profile setup. You can now advance to the next step.";
readonly PL_PP_SECTION_NEXT_BUTTON: "Next";
readonly PL_PP_SECTION_SAVE_AND_NEXT_BUTTON: "Save & Next";
readonly PL_PP_SECTION_COMPLETE_BUTTON: "Complete";
readonly PL_PP_LOADING: "Loading...";
readonly PL_PP_PROFILE_SETUP_NOT_AVAILABLE: "The profile setup is not available";
};
};
FormInputComponentMap
import { BaseInput, FormFieldType } from '@shared/ui';
export type FormInputComponentMap = Record<FormFieldType, React.FC<BaseInput<any>>>;
getApi
import { getQuerier } from '@shared/react';
import { ProfileFormData } from '@supertokens-plugins/progressive-profiling-shared';
export declare const getApi: (querier: ReturnType<typeof getQuerier>) => {
getProfile: () => Promise<any>;
updateProfile: (payload: {
data: ProfileFormData;
}) => Promise<any>;
getSections: () => Promise<any>;
};
SuperTokensPluginProfileProgressiveProfilingConfig
import { ProfileFormData } from '@supertokens-plugins/progressive-profiling-shared';
export type SuperTokensPluginProfileProgressiveProfilingConfig = {
setupPagePath?: string;
requireSetup?: boolean;
showStartSection?: boolean;
showEndSection?: boolean;
onSuccess?: (data: ProfileFormData) => Promise<void> | undefined;
};
SuperTokensPluginProfileProgressiveProfilingImplementation
export type SuperTokensPluginProfileProgressiveProfilingImplementation = {
componentMap: () => FormInputComponentMap;
};
TranslationKeys
import { defaultTranslationsProgressiveProfiling } from './translations';
export type TranslationKeys = keyof (typeof defaultTranslationsProgressiveProfiling)["en"];