/* tslint:disable */ /* eslint-disable */ /** * Ory Kratos API * Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests. * * The version of the OpenAPI document: 1.0.0 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { Configuration } from './configuration'; import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; /** * AuthenticateOKBody authenticate o k body * @export * @interface AuthenticateOKBody */ export interface AuthenticateOKBody { /** * An opaque token used to authenticate a user after a successful login * @type {string} * @memberof AuthenticateOKBody */ IdentityToken: string; /** * The status of the authentication * @type {string} * @memberof AuthenticateOKBody */ Status: string; } /** * * @export * @interface CompleteSelfServiceBrowserSettingsOIDCFlowPayload */ export interface CompleteSelfServiceBrowserSettingsOIDCFlowPayload { /** * Flow ID is the flow\'s ID. in: query * @type {string} * @memberof CompleteSelfServiceBrowserSettingsOIDCFlowPayload */ flow?: string; /** * Link this provider Either this or `unlink` must be set. type: string in: body * @type {string} * @memberof CompleteSelfServiceBrowserSettingsOIDCFlowPayload */ link?: string; /** * Unlink this provider Either this or `link` must be set. type: string in: body * @type {string} * @memberof CompleteSelfServiceBrowserSettingsOIDCFlowPayload */ unlink?: string; } /** * nolint:deadcode,unused * @export * @interface CompleteSelfServiceBrowserSettingsProfileStrategyFlow */ export interface CompleteSelfServiceBrowserSettingsProfileStrategyFlow { /** * The Anti-CSRF Token This token is only required when performing browser flows. * @type {string} * @memberof CompleteSelfServiceBrowserSettingsProfileStrategyFlow */ csrf_token?: string; /** * Method Should be set to profile when trying to update a profile. type: string * @type {string} * @memberof CompleteSelfServiceBrowserSettingsProfileStrategyFlow */ method?: string; /** * Traits contains all of the identity\'s traits. * @type {object} * @memberof CompleteSelfServiceBrowserSettingsProfileStrategyFlow */ traits: object; } /** * * @export * @interface CompleteSelfServiceLoginFlowWithPasswordMethod */ export interface CompleteSelfServiceLoginFlowWithPasswordMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof CompleteSelfServiceLoginFlowWithPasswordMethod */ csrf_token?: string; /** * Method should be set to \"password\" when logging in using the identifier and password strategy. * @type {string} * @memberof CompleteSelfServiceLoginFlowWithPasswordMethod */ method?: string; /** * The user\'s password. * @type {string} * @memberof CompleteSelfServiceLoginFlowWithPasswordMethod */ password?: string; /** * Identifier is the email or username of the user trying to log in. * @type {string} * @memberof CompleteSelfServiceLoginFlowWithPasswordMethod */ password_identifier?: string; } /** * * @export * @interface CompleteSelfServiceRecoveryFlowWithLinkMethod */ export interface CompleteSelfServiceRecoveryFlowWithLinkMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof CompleteSelfServiceRecoveryFlowWithLinkMethod */ csrf_token?: string; /** * Email to Recover Needs to be set when initiating the flow. If the email is a registered recovery email, a recovery link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email in: body * @type {string} * @memberof CompleteSelfServiceRecoveryFlowWithLinkMethod */ email?: string; } /** * * @export * @interface CompleteSelfServiceSettingsFlowWithPasswordMethod */ export interface CompleteSelfServiceSettingsFlowWithPasswordMethod { /** * CSRFToken is the anti-CSRF token type: string * @type {string} * @memberof CompleteSelfServiceSettingsFlowWithPasswordMethod */ csrf_token?: string; /** * Method Should be set to password when trying to update a password. type: string * @type {string} * @memberof CompleteSelfServiceSettingsFlowWithPasswordMethod */ method?: string; /** * Password is the updated password type: string * @type {string} * @memberof CompleteSelfServiceSettingsFlowWithPasswordMethod */ password: string; } /** * * @export * @interface CompleteSelfServiceVerificationFlowWithLinkMethod */ export interface CompleteSelfServiceVerificationFlowWithLinkMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof CompleteSelfServiceVerificationFlowWithLinkMethod */ csrf_token?: string; /** * Email to Verify Needs to be set when initiating the flow. If the email is a registered verification email, a verification link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email in: body * @type {string} * @memberof CompleteSelfServiceVerificationFlowWithLinkMethod */ email?: string; } /** * ContainerChangeResponseItem change item in response to ContainerChanges operation * @export * @interface ContainerChangeResponseItem */ export interface ContainerChangeResponseItem { /** * Kind of change * @type {number} * @memberof ContainerChangeResponseItem */ Kind: number; /** * Path to file that has changed * @type {string} * @memberof ContainerChangeResponseItem */ Path: string; } /** * ContainerCreateCreatedBody OK response to ContainerCreate operation * @export * @interface ContainerCreateCreatedBody */ export interface ContainerCreateCreatedBody { /** * The ID of the created container * @type {string} * @memberof ContainerCreateCreatedBody */ Id: string; /** * Warnings encountered when creating the container * @type {Array} * @memberof ContainerCreateCreatedBody */ Warnings: Array; } /** * ContainerTopOKBody OK response to ContainerTop operation * @export * @interface ContainerTopOKBody */ export interface ContainerTopOKBody { /** * Each process running in the container, where each is process is an array of values corresponding to the titles * @type {Array>} * @memberof ContainerTopOKBody */ Processes: Array>; /** * The ps column titles * @type {Array} * @memberof ContainerTopOKBody */ Titles: Array; } /** * ContainerUpdateOKBody OK response to ContainerUpdate operation * @export * @interface ContainerUpdateOKBody */ export interface ContainerUpdateOKBody { /** * warnings * @type {Array} * @memberof ContainerUpdateOKBody */ Warnings: Array; } /** * ContainerWaitOKBody OK response to ContainerWait operation * @export * @interface ContainerWaitOKBody */ export interface ContainerWaitOKBody { /** * * @type {ContainerWaitOKBodyError} * @memberof ContainerWaitOKBody */ Error: ContainerWaitOKBodyError; /** * Exit code of the container * @type {number} * @memberof ContainerWaitOKBody */ StatusCode: number; } /** * ContainerWaitOKBodyError container waiting error, if any * @export * @interface ContainerWaitOKBodyError */ export interface ContainerWaitOKBodyError { /** * Details of an error * @type {string} * @memberof ContainerWaitOKBodyError */ Message?: string; } /** * * @export * @interface CreateIdentity */ export interface CreateIdentity { /** * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits. * @type {string} * @memberof CreateIdentity */ schema_id: string; /** * Traits represent an identity\'s traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`. * @type {object} * @memberof CreateIdentity */ traits: object; } /** * * @export * @interface CreateRecoveryLink */ export interface CreateRecoveryLink { /** * Link Expires In The recovery link will expire at that point in time. Defaults to the configuration value of `selfservice.flows.recovery.request_lifespan`. * @type {string} * @memberof CreateRecoveryLink */ expires_in?: string; /** * * @type {string} * @memberof CreateRecoveryLink */ identity_id: string; } /** * * @export * @interface ErrorContainer */ export interface ErrorContainer { /** * Errors in the container * @type {Array} * @memberof ErrorContainer */ errors: Array; /** * * @type {string} * @memberof ErrorContainer */ id: string; } /** * * @export * @interface ErrorResponse */ export interface ErrorResponse { /** * The error message. * @type {string} * @memberof ErrorResponse */ message: string; } /** * Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. * @export * @interface GenericError */ export interface GenericError { /** * * @type {GenericErrorPayload} * @memberof GenericError */ error?: GenericErrorPayload; } /** * * @export * @interface GenericErrorPayload */ export interface GenericErrorPayload { /** * Code represents the error status code (404, 403, 401, ...). * @type {number} * @memberof GenericErrorPayload */ code?: number; /** * Debug contains debug information. This is usually not available and has to be enabled. * @type {string} * @memberof GenericErrorPayload */ debug?: string; /** * * @type {{ [key: string]: object; }} * @memberof GenericErrorPayload */ details?: { [key: string]: object; }; /** * * @type {string} * @memberof GenericErrorPayload */ message?: string; /** * * @type {string} * @memberof GenericErrorPayload */ reason?: string; /** * * @type {string} * @memberof GenericErrorPayload */ request?: string; /** * * @type {string} * @memberof GenericErrorPayload */ status?: string; } /** * * @export * @interface GraphDriverData */ export interface GraphDriverData { /** * data * @type {{ [key: string]: string; }} * @memberof GraphDriverData */ Data: { [key: string]: string; }; /** * name * @type {string} * @memberof GraphDriverData */ Name: string; } /** * * @export * @interface HealthNotReadyStatus */ export interface HealthNotReadyStatus { /** * Errors contains a list of errors that caused the not ready status. * @type {{ [key: string]: string; }} * @memberof HealthNotReadyStatus */ errors?: { [key: string]: string; }; } /** * * @export * @interface HealthStatus */ export interface HealthStatus { /** * Status always contains \"ok\". * @type {string} * @memberof HealthStatus */ status?: string; } /** * IDResponse Response to an API call that returns just an Id * @export * @interface IdResponse */ export interface IdResponse { /** * The id of the newly created object. * @type {string} * @memberof IdResponse */ Id: string; } /** * * @export * @interface Identity */ export interface Identity { /** * * @type {string} * @memberof Identity */ id: string; /** * RecoveryAddresses contains all the addresses that can be used to recover an identity. * @type {Array} * @memberof Identity */ recovery_addresses?: Array; /** * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits. * @type {string} * @memberof Identity */ schema_id: string; /** * SchemaURL is the URL of the endpoint where the identity\'s traits schema can be fetched from. format: url * @type {string} * @memberof Identity */ schema_url: string; /** * * @type {object} * @memberof Identity */ traits: object; /** * VerifiableAddresses contains all the addresses that can be verified by the user. * @type {Array} * @memberof Identity */ verifiable_addresses?: Array; } /** * Credentials represents a specific credential type * @export * @interface IdentityCredentials */ export interface IdentityCredentials { /** * * @type {object} * @memberof IdentityCredentials */ config?: object; /** * Identifiers represents a list of unique identifiers this credential type matches. * @type {Array} * @memberof IdentityCredentials */ identifiers?: Array; /** * and so on. * @type {string} * @memberof IdentityCredentials */ type?: string; } /** * ImageDeleteResponseItem image delete response item * @export * @interface ImageDeleteResponseItem */ export interface ImageDeleteResponseItem { /** * The image ID of an image that was deleted * @type {string} * @memberof ImageDeleteResponseItem */ Deleted?: string; /** * The image ID of an image that was untagged * @type {string} * @memberof ImageDeleteResponseItem */ Untagged?: string; } /** * ImageSummary image summary * @export * @interface ImageSummary */ export interface ImageSummary { /** * containers * @type {number} * @memberof ImageSummary */ Containers: number; /** * created * @type {number} * @memberof ImageSummary */ Created: number; /** * Id * @type {string} * @memberof ImageSummary */ Id: string; /** * labels * @type {{ [key: string]: string; }} * @memberof ImageSummary */ Labels: { [key: string]: string; }; /** * parent Id * @type {string} * @memberof ImageSummary */ ParentId: string; /** * repo digests * @type {Array} * @memberof ImageSummary */ RepoDigests: Array; /** * repo tags * @type {Array} * @memberof ImageSummary */ RepoTags: Array; /** * shared size * @type {number} * @memberof ImageSummary */ SharedSize: number; /** * size * @type {number} * @memberof ImageSummary */ Size: number; /** * virtual size * @type {number} * @memberof ImageSummary */ VirtualSize: number; } /** * * @export * @interface InlineResponse200 */ export interface InlineResponse200 { /** * Always \"ok\". * @type {string} * @memberof InlineResponse200 */ status: string; } /** * * @export * @interface InlineResponse2001 */ export interface InlineResponse2001 { /** * The version of Ory Kratos. * @type {string} * @memberof InlineResponse2001 */ version: string; } /** * * @export * @interface InlineResponse503 */ export interface InlineResponse503 { /** * Errors contains a list of errors that caused the not ready status. * @type {{ [key: string]: string; }} * @memberof InlineResponse503 */ errors: { [key: string]: string; }; } /** * This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\" endpoint by a client. Once a login flow is completed successfully, a session cookie or session token will be issued. * @export * @interface LoginFlow */ export interface LoginFlow { /** * and so on. * @type {string} * @memberof LoginFlow */ active?: string; /** * ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. * @type {string} * @memberof LoginFlow */ expires_at: string; /** * Forced stores whether this login flow should enforce re-authentication. * @type {boolean} * @memberof LoginFlow */ forced?: boolean; /** * * @type {string} * @memberof LoginFlow */ id: string; /** * IssuedAt is the time (UTC) when the flow started. * @type {string} * @memberof LoginFlow */ issued_at: string; /** * 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 LoginFlow */ request_url: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof LoginFlow */ type: string; /** * * @type {UiContainer} * @memberof LoginFlow */ ui: UiContainer; } /** * The Response for Login Flows via API * @export * @interface LoginViaApiResponse */ export interface LoginViaApiResponse { /** * * @type {Session} * @memberof LoginViaApiResponse */ session: Session; /** * The Session Token A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header: Authorization: bearer ${session-token} The session token is only issued for API flows, not for Browser flows! * @type {string} * @memberof LoginViaApiResponse */ session_token: string; } /** * This might include a label and other information that can optionally be used to render UIs. * @export * @interface Meta */ export interface Meta { /** * * @type {UiText} * @memberof Meta */ label?: UiText; } /** * Plugin A plugin for the Engine API * @export * @interface Plugin */ export interface Plugin { /** * * @type {PluginConfig} * @memberof Plugin */ Config: PluginConfig; /** * True if the plugin is running. False if the plugin is not running, only installed. * @type {boolean} * @memberof Plugin */ Enabled: boolean; /** * Id * @type {string} * @memberof Plugin */ Id?: string; /** * name * @type {string} * @memberof Plugin */ Name: string; /** * plugin remote reference used to push/pull the plugin * @type {string} * @memberof Plugin */ PluginReference?: string; /** * * @type {PluginSettings} * @memberof Plugin */ Settings: PluginSettings; } /** * * @export * @interface PluginConfig */ export interface PluginConfig { /** * * @type {PluginConfigArgs} * @memberof PluginConfig */ Args: PluginConfigArgs; /** * description * @type {string} * @memberof PluginConfig */ Description: string; /** * Docker Version used to create the plugin * @type {string} * @memberof PluginConfig */ DockerVersion?: string; /** * documentation * @type {string} * @memberof PluginConfig */ Documentation: string; /** * entrypoint * @type {Array} * @memberof PluginConfig */ Entrypoint: Array; /** * env * @type {Array} * @memberof PluginConfig */ Env: Array; /** * * @type {PluginConfigInterface} * @memberof PluginConfig */ Interface: PluginConfigInterface; /** * ipc host * @type {boolean} * @memberof PluginConfig */ IpcHost: boolean; /** * * @type {PluginConfigLinux} * @memberof PluginConfig */ Linux: PluginConfigLinux; /** * mounts * @type {Array} * @memberof PluginConfig */ Mounts: Array; /** * * @type {PluginConfigNetwork} * @memberof PluginConfig */ Network: PluginConfigNetwork; /** * pid host * @type {boolean} * @memberof PluginConfig */ PidHost: boolean; /** * propagated mount * @type {string} * @memberof PluginConfig */ PropagatedMount: string; /** * * @type {PluginConfigUser} * @memberof PluginConfig */ User?: PluginConfigUser; /** * work dir * @type {string} * @memberof PluginConfig */ WorkDir: string; /** * * @type {PluginConfigRootfs} * @memberof PluginConfig */ rootfs?: PluginConfigRootfs; } /** * PluginConfigArgs plugin config args * @export * @interface PluginConfigArgs */ export interface PluginConfigArgs { /** * description * @type {string} * @memberof PluginConfigArgs */ Description: string; /** * name * @type {string} * @memberof PluginConfigArgs */ Name: string; /** * settable * @type {Array} * @memberof PluginConfigArgs */ Settable: Array; /** * value * @type {Array} * @memberof PluginConfigArgs */ Value: Array; } /** * PluginConfigInterface The interface between Docker and the plugin * @export * @interface PluginConfigInterface */ export interface PluginConfigInterface { /** * socket * @type {string} * @memberof PluginConfigInterface */ Socket: string; /** * types * @type {Array} * @memberof PluginConfigInterface */ Types: Array; } /** * PluginConfigLinux plugin config linux * @export * @interface PluginConfigLinux */ export interface PluginConfigLinux { /** * allow all devices * @type {boolean} * @memberof PluginConfigLinux */ AllowAllDevices: boolean; /** * capabilities * @type {Array} * @memberof PluginConfigLinux */ Capabilities: Array; /** * devices * @type {Array} * @memberof PluginConfigLinux */ Devices: Array; } /** * PluginConfigNetwork plugin config network * @export * @interface PluginConfigNetwork */ export interface PluginConfigNetwork { /** * type * @type {string} * @memberof PluginConfigNetwork */ Type: string; } /** * PluginConfigRootfs plugin config rootfs * @export * @interface PluginConfigRootfs */ export interface PluginConfigRootfs { /** * diff ids * @type {Array} * @memberof PluginConfigRootfs */ diff_ids?: Array; /** * type * @type {string} * @memberof PluginConfigRootfs */ type?: string; } /** * PluginConfigUser plugin config user * @export * @interface PluginConfigUser */ export interface PluginConfigUser { /** * g ID * @type {number} * @memberof PluginConfigUser */ GID?: number; /** * UID * @type {number} * @memberof PluginConfigUser */ UID?: number; } /** * PluginDevice plugin device * @export * @interface PluginDevice */ export interface PluginDevice { /** * description * @type {string} * @memberof PluginDevice */ Description: string; /** * name * @type {string} * @memberof PluginDevice */ Name: string; /** * path * @type {string} * @memberof PluginDevice */ Path: string; /** * settable * @type {Array} * @memberof PluginDevice */ Settable: Array; } /** * PluginEnv plugin env * @export * @interface PluginEnv */ export interface PluginEnv { /** * description * @type {string} * @memberof PluginEnv */ Description: string; /** * name * @type {string} * @memberof PluginEnv */ Name: string; /** * settable * @type {Array} * @memberof PluginEnv */ Settable: Array; /** * value * @type {string} * @memberof PluginEnv */ Value: string; } /** * PluginInterfaceType plugin interface type * @export * @interface PluginInterfaceType */ export interface PluginInterfaceType { /** * capability * @type {string} * @memberof PluginInterfaceType */ Capability: string; /** * prefix * @type {string} * @memberof PluginInterfaceType */ Prefix: string; /** * version * @type {string} * @memberof PluginInterfaceType */ Version: string; } /** * PluginMount plugin mount * @export * @interface PluginMount */ export interface PluginMount { /** * description * @type {string} * @memberof PluginMount */ Description: string; /** * destination * @type {string} * @memberof PluginMount */ Destination: string; /** * name * @type {string} * @memberof PluginMount */ Name: string; /** * options * @type {Array} * @memberof PluginMount */ Options: Array; /** * settable * @type {Array} * @memberof PluginMount */ Settable: Array; /** * source * @type {string} * @memberof PluginMount */ Source: string; /** * type * @type {string} * @memberof PluginMount */ Type: string; } /** * * @export * @interface PluginSettings */ export interface PluginSettings { /** * args * @type {Array} * @memberof PluginSettings */ Args: Array; /** * devices * @type {Array} * @memberof PluginSettings */ Devices: Array; /** * env * @type {Array} * @memberof PluginSettings */ Env: Array; /** * mounts * @type {Array} * @memberof PluginSettings */ Mounts: Array; } /** * Port An open port on a container * @export * @interface Port */ export interface Port { /** * IP * @type {string} * @memberof Port */ IP?: string; /** * Port on the container * @type {number} * @memberof Port */ PrivatePort: number; /** * Port exposed on the host * @type {number} * @memberof Port */ PublicPort?: number; /** * type * @type {string} * @memberof Port */ Type: string; } /** * * @export * @interface RecoveryAddress */ export interface RecoveryAddress { /** * * @type {string} * @memberof RecoveryAddress */ id: string; /** * * @type {string} * @memberof RecoveryAddress */ value: string; /** * * @type {string} * @memberof RecoveryAddress */ via: string; } /** * This request is used when an identity wants to recover their account. We recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery) * @export * @interface RecoveryFlow */ export interface RecoveryFlow { /** * Active, if set, contains the registration method that is being used. It is initially not set. * @type {string} * @memberof RecoveryFlow */ active?: string; /** * ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting, a new request has to be initiated. * @type {string} * @memberof RecoveryFlow */ expires_at: string; /** * * @type {string} * @memberof RecoveryFlow */ id: string; /** * IssuedAt is the time (UTC) when the request occurred. * @type {string} * @memberof RecoveryFlow */ issued_at: string; /** * 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 RecoveryFlow */ request_url: string; /** * * @type {string} * @memberof RecoveryFlow */ state: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof RecoveryFlow */ type?: string; /** * * @type {UiContainer} * @memberof RecoveryFlow */ ui: UiContainer; } /** * * @export * @interface RecoveryLink */ export interface RecoveryLink { /** * Recovery Link Expires At The timestamp when the recovery link expires. * @type {string} * @memberof RecoveryLink */ expires_at?: string; /** * Recovery Link This link can be used to recover the account. * @type {string} * @memberof RecoveryLink */ recovery_link: string; } /** * * @export * @interface RegistrationFlow */ export interface RegistrationFlow { /** * and so on. * @type {string} * @memberof RegistrationFlow */ active?: string; /** * ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. * @type {string} * @memberof RegistrationFlow */ expires_at: string; /** * * @type {string} * @memberof RegistrationFlow */ id: string; /** * IssuedAt is the time (UTC) when the flow occurred. * @type {string} * @memberof RegistrationFlow */ issued_at: string; /** * 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 RegistrationFlow */ request_url: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof RegistrationFlow */ type?: string; /** * * @type {UiContainer} * @memberof RegistrationFlow */ ui: UiContainer; } /** * The Response for Registration Flows via API * @export * @interface RegistrationViaApiResponse */ export interface RegistrationViaApiResponse { /** * * @type {Identity} * @memberof RegistrationViaApiResponse */ identity: Identity; /** * * @type {Session} * @memberof RegistrationViaApiResponse */ session?: Session; /** * The Session Token This field is only set when the session hook is configured as a post-registration hook. A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header: Authorization: bearer ${session-token} The session token is only issued for API flows, not for Browser flows! * @type {string} * @memberof RegistrationViaApiResponse */ session_token: string; } /** * * @export * @interface RevokeSession */ export interface RevokeSession { /** * The Session Token Invalidate this session token. * @type {string} * @memberof RevokeSession */ session_token: string; } /** * ServiceUpdateResponse service update response * @export * @interface ServiceUpdateResponse */ export interface ServiceUpdateResponse { /** * Optional warning messages * @type {Array} * @memberof ServiceUpdateResponse */ Warnings?: Array; } /** * * @export * @interface Session */ export interface Session { /** * * @type {boolean} * @memberof Session */ active?: boolean; /** * * @type {string} * @memberof Session */ authenticated_at: string; /** * * @type {string} * @memberof Session */ expires_at: string; /** * * @type {string} * @memberof Session */ id: string; /** * * @type {Identity} * @memberof Session */ identity: Identity; /** * * @type {string} * @memberof Session */ issued_at: string; } /** * 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; /** * 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 {string} * @memberof SettingsFlow */ expires_at: string; /** * * @type {string} * @memberof SettingsFlow */ id: string; /** * * @type {Identity} * @memberof SettingsFlow */ identity: Identity; /** * IssuedAt is the time (UTC) when the flow occurred. * @type {string} * @memberof SettingsFlow */ issued_at: string; /** * 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; /** * * @type {string} * @memberof SettingsFlow */ state: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof SettingsFlow */ type?: string; /** * * @type {UiContainer} * @memberof SettingsFlow */ ui: UiContainer; } /** * * @export * @interface SettingsProfileFormConfig */ export interface SettingsProfileFormConfig { /** * Action should be used as the form action URL `
`. * @type {string} * @memberof SettingsProfileFormConfig */ action: string; /** * * @type {Array} * @memberof SettingsProfileFormConfig */ messages?: Array; /** * Method is the form method (e.g. POST) * @type {string} * @memberof SettingsProfileFormConfig */ method: string; /** * * @type {Array} * @memberof SettingsProfileFormConfig */ nodes: Array; } /** * The Response for Settings Flows via API * @export * @interface SettingsViaApiResponse */ export interface SettingsViaApiResponse { /** * * @type {SettingsFlow} * @memberof SettingsViaApiResponse */ flow: SettingsFlow; /** * * @type {Identity} * @memberof SettingsViaApiResponse */ identity: Identity; } /** * Container represents a HTML Form. The container can work with both HTTP Form and JSON requests * @export * @interface UiContainer */ export interface UiContainer { /** * Action should be used as the form action URL ``. * @type {string} * @memberof UiContainer */ action: string; /** * * @type {Array} * @memberof UiContainer */ messages?: Array; /** * Method is the form method (e.g. POST) * @type {string} * @memberof UiContainer */ method: string; /** * * @type {Array} * @memberof UiContainer */ nodes: Array; } /** * Nodes are represented as HTML elements or their native UI equivalents. For example, a node can be an `` tag, or an `` but also `some plain text`. * @export * @interface UiNode */ export interface UiNode { /** * * @type {UiNodeAttributes} * @memberof UiNode */ attributes: UiNodeAttributes; /** * * @type {string} * @memberof UiNode */ group: string; /** * * @type {Array} * @memberof UiNode */ messages: Array; /** * * @type {Meta} * @memberof UiNode */ meta: Meta; /** * * @type {string} * @memberof UiNode */ type: string; } /** * * @export * @interface UiNodeAnchorAttributes */ export interface UiNodeAnchorAttributes { /** * The link\'s href (destination) URL. format: uri * @type {string} * @memberof UiNodeAnchorAttributes */ href: string; /** * * @type {UiText} * @memberof UiNodeAnchorAttributes */ title: UiText; } /** * @type UiNodeAttributes * @export */ export type UiNodeAttributes = UiNodeAnchorAttributes | UiNodeImageAttributes | UiNodeInputAttributes | UiNodeTextAttributes; /** * * @export * @interface UiNodeImageAttributes */ export interface UiNodeImageAttributes { /** * The image\'s source URL. format: uri * @type {string} * @memberof UiNodeImageAttributes */ src: string; } /** * InputAttributes represents the attributes of an input node * @export * @interface UiNodeInputAttributes */ export interface UiNodeInputAttributes { /** * Sets the input\'s disabled field to true or false. * @type {boolean} * @memberof UiNodeInputAttributes */ disabled: boolean; /** * * @type {UiText} * @memberof UiNodeInputAttributes */ label?: UiText; /** * The input\'s element name. * @type {string} * @memberof UiNodeInputAttributes */ name: string; /** * The input\'s pattern. * @type {string} * @memberof UiNodeInputAttributes */ pattern?: string; /** * Mark this input field as required. * @type {boolean} * @memberof UiNodeInputAttributes */ required?: boolean; /** * * @type {string} * @memberof UiNodeInputAttributes */ type: string; /** * * @type {UiNodeInputAttributesValue} * @memberof UiNodeInputAttributes */ value?: UiNodeInputAttributesValue; } /** * @type UiNodeInputAttributesValue * @export */ export type UiNodeInputAttributesValue = boolean | number | string; /** * * @export * @interface UiNodeTextAttributes */ export interface UiNodeTextAttributes { /** * * @type {UiText} * @memberof UiNodeTextAttributes */ text: UiText; } /** * * @export * @interface UiText */ export interface UiText { /** * The message\'s context. Useful when customizing messages. * @type {object} * @memberof UiText */ context?: object; /** * * @type {number} * @memberof UiText */ id: number; /** * The message text. Written in american english. * @type {string} * @memberof UiText */ text: string; /** * * @type {string} * @memberof UiText */ type: string; } /** * * @export * @interface UpdateIdentity */ export interface UpdateIdentity { /** * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits. If set will update the Identity\'s SchemaID. * @type {string} * @memberof UpdateIdentity */ schema_id?: string; /** * Traits represent an identity\'s traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_id`. * @type {object} * @memberof UpdateIdentity */ traits: object; } /** * * @export * @interface VerifiableAddress */ export interface VerifiableAddress { /** * * @type {string} * @memberof VerifiableAddress */ id: string; /** * * @type {string} * @memberof VerifiableAddress */ status: string; /** * * @type {string} * @memberof VerifiableAddress */ value: string; /** * * @type {boolean} * @memberof VerifiableAddress */ verified: boolean; /** * * @type {string} * @memberof VerifiableAddress */ verified_at?: string; /** * * @type {string} * @memberof VerifiableAddress */ via: string; } /** * Used to verify an out-of-band communication channel such as an email address or a phone number. For more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation * @export * @interface VerificationFlow */ export interface VerificationFlow { /** * Active, if set, contains the registration method that is being used. It is initially not set. * @type {string} * @memberof VerificationFlow */ active?: string; /** * ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address, a new request has to be initiated. * @type {string} * @memberof VerificationFlow */ expires_at?: string; /** * * @type {string} * @memberof VerificationFlow */ id: string; /** * IssuedAt is the time (UTC) when the request occurred. * @type {string} * @memberof VerificationFlow */ issued_at?: string; /** * 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 VerificationFlow */ request_url?: string; /** * * @type {string} * @memberof VerificationFlow */ state: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof VerificationFlow */ type: string; /** * * @type {UiContainer} * @memberof VerificationFlow */ ui: UiContainer; } /** * * @export * @interface Version */ export interface Version { /** * Version is the service\'s version. * @type {string} * @memberof Version */ version?: string; } /** * Volume volume * @export * @interface Volume */ export interface Volume { /** * Date/Time the volume was created. * @type {string} * @memberof Volume */ CreatedAt?: string; /** * Name of the volume driver used by the volume. * @type {string} * @memberof Volume */ Driver: string; /** * User-defined key/value metadata. * @type {{ [key: string]: string; }} * @memberof Volume */ Labels: { [key: string]: string; }; /** * Mount path of the volume on the host. * @type {string} * @memberof Volume */ Mountpoint: string; /** * Name of the volume. * @type {string} * @memberof Volume */ Name: string; /** * The driver specific options used when creating the volume. * @type {{ [key: string]: string; }} * @memberof Volume */ Options: { [key: string]: string; }; /** * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. * @type {string} * @memberof Volume */ Scope: string; /** * Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. * @type {{ [key: string]: object; }} * @memberof Volume */ Status?: { [key: string]: object; }; /** * * @type {VolumeUsageData} * @memberof Volume */ UsageData?: VolumeUsageData; } /** * VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. * @export * @interface VolumeUsageData */ export interface VolumeUsageData { /** * The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. * @type {number} * @memberof VolumeUsageData */ RefCount: number; /** * Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") * @type {number} * @memberof VolumeUsageData */ Size: number; } /** * AdminApi - axios parameter creator * @export */ export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This endpoint creates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Create an Identity * @param {CreateIdentity} [createIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createIdentity: async (createIdentity?: CreateIdentity, options: any = {}): Promise => { const localVarPath = `/identities`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createIdentity, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * @summary Create a Recovery Link * @param {CreateRecoveryLink} [createRecoveryLink] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRecoveryLink: async (createRecoveryLink?: CreateRecoveryLink, options: any = {}): Promise => { const localVarPath = `/recovery/link`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createRecoveryLink, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Delete an Identity * @param {string} id ID is the identity\'s ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteIdentity: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteIdentity', 'id', id) const localVarPath = `/identities/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Get an Identity * @param {string} id ID must be set to the ID of identity you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getIdentity: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getIdentity', 'id', id) const localVarPath = `/identities/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSchema: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSchema', 'id', id) const localVarPath = `/schemas/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceError: async (error: string, options: any = {}): Promise => { // verify required parameter 'error' is not null or undefined assertParamExists('getSelfServiceError', 'error', error) const localVarPath = `/self-service/errors`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (error !== undefined) { localVarQueryParameter['error'] = error; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceLoginFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceLoginFlow', 'id', id) const localVarPath = `/self-service/login/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRecoveryFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceRecoveryFlow', 'id', id) const localVarPath = `/self-service/recovery/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRegistrationFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceRegistrationFlow', 'id', id) const localVarPath = `/self-service/registration/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceSettingsFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceSettingsFlow', 'id', id) const localVarPath = `/self-service/settings/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceVerificationFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceVerificationFlow', 'id', id) const localVarPath = `/self-service/verification/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion: async (options: any = {}): Promise => { const localVarPath = `/version`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive: async (options: any = {}): Promise => { const localVarPath = `/health/alive`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady: async (options: any = {}): Promise => { const localVarPath = `/health/ready`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists all identities. Does not support search at the moment. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary List Identities * @param {number} [perPage] Items per Page This is the number of items per page. * @param {number} [page] Pagination Page * @param {*} [options] Override http request option. * @throws {RequiredError} */ listIdentities: async (perPage?: number, page?: number, options: any = {}): Promise => { const localVarPath = `/identities`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (perPage !== undefined) { localVarQueryParameter['per_page'] = perPage; } if (page !== undefined) { localVarQueryParameter['page'] = page; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` * @summary Get snapshot metrics from the Hydra service. If you\'re using k8s, you can then add annotations to your deployment like so: * @param {*} [options] Override http request option. * @throws {RequiredError} */ prometheus: async (options: any = {}): Promise => { const localVarPath = `/metrics/prometheus`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint updates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Update an Identity * @param {string} id ID must be set to the ID of identity you want to update * @param {UpdateIdentity} [updateIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateIdentity: async (id: string, updateIdentity?: UpdateIdentity, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('updateIdentity', 'id', id) const localVarPath = `/identities/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateIdentity, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AdminApi - functional programming interface * @export */ export const AdminApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) return { /** * This endpoint creates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Create an Identity * @param {CreateIdentity} [createIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createIdentity(createIdentity?: CreateIdentity, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createIdentity(createIdentity, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * @summary Create a Recovery Link * @param {CreateRecoveryLink} [createRecoveryLink] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createRecoveryLink(createRecoveryLink?: CreateRecoveryLink, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRecoveryLink(createRecoveryLink, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Delete an Identity * @param {string} id ID is the identity\'s ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteIdentity(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteIdentity(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Get an Identity * @param {string} id ID must be set to the ID of identity you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getIdentity(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentity(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSchema(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSchema(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceError(error: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceError(error, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceLoginFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceLoginFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceRecoveryFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceRecoveryFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceRegistrationFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceRegistrationFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceSettingsFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceSettingsFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceVerificationFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceVerificationFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getVersion(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getVersion(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ async isAlive(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.isAlive(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ async isReady(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.isReady(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Lists all identities. Does not support search at the moment. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary List Identities * @param {number} [perPage] Items per Page This is the number of items per page. * @param {number} [page] Pagination Page * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listIdentities(perPage?: number, page?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listIdentities(perPage, page, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` * @summary Get snapshot metrics from the Hydra service. If you\'re using k8s, you can then add annotations to your deployment like so: * @param {*} [options] Override http request option. * @throws {RequiredError} */ async prometheus(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.prometheus(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint updates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Update an Identity * @param {string} id ID must be set to the ID of identity you want to update * @param {UpdateIdentity} [updateIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateIdentity(id: string, updateIdentity?: UpdateIdentity, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateIdentity(id, updateIdentity, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * AdminApi - factory interface * @export */ export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AdminApiFp(configuration) return { /** * This endpoint creates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Create an Identity * @param {CreateIdentity} [createIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createIdentity(createIdentity?: CreateIdentity, options?: any): AxiosPromise { return localVarFp.createIdentity(createIdentity, options).then((request) => request(axios, basePath)); }, /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * @summary Create a Recovery Link * @param {CreateRecoveryLink} [createRecoveryLink] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRecoveryLink(createRecoveryLink?: CreateRecoveryLink, options?: any): AxiosPromise { return localVarFp.createRecoveryLink(createRecoveryLink, options).then((request) => request(axios, basePath)); }, /** * Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Delete an Identity * @param {string} id ID is the identity\'s ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteIdentity(id: string, options?: any): AxiosPromise { return localVarFp.deleteIdentity(id, options).then((request) => request(axios, basePath)); }, /** * Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Get an Identity * @param {string} id ID must be set to the ID of identity you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getIdentity(id: string, options?: any): AxiosPromise { return localVarFp.getIdentity(id, options).then((request) => request(axios, basePath)); }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSchema(id: string, options?: any): AxiosPromise { return localVarFp.getSchema(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceError(error: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceError(error, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceLoginFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceLoginFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRecoveryFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceRecoveryFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRegistrationFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceRegistrationFlow(id, options).then((request) => request(axios, basePath)); }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceSettingsFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceSettingsFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceVerificationFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceVerificationFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion(options?: any): AxiosPromise { return localVarFp.getVersion(options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive(options?: any): AxiosPromise { return localVarFp.isAlive(options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady(options?: any): AxiosPromise { return localVarFp.isReady(options).then((request) => request(axios, basePath)); }, /** * Lists all identities. Does not support search at the moment. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary List Identities * @param {number} [perPage] Items per Page This is the number of items per page. * @param {number} [page] Pagination Page * @param {*} [options] Override http request option. * @throws {RequiredError} */ listIdentities(perPage?: number, page?: number, options?: any): AxiosPromise> { return localVarFp.listIdentities(perPage, page, options).then((request) => request(axios, basePath)); }, /** * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` * @summary Get snapshot metrics from the Hydra service. If you\'re using k8s, you can then add annotations to your deployment like so: * @param {*} [options] Override http request option. * @throws {RequiredError} */ prometheus(options?: any): AxiosPromise { return localVarFp.prometheus(options).then((request) => request(axios, basePath)); }, /** * This endpoint updates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Update an Identity * @param {string} id ID must be set to the ID of identity you want to update * @param {UpdateIdentity} [updateIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateIdentity(id: string, updateIdentity?: UpdateIdentity, options?: any): AxiosPromise { return localVarFp.updateIdentity(id, updateIdentity, options).then((request) => request(axios, basePath)); }, }; }; /** * AdminApi - object-oriented interface * @export * @class AdminApi * @extends {BaseAPI} */ export class AdminApi extends BaseAPI { /** * This endpoint creates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Create an Identity * @param {CreateIdentity} [createIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public createIdentity(createIdentity?: CreateIdentity, options?: any) { return AdminApiFp(this.configuration).createIdentity(createIdentity, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * @summary Create a Recovery Link * @param {CreateRecoveryLink} [createRecoveryLink] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public createRecoveryLink(createRecoveryLink?: CreateRecoveryLink, options?: any) { return AdminApiFp(this.configuration).createRecoveryLink(createRecoveryLink, options).then((request) => request(this.axios, this.basePath)); } /** * Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Delete an Identity * @param {string} id ID is the identity\'s ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public deleteIdentity(id: string, options?: any) { return AdminApiFp(this.configuration).deleteIdentity(id, options).then((request) => request(this.axios, this.basePath)); } /** * Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Get an Identity * @param {string} id ID must be set to the ID of identity you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getIdentity(id: string, options?: any) { return AdminApiFp(this.configuration).getIdentity(id, options).then((request) => request(this.axios, this.basePath)); } /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSchema(id: string, options?: any) { return AdminApiFp(this.configuration).getSchema(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceError(error: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceError(error, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceLoginFlow(id: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceLoginFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceRecoveryFlow(id: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceRecoveryFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceRegistrationFlow(id: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceRegistrationFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceSettingsFlow(id: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceSettingsFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getSelfServiceVerificationFlow(id: string, options?: any) { return AdminApiFp(this.configuration).getSelfServiceVerificationFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getVersion(options?: any) { return AdminApiFp(this.configuration).getVersion(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public isAlive(options?: any) { return AdminApiFp(this.configuration).isAlive(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public isReady(options?: any) { return AdminApiFp(this.configuration).isReady(options).then((request) => request(this.axios, this.basePath)); } /** * Lists all identities. Does not support search at the moment. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary List Identities * @param {number} [perPage] Items per Page This is the number of items per page. * @param {number} [page] Pagination Page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listIdentities(perPage?: number, page?: number, options?: any) { return AdminApiFp(this.configuration).listIdentities(perPage, page, options).then((request) => request(this.axios, this.basePath)); } /** * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` * @summary Get snapshot metrics from the Hydra service. If you\'re using k8s, you can then add annotations to your deployment like so: * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public prometheus(options?: any) { return AdminApiFp(this.configuration).prometheus(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint updates an identity. It is NOT possible to set an identity\'s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). * @summary Update an Identity * @param {string} id ID must be set to the ID of identity you want to update * @param {UpdateIdentity} [updateIdentity] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public updateIdentity(id: string, updateIdentity?: UpdateIdentity, options?: any) { return AdminApiFp(this.configuration).updateIdentity(id, updateIdentity, options).then((request) => request(this.axios, this.basePath)); } } /** * PublicApi - axios parameter creator * @export */ export const PublicApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceRecoveryFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/recovery`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow with Link Method * @param {string} [token] Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. * @param {string} [flow] The Flow ID format: uuid * @param {CompleteSelfServiceRecoveryFlowWithLinkMethod} [completeSelfServiceRecoveryFlowWithLinkMethod] * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceRecoveryFlowWithLinkMethod: async (token?: string, flow?: string, completeSelfServiceRecoveryFlowWithLinkMethod?: CompleteSelfServiceRecoveryFlowWithLinkMethod, options: any = {}): Promise => { const localVarPath = `/self-service/recovery/methods/link`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (token !== undefined) { localVarQueryParameter['token'] = token; } if (flow !== undefined) { localVarQueryParameter['flow'] = flow; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(completeSelfServiceRecoveryFlowWithLinkMethod, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Complete Settings Flow * @param {string} flow The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceSettingsFlow: async (flow: string, options: any = {}): Promise => { // verify required parameter 'flow' is not null or undefined assertParamExists('completeSelfServiceSettingsFlow', 'flow', flow) const localVarPath = `/self-service/settings`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) if (flow !== undefined) { localVarQueryParameter['flow'] = flow; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Complete Verification Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceVerificationFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/verification/methods/link`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSchema: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSchema', 'id', id) const localVarPath = `/schemas/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceError: async (error: string, options: any = {}): Promise => { // verify required parameter 'error' is not null or undefined assertParamExists('getSelfServiceError', 'error', error) const localVarPath = `/self-service/errors`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (error !== undefined) { localVarQueryParameter['error'] = error; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceLoginFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceLoginFlow', 'id', id) const localVarPath = `/self-service/login/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRecoveryFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceRecoveryFlow', 'id', id) const localVarPath = `/self-service/recovery/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRegistrationFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceRegistrationFlow', 'id', id) const localVarPath = `/self-service/registration/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceSettingsFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceSettingsFlow', 'id', id) const localVarPath = `/self-service/settings/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceVerificationFlow: async (id: string, options: any = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSelfServiceVerificationFlow', 'id', id) const localVarPath = `/self-service/verification/flows`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout). * @summary Initialize Browser-Based Logout User Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceBrowserLogoutFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/browser/flows/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for API clients * @param {boolean} [refresh] Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceLoginViaAPIFlow: async (refresh?: boolean, options: any = {}): Promise => { const localVarPath = `/self-service/login/api`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (refresh !== undefined) { localVarQueryParameter['refresh'] = refresh; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceLoginViaBrowserFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/login/browser`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRecoveryViaAPIFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/recovery/api`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRecoveryViaBrowserFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/recovery/browser`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for API clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRegistrationViaAPIFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/registration/api`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRegistrationViaBrowserFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/registration/browser`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceSettingsViaAPIFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/settings/api`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for Browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceSettingsViaBrowserFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/settings/browser`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceVerificationViaAPIFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/verification/api`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceVerificationViaBrowserFlow: async (options: any = {}): Promise => { const localVarPath = `/self-service/verification/browser`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead. * @summary Initialize Logout Flow for API Clients - Revoke a Session * @param {RevokeSession} revokeSession * @param {*} [options] Override http request option. * @throws {RequiredError} */ revokeSession: async (revokeSession: RevokeSession, options: any = {}): Promise => { // verify required parameter 'revokeSession' is not null or undefined assertParamExists('revokeSession', 'revokeSession', revokeSession) const localVarPath = `/sessions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(revokeSession, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Login Flow * @param {string} flow The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitSelfServiceLoginFlow: async (flow: string, options: any = {}): Promise => { // verify required parameter 'flow' is not null or undefined assertParamExists('submitSelfServiceLoginFlow', 'flow', flow) const localVarPath = `/self-service/login`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (flow !== undefined) { localVarQueryParameter['flow'] = flow; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Registration Flow * @param {string} flow The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitSelfServiceRegistrationFlow: async (flow: string, options: any = {}): Promise => { // verify required parameter 'flow' is not null or undefined assertParamExists('submitSelfServiceRegistrationFlow', 'flow', flow) const localVarPath = `/self-service/registration`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (flow !== undefined) { localVarQueryParameter['flow'] = flow; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response. This endpoint is useful for reverse proxies and API Gateways. * @summary Check Who the Current HTTP Session Belongs To * @param {string} [cookie] * @param {string} [authorization] in: authorization * @param {*} [options] Override http request option. * @throws {RequiredError} */ whoami: async (cookie?: string, authorization?: string, options: any = {}): Promise => { const localVarPath = `/sessions/whoami`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication sessionToken required await setApiKeyToObject(localVarHeaderParameter, "X-Session-Token", configuration) if (authorization !== undefined) { localVarQueryParameter['Authorization'] = authorization; } if (cookie !== undefined && cookie !== null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * PublicApi - functional programming interface * @export */ export const PublicApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PublicApiAxiosParamCreator(configuration) return { /** * Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ async completeSelfServiceRecoveryFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.completeSelfServiceRecoveryFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow with Link Method * @param {string} [token] Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. * @param {string} [flow] The Flow ID format: uuid * @param {CompleteSelfServiceRecoveryFlowWithLinkMethod} [completeSelfServiceRecoveryFlowWithLinkMethod] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async completeSelfServiceRecoveryFlowWithLinkMethod(token?: string, flow?: string, completeSelfServiceRecoveryFlowWithLinkMethod?: CompleteSelfServiceRecoveryFlowWithLinkMethod, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.completeSelfServiceRecoveryFlowWithLinkMethod(token, flow, completeSelfServiceRecoveryFlowWithLinkMethod, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Complete Settings Flow * @param {string} flow The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async completeSelfServiceSettingsFlow(flow: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.completeSelfServiceSettingsFlow(flow, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Complete Verification Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ async completeSelfServiceVerificationFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.completeSelfServiceVerificationFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSchema(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSchema(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceError(error: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceError(error, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceLoginFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceLoginFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceRecoveryFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceRecoveryFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceRegistrationFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceRegistrationFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceSettingsFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceSettingsFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSelfServiceVerificationFlow(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSelfServiceVerificationFlow(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout). * @summary Initialize Browser-Based Logout User Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceBrowserLogoutFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceBrowserLogoutFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for API clients * @param {boolean} [refresh] Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceLoginViaAPIFlow(refresh?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceLoginViaAPIFlow(refresh, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceLoginViaBrowserFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceLoginViaBrowserFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceRecoveryViaAPIFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceRecoveryViaAPIFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceRecoveryViaBrowserFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceRecoveryViaBrowserFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for API clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceRegistrationViaAPIFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceRegistrationViaAPIFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceRegistrationViaBrowserFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceRegistrationViaBrowserFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceSettingsViaAPIFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceSettingsViaAPIFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for Browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceSettingsViaBrowserFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceSettingsViaBrowserFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceVerificationViaAPIFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceVerificationViaAPIFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ async initializeSelfServiceVerificationViaBrowserFlow(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initializeSelfServiceVerificationViaBrowserFlow(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead. * @summary Initialize Logout Flow for API Clients - Revoke a Session * @param {RevokeSession} revokeSession * @param {*} [options] Override http request option. * @throws {RequiredError} */ async revokeSession(revokeSession: RevokeSession, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.revokeSession(revokeSession, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Login Flow * @param {string} flow The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitSelfServiceLoginFlow(flow: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.submitSelfServiceLoginFlow(flow, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Registration Flow * @param {string} flow The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitSelfServiceRegistrationFlow(flow: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.submitSelfServiceRegistrationFlow(flow, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response. This endpoint is useful for reverse proxies and API Gateways. * @summary Check Who the Current HTTP Session Belongs To * @param {string} [cookie] * @param {string} [authorization] in: authorization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async whoami(cookie?: string, authorization?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.whoami(cookie, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * PublicApi - factory interface * @export */ export const PublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = PublicApiFp(configuration) return { /** * Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceRecoveryFlow(options?: any): AxiosPromise { return localVarFp.completeSelfServiceRecoveryFlow(options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow with Link Method * @param {string} [token] Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. * @param {string} [flow] The Flow ID format: uuid * @param {CompleteSelfServiceRecoveryFlowWithLinkMethod} [completeSelfServiceRecoveryFlowWithLinkMethod] * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceRecoveryFlowWithLinkMethod(token?: string, flow?: string, completeSelfServiceRecoveryFlowWithLinkMethod?: CompleteSelfServiceRecoveryFlowWithLinkMethod, options?: any): AxiosPromise { return localVarFp.completeSelfServiceRecoveryFlowWithLinkMethod(token, flow, completeSelfServiceRecoveryFlowWithLinkMethod, options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Complete Settings Flow * @param {string} flow The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceSettingsFlow(flow: string, options?: any): AxiosPromise { return localVarFp.completeSelfServiceSettingsFlow(flow, options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Complete Verification Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeSelfServiceVerificationFlow(options?: any): AxiosPromise { return localVarFp.completeSelfServiceVerificationFlow(options).then((request) => request(axios, basePath)); }, /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSchema(id: string, options?: any): AxiosPromise { return localVarFp.getSchema(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceError(error: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceError(error, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceLoginFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceLoginFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRecoveryFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceRecoveryFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceRegistrationFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceRegistrationFlow(id, options).then((request) => request(axios, basePath)); }, /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceSettingsFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceSettingsFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfServiceVerificationFlow(id: string, options?: any): AxiosPromise { return localVarFp.getSelfServiceVerificationFlow(id, options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout). * @summary Initialize Browser-Based Logout User Flow * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceBrowserLogoutFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceBrowserLogoutFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for API clients * @param {boolean} [refresh] Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceLoginViaAPIFlow(refresh?: boolean, options?: any): AxiosPromise { return localVarFp.initializeSelfServiceLoginViaAPIFlow(refresh, options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceLoginViaBrowserFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceLoginViaBrowserFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRecoveryViaAPIFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceRecoveryViaAPIFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRecoveryViaBrowserFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceRecoveryViaBrowserFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for API clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRegistrationViaAPIFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceRegistrationViaAPIFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceRegistrationViaBrowserFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceRegistrationViaBrowserFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceSettingsViaAPIFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceSettingsViaAPIFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for Browsers * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceSettingsViaBrowserFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceSettingsViaBrowserFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceVerificationViaAPIFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceVerificationViaAPIFlow(options).then((request) => request(axios, basePath)); }, /** * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} */ initializeSelfServiceVerificationViaBrowserFlow(options?: any): AxiosPromise { return localVarFp.initializeSelfServiceVerificationViaBrowserFlow(options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead. * @summary Initialize Logout Flow for API Clients - Revoke a Session * @param {RevokeSession} revokeSession * @param {*} [options] Override http request option. * @throws {RequiredError} */ revokeSession(revokeSession: RevokeSession, options?: any): AxiosPromise { return localVarFp.revokeSession(revokeSession, options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Login Flow * @param {string} flow The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitSelfServiceLoginFlow(flow: string, options?: any): AxiosPromise { return localVarFp.submitSelfServiceLoginFlow(flow, options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Registration Flow * @param {string} flow The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitSelfServiceRegistrationFlow(flow: string, options?: any): AxiosPromise { return localVarFp.submitSelfServiceRegistrationFlow(flow, options).then((request) => request(axios, basePath)); }, /** * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response. This endpoint is useful for reverse proxies and API Gateways. * @summary Check Who the Current HTTP Session Belongs To * @param {string} [cookie] * @param {string} [authorization] in: authorization * @param {*} [options] Override http request option. * @throws {RequiredError} */ whoami(cookie?: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.whoami(cookie, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * PublicApi - object-oriented interface * @export * @class PublicApi * @extends {BaseAPI} */ export class PublicApi extends BaseAPI { /** * Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public completeSelfServiceRecoveryFlow(options?: any) { return PublicApiFp(this.configuration).completeSelfServiceRecoveryFlow(options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Complete Recovery Flow with Link Method * @param {string} [token] Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. * @param {string} [flow] The Flow ID format: uuid * @param {CompleteSelfServiceRecoveryFlowWithLinkMethod} [completeSelfServiceRecoveryFlowWithLinkMethod] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public completeSelfServiceRecoveryFlowWithLinkMethod(token?: string, flow?: string, completeSelfServiceRecoveryFlowWithLinkMethod?: CompleteSelfServiceRecoveryFlowWithLinkMethod, options?: any) { return PublicApiFp(this.configuration).completeSelfServiceRecoveryFlowWithLinkMethod(token, flow, completeSelfServiceRecoveryFlowWithLinkMethod, options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Complete Settings Flow * @param {string} flow The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public completeSelfServiceSettingsFlow(flow: string, options?: any) { return PublicApiFp(this.configuration).completeSelfServiceSettingsFlow(flow, options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Complete Verification Flow * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public completeSelfServiceVerificationFlow(options?: any) { return PublicApiFp(this.configuration).completeSelfServiceVerificationFlow(options).then((request) => request(this.axios, this.basePath)); } /** * Get a Traits Schema Definition * @param {string} id ID must be set to the ID of schema you want to get * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSchema(id: string, options?: any) { return PublicApiFp(this.configuration).getSchema(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). * @summary Get User-Facing Self-Service Errors * @param {string} error Error is the container\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceError(error: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceError(error, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a login flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Login Flow * @param {string} id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceLoginFlow(id: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceLoginFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a recovery flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Get information about a recovery flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceRecoveryFlow(id: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceRecoveryFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a registration flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Get Registration Flow * @param {string} id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceRegistrationFlow(id: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceRegistrationFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * When accessing this endpoint through ORY Kratos\' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos\' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Get Settings Flow * @param {string} id ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceSettingsFlow(id: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceSettingsFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint returns a verification flow\'s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Get Verification Flow * @param {string} id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public getSelfServiceVerificationFlow(id: string, options?: any) { return PublicApiFp(this.configuration).getSelfServiceVerificationFlow(id, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout). * @summary Initialize Browser-Based Logout User Flow * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceBrowserLogoutFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceBrowserLogoutFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for API clients * @param {boolean} [refresh] Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceLoginViaAPIFlow(refresh?: boolean, options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceLoginViaAPIFlow(refresh, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Login Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceLoginViaBrowserFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceLoginViaBrowserFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceRecoveryViaAPIFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceRecoveryViaAPIFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx). * @summary Initialize Recovery Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceRecoveryViaBrowserFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceRecoveryViaBrowserFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for API clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceRegistrationViaAPIFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceRegistrationViaAPIFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Initialize Registration Flow for browsers * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceRegistrationViaBrowserFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceRegistrationViaBrowserFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceSettingsViaAPIFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceSettingsViaAPIFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Initialize Settings Flow for Browsers * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceSettingsViaBrowserFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceSettingsViaBrowserFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for API Clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceVerificationViaAPIFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceVerificationViaAPIFlow(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). * @summary Initialize Verification Flow for Browser Clients * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public initializeSelfServiceVerificationViaBrowserFlow(options?: any) { return PublicApiFp(this.configuration).initializeSelfServiceVerificationViaBrowserFlow(options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead. * @summary Initialize Logout Flow for API Clients - Revoke a Session * @param {RevokeSession} revokeSession * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public revokeSession(revokeSession: RevokeSession, options?: any) { return PublicApiFp(this.configuration).revokeSession(revokeSession, options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Login Flow * @param {string} flow The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public submitSelfServiceLoginFlow(flow: string, options?: any) { return PublicApiFp(this.configuration).submitSelfServiceLoginFlow(flow, options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration). * @summary Submit a Registration Flow * @param {string} flow The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public submitSelfServiceRegistrationFlow(flow: string, options?: any) { return PublicApiFp(this.configuration).submitSelfServiceRegistrationFlow(flow, options).then((request) => request(this.axios, this.basePath)); } /** * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response. This endpoint is useful for reverse proxies and API Gateways. * @summary Check Who the Current HTTP Session Belongs To * @param {string} [cookie] * @param {string} [authorization] in: authorization * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ public whoami(cookie?: string, authorization?: string, options?: any) { return PublicApiFp(this.configuration).whoami(cookie, authorization, options).then((request) => request(this.axios, this.basePath)); } }