/* tslint:disable */ /* eslint-disable */ /** * Ory Identities API * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * * The version of the OpenAPI document: v1.3.8 * Contact: office@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 type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios 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'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * The authenticator assurance level can be one of \"aal1\", \"aal2\", or \"aal3\". A higher number means that it is harder for an attacker to compromise the account. Generally, \"aal1\" implies that one authentication factor was used while AAL2 implies that two factors (e.g. password + TOTP) have been used. To learn more about these levels please head over to: https://www.ory.sh/kratos/docs/concepts/credentials * @export * @enum {string} */ export const AuthenticatorAssuranceLevel = { Aal0: 'aal0', Aal1: 'aal1', Aal2: 'aal2', Aal3: 'aal3' } as const; export type AuthenticatorAssuranceLevel = typeof AuthenticatorAssuranceLevel[keyof typeof AuthenticatorAssuranceLevel]; /** * Patch identities response * @export * @interface BatchPatchIdentitiesResponse */ export interface BatchPatchIdentitiesResponse { /** * The patch responses for the individual identities. * @type {Array} * @memberof BatchPatchIdentitiesResponse */ 'identities'?: Array; } /** * Control API consistency guarantees * @export * @interface ConsistencyRequestParameters */ export interface ConsistencyRequestParameters { /** * Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with `ory patch project --replace \'/previews/default_read_consistency_level=\"strong\"\'`. Setting the default consistency level to `eventual` may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: `GET /admin/identities` This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps. * @type {string} * @memberof ConsistencyRequestParameters */ 'consistency'?: ConsistencyRequestParametersConsistencyEnum; } export const ConsistencyRequestParametersConsistencyEnum = { Empty: '', Strong: 'strong', Eventual: 'eventual' } as const; export type ConsistencyRequestParametersConsistencyEnum = typeof ConsistencyRequestParametersConsistencyEnum[keyof typeof ConsistencyRequestParametersConsistencyEnum]; /** * @type ContinueWith * @export */ export type ContinueWith = { action: 'redirect_browser_to' } & ContinueWithRedirectBrowserTo | { action: 'set_ory_session_token' } & ContinueWithSetOrySessionToken | { action: 'show_recovery_ui' } & ContinueWithRecoveryUi | { action: 'show_settings_ui' } & ContinueWithSettingsUi | { action: 'show_verification_ui' } & ContinueWithVerificationUi; /** * Indicates, that the UI flow could be continued by showing a recovery ui * @export * @interface ContinueWithRecoveryUi */ export interface ContinueWithRecoveryUi { /** * Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString * @type {string} * @memberof ContinueWithRecoveryUi */ 'action': ContinueWithRecoveryUiActionEnum; /** * * @type {ContinueWithRecoveryUiFlow} * @memberof ContinueWithRecoveryUi */ 'flow': ContinueWithRecoveryUiFlow; } export const ContinueWithRecoveryUiActionEnum = { ShowRecoveryUi: 'show_recovery_ui' } as const; export type ContinueWithRecoveryUiActionEnum = typeof ContinueWithRecoveryUiActionEnum[keyof typeof ContinueWithRecoveryUiActionEnum]; /** * * @export * @interface ContinueWithRecoveryUiFlow */ export interface ContinueWithRecoveryUiFlow { /** * The ID of the recovery flow * @type {string} * @memberof ContinueWithRecoveryUiFlow */ 'id': string; /** * The URL of the recovery flow If this value is set, redirect the user\'s browser to this URL. This value is typically unset for native clients / API flows. * @type {string} * @memberof ContinueWithRecoveryUiFlow */ 'url'?: string; } /** * Indicates, that the UI flow could be continued by showing a recovery ui * @export * @interface ContinueWithRedirectBrowserTo */ export interface ContinueWithRedirectBrowserTo { /** * Action will always be `redirect_browser_to` redirect_browser_to ContinueWithActionRedirectBrowserToString * @type {string} * @memberof ContinueWithRedirectBrowserTo */ 'action': ContinueWithRedirectBrowserToActionEnum; /** * The URL to redirect the browser to * @type {string} * @memberof ContinueWithRedirectBrowserTo */ 'redirect_browser_to': string; } export const ContinueWithRedirectBrowserToActionEnum = { RedirectBrowserTo: 'redirect_browser_to' } as const; export type ContinueWithRedirectBrowserToActionEnum = typeof ContinueWithRedirectBrowserToActionEnum[keyof typeof ContinueWithRedirectBrowserToActionEnum]; /** * Indicates that a session was issued, and the application should use this token for authenticated requests * @export * @interface ContinueWithSetOrySessionToken */ export interface ContinueWithSetOrySessionToken { /** * Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString * @type {string} * @memberof ContinueWithSetOrySessionToken */ 'action': ContinueWithSetOrySessionTokenActionEnum; /** * Token is the token of the session * @type {string} * @memberof ContinueWithSetOrySessionToken */ 'ory_session_token': string; } export const ContinueWithSetOrySessionTokenActionEnum = { SetOrySessionToken: 'set_ory_session_token' } as const; export type ContinueWithSetOrySessionTokenActionEnum = typeof ContinueWithSetOrySessionTokenActionEnum[keyof typeof ContinueWithSetOrySessionTokenActionEnum]; /** * Indicates, that the UI flow could be continued by showing a settings ui * @export * @interface ContinueWithSettingsUi */ export interface ContinueWithSettingsUi { /** * Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString * @type {string} * @memberof ContinueWithSettingsUi */ 'action': ContinueWithSettingsUiActionEnum; /** * * @type {ContinueWithSettingsUiFlow} * @memberof ContinueWithSettingsUi */ 'flow': ContinueWithSettingsUiFlow; } export const ContinueWithSettingsUiActionEnum = { ShowSettingsUi: 'show_settings_ui' } as const; export type ContinueWithSettingsUiActionEnum = typeof ContinueWithSettingsUiActionEnum[keyof typeof ContinueWithSettingsUiActionEnum]; /** * * @export * @interface ContinueWithSettingsUiFlow */ export interface ContinueWithSettingsUiFlow { /** * The ID of the settings flow * @type {string} * @memberof ContinueWithSettingsUiFlow */ 'id': string; /** * The URL of the settings flow If this value is set, redirect the user\'s browser to this URL. This value is typically unset for native clients / API flows. * @type {string} * @memberof ContinueWithSettingsUiFlow */ 'url'?: string; } /** * Indicates, that the UI flow could be continued by showing a verification ui * @export * @interface ContinueWithVerificationUi */ export interface ContinueWithVerificationUi { /** * Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString * @type {string} * @memberof ContinueWithVerificationUi */ 'action': ContinueWithVerificationUiActionEnum; /** * * @type {ContinueWithVerificationUiFlow} * @memberof ContinueWithVerificationUi */ 'flow': ContinueWithVerificationUiFlow; } export const ContinueWithVerificationUiActionEnum = { ShowVerificationUi: 'show_verification_ui' } as const; export type ContinueWithVerificationUiActionEnum = typeof ContinueWithVerificationUiActionEnum[keyof typeof ContinueWithVerificationUiActionEnum]; /** * * @export * @interface ContinueWithVerificationUiFlow */ export interface ContinueWithVerificationUiFlow { /** * The ID of the verification flow * @type {string} * @memberof ContinueWithVerificationUiFlow */ 'id': string; /** * The URL of the verification flow If this value is set, redirect the user\'s browser to this URL. This value is typically unset for native clients / API flows. * @type {string} * @memberof ContinueWithVerificationUiFlow */ 'url'?: string; /** * The address that should be verified in this flow * @type {string} * @memberof ContinueWithVerificationUiFlow */ 'verifiable_address': string; } /** * A Message\'s Status * @export * @enum {string} */ export const CourierMessageStatus = { Queued: 'queued', Sent: 'sent', Processing: 'processing', Abandoned: 'abandoned' } as const; export type CourierMessageStatus = typeof CourierMessageStatus[keyof typeof CourierMessageStatus]; /** * It can either be `email` or `phone` * @export * @enum {string} */ export const CourierMessageType = { Email: 'email', Phone: 'phone' } as const; export type CourierMessageType = typeof CourierMessageType[keyof typeof CourierMessageType]; /** * Contains a list of all available FedCM providers. * @export * @interface CreateFedcmFlowResponse */ export interface CreateFedcmFlowResponse { /** * * @type {string} * @memberof CreateFedcmFlowResponse */ 'csrf_token'?: string; /** * * @type {Array} * @memberof CreateFedcmFlowResponse */ 'providers'?: Array; } /** * Create Identity Body * @export * @interface CreateIdentityBody */ export interface CreateIdentityBody { /** * * @type {IdentityWithCredentials} * @memberof CreateIdentityBody */ 'credentials'?: IdentityWithCredentials; /** * Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/`. * @type {any} * @memberof CreateIdentityBody */ 'metadata_admin'?: any; /** * Store metadata about the identity which the identity itself can see when calling for example the session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field. * @type {any} * @memberof CreateIdentityBody */ 'metadata_public'?: any; /** * * @type {string} * @memberof CreateIdentityBody */ 'organization_id'?: string | null; /** * RecoveryAddresses contains all the addresses that can be used to recover an identity. Use this structure to import recovery addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update. * @type {Array} * @memberof CreateIdentityBody */ 'recovery_addresses'?: Array; /** * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits. * @type {string} * @memberof CreateIdentityBody */ 'schema_id': string; /** * State is the identity\'s state. active StateActive inactive StateInactive * @type {string} * @memberof CreateIdentityBody */ 'state'?: CreateIdentityBodyStateEnum; /** * 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 CreateIdentityBody */ 'traits': object; /** * VerifiableAddresses contains all the addresses that can be verified by the user. Use this structure to import verified addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update. * @type {Array} * @memberof CreateIdentityBody */ 'verifiable_addresses'?: Array; } export const CreateIdentityBodyStateEnum = { Active: 'active', Inactive: 'inactive' } as const; export type CreateIdentityBodyStateEnum = typeof CreateIdentityBodyStateEnum[keyof typeof CreateIdentityBodyStateEnum]; /** * Create Recovery Code for Identity Request Body * @export * @interface CreateRecoveryCodeForIdentityBody */ export interface CreateRecoveryCodeForIdentityBody { /** * Code Expires In The recovery code will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`. * @type {string} * @memberof CreateRecoveryCodeForIdentityBody */ 'expires_in'?: string; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof CreateRecoveryCodeForIdentityBody */ 'flow_type'?: string; /** * Identity to Recover The identity\'s ID you wish to recover. * @type {string} * @memberof CreateRecoveryCodeForIdentityBody */ 'identity_id': string; } /** * Create Recovery Link for Identity Request Body * @export * @interface CreateRecoveryLinkForIdentityBody */ export interface CreateRecoveryLinkForIdentityBody { /** * Link Expires In The recovery link will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`. * @type {string} * @memberof CreateRecoveryLinkForIdentityBody */ 'expires_in'?: string; /** * Identity to Recover The identity\'s ID you wish to recover. * @type {string} * @memberof CreateRecoveryLinkForIdentityBody */ 'identity_id': string; } /** * Deleted Session Count * @export * @interface DeleteMySessionsCount */ export interface DeleteMySessionsCount { /** * The number of sessions that were revoked. * @type {number} * @memberof DeleteMySessionsCount */ 'count'?: number; } /** * * @export * @interface ErrorAuthenticatorAssuranceLevelNotSatisfied */ export interface ErrorAuthenticatorAssuranceLevelNotSatisfied { /** * * @type {GenericError} * @memberof ErrorAuthenticatorAssuranceLevelNotSatisfied */ 'error'?: GenericError; /** * Points to where to redirect the user to next. * @type {string} * @memberof ErrorAuthenticatorAssuranceLevelNotSatisfied */ 'redirect_browser_to'?: string; } /** * * @export * @interface ErrorBrowserLocationChangeRequired */ export interface ErrorBrowserLocationChangeRequired { /** * * @type {ErrorGeneric} * @memberof ErrorBrowserLocationChangeRequired */ 'error'?: ErrorGeneric; /** * Points to where to redirect the user to next. * @type {string} * @memberof ErrorBrowserLocationChangeRequired */ 'redirect_browser_to'?: string; } /** * Is sent when a flow is replaced by a different flow of the same class * @export * @interface ErrorFlowReplaced */ export interface ErrorFlowReplaced { /** * * @type {GenericError} * @memberof ErrorFlowReplaced */ 'error'?: GenericError; /** * The flow ID that should be used for the new flow as it contains the correct messages. * @type {string} * @memberof ErrorFlowReplaced */ 'use_flow_id'?: string; } /** * The standard Ory JSON API error format. * @export * @interface ErrorGeneric */ export interface ErrorGeneric { /** * * @type {GenericError} * @memberof ErrorGeneric */ 'error': GenericError; } /** * * @export * @interface FlowError */ export interface FlowError { /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof FlowError */ 'created_at'?: string; /** * * @type {object} * @memberof FlowError */ 'error'?: object; /** * ID of the error container. * @type {string} * @memberof FlowError */ 'id': string; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof FlowError */ 'updated_at'?: string; } /** * * @export * @interface GenericError */ export interface GenericError { /** * The status code * @type {number} * @memberof GenericError */ 'code'?: number; /** * Debug information This field is often not exposed to protect against leaking sensitive information. * @type {string} * @memberof GenericError */ 'debug'?: string; /** * Further error details * @type {object} * @memberof GenericError */ 'details'?: object; /** * The error ID Useful when trying to identify various errors in application logic. * @type {string} * @memberof GenericError */ 'id'?: string; /** * Error message The error\'s message. * @type {string} * @memberof GenericError */ 'message': string; /** * A human-readable reason for the error * @type {string} * @memberof GenericError */ 'reason'?: string; /** * The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. * @type {string} * @memberof GenericError */ 'request'?: string; /** * The status description * @type {string} * @memberof GenericError */ 'status'?: string; } /** * * @export * @interface GetVersion200Response */ export interface GetVersion200Response { /** * The version of Ory Kratos. * @type {string} * @memberof GetVersion200Response */ 'version': 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; } /** * An [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory. * @export * @interface Identity */ export interface Identity { /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof Identity */ 'created_at'?: string; /** * Credentials represents all credentials that can be used for authenticating this identity. * @type {{ [key: string]: IdentityCredentials; }} * @memberof Identity */ 'credentials'?: { [key: string]: IdentityCredentials; }; /** * ID is the identity\'s unique identifier. The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB. * @type {string} * @memberof Identity */ 'id': string; /** * NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable- * @type {any} * @memberof Identity */ 'metadata_admin'?: any | null; /** * NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable- * @type {any} * @memberof Identity */ 'metadata_public'?: any | null; /** * * @type {string} * @memberof Identity */ 'organization_id'?: string | null; /** * 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; /** * State is the identity\'s state. This value has currently no effect. active StateActive inactive StateInactive * @type {string} * @memberof Identity */ 'state'?: IdentityStateEnum; /** * * @type {string} * @memberof Identity */ 'state_changed_at'?: 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 {any} * @memberof Identity */ 'traits': any; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof Identity */ 'updated_at'?: string; /** * VerifiableAddresses contains all the addresses that can be verified by the user. * @type {Array} * @memberof Identity */ 'verifiable_addresses'?: Array; } export const IdentityStateEnum = { Active: 'active', Inactive: 'inactive' } as const; export type IdentityStateEnum = typeof IdentityStateEnum[keyof typeof IdentityStateEnum]; /** * Credentials represents a specific credential type * @export * @interface IdentityCredentials */ export interface IdentityCredentials { /** * * @type {object} * @memberof IdentityCredentials */ 'config'?: object; /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof IdentityCredentials */ 'created_at'?: string; /** * Identifiers represents a list of unique identifiers this credential type matches. * @type {Array} * @memberof IdentityCredentials */ 'identifiers'?: Array; /** * Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode * @type {string} * @memberof IdentityCredentials */ 'type'?: IdentityCredentialsTypeEnum; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof IdentityCredentials */ 'updated_at'?: string; /** * Version refers to the version of the credential. Useful when changing the config schema. * @type {number} * @memberof IdentityCredentials */ 'version'?: number; } export const IdentityCredentialsTypeEnum = { Password: 'password', Oidc: 'oidc', Totp: 'totp', LookupSecret: 'lookup_secret', Webauthn: 'webauthn', Code: 'code', Passkey: 'passkey', Profile: 'profile', Saml: 'saml', LinkRecovery: 'link_recovery', CodeRecovery: 'code_recovery' } as const; export type IdentityCredentialsTypeEnum = typeof IdentityCredentialsTypeEnum[keyof typeof IdentityCredentialsTypeEnum]; /** * CredentialsCode represents a one time login/registration code * @export * @interface IdentityCredentialsCode */ export interface IdentityCredentialsCode { /** * * @type {Array} * @memberof IdentityCredentialsCode */ 'addresses'?: Array; } /** * * @export * @interface IdentityCredentialsCodeAddress */ export interface IdentityCredentialsCodeAddress { /** * The address for this code * @type {string} * @memberof IdentityCredentialsCodeAddress */ 'address'?: string; /** * * @type {string} * @memberof IdentityCredentialsCodeAddress */ 'channel'?: string; } /** * * @export * @interface IdentityCredentialsOidc */ export interface IdentityCredentialsOidc { /** * * @type {Array} * @memberof IdentityCredentialsOidc */ 'providers'?: Array; } /** * * @export * @interface IdentityCredentialsOidcProvider */ export interface IdentityCredentialsOidcProvider { /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'initial_access_token'?: string; /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'initial_id_token'?: string; /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'initial_refresh_token'?: string; /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'organization'?: string; /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'provider'?: string; /** * * @type {string} * @memberof IdentityCredentialsOidcProvider */ 'subject'?: string; /** * * @type {boolean} * @memberof IdentityCredentialsOidcProvider */ 'use_auto_link'?: boolean; } /** * * @export * @interface IdentityCredentialsPassword */ export interface IdentityCredentialsPassword { /** * HashedPassword is a hash-representation of the password. * @type {string} * @memberof IdentityCredentialsPassword */ 'hashed_password'?: string; /** * UsePasswordMigrationHook is set to true if the password should be migrated using the password migration hook. If set, and the HashedPassword is empty, a webhook will be called during login to migrate the password. * @type {boolean} * @memberof IdentityCredentialsPassword */ 'use_password_migration_hook'?: boolean; } /** * Payload for patching an identity * @export * @interface IdentityPatch */ export interface IdentityPatch { /** * * @type {CreateIdentityBody} * @memberof IdentityPatch */ 'create'?: CreateIdentityBody; /** * The ID of this patch. The patch ID is optional. If specified, the ID will be returned in the response, so consumers of this API can correlate the response with the patch. * @type {string} * @memberof IdentityPatch */ 'patch_id'?: string; } /** * Response for a single identity patch * @export * @interface IdentityPatchResponse */ export interface IdentityPatchResponse { /** * The action for this specific patch create ActionCreate Create this identity. error ActionError Error indicates that the patch failed. * @type {string} * @memberof IdentityPatchResponse */ 'action'?: IdentityPatchResponseActionEnum; /** * * @type {any} * @memberof IdentityPatchResponse */ 'error'?: any; /** * The identity ID payload of this patch * @type {string} * @memberof IdentityPatchResponse */ 'identity'?: string; /** * The ID of this patch response, if an ID was specified in the patch. * @type {string} * @memberof IdentityPatchResponse */ 'patch_id'?: string; } export const IdentityPatchResponseActionEnum = { Create: 'create', Error: 'error' } as const; export type IdentityPatchResponseActionEnum = typeof IdentityPatchResponseActionEnum[keyof typeof IdentityPatchResponseActionEnum]; /** * An Identity JSON Schema Container * @export * @interface IdentitySchemaContainer */ export interface IdentitySchemaContainer { /** * The ID of the Identity JSON Schema * @type {string} * @memberof IdentitySchemaContainer */ 'id'?: string; /** * The actual Identity JSON Schema * @type {object} * @memberof IdentitySchemaContainer */ 'schema'?: object; } /** * Create Identity and Import Credentials * @export * @interface IdentityWithCredentials */ export interface IdentityWithCredentials { /** * * @type {IdentityWithCredentialsOidc} * @memberof IdentityWithCredentials */ 'oidc'?: IdentityWithCredentialsOidc; /** * * @type {IdentityWithCredentialsPassword} * @memberof IdentityWithCredentials */ 'password'?: IdentityWithCredentialsPassword; } /** * Create Identity and Import Social Sign In Credentials * @export * @interface IdentityWithCredentialsOidc */ export interface IdentityWithCredentialsOidc { /** * * @type {IdentityWithCredentialsOidcConfig} * @memberof IdentityWithCredentialsOidc */ 'config'?: IdentityWithCredentialsOidcConfig; } /** * * @export * @interface IdentityWithCredentialsOidcConfig */ export interface IdentityWithCredentialsOidcConfig { /** * * @type {IdentityWithCredentialsPasswordConfig} * @memberof IdentityWithCredentialsOidcConfig */ 'config'?: IdentityWithCredentialsPasswordConfig; /** * A list of OpenID Connect Providers * @type {Array} * @memberof IdentityWithCredentialsOidcConfig */ 'providers'?: Array; } /** * Create Identity and Import Social Sign In Credentials Configuration * @export * @interface IdentityWithCredentialsOidcConfigProvider */ export interface IdentityWithCredentialsOidcConfigProvider { /** * The OpenID Connect provider to link the subject to. Usually something like `google` or `github`. * @type {string} * @memberof IdentityWithCredentialsOidcConfigProvider */ 'provider': string; /** * The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token. * @type {string} * @memberof IdentityWithCredentialsOidcConfigProvider */ 'subject': string; /** * If set, this credential allows the user to sign in using the OpenID Connect provider without setting the subject first. * @type {boolean} * @memberof IdentityWithCredentialsOidcConfigProvider */ 'use_auto_link'?: boolean; } /** * Create Identity and Import Password Credentials * @export * @interface IdentityWithCredentialsPassword */ export interface IdentityWithCredentialsPassword { /** * * @type {IdentityWithCredentialsPasswordConfig} * @memberof IdentityWithCredentialsPassword */ 'config'?: IdentityWithCredentialsPasswordConfig; } /** * Create Identity and Import Password Credentials Configuration * @export * @interface IdentityWithCredentialsPasswordConfig */ export interface IdentityWithCredentialsPasswordConfig { /** * The hashed password in [PHC format](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords) * @type {string} * @memberof IdentityWithCredentialsPasswordConfig */ 'hashed_password'?: string; /** * The password in plain text if no hash is available. * @type {string} * @memberof IdentityWithCredentialsPasswordConfig */ 'password'?: string; /** * If set to true, the password will be migrated using the password migration hook. * @type {boolean} * @memberof IdentityWithCredentialsPasswordConfig */ 'use_password_migration_hook'?: boolean; } /** * * @export * @interface IsAlive200Response */ export interface IsAlive200Response { /** * Always \"ok\". * @type {string} * @memberof IsAlive200Response */ 'status': string; } /** * * @export * @interface IsReady503Response */ export interface IsReady503Response { /** * Errors contains a list of errors that caused the not ready status. * @type {{ [key: string]: string; }} * @memberof IsReady503Response */ 'errors': { [key: string]: string; }; } /** * A JSONPatch document as defined by RFC 6902 * @export * @interface JsonPatch */ export interface JsonPatch { /** * This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @type {string} * @memberof JsonPatch */ 'from'?: string; /** * The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". * @type {string} * @memberof JsonPatch */ 'op': string; /** * The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @type {string} * @memberof JsonPatch */ 'path': string; /** * The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @type {any} * @memberof JsonPatch */ 'value'?: any; } /** * 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 { /** * The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode * @type {string} * @memberof LoginFlow */ 'active'?: LoginFlowActiveEnum; /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof LoginFlow */ 'created_at'?: 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; /** * ID represents the flow\'s unique ID. When performing the login flow, this represents the id in the login UI\'s query parameter: http:///?flow= * @type {string} * @memberof LoginFlow */ 'id': string; /** * IssuedAt is the time (UTC) when the flow started. * @type {string} * @memberof LoginFlow */ 'issued_at': string; /** * Ory OAuth 2.0 Login Challenge. This value is set using the `login_challenge` query parameter of the registration and login endpoints. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. * @type {string} * @memberof LoginFlow */ 'oauth2_login_challenge'?: string; /** * * @type {OAuth2LoginRequest} * @memberof LoginFlow */ 'oauth2_login_request'?: OAuth2LoginRequest; /** * * @type {string} * @memberof LoginFlow */ 'organization_id'?: string | null; /** * Refresh stores whether this login flow should enforce re-authentication. * @type {boolean} * @memberof LoginFlow */ 'refresh'?: boolean; /** * 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; /** * * @type {AuthenticatorAssuranceLevel} * @memberof LoginFlow */ 'requested_aal'?: AuthenticatorAssuranceLevel; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof LoginFlow */ 'return_to'?: string; /** * SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the login flow has been completed. This is only set if the client has requested a session token exchange code, and if the flow is of type \"api\", and only on creating the login flow. * @type {string} * @memberof LoginFlow */ 'session_token_exchange_code'?: string; /** * State represents the state of this request: choose_method: ask the user to choose a method to sign in with sent_email: the email has been sent to the user passed_challenge: the request was successful and the login challenge was passed. * @type {any} * @memberof LoginFlow */ 'state': any; /** * TransientPayload is used to pass data from the login to hooks and email templates * @type {object} * @memberof LoginFlow */ 'transient_payload'?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof LoginFlow */ 'type': string; /** * * @type {UiContainer} * @memberof LoginFlow */ 'ui': UiContainer; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof LoginFlow */ 'updated_at'?: string; } export const LoginFlowActiveEnum = { Password: 'password', Oidc: 'oidc', Totp: 'totp', LookupSecret: 'lookup_secret', Webauthn: 'webauthn', Code: 'code', Passkey: 'passkey', Profile: 'profile', Saml: 'saml', LinkRecovery: 'link_recovery', CodeRecovery: 'code_recovery' } as const; export type LoginFlowActiveEnum = typeof LoginFlowActiveEnum[keyof typeof LoginFlowActiveEnum]; /** * The experimental state represents the state of a login flow. This field is EXPERIMENTAL and subject to change! * @export * @enum {string} */ export const LoginFlowState = { ChooseMethod: 'choose_method', SentEmail: 'sent_email', PassedChallenge: 'passed_challenge' } as const; export type LoginFlowState = typeof LoginFlowState[keyof typeof LoginFlowState]; /** * Logout Flow * @export * @interface LogoutFlow */ export interface LogoutFlow { /** * LogoutToken can be used to perform logout using AJAX. * @type {string} * @memberof LogoutFlow */ 'logout_token': string; /** * LogoutURL can be opened in a browser to sign the user out. format: uri * @type {string} * @memberof LogoutFlow */ 'logout_url': string; } /** * * @export * @interface Message */ export interface Message { /** * * @type {string} * @memberof Message */ 'body': string; /** * * @type {string} * @memberof Message */ 'channel'?: string; /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof Message */ 'created_at': string; /** * Dispatches store information about the attempts of delivering a message May contain an error if any happened, or just the `success` state. * @type {Array} * @memberof Message */ 'dispatches'?: Array; /** * * @type {string} * @memberof Message */ 'id': string; /** * * @type {string} * @memberof Message */ 'recipient': string; /** * * @type {number} * @memberof Message */ 'send_count': number; /** * * @type {CourierMessageStatus} * @memberof Message */ 'status': CourierMessageStatus; /** * * @type {string} * @memberof Message */ 'subject': string; /** * recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid * @type {string} * @memberof Message */ 'template_type': MessageTemplateTypeEnum; /** * * @type {CourierMessageType} * @memberof Message */ 'type': CourierMessageType; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof Message */ 'updated_at': string; } export const MessageTemplateTypeEnum = { RecoveryInvalid: 'recovery_invalid', RecoveryValid: 'recovery_valid', RecoveryCodeInvalid: 'recovery_code_invalid', RecoveryCodeValid: 'recovery_code_valid', VerificationInvalid: 'verification_invalid', VerificationValid: 'verification_valid', VerificationCodeInvalid: 'verification_code_invalid', VerificationCodeValid: 'verification_code_valid', Stub: 'stub', LoginCodeValid: 'login_code_valid', RegistrationCodeValid: 'registration_code_valid' } as const; export type MessageTemplateTypeEnum = typeof MessageTemplateTypeEnum[keyof typeof MessageTemplateTypeEnum]; /** * MessageDispatch represents an attempt of sending a courier message It contains the status of the attempt (failed or successful) and the error if any occured * @export * @interface MessageDispatch */ export interface MessageDispatch { /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof MessageDispatch */ 'created_at': string; /** * * @type {object} * @memberof MessageDispatch */ 'error'?: object; /** * The ID of this message dispatch * @type {string} * @memberof MessageDispatch */ 'id': string; /** * The ID of the message being dispatched * @type {string} * @memberof MessageDispatch */ 'message_id': string; /** * The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess * @type {string} * @memberof MessageDispatch */ 'status': MessageDispatchStatusEnum; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof MessageDispatch */ 'updated_at': string; } export const MessageDispatchStatusEnum = { Failed: 'failed', Success: 'success' } as const; export type MessageDispatchStatusEnum = typeof MessageDispatchStatusEnum[keyof typeof MessageDispatchStatusEnum]; /** * * @export * @interface NeedsPrivilegedSessionError */ export interface NeedsPrivilegedSessionError { /** * * @type {GenericError} * @memberof NeedsPrivilegedSessionError */ 'error'?: GenericError; /** * Points to where to redirect the user to next. * @type {string} * @memberof NeedsPrivilegedSessionError */ 'redirect_browser_to': string; } /** * * @export * @interface OAuth2Client */ export interface OAuth2Client { /** * OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. * @type {string} * @memberof OAuth2Client */ 'access_token_strategy'?: string; /** * * @type {Array} * @memberof OAuth2Client */ 'allowed_cors_origins'?: Array; /** * * @type {Array} * @memberof OAuth2Client */ 'audience'?: Array; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'authorization_code_grant_access_token_lifespan'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'authorization_code_grant_id_token_lifespan'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'authorization_code_grant_refresh_token_lifespan'?: string; /** * OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false. * @type {boolean} * @memberof OAuth2Client */ 'backchannel_logout_session_required'?: boolean; /** * OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. * @type {string} * @memberof OAuth2Client */ 'backchannel_logout_uri'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'client_credentials_grant_access_token_lifespan'?: string; /** * OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated. * @type {string} * @memberof OAuth2Client */ 'client_id'?: string; /** * OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. * @type {string} * @memberof OAuth2Client */ 'client_name'?: string; /** * OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost. * @type {string} * @memberof OAuth2Client */ 'client_secret'?: string; /** * OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. * @type {number} * @memberof OAuth2Client */ 'client_secret_expires_at'?: number; /** * OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion. * @type {string} * @memberof OAuth2Client */ 'client_uri'?: string; /** * * @type {Array} * @memberof OAuth2Client */ 'contacts'?: Array; /** * OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client\'s creation. * @type {string} * @memberof OAuth2Client */ 'created_at'?: string; /** * OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false. * @type {boolean} * @memberof OAuth2Client */ 'frontchannel_logout_session_required'?: boolean; /** * OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be. * @type {string} * @memberof OAuth2Client */ 'frontchannel_logout_uri'?: string; /** * * @type {Array} * @memberof OAuth2Client */ 'grant_types'?: Array; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'implicit_grant_access_token_lifespan'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'implicit_grant_id_token_lifespan'?: string; /** * OAuth 2.0 Client JSON Web Key Set Client\'s JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. * @type {any} * @memberof OAuth2Client */ 'jwks'?: any; /** * OAuth 2.0 Client JSON Web Key Set URL URL for the Client\'s JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client\'s encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key\'s intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. * @type {string} * @memberof OAuth2Client */ 'jwks_uri'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'jwt_bearer_grant_access_token_lifespan'?: string; /** * OAuth 2.0 Client Logo URI A URL string referencing the client\'s logo. * @type {string} * @memberof OAuth2Client */ 'logo_uri'?: string; /** * * @type {any} * @memberof OAuth2Client */ 'metadata'?: any; /** * OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. * @type {string} * @memberof OAuth2Client */ 'owner'?: string; /** * OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data. * @type {string} * @memberof OAuth2Client */ 'policy_uri'?: string; /** * * @type {Array} * @memberof OAuth2Client */ 'post_logout_redirect_uris'?: Array; /** * * @type {Array} * @memberof OAuth2Client */ 'redirect_uris'?: Array; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'refresh_token_grant_access_token_lifespan'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'refresh_token_grant_id_token_lifespan'?: string; /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} * @memberof OAuth2Client */ 'refresh_token_grant_refresh_token_lifespan'?: string; /** * OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration. * @type {string} * @memberof OAuth2Client */ 'registration_access_token'?: string; /** * OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. * @type {string} * @memberof OAuth2Client */ 'registration_client_uri'?: string; /** * OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm. * @type {string} * @memberof OAuth2Client */ 'request_object_signing_alg'?: string; /** * * @type {Array} * @memberof OAuth2Client */ 'request_uris'?: Array; /** * * @type {Array} * @memberof OAuth2Client */ 'response_types'?: Array; /** * OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. * @type {string} * @memberof OAuth2Client */ 'scope'?: string; /** * OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. * @type {string} * @memberof OAuth2Client */ 'sector_identifier_uri'?: string; /** * SkipConsent skips the consent screen for this client. This field can only be set from the admin API. * @type {boolean} * @memberof OAuth2Client */ 'skip_consent'?: boolean; /** * SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API. * @type {boolean} * @memberof OAuth2Client */ 'skip_logout_consent'?: boolean; /** * OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. * @type {string} * @memberof OAuth2Client */ 'subject_type'?: string; /** * OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. * @type {string} * @memberof OAuth2Client */ 'token_endpoint_auth_method'?: string; /** * OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. * @type {string} * @memberof OAuth2Client */ 'token_endpoint_auth_signing_alg'?: string; /** * OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. * @type {string} * @memberof OAuth2Client */ 'tos_uri'?: string; /** * OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. * @type {string} * @memberof OAuth2Client */ 'updated_at'?: string; /** * OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. * @type {string} * @memberof OAuth2Client */ 'userinfo_signed_response_alg'?: string; } /** * OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext * @export * @interface OAuth2ConsentRequestOpenIDConnectContext */ export interface OAuth2ConsentRequestOpenIDConnectContext { /** * ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. * @type {Array} * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'acr_values'?: Array; /** * Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \\\"feature phone\\\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. * @type {string} * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'display'?: string; /** * IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User\'s current or past authenticated session with the Client. * @type {{ [key: string]: any; }} * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'id_token_hint_claims'?: { [key: string]: any; }; /** * LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. * @type {string} * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'login_hint'?: string; /** * UILocales is the End-User\'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \\\"fr-CA fr en\\\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. * @type {Array} * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'ui_locales'?: Array; } /** * OAuth2LoginRequest struct for OAuth2LoginRequest * @export * @interface OAuth2LoginRequest */ export interface OAuth2LoginRequest { /** * ID is the identifier (\\\"login challenge\\\") of the login request. It is used to identify the session. * @type {string} * @memberof OAuth2LoginRequest */ 'challenge'?: string; /** * * @type {OAuth2Client} * @memberof OAuth2LoginRequest */ 'client'?: OAuth2Client; /** * * @type {OAuth2ConsentRequestOpenIDConnectContext} * @memberof OAuth2LoginRequest */ 'oidc_context'?: OAuth2ConsentRequestOpenIDConnectContext; /** * RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. * @type {string} * @memberof OAuth2LoginRequest */ 'request_url'?: string; /** * * @type {Array} * @memberof OAuth2LoginRequest */ 'requested_access_token_audience'?: Array; /** * * @type {Array} * @memberof OAuth2LoginRequest */ 'requested_scope'?: Array; /** * SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \\\"sid\\\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It\'s value can generally be used to associate consecutive login requests by a certain user. * @type {string} * @memberof OAuth2LoginRequest */ 'session_id'?: string; /** * Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. * @type {boolean} * @memberof OAuth2LoginRequest */ 'skip'?: boolean; /** * Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. * @type {string} * @memberof OAuth2LoginRequest */ 'subject'?: string; } /** * Patch Identities Body * @export * @interface PatchIdentitiesBody */ export interface PatchIdentitiesBody { /** * Identities holds the list of patches to apply required * @type {Array} * @memberof PatchIdentitiesBody */ 'identities'?: Array; } /** * Perform Native Logout Request Body * @export * @interface PerformNativeLogoutBody */ export interface PerformNativeLogoutBody { /** * The Session Token Invalidate this session token. * @type {string} * @memberof PerformNativeLogoutBody */ 'session_token': string; } /** * * @export * @interface Provider */ export interface Provider { /** * The RP\'s client identifier, issued by the IdP. * @type {string} * @memberof Provider */ 'client_id'?: string; /** * A full path of the IdP config file. * @type {string} * @memberof Provider */ 'config_url'?: string; /** * By specifying one of domain_hints values provided by the accounts endpoints, the FedCM dialog selectively shows the specified account. * @type {string} * @memberof Provider */ 'domain_hint'?: string; /** * Array of strings that specifies the user information (\"name\", \" email\", \"picture\") that RP needs IdP to share with them. Note: Field API is supported by Chrome 132 and later. * @type {Array} * @memberof Provider */ 'fields'?: Array; /** * By specifying one of login_hints values provided by the accounts endpoints, the FedCM dialog selectively shows the specified account. * @type {string} * @memberof Provider */ 'login_hint'?: string; /** * A random string to ensure the response is issued for this specific request. Prevents replay attacks. * @type {string} * @memberof Provider */ 'nonce'?: string; /** * Custom object that allows to specify additional key-value parameters: scope: A string value containing additional permissions that RP needs to request, for example \" drive.readonly calendar.readonly\" nonce: A random string to ensure the response is issued for this specific request. Prevents replay attacks. Other custom key-value parameters. Note: parameters is supported from Chrome 132. * @type {{ [key: string]: string; }} * @memberof Provider */ 'parameters'?: { [key: string]: string; }; } /** * Used when an administrator creates a recovery code for an identity. * @export * @interface RecoveryCodeForIdentity */ export interface RecoveryCodeForIdentity { /** * Expires At is the timestamp of when the recovery flow expires The timestamp when the recovery code expires. * @type {string} * @memberof RecoveryCodeForIdentity */ 'expires_at'?: string; /** * RecoveryCode is the code that can be used to recover the account * @type {string} * @memberof RecoveryCodeForIdentity */ 'recovery_code': string; /** * RecoveryLink with flow This link opens the recovery UI with an empty `code` field. * @type {string} * @memberof RecoveryCodeForIdentity */ 'recovery_link': 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 recovery method that is being used. It is initially not set. * @type {string} * @memberof RecoveryFlow */ 'active'?: string; /** * Contains possible actions that could follow this flow * @type {Array} * @memberof RecoveryFlow */ 'continue_with'?: Array; /** * 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; /** * ID represents the request\'s unique ID. When performing the recovery flow, this represents the id in the recovery ui\'s query parameter: http://?request= * @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; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof RecoveryFlow */ 'return_to'?: string; /** * State represents the state of this request: choose_method: ask the user to choose a method (e.g. recover account via email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the recovery challenge was passed. * @type {any} * @memberof RecoveryFlow */ 'state': any; /** * TransientPayload is used to pass data from the recovery flow to hooks and email templates * @type {object} * @memberof RecoveryFlow */ 'transient_payload'?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof RecoveryFlow */ 'type': string; /** * * @type {UiContainer} * @memberof RecoveryFlow */ 'ui': UiContainer; } /** * The experimental state represents the state of a recovery flow. This field is EXPERIMENTAL and subject to change! * @export * @enum {string} */ export const RecoveryFlowState = { ChooseMethod: 'choose_method', SentEmail: 'sent_email', PassedChallenge: 'passed_challenge' } as const; export type RecoveryFlowState = typeof RecoveryFlowState[keyof typeof RecoveryFlowState]; /** * * @export * @interface RecoveryIdentityAddress */ export interface RecoveryIdentityAddress { /** * CreatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof RecoveryIdentityAddress */ 'created_at'?: string; /** * * @type {string} * @memberof RecoveryIdentityAddress */ 'id': string; /** * UpdatedAt is a helper struct field for gobuffalo.pop. * @type {string} * @memberof RecoveryIdentityAddress */ 'updated_at'?: string; /** * * @type {string} * @memberof RecoveryIdentityAddress */ 'value': string; /** * * @type {string} * @memberof RecoveryIdentityAddress */ 'via': string; } /** * Used when an administrator creates a recovery link for an identity. * @export * @interface RecoveryLinkForIdentity */ export interface RecoveryLinkForIdentity { /** * Recovery Link Expires At The timestamp when the recovery link expires. * @type {string} * @memberof RecoveryLinkForIdentity */ 'expires_at'?: string; /** * Recovery Link This link can be used to recover the account. * @type {string} * @memberof RecoveryLinkForIdentity */ 'recovery_link': string; } /** * * @export * @interface RegistrationFlow */ export interface RegistrationFlow { /** * Active, if set, contains the registration method that is being used. It is initially not set. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode * @type {string} * @memberof RegistrationFlow */ 'active'?: RegistrationFlowActiveEnum; /** * 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; /** * ID represents the flow\'s unique ID. When performing the registration flow, this represents the id in the registration ui\'s query parameter: http:///?flow= * @type {string} * @memberof RegistrationFlow */ 'id': string; /** * IssuedAt is the time (UTC) when the flow occurred. * @type {string} * @memberof RegistrationFlow */ 'issued_at': string; /** * Ory OAuth 2.0 Login Challenge. This value is set using the `login_challenge` query parameter of the registration and login endpoints. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. * @type {string} * @memberof RegistrationFlow */ 'oauth2_login_challenge'?: string; /** * * @type {OAuth2LoginRequest} * @memberof RegistrationFlow */ 'oauth2_login_request'?: OAuth2LoginRequest; /** * * @type {string} * @memberof RegistrationFlow */ 'organization_id'?: string | null; /** * 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; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof RegistrationFlow */ 'return_to'?: string; /** * SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the flow has been completed. This is only set if the client has requested a session token exchange code, and if the flow is of type \"api\", and only on creating the flow. * @type {string} * @memberof RegistrationFlow */ 'session_token_exchange_code'?: string; /** * State represents the state of this request: choose_method: ask the user to choose a method (e.g. registration with email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the registration challenge was passed. * @type {any} * @memberof RegistrationFlow */ 'state': any; /** * TransientPayload is used to pass data from the registration to a webhook * @type {object} * @memberof RegistrationFlow */ 'transient_payload'?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof RegistrationFlow */ 'type': string; /** * * @type {UiContainer} * @memberof RegistrationFlow */ 'ui': UiContainer; } export const RegistrationFlowActiveEnum = { Password: 'password', Oidc: 'oidc', Totp: 'totp', LookupSecret: 'lookup_secret', Webauthn: 'webauthn', Code: 'code', Passkey: 'passkey', Profile: 'profile', Saml: 'saml', LinkRecovery: 'link_recovery', CodeRecovery: 'code_recovery' } as const; export type RegistrationFlowActiveEnum = typeof RegistrationFlowActiveEnum[keyof typeof RegistrationFlowActiveEnum]; /** * The experimental state represents the state of a registration flow. This field is EXPERIMENTAL and subject to change! * @export * @enum {string} */ export const RegistrationFlowState = { ChooseMethod: 'choose_method', SentEmail: 'sent_email', PassedChallenge: 'passed_challenge' } as const; export type RegistrationFlowState = typeof RegistrationFlowState[keyof typeof RegistrationFlowState]; /** * Is sent when a flow is expired * @export * @interface SelfServiceFlowExpiredError */ export interface SelfServiceFlowExpiredError { /** * * @type {GenericError} * @memberof SelfServiceFlowExpiredError */ 'error'?: GenericError; /** * When the flow has expired * @type {string} * @memberof SelfServiceFlowExpiredError */ 'expired_at'?: string; /** * A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. * @type {number} * @memberof SelfServiceFlowExpiredError */ 'since'?: number; /** * The flow ID that should be used for the new flow as it contains the correct messages. * @type {string} * @memberof SelfServiceFlowExpiredError */ 'use_flow_id'?: string; } /** * A Session * @export * @interface Session */ export interface Session { /** * Active state. If false the session is no longer active. * @type {boolean} * @memberof Session */ 'active'?: boolean; /** * The Session Authentication Timestamp When this session was authenticated at. If multi-factor authentication was used this is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed). * @type {string} * @memberof Session */ 'authenticated_at'?: string; /** * A list of authenticators which were used to authenticate the session. * @type {Array} * @memberof Session */ 'authentication_methods'?: Array; /** * * @type {AuthenticatorAssuranceLevel} * @memberof Session */ 'authenticator_assurance_level'?: AuthenticatorAssuranceLevel; /** * Devices has history of all endpoints where the session was used * @type {Array} * @memberof Session */ 'devices'?: Array; /** * The Session Expiry When this session expires at. * @type {string} * @memberof Session */ 'expires_at'?: string; /** * Session ID * @type {string} * @memberof Session */ 'id': string; /** * * @type {Identity} * @memberof Session */ 'identity'?: Identity; /** * The Session Issuance Timestamp When this session was issued at. Usually equal or close to `authenticated_at`. * @type {string} * @memberof Session */ 'issued_at'?: string; /** * Tokenized is the tokenized (e.g. JWT) version of the session. It is only set when the `tokenize` query parameter was set to a valid tokenize template during calls to `/session/whoami`. * @type {string} * @memberof Session */ 'tokenized'?: string; } /** * A singular authenticator used during authentication / login. * @export * @interface SessionAuthenticationMethod */ export interface SessionAuthenticationMethod { /** * * @type {AuthenticatorAssuranceLevel} * @memberof SessionAuthenticationMethod */ 'aal'?: AuthenticatorAssuranceLevel; /** * When the authentication challenge was completed. * @type {string} * @memberof SessionAuthenticationMethod */ 'completed_at'?: string; /** * * @type {string} * @memberof SessionAuthenticationMethod */ 'method'?: SessionAuthenticationMethodMethodEnum; /** * The Organization id used for authentication * @type {string} * @memberof SessionAuthenticationMethod */ 'organization'?: string; /** * OIDC or SAML provider id used for authentication * @type {string} * @memberof SessionAuthenticationMethod */ 'provider'?: string; } export const SessionAuthenticationMethodMethodEnum = { LinkRecovery: 'link_recovery', CodeRecovery: 'code_recovery', Password: 'password', Code: 'code', Totp: 'totp', Oidc: 'oidc', Webauthn: 'webauthn', LookupSecret: 'lookup_secret', V06LegacySession: 'v0.6_legacy_session' } as const; export type SessionAuthenticationMethodMethodEnum = typeof SessionAuthenticationMethodMethodEnum[keyof typeof SessionAuthenticationMethodMethodEnum]; /** * Device corresponding to a Session * @export * @interface SessionDevice */ export interface SessionDevice { /** * Device record ID * @type {string} * @memberof SessionDevice */ 'id': string; /** * IPAddress of the client * @type {string} * @memberof SessionDevice */ 'ip_address'?: string; /** * Geo Location corresponding to the IP Address * @type {string} * @memberof SessionDevice */ 'location'?: string; /** * UserAgent of the client * @type {string} * @memberof SessionDevice */ 'user_agent'?: 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; /** * Contains a list of actions, that could follow this flow It can, for example, contain a reference to the verification flow, created as part of the user\'s registration. * @type {Array} * @memberof SettingsFlow */ 'continue_with'?: Array; /** * 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; /** * ID represents the flow\'s unique ID. When performing the settings flow, this represents the id in the settings ui\'s query parameter: http://?flow= * @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; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof SettingsFlow */ 'return_to'?: string; /** * State represents the state of this flow. It knows two states: show_form: No user data has been collected, or it is invalid, and thus the form should be shown. success: Indicates that the settings flow has been updated successfully with the provided data. Done will stay true when repeatedly checking. If set to true, done will revert back to false only when a flow with invalid (e.g. \"please use a valid phone number\") data was sent. * @type {any} * @memberof SettingsFlow */ 'state': any; /** * TransientPayload is used to pass data from the settings flow to hooks and email templates * @type {object} * @memberof SettingsFlow */ 'transient_payload'?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof SettingsFlow */ 'type': string; /** * * @type {UiContainer} * @memberof SettingsFlow */ 'ui': UiContainer; } /** * The experimental state represents the state of a settings flow. This field is EXPERIMENTAL and subject to change! * @export * @enum {string} */ export const SettingsFlowState = { ShowForm: 'show_form', Success: 'success' } as const; export type SettingsFlowState = typeof SettingsFlowState[keyof typeof SettingsFlowState]; /** * The Response for Registration Flows via API * @export * @interface SuccessfulCodeExchangeResponse */ export interface SuccessfulCodeExchangeResponse { /** * * @type {Session} * @memberof SuccessfulCodeExchangeResponse */ '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 SuccessfulCodeExchangeResponse */ 'session_token'?: string; } /** * The Response for Login Flows via API * @export * @interface SuccessfulNativeLogin */ export interface SuccessfulNativeLogin { /** * Contains a list of actions, that could follow this flow It can, for example, this will contain a reference to the verification flow, created as part of the user\'s registration or the token of the session. * @type {Array} * @memberof SuccessfulNativeLogin */ 'continue_with'?: Array; /** * * @type {Session} * @memberof SuccessfulNativeLogin */ '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 SuccessfulNativeLogin */ 'session_token'?: string; } /** * The Response for Registration Flows via API * @export * @interface SuccessfulNativeRegistration */ export interface SuccessfulNativeRegistration { /** * Contains a list of actions, that could follow this flow It can, for example, this will contain a reference to the verification flow, created as part of the user\'s registration or the token of the session. * @type {Array} * @memberof SuccessfulNativeRegistration */ 'continue_with'?: Array; /** * * @type {Identity} * @memberof SuccessfulNativeRegistration */ 'identity': Identity; /** * * @type {Session} * @memberof SuccessfulNativeRegistration */ '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 SuccessfulNativeRegistration */ 'session_token'?: string; } /** * * @export * @interface TokenPagination */ export interface TokenPagination { /** * Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @type {number} * @memberof TokenPagination */ 'page_size'?: number; /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @type {string} * @memberof TokenPagination */ 'page_token'?: string; } /** * * @export * @interface TokenPaginationHeaders */ export interface TokenPaginationHeaders { /** * The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header * @type {string} * @memberof TokenPaginationHeaders */ 'link'?: string; /** * The total number of clients. in: header * @type {string} * @memberof TokenPaginationHeaders */ 'x-total-count'?: string; } /** * 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; /** * Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup passkey PasskeyGroup identifier_first IdentifierFirstGroup captcha CaptchaGroup saml SAMLGroup * @type {string} * @memberof UiNode */ 'group': UiNodeGroupEnum; /** * * @type {Array} * @memberof UiNode */ 'messages': Array; /** * * @type {UiNodeMeta} * @memberof UiNode */ 'meta': UiNodeMeta; /** * The node\'s type text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNode */ 'type': UiNodeTypeEnum; } export const UiNodeGroupEnum = { Default: 'default', Password: 'password', Oidc: 'oidc', Profile: 'profile', Link: 'link', Code: 'code', Totp: 'totp', LookupSecret: 'lookup_secret', Webauthn: 'webauthn', Passkey: 'passkey', IdentifierFirst: 'identifier_first', Captcha: 'captcha', Saml: 'saml' } as const; export type UiNodeGroupEnum = typeof UiNodeGroupEnum[keyof typeof UiNodeGroupEnum]; export const UiNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeTypeEnum = typeof UiNodeTypeEnum[keyof typeof UiNodeTypeEnum]; /** * * @export * @interface UiNodeAnchorAttributes */ export interface UiNodeAnchorAttributes { /** * The link\'s href (destination) URL. format: uri * @type {string} * @memberof UiNodeAnchorAttributes */ 'href': string; /** * A unique identifier * @type {string} * @memberof UiNodeAnchorAttributes */ 'id': string; /** * NodeType represents this node\'s types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"a\". text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNodeAnchorAttributes */ 'node_type': UiNodeAnchorAttributesNodeTypeEnum; /** * * @type {UiText} * @memberof UiNodeAnchorAttributes */ 'title': UiText; } export const UiNodeAnchorAttributesNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeAnchorAttributesNodeTypeEnum = typeof UiNodeAnchorAttributesNodeTypeEnum[keyof typeof UiNodeAnchorAttributesNodeTypeEnum]; /** * @type UiNodeAttributes * @export */ export type UiNodeAttributes = { node_type: 'a' } & UiNodeAnchorAttributes | { node_type: 'img' } & UiNodeImageAttributes | { node_type: 'input' } & UiNodeInputAttributes | { node_type: 'script' } & UiNodeScriptAttributes | { node_type: 'text' } & UiNodeTextAttributes; /** * * @export * @interface UiNodeImageAttributes */ export interface UiNodeImageAttributes { /** * Height of the image * @type {number} * @memberof UiNodeImageAttributes */ 'height': number; /** * A unique identifier * @type {string} * @memberof UiNodeImageAttributes */ 'id': string; /** * NodeType represents this node\'s types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"img\". text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNodeImageAttributes */ 'node_type': UiNodeImageAttributesNodeTypeEnum; /** * The image\'s source URL. format: uri * @type {string} * @memberof UiNodeImageAttributes */ 'src': string; /** * Width of the image * @type {number} * @memberof UiNodeImageAttributes */ 'width': number; } export const UiNodeImageAttributesNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeImageAttributesNodeTypeEnum = typeof UiNodeImageAttributesNodeTypeEnum[keyof typeof UiNodeImageAttributesNodeTypeEnum]; /** * InputAttributes represents the attributes of an input node * @export * @interface UiNodeInputAttributes */ export interface UiNodeInputAttributes { /** * The autocomplete attribute for the input. email InputAttributeAutocompleteEmail tel InputAttributeAutocompleteTel url InputAttributeAutocompleteUrl current-password InputAttributeAutocompleteCurrentPassword new-password InputAttributeAutocompleteNewPassword one-time-code InputAttributeAutocompleteOneTimeCode * @type {string} * @memberof UiNodeInputAttributes */ 'autocomplete'?: UiNodeInputAttributesAutocompleteEnum; /** * Sets the input\'s disabled field to true or false. * @type {boolean} * @memberof UiNodeInputAttributes */ 'disabled': boolean; /** * * @type {UiText} * @memberof UiNodeInputAttributes */ 'label'?: UiText; /** * MaxLength may contain the input\'s maximum length. * @type {number} * @memberof UiNodeInputAttributes */ 'maxlength'?: number; /** * The input\'s element name. * @type {string} * @memberof UiNodeInputAttributes */ 'name': string; /** * NodeType represents this node\'s types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"input\". text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNodeInputAttributes */ 'node_type': UiNodeInputAttributesNodeTypeEnum; /** * OnClick may contain javascript which should be executed on click. This is primarily used for WebAuthn. Deprecated: Using OnClick requires the use of eval() which is a security risk. Use OnClickTrigger instead. * @type {string} * @memberof UiNodeInputAttributes */ 'onclick'?: string; /** * OnClickTrigger may contain a WebAuthn trigger which should be executed on click. The trigger maps to a JavaScript function provided by Ory, which triggers actions such as PassKey registration or login. oryWebAuthnRegistration WebAuthnTriggersWebAuthnRegistration oryWebAuthnLogin WebAuthnTriggersWebAuthnLogin oryPasskeyLogin WebAuthnTriggersPasskeyLogin oryPasskeyLoginAutocompleteInit WebAuthnTriggersPasskeyLoginAutocompleteInit oryPasskeyRegistration WebAuthnTriggersPasskeyRegistration oryPasskeySettingsRegistration WebAuthnTriggersPasskeySettingsRegistration * @type {string} * @memberof UiNodeInputAttributes */ 'onclickTrigger'?: UiNodeInputAttributesOnclickTriggerEnum; /** * OnLoad may contain javascript which should be executed on load. This is primarily used for WebAuthn. Deprecated: Using OnLoad requires the use of eval() which is a security risk. Use OnLoadTrigger instead. * @type {string} * @memberof UiNodeInputAttributes */ 'onload'?: string; /** * OnLoadTrigger may contain a WebAuthn trigger which should be executed on load. The trigger maps to a JavaScript function provided by Ory, which triggers actions such as PassKey registration or login. oryWebAuthnRegistration WebAuthnTriggersWebAuthnRegistration oryWebAuthnLogin WebAuthnTriggersWebAuthnLogin oryPasskeyLogin WebAuthnTriggersPasskeyLogin oryPasskeyLoginAutocompleteInit WebAuthnTriggersPasskeyLoginAutocompleteInit oryPasskeyRegistration WebAuthnTriggersPasskeyRegistration oryPasskeySettingsRegistration WebAuthnTriggersPasskeySettingsRegistration * @type {string} * @memberof UiNodeInputAttributes */ 'onloadTrigger'?: UiNodeInputAttributesOnloadTriggerEnum; /** * The input\'s pattern. * @type {string} * @memberof UiNodeInputAttributes */ 'pattern'?: string; /** * Mark this input field as required. * @type {boolean} * @memberof UiNodeInputAttributes */ 'required'?: boolean; /** * The input\'s element type. text InputAttributeTypeText password InputAttributeTypePassword number InputAttributeTypeNumber checkbox InputAttributeTypeCheckbox hidden InputAttributeTypeHidden email InputAttributeTypeEmail tel InputAttributeTypeTel submit InputAttributeTypeSubmit button InputAttributeTypeButton datetime-local InputAttributeTypeDateTimeLocal date InputAttributeTypeDate url InputAttributeTypeURI * @type {string} * @memberof UiNodeInputAttributes */ 'type': UiNodeInputAttributesTypeEnum; /** * The input\'s value. * @type {any} * @memberof UiNodeInputAttributes */ 'value'?: any | null; } export const UiNodeInputAttributesAutocompleteEnum = { Email: 'email', Tel: 'tel', Url: 'url', CurrentPassword: 'current-password', NewPassword: 'new-password', OneTimeCode: 'one-time-code' } as const; export type UiNodeInputAttributesAutocompleteEnum = typeof UiNodeInputAttributesAutocompleteEnum[keyof typeof UiNodeInputAttributesAutocompleteEnum]; export const UiNodeInputAttributesNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeInputAttributesNodeTypeEnum = typeof UiNodeInputAttributesNodeTypeEnum[keyof typeof UiNodeInputAttributesNodeTypeEnum]; export const UiNodeInputAttributesOnclickTriggerEnum = { OryWebAuthnRegistration: 'oryWebAuthnRegistration', OryWebAuthnLogin: 'oryWebAuthnLogin', OryPasskeyLogin: 'oryPasskeyLogin', OryPasskeyLoginAutocompleteInit: 'oryPasskeyLoginAutocompleteInit', OryPasskeyRegistration: 'oryPasskeyRegistration', OryPasskeySettingsRegistration: 'oryPasskeySettingsRegistration' } as const; export type UiNodeInputAttributesOnclickTriggerEnum = typeof UiNodeInputAttributesOnclickTriggerEnum[keyof typeof UiNodeInputAttributesOnclickTriggerEnum]; export const UiNodeInputAttributesOnloadTriggerEnum = { OryWebAuthnRegistration: 'oryWebAuthnRegistration', OryWebAuthnLogin: 'oryWebAuthnLogin', OryPasskeyLogin: 'oryPasskeyLogin', OryPasskeyLoginAutocompleteInit: 'oryPasskeyLoginAutocompleteInit', OryPasskeyRegistration: 'oryPasskeyRegistration', OryPasskeySettingsRegistration: 'oryPasskeySettingsRegistration' } as const; export type UiNodeInputAttributesOnloadTriggerEnum = typeof UiNodeInputAttributesOnloadTriggerEnum[keyof typeof UiNodeInputAttributesOnloadTriggerEnum]; export const UiNodeInputAttributesTypeEnum = { Text: 'text', Password: 'password', Number: 'number', Checkbox: 'checkbox', Hidden: 'hidden', Email: 'email', Tel: 'tel', Submit: 'submit', Button: 'button', DatetimeLocal: 'datetime-local', Date: 'date', Url: 'url' } as const; export type UiNodeInputAttributesTypeEnum = typeof UiNodeInputAttributesTypeEnum[keyof typeof UiNodeInputAttributesTypeEnum]; /** * This might include a label and other information that can optionally be used to render UIs. * @export * @interface UiNodeMeta */ export interface UiNodeMeta { /** * * @type {UiText} * @memberof UiNodeMeta */ 'label'?: UiText; } /** * * @export * @interface UiNodeScriptAttributes */ export interface UiNodeScriptAttributes { /** * The script async type * @type {boolean} * @memberof UiNodeScriptAttributes */ 'async': boolean; /** * The script cross origin policy * @type {string} * @memberof UiNodeScriptAttributes */ 'crossorigin': string; /** * A unique identifier * @type {string} * @memberof UiNodeScriptAttributes */ 'id': string; /** * The script\'s integrity hash * @type {string} * @memberof UiNodeScriptAttributes */ 'integrity': string; /** * NodeType represents this node\'s types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNodeScriptAttributes */ 'node_type': UiNodeScriptAttributesNodeTypeEnum; /** * Nonce for CSP A nonce you may want to use to improve your Content Security Policy. You do not have to use this value but if you want to improve your CSP policies you may use it. You can also choose to use your own nonce value! * @type {string} * @memberof UiNodeScriptAttributes */ 'nonce': string; /** * The script referrer policy * @type {string} * @memberof UiNodeScriptAttributes */ 'referrerpolicy': string; /** * The script source * @type {string} * @memberof UiNodeScriptAttributes */ 'src': string; /** * The script MIME type * @type {string} * @memberof UiNodeScriptAttributes */ 'type': string; } export const UiNodeScriptAttributesNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeScriptAttributesNodeTypeEnum = typeof UiNodeScriptAttributesNodeTypeEnum[keyof typeof UiNodeScriptAttributesNodeTypeEnum]; /** * * @export * @interface UiNodeTextAttributes */ export interface UiNodeTextAttributes { /** * A unique identifier * @type {string} * @memberof UiNodeTextAttributes */ 'id': string; /** * NodeType represents this node\'s types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"text\". text Text input Input img Image a Anchor script Script * @type {string} * @memberof UiNodeTextAttributes */ 'node_type': UiNodeTextAttributesNodeTypeEnum; /** * * @type {UiText} * @memberof UiNodeTextAttributes */ 'text': UiText; } export const UiNodeTextAttributesNodeTypeEnum = { Text: 'text', Input: 'input', Img: 'img', A: 'a', Script: 'script' } as const; export type UiNodeTextAttributesNodeTypeEnum = typeof UiNodeTextAttributesNodeTypeEnum[keyof typeof UiNodeTextAttributesNodeTypeEnum]; /** * * @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; /** * The message type. info Info error Error success Success * @type {string} * @memberof UiText */ 'type': UiTextTypeEnum; } export const UiTextTypeEnum = { Info: 'info', Error: 'error', Success: 'success' } as const; export type UiTextTypeEnum = typeof UiTextTypeEnum[keyof typeof UiTextTypeEnum]; /** * * @export * @interface UpdateFedcmFlowBody */ export interface UpdateFedcmFlowBody { /** * CSRFToken is the anti-CSRF token. * @type {string} * @memberof UpdateFedcmFlowBody */ 'csrf_token': string; /** * Nonce is the nonce that was used in the `navigator.credentials.get` call. If specified, it must match the `nonce` claim in the token. * @type {string} * @memberof UpdateFedcmFlowBody */ 'nonce'?: string; /** * Token contains the result of `navigator.credentials.get`. * @type {string} * @memberof UpdateFedcmFlowBody */ 'token': string; } /** * Update Identity Body * @export * @interface UpdateIdentityBody */ export interface UpdateIdentityBody { /** * * @type {IdentityWithCredentials} * @memberof UpdateIdentityBody */ 'credentials'?: IdentityWithCredentials; /** * Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/`. * @type {any} * @memberof UpdateIdentityBody */ 'metadata_admin'?: any; /** * Store metadata about the identity which the identity itself can see when calling for example the session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field. * @type {any} * @memberof UpdateIdentityBody */ 'metadata_public'?: any; /** * 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 UpdateIdentityBody */ 'schema_id': string; /** * State is the identity\'s state. active StateActive inactive StateInactive * @type {string} * @memberof UpdateIdentityBody */ 'state': UpdateIdentityBodyStateEnum; /** * 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 UpdateIdentityBody */ 'traits': object; } export const UpdateIdentityBodyStateEnum = { Active: 'active', Inactive: 'inactive' } as const; export type UpdateIdentityBodyStateEnum = typeof UpdateIdentityBodyStateEnum[keyof typeof UpdateIdentityBodyStateEnum]; /** * @type UpdateLoginFlowBody * @export */ export type UpdateLoginFlowBody = { method: 'code' } & UpdateLoginFlowWithCodeMethod | { method: 'identifier_first' } & UpdateLoginFlowWithIdentifierFirstMethod | { method: 'lookup_secret' } & UpdateLoginFlowWithLookupSecretMethod | { method: 'oidc' } & UpdateLoginFlowWithOidcMethod | { method: 'passkey' } & UpdateLoginFlowWithPasskeyMethod | { method: 'password' } & UpdateLoginFlowWithPasswordMethod | { method: 'totp' } & UpdateLoginFlowWithTotpMethod | { method: 'webauthn' } & UpdateLoginFlowWithWebAuthnMethod; /** * Update Login flow using the code method * @export * @interface UpdateLoginFlowWithCodeMethod */ export interface UpdateLoginFlowWithCodeMethod { /** * Address is the address to send the code to, in case that there are multiple addresses. This field is only used in two-factor flows and is ineffective for passwordless flows. * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'address'?: string; /** * Code is the 6 digits code sent to the user * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'code'?: string; /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'csrf_token': string; /** * Identifier is the code identifier The identifier requires that the user has already completed the registration or settings with code flow. * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'identifier'?: string; /** * Method should be set to \"code\" when logging in using the code strategy. * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'method': string; /** * Resend is set when the user wants to resend the code * @type {string} * @memberof UpdateLoginFlowWithCodeMethod */ 'resend'?: string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithCodeMethod */ 'transient_payload'?: object; } /** * Update Login Flow with Multi-Step Method * @export * @interface UpdateLoginFlowWithIdentifierFirstMethod */ export interface UpdateLoginFlowWithIdentifierFirstMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithIdentifierFirstMethod */ 'csrf_token'?: string; /** * Identifier is the email or username of the user trying to log in. * @type {string} * @memberof UpdateLoginFlowWithIdentifierFirstMethod */ 'identifier': string; /** * Method should be set to \"password\" when logging in using the identifier and password strategy. * @type {string} * @memberof UpdateLoginFlowWithIdentifierFirstMethod */ 'method': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithIdentifierFirstMethod */ 'transient_payload'?: object; } /** * Update Login Flow with Lookup Secret Method * @export * @interface UpdateLoginFlowWithLookupSecretMethod */ export interface UpdateLoginFlowWithLookupSecretMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithLookupSecretMethod */ 'csrf_token'?: string; /** * The lookup secret. * @type {string} * @memberof UpdateLoginFlowWithLookupSecretMethod */ 'lookup_secret': string; /** * Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy. * @type {string} * @memberof UpdateLoginFlowWithLookupSecretMethod */ 'method': string; } /** * Update Login Flow with OpenID Connect Method * @export * @interface UpdateLoginFlowWithOidcMethod */ export interface UpdateLoginFlowWithOidcMethod { /** * The CSRF Token * @type {string} * @memberof UpdateLoginFlowWithOidcMethod */ 'csrf_token'?: string; /** * IDToken is an optional id token provided by an OIDC provider If submitted, it is verified using the OIDC provider\'s public key set and the claims are used to populate the OIDC credentials of the identity. If the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use the `traits` field to populate the identity\'s traits. Note, that Apple only includes the users email in the IDToken. Supported providers are Apple Google * @type {string} * @memberof UpdateLoginFlowWithOidcMethod */ 'id_token'?: string; /** * IDTokenNonce is the nonce, used when generating the IDToken. If the provider supports nonce validation, the nonce will be validated against this value and required. * @type {string} * @memberof UpdateLoginFlowWithOidcMethod */ 'id_token_nonce'?: string; /** * Method to use This field must be set to `oidc` when using the oidc method. * @type {string} * @memberof UpdateLoginFlowWithOidcMethod */ 'method': string; /** * The provider to register with * @type {string} * @memberof UpdateLoginFlowWithOidcMethod */ 'provider': string; /** * The identity traits. This is a placeholder for the registration flow. * @type {object} * @memberof UpdateLoginFlowWithOidcMethod */ 'traits'?: object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithOidcMethod */ 'transient_payload'?: object; /** * UpstreamParameters are the parameters that are passed to the upstream identity provider. These parameters are optional and depend on what the upstream identity provider supports. Supported parameters are: `login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session. `hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`. `prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`. * @type {object} * @memberof UpdateLoginFlowWithOidcMethod */ 'upstream_parameters'?: object; } /** * Update Login Flow with Passkey Method * @export * @interface UpdateLoginFlowWithPasskeyMethod */ export interface UpdateLoginFlowWithPasskeyMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithPasskeyMethod */ 'csrf_token'?: string; /** * Method should be set to \"passkey\" when logging in using the Passkey strategy. * @type {string} * @memberof UpdateLoginFlowWithPasskeyMethod */ 'method': string; /** * Login a WebAuthn Security Key This must contain the ID of the WebAuthN connection. * @type {string} * @memberof UpdateLoginFlowWithPasskeyMethod */ 'passkey_login'?: string; } /** * Update Login Flow with Password Method * @export * @interface UpdateLoginFlowWithPasswordMethod */ export interface UpdateLoginFlowWithPasswordMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithPasswordMethod */ 'csrf_token'?: string; /** * Identifier is the email or username of the user trying to log in. * @type {string} * @memberof UpdateLoginFlowWithPasswordMethod */ 'identifier': string; /** * Method should be set to \"password\" when logging in using the identifier and password strategy. * @type {string} * @memberof UpdateLoginFlowWithPasswordMethod */ 'method': string; /** * The user\'s password. * @type {string} * @memberof UpdateLoginFlowWithPasswordMethod */ 'password': string; /** * Identifier is the email or username of the user trying to log in. This field is deprecated! * @type {string} * @memberof UpdateLoginFlowWithPasswordMethod */ 'password_identifier'?: string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithPasswordMethod */ 'transient_payload'?: object; } /** * Update Login Flow with TOTP Method * @export * @interface UpdateLoginFlowWithTotpMethod */ export interface UpdateLoginFlowWithTotpMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithTotpMethod */ 'csrf_token'?: string; /** * Method should be set to \"totp\" when logging in using the TOTP strategy. * @type {string} * @memberof UpdateLoginFlowWithTotpMethod */ 'method': string; /** * The TOTP code. * @type {string} * @memberof UpdateLoginFlowWithTotpMethod */ 'totp_code': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithTotpMethod */ 'transient_payload'?: object; } /** * Update Login Flow with WebAuthn Method * @export * @interface UpdateLoginFlowWithWebAuthnMethod */ export interface UpdateLoginFlowWithWebAuthnMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateLoginFlowWithWebAuthnMethod */ 'csrf_token'?: string; /** * Identifier is the email or username of the user trying to log in. * @type {string} * @memberof UpdateLoginFlowWithWebAuthnMethod */ 'identifier': string; /** * Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy. * @type {string} * @memberof UpdateLoginFlowWithWebAuthnMethod */ 'method': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateLoginFlowWithWebAuthnMethod */ 'transient_payload'?: object; /** * Login a WebAuthn Security Key This must contain the ID of the WebAuthN connection. * @type {string} * @memberof UpdateLoginFlowWithWebAuthnMethod */ 'webauthn_login'?: string; } /** * @type UpdateRecoveryFlowBody * Update Recovery Flow Request Body * @export */ export type UpdateRecoveryFlowBody = { method: 'code' } & UpdateRecoveryFlowWithCodeMethod | { method: 'link' } & UpdateRecoveryFlowWithLinkMethod; /** * Update Recovery Flow with Code Method * @export * @interface UpdateRecoveryFlowWithCodeMethod */ export interface UpdateRecoveryFlowWithCodeMethod { /** * Code from the recovery email If you want to submit a code, use this field, but make sure to _not_ include the email field, as well. * @type {string} * @memberof UpdateRecoveryFlowWithCodeMethod */ 'code'?: string; /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateRecoveryFlowWithCodeMethod */ 'csrf_token'?: string; /** * The email address of the account to recover If the email belongs to a valid account, a recovery email will be sent. If you want to notify the email address if the account does not exist, see the [notify_unknown_recipients flag](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications) If a code was already sent, including this field in the payload will invalidate the sent code and re-send a new code. format: email * @type {string} * @memberof UpdateRecoveryFlowWithCodeMethod */ 'email'?: string; /** * Method is the method that should be used for this recovery flow Allowed values are `link` and `code`. link RecoveryStrategyLink code RecoveryStrategyCode * @type {string} * @memberof UpdateRecoveryFlowWithCodeMethod */ 'method': UpdateRecoveryFlowWithCodeMethodMethodEnum; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRecoveryFlowWithCodeMethod */ 'transient_payload'?: object; } export const UpdateRecoveryFlowWithCodeMethodMethodEnum = { Link: 'link', Code: 'code' } as const; export type UpdateRecoveryFlowWithCodeMethodMethodEnum = typeof UpdateRecoveryFlowWithCodeMethodMethodEnum[keyof typeof UpdateRecoveryFlowWithCodeMethodMethodEnum]; /** * Update Recovery Flow with Link Method * @export * @interface UpdateRecoveryFlowWithLinkMethod */ export interface UpdateRecoveryFlowWithLinkMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateRecoveryFlowWithLinkMethod */ '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 * @type {string} * @memberof UpdateRecoveryFlowWithLinkMethod */ 'email': string; /** * Method is the method that should be used for this recovery flow Allowed values are `link` and `code` link RecoveryStrategyLink code RecoveryStrategyCode * @type {string} * @memberof UpdateRecoveryFlowWithLinkMethod */ 'method': UpdateRecoveryFlowWithLinkMethodMethodEnum; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRecoveryFlowWithLinkMethod */ 'transient_payload'?: object; } export const UpdateRecoveryFlowWithLinkMethodMethodEnum = { Link: 'link', Code: 'code' } as const; export type UpdateRecoveryFlowWithLinkMethodMethodEnum = typeof UpdateRecoveryFlowWithLinkMethodMethodEnum[keyof typeof UpdateRecoveryFlowWithLinkMethodMethodEnum]; /** * @type UpdateRegistrationFlowBody * Update Registration Request Body * @export */ export type UpdateRegistrationFlowBody = { method: 'code' } & UpdateRegistrationFlowWithCodeMethod | { method: 'oidc' } & UpdateRegistrationFlowWithOidcMethod | { method: 'passkey' } & UpdateRegistrationFlowWithPasskeyMethod | { method: 'password' } & UpdateRegistrationFlowWithPasswordMethod | { method: 'profile' } & UpdateRegistrationFlowWithProfileMethod | { method: 'webauthn' } & UpdateRegistrationFlowWithWebAuthnMethod; /** * Update Registration Flow with Code Method * @export * @interface UpdateRegistrationFlowWithCodeMethod */ export interface UpdateRegistrationFlowWithCodeMethod { /** * The OTP Code sent to the user * @type {string} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'code'?: string; /** * The CSRF Token * @type {string} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'csrf_token'?: string; /** * Method to use This field must be set to `code` when using the code method. * @type {string} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'method': string; /** * Resend restarts the flow with a new code * @type {string} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'resend'?: string; /** * The identity\'s traits * @type {object} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithCodeMethod */ 'transient_payload'?: object; } /** * Update Registration Flow with OpenID Connect Method * @export * @interface UpdateRegistrationFlowWithOidcMethod */ export interface UpdateRegistrationFlowWithOidcMethod { /** * The CSRF Token * @type {string} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'csrf_token'?: string; /** * IDToken is an optional id token provided by an OIDC provider If submitted, it is verified using the OIDC provider\'s public key set and the claims are used to populate the OIDC credentials of the identity. If the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use the `traits` field to populate the identity\'s traits. Note, that Apple only includes the users email in the IDToken. Supported providers are Apple Google * @type {string} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'id_token'?: string; /** * IDTokenNonce is the nonce, used when generating the IDToken. If the provider supports nonce validation, the nonce will be validated against this value and is required. * @type {string} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'id_token_nonce'?: string; /** * Method to use This field must be set to `oidc` when using the oidc method. * @type {string} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'method': string; /** * The provider to register with * @type {string} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'provider': string; /** * The identity traits * @type {object} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'traits'?: object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'transient_payload'?: object; /** * UpstreamParameters are the parameters that are passed to the upstream identity provider. These parameters are optional and depend on what the upstream identity provider supports. Supported parameters are: `login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session. `hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`. `prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`. * @type {object} * @memberof UpdateRegistrationFlowWithOidcMethod */ 'upstream_parameters'?: object; } /** * Update Registration Flow with Passkey Method * @export * @interface UpdateRegistrationFlowWithPasskeyMethod */ export interface UpdateRegistrationFlowWithPasskeyMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateRegistrationFlowWithPasskeyMethod */ 'csrf_token'?: string; /** * Method Should be set to \"passkey\" when trying to add, update, or remove a Passkey. * @type {string} * @memberof UpdateRegistrationFlowWithPasskeyMethod */ 'method': string; /** * Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. * @type {string} * @memberof UpdateRegistrationFlowWithPasskeyMethod */ 'passkey_register'?: string; /** * The identity\'s traits * @type {object} * @memberof UpdateRegistrationFlowWithPasskeyMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithPasskeyMethod */ 'transient_payload'?: object; } /** * Update Registration Flow with Password Method * @export * @interface UpdateRegistrationFlowWithPasswordMethod */ export interface UpdateRegistrationFlowWithPasswordMethod { /** * The CSRF Token * @type {string} * @memberof UpdateRegistrationFlowWithPasswordMethod */ 'csrf_token'?: string; /** * Method to use This field must be set to `password` when using the password method. * @type {string} * @memberof UpdateRegistrationFlowWithPasswordMethod */ 'method': string; /** * Password to sign the user up with * @type {string} * @memberof UpdateRegistrationFlowWithPasswordMethod */ 'password': string; /** * The identity\'s traits * @type {object} * @memberof UpdateRegistrationFlowWithPasswordMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithPasswordMethod */ 'transient_payload'?: object; } /** * Update Registration Flow with Profile Method * @export * @interface UpdateRegistrationFlowWithProfileMethod */ export interface UpdateRegistrationFlowWithProfileMethod { /** * The Anti-CSRF Token This token is only required when performing browser flows. * @type {string} * @memberof UpdateRegistrationFlowWithProfileMethod */ 'csrf_token'?: string; /** * Method Should be set to profile when trying to update a profile. * @type {string} * @memberof UpdateRegistrationFlowWithProfileMethod */ 'method': string; /** * Screen requests navigation to a previous screen. This must be set to credential-selection to go back to the credential selection screen. credential-selection RegistrationScreenCredentialSelection nolint:gosec // not a credential previous RegistrationScreenPrevious * @type {string} * @memberof UpdateRegistrationFlowWithProfileMethod */ 'screen'?: UpdateRegistrationFlowWithProfileMethodScreenEnum; /** * Traits The identity\'s traits. * @type {object} * @memberof UpdateRegistrationFlowWithProfileMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithProfileMethod */ 'transient_payload'?: object; } export const UpdateRegistrationFlowWithProfileMethodScreenEnum = { CredentialSelection: 'credential-selection', Previous: 'previous' } as const; export type UpdateRegistrationFlowWithProfileMethodScreenEnum = typeof UpdateRegistrationFlowWithProfileMethodScreenEnum[keyof typeof UpdateRegistrationFlowWithProfileMethodScreenEnum]; /** * Update Registration Flow with WebAuthn Method * @export * @interface UpdateRegistrationFlowWithWebAuthnMethod */ export interface UpdateRegistrationFlowWithWebAuthnMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'csrf_token'?: string; /** * Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. * @type {string} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'method': string; /** * The identity\'s traits * @type {object} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'transient_payload'?: object; /** * Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. * @type {string} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'webauthn_register'?: string; /** * Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. * @type {string} * @memberof UpdateRegistrationFlowWithWebAuthnMethod */ 'webauthn_register_displayname'?: string; } /** * @type UpdateSettingsFlowBody * Update Settings Flow Request Body * @export */ export type UpdateSettingsFlowBody = { method: 'lookup_secret' } & UpdateSettingsFlowWithLookupMethod | { method: 'oidc' } & UpdateSettingsFlowWithOidcMethod | { method: 'passkey' } & UpdateSettingsFlowWithPasskeyMethod | { method: 'password' } & UpdateSettingsFlowWithPasswordMethod | { method: 'profile' } & UpdateSettingsFlowWithProfileMethod | { method: 'totp' } & UpdateSettingsFlowWithTotpMethod | { method: 'webauthn' } & UpdateSettingsFlowWithWebAuthnMethod; /** * Update Settings Flow with Lookup Method * @export * @interface UpdateSettingsFlowWithLookupMethod */ export interface UpdateSettingsFlowWithLookupMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateSettingsFlowWithLookupMethod */ 'csrf_token'?: string; /** * If set to true will save the regenerated lookup secrets * @type {boolean} * @memberof UpdateSettingsFlowWithLookupMethod */ 'lookup_secret_confirm'?: boolean; /** * Disables this method if true. * @type {boolean} * @memberof UpdateSettingsFlowWithLookupMethod */ 'lookup_secret_disable'?: boolean; /** * If set to true will regenerate the lookup secrets * @type {boolean} * @memberof UpdateSettingsFlowWithLookupMethod */ 'lookup_secret_regenerate'?: boolean; /** * If set to true will reveal the lookup secrets * @type {boolean} * @memberof UpdateSettingsFlowWithLookupMethod */ 'lookup_secret_reveal'?: boolean; /** * Method Should be set to \"lookup\" when trying to add, update, or remove a lookup pairing. * @type {string} * @memberof UpdateSettingsFlowWithLookupMethod */ 'method': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithLookupMethod */ 'transient_payload'?: object; } /** * Update Settings Flow with OpenID Connect Method * @export * @interface UpdateSettingsFlowWithOidcMethod */ export interface UpdateSettingsFlowWithOidcMethod { /** * Flow ID is the flow\'s ID. in: query * @type {string} * @memberof UpdateSettingsFlowWithOidcMethod */ 'flow'?: string; /** * Link this provider Either this or `unlink` must be set. type: string in: body * @type {string} * @memberof UpdateSettingsFlowWithOidcMethod */ 'link'?: string; /** * Method Should be set to profile when trying to update a profile. * @type {string} * @memberof UpdateSettingsFlowWithOidcMethod */ 'method': string; /** * The identity\'s traits in: body * @type {object} * @memberof UpdateSettingsFlowWithOidcMethod */ 'traits'?: object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithOidcMethod */ 'transient_payload'?: object; /** * Unlink this provider Either this or `link` must be set. type: string in: body * @type {string} * @memberof UpdateSettingsFlowWithOidcMethod */ 'unlink'?: string; /** * UpstreamParameters are the parameters that are passed to the upstream identity provider. These parameters are optional and depend on what the upstream identity provider supports. Supported parameters are: `login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session. `hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`. `prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`. * @type {object} * @memberof UpdateSettingsFlowWithOidcMethod */ 'upstream_parameters'?: object; } /** * Update Settings Flow with Passkey Method * @export * @interface UpdateSettingsFlowWithPasskeyMethod */ export interface UpdateSettingsFlowWithPasskeyMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateSettingsFlowWithPasskeyMethod */ 'csrf_token'?: string; /** * Method Should be set to \"passkey\" when trying to add, update, or remove a webAuthn pairing. * @type {string} * @memberof UpdateSettingsFlowWithPasskeyMethod */ 'method': string; /** * Remove a WebAuthn Security Key This must contain the ID of the WebAuthN connection. * @type {string} * @memberof UpdateSettingsFlowWithPasskeyMethod */ 'passkey_remove'?: string; /** * Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. * @type {string} * @memberof UpdateSettingsFlowWithPasskeyMethod */ 'passkey_settings_register'?: string; } /** * Update Settings Flow with Password Method * @export * @interface UpdateSettingsFlowWithPasswordMethod */ export interface UpdateSettingsFlowWithPasswordMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateSettingsFlowWithPasswordMethod */ 'csrf_token'?: string; /** * Method Should be set to password when trying to update a password. * @type {string} * @memberof UpdateSettingsFlowWithPasswordMethod */ 'method': string; /** * Password is the updated password * @type {string} * @memberof UpdateSettingsFlowWithPasswordMethod */ 'password': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithPasswordMethod */ 'transient_payload'?: object; } /** * Update Settings Flow with Profile Method * @export * @interface UpdateSettingsFlowWithProfileMethod */ export interface UpdateSettingsFlowWithProfileMethod { /** * The Anti-CSRF Token This token is only required when performing browser flows. * @type {string} * @memberof UpdateSettingsFlowWithProfileMethod */ 'csrf_token'?: string; /** * Method Should be set to profile when trying to update a profile. * @type {string} * @memberof UpdateSettingsFlowWithProfileMethod */ 'method': string; /** * Traits The identity\'s traits. * @type {object} * @memberof UpdateSettingsFlowWithProfileMethod */ 'traits': object; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithProfileMethod */ 'transient_payload'?: object; } /** * Update Settings Flow with TOTP Method * @export * @interface UpdateSettingsFlowWithTotpMethod */ export interface UpdateSettingsFlowWithTotpMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateSettingsFlowWithTotpMethod */ 'csrf_token'?: string; /** * Method Should be set to \"totp\" when trying to add, update, or remove a totp pairing. * @type {string} * @memberof UpdateSettingsFlowWithTotpMethod */ 'method': string; /** * ValidationTOTP must contain a valid TOTP based on the * @type {string} * @memberof UpdateSettingsFlowWithTotpMethod */ 'totp_code'?: string; /** * UnlinkTOTP if true will remove the TOTP pairing, effectively removing the credential. This can be used to set up a new TOTP device. * @type {boolean} * @memberof UpdateSettingsFlowWithTotpMethod */ 'totp_unlink'?: boolean; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithTotpMethod */ 'transient_payload'?: object; } /** * Update Settings Flow with WebAuthn Method * @export * @interface UpdateSettingsFlowWithWebAuthnMethod */ export interface UpdateSettingsFlowWithWebAuthnMethod { /** * CSRFToken is the anti-CSRF token * @type {string} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'csrf_token'?: string; /** * Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. * @type {string} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'method': string; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'transient_payload'?: object; /** * Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. * @type {string} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'webauthn_register'?: string; /** * Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. * @type {string} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'webauthn_register_displayname'?: string; /** * Remove a WebAuthn Security Key This must contain the ID of the WebAuthN connection. * @type {string} * @memberof UpdateSettingsFlowWithWebAuthnMethod */ 'webauthn_remove'?: string; } /** * @type UpdateVerificationFlowBody * Update Verification Flow Request Body * @export */ export type UpdateVerificationFlowBody = { method: 'code' } & UpdateVerificationFlowWithCodeMethod | { method: 'link' } & UpdateVerificationFlowWithLinkMethod; /** * * @export * @interface UpdateVerificationFlowWithCodeMethod */ export interface UpdateVerificationFlowWithCodeMethod { /** * Code from the recovery email If you want to submit a code, use this field, but make sure to _not_ include the email field, as well. * @type {string} * @memberof UpdateVerificationFlowWithCodeMethod */ 'code'?: string; /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateVerificationFlowWithCodeMethod */ 'csrf_token'?: string; /** * The email address to verify If the email belongs to a valid account, a verifiation email will be sent. If you want to notify the email address if the account does not exist, see the [notify_unknown_recipients flag](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#attempted-verification-notifications) If a code was already sent, including this field in the payload will invalidate the sent code and re-send a new code. format: email * @type {string} * @memberof UpdateVerificationFlowWithCodeMethod */ 'email'?: string; /** * Method is the method that should be used for this verification flow Allowed values are `link` and `code`. link VerificationStrategyLink code VerificationStrategyCode * @type {string} * @memberof UpdateVerificationFlowWithCodeMethod */ 'method': UpdateVerificationFlowWithCodeMethodMethodEnum; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateVerificationFlowWithCodeMethod */ 'transient_payload'?: object; } export const UpdateVerificationFlowWithCodeMethodMethodEnum = { Link: 'link', Code: 'code' } as const; export type UpdateVerificationFlowWithCodeMethodMethodEnum = typeof UpdateVerificationFlowWithCodeMethodMethodEnum[keyof typeof UpdateVerificationFlowWithCodeMethodMethodEnum]; /** * Update Verification Flow with Link Method * @export * @interface UpdateVerificationFlowWithLinkMethod */ export interface UpdateVerificationFlowWithLinkMethod { /** * Sending the anti-csrf token is only required for browser login flows. * @type {string} * @memberof UpdateVerificationFlowWithLinkMethod */ '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 * @type {string} * @memberof UpdateVerificationFlowWithLinkMethod */ 'email': string; /** * Method is the method that should be used for this verification flow Allowed values are `link` and `code` link VerificationStrategyLink code VerificationStrategyCode * @type {string} * @memberof UpdateVerificationFlowWithLinkMethod */ 'method': UpdateVerificationFlowWithLinkMethodMethodEnum; /** * Transient data to pass along to any webhooks * @type {object} * @memberof UpdateVerificationFlowWithLinkMethod */ 'transient_payload'?: object; } export const UpdateVerificationFlowWithLinkMethodMethodEnum = { Link: 'link', Code: 'code' } as const; export type UpdateVerificationFlowWithLinkMethodMethodEnum = typeof UpdateVerificationFlowWithLinkMethodMethodEnum[keyof typeof UpdateVerificationFlowWithLinkMethodMethodEnum]; /** * VerifiableAddress is an identity\'s verifiable address * @export * @interface VerifiableIdentityAddress */ export interface VerifiableIdentityAddress { /** * When this entry was created * @type {string} * @memberof VerifiableIdentityAddress */ 'created_at'?: string; /** * The ID * @type {string} * @memberof VerifiableIdentityAddress */ 'id'?: string; /** * VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema * @type {string} * @memberof VerifiableIdentityAddress */ 'status': string; /** * When this entry was last updated * @type {string} * @memberof VerifiableIdentityAddress */ 'updated_at'?: string; /** * The address value example foo@user.com * @type {string} * @memberof VerifiableIdentityAddress */ 'value': string; /** * Indicates if the address has already been verified * @type {boolean} * @memberof VerifiableIdentityAddress */ 'verified': boolean; /** * * @type {string} * @memberof VerifiableIdentityAddress */ 'verified_at'?: string; /** * The delivery method * @type {string} * @memberof VerifiableIdentityAddress */ 'via': VerifiableIdentityAddressViaEnum; } export const VerifiableIdentityAddressViaEnum = { Email: 'email', Sms: 'sms' } as const; export type VerifiableIdentityAddressViaEnum = typeof VerifiableIdentityAddressViaEnum[keyof typeof VerifiableIdentityAddressViaEnum]; /** * 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/self-service/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; /** * ID represents the request\'s unique ID. When performing the verification flow, this represents the id in the verify ui\'s query parameter: http://?request= type: string format: uuid * @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; /** * ReturnTo contains the requested return_to URL. * @type {string} * @memberof VerificationFlow */ 'return_to'?: string; /** * State represents the state of this request: choose_method: ask the user to choose a method (e.g. verify your email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the verification challenge was passed. * @type {any} * @memberof VerificationFlow */ 'state': any; /** * TransientPayload is used to pass data from the verification flow to hooks and email templates * @type {object} * @memberof VerificationFlow */ 'transient_payload'?: object; /** * The flow type can either be `api` or `browser`. * @type {string} * @memberof VerificationFlow */ 'type': string; /** * * @type {UiContainer} * @memberof VerificationFlow */ 'ui': UiContainer; } /** * The experimental state represents the state of a verification flow. This field is EXPERIMENTAL and subject to change! * @export * @enum {string} */ export const VerificationFlowState = { ChooseMethod: 'choose_method', SentEmail: 'sent_email', PassedChallenge: 'passed_challenge' } as const; export type VerificationFlowState = typeof VerificationFlowState[keyof typeof VerificationFlowState]; /** * * @export * @interface Version */ export interface Version { /** * Version is the service\'s version. * @type {string} * @memberof Version */ 'version'?: string; } /** * CourierApi - axios parameter creator * @export */ export const CourierApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Gets a specific messages by the given ID. * @summary Get a Message * @param {string} id MessageID is the ID of the message. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCourierMessage: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCourierMessage', 'id', id) const localVarPath = `/admin/courier/messages/{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; // authentication oryAccessToken required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists all messages by given status and recipient. * @summary List Messages * @param {number} [pageSize] Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {CourierMessageStatus} [status] Status filters out messages based on status. If no value is provided, it doesn\'t take effect on filter. * @param {string} [recipient] Recipient filters out messages based on recipient. If no value is provided, it doesn\'t take effect on filter. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCourierMessages: async (pageSize?: number, pageToken?: string, status?: CourierMessageStatus, recipient?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/courier/messages`; // 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 oryAccessToken required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (pageSize !== undefined) { localVarQueryParameter['page_size'] = pageSize; } if (pageToken !== undefined) { localVarQueryParameter['page_token'] = pageToken; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (recipient !== undefined) { localVarQueryParameter['recipient'] = recipient; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CourierApi - functional programming interface * @export */ export const CourierApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CourierApiAxiosParamCreator(configuration) return { /** * Gets a specific messages by the given ID. * @summary Get a Message * @param {string} id MessageID is the ID of the message. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCourierMessage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCourierMessage(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CourierApi.getCourierMessage']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Lists all messages by given status and recipient. * @summary List Messages * @param {number} [pageSize] Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {CourierMessageStatus} [status] Status filters out messages based on status. If no value is provided, it doesn\'t take effect on filter. * @param {string} [recipient] Recipient filters out messages based on recipient. If no value is provided, it doesn\'t take effect on filter. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listCourierMessages(pageSize?: number, pageToken?: string, status?: CourierMessageStatus, recipient?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listCourierMessages(pageSize, pageToken, status, recipient, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CourierApi.listCourierMessages']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CourierApi - factory interface * @export */ export const CourierApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CourierApiFp(configuration) return { /** * Gets a specific messages by the given ID. * @summary Get a Message * @param {CourierApiGetCourierMessageRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCourierMessage(requestParameters: CourierApiGetCourierMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getCourierMessage(requestParameters.id, options).then((request) => request(axios, basePath)); }, /** * Lists all messages by given status and recipient. * @summary List Messages * @param {CourierApiListCourierMessagesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCourierMessages(requestParameters: CourierApiListCourierMessagesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listCourierMessages(requestParameters.pageSize, requestParameters.pageToken, requestParameters.status, requestParameters.recipient, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getCourierMessage operation in CourierApi. * @export * @interface CourierApiGetCourierMessageRequest */ export interface CourierApiGetCourierMessageRequest { /** * MessageID is the ID of the message. * @type {string} * @memberof CourierApiGetCourierMessage */ readonly id: string } /** * Request parameters for listCourierMessages operation in CourierApi. * @export * @interface CourierApiListCourierMessagesRequest */ export interface CourierApiListCourierMessagesRequest { /** * Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @type {number} * @memberof CourierApiListCourierMessages */ readonly pageSize?: number /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @type {string} * @memberof CourierApiListCourierMessages */ readonly pageToken?: string /** * Status filters out messages based on status. If no value is provided, it doesn\'t take effect on filter. * @type {CourierMessageStatus} * @memberof CourierApiListCourierMessages */ readonly status?: CourierMessageStatus /** * Recipient filters out messages based on recipient. If no value is provided, it doesn\'t take effect on filter. * @type {string} * @memberof CourierApiListCourierMessages */ readonly recipient?: string } /** * CourierApi - object-oriented interface * @export * @class CourierApi * @extends {BaseAPI} */ export class CourierApi extends BaseAPI { /** * Gets a specific messages by the given ID. * @summary Get a Message * @param {CourierApiGetCourierMessageRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CourierApi */ public getCourierMessage(requestParameters: CourierApiGetCourierMessageRequest, options?: RawAxiosRequestConfig) { return CourierApiFp(this.configuration).getCourierMessage(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); } /** * Lists all messages by given status and recipient. * @summary List Messages * @param {CourierApiListCourierMessagesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CourierApi */ public listCourierMessages(requestParameters: CourierApiListCourierMessagesRequest = {}, options?: RawAxiosRequestConfig) { return CourierApiFp(this.configuration).listCourierMessages(requestParameters.pageSize, requestParameters.pageToken, requestParameters.status, requestParameters.recipient, options).then((request) => request(this.axios, this.basePath)); } } /** * FrontendApi - axios parameter creator * @export */ export const FrontendApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it 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. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! The optional query parameter login_challenge is set when using Kratos with Hydra in an OAuth2 flow. See the oauth2_provider.url configuration option. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). * @summary Create Login Flow for Browsers * @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 {string} [aal] Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session\'s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session\'s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {string} [loginChallenge] An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). * @param {string} [organization] An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. * @param {string} [via] Via should contain the identity\'s credential the code should be sent to. Only relevant in aal2 flows. DEPRECATED: This field is deprecated. Please remove it from your requests. The user will now see a choice of MFA credentials to choose from to perform the second factor instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserLoginFlow: async (refresh?: boolean, aal?: string, returnTo?: string, cookie?: string, loginChallenge?: string, organization?: string, via?: string, options: RawAxiosRequestConfig = {}): 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; if (refresh !== undefined) { localVarQueryParameter['refresh'] = refresh; } if (aal !== undefined) { localVarQueryParameter['aal'] = aal; } if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (loginChallenge !== undefined) { localVarQueryParameter['login_challenge'] = loginChallenge; } if (organization !== undefined) { localVarQueryParameter['organization'] = organization; } if (via !== undefined) { localVarQueryParameter['via'] = via; } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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 logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies. * @summary Create a Logout URL for Browsers * @param {string} [cookie] HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. * @param {string} [returnTo] Return to URL The URL to which the browser should be redirected to after the logout has been performed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserLogoutFlow: async (cookie?: string, returnTo?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/self-service/logout/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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (cookie != null) { localVarHeaderParameter['cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). * @summary Create Recovery Flow for Browsers * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserRecoveryFlow: async (returnTo?: string, options: RawAxiosRequestConfig = {}): 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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it 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`. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). * @summary Create Registration Flow for Browsers * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {string} [loginChallenge] Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. * @param {string} [afterVerificationReturnTo] The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. * @param {string} [organization] An optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserRegistrationFlow: async (returnTo?: string, loginChallenge?: string, afterVerificationReturnTo?: string, organization?: string, options: RawAxiosRequestConfig = {}): 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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (loginChallenge !== undefined) { localVarQueryParameter['login_challenge'] = loginChallenge; } if (afterVerificationReturnTo !== undefined) { localVarQueryParameter['after_verification_return_to'] = afterVerificationReturnTo; } if (organization !== undefined) { localVarQueryParameter['organization'] = organization; } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). * @summary Create Settings Flow for Browsers * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserSettingsFlow: async (returnTo?: string, cookie?: string, options: RawAxiosRequestConfig = {}): 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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. 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/self-service/flows/verify-email-account-activation). * @summary Create Verification Flow for Browser Clients * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBrowserVerificationFlow: async (returnTo?: string, options: RawAxiosRequestConfig = {}): 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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint returns a list of all available FedCM providers. It is only supported on the Ory Network. * @summary Get FedCM Parameters * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFedcmFlow: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/self-service/fed-cm/parameters`; // 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); 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 native apps that do not use a browser, 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=`. 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. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. 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](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). * @summary Create Login Flow for Native Apps * @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 {string} [aal] Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session\'s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session\'s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow. * @param {boolean} [returnSessionTokenExchangeCode] EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {string} [organization] An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. * @param {string} [via] Via should contain the identity\'s credential the code should be sent to. Only relevant in aal2 flows. DEPRECATED: This field is deprecated. Please remove it from your requests. The user will now see a choice of MFA credentials to choose from to perform the second factor instead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNativeLoginFlow: async (refresh?: boolean, aal?: string, xSessionToken?: string, returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, via?: string, options: RawAxiosRequestConfig = {}): 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; } if (aal !== undefined) { localVarQueryParameter['aal'] = aal; } if (returnSessionTokenExchangeCode !== undefined) { localVarQueryParameter['return_session_token_exchange_code'] = returnSessionTokenExchangeCode; } if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (organization !== undefined) { localVarQueryParameter['organization'] = organization; } if (via !== undefined) { localVarQueryParameter['via'] = via; } if (xSessionToken != null) { localVarHeaderParameter['X-Session-Token'] = String(xSessionToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. 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). * @summary Create Recovery Flow for Native Apps * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNativeRecoveryFlow: async (options: RawAxiosRequestConfig = {}): 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); 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=`. 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. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. 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](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). * @summary Create Registration Flow for Native Apps * @param {boolean} [returnSessionTokenExchangeCode] EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. * @param {string} [returnTo] The URL to return the browser to after the flow was completed. * @param {string} [organization] An optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNativeRegistrationFlow: async (returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, options: RawAxiosRequestConfig = {}): 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; if (returnSessionTokenExchangeCode !== undefined) { localVarQueryParameter['return_session_token_exchange_code'] = returnSessionTokenExchangeCode; } if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } if (organization !== undefined) { localVarQueryParameter['organization'] = organization; } setSearchParams(localVarUrlObj, localVarQueryParameter); 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=`. 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. 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 Create Settings Flow for Native Apps * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNativeSettingsFlow: async (xSessionToken?: string, options: RawAxiosRequestConfig = {}): 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; if (xSessionToken != null) { localVarHeaderParameter['X-Session-Token'] = String(xSessionToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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=`. 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 Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). * @summary Create Verification Flow for Native Apps * @param {string} [returnTo] A URL contained in the return_to key of the verification flow. This piece of data has no effect on the actual logic of the flow and is purely informational. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createNativeVerificationFlow: async (returnTo?: string, options: RawAxiosRequestConfig = {}): 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; if (returnTo !== undefined) { localVarQueryParameter['return_to'] = returnTo; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted. * @summary Disable my other sessions * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. * @param {string} [cookie] Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ disableMyOtherSessions: async (xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { 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; if (xSessionToken != null) { localVarHeaderParameter['X-Session-Token'] = String(xSessionToken); } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted. * @summary Disable one of my sessions * @param {string} id ID is the session\'s ID. * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. * @param {string} [cookie] Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ disableMySession: async (id: string, xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('disableMySession', 'id', id) const localVarPath = `/sessions/{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; if (xSessionToken != null) { localVarHeaderParameter['X-Session-Token'] = String(xSessionToken); } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Exchange Session Token * @param {string} initCode The part of the code return when initializing the flow. * @param {string} returnToCode The part of the code returned by the return_to URL. * @param {*} [options] Override http request option. * @throws {RequiredError} */ exchangeSessionToken: async (initCode: string, returnToCode: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'initCode' is not null or undefined assertParamExists('exchangeSessionToken', 'initCode', initCode) // verify required parameter 'returnToCode' is not null or undefined assertParamExists('exchangeSessionToken', 'returnToCode', returnToCode) const localVarPath = `/sessions/token-exchange`; // 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 (initCode !== undefined) { localVarQueryParameter['init_code'] = initCode; } if (returnToCode !== undefined) { localVarQueryParameter['return_to_code'] = returnToCode; } setSearchParams(localVarUrlObj, localVarQueryParameter); 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: `?id=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-Flow Errors * @param {string} id Error is the error\'s ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFlowError: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getFlowError', 'id', id) 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 (id !== undefined) { localVarQueryParameter['id'] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. Browser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get(\'/login\', async function (req, res) { const flow = await client.getLoginFlow(req.header(\'cookie\'), req.query[\'flow\']) res.render(\'login\', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/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 {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLoginFlow: async (id: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getLoginFlow', '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; } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. Browser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get(\'/recovery\', async function (req, res) { const flow = await client.getRecoveryFlow(req.header(\'Cookie\'), req.query[\'flow\']) res.render(\'recovery\', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). * @summary Get 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 {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRecoveryFlow: async (id: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getRecoveryFlow', '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; } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. Browser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get(\'/registration\', async function (req, res) { const flow = await client.getRegistrationFlow(req.header(\'cookie\'), req.query[\'flow\']) res.render(\'registration\', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/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 {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRegistrationFlow: async (id: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getRegistrationFlow', '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; } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos\' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. 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 {string} [xSessionToken] The Session Token When using the SDK in an app without a browser, please include the session token here. * @param {string} [cookie] HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSettingsFlow: async (id: string, xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSettingsFlow', '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; if (id !== undefined) { localVarQueryParameter['id'] = id; } if (xSessionToken != null) { localVarHeaderParameter['X-Session-Token'] = String(xSessionToken); } if (cookie != null) { localVarHeaderParameter['Cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); 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. Browser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get(\'/recovery\', async function (req, res) { const flow = await client.getVerificationFlow(req.header(\'cookie\'), req.query[\'flow\']) res.render(\'verification\', flow) }) ``` More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/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 {string} [cookie] HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVerificationFlow: async (id: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getVerificationFlow', '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; } if (cookie != null) { localVarHeaderParameter['cookie'] = String(cookie); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html