UNPKG

@leancodepl/kratos

Version:

Headless React components library for building Ory Kratos authentication flows

106 lines 3.68 kB
import { Identity } from './Identity'; import { ContinueWith } from './ContinueWith'; import { UiContainer } from './UiContainer'; /** * This flow is used when an identity wants to update settings * (e.g. profile data, passwords, ...) in a selfservice manner. * * We recommend reading the [User Settings Documentation](../self-service/flows/user-settings) * @export * @interface SettingsFlow */ export interface SettingsFlow { /** * Active, if set, contains the registration method that is being used. It is initially * not set. * @type {string} * @memberof SettingsFlow */ active?: string; /** * Contains a list of actions, that could follow this flow * * It can, for example, contain a reference to the verification flow, created as part of the user's * registration. * @type {Array<ContinueWith>} * @memberof SettingsFlow */ continue_with?: Array<ContinueWith>; /** * ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, * a new flow has to be initiated. * @type {Date} * @memberof SettingsFlow */ expires_at: Date; /** * ID represents the flow's unique ID. When performing the settings flow, this * represents the id in the settings ui's query parameter: http://<selfservice.flows.settings.ui_url>?flow=<id> * @type {string} * @memberof SettingsFlow */ id: string; /** * * @type {Identity} * @memberof SettingsFlow */ identity: Identity; /** * IssuedAt is the time (UTC) when the flow occurred. * @type {Date} * @memberof SettingsFlow */ issued_at: Date; /** * RequestURL is the initial URL that was requested from Ory Kratos. It can be used * to forward information contained in the URL's path or query for example. * @type {string} * @memberof SettingsFlow */ request_url: string; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof SettingsFlow */ return_to?: string; /** * State represents the state of this flow. It knows two states: * * show_form: No user data has been collected, or it is invalid, and thus the form should be shown. * success: Indicates that the settings flow has been updated successfully with the provided data. * Done will stay true when repeatedly checking. If set to true, done will revert back to false only * when a flow with invalid (e.g. "please use a valid phone number") data was sent. * @type {any} * @memberof SettingsFlow */ state: any | null; /** * TransientPayload is used to pass data from the settings flow to hooks and email templates * @type {object} * @memberof SettingsFlow */ transient_payload?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof SettingsFlow */ type: string; /** * * @type {UiContainer} * @memberof SettingsFlow */ ui: UiContainer; } /** * Check if a given object implements the SettingsFlow interface. */ export declare function instanceOfSettingsFlow(value: object): value is SettingsFlow; export declare function SettingsFlowFromJSON(json: any): SettingsFlow; export declare function SettingsFlowFromJSONTyped(json: any, ignoreDiscriminator: boolean): SettingsFlow; export declare function SettingsFlowToJSON(json: any): SettingsFlow; export declare function SettingsFlowToJSONTyped(value?: SettingsFlow | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=SettingsFlow.d.ts.map