Skip to main content

@supertokens-plugins/profile-details-react

Type Aliases

AccountDetails

type AccountDetails = {
connectedAccounts: ConnectedAccount[];
emails: string[];
phoneNumbers: string[];
timeJoined: number;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:24

Properties

ConnectedAccount

type ConnectedAccount = {
email: string;
provider: string;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:31

Properties

FieldViewComponentProps<T>

type FieldViewComponentProps<T> = {
className?: string;
options?: BaseFormSection["options"];
value: T;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:15

Type Parameters

Type ParameterDefault type
T extends BaseFormSectionBaseFormSection

Properties

FormInputComponentMap

type FormInputComponentMap = Record<BaseFormSection, React.FC<BaseFormSection<any>>>;

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:20

FormViewComponentMap

type FormViewComponentMap = Omit<Record<BaseFormSection, React.FC<FieldViewComponentProps<any>>>, "password">;

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:21

ProfileDetails

type ProfileDetails = Record<string, string | number | boolean | null | undefined>;

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:23

SuperTokensPluginProfileDetailsConfig

type SuperTokensPluginProfileDetailsConfig = undefined;

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:6

SuperTokensPluginProfileDetailsImplementation

type SuperTokensPluginProfileDetailsImplementation = {
fieldInputComponentMap: (componentMap: FormInputComponentMap) => FormInputComponentMap;
fieldViewComponentMap: (componentMap: FormViewComponentMap) => FormViewComponentMap;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:9

Properties

SuperTokensPluginProfileDetailsNormalisedConfig

type SuperTokensPluginProfileDetailsNormalisedConfig = undefined;

Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:7

TranslationKeys

type TranslationKeys = keyof typeof defaultTranslationsCommonDetails["en"];

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

Variables

API_PATH

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

Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:34

default

default: {
init: any;
PLUGIN_ID: string;
PLUGIN_VERSION: string;
usePluginContext: any;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/index.ts:5

Type Declaration

defaultTranslationsCommonDetails

const defaultTranslationsCommonDetails: {
en: {
PL_CD_DISABLED: "Disabled";
PL_CD_ENABLED: "Enabled";
PL_CD_IMAGE_ALT: "Preview";
PL_CD_LOADING: "Loading...";
PL_CD_NO: "No";
PL_CD_NO_EMAIL: "No email";
PL_CD_NO_IMAGE: "No image";
PL_CD_NO_PHONE: "No phone";
PL_CD_NO_URL: "No URL";
PL_CD_NONE_SELECTED: "None selected";
PL_CD_NOT_PROVIDED: "Not provided";
PL_CD_SECTION_ACCOUNT_DESCRIPTION: "Here you can find all your account details that can be used for login.";
PL_CD_SECTION_ACCOUNT_EMAIL_NO_EMAILS: "No email addresse";
PL_CD_SECTION_ACCOUNT_EMAILS: "Email addresses";
PL_CD_SECTION_ACCOUNT_ERROR_FETCHING_DETAILS: "Error getting the profile";
PL_CD_SECTION_ACCOUNT_LABEL: "Account";
PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS: "Phone numbers";
PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS_NO_PHONE_NUMBERS: "No phone number";
PL_CD_SECTION_ACCOUNT_TIME_JOINED: "Join date";
PL_CD_SECTION_ACCOUNT_TIME_JOINED_NO_TIME_JOINED: "No join date";
PL_CD_SECTION_DETAILS_CANCEL_BUTTON: "Cancel";
PL_CD_SECTION_DETAILS_EDIT_BUTTON: "Edit";
PL_CD_SECTION_DETAILS_ERROR_FETCHING_DETAILS: "Error getting the profile";
PL_CD_SECTION_DETAILS_SAVE_BUTTON: "Save";
PL_CD_YES: "Yes";
};
};

Defined in: supertokens-plugins/packages/profile-details-react/src/translations.ts:1

Type Declaration

NameTypeDefault valueDefined in
en{ PL_CD_DISABLED: "Disabled"; PL_CD_ENABLED: "Enabled"; PL_CD_IMAGE_ALT: "Preview"; PL_CD_LOADING: "Loading..."; PL_CD_NO: "No"; PL_CD_NO_EMAIL: "No email"; PL_CD_NO_IMAGE: "No image"; PL_CD_NO_PHONE: "No phone"; PL_CD_NO_URL: "No URL"; PL_CD_NONE_SELECTED: "None selected"; PL_CD_NOT_PROVIDED: "Not provided"; PL_CD_SECTION_ACCOUNT_DESCRIPTION: "Here you can find all your account details that can be used for login."; PL_CD_SECTION_ACCOUNT_EMAIL_NO_EMAILS: "No email addresse"; PL_CD_SECTION_ACCOUNT_EMAILS: "Email addresses"; PL_CD_SECTION_ACCOUNT_ERROR_FETCHING_DETAILS: "Error getting the profile"; PL_CD_SECTION_ACCOUNT_LABEL: "Account"; PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS: "Phone numbers"; PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS_NO_PHONE_NUMBERS: "No phone number"; PL_CD_SECTION_ACCOUNT_TIME_JOINED: "Join date"; PL_CD_SECTION_ACCOUNT_TIME_JOINED_NO_TIME_JOINED: "No join date"; PL_CD_SECTION_DETAILS_CANCEL_BUTTON: "Cancel"; PL_CD_SECTION_DETAILS_EDIT_BUTTON: "Edit"; PL_CD_SECTION_DETAILS_ERROR_FETCHING_DETAILS: "Error getting the profile"; PL_CD_SECTION_DETAILS_SAVE_BUTTON: "Save"; PL_CD_YES: "Yes"; }-supertokens-plugins/packages/profile-details-react/src/translations.ts:2
en.PL_CD_DISABLED"Disabled""Disabled"supertokens-plugins/packages/profile-details-react/src/translations.ts:9
en.PL_CD_ENABLED"Enabled""Enabled"supertokens-plugins/packages/profile-details-react/src/translations.ts:8
en.PL_CD_IMAGE_ALT"Preview""Preview"supertokens-plugins/packages/profile-details-react/src/translations.ts:10
en.PL_CD_LOADING"Loading...""Loading..."supertokens-plugins/packages/profile-details-react/src/translations.ts:3
en.PL_CD_NO"No""No"supertokens-plugins/packages/profile-details-react/src/translations.ts:7
en.PL_CD_NO_EMAIL"No email""No email"supertokens-plugins/packages/profile-details-react/src/translations.ts:13
en.PL_CD_NO_IMAGE"No image""No image"supertokens-plugins/packages/profile-details-react/src/translations.ts:11
en.PL_CD_NO_PHONE"No phone""No phone"supertokens-plugins/packages/profile-details-react/src/translations.ts:14
en.PL_CD_NO_URL"No URL""No URL"supertokens-plugins/packages/profile-details-react/src/translations.ts:12
en.PL_CD_NONE_SELECTED"None selected""None selected"supertokens-plugins/packages/profile-details-react/src/translations.ts:5
en.PL_CD_NOT_PROVIDED"Not provided""Not provided"supertokens-plugins/packages/profile-details-react/src/translations.ts:4
en.PL_CD_SECTION_ACCOUNT_DESCRIPTION"Here you can find all your account details that can be used for login.""Here you can find all your account details that can be used for login."supertokens-plugins/packages/profile-details-react/src/translations.ts:22
en.PL_CD_SECTION_ACCOUNT_EMAIL_NO_EMAILS"No email addresse""No email addresse"supertokens-plugins/packages/profile-details-react/src/translations.ts:26
en.PL_CD_SECTION_ACCOUNT_EMAILS"Email addresses""Email addresses"supertokens-plugins/packages/profile-details-react/src/translations.ts:23
en.PL_CD_SECTION_ACCOUNT_ERROR_FETCHING_DETAILS"Error getting the profile""Error getting the profile"supertokens-plugins/packages/profile-details-react/src/translations.ts:29
en.PL_CD_SECTION_ACCOUNT_LABEL"Account""Account"supertokens-plugins/packages/profile-details-react/src/translations.ts:21
en.PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS"Phone numbers""Phone numbers"supertokens-plugins/packages/profile-details-react/src/translations.ts:27
en.PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS_NO_PHONE_NUMBERS"No phone number""No phone number"supertokens-plugins/packages/profile-details-react/src/translations.ts:28
en.PL_CD_SECTION_ACCOUNT_TIME_JOINED"Join date""Join date"supertokens-plugins/packages/profile-details-react/src/translations.ts:24
en.PL_CD_SECTION_ACCOUNT_TIME_JOINED_NO_TIME_JOINED"No join date""No join date"supertokens-plugins/packages/profile-details-react/src/translations.ts:25
en.PL_CD_SECTION_DETAILS_CANCEL_BUTTON"Cancel""Cancel"supertokens-plugins/packages/profile-details-react/src/translations.ts:17
en.PL_CD_SECTION_DETAILS_EDIT_BUTTON"Edit""Edit"supertokens-plugins/packages/profile-details-react/src/translations.ts:18
en.PL_CD_SECTION_DETAILS_ERROR_FETCHING_DETAILS"Error getting the profile""Error getting the profile"supertokens-plugins/packages/profile-details-react/src/translations.ts:16
en.PL_CD_SECTION_DETAILS_SAVE_BUTTON"Save""Save"supertokens-plugins/packages/profile-details-react/src/translations.ts:19
en.PL_CD_YES"Yes""Yes"supertokens-plugins/packages/profile-details-react/src/translations.ts:6

enableDebugLogs

enableDebugLogs: any;

Defined in: supertokens-plugins/packages/profile-details-react/src/logger.ts:5

FIELD_INPUT_COMPONENT_MAP

const FIELD_INPUT_COMPONENT_MAP: FormInputComponentMap;

Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:36

FIELD_VIEW_COMPONENT_MAP

const FIELD_VIEW_COMPONENT_MAP: FormViewComponentMap;

Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:63

init

const init: any;

Defined in: supertokens-plugins/packages/profile-details-react/src/plugin.ts:39

logDebugMessage

logDebugMessage: any;

Defined in: supertokens-plugins/packages/profile-details-react/src/logger.ts:5

PLUGIN_ID

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

Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:31

PLUGIN_VERSION

const PLUGIN_VERSION: "0.0.1" = "0.0.1";

Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:32

usePluginContext

usePluginContext: any;

Defined in: supertokens-plugins/packages/profile-details-react/src/plugin.ts:26

Functions

AccountDetailsSection()

function AccountDetailsSection(__namedParameters: {
onFetch: () => Promise<{
profile: Record<string, any>;
user: User;
}>;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/account-details-section.tsx:13

Parameters

ParameterType
__namedParameters{ onFetch: () => Promise<{ profile: Record<string, any>; user: User; }>; }
__namedParameters.onFetch() => Promise<{ profile: Record<string, any>; user: User; }>

Returns

Element

AccountSectionWrapper()

function AccountSectionWrapper(): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/account-section-wrapper.tsx:7

Returns

Element

BooleanFieldViewComponent()

function BooleanFieldViewComponent(__namedParameters: FieldViewComponentProps<boolean>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:12

Parameters

ParameterType
__namedParametersFieldViewComponentProps<boolean>

Returns

Element

DateFieldViewComponent()

function DateFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:160

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element

DefaultFieldViewComponent()

function DefaultFieldViewComponent(__namedParameters: FieldViewComponentProps): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:149

Parameters

ParameterType
__namedParametersFieldViewComponentProps

Returns

Element

DetailsSectionContent()

function DetailsSectionContent(__namedParameters: {
onFetch: () => Promise<{
profile: Record<string, any>;
user: User;
}>;
onSubmit: (data: BaseFormFieldPayload[]) => Promise<any>;
section: BaseFormSection;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/details-section.tsx:15

Parameters

ParameterType
__namedParameters{ onFetch: () => Promise<{ profile: Record<string, any>; user: User; }>; onSubmit: (data: BaseFormFieldPayload[]) => Promise<any>; section: BaseFormSection; }
__namedParameters.onFetch() => Promise<{ profile: Record<string, any>; user: User; }>
__namedParameters.onSubmit(data: BaseFormFieldPayload[]) => Promise<any>
__namedParameters.sectionBaseFormSection

Returns

Element

DetailsSectionWrapper()

function DetailsSectionWrapper(__namedParameters: {
section: BaseFormSection;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/details-section-wrapper.tsx:8

Parameters

ParameterType
__namedParameters{ section: BaseFormSection; }
__namedParameters.sectionBaseFormSection

Returns

Element

EmailFieldViewComponent()

function EmailFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:119

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element

FieldView()

function FieldView(__namedParameters: FieldViewComponentProps<FormFieldValue> & {
componentMap: FormViewComponentMap;
type: any;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:171

Parameters

ParameterType
__namedParametersFieldViewComponentProps<FormFieldValue> & { componentMap: FormViewComponentMap; type: any; }

Returns

Element

getApi()

function getApi(querier: any): {
getDetails: () => Promise<any>;
getSections: () => Promise<any>;
updateProfile: (payload: {
data: BaseFormFieldPayload[];
}) => Promise<any>;
};

Defined in: supertokens-plugins/packages/profile-details-react/src/api.ts:7

Parameters

ParameterType
querierany

Returns

{
getDetails: () => Promise<any>;
getSections: () => Promise<any>;
updateProfile: (payload: {
data: BaseFormFieldPayload[];
}) => Promise<any>;
}

ImageUrlFieldViewComponent()

function ImageUrlFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:80

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element

MultiselectFieldViewComponent()

function MultiselectFieldViewComponent(__namedParameters: FieldViewComponentProps<string[]>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:38

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string[]>

Returns

Element

PhoneFieldViewComponent()

function PhoneFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:134

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element

SectionEdit()

function SectionEdit(__namedParameters: {
fields: any;
id: any;
onCancel: any;
onSubmit: any;
values: any;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/section-edit.tsx:12

Parameters

ParameterType
__namedParameters{ fields: any; id: any; onCancel: any; onSubmit: any; values: any; }
__namedParameters.fieldsany
__namedParameters.idany
__namedParameters.onCancelany
__namedParameters.onSubmitany
__namedParameters.valuesany

Returns

Element

SectionView()

function SectionView(__namedParameters: {
fields: any;
onEdit: any;
values: any;
}): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/section-view.tsx:11

Parameters

ParameterType
__namedParameters{ fields: any; onEdit: any; values: any; }
__namedParameters.fieldsany
__namedParameters.onEditany
__namedParameters.valuesany

Returns

Element

SelectFieldViewComponent()

function SelectFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:62

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element

ToggleFieldViewComponent()

function ToggleFieldViewComponent(__namedParameters: FieldViewComponentProps<boolean>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:25

Parameters

ParameterType
__namedParametersFieldViewComponentProps<boolean>

Returns

Element

UrlFieldViewComponent()

function UrlFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;

Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/field-view-components.tsx:100

Parameters

ParameterType
__namedParametersFieldViewComponentProps<string>

Returns

Element