/* tslint:disable */
/* eslint-disable */
/**
 * Ory APIs
 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.  ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages:  | Language       | Download SDK                                                     | Documentation                                                                        | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart           | [pub.dev](https://pub.dev/packages/ory_client)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md)       | | .NET           | [nuget.org](https://www.nuget.org/packages/Ory.Client/)          | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md)     | | Elixir         | [hex.pm](https://hex.pm/packages/ory_client)                     | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md)     | | Go             | [github.com](https://github.com/ory/client-go)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md)         | | Java           | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md)       | | JavaScript     | [npmjs.com](https://www.npmjs.com/package/@ory/client)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) |  | PHP            | [packagist.org](https://packagist.org/packages/ory/client)       | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md)        | | Python         | [pypi.org](https://pypi.org/project/ory-client/)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md)     | | Ruby           | [rubygems.org](https://rubygems.org/gems/ory-client)             | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md)       | | Rust           | [crates.io](https://crates.io/crates/ory-client)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md)       | 
 *
 * The version of the OpenAPI document: v1.22.37
 * Contact: support@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';

/**
 * Contains information on an device verification
 */
export interface AcceptDeviceUserCodeRequest {
    'user_code'?: string;
}
export interface AcceptOAuth2ConsentRequest {
    'context'?: object;
    /**
     * GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.
     */
    'grant_access_token_audience'?: Array<string>;
    /**
     * GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`.
     */
    'grant_scope'?: Array<string>;
    /**
     * Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
     */
    'remember'?: boolean;
    /**
     * RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.
     */
    'remember_for'?: number;
    'session'?: AcceptOAuth2ConsentRequestSession;
}
export interface AcceptOAuth2ConsentRequestSession {
    /**
     * AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
     */
    'access_token'?: any;
    /**
     * IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session\'id payloads are readable by anyone that has access to the ID Challenge. Use with care!
     */
    'id_token'?: any;
}
export interface AcceptOAuth2LoginRequest {
    /**
     * ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two-factor authentication.
     */
    'acr'?: string;
    /**
     * AMR sets the Authentication Methods References value for this authentication session. You can use it to specify the method a user used to authenticate. For example, if the acr indicates a user used two-factor authentication, the amr can express they used a software-secured key.
     */
    'amr'?: Array<string>;
    'context'?: object;
    /**
     * Extend OAuth2 authentication session lifespan  If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously.  This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.
     */
    'extend_session_lifespan'?: boolean;
    /**
     * ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client.  Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection.  Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client\'s configuration).  Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value).  If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.
     */
    'force_subject_identifier'?: string;
    /**
     * IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.
     */
    'identity_provider_session_id'?: string;
    /**
     * Remember, if set to true, tells Ory Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, they will not be asked to log in again.
     */
    'remember'?: boolean;
    /**
     * RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).
     */
    'remember_for'?: number;
    /**
     * Subject is the user ID of the end-user that authenticated.
     */
    'subject': string;
}
export interface AccountExperienceColors {
    'ax_background_default'?: string;
    'brand_100'?: string;
    'brand_200'?: string;
    'brand_300'?: string;
    'brand_400'?: string;
    'brand_50'?: string;
    'brand_500'?: string;
    'brand_600'?: string;
    'brand_700'?: string;
    'brand_800'?: string;
    'brand_900'?: string;
    'brand_950'?: string;
    'button_identifier_background_default'?: string;
    'button_identifier_background_hover'?: string;
    'button_identifier_border_border_default'?: string;
    'button_identifier_border_border_hover'?: string;
    'button_identifier_foreground_default'?: string;
    'button_identifier_foreground_hover'?: string;
    'button_link_brand_brand'?: string;
    'button_link_brand_brand_hover'?: string;
    'button_link_default_primary'?: string;
    'button_link_default_primary_hover'?: string;
    'button_link_default_secondary'?: string;
    'button_link_default_secondary_hover'?: string;
    'button_link_disabled_disabled'?: string;
    'button_primary_background_default'?: string;
    'button_primary_background_disabled'?: string;
    'button_primary_background_hover'?: string;
    'button_primary_border_default'?: string;
    'button_primary_border_disabled'?: string;
    'button_primary_border_hover'?: string;
    'button_primary_foreground_default'?: string;
    'button_primary_foreground_disabled'?: string;
    'button_primary_foreground_hover'?: string;
    'button_secondary_background_default'?: string;
    'button_secondary_background_disabled'?: string;
    'button_secondary_background_hover'?: string;
    'button_secondary_border_default'?: string;
    'button_secondary_border_disabled'?: string;
    'button_secondary_border_hover'?: string;
    'button_secondary_foreground_default'?: string;
    'button_secondary_foreground_disabled'?: string;
    'button_secondary_foreground_hover'?: string;
    'button_social_background_default'?: string;
    'button_social_background_disabled'?: string;
    'button_social_background_generic_provider'?: string;
    'button_social_background_hover'?: string;
    'button_social_border_default'?: string;
    'button_social_border_disabled'?: string;
    'button_social_border_generic_provider'?: string;
    'button_social_border_hover'?: string;
    'button_social_foreground_default'?: string;
    'button_social_foreground_disabled'?: string;
    'button_social_foreground_generic_provider'?: string;
    'button_social_foreground_hover'?: string;
    'checkbox_background_checked'?: string;
    'checkbox_background_default'?: string;
    'checkbox_border_checkbox_border_checked'?: string;
    'checkbox_border_checkbox_border_default'?: string;
    'checkbox_foreground_checked'?: string;
    'checkbox_foreground_default'?: string;
    'form_background_default'?: string;
    'form_border_default'?: string;
    'input_background_default'?: string;
    'input_background_disabled'?: string;
    'input_background_hover'?: string;
    'input_border_default'?: string;
    'input_border_disabled'?: string;
    'input_border_focus'?: string;
    'input_border_hover'?: string;
    'input_foreground_disabled'?: string;
    'input_foreground_primary'?: string;
    'input_foreground_secondary'?: string;
    'input_foreground_tertiary'?: string;
    'interface_background_brand_primary'?: string;
    'interface_background_brand_primary_hover'?: string;
    'interface_background_brand_secondary'?: string;
    'interface_background_brand_secondary_hover'?: string;
    'interface_background_default_inverted'?: string;
    'interface_background_default_inverted_hover'?: string;
    'interface_background_default_none'?: string;
    'interface_background_default_primary'?: string;
    'interface_background_default_primary_hover'?: string;
    'interface_background_default_secondary'?: string;
    'interface_background_default_secondary_hover'?: string;
    'interface_background_default_tertiary'?: string;
    'interface_background_default_tertiary_hover'?: string;
    'interface_background_disabled_disabled'?: string;
    'interface_background_validation_danger'?: string;
    'interface_background_validation_success'?: string;
    'interface_background_validation_warning'?: string;
    'interface_border_brand_brand'?: string;
    'interface_border_default_inverted'?: string;
    'interface_border_default_none'?: string;
    'interface_border_default_primary'?: string;
    'interface_border_disabled_disabled'?: string;
    'interface_border_validation_danger'?: string;
    'interface_border_validation_success'?: string;
    'interface_border_validation_warning'?: string;
    'interface_foreground_brand_on_primary'?: string;
    'interface_foreground_brand_on_secondary'?: string;
    'interface_foreground_brand_primary'?: string;
    'interface_foreground_brand_secondary'?: string;
    'interface_foreground_default_inverted'?: string;
    'interface_foreground_default_primary'?: string;
    'interface_foreground_default_secondary'?: string;
    'interface_foreground_default_tertiary'?: string;
    'interface_foreground_disabled_disabled'?: string;
    'interface_foreground_disabled_on_disabled'?: string;
    'interface_foreground_validation_danger'?: string;
    'interface_foreground_validation_success'?: string;
    'interface_foreground_validation_warning'?: string;
    'ory_background_default'?: string;
    'ory_border_default'?: string;
    'ory_foreground_default'?: string;
    'radio_background_checked'?: string;
    'radio_background_default'?: string;
    'radio_border_checked'?: string;
    'radio_border_default'?: string;
    'radio_foreground_checked'?: string;
    'radio_foreground_default'?: string;
    'toggle_background_checked'?: string;
    'toggle_background_default'?: string;
    'toggle_border_checked'?: string;
    'toggle_border_default'?: string;
    'toggle_foreground_checked'?: string;
    'toggle_foreground_default'?: string;
    'ui_100'?: string;
    'ui_200'?: string;
    'ui_300'?: string;
    'ui_400'?: string;
    'ui_50'?: string;
    'ui_500'?: string;
    'ui_600'?: string;
    'ui_700'?: string;
    'ui_800'?: string;
    'ui_900'?: string;
    'ui_950'?: string;
    'ui_black'?: string;
    'ui_danger'?: string;
    'ui_success'?: string;
    'ui_transparent'?: string;
    'ui_warning'?: string;
    'ui_white'?: string;
}
export interface AccountExperienceConfiguration {
    'default_locale': string;
    'default_redirect_url': string;
    'enabled_locales': Array<string>;
    'error_ui_url': string;
    'favicon_dark_url'?: string;
    'favicon_light_url'?: string;
    /**
     *  force_default AccountExperienceLocaleBehaviorForceDefault respect_accept_language AccountExperienceLocaleBehaviorRespectAcceptLanguage
     */
    'locale_behavior': AccountExperienceConfigurationLocaleBehaviorEnum;
    'login_ui_url': string;
    'logo_dark_url'?: string;
    'logo_light_url'?: string;
    'name': string;
    'recovery_enabled': boolean;
    'recovery_ui_url': string;
    'registration_enabled': boolean;
    'registration_ui_url': string;
    'settings_ui_url': string;
    'stylesheet'?: string;
    'translations': Array<RevisionAccountExperienceCustomTranslation>;
    'verification_enabled': boolean;
    'verification_ui_url': string;
}

export const AccountExperienceConfigurationLocaleBehaviorEnum = {
    ForceDefault: 'force_default',
    RespectAcceptLanguage: 'respect_accept_language',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type AccountExperienceConfigurationLocaleBehaviorEnum = typeof AccountExperienceConfigurationLocaleBehaviorEnum[keyof typeof AccountExperienceConfigurationLocaleBehaviorEnum];

export interface AddProjectToWorkspaceBody {
    /**
     * The environment of the project in the workspace. Can be one of \"prod\" or \"dev\". Note that the number of projects in the \"prod\" environment is limited depending on the subscription. prod Production stage Staging dev Development
     */
    'environment': AddProjectToWorkspaceBodyEnvironmentEnum;
    /**
     * The action to take with the project subscription. Can be one of \"migrate\", and \"ignore\". \"migrate\" will migrate the project subscription to the workspace. \"ignore\" will ignore the project subscription. migrate ProjectSubscriptionActionMigrate  ProjectSubscriptionActionMigrate will migrate the project subscription to the  workspace. ignore ProjectSubscriptionActionIgnore  ProjectSubscriptionActionIgnore will ignore the project subscription.
     */
    'project_subscription': AddProjectToWorkspaceBodyProjectSubscriptionEnum;
}

export const AddProjectToWorkspaceBodyEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type AddProjectToWorkspaceBodyEnvironmentEnum = typeof AddProjectToWorkspaceBodyEnvironmentEnum[keyof typeof AddProjectToWorkspaceBodyEnvironmentEnum];
export const AddProjectToWorkspaceBodyProjectSubscriptionEnum = {
    Migrate: 'migrate',
    Ignore: 'ignore',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type AddProjectToWorkspaceBodyProjectSubscriptionEnum = typeof AddProjectToWorkspaceBodyProjectSubscriptionEnum[keyof typeof AddProjectToWorkspaceBodyProjectSubscriptionEnum];

/**
 * Create Identity and Import Lookup Secret Credentials
 */
export interface AdminIdentityImportCredentialsLookupSecret {
    'config'?: AdminIdentityImportCredentialsLookupSecretConfig;
}
/**
 * Create Identity and Import Lookup Secret Credentials Configuration
 */
export interface AdminIdentityImportCredentialsLookupSecretConfig {
    /**
     * Codes is a list of \"lookup secret\" codes configured for the user.
     */
    'codes'?: Array<IdentityCredentialsLookupSecretCode>;
}
export interface Attribute {
    'key'?: string;
    'value'?: string;
}
export interface AttributeFilter {
    'attribute'?: string;
    'condition'?: AttributeFilterConditionEnum;
    'value'?: string;
}

export const AttributeFilterConditionEnum = {
    Equals: 'equals',
    NotEquals: 'not_equals',
    Contains: 'contains',
    NotContains: 'not_contains',
    Regex: 'regex',
    NotRegex: 'not_regex',
    Set: 'set',
    NotSet: 'not_set',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type AttributeFilterConditionEnum = typeof AttributeFilterConditionEnum[keyof typeof AttributeFilterConditionEnum];

export interface AttributesCountDatapoint {
    /**
     * Count of the attribute value for given key
     */
    'count': number;
    /**
     * Name of the attribute value for given key
     */
    'name': string;
}
/**
 * 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.com/kratos/docs/concepts/credentials
 */

export const AuthenticatorAssuranceLevel = {
    Aal0: 'aal0',
    Aal1: 'aal1',
    Aal2: 'aal2',
    Aal3: 'aal3',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type AuthenticatorAssuranceLevel = typeof AuthenticatorAssuranceLevel[keyof typeof AuthenticatorAssuranceLevel];


export interface BasicOrganization {
    /**
     * The list of organization\'s domains.
     */
    'domains': Array<string>;
    /**
     * The organization\'s ID.
     */
    'id': string;
    /**
     * The organization\'s human-readable label.
     */
    'label': string;
}
/**
 * Batch Check Permission Body
 */
export interface BatchCheckPermissionBody {
    'tuples'?: Array<Relationship>;
}
/**
 * Batch Check Permission Result
 */
export interface BatchCheckPermissionResult {
    /**
     * An array of check results. The order aligns with the input order.
     */
    'results': Array<CheckPermissionResultWithError>;
}
/**
 * Patch identities response
 */
export interface BatchPatchIdentitiesResponse {
    /**
     * The patch responses for the individual identities.
     */
    'identities'?: Array<IdentityPatchResponse>;
}
export interface BillingPeriodBucket {
    'base_invoices'?: Array<Invoice>;
    'billing_period'?: TimeInterval;
    'usage_invoice'?: Invoice;
}
export interface CheckOplSyntaxResult {
    /**
     * The list of syntax errors
     */
    'errors'?: Array<ParseError>;
}
/**
 * The content of the allowed field is mirrored in the HTTP status code.
 */
export interface CheckPermissionResult {
    /**
     * whether the relation tuple is allowed
     */
    'allowed': boolean;
}
/**
 * Check Permission Result With Error
 */
export interface CheckPermissionResultWithError {
    /**
     * whether the relation tuple is allowed
     */
    'allowed': boolean;
    /**
     * any error generated while checking the relation tuple
     */
    'error'?: string;
}
export interface CloudAccount {
    /**
     * BreakGlass is true when the identity\'s recovery address has break-glass recovery enabled for the identity\'s current organization.
     */
    'break_glass'?: boolean;
    'email': string;
    'email_verified': boolean;
    'id': string;
    'name': string;
    'organization_id'?: string | null;
}
/**
 * Control API consistency guarantees
 */
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.
     */
    'consistency'?: ConsistencyRequestParametersConsistencyEnum;
}

export const ConsistencyRequestParametersConsistencyEnum = {
    Empty: '',
    Strong: 'strong',
    Eventual: 'eventual',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ConsistencyRequestParametersConsistencyEnum = typeof ConsistencyRequestParametersConsistencyEnum[keyof typeof ConsistencyRequestParametersConsistencyEnum];

/**
 * @type ContinueWith
 */
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 {
    /**
     * Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString
     */
    'action': ContinueWithRecoveryUiActionEnum;
    'flow': ContinueWithRecoveryUiFlow;
}

export const ContinueWithRecoveryUiActionEnum = {
    ShowRecoveryUi: 'show_recovery_ui',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ContinueWithRecoveryUiActionEnum = typeof ContinueWithRecoveryUiActionEnum[keyof typeof ContinueWithRecoveryUiActionEnum];

export interface ContinueWithRecoveryUiFlow {
    /**
     * The ID of the recovery flow
     */
    '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.
     */
    'url'?: string;
}
/**
 * Indicates, that the UI flow could be continued by showing a recovery ui
 */
export interface ContinueWithRedirectBrowserTo {
    /**
     * Action will always be `redirect_browser_to` redirect_browser_to ContinueWithActionRedirectBrowserToString
     */
    'action': ContinueWithRedirectBrowserToActionEnum;
    /**
     * The URL to redirect the browser to
     */
    'redirect_browser_to': string;
}

export const ContinueWithRedirectBrowserToActionEnum = {
    RedirectBrowserTo: 'redirect_browser_to',
    UnknownDefaultOpenApi: '11184809'
} 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 {
    /**
     * Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString
     */
    'action': ContinueWithSetOrySessionTokenActionEnum;
    /**
     * Token is the token of the session
     */
    'ory_session_token': string;
}

export const ContinueWithSetOrySessionTokenActionEnum = {
    SetOrySessionToken: 'set_ory_session_token',
    UnknownDefaultOpenApi: '11184809'
} 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 {
    /**
     * Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString
     */
    'action': ContinueWithSettingsUiActionEnum;
    'flow': ContinueWithSettingsUiFlow;
}

export const ContinueWithSettingsUiActionEnum = {
    ShowSettingsUi: 'show_settings_ui',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ContinueWithSettingsUiActionEnum = typeof ContinueWithSettingsUiActionEnum[keyof typeof ContinueWithSettingsUiActionEnum];

export interface ContinueWithSettingsUiFlow {
    /**
     * The ID of the settings flow
     */
    '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.
     */
    'url'?: string;
}
/**
 * Indicates, that the UI flow could be continued by showing a verification ui
 */
export interface ContinueWithVerificationUi {
    /**
     * Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString
     */
    'action': ContinueWithVerificationUiActionEnum;
    'flow': ContinueWithVerificationUiFlow;
}

export const ContinueWithVerificationUiActionEnum = {
    ShowVerificationUi: 'show_verification_ui',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ContinueWithVerificationUiActionEnum = typeof ContinueWithVerificationUiActionEnum[keyof typeof ContinueWithVerificationUiActionEnum];

export interface ContinueWithVerificationUiFlow {
    /**
     * The ID of the verification flow
     */
    '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.
     */
    'url'?: string;
    /**
     * The address that should be verified in this flow
     */
    'verifiable_address': string;
}
/**
 * A Message\'s Status
 */

export const CourierMessageStatus = {
    Queued: 'queued',
    Sent: 'sent',
    Processing: 'processing',
    Abandoned: 'abandoned',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CourierMessageStatus = typeof CourierMessageStatus[keyof typeof CourierMessageStatus];


/**
 * It can either be `email` or `phone`
 */

export const CourierMessageType = {
    Email: 'email',
    Phone: 'phone',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CourierMessageType = typeof CourierMessageType[keyof typeof CourierMessageType];


/**
 * Create Custom Hostname Request Body
 */
export interface CreateCustomDomainBody {
    /**
     * The domain where cookies will be set. Has to be a parent domain of the custom hostname to work.
     */
    'cookie_domain'?: string;
    /**
     * CORS Allowed origins for the custom hostname.
     */
    'cors_allowed_origins'?: Array<string>;
    /**
     * CORS Enabled for the custom hostname.
     */
    'cors_enabled'?: boolean;
    /**
     * The base URL where the custom user interface will be exposed.
     */
    'custom_ui_base_url'?: string;
    /**
     * The custom hostname where the API will be exposed.
     */
    'hostname'?: string;
}
/**
 * Create Event Stream Request Body
 */
export interface CreateEventStreamBody {
    /**
     * The HTTPS endpoint URL to send events to. Required if type is https.
     */
    'https_endpoint'?: string;
    /**
     * The AWS IAM role ARN to assume when publishing to the SNS topic. Required if type is sns.
     */
    'role_arn'?: string;
    /**
     * The AWS SNS topic ARN. Required if type is sns.
     */
    'topic_arn'?: string;
    /**
     * The type of the event stream (AWS SNS or HTTPS webhook).
     */
    'type': CreateEventStreamBodyTypeEnum;
}

export const CreateEventStreamBodyTypeEnum = {
    Sns: 'sns',
    Https: 'https',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateEventStreamBodyTypeEnum = typeof CreateEventStreamBodyTypeEnum[keyof typeof CreateEventStreamBodyTypeEnum];

/**
 * Contains a list of all available FedCM providers.
 */
export interface CreateFedcmFlowResponse {
    'csrf_token'?: string;
    'providers'?: Array<Provider>;
}
/**
 * Create Identity Body
 */
export interface CreateIdentityBody {
    'credentials'?: IdentityWithCredentials;
    /**
     * ExternalID is an optional external ID of the identity. This is used to link the identity to an external system. If set, the external ID must be unique across all identities.
     */
    'external_id'?: string;
    /**
     * Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/<id>`.
     */
    '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.
     */
    'metadata_public'?: any;
    '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.
     */
    'recovery_addresses'?: Array<RecoveryIdentityAddress>;
    /**
     * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits.
     */
    'schema_id': string;
    /**
     * State is the identity\'s state. active StateActive inactive StateInactive
     */
    '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`.
     */
    '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.
     */
    'verifiable_addresses'?: Array<VerifiableIdentityAddress>;
}

export const CreateIdentityBodyStateEnum = {
    Active: 'active',
    Inactive: 'inactive',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateIdentityBodyStateEnum = typeof CreateIdentityBodyStateEnum[keyof typeof CreateIdentityBodyStateEnum];

export interface CreateInviteResponse {
    /**
     * A list of all invites for this resource
     */
    'all_invites': Array<MemberInvite>;
    'created_invite': MemberInvite;
}
/**
 * Create JSON Web Key Set Request Body
 */
export interface CreateJsonWebKeySet {
    /**
     * JSON Web Key Algorithm  The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.
     */
    'alg': string;
    /**
     * JSON Web Key ID  The Key ID of the key to be created.
     */
    'kid': string;
    /**
     * JSON Web Key Use  The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\".
     */
    'use': string;
}
export interface CreateOnboardingLinkResponse {
    /**
     * The onboarding to redirect the user to for organization setup.
     */
    'onboarding_portal_token': string;
}
export interface CreateOrganizationOnboardingPortalLinkBody {
    /**
     * AppleMapper specifies the JSONNet code snippet which uses Apple\'s profile information to hydrate the identity\'s data.
     */
    'apple_mapper_url'?: string;
    /**
     * Auth0Mapper specifies the JSONNet code snippet which uses Auth0\'s profile information to hydrate the identity\'s data.
     */
    'auth0_mapper_url'?: string;
    'custom_hostname_id'?: string | null;
    /**
     * Feature flag to enable SCIM configuration
     */
    'enable_scim': boolean;
    /**
     * Feature flag to enable SSO configuration
     */
    'enable_sso': boolean;
    'expires_at'?: string;
    /**
     * FacebookMapper specifies the JSONNet code snippet which uses Facebook\'s profile information to hydrate the identity\'s data.
     */
    'facebook_mapper_url'?: string;
    /**
     * GenericOIDCMapper specifies the JSONNet code snippet which uses the OIDC Provider\'s profile information to hydrate the identity\'s data.
     */
    'generic_oidc_mapper_url'?: string;
    /**
     * GithubMapper specifies the JSONNet code snippet which uses GitHub\'s profile information to hydrate the identity\'s data.
     */
    'github_mapper_url'?: string;
    /**
     * GitLabMapper specifies the JSONNet code snippet which uses GitLab\'s profile information to hydrate the identity\'s data.
     */
    'gitlab_mapper_url'?: string;
    /**
     * GoogleMapper specifies the JSONNet code snippet which uses Google\'s profile information to hydrate the identity\'s data.
     */
    'google_mapper_url'?: string;
    /**
     * MicrosoftMapper specifies the JSONNet code snippet which uses Microsoft\'s profile information to hydrate the identity\'s data.
     */
    'microsoft_mapper_url'?: string;
    /**
     * NetIDMapper specifies the JSONNet code snippet which uses NetID\'s profile information to hydrate the identity\'s data.
     */
    'netid_mapper_url'?: string;
    /**
     * Proxy ACS URL if overriding with a customer-controlled URL
     */
    'proxy_acs_url'?: string;
    /**
     * Proxy OIDC Redirect URL if overriding with a customer-controlled URL
     */
    'proxy_oidc_redirect_url'?: string;
    /**
     * SAML Audience Override if overriding with a customer-controlled one
     */
    'proxy_saml_audience_override'?: string;
    /**
     * Proxy SCIM Server URL if overriding with a customer-controlled URL
     */
    'proxy_scim_server_url'?: string;
    /**
     * SAMLMapper specifies the JSONNet code snippet which uses the SAML Provider\'s profile information to hydrate the identity\'s data.
     */
    'saml_mapper_url'?: string;
    /**
     * SCIMMapper specifies the JSONNet code snippet which uses the SCIM Provider\'s profile information to hydrate the identity\'s data.
     */
    'scim_mapper_url'?: string;
}
export interface CreateProjectApiKeyRequest {
    'expires_at'?: string;
    /**
     * The Token Name  A descriptive name for the token.  in: body
     */
    'name': string;
}
/**
 * Create Project Request Body
 */
export interface CreateProjectBody {
    /**
     * The environment of the project. prod Production stage Staging dev Development
     */
    'environment': CreateProjectBodyEnvironmentEnum;
    /**
     * Home Region  The home region of the project. This is the region where the project will be created. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest us US global Global
     */
    'home_region'?: CreateProjectBodyHomeRegionEnum;
    /**
     * The name of the project to be created
     */
    'name': string;
    /**
     * The workspace to create the project in.
     */
    'workspace_id'?: string;
}

export const CreateProjectBodyEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectBodyEnvironmentEnum = typeof CreateProjectBodyEnvironmentEnum[keyof typeof CreateProjectBodyEnvironmentEnum];
export const CreateProjectBodyHomeRegionEnum = {
    EuCentral: 'eu-central',
    AsiaNortheast: 'asia-northeast',
    UsEast: 'us-east',
    UsWest: 'us-west',
    Us: 'us',
    Global: 'global',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectBodyHomeRegionEnum = typeof CreateProjectBodyHomeRegionEnum[keyof typeof CreateProjectBodyHomeRegionEnum];

/**
 * Create a Project Branding
 */
export interface CreateProjectBranding {
    'favicon_type'?: string;
    'favicon_url'?: string;
    'logo_type'?: string;
    'logo_url'?: string;
    'name'?: string;
    'theme'?: ProjectBrandingColors;
}
/**
 * Create Project MemberInvite Request Body
 */
export interface CreateProjectMemberInviteBody {
    /**
     * A email to invite
     */
    'invitee_email'?: string;
}
/**
 * Create project (normalized) request payload
 */
export interface CreateProjectNormalizedPayload {
    /**
     * The Account Experience\'s Custom Translations  Contains all Custom Translations for this project.
     */
    'account_experience_custom_translations'?: Array<RevisionAccountExperienceCustomTranslation>;
    /**
     * Holds the default locale for the account experience. This governs the \"default_locale\" setting.
     */
    'account_experience_default_locale'?: string;
    /**
     * The Account Experience\'s Enabled Locales  This governs the locales that are available in the account experience. This governs the \"enabled_locales\" setting.
     */
    'account_experience_enabled_locales'?: Array<string>;
    /**
     * Holds the URL to the account experience\'s dark theme favicon (currently unused). This governs the \"favicon_dark\" setting.
     */
    'account_experience_favicon_dark'?: string;
    /**
     * Holds the URL to the account experience\'s favicon. This governs the \"favicon_light\" setting.
     */
    'account_experience_favicon_light'?: string;
    /**
     * Holds the URL to the account experience\'s language behavior.  Can be one of: `respect_accept_language`: Respect the `Accept-Language` header. `force_default`: Force the default language. This governs the \"locale_behavior\" setting.
     */
    'account_experience_locale_behavior'?: string;
    /**
     * Holds the URL to the account experience\'s dark theme logo (currently unused). This governs the \"logo_dark\" setting.
     */
    'account_experience_logo_dark'?: string;
    /**
     * Holds the URL to the account experience\'s logo. This governs the \"logo_light\" setting.
     */
    'account_experience_logo_light'?: string;
    /**
     * Holds the URL to the account experience\'s dark theme variables. This governs the \"theme_variables_dark\" setting.
     */
    'account_experience_theme_variables_dark'?: string;
    /**
     * Holds the URL to the account experience\'s light theme variables. This governs the \"theme_variables_light\" setting.
     */
    'account_experience_theme_variables_light'?: string;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    /**
     * Whether to disable the account experience welcome screen, which is hosted under `/ui/welcome`. This governs the \"disable_welcome_screen\" setting.
     */
    'disable_account_experience_welcome_screen'?: boolean;
    /**
     * Whether the new account experience is enabled and reachable. This governs the \"enable_ax_v2\" setting.
     */
    'enable_ax_v2'?: boolean;
    /**
     *  prod Production stage Staging dev Development
     */
    'environment': CreateProjectNormalizedPayloadEnvironmentEnum;
    /**
     *  eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest us US global Global
     */
    'home_region'?: CreateProjectNormalizedPayloadHomeRegionEnum;
    /**
     * A list of custom claims which are allowed to be added top level to the Access Token. They cannot override reserved claims.  This governs the \"oauth2.allowed_top_level_claims\" setting.
     */
    'hydra_oauth2_allowed_top_level_claims'?: Array<string>;
    /**
     * Automatically grant authorized OAuth2 Scope in OAuth2 Client Credentials Flow.  Each OAuth2 Client is allowed to request a predefined OAuth2 Scope (for example `read write`). If this option is enabled, the full scope is automatically granted when performing the OAuth2 Client Credentials flow.  If disabled, the OAuth2 Client has to request the scope in the OAuth2 request by providing the `scope` query parameter.  Setting this option to true is common if you need compatibility with MITREid.  This governs the \"oauth2.client_credentials.default_grant_allowed_scope\" setting.
     */
    'hydra_oauth2_client_credentials_default_grant_allowed_scope'?: boolean;
    /**
     * Set to true if you want to exclude claim `nbf (not before)` part of access token.  This governs the \"oauth2.exclude_not_before_claim\" setting.
     */
    'hydra_oauth2_exclude_not_before_claim'?: boolean;
    /**
     * Configures if the issued at (`iat`) claim is required in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523).  If set to `false`, the `iat` claim is required. Set this value to `true` only after careful consideration.  This governs the \"oauth2.grant.jwt.iat_optional\" setting.
     */
    'hydra_oauth2_grant_jwt_iat_optional'?: boolean;
    /**
     * Configures if the JSON Web Token ID (`jti`) claim is required in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523).  If set to `false`, the `jti` claim is required. Set this value to `true` only after careful consideration.  This governs the \"oauth2.grant.jwt.jti_optional\" setting.
     */
    'hydra_oauth2_grant_jwt_jti_optional'?: boolean;
    /**
     * Configures what the maximum age of a JWT assertion used in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523) can be.  This feature uses the `exp` claim and `iat` claim to calculate assertion age. Assertions exceeding the max age will be denied.  Useful as a safety measure and recommended to keep below 720h.  This governs the \"oauth2.grant.jwt.max_ttl\" setting.
     */
    'hydra_oauth2_grant_jwt_max_ttl'?: string;
    /**
     * Configures the OAuth2 Grant Refresh Token Rotation Grace Period  If set to `null` or `\"0s\"`, the graceful refresh token rotation is disabled.  This governs the \"oauth2.grant.refresh_token_rotation_grace_period\" setting.
     */
    'hydra_oauth2_grant_refresh_token_rotation_grace_period'?: string;
    /**
     * Set to false if you don\'t want to mirror custom claims under \'ext\'.  This governs the \"oauth2.mirror_top_level_claims\" setting.
     */
    'hydra_oauth2_mirror_top_level_claims'?: boolean;
    /**
     * Configures whether PKCE should be enforced for all OAuth2 Clients.  This governs the \"oauth2.pkce.enforced\" setting.
     */
    'hydra_oauth2_pkce_enforced'?: boolean;
    /**
     * Configures whether PKCE should be enforced for OAuth2 Clients without a client secret (public clients).  This governs the \"oauth2.pkce.enforced_for_public_clients\" setting.
     */
    'hydra_oauth2_pkce_enforced_for_public_clients'?: boolean;
    /**
     * Set to true to keep custom claims that are not promoted to the top level in the \'ext\' claim. Only applies when mirror_top_level_claims is false.  This governs the \"oauth2.preserve_ext_claims\" setting.
     */
    'hydra_oauth2_preserve_ext_claims'?: boolean;
    /**
     * Sets the Refresh Token Hook Endpoint. If set this endpoint will be called during the OAuth2 Token Refresh grant update the OAuth2 Access Token claims.  This governs the \"oauth2.refresh_token_hook\" setting.
     */
    'hydra_oauth2_refresh_token_hook'?: string;
    /**
     * Sets the token hook endpoint for all grant types. If set it will be called while providing token to customize claims.  This governs the \"oauth2.token_hook.url\" setting.
     */
    'hydra_oauth2_token_hook'?: string;
    /**
     * The OpenID Connect Dynamic Client Registration specification has no concept of whitelisting OAuth 2.0 Scope. If you want to expose Dynamic Client Registration, you should set the default scope enabled for newly registered clients. Keep in mind that users can overwrite this default by setting the \"scope\" key in the registration payload, effectively disabling the concept of whitelisted scopes.  This governs the \"oidc.dynamic_client_registration.default_scope\" setting.
     */
    'hydra_oidc_dynamic_client_registration_default_scope'?: Array<string>;
    /**
     * Configures OpenID Connect Dynamic Client Registration.  This governs the \"oidc.dynamic_client_registration.enabled\" setting.
     */
    'hydra_oidc_dynamic_client_registration_enabled'?: boolean;
    /**
     * Configures OpenID Connect Discovery and overwrites the pairwise algorithm  This governs the \"oidc.subject_identifiers.pairwise_salt\" setting.
     */
    'hydra_oidc_subject_identifiers_pairwise_salt'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the list of Subject Identifier Algorithms to enable.  This governs the \"oidc.subject_identifiers.supported_types\" setting.
     */
    'hydra_oidc_subject_identifiers_supported_types'?: Array<string>;
    /**
     * Configures the Ory Hydra Cookie Secret  This governs the \"secrets.cookie\" setting.
     */
    'hydra_secrets_cookie'?: Array<string>;
    /**
     * Configures the Ory Hydra Pagination Secret  This governs the \"secrets.pagination\" setting.
     */
    'hydra_secrets_pagination'?: Array<string>;
    /**
     * Configures the Ory Hydra System Secret  This governs the \"secrets.system\" setting.
     */
    'hydra_secrets_system'?: Array<string>;
    /**
     * Configures the Ory Hydra Cookie Same Site Legacy Workaround  This governs the \"serve.cookies.same_site_legacy_workaround\" setting.
     */
    'hydra_serve_cookies_same_site_legacy_workaround'?: boolean;
    /**
     * Configures the Ory Hydra Cookie Same Site Mode  This governs the \"serve.cookies.same_site_mode\" setting.
     */
    'hydra_serve_cookies_same_site_mode'?: string;
    /**
     * Defines access token type  This governs the \"strategies.access_token\" setting. opaque Oauth2AccessTokenStrategyOpaque jwt Oauth2AccessTokenStrategyJwt
     */
    'hydra_strategies_access_token'?: CreateProjectNormalizedPayloadHydraStrategiesAccessTokenEnum;
    /**
     * Define the claim to use as the scope in the access token.  This governs the \"strategies.jwt.scope_claim\" setting.  list: The scope claim is an array of strings named `scope`: `{ \"scope\": [\"read\", \"write\"] }` string: The scope claim is a space delimited list of strings named `scp`: `{ \"scp\": \"read write\" }` both: The scope claim is both a space delimited list and an array of strings named `scope` and `scp`: `{ \"scope\": [\"read\", \"write\"], \"scp\": \"read write\" }` list OAuth2JWTScopeClaimList string OAuth2JWTScopeClaimString both OAuth2JWTScopeClaimBoth
     */
    'hydra_strategies_jwt_scope_claim'?: CreateProjectNormalizedPayloadHydraStrategiesJwtScopeClaimEnum;
    /**
     * Defines how scopes are matched. For more details have a look at https://github.com/ory/fosite#scopes  This governs the \"strategies.scope\" setting. exact Oauth2ScopeStrategyExact wildcard Oauth2ScopeStrategyWildcard
     */
    'hydra_strategies_scope'?: CreateProjectNormalizedPayloadHydraStrategiesScopeEnum;
    /**
     * This governs the \"ttl.access_token\" setting.
     */
    'hydra_ttl_access_token'?: string;
    /**
     * Configures how long refresh tokens are valid.  Set to -1 for refresh tokens to never expire. This is not recommended!  This governs the \"ttl.auth_code\" setting.
     */
    'hydra_ttl_auth_code'?: string;
    /**
     * This governs the \"ttl.id_token\" setting.
     */
    'hydra_ttl_id_token'?: string;
    /**
     * Configures how long a user login and consent flow may take.  This governs the \"ttl.login_consent_request\" setting.
     */
    'hydra_ttl_login_consent_request'?: string;
    /**
     * Configures how long refresh tokens are valid.  Set to -1 for refresh tokens to never expire. This is not recommended!  This governs the \"ttl.refresh_token\" setting.
     */
    'hydra_ttl_refresh_token'?: string;
    /**
     * Sets the OAuth2 Consent Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.consent\" setting.
     */
    'hydra_urls_consent'?: string;
    /**
     * Sets the OAuth2 Error URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.error\" setting.
     */
    'hydra_urls_error'?: string;
    /**
     * Sets the OAuth2 Login Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.login\" setting.
     */
    'hydra_urls_login'?: string;
    /**
     * Sets the logout endpoint.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.logout\" setting.
     */
    'hydra_urls_logout'?: string;
    /**
     * When an OAuth2-related user agent requests to log out, they will be redirected to this url afterwards per default.  Defaults to the Ory Account Experience in development and your application in production mode when a custom domain is connected.  This governs the \"urls.post_logout_redirect\" setting.
     */
    'hydra_urls_post_logout_redirect'?: string;
    /**
     * Sets the OAuth2 Registration Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.registration\" setting.
     */
    'hydra_urls_registration'?: string;
    /**
     * This value will be used as the issuer in access and ID tokens. It must be specified and using HTTPS protocol, unless the development mode is enabled.  On the Ory Network it will be very rare that you want to modify this value. If left empty, it will default to the correct value for the Ory Network.  This governs the \"urls.self.issuer\" setting.
     */
    'hydra_urls_self_issuer'?: string;
    /**
     * A list of JSON Web Keys that should be exposed at that endpoint. This is usually the public key for verifying OpenID Connect ID Tokens. However, you might want to add additional keys here as well.  This governs the \"webfinger.jwks.broadcast_keys\" setting.
     */
    'hydra_webfinger_jwks_broadcast_keys'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the OAuth2 Authorization URL.  This governs the \"webfinger.oidc_discovery.auth_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_auth_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the OpenID Connect Dynamic Client Registration Endpoint.  This governs the \"webfinger.oidc_discovery.client_registration_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_client_registration_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the JWKS URL.  This governs the \"webfinger.oidc_discovery.jwks_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_jwks_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites a list of supported claims to be broadcasted. Claim \"sub\" is always included.  This governs the \"webfinger.oidc_discovery.supported_claims\" setting.
     */
    'hydra_webfinger_oidc_discovery_supported_claims'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the scope OAuth 2.0 Clients may request. Scope `offline`, `offline_access`, and `openid` are always included.  This governs the \"webfinger.oidc_discovery.supported_scope\" setting.
     */
    'hydra_webfinger_oidc_discovery_supported_scope'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the OAuth2 Token URL.  This governs the \"webfinger.oidc_discovery.token_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_token_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites userinfo endpoint to be advertised at the OpenID Connect Discovery endpoint /.well-known/openid-configuration. Defaults to Ory Hydra\'s userinfo endpoint at /userinfo. Set this value if you want to handle this endpoint yourself.  This governs the \"webfinger.oidc_discovery.userinfo_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_userinfo_url'?: string;
    /**
     * The revision ID.
     */
    'id'?: string;
    /**
     * The Revisions\' Keto Namespace Configuration  The string is a URL pointing to an OPL file with the configuration.  This governs the \"namespaces.location\" setting.
     */
    'keto_namespace_configuration'?: string;
    'keto_namespaces'?: Array<KetoNamespace>;
    /**
     * Configures Keto\'s pagination secrets.  This governs the \"secrets.pagination\" setting.
     */
    'keto_secrets_pagination'?: Array<string>;
    /**
     * Configures the Ory Kratos Cookie SameSite Attribute  This governs the \"cookies.same_site\" setting.
     */
    'kratos_cookies_same_site'?: string;
    'kratos_courier_channels'?: Array<NormalizedProjectRevisionCourierChannel>;
    /**
     * The delivery strategy to use when sending emails  This governs the \"courier.delivery_strategy\" setting.  `smtp`: Use SMTP server `http`: Use the built in HTTP client to send the email to some remote service
     */
    'kratos_courier_delivery_strategy'?: string;
    /**
     * The location of the API key to use in the HTTP email sending service\'s authentication  `header`: Send the key value pair as a header `cookie`: Send the key value pair as a cookie This governs the \"courier.http.request_config.auth.config.in\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_in'?: string;
    /**
     * The name of the API key to use in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.name\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_name'?: string;
    /**
     * The value of the API key to use in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.value\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_value'?: string;
    /**
     * The password to use for basic auth in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.password\" setting.
     */
    'kratos_courier_http_request_config_auth_basic_auth_password'?: string;
    /**
     * The user to use for basic auth in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.user\" setting.
     */
    'kratos_courier_http_request_config_auth_basic_auth_user'?: string;
    /**
     * The authentication type to use while contacting the remote HTTP email sending service  This governs the \"courier.http.request_config.auth.type\" setting.  `basic_auth`: Use Basic Authentication `api_key`: Use API Key Authentication in a header or cookie
     */
    'kratos_courier_http_request_config_auth_type'?: string;
    /**
     * The Jsonnet template to generate the body to send to the remote HTTP email sending service  Should be valid Jsonnet and base64 encoded  This governs the \"courier.http.request_config.body\" setting.
     */
    'kratos_courier_http_request_config_body'?: string;
    /**
     * Any additional headers to send to the remote HTTP email sending service  This governs the \"courier.http.request_config.headers\" setting.
     */
    'kratos_courier_http_request_config_headers'?: object;
    /**
     * The http METHOD to use when calling the remote HTTP email sending service  This governs the \"courier.http.request_config.method\" setting.
     */
    'kratos_courier_http_request_config_method'?: string;
    /**
     * The URL of the remote HTTP email sending service  This governs the \"courier.http.request_config.url\" setting.
     */
    'kratos_courier_http_request_config_url'?: string;
    /**
     * Configures the Ory Kratos SMTP Connection URI  This governs the \"courier.smtp.connection_uri\" setting.
     */
    'kratos_courier_smtp_connection_uri'?: string;
    /**
     * Configures the Ory Kratos SMTP From Address  This governs the \"courier.smtp.from_address\" setting.
     */
    'kratos_courier_smtp_from_address'?: string;
    /**
     * Configures the Ory Kratos SMTP From Name  This governs the \"courier.smtp.from_name\" setting.
     */
    'kratos_courier_smtp_from_name'?: string;
    /**
     * Configures the Ory Kratos SMTP Connection Headers  This governs the \"courier.smtp.headers\" setting.
     */
    'kratos_courier_smtp_headers'?: object;
    /**
     * Configures the local_name to use in SMTP connections  This governs the \"courier.smtp.local_name\" setting.
     */
    'kratos_courier_smtp_local_name'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Body HTML Template  This governs the \"courier.templates.login_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Body Plaintext Template  This governs the \"courier.templates.login_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Subject Template  This governs the \"courier.templates.login_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code SMS plain text body  This governs the \"courier.templates.login_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_login_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Body HTML Template  This governs the \"courier.templates.recovery_code.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Body Plaintext Template  This governs the \"courier.templates.recovery_code.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Subject Template  This governs the \"courier.templates.recovery_code.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Body HTML Template  This governs the \"courier.templates.recovery_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Body Plaintext Template  This governs the \"courier.templates.recovery_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Subject Template  This governs the \"courier.templates.recovery_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Body HTML Template  This governs the \"courier.templates.recovery.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Body Plaintext Template  This governs the \"courier.templates.recovery.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Subject Template  This governs the \"courier.templates.recovery.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Body HTML Template  This governs the \"courier.templates.recovery.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Body Plaintext Template  This governs the \"courier.templates.recovery.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Subject Template  This governs the \"courier.templates.recovery.valid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Body HTML Template  This governs the \"courier.templates.registration_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Body Plaintext Template  This governs the \"courier.templates.registration_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Subject Template  This governs the \"courier.templates.registration_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code SMS Body Plaintext Template  This governs the \"courier.templates.registration_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_registration_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Body HTML Template  This governs the \"courier.templates.verification_code.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Body Plaintext Template  This governs the \"courier.templates.verification_code.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Subject Template  This governs the \"courier.templates.verification_code.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Body HTML Template  This governs the \"courier.templates.verification_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Body Plaintext Template  This governs the \"courier.templates.verification_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Subject Template  This governs the \"courier.templates.verification_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code SMS Body Plaintext  This governs the \"courier.templates.verification_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Body HTML Template  This governs the \"courier.templates.verification.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Body Plaintext Template  This governs the \"courier.templates.verification.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Subject Template  This governs the \"courier.templates.verification.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Body HTML Template  This governs the \"courier.templates.verification.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Body Plaintext Template  This governs the \"courier.templates.verification.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Subject Template  This governs the \"courier.templates.verification.valid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Session caching feature flag  This governs the \"feature_flags.cacheable_sessions\" setting.
     */
    'kratos_feature_flags_cacheable_sessions'?: boolean;
    /**
     * Configures the Ory Kratos Session caching max-age feature flag  This governs the \"feature_flags.cacheable_sessions_max_age\" setting.
     */
    'kratos_feature_flags_cacheable_sessions_max_age'?: string;
    /**
     * This governs the \"feature_flags.choose_recovery_address\" setting.
     */
    'kratos_feature_flags_choose_recovery_address'?: boolean;
    /**
     * Configures the Ory Kratos Faster Session Extend setting  If enabled allows faster session extension by skipping the session lookup and returning 201 instead of 200. Disabling this feature will be deprecated in the future.  This governs the \"feature_flags.faster_session_extend\" setting.
     */
    'kratos_feature_flags_faster_session_extend'?: boolean;
    /**
     * Always include show_verification_ui in continue_with  If true, restores the legacy behavior of always including `show_verification_ui` in the registration flow\'s `continue_with` when verification is enabled. If set to false, `show_verification_ui` is only set in `continue_with` if the `show_verification_ui` hook is used. This flag will be removed in the future.  This governs the \"feature_flags.legacy_continue_with_verification_ui\" setting.
     */
    'kratos_feature_flags_legacy_continue_with_verification_ui'?: boolean;
    /**
     * Controls whether the UI nodes in an OIDC registration flow have group \"oidc\" in case required fields are not returned by the OIDC provider.  If set to true, the UI nodes will have group \"oidc\" and the flow will be considered successful if the user completes the flow. This is the legacy behavior.  This governs the \"feature_flags.legacy_oidc_registration_node_group\" setting.
     */
    'kratos_feature_flags_legacy_oidc_registration_node_group'?: boolean;
    /**
     * Return a form error if the login identifier is not verified  If true, the login flow will return a form error if the login identifier is not verified, which restores legacy behavior. If this value is false, the `continue_with` array will contain a `show_verification_ui` hook instead.  This flag is deprecated and will be removed in the future.  This governs the \"feature_flags.legacy_require_verified_login_error\" setting.
     */
    'kratos_feature_flags_legacy_require_verified_login_error'?: boolean;
    /**
     * Configures the group for the password method in the registration flow.  If true, it sets the password method group value to \"password\" if it is the only method available. This is the legacy behavior. If false is, it sets the password method group value to \"default\".  This governs the \"feature_flags.password_profile_registration_node_group\" setting.
     */
    'kratos_feature_flags_password_profile_registration_node_group'?: boolean;
    /**
     * Configures the Ory Kratos Session use_continue_with_transitions flag  This governs the \"feature_flags.use_continue_with_transitions\" setting.
     */
    'kratos_feature_flags_use_continue_with_transitions'?: boolean;
    'kratos_identity_schemas'?: Array<NormalizedProjectRevisionIdentitySchema>;
    /**
     * Configures the OAuth2 Provider Integration HTTP Headers  This governs the \"oauth2_provider.headers\" setting.
     */
    'kratos_oauth2_provider_headers'?: object;
    /**
     * Kratos OAuth2 Provider Override Return To  Enabling this allows Kratos to set the return_to parameter automatically to the OAuth2 request URL on the login flow, allowing complex flows such as recovery to continue to the initial OAuth2 flow.  This governs the \"oauth2_provider.override_return_to\" setting.
     */
    'kratos_oauth2_provider_override_return_to'?: boolean;
    /**
     * The Revisions\' OAuth2 Provider Integration URL  This governs the \"oauth2_provider.url\" setting.
     */
    'kratos_oauth2_provider_url'?: string;
    /**
     * Configures the default read consistency level for identity APIs  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.  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`  Defaults to \"strong\" for new and existing projects. This feature is in preview. Use with caution. This governs the \"preview.default_read_consistency_level\" setting.
     */
    'kratos_preview_default_read_consistency_level'?: string;
    /**
     * Configures the Ory Kratos Cipher Secret  This governs the \"secrets.cipher\" setting.
     */
    'kratos_secrets_cipher'?: Array<string>;
    /**
     * Configures the Ory Kratos Cookie Secret  This governs the \"secrets.cookie\" setting.
     */
    'kratos_secrets_cookie'?: Array<string>;
    /**
     * Configures the Ory Kratos Default Secret  This governs the \"secrets.default\" setting.
     */
    'kratos_secrets_default'?: Array<string>;
    /**
     * Configures the Ory Kratos Pagination Secret  This governs the \"secrets.pagination\" setting.
     */
    'kratos_secrets_pagination'?: Array<string>;
    /**
     * Configures if account enumeration should be mitigated when using identifier first login.  This governs the \"security.account_enumeration.mitigate\" setting.
     */
    'kratos_security_account_enumeration_mitigate'?: boolean;
    /**
     * Configures the Ory Kratos Allowed Return URLs  This governs the \"selfservice.allowed_return_urls\" setting.
     */
    'kratos_selfservice_allowed_return_urls'?: Array<string>;
    /**
     * Configures the Ory Kratos Default Return URL  This governs the \"selfservice.default_browser_return_url\" setting.
     */
    'kratos_selfservice_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Error UI URL  This governs the \"selfservice.flows.error.ui_url\" setting.
     */
    'kratos_selfservice_flows_error_ui_url'?: string;
    /**
     * Configures the Ory Kratos Login After Code Default Return URL  This governs the \"selfservice.flows.login.after.code.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_code_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login Default Return URL  This governs the \"selfservice.flows.login.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Lookup Secret Default Return URL  This governs the \"selfservice.flows.login.after.lookup_secret.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_lookup_secret_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After OIDC Default Return URL  This governs the \"selfservice.flows.login.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Passkey Default Return URL  This governs the \"selfservice.flows.login.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Password Default Return URL  This governs the \"selfservice.flows.login.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After TOTP Default Return URL  This governs the \"selfservice.flows.login.after.totp.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_totp_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After WebAuthn Default Return URL  This governs the \"selfservice.flows.login.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_webauthn_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login Lifespan  This governs the \"selfservice.flows.login.lifespan\" setting.
     */
    'kratos_selfservice_flows_login_lifespan'?: string;
    /**
     * Configures the Ory Kratos Login Flow Style  This governs the \"selfservice.flows.login.style\" setting. Possible values are \"unified\" and \"identifier_first\".
     */
    'kratos_selfservice_flows_login_style'?: string;
    /**
     * Configures the Ory Kratos Login UI URL  This governs the \"selfservice.flows.login.ui_url\" setting.
     */
    'kratos_selfservice_flows_login_ui_url'?: string;
    /**
     * Configures the Ory Kratos Logout Default Return URL  This governs the \"selfservice.flows.logout.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_logout_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Recovery Default Return URL  This governs the \"selfservice.flows.recovery.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_recovery_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Recovery Enabled Setting  This governs the \"selfservice.flows.recovery.enabled\" setting.
     */
    'kratos_selfservice_flows_recovery_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Recovery Lifespan  This governs the \"selfservice.flows.recovery.lifespan\" setting.
     */
    'kratos_selfservice_flows_recovery_lifespan'?: string;
    /**
     * Configures whether to notify unknown recipients of a Ory Kratos recovery flow  This governs the \"selfservice.flows.recovery.notify_unknown_recipients\" setting.
     */
    'kratos_selfservice_flows_recovery_notify_unknown_recipients'?: boolean;
    /**
     * Configures the Ory Kratos Recovery UI URL  This governs the \"selfservice.flows.recovery.ui_url\" setting.
     */
    'kratos_selfservice_flows_recovery_ui_url'?: string;
    /**
     * Configures the Ory Kratos Recovery strategy to use (\"link\" or \"code\")  This governs the \"selfservice.flows.recovery.use\" setting. link SelfServiceMessageVerificationStrategyLink code SelfServiceMessageVerificationStrategyCode
     */
    'kratos_selfservice_flows_recovery_use'?: CreateProjectNormalizedPayloadKratosSelfserviceFlowsRecoveryUseEnum;
    /**
     * Configures the Ory Kratos Registration After Code Default Return URL  This governs the \"selfservice.flows.registration.after.code.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_code_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration Default Return URL  This governs the \"selfservice.flows.registration.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After OIDC Default Return URL  This governs the \"selfservice.flows.registration.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Passkey Default Return URL  This governs the \"selfservice.flows.registration.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Password Default Return URL  This governs the \"selfservice.flows.registration.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Webauthn Default Return URL  This governs the \"selfservice.flows.registration.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_webauthn_default_browser_return_url'?: string;
    /**
     * Disable two-step registration  Two-step registration is a significantly improved sign up flow and recommended when using more than one sign up methods. To revert to one-step registration, set this to `true`.  This governs the \"selfservice.flows.registration.enable_legacy_one_step\" setting.
     */
    'kratos_selfservice_flows_registration_enable_legacy_one_step'?: boolean;
    /**
     * Configures the Whether Ory Kratos Registration is Enabled  This governs the \"selfservice.flows.registration.enabled\" setting.0
     */
    'kratos_selfservice_flows_registration_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Registration Lifespan  This governs the \"selfservice.flows.registration.lifespan\" setting.
     */
    'kratos_selfservice_flows_registration_lifespan'?: string;
    /**
     * Configures the Ory Kratos Registration Login Hints  Shows helpful information when a user tries to sign up with a duplicate account.  This governs the \"selfservice.flows.registration.login_hints\" setting.
     */
    'kratos_selfservice_flows_registration_login_hints'?: boolean;
    /**
     * Configures the Ory Kratos Registration UI URL  This governs the \"selfservice.flows.registration.ui_url\" setting.
     */
    'kratos_selfservice_flows_registration_ui_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL  This governs the \"selfservice.flows.settings.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Lookup Secrets  This governs the \"selfservice.flows.settings.after.lookup_secret.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_lookup_secret_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Social Sign In  This governs the \"selfservice.flows.settings.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Passkey  This governs the \"selfservice.flows.settings.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Passwords  This governs the \"selfservice.flows.settings.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Profiles  This governs the \"selfservice.flows.settings.after.profile.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_profile_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating TOTP  This governs the \"selfservice.flows.settings.after.totp.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_totp_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating WebAuthn  This governs the \"selfservice.flows.settings.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_webauthn_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Lifespan  This governs the \"selfservice.flows.settings.lifespan\" setting.
     */
    'kratos_selfservice_flows_settings_lifespan'?: string;
    /**
     * Configures the Ory Kratos Settings Privileged Session Max Age  This governs the \"selfservice.flows.settings.privileged_session_max_age\" setting.
     */
    'kratos_selfservice_flows_settings_privileged_session_max_age'?: string;
    /**
     * Configures the Ory Kratos Settings Required AAL  This governs the \"selfservice.flows.settings.required_aal\" setting.
     */
    'kratos_selfservice_flows_settings_required_aal'?: string;
    /**
     * Configures the Ory Kratos Settings UI URL  This governs the \"selfservice.flows.settings.ui_url\" setting.
     */
    'kratos_selfservice_flows_settings_ui_url'?: string;
    /**
     * Configures the Ory Kratos Verification Default Return URL  This governs the \"selfservice.flows.verification.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_verification_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Verification Enabled Setting  This governs the \"selfservice.flows.verification.enabled\" setting.
     */
    'kratos_selfservice_flows_verification_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Verification Lifespan  This governs the \"selfservice.flows.verification.lifespan\" setting.
     */
    'kratos_selfservice_flows_verification_lifespan'?: string;
    /**
     * Configures whether to notify unknown recipients of a Ory Kratos verification flow  This governs the \"selfservice.flows.verification.notify_unknown_recipients\" setting.
     */
    'kratos_selfservice_flows_verification_notify_unknown_recipients'?: boolean;
    /**
     * Configures the Ory Kratos Verification UI URL  This governs the \"selfservice.flows.verification.ui_url\" setting.
     */
    'kratos_selfservice_flows_verification_ui_url'?: string;
    /**
     * Configures the Ory Kratos Strategy to use for Verification  This governs the \"selfservice.flows.verification.use\" setting. link SelfServiceMessageVerificationStrategyLink code SelfServiceMessageVerificationStrategyCode
     */
    'kratos_selfservice_flows_verification_use'?: CreateProjectNormalizedPayloadKratosSelfserviceFlowsVerificationUseEnum;
    /**
     * Configures the CAPTCHA allowed domains list  This governs the \"selfservice.methods.captcha.config.allowed_domains\" setting.
     */
    'kratos_selfservice_methods_captcha_config_allowed_domains'?: Array<string>;
    /**
     * Configures whether to use BYO or managed widget  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.byo\" setting.
     */
    'kratos_selfservice_methods_captcha_config_byo'?: boolean;
    /**
     * Configures the Cloudflare Turnstile site secret for Ory BYO CAPTCHA protection  The site secret is private and will be never be shared with the client. This key is write only and the value will not be returned in response to a read request.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.secret\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_byo_secret'?: string;
    /**
     * Configures the Cloudflare Turnstile site key for Ory BYO CAPTCHA protection  The site key is public and will be shared with the client.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.sitekey\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_byo_sitekey'?: string;
    /**
     * Configures the Cloudflare Turnstile site secret for managed CAPTCHA protection  The site secret is private and will be never be shared with the client. This key is write only and the value will not be returned in response to a read request.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.secret\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_secret'?: string;
    /**
     * Configures the Cloudflare Turnstile site key for managed CAPTCHA protection  The site key is public and will be shared with the client.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.sitekey\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_sitekey'?: string;
    /**
     * Configures legacy CAPTCHA node injection behavior  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.legacy_inject_node\" setting.
     */
    'kratos_selfservice_methods_captcha_config_legacy_inject_node'?: boolean;
    /**
     * Configures the Ory Kratos Self-Service Methods\' Captcha Enabled Setting  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.enabled\" setting.
     */
    'kratos_selfservice_methods_captcha_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Code Method\'s lifespan  This governs the \"selfservice.methods.code.config.lifespan\" setting.
     */
    'kratos_selfservice_methods_code_config_lifespan'?: string;
    /**
     * Configures the maximum number of attempts to submit a one-time code in kratos.  This governs the \"selfservice.methods.code.max_submissions\" setting.
     */
    'kratos_selfservice_methods_code_config_max_submissions'?: number;
    /**
     * Enables a fallback method required in certain legacy use cases.  This governs the \"selfservice.methods.code.config.missing_credential_fallback_enabled\" setting.
     */
    'kratos_selfservice_methods_code_config_missing_credential_fallback_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Code Method is enabled  This governs the \"selfservice.methods.code.enabled\" setting.
     */
    'kratos_selfservice_methods_code_enabled'?: boolean;
    /**
     * Configures whether the code method can be used to fulfil MFA flows  This governs the \"selfservice.methods.code.mfa_enabled\" setting.
     */
    'kratos_selfservice_methods_code_mfa_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Passwordless should use the Code Method  This governs the \"selfservice.methods.code.passwordless_enabled\" setting.
     */
    'kratos_selfservice_methods_code_passwordless_enabled'?: boolean;
    /**
     * This setting allows the code method to always login a user with code if they have registered with another authentication method such as password or social sign in.  This governs the \"selfservice.methods.code.passwordless_login_fallback_enabled\" setting.
     */
    'kratos_selfservice_methods_code_passwordless_login_fallback_enabled'?: boolean;
    /**
     * Configures the Base URL which Recovery, Verification, and Login Links Point to  It is recommended to leave this value empty. It will be appropriately configured to the best matching domain (e.g. when using custom domains) automatically.  This governs the \"selfservice.methods.link.config.base_url\" setting.
     */
    'kratos_selfservice_methods_link_config_base_url'?: string;
    /**
     * Configures the Ory Kratos Link Method\'s lifespan  This governs the \"selfservice.methods.link.config.lifespan\" setting.
     */
    'kratos_selfservice_methods_link_config_lifespan'?: string;
    /**
     * Configures whether Ory Kratos Link Method is enabled  This governs the \"selfservice.methods.link.enabled\" setting.
     */
    'kratos_selfservice_methods_link_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos TOTP Lookup Secret is enabled  This governs the \"selfservice.methods.lookup_secret.enabled\" setting.
     */
    'kratos_selfservice_methods_lookup_secret_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Third Party / OpenID Connect base redirect URI  This governs the \"selfservice.methods.oidc.config.base_redirect_uri\" setting.
     */
    'kratos_selfservice_methods_oidc_config_base_redirect_uri'?: string;
    'kratos_selfservice_methods_oidc_config_providers'?: Array<NormalizedProjectRevisionThirdPartyProvider>;
    /**
     * Configures whether Ory Kratos allows auto-linking of OIDC credentials without a subject  This governs the \"selfservice.methods.oidc.enable_auto_link_policy\" setting.
     */
    'kratos_selfservice_methods_oidc_enable_auto_link_policy'?: boolean;
    /**
     * Configures whether Ory Kratos Third Party / OpenID Connect Login is enabled  This governs the \"selfservice.methods.oidc.enabled\" setting.
     */
    'kratos_selfservice_methods_oidc_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Passkey RP Display Name  This governs the \"selfservice.methods.passkey.config.rp.display_name\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_display_name'?: string;
    /**
     * Configures the Ory Kratos Passkey RP ID  This governs the \"selfservice.methods.passkey.config.rp.id\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_id'?: string;
    /**
     * Configures the Ory Kratos Passkey RP Origins  This governs the \"selfservice.methods.passkey.config.rp.origins\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_origins'?: Array<string>;
    /**
     * Configures whether Ory Kratos Passkey authentication is enabled  This governs the \"selfservice.methods.passkey.enabled\" setting.
     */
    'kratos_selfservice_methods_passkey_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password HIBP Checks is enabled  This governs the \"selfservice.methods.password.config.haveibeenpwned_enabled\" setting.
     */
    'kratos_selfservice_methods_password_config_haveibeenpwned_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password should disable the similarity policy.  This governs the \"selfservice.methods.password.config.identifier_similarity_check_enabled\" setting.
     */
    'kratos_selfservice_methods_password_config_identifier_similarity_check_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password Should ignore HIBPWND Network Errors  This governs the \"selfservice.methods.password.config.ignore_network_errors\" setting.
     */
    'kratos_selfservice_methods_password_config_ignore_network_errors'?: boolean;
    /**
     * Configures Ory Kratos Password Max Breaches Detection  This governs the \"selfservice.methods.password.config.max_breaches\" setting.
     */
    'kratos_selfservice_methods_password_config_max_breaches'?: number;
    /**
     * Configures the minimum length of passwords.  This governs the \"selfservice.methods.password.config.min_password_length\" setting.
     */
    'kratos_selfservice_methods_password_config_min_password_length'?: number;
    /**
     * Configures whether Ory Kratos Password Method is enabled  This governs the \"selfservice.methods.password.enabled\" setting.
     */
    'kratos_selfservice_methods_password_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Profile Method is enabled  This governs the \"selfservice.methods.profile.enabled\" setting.
     */
    'kratos_selfservice_methods_profile_enabled'?: boolean;
    'kratos_selfservice_methods_saml_config_providers'?: Array<NormalizedProjectRevisionSAMLProvider>;
    /**
     * Configures whether Ory Kratos SAML Login is enabled  This governs the \"selfservice.methods.saml.enabled\" setting.
     */
    'kratos_selfservice_methods_saml_enabled'?: boolean;
    /**
     * Configures Ory Kratos TOTP Issuer  This governs the \"selfservice.methods.totp.config.issuer\" setting.
     */
    'kratos_selfservice_methods_totp_config_issuer'?: string;
    /**
     * Configures whether Ory Kratos TOTP Method is enabled  This governs the \"selfservice.methods.totp.enabled\" setting.
     */
    'kratos_selfservice_methods_totp_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Webauthn is used for passwordless flows  This governs the \"selfservice.methods.webauthn.config.passwordless\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_passwordless'?: boolean;
    /**
     * Configures the Ory Kratos Webauthn RP Display Name  This governs the \"selfservice.methods.webauthn.config.rp.display_name\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_display_name'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP Icon  This governs the \"selfservice.methods.webauthn.config.rp.icon\" setting. Deprecated: This value will be ignored due to security considerations.
     */
    'kratos_selfservice_methods_webauthn_config_rp_icon'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP ID  This governs the \"selfservice.methods.webauthn.config.rp.id\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_id'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP Origins  This governs the \"selfservice.methods.webauthn.config.rp.origins\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_origins'?: Array<string>;
    /**
     * Configures whether Ory Kratos Webauthn is enabled  This governs the \"selfservice.methods.webauthn.enabled\" setting.
     */
    'kratos_selfservice_methods_webauthn_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Session Cookie Persistent Attribute  This governs the \"session.cookie.persistent\" setting.
     */
    'kratos_session_cookie_persistent'?: boolean;
    /**
     * Configures the Ory Kratos Session Cookie SameSite Attribute  This governs the \"session.cookie.same_site\" setting.
     */
    'kratos_session_cookie_same_site'?: string;
    /**
     * Configures the Ory Kratos Session Lifespan  This governs the \"session.lifespan\" setting.
     */
    'kratos_session_lifespan'?: string;
    /**
     * Configures the Ory Kratos Session Whoami AAL requirement  This governs the \"session.whoami.required_aal\" setting.
     */
    'kratos_session_whoami_required_aal'?: string;
    'kratos_session_whoami_tokenizer_templates'?: Array<NormalizedProjectRevisionTokenizerTemplate>;
    /**
     * The project\'s name.
     */
    'name': string;
    'organizations'?: Array<Organization>;
    /**
     * The Revision\'s Project ID
     */
    'project_id'?: string;
    'project_revision_hooks'?: Array<NormalizedProjectRevisionHook>;
    'scim_clients'?: Array<NormalizedProjectRevisionScimClient>;
    /**
     * Configures the CORS Allowed Origins on admin APIs  This governs the \"serve.admin.cors.allowed_origins\" setting.
     */
    'serve_admin_cors_allowed_origins'?: Array<string>;
    /**
     * Enable CORS headers on all admin APIs  This governs the \"serve.admin.cors.enabled\" setting.
     */
    'serve_admin_cors_enabled'?: boolean;
    /**
     * Configures the CORS Allowed Origins on public APIs  This governs the \"serve.public.cors.allowed_origins\" setting.
     */
    'serve_public_cors_allowed_origins'?: Array<string>;
    /**
     * Enable CORS headers on all public APIs  This governs the \"serve.public.cors.enabled\" setting.
     */
    'serve_public_cors_enabled'?: boolean;
    /**
     * Whether the project should employ strict security measures. Setting this to true is recommended for going into production.
     */
    'strict_security'?: boolean;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
    'workspace_id'?: string;
}

export const CreateProjectNormalizedPayloadEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadEnvironmentEnum = typeof CreateProjectNormalizedPayloadEnvironmentEnum[keyof typeof CreateProjectNormalizedPayloadEnvironmentEnum];
export const CreateProjectNormalizedPayloadHomeRegionEnum = {
    EuCentral: 'eu-central',
    AsiaNortheast: 'asia-northeast',
    UsEast: 'us-east',
    UsWest: 'us-west',
    Us: 'us',
    Global: 'global',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadHomeRegionEnum = typeof CreateProjectNormalizedPayloadHomeRegionEnum[keyof typeof CreateProjectNormalizedPayloadHomeRegionEnum];
export const CreateProjectNormalizedPayloadHydraStrategiesAccessTokenEnum = {
    Opaque: 'opaque',
    Jwt: 'jwt',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadHydraStrategiesAccessTokenEnum = typeof CreateProjectNormalizedPayloadHydraStrategiesAccessTokenEnum[keyof typeof CreateProjectNormalizedPayloadHydraStrategiesAccessTokenEnum];
export const CreateProjectNormalizedPayloadHydraStrategiesJwtScopeClaimEnum = {
    List: 'list',
    String: 'string',
    Both: 'both',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadHydraStrategiesJwtScopeClaimEnum = typeof CreateProjectNormalizedPayloadHydraStrategiesJwtScopeClaimEnum[keyof typeof CreateProjectNormalizedPayloadHydraStrategiesJwtScopeClaimEnum];
export const CreateProjectNormalizedPayloadHydraStrategiesScopeEnum = {
    Exact: 'exact',
    Wildcard: 'wildcard',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadHydraStrategiesScopeEnum = typeof CreateProjectNormalizedPayloadHydraStrategiesScopeEnum[keyof typeof CreateProjectNormalizedPayloadHydraStrategiesScopeEnum];
export const CreateProjectNormalizedPayloadKratosSelfserviceFlowsRecoveryUseEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadKratosSelfserviceFlowsRecoveryUseEnum = typeof CreateProjectNormalizedPayloadKratosSelfserviceFlowsRecoveryUseEnum[keyof typeof CreateProjectNormalizedPayloadKratosSelfserviceFlowsRecoveryUseEnum];
export const CreateProjectNormalizedPayloadKratosSelfserviceFlowsVerificationUseEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateProjectNormalizedPayloadKratosSelfserviceFlowsVerificationUseEnum = typeof CreateProjectNormalizedPayloadKratosSelfserviceFlowsVerificationUseEnum[keyof typeof CreateProjectNormalizedPayloadKratosSelfserviceFlowsVerificationUseEnum];

/**
 * Create Recovery Code for Identity Request Body
 */
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`.
     */
    'expires_in'?: string;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'flow_type'?: string;
    /**
     * Identity to Recover  The identity\'s ID you wish to recover.
     */
    'identity_id': string;
}
/**
 * Create Recovery Link for Identity Request Body
 */
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`.
     */
    'expires_in'?: string;
    /**
     * Identity to Recover  The identity\'s ID you wish to recover.
     */
    'identity_id': string;
}
/**
 * Create Relationship Request Body
 */
export interface CreateRelationshipBody {
    /**
     * Namespace to query
     */
    'namespace'?: string;
    /**
     * Object to query
     */
    'object'?: string;
    /**
     * Relation to query
     */
    'relation'?: string;
    /**
     * SubjectID to query  Either SubjectSet or SubjectID can be provided.
     */
    'subject_id'?: string;
    'subject_set'?: SubjectSet;
}
export interface CreateSubscriptionBody {
    /**
     *  usd USD eur Euro
     */
    'currency'?: CreateSubscriptionBodyCurrencyEnum;
    /**
     *  monthly Monthly yearly Yearly
     */
    'interval': CreateSubscriptionBodyIntervalEnum;
    'plan': string;
    'provision_first_project': string;
    'return_to'?: string;
}

export const CreateSubscriptionBodyCurrencyEnum = {
    Usd: 'usd',
    Eur: 'eur',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateSubscriptionBodyCurrencyEnum = typeof CreateSubscriptionBodyCurrencyEnum[keyof typeof CreateSubscriptionBodyCurrencyEnum];
export const CreateSubscriptionBodyIntervalEnum = {
    Monthly: 'monthly',
    Yearly: 'yearly',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateSubscriptionBodyIntervalEnum = typeof CreateSubscriptionBodyIntervalEnum[keyof typeof CreateSubscriptionBodyIntervalEnum];

export interface CreateSubscriptionCommon {
    /**
     *  usd USD eur Euro
     */
    'currency'?: CreateSubscriptionCommonCurrencyEnum;
    /**
     *  monthly Monthly yearly Yearly
     */
    'interval': CreateSubscriptionCommonIntervalEnum;
    'plan': string;
    'return_to'?: string;
}

export const CreateSubscriptionCommonCurrencyEnum = {
    Usd: 'usd',
    Eur: 'eur',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateSubscriptionCommonCurrencyEnum = typeof CreateSubscriptionCommonCurrencyEnum[keyof typeof CreateSubscriptionCommonCurrencyEnum];
export const CreateSubscriptionCommonIntervalEnum = {
    Monthly: 'monthly',
    Yearly: 'yearly',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateSubscriptionCommonIntervalEnum = typeof CreateSubscriptionCommonIntervalEnum[keyof typeof CreateSubscriptionCommonIntervalEnum];

export interface CreateVerifiableCredentialRequestBody {
    'format'?: string;
    'proof'?: VerifiableCredentialProof;
    'types'?: Array<string>;
}
export interface CreateWorkspaceApiKeyBody {
    'expires_at'?: string;
    /**
     * The API Key Name  A descriptive name for the API key.
     */
    'name': string;
}
export interface CreateWorkspaceBody {
    /**
     * The name of the workspace
     */
    'name': string;
}
/**
 * Create Workspace Invite Request Body
 */
export interface CreateWorkspaceMemberInviteBody {
    /**
     * A email to invite
     */
    'invitee_email': string;
    /**
     * The role the user will have in the workspace owner WorkspaceMemberRoleOwner developer WorkspaceMemberRoleDeveloper
     */
    'role': CreateWorkspaceMemberInviteBodyRoleEnum;
}

export const CreateWorkspaceMemberInviteBodyRoleEnum = {
    Owner: 'owner',
    Developer: 'developer',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateWorkspaceMemberInviteBodyRoleEnum = typeof CreateWorkspaceMemberInviteBodyRoleEnum[keyof typeof CreateWorkspaceMemberInviteBodyRoleEnum];

export interface CreateWorkspaceOrganizationBody {
    'generic_oidc_provider'?: GenericOIDCProvider;
}
export interface CreateWorkspaceSubscriptionBody {
    /**
     *  usd USD eur Euro
     */
    'currency'?: CreateWorkspaceSubscriptionBodyCurrencyEnum;
    /**
     *  monthly Monthly yearly Yearly
     */
    'interval': CreateWorkspaceSubscriptionBodyIntervalEnum;
    'plan': string;
    'return_to'?: string;
}

export const CreateWorkspaceSubscriptionBodyCurrencyEnum = {
    Usd: 'usd',
    Eur: 'eur',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateWorkspaceSubscriptionBodyCurrencyEnum = typeof CreateWorkspaceSubscriptionBodyCurrencyEnum[keyof typeof CreateWorkspaceSubscriptionBodyCurrencyEnum];
export const CreateWorkspaceSubscriptionBodyIntervalEnum = {
    Monthly: 'monthly',
    Yearly: 'yearly',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CreateWorkspaceSubscriptionBodyIntervalEnum = typeof CreateWorkspaceSubscriptionBodyIntervalEnum[keyof typeof CreateWorkspaceSubscriptionBodyIntervalEnum];

/**
 * Includes information about the supported verifiable credentials.
 */
export interface CredentialSupportedDraft00 {
    /**
     * OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported  Contains a list of cryptographic binding methods supported for signing the proof.
     */
    'cryptographic_binding_methods_supported'?: Array<string>;
    /**
     * OpenID Connect Verifiable Credentials Cryptographic Suites Supported  Contains a list of cryptographic suites methods supported for signing the proof.
     */
    'cryptographic_suites_supported'?: Array<string>;
    /**
     * OpenID Connect Verifiable Credentials Format  Contains the format that is supported by this authorization server.
     */
    'format'?: string;
    /**
     * OpenID Connect Verifiable Credentials Types  Contains the types of verifiable credentials supported.
     */
    'types'?: Array<string>;
}
/**
 * Custom Hostname
 */
export interface CustomDomain {
    'cookie_domain'?: string;
    'cors_allowed_origins'?: Array<string>;
    'cors_enabled'?: boolean;
    'created_at'?: string;
    'custom_ui_base_url'?: string;
    'hostname'?: string;
    'id'?: string;
    'ssl_status'?: CustomDomainSslStatusEnum;
    'updated_at'?: string;
    'verification_errors'?: Array<string>;
    'verification_status'?: string;
}

export const CustomDomainSslStatusEnum = {
    Initializing: 'initializing',
    PendingValidation: 'pending_validation',
    Deleted: 'deleted',
    PendingIssuance: 'pending_issuance',
    PendingDeployment: 'pending_deployment',
    PendingDeletion: 'pending_deletion',
    PendingExpiration: 'pending_expiration',
    Expired: 'expired',
    Active: 'active',
    InitializingTimedOut: 'initializing_timed_out',
    ValidationTimedOut: 'validation_timed_out',
    IssuanceTimedOut: 'issuance_timed_out',
    DeploymentTimedOut: 'deployment_timed_out',
    DeletionTimedOut: 'deletion_timed_out',
    PendingCleanup: 'pending_cleanup',
    StagingDeployment: 'staging_deployment',
    StagingActive: 'staging_active',
    Deactivating: 'deactivating',
    Inactive: 'inactive',
    BackupIssued: 'backup_issued',
    HoldingDeployment: 'holding_deployment',
    Empty: '',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CustomDomainSslStatusEnum = typeof CustomDomainSslStatusEnum[keyof typeof CustomDomainSslStatusEnum];

/**
 * CustomerPortalAvailability describes whether the Stripe customer portal is available for the logged-in user (or a workspace they access).
 */
export interface CustomerPortalAvailability {
    /**
     * Whether the customer portal is available.
     */
    'available': boolean;
    /**
     * Optional reason why the portal is unavailable. Populated only when `available` is false. For debugging and support purposes — frontend consumers should not parse or depend on specific values. no_stripe_customer CustomerPortalReasonNoStripeCustomer no_subscription CustomerPortalReasonNoSubscription
     */
    'reason'?: CustomerPortalAvailabilityReasonEnum;
}

export const CustomerPortalAvailabilityReasonEnum = {
    NoStripeCustomer: 'no_stripe_customer',
    NoSubscription: 'no_subscription',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type CustomerPortalAvailabilityReasonEnum = typeof CustomerPortalAvailabilityReasonEnum[keyof typeof CustomerPortalAvailabilityReasonEnum];

/**
 * Deleted Session Count
 */
export interface DeleteMySessionsCount {
    /**
     * The number of sessions that were revoked.
     */
    'count'?: number;
}
export interface DeviceAuthnKey {
    /**
     * ClientKeyID is a client-chosen id for the key and is unique per identity.
     */
    'client_key_id'?: string;
    /**
     * CreatedAt is the timestamp of when the key was created. Only used for troubleshooting/UI.
     */
    'created_at'?: string;
    /**
     * DeviceName is a human readable name for the device, helping the user to distinguish it from others.
     */
    'device_name'?: string;
    'device_type'?: string;
    /**
     * PublicKey is an EC (in v1) public key, used to verify signatures, stored as uncompressed bytes. The private key resides inside the device and does not exist on the server.
     */
    'public_key'?: Array<number>;
    'state'?: string;
    /**
     * v1 uses SHA256 + EC256. v2 (in the future) may use ML-DSA which is post-quantum resistant. This requires Android/iOS support so we have to wait. We intentionally avoid storing the cryptographic algorithm here a la JWT/TLS to avoid security issues and algorithm negotiation.
     */
    'version'?: number;
}
/**
 * # Ory\'s OAuth 2.0 Device Authorization API
 */
export interface DeviceAuthorization {
    /**
     * The device verification code.
     */
    'device_code'?: string;
    /**
     * The lifetime in seconds of the \"device_code\" and \"user_code\".
     */
    'expires_in'?: number;
    /**
     * The minimum amount of time in seconds that the client SHOULD wait between polling requests to the token endpoint.  If no value is provided, clients MUST use 5 as the default.
     */
    'interval'?: number;
    /**
     * The end-user verification code.
     */
    'user_code'?: string;
    /**
     * The end-user verification URI on the authorization server.  The URI should be short and easy to remember as end users will be asked to manually type it into their user agent.
     */
    'verification_uri'?: string;
    /**
     * A verification URI that includes the \"user_code\" (or other information with the same function as the \"user_code\"), which is designed for non-textual transmission.
     */
    'verification_uri_complete'?: string;
}
export interface DeviceUserAuthRequest {
    /**
     * ID is the identifier (\"device challenge\") of the device grant request. It is used to identify the session.
     */
    'challenge': string;
    'client'?: OAuth2Client;
    'handled_at'?: string;
    /**
     * RequestURL is the original Device Authorization URL requested.
     */
    'request_url'?: string;
    /**
     * RequestedAudience contains the access token audience as requested by the OAuth 2.0 Client.
     */
    'requested_access_token_audience'?: Array<string>;
    /**
     * RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
     */
    'requested_scope'?: Array<string>;
}
/**
 * Contains the data of the email template, including the subject and body in HTML and plaintext variants
 */
export interface EmailTemplateData {
    'body': EmailTemplateDataBody;
    'subject': string;
}
export interface EmailTemplateDataBody {
    'html': string;
    'plaintext': string;
}
export interface ErrorAuthenticatorAssuranceLevelNotSatisfied {
    'error'?: GenericError;
    /**
     * Points to where to redirect the user to next.
     */
    'redirect_browser_to'?: string;
}
export interface ErrorBrowserLocationChangeRequired {
    'error'?: ErrorGeneric;
    /**
     * Points to where to redirect the user to next.
     */
    'redirect_browser_to'?: string;
}
/**
 * Is sent when a flow is replaced by a different flow of the same class
 */
export interface ErrorFlowReplaced {
    'error'?: GenericError;
    /**
     * The flow ID that should be used for the new flow as it contains the correct messages.
     */
    'use_flow_id'?: string;
}
/**
 * The standard Ory JSON API error format.
 */
export interface ErrorGeneric {
    'error': GenericErrorContent;
}
/**
 * Error
 */
export interface ErrorOAuth2 {
    /**
     * Error
     */
    'error'?: string;
    /**
     * Error Debug Information  Only available in dev mode.
     */
    'error_debug'?: string;
    /**
     * Error Description
     */
    'error_description'?: string;
    /**
     * Error Hint  Helps the user identify the error cause.
     */
    'error_hint'?: string;
    /**
     * HTTP Status Code
     */
    'status_code'?: number;
}
/**
 * Event Stream
 */
export interface EventStream {
    'created_at'?: string;
    'https_endpoint'?: string | null;
    'id'?: string;
    'role_arn'?: string;
    'topic_arn'?: string;
    'type'?: string;
    'updated_at'?: string;
}
export interface ExpandedPermissionTree {
    /**
     * The children of the node, possibly none.
     */
    'children'?: Array<ExpandedPermissionTree>;
    'tuple'?: Relationship;
    /**
     * The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified
     */
    'type': ExpandedPermissionTreeTypeEnum;
}

export const ExpandedPermissionTreeTypeEnum = {
    Union: 'union',
    Exclusion: 'exclusion',
    Intersection: 'intersection',
    Leaf: 'leaf',
    TupleToSubjectSet: 'tuple_to_subject_set',
    ComputedSubjectSet: 'computed_subject_set',
    Not: 'not',
    Unspecified: 'unspecified',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ExpandedPermissionTreeTypeEnum = typeof ExpandedPermissionTreeTypeEnum[keyof typeof ExpandedPermissionTreeTypeEnum];

export interface FlowError {
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    'created_at'?: string;
    'error'?: object;
    /**
     * ID of the error container.
     */
    'id': string;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    'updated_at'?: string;
}
/**
 * Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
 */
export interface GenericError {
    /**
     * The status code
     */
    'code'?: number;
    /**
     * Debug information  This field is often not exposed to protect against leaking sensitive information.
     */
    'debug'?: string;
    /**
     * Further error details
     */
    'details'?: any;
    'error'?: GenericErrorContent;
    /**
     * The error ID  Useful when trying to identify various errors in application logic.
     */
    'id'?: string;
    /**
     * Error message  The error\'s message.
     */
    'message': string;
    /**
     * A human-readable reason for the error
     */
    '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.
     */
    'request'?: string;
    /**
     * The status description
     */
    'status'?: string;
}
/**
 * Error response
 */
export interface GenericErrorContent {
    /**
     * Debug contains debug information. This is usually not available and has to be enabled.
     */
    'debug'?: string;
    /**
     * Name is the error name.
     */
    'error'?: string;
    /**
     * Description contains further information on the nature of the error.
     */
    'error_description'?: string;
    /**
     * ID is a unique error ID. feature_not_available ErrFeatureNotAvailable quota_exceeded ErrQuotaExceeded
     */
    'id'?: GenericErrorContentIdEnum;
    /**
     * Message contains the error message.
     */
    'message'?: string;
    /**
     * Code represents the error status code (404, 403, 401, ...).
     */
    'status_code'?: number;
}

export const GenericErrorContentIdEnum = {
    FeatureNotAvailable: 'feature_not_available',
    QuotaExceeded: 'quota_exceeded',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type GenericErrorContentIdEnum = typeof GenericErrorContentIdEnum[keyof typeof GenericErrorContentIdEnum];

export interface GenericOIDCProvider {
    /**
     * The client_id of the OIDC provider.
     */
    'client_id': string;
    /**
     * The client_secret of the OIDC provider.
     */
    'client_secret': string;
    /**
     * The issuer URL of the OIDC provider.
     */
    'issuer_url': string;
}
export interface GenericUsage {
    'additional_price': Money;
    /**
     * IncludedUsage is the number of included items.
     */
    'included_usage': number;
}
/**
 * Response of the getAttributesCount endpoint
 */
export interface GetAttributesCount {
    /**
     * The list of data points.
     */
    'data': Array<AttributesCountDatapoint>;
}
/**
 * Ory Identity Schema Location
 */
export interface GetManagedIdentitySchemaLocation {
    'location'?: string;
}
/**
 * Response of the getIdentityCount endpoint
 */
export interface GetMetricsCount {
    /**
     * The total count
     */
    'count': number;
    /**
     * Helper field to identify the service used for this response
     */
    'service_name': string;
}
/**
 * Response of the getMetricsEventAttributes endpoint
 */
export interface GetMetricsEventAttributes {
    /**
     * The list of data points.
     */
    'events': Array<string>;
}
/**
 * Response of the getMetricsEventTypes endpoint
 */
export interface GetMetricsEventTypes {
    /**
     * The list of data points.
     */
    'events': Array<string>;
}
export interface GetOrganizationResponse {
    'organization': Organization;
}
/**
 * Response of the getProjectEvents endpoint
 */
export interface GetProjectEvents {
    /**
     * The list of data points.
     */
    'events': Array<ProjectEventsDatapoint>;
    /**
     * Pagination token to be included in next page request
     */
    'page_token'?: string;
}
/**
 * Body of the getProjectEvents endpoint
 */
export interface GetProjectEventsBody {
    /**
     * The event name to query for
     */
    'event_name'?: string;
    /**
     * Event attribute filters
     */
    'filters'?: Array<AttributeFilter>;
    /**
     * The start RFC3339 date of the time window
     */
    'from': string;
    /**
     * Maximum number of events to return
     */
    'page_size'?: number;
    /**
     * Pagination token to fetch next page, empty if first page
     */
    'page_token'?: string;
    /**
     * The end RFC3339 date of the time window
     */
    'to': string;
}
/**
 * Response of the getMetrics endpoint
 */
export interface GetProjectMetrics {
    /**
     * The list of data points.
     */
    'data': Array<MetricsDatapoint>;
}
/**
 * Response of the getSessionActivity endpoint
 */
export interface GetSessionActivity {
    /**
     * The list of data points.
     */
    'data': Array<SessionActivityDatapoint>;
}
export interface GetVersion200Response {
    /**
     * The version of Ory Kratos.
     */
    'version': string;
}
export interface HealthNotReadyStatus {
    /**
     * Errors contains a list of errors that caused the not ready status.
     */
    'errors'?: { [key: string]: string; };
}
export interface HealthStatus {
    /**
     * Status always contains \"ok\".
     */
    'status'?: string;
}
/**
 * An [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory.
 */
export interface Identity {
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    'created_at'?: string;
    /**
     * Credentials represents all credentials that can be used for authenticating this identity.
     */
    'credentials'?: { [key: string]: IdentityCredentials; };
    /**
     * ExternalID is an optional external ID of the identity. This is used to link the identity to an external system. If set, the external ID must be unique across all identities.
     */
    'external_id'?: string;
    /**
     * 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.
     */
    'id': string;
    /**
     * NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
     */
    'metadata_admin'?: object | null;
    /**
     * NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
     */
    'metadata_public'?: object | null;
    'organization_id'?: string | null;
    /**
     * RecoveryAddresses contains all the addresses that can be used to recover an identity.
     */
    'recovery_addresses'?: Array<RecoveryIdentityAddress>;
    /**
     * SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits.
     */
    'schema_id': string;
    /**
     * SchemaURL is the URL of the endpoint where the identity\'s traits schema can be fetched from.  format: url
     */
    'schema_url': string;
    /**
     * State is the identity\'s state.  This value has currently no effect. active StateActive inactive StateInactive
     */
    'state'?: IdentityStateEnum;
    '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`.
     */
    'traits': any;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    'updated_at'?: string;
    /**
     * VerifiableAddresses contains all the addresses that can be verified by the user.
     */
    'verifiable_addresses'?: Array<VerifiableIdentityAddress>;
}

export const IdentityStateEnum = {
    Active: 'active',
    Inactive: 'inactive',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type IdentityStateEnum = typeof IdentityStateEnum[keyof typeof IdentityStateEnum];

/**
 * Credentials represents a specific credential type
 */
export interface IdentityCredentials {
    'config'?: object;
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    'created_at'?: string;
    /**
     * Identifiers represent a list of unique identifiers this credential type matches.
     */
    'identifiers'?: Array<string>;
    /**
     * 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 deviceauthn CredentialsTypeDeviceAuthn 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'?: IdentityCredentialsTypeEnum;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    'updated_at'?: string;
    /**
     * Version refers to the version of the credential. Useful when changing the config schema.
     */
    'version'?: number;
}

export const IdentityCredentialsTypeEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type IdentityCredentialsTypeEnum = typeof IdentityCredentialsTypeEnum[keyof typeof IdentityCredentialsTypeEnum];

/**
 * CredentialsCode represents a one time login/registration code
 */
export interface IdentityCredentialsCode {
    'addresses'?: Array<IdentityCredentialsCodeAddress>;
}
export interface IdentityCredentialsCodeAddress {
    /**
     * The address for this code
     */
    'address'?: string;
    'channel'?: string;
}
/**
 * Recovery codes can be used once and are invalidated after use.
 */
export interface IdentityCredentialsLookupSecretCode {
    /**
     * A recovery code
     */
    'code'?: string;
    'used_at'?: string;
}
export interface IdentityCredentialsOidc {
    'providers'?: Array<IdentityCredentialsOidcProvider>;
}
export interface IdentityCredentialsOidcProvider {
    'initial_access_token'?: string;
    'initial_id_token'?: string;
    'initial_refresh_token'?: string;
    'organization'?: string;
    'provider'?: string;
    'subject'?: string;
    'use_auto_link'?: boolean;
}
export interface IdentityCredentialsPassword {
    /**
     * HashedPassword is a hash-representation of the password.
     */
    '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.
     */
    'use_password_migration_hook'?: boolean;
}
export interface IdentityCredentialsWebAuthn {
    'added_at'?: string;
    'attestation'?: IdentityCredentialsWebAuthnAttestation;
    'attestation_type'?: string;
    'authenticator'?: IdentityCredentialsWebAuthnAuthenticator;
    'display_name'?: string;
    'flags'?: IdentityCredentialsWebAuthnFlags;
    'id'?: Array<number>;
    'is_passwordless'?: boolean;
    'public_key'?: Array<number>;
    'transport'?: Array<string>;
}
export interface IdentityCredentialsWebAuthnAttestation {
    'authenticator_data'?: Array<number>;
    'client_dataJSON'?: Array<number>;
    'client_data_hash'?: Array<number>;
    'object'?: Array<number>;
    'public_key_algorithm'?: number;
}
export interface IdentityCredentialsWebAuthnAuthenticator {
    'aaguid'?: Array<number>;
    'clone_warning'?: boolean;
    'sign_count'?: number;
}
export interface IdentityCredentialsWebAuthnFlags {
    'backup_eligible'?: boolean;
    'backup_state'?: boolean;
    'user_present'?: boolean;
    'user_verified'?: boolean;
}
/**
 * Payload for patching an identity
 */
export interface 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.
     */
    'patch_id'?: string;
}
/**
 * Response for a single identity patch
 */
export interface IdentityPatchResponse {
    /**
     * The action for this specific patch create ActionCreate  Create this identity. error ActionError  Error indicates that the patch failed.
     */
    'action'?: IdentityPatchResponseActionEnum;
    /**
     * From https://go.dev/wiki/CodeReviewComments#receiver-type: > Can function or methods, either concurrently or when called from this method, be mutating the receiver? A value type creates a copy of the receiver when the method is invoked, so outside updates will not be applied to this receiver. If changes must be visible in the original receiver, the receiver must be a pointer. > If the receiver is a struct, array or slice and any of its elements is a pointer to something that might be mutating, > prefer a pointer receiver, as it will make the intention clearer to the reader. > Don’t mix receiver types. Choose either pointers or struct types for all available methods.
     */
    'error'?: any;
    /**
     * The identity ID payload of this patch
     */
    'identity'?: string;
    /**
     * The ID of this patch response, if an ID was specified in the patch.
     */
    'patch_id'?: string;
}

export const IdentityPatchResponseActionEnum = {
    Create: 'create',
    Error: 'error',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type IdentityPatchResponseActionEnum = typeof IdentityPatchResponseActionEnum[keyof typeof IdentityPatchResponseActionEnum];

/**
 * An Identity JSON Schema Container
 */
export interface IdentitySchemaContainer {
    /**
     * The ID of the Identity JSON Schema
     */
    'id': string;
    /**
     * The actual Identity JSON Schema
     */
    'schema': object;
}
export interface IdentitySchemaPreset {
    /**
     * Schema is the Identity JSON Schema
     */
    'schema': object;
    /**
     * URL is the preset identifier
     */
    'url': string;
}
/**
 * Create Identity and Import Credentials
 */
export interface IdentityWithCredentials {
    'lookup_secret'?: AdminIdentityImportCredentialsLookupSecret;
    'oidc'?: IdentityWithCredentialsOidc;
    'passkey'?: IdentityWithCredentialsPasskey;
    'password'?: IdentityWithCredentialsPassword;
    'saml'?: IdentityWithCredentialsSaml;
    'totp'?: IdentityWithCredentialsTotp;
    'webauthn'?: IdentityWithCredentialsWebAuthn;
}
/**
 * Create Identity and Import Social Sign In Credentials
 */
export interface IdentityWithCredentialsOidc {
    'config'?: IdentityWithCredentialsOidcConfig;
}
export interface IdentityWithCredentialsOidcConfig {
    /**
     * A list of OpenID Connect Providers
     */
    'providers'?: Array<IdentityWithCredentialsOidcConfigProvider>;
}
/**
 * Create Identity and Import Social Sign In Credentials Configuration
 */
export interface IdentityWithCredentialsOidcConfigProvider {
    'organization'?: string | null;
    /**
     * The OpenID Connect provider to link the subject to. Usually something like `google` or `github`.
     */
    'provider': string;
    /**
     * The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token.
     */
    'subject': string;
    /**
     * If set, this credential allows the user to sign in using the OpenID Connect provider without setting the subject first.
     */
    'use_auto_link'?: boolean;
}
/**
 * Create Identity and Import Passkey Credentials
 */
export interface IdentityWithCredentialsPasskey {
    'config'?: IdentityWithCredentialsPasskeyConfig;
}
/**
 * Create Identity and Import Passkey Credentials Configuration
 */
export interface IdentityWithCredentialsPasskeyConfig {
    'credentials'?: Array<IdentityCredentialsWebAuthn>;
    /**
     * UserHandle is the user handle of the webauthn credential.
     */
    'user_handle'?: Array<number>;
}
/**
 * Create Identity and Import Password Credentials
 */
export interface IdentityWithCredentialsPassword {
    'config'?: IdentityWithCredentialsPasswordConfig;
}
/**
 * Create Identity and Import Password Credentials Configuration
 */
export interface IdentityWithCredentialsPasswordConfig {
    /**
     * The hashed password in [PHC format](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords)
     */
    'hashed_password'?: string;
    /**
     * The password in plain text if no hash is available.
     */
    'password'?: string;
    /**
     * If set to true, the password will be migrated using the password migration hook.
     */
    'use_password_migration_hook'?: boolean;
}
/**
 * Payload to import SAML credentials
 */
export interface IdentityWithCredentialsSaml {
    'config'?: IdentityWithCredentialsSamlConfig;
}
/**
 * Payload of SAML providers
 */
export interface IdentityWithCredentialsSamlConfig {
    /**
     * A list of SAML Providers
     */
    'providers'?: Array<IdentityWithCredentialsSamlConfigProvider>;
}
/**
 * Payload of specific SAML provider
 */
export interface IdentityWithCredentialsSamlConfigProvider {
    'organization'?: string | null;
    /**
     * The SAML provider to link the subject to.
     */
    'provider': string;
    /**
     * The unique subject of the SAML connection. This value must be immutable at the source.
     */
    'subject': string;
}
/**
 * Create Identity and Import TOTP 2FA Credentials
 */
export interface IdentityWithCredentialsTotp {
    'config'?: IdentityWithCredentialsTotpConfig;
}
/**
 * Create Identity and Import TOTP 2FA Credentials Configuration
 */
export interface IdentityWithCredentialsTotpConfig {
    /**
     * TOTPURL is the TOTP URL  For more details see: https://github.com/google/google-authenticator/wiki/Key-Uri-Format
     */
    'totp_url'?: string;
}
/**
 * Create Identity and Import WebAuthn Credentials
 */
export interface IdentityWithCredentialsWebAuthn {
    'config'?: IdentityWithCredentialsWebAuthnConfig;
}
/**
 * Create Identity and Import WebAuthn Credentials Configuration
 */
export interface IdentityWithCredentialsWebAuthnConfig {
    'credentials'?: Array<IdentityCredentialsWebAuthn>;
    /**
     * UserHandle is the user handle of the webauthn credential.
     */
    'user_handle'?: Array<number>;
}
/**
 * Get Project Branding Request Body
 */
export interface InternalGetProjectBrandingBody {
    'hostname'?: string;
}
/**
 * Is Account Experience Enabled For Project Request Body
 */
export interface InternalIsAXWelcomeScreenEnabledForProjectBody {
    /**
     * Path is the path of the request.
     */
    'path': string;
    /**
     * ProjectSlug is the project\'s slug.
     */
    'project_slug': string;
}
export interface InternalIsOwnerForProjectBySlug {
    /**
     * ProjectID is the project\'s ID.
     */
    'project_id': string;
}
/**
 * Is Owner For Project By Slug Request Body
 */
export interface InternalIsOwnerForProjectBySlugBody {
    /**
     * Namespace is the namespace of the subject.
     */
    'namespace': InternalIsOwnerForProjectBySlugBodyNamespaceEnum;
    /**
     * OrganizationID is the organization\'s ID.
     */
    'organization_id'?: string;
    /**
     * ProjectScope is the project_id resolved from the API key.
     */
    'project_scope'?: string;
    /**
     * ProjectSlug is the project\'s slug.
     */
    'project_slug': string;
    /**
     * Subject is the subject acting (user or API key).
     */
    'subject': string;
}

export const InternalIsOwnerForProjectBySlugBodyNamespaceEnum = {
    User: 'User',
    ApiKey: ' ApiKey',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type InternalIsOwnerForProjectBySlugBodyNamespaceEnum = typeof InternalIsOwnerForProjectBySlugBodyNamespaceEnum[keyof typeof InternalIsOwnerForProjectBySlugBodyNamespaceEnum];

/**
 * Introspection contains an access token\'s session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662)
 */
export interface IntrospectedOAuth2Token {
    /**
     * Active is a boolean indicator of whether or not the presented token is currently active.  The specifics of a token\'s \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).
     */
    'active': boolean;
    /**
     * Audience contains a list of the token\'s intended audiences.
     */
    'aud'?: Array<string>;
    /**
     * ID is a client identifier for the OAuth 2.0 client that requested this token.
     */
    'client_id'?: string;
    /**
     * Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.
     */
    'exp'?: number;
    /**
     * Extra is arbitrary data set by the session.
     */
    'ext'?: { [key: string]: any; };
    /**
     * Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.
     */
    'iat'?: number;
    /**
     * IssuerURL is a string representing the issuer of this token
     */
    'iss'?: string;
    /**
     * NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.
     */
    'nbf'?: number;
    /**
     * ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.
     */
    'obfuscated_subject'?: string;
    /**
     * Scope is a JSON string containing a space-separated list of scopes associated with this token.
     */
    'scope'?: string;
    /**
     * Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.
     */
    'sub'?: string;
    /**
     * TokenType is the introspected token\'s type, typically `Bearer`.
     */
    'token_type'?: string;
    /**
     * TokenUse is the introspected token\'s use, for example `access_token` or `refresh_token`.
     */
    'token_use'?: string;
    /**
     * Username is a human-readable identifier for the resource owner who authorized this token.
     */
    'username'?: string;
}
/**
 * Invite Token Body
 */
export interface InviteTokenBody {
    /**
     * Invite Token  The Invite Token.  format: uuid
     */
    'invite_token': string;
}
export interface Invoice {
    /**
     * The ID of the invoice.
     */
    'id': string;
    'invoiced_at': string;
    /**
     * Type is the type of the invoice. usage InvoiceTypeUsage base InvoiceTypeBase
     */
    'type': InvoiceTypeEnum;
    'updated_at'?: string;
    'v1'?: InvoiceDataV1;
}

export const InvoiceTypeEnum = {
    Usage: 'usage',
    Base: 'base',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type InvoiceTypeEnum = typeof InvoiceTypeEnum[keyof typeof InvoiceTypeEnum];

export interface InvoiceDataV1 {
    'billing_period': TimeInterval;
    /**
     * The currency of the invoice.
     */
    'currency': string;
    /**
     * Deleted is true if the invoice has been soft-deleted.
     */
    'deleted'?: boolean;
    /**
     * The items that are part of this invoice.
     */
    'items': Array<LineItemV1>;
    /**
     * The plan that this invoice is based on, in the format \"Name@version\".
     */
    'plan'?: string;
    'stripe_invoice_item'?: string;
    /**
     * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
     */
    'stripe_invoice_status'?: string;
    /**
     * An optional link to the invoice on Stripe.
     */
    'stripe_link'?: string;
    /**
     * The subtitle of the invoice.
     */
    'subtitle'?: string;
    'tax'?: TaxLineItem;
    /**
     * The title of the invoice.
     */
    'title': string;
    'total_in_cent': number;
}
export interface IsOwnerForProjectBySlug {
    /**
     * ProjectSlug is the project\'s slug.
     */
    'ProjectSlug': string;
    /**
     * Subject is the subject from the API key.
     */
    'Subject': string;
}
/**
 * A JSONPatch document as defined by RFC 6902
 */
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).
     */
    'from'?: string;
    /**
     * The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".
     */
    'op': JsonPatchOpEnum;
    /**
     * The path to the target path. Uses JSON pointer notation.  Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
     */
    'path': string;
    /**
     * The value to be used within the operations.  Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
     */
    'value'?: any;
}

export const JsonPatchOpEnum = {
    Add: 'add',
    Remove: 'remove',
    Replace: 'replace',
    Move: 'move',
    Copy: 'copy',
    Test: 'test',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type JsonPatchOpEnum = typeof JsonPatchOpEnum[keyof typeof JsonPatchOpEnum];

export interface JsonWebKey {
    /**
     * The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key.  The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
     */
    'alg': string;
    'crv'?: string;
    'd'?: string;
    'dp'?: string;
    'dq'?: string;
    'e'?: string;
    'k'?: string;
    /**
     * The \"kid\" (key ID) parameter is used to match a specific key.  This is used, for instance, to choose among a set of keys within a JWK Set during key rollover.  The structure of the \"kid\" value is unspecified.  When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values.  (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.)  The \"kid\" value is a case-sensitive string.
     */
    'kid': string;
    /**
     * The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.  The \"kty\" value is a case-sensitive string.
     */
    'kty': string;
    'n'?: string;
    'p'?: string;
    'q'?: string;
    'qi'?: string;
    /**
     * Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).
     */
    'use': string;
    'x'?: string;
    /**
     * The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280].  The certificate chain is represented as a JSON array of certificate value strings.  Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
     */
    'x5c'?: Array<string>;
    'y'?: string;
}
/**
 * JSON Web Key Set
 */
export interface JsonWebKeySet {
    /**
     * List of JSON Web Keys  The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.
     */
    'keys'?: Array<JsonWebKey>;
}
export interface KetoNamespace {
    'id'?: number;
    'name'?: string;
}
/**
 * For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
 */
export interface KeysetPaginationRequestParameters {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    'page_size'?: number;
    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    'page_token'?: string;
}
/**
 * The `Link` HTTP header contains multiple links (`first`, `next`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/sessions?page_size=250&page_token=>; rel=\"first\"`  For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
 */
export interface KeysetPaginationResponseHeaders {
    /**
     * The Link HTTP Header  The `Link` header contains a comma-delimited list of links to the following pages:  first: The first page of results. next: The next page of results.  Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples:  </admin/sessions?page_size=250&page_token={last_item_uuid}; rel=\"first\",/admin/sessions?page_size=250&page_token=>; rel=\"next\"
     */
    'link'?: string;
}
export interface LineItemV1 {
    'amount_in_cent'?: number;
    'description'?: string;
    /**
     * Each line item can have sub-items to create a hierarchy.
     */
    'items'?: Array<LineItemV1>;
    'quantity'?: number;
    'title'?: string;
    'unit_price'?: string;
}
/**
 * Event Stream List
 */
export interface ListEventStreams {
    'event_streams'?: Array<EventStream>;
}
export interface ListInvoicesResponse {
    'buckets': Array<BillingPeriodBucket>;
    'has_next_page': boolean;
    'next_page_token': string;
}
/**
 * B2B SSO Organization List
 */
export interface ListOrganizationsResponse {
    'has_next_page': boolean;
    'next_page_token': string;
    /**
     * The list of organizations
     */
    'organizations': Array<Organization>;
}
export interface ListWorkspaceProjects {
    'has_next_page': boolean;
    'next_page': string;
    'projects': Array<ProjectMetadata>;
}
export interface ListWorkspaces {
    'has_next_page': boolean;
    'next_page_token': string;
    'workspaces': Array<Workspace>;
}
/**
 * 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 {
    /**
     * 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 deviceauthn CredentialsTypeDeviceAuthn 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
     */
    'active'?: LoginFlowActiveEnum;
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    '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.
     */
    '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://<selfservice.flows.login.ui_url>/?flow=<flow_id>
     */
    'id': string;
    /**
     * IdentitySchema optionally holds the ID of the identity schema that is used for this flow. This value can be set by the user when creating the flow and should be retained when the flow is saved or converted to another flow.
     */
    'identity_schema'?: string;
    /**
     * IssuedAt is the time (UTC) when the flow started.
     */
    '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.
     */
    'oauth2_login_challenge'?: string;
    'oauth2_login_request'?: OAuth2LoginRequest;
    'organization_id'?: string | null;
    /**
     * Refresh stores whether this login flow should enforce re-authentication.
     */
    '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.
     */
    'request_url': string;
    'requested_aal'?: AuthenticatorAssuranceLevel;
    /**
     * ReturnTo contains the requested return_to URL.
     */
    '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.
     */
    '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.
     */
    'state': any;
    /**
     * TransientPayload is used to pass data from the login to hooks and email templates
     */
    'transient_payload'?: object;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'type': string;
    'ui': UiContainer;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    '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',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} 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 const LoginFlowState = {
    ChooseMethod: 'choose_method',
    SentEmail: 'sent_email',
    PassedChallenge: 'passed_challenge',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type LoginFlowState = typeof LoginFlowState[keyof typeof LoginFlowState];


/**
 * Logout Flow
 */
export interface LogoutFlow {
    /**
     * LogoutToken can be used to perform logout using AJAX.
     */
    'logout_token': string;
    /**
     * LogoutURL can be opened in a browser to sign the user out.  format: uri
     */
    'logout_url': string;
}
/**
 * Together the name and identity uuid are a unique index constraint. This prevents a user from having schemas with the same name. This also allows schemas to have the same name across the system.
 */
export interface ManagedIdentitySchema {
    /**
     * The gcs file name  This is a randomly generated name which is used to uniquely identify the file on the blob storage
     */
    'blob_name': string;
    /**
     * The publicly accessible url of the schema
     */
    'blob_url': string;
    /**
     * The Content Hash  Contains a hash of the schema\'s content.
     */
    'content_hash'?: string;
    /**
     * The Schema\'s Creation Date
     */
    'created_at': string;
    /**
     * The schema\'s ID.
     */
    'id': string;
    /**
     * The schema name  This is set by the user and is for them to easily recognise their schema
     */
    'name': string;
    /**
     * Last Time Schema was Updated
     */
    'updated_at': string;
}
/**
 * Ory Identity Schema Validation Result
 */
export interface ManagedIdentitySchemaValidationResult {
    'message'?: string;
    'valid'?: boolean;
}
export interface MemberInvite {
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at': string;
    /**
     * The invite\'s ID.
     */
    'id': string;
    /**
     * The invitee\'s email
     */
    'invitee_email': string;
    'invitee_id'?: string | null;
    /**
     * The invite owner\'s email Usually the project\'s owner email
     */
    'owner_email': string;
    /**
     * The invite owner\'s ID Usually the project\'s owner
     */
    'owner_id': string;
    'project_id'?: string | null;
    'role'?: string | null;
    /**
     * The invite\'s status Keeps track of the invites status such as pending, accepted, declined, expired pending PENDING accepted ACCEPTED declined DECLINED expired EXPIRED cancelled CANCELLED removed REMOVED
     */
    'status': MemberInviteStatusEnum;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at': string;
    'workspace_id'?: string | null;
}

export const MemberInviteStatusEnum = {
    Pending: 'pending',
    Accepted: 'accepted',
    Declined: 'declined',
    Expired: 'expired',
    Cancelled: 'cancelled',
    Removed: 'removed',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type MemberInviteStatusEnum = typeof MemberInviteStatusEnum[keyof typeof MemberInviteStatusEnum];

export interface Message {
    'body': string;
    'channel'?: string;
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    '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.
     */
    'dispatches'?: Array<MessageDispatch>;
    'id': string;
    'recipient': string;
    'send_count': number;
    'status': CourierMessageStatus;
    '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
     */
    'template_type': MessageTemplateTypeEnum;
    'type': CourierMessageType;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    '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',
    UnknownDefaultOpenApi: '11184809'
} 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 {
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    'created_at': string;
    'error'?: object;
    /**
     * The ID of this message dispatch
     */
    'id': string;
    /**
     * The ID of the message being dispatched
     */
    'message_id': string;
    /**
     * The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess
     */
    'status': MessageDispatchStatusEnum;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    'updated_at': string;
}

export const MessageDispatchStatusEnum = {
    Failed: 'failed',
    Success: 'success',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type MessageDispatchStatusEnum = typeof MessageDispatchStatusEnum[keyof typeof MessageDispatchStatusEnum];

/**
 * Represents a single datapoint/bucket of a time series
 */
export interface MetricsDatapoint {
    /**
     * The count of events that occured in this time
     */
    'count': number;
    /**
     * The time of the bucket
     */
    'time': string;
}
export interface Money {
    'Cents'?: number;
    'String'?: string;
    'Unit'?: string;
}
export interface Namespace {
    /**
     * Name of the namespace.
     */
    'name'?: string;
}
export interface NeedsPrivilegedSessionError {
    'error'?: GenericError;
    /**
     * Points to where to redirect the user to next.
     */
    'redirect_browser_to': string;
}
export interface NormalizedProject {
    /**
     * The Project\'s Creation Date
     */
    'created_at': string;
    'current_revision': NormalizedProjectRevision;
    /**
     * The environment of the project. prod Production stage Staging dev Development
     */
    'environment': NormalizedProjectEnvironmentEnum;
    /**
     * The project\'s data home region. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest us US global Global
     */
    'home_region': NormalizedProjectHomeRegionEnum;
    /**
     * The FQDN hostnames this project listens on
     */
    'hosts': Array<string>;
    /**
     * The project\'s ID.
     */
    'id': string;
    /**
     * The project\'s slug
     */
    'slug': string;
    /**
     * The state of the project. running Running halted Halted deleted Deleted
     */
    'state': NormalizedProjectStateEnum;
    'subscription_id'?: string | null;
    'subscription_plan'?: string | null;
    /**
     * Last Time Project was Updated
     */
    'updated_at': string;
    'workspace'?: Workspace;
    'workspace_id': string | null;
}

export const NormalizedProjectEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectEnvironmentEnum = typeof NormalizedProjectEnvironmentEnum[keyof typeof NormalizedProjectEnvironmentEnum];
export const NormalizedProjectHomeRegionEnum = {
    EuCentral: 'eu-central',
    AsiaNortheast: 'asia-northeast',
    UsEast: 'us-east',
    UsWest: 'us-west',
    Us: 'us',
    Global: 'global',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectHomeRegionEnum = typeof NormalizedProjectHomeRegionEnum[keyof typeof NormalizedProjectHomeRegionEnum];
export const NormalizedProjectStateEnum = {
    Running: 'running',
    Halted: 'halted',
    Deleted: 'deleted',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectStateEnum = typeof NormalizedProjectStateEnum[keyof typeof NormalizedProjectStateEnum];

export interface NormalizedProjectRevision {
    /**
     * The Account Experience\'s Custom Translations  Contains all Custom Translations for this project.
     */
    'account_experience_custom_translations'?: Array<RevisionAccountExperienceCustomTranslation>;
    /**
     * Holds the default locale for the account experience. This governs the \"default_locale\" setting.
     */
    'account_experience_default_locale'?: string;
    /**
     * The Account Experience\'s Enabled Locales  This governs the locales that are available in the account experience. This governs the \"enabled_locales\" setting.
     */
    'account_experience_enabled_locales'?: Array<string>;
    /**
     * Holds the URL to the account experience\'s dark theme favicon (currently unused). This governs the \"favicon_dark\" setting.
     */
    'account_experience_favicon_dark'?: string;
    /**
     * Holds the URL to the account experience\'s favicon. This governs the \"favicon_light\" setting.
     */
    'account_experience_favicon_light'?: string;
    /**
     * Holds the URL to the account experience\'s language behavior.  Can be one of: `respect_accept_language`: Respect the `Accept-Language` header. `force_default`: Force the default language. This governs the \"locale_behavior\" setting.
     */
    'account_experience_locale_behavior'?: string;
    /**
     * Holds the URL to the account experience\'s dark theme logo (currently unused). This governs the \"logo_dark\" setting.
     */
    'account_experience_logo_dark'?: string;
    /**
     * Holds the URL to the account experience\'s logo. This governs the \"logo_light\" setting.
     */
    'account_experience_logo_light'?: string;
    /**
     * Holds the URL to the account experience\'s dark theme variables. This governs the \"theme_variables_dark\" setting.
     */
    'account_experience_theme_variables_dark'?: string;
    /**
     * Holds the URL to the account experience\'s light theme variables. This governs the \"theme_variables_light\" setting.
     */
    'account_experience_theme_variables_light'?: string;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    /**
     * Whether to disable the account experience welcome screen, which is hosted under `/ui/welcome`. This governs the \"disable_welcome_screen\" setting.
     */
    'disable_account_experience_welcome_screen'?: boolean;
    /**
     * Whether the new account experience is enabled and reachable. This governs the \"enable_ax_v2\" setting.
     */
    'enable_ax_v2'?: boolean;
    /**
     * A list of custom claims which are allowed to be added top level to the Access Token. They cannot override reserved claims.  This governs the \"oauth2.allowed_top_level_claims\" setting.
     */
    'hydra_oauth2_allowed_top_level_claims'?: Array<string>;
    /**
     * Automatically grant authorized OAuth2 Scope in OAuth2 Client Credentials Flow.  Each OAuth2 Client is allowed to request a predefined OAuth2 Scope (for example `read write`). If this option is enabled, the full scope is automatically granted when performing the OAuth2 Client Credentials flow.  If disabled, the OAuth2 Client has to request the scope in the OAuth2 request by providing the `scope` query parameter.  Setting this option to true is common if you need compatibility with MITREid.  This governs the \"oauth2.client_credentials.default_grant_allowed_scope\" setting.
     */
    'hydra_oauth2_client_credentials_default_grant_allowed_scope'?: boolean;
    /**
     * Set to true if you want to exclude claim `nbf (not before)` part of access token.  This governs the \"oauth2.exclude_not_before_claim\" setting.
     */
    'hydra_oauth2_exclude_not_before_claim'?: boolean;
    /**
     * Configures if the issued at (`iat`) claim is required in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523).  If set to `false`, the `iat` claim is required. Set this value to `true` only after careful consideration.  This governs the \"oauth2.grant.jwt.iat_optional\" setting.
     */
    'hydra_oauth2_grant_jwt_iat_optional'?: boolean;
    /**
     * Configures if the JSON Web Token ID (`jti`) claim is required in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523).  If set to `false`, the `jti` claim is required. Set this value to `true` only after careful consideration.  This governs the \"oauth2.grant.jwt.jti_optional\" setting.
     */
    'hydra_oauth2_grant_jwt_jti_optional'?: boolean;
    /**
     * Configures what the maximum age of a JWT assertion used in the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (RFC7523) can be.  This feature uses the `exp` claim and `iat` claim to calculate assertion age. Assertions exceeding the max age will be denied.  Useful as a safety measure and recommended to keep below 720h.  This governs the \"oauth2.grant.jwt.max_ttl\" setting.
     */
    'hydra_oauth2_grant_jwt_max_ttl'?: string;
    /**
     * Configures the OAuth2 Grant Refresh Token Rotation Grace Period  If set to `null` or `\"0s\"`, the graceful refresh token rotation is disabled.  This governs the \"oauth2.grant.refresh_token_rotation_grace_period\" setting.
     */
    'hydra_oauth2_grant_refresh_token_rotation_grace_period'?: string;
    /**
     * Set to false if you don\'t want to mirror custom claims under \'ext\'.  This governs the \"oauth2.mirror_top_level_claims\" setting.
     */
    'hydra_oauth2_mirror_top_level_claims'?: boolean;
    /**
     * Configures whether PKCE should be enforced for all OAuth2 Clients.  This governs the \"oauth2.pkce.enforced\" setting.
     */
    'hydra_oauth2_pkce_enforced'?: boolean;
    /**
     * Configures whether PKCE should be enforced for OAuth2 Clients without a client secret (public clients).  This governs the \"oauth2.pkce.enforced_for_public_clients\" setting.
     */
    'hydra_oauth2_pkce_enforced_for_public_clients'?: boolean;
    /**
     * Set to true to keep custom claims that are not promoted to the top level in the \'ext\' claim. Only applies when mirror_top_level_claims is false.  This governs the \"oauth2.preserve_ext_claims\" setting.
     */
    'hydra_oauth2_preserve_ext_claims'?: boolean;
    /**
     * Sets the Refresh Token Hook Endpoint. If set this endpoint will be called during the OAuth2 Token Refresh grant update the OAuth2 Access Token claims.  This governs the \"oauth2.refresh_token_hook\" setting.
     */
    'hydra_oauth2_refresh_token_hook'?: string;
    /**
     * Sets the token hook endpoint for all grant types. If set it will be called while providing token to customize claims.  This governs the \"oauth2.token_hook.url\" setting.
     */
    'hydra_oauth2_token_hook'?: string;
    /**
     * The OpenID Connect Dynamic Client Registration specification has no concept of whitelisting OAuth 2.0 Scope. If you want to expose Dynamic Client Registration, you should set the default scope enabled for newly registered clients. Keep in mind that users can overwrite this default by setting the \"scope\" key in the registration payload, effectively disabling the concept of whitelisted scopes.  This governs the \"oidc.dynamic_client_registration.default_scope\" setting.
     */
    'hydra_oidc_dynamic_client_registration_default_scope'?: Array<string>;
    /**
     * Configures OpenID Connect Dynamic Client Registration.  This governs the \"oidc.dynamic_client_registration.enabled\" setting.
     */
    'hydra_oidc_dynamic_client_registration_enabled'?: boolean;
    /**
     * Configures OpenID Connect Discovery and overwrites the pairwise algorithm  This governs the \"oidc.subject_identifiers.pairwise_salt\" setting.
     */
    'hydra_oidc_subject_identifiers_pairwise_salt'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the list of Subject Identifier Algorithms to enable.  This governs the \"oidc.subject_identifiers.supported_types\" setting.
     */
    'hydra_oidc_subject_identifiers_supported_types'?: Array<string>;
    /**
     * Configures the Ory Hydra Cookie Secret  This governs the \"secrets.cookie\" setting.
     */
    'hydra_secrets_cookie'?: Array<string>;
    /**
     * Configures the Ory Hydra Pagination Secret  This governs the \"secrets.pagination\" setting.
     */
    'hydra_secrets_pagination'?: Array<string>;
    /**
     * Configures the Ory Hydra System Secret  This governs the \"secrets.system\" setting.
     */
    'hydra_secrets_system'?: Array<string>;
    /**
     * Configures the Ory Hydra Cookie Same Site Legacy Workaround  This governs the \"serve.cookies.same_site_legacy_workaround\" setting.
     */
    'hydra_serve_cookies_same_site_legacy_workaround'?: boolean;
    /**
     * Configures the Ory Hydra Cookie Same Site Mode  This governs the \"serve.cookies.same_site_mode\" setting.
     */
    'hydra_serve_cookies_same_site_mode'?: string;
    /**
     * Defines access token type  This governs the \"strategies.access_token\" setting. opaque Oauth2AccessTokenStrategyOpaque jwt Oauth2AccessTokenStrategyJwt
     */
    'hydra_strategies_access_token'?: NormalizedProjectRevisionHydraStrategiesAccessTokenEnum;
    /**
     * Define the claim to use as the scope in the access token.  This governs the \"strategies.jwt.scope_claim\" setting.  list: The scope claim is an array of strings named `scope`: `{ \"scope\": [\"read\", \"write\"] }` string: The scope claim is a space delimited list of strings named `scp`: `{ \"scp\": \"read write\" }` both: The scope claim is both a space delimited list and an array of strings named `scope` and `scp`: `{ \"scope\": [\"read\", \"write\"], \"scp\": \"read write\" }` list OAuth2JWTScopeClaimList string OAuth2JWTScopeClaimString both OAuth2JWTScopeClaimBoth
     */
    'hydra_strategies_jwt_scope_claim'?: NormalizedProjectRevisionHydraStrategiesJwtScopeClaimEnum;
    /**
     * Defines how scopes are matched. For more details have a look at https://github.com/ory/fosite#scopes  This governs the \"strategies.scope\" setting. exact Oauth2ScopeStrategyExact wildcard Oauth2ScopeStrategyWildcard
     */
    'hydra_strategies_scope'?: NormalizedProjectRevisionHydraStrategiesScopeEnum;
    /**
     * This governs the \"ttl.access_token\" setting.
     */
    'hydra_ttl_access_token'?: string;
    /**
     * Configures how long refresh tokens are valid.  Set to -1 for refresh tokens to never expire. This is not recommended!  This governs the \"ttl.auth_code\" setting.
     */
    'hydra_ttl_auth_code'?: string;
    /**
     * This governs the \"ttl.id_token\" setting.
     */
    'hydra_ttl_id_token'?: string;
    /**
     * Configures how long a user login and consent flow may take.  This governs the \"ttl.login_consent_request\" setting.
     */
    'hydra_ttl_login_consent_request'?: string;
    /**
     * Configures how long refresh tokens are valid.  Set to -1 for refresh tokens to never expire. This is not recommended!  This governs the \"ttl.refresh_token\" setting.
     */
    'hydra_ttl_refresh_token'?: string;
    /**
     * Sets the OAuth2 Consent Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.consent\" setting.
     */
    'hydra_urls_consent'?: string;
    /**
     * Sets the OAuth2 Error URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.error\" setting.
     */
    'hydra_urls_error'?: string;
    /**
     * Sets the OAuth2 Login Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.login\" setting.
     */
    'hydra_urls_login'?: string;
    /**
     * Sets the logout endpoint.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.logout\" setting.
     */
    'hydra_urls_logout'?: string;
    /**
     * When an OAuth2-related user agent requests to log out, they will be redirected to this url afterwards per default.  Defaults to the Ory Account Experience in development and your application in production mode when a custom domain is connected.  This governs the \"urls.post_logout_redirect\" setting.
     */
    'hydra_urls_post_logout_redirect'?: string;
    /**
     * Sets the OAuth2 Registration Endpoint URL of the OAuth2 User Login & Consent flow.  Defaults to the Ory Account Experience if left empty.  This governs the \"urls.registration\" setting.
     */
    'hydra_urls_registration'?: string;
    /**
     * This value will be used as the issuer in access and ID tokens. It must be specified and using HTTPS protocol, unless the development mode is enabled.  On the Ory Network it will be very rare that you want to modify this value. If left empty, it will default to the correct value for the Ory Network.  This governs the \"urls.self.issuer\" setting.
     */
    'hydra_urls_self_issuer'?: string;
    /**
     * A list of JSON Web Keys that should be exposed at that endpoint. This is usually the public key for verifying OpenID Connect ID Tokens. However, you might want to add additional keys here as well.  This governs the \"webfinger.jwks.broadcast_keys\" setting.
     */
    'hydra_webfinger_jwks_broadcast_keys'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the OAuth2 Authorization URL.  This governs the \"webfinger.oidc_discovery.auth_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_auth_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the OpenID Connect Dynamic Client Registration Endpoint.  This governs the \"webfinger.oidc_discovery.client_registration_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_client_registration_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites the JWKS URL.  This governs the \"webfinger.oidc_discovery.jwks_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_jwks_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites a list of supported claims to be broadcasted. Claim \"sub\" is always included.  This governs the \"webfinger.oidc_discovery.supported_claims\" setting.
     */
    'hydra_webfinger_oidc_discovery_supported_claims'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the scope OAuth 2.0 Clients may request. Scope `offline`, `offline_access`, and `openid` are always included.  This governs the \"webfinger.oidc_discovery.supported_scope\" setting.
     */
    'hydra_webfinger_oidc_discovery_supported_scope'?: Array<string>;
    /**
     * Configures OpenID Connect Discovery and overwrites the OAuth2 Token URL.  This governs the \"webfinger.oidc_discovery.token_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_token_url'?: string;
    /**
     * Configures OpenID Connect Discovery and overwrites userinfo endpoint to be advertised at the OpenID Connect Discovery endpoint /.well-known/openid-configuration. Defaults to Ory Hydra\'s userinfo endpoint at /userinfo. Set this value if you want to handle this endpoint yourself.  This governs the \"webfinger.oidc_discovery.userinfo_url\" setting.
     */
    'hydra_webfinger_oidc_discovery_userinfo_url'?: string;
    /**
     * The revision ID.
     */
    'id'?: string;
    /**
     * The Revisions\' Keto Namespace Configuration  The string is a URL pointing to an OPL file with the configuration.  This governs the \"namespaces.location\" setting.
     */
    'keto_namespace_configuration'?: string;
    'keto_namespaces'?: Array<KetoNamespace>;
    /**
     * Configures Keto\'s pagination secrets.  This governs the \"secrets.pagination\" setting.
     */
    'keto_secrets_pagination'?: Array<string>;
    /**
     * Configures the Ory Kratos Cookie SameSite Attribute  This governs the \"cookies.same_site\" setting.
     */
    'kratos_cookies_same_site'?: string;
    'kratos_courier_channels'?: Array<NormalizedProjectRevisionCourierChannel>;
    /**
     * The delivery strategy to use when sending emails  This governs the \"courier.delivery_strategy\" setting.  `smtp`: Use SMTP server `http`: Use the built in HTTP client to send the email to some remote service
     */
    'kratos_courier_delivery_strategy'?: string;
    /**
     * The location of the API key to use in the HTTP email sending service\'s authentication  `header`: Send the key value pair as a header `cookie`: Send the key value pair as a cookie This governs the \"courier.http.request_config.auth.config.in\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_in'?: string;
    /**
     * The name of the API key to use in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.name\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_name'?: string;
    /**
     * The value of the API key to use in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.value\" setting.
     */
    'kratos_courier_http_request_config_auth_api_key_value'?: string;
    /**
     * The password to use for basic auth in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.password\" setting.
     */
    'kratos_courier_http_request_config_auth_basic_auth_password'?: string;
    /**
     * The user to use for basic auth in the HTTP email sending service\'s authentication  This governs the \"courier.http.request_config.auth.config.user\" setting.
     */
    'kratos_courier_http_request_config_auth_basic_auth_user'?: string;
    /**
     * The authentication type to use while contacting the remote HTTP email sending service  This governs the \"courier.http.request_config.auth.type\" setting.  `basic_auth`: Use Basic Authentication `api_key`: Use API Key Authentication in a header or cookie
     */
    'kratos_courier_http_request_config_auth_type'?: string;
    /**
     * The Jsonnet template to generate the body to send to the remote HTTP email sending service  Should be valid Jsonnet and base64 encoded  This governs the \"courier.http.request_config.body\" setting.
     */
    'kratos_courier_http_request_config_body'?: string;
    /**
     * Any additional headers to send to the remote HTTP email sending service  This governs the \"courier.http.request_config.headers\" setting.
     */
    'kratos_courier_http_request_config_headers'?: object;
    /**
     * The http METHOD to use when calling the remote HTTP email sending service  This governs the \"courier.http.request_config.method\" setting.
     */
    'kratos_courier_http_request_config_method'?: string;
    /**
     * The URL of the remote HTTP email sending service  This governs the \"courier.http.request_config.url\" setting.
     */
    'kratos_courier_http_request_config_url'?: string;
    /**
     * Configures the Ory Kratos SMTP Connection URI  This governs the \"courier.smtp.connection_uri\" setting.
     */
    'kratos_courier_smtp_connection_uri'?: string;
    /**
     * Configures the Ory Kratos SMTP From Address  This governs the \"courier.smtp.from_address\" setting.
     */
    'kratos_courier_smtp_from_address'?: string;
    /**
     * Configures the Ory Kratos SMTP From Name  This governs the \"courier.smtp.from_name\" setting.
     */
    'kratos_courier_smtp_from_name'?: string;
    /**
     * Configures the Ory Kratos SMTP Connection Headers  This governs the \"courier.smtp.headers\" setting.
     */
    'kratos_courier_smtp_headers'?: object;
    /**
     * Configures the local_name to use in SMTP connections  This governs the \"courier.smtp.local_name\" setting.
     */
    'kratos_courier_smtp_local_name'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Body HTML Template  This governs the \"courier.templates.login_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Body Plaintext Template  This governs the \"courier.templates.login_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code Email Subject Template  This governs the \"courier.templates.login_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_login_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Login via Code SMS plain text body  This governs the \"courier.templates.login_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_login_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Body HTML Template  This governs the \"courier.templates.recovery_code.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Body Plaintext Template  This governs the \"courier.templates.recovery_code.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery via Code Email Subject Template  This governs the \"courier.templates.recovery_code.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_code_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Body HTML Template  This governs the \"courier.templates.recovery_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Body Plaintext Template  This governs the \"courier.templates.recovery_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery via Code Email Subject Template  This governs the \"courier.templates.recovery_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Body HTML Template  This governs the \"courier.templates.recovery.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Body Plaintext Template  This governs the \"courier.templates.recovery.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Recovery Email Subject Template  This governs the \"courier.templates.recovery.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Body HTML Template  This governs the \"courier.templates.recovery.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Body Plaintext Template  This governs the \"courier.templates.recovery.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Recovery Email Subject Template  This governs the \"courier.templates.recovery.valid.email.subject\" setting.
     */
    'kratos_courier_templates_recovery_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Body HTML Template  This governs the \"courier.templates.registration_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Body Plaintext Template  This governs the \"courier.templates.registration_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code Email Subject Template  This governs the \"courier.templates.registration_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_registration_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Registration via Code SMS Body Plaintext Template  This governs the \"courier.templates.registration_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_registration_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Body HTML Template  This governs the \"courier.templates.verification_code.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Body Plaintext Template  This governs the \"courier.templates.verification_code.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification via Code Email Subject Template  This governs the \"courier.templates.verification_code.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_code_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Body HTML Template  This governs the \"courier.templates.verification_code.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Body Plaintext Template  This governs the \"courier.templates.verification_code.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code Email Subject Template  This governs the \"courier.templates.verification_code.valid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_code_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification via Code SMS Body Plaintext  This governs the \"courier.templates.verification_code.valid.sms.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_code_valid_sms_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Body HTML Template  This governs the \"courier.templates.verification.invalid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Body Plaintext Template  This governs the \"courier.templates.verification.invalid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Invalid Verification Email Subject Template  This governs the \"courier.templates.verification.invalid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_invalid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Body HTML Template  This governs the \"courier.templates.verification.valid.email.body.html\" setting.
     */
    'kratos_courier_templates_verification_valid_email_body_html'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Body Plaintext Template  This governs the \"courier.templates.verification.valid.email.body.plaintext\" setting.
     */
    'kratos_courier_templates_verification_valid_email_body_plaintext'?: string;
    /**
     * Configures the Ory Kratos Valid Verification Email Subject Template  This governs the \"courier.templates.verification.valid.email.subject\" setting.
     */
    'kratos_courier_templates_verification_valid_email_subject'?: string;
    /**
     * Configures the Ory Kratos Session caching feature flag  This governs the \"feature_flags.cacheable_sessions\" setting.
     */
    'kratos_feature_flags_cacheable_sessions'?: boolean;
    /**
     * Configures the Ory Kratos Session caching max-age feature flag  This governs the \"feature_flags.cacheable_sessions_max_age\" setting.
     */
    'kratos_feature_flags_cacheable_sessions_max_age'?: string;
    /**
     * This governs the \"feature_flags.choose_recovery_address\" setting.
     */
    'kratos_feature_flags_choose_recovery_address'?: boolean;
    /**
     * Configures the Ory Kratos Faster Session Extend setting  If enabled allows faster session extension by skipping the session lookup and returning 201 instead of 200. Disabling this feature will be deprecated in the future.  This governs the \"feature_flags.faster_session_extend\" setting.
     */
    'kratos_feature_flags_faster_session_extend'?: boolean;
    /**
     * Always include show_verification_ui in continue_with  If true, restores the legacy behavior of always including `show_verification_ui` in the registration flow\'s `continue_with` when verification is enabled. If set to false, `show_verification_ui` is only set in `continue_with` if the `show_verification_ui` hook is used. This flag will be removed in the future.  This governs the \"feature_flags.legacy_continue_with_verification_ui\" setting.
     */
    'kratos_feature_flags_legacy_continue_with_verification_ui'?: boolean;
    /**
     * Controls whether the UI nodes in an OIDC registration flow have group \"oidc\" in case required fields are not returned by the OIDC provider.  If set to true, the UI nodes will have group \"oidc\" and the flow will be considered successful if the user completes the flow. This is the legacy behavior.  This governs the \"feature_flags.legacy_oidc_registration_node_group\" setting.
     */
    'kratos_feature_flags_legacy_oidc_registration_node_group'?: boolean;
    /**
     * Return a form error if the login identifier is not verified  If true, the login flow will return a form error if the login identifier is not verified, which restores legacy behavior. If this value is false, the `continue_with` array will contain a `show_verification_ui` hook instead.  This flag is deprecated and will be removed in the future.  This governs the \"feature_flags.legacy_require_verified_login_error\" setting.
     */
    'kratos_feature_flags_legacy_require_verified_login_error'?: boolean;
    /**
     * Configures the group for the password method in the registration flow.  If true, it sets the password method group value to \"password\" if it is the only method available. This is the legacy behavior. If false is, it sets the password method group value to \"default\".  This governs the \"feature_flags.password_profile_registration_node_group\" setting.
     */
    'kratos_feature_flags_password_profile_registration_node_group'?: boolean;
    /**
     * Configures the Ory Kratos Session use_continue_with_transitions flag  This governs the \"feature_flags.use_continue_with_transitions\" setting.
     */
    'kratos_feature_flags_use_continue_with_transitions'?: boolean;
    'kratos_identity_schemas'?: Array<NormalizedProjectRevisionIdentitySchema>;
    /**
     * Configures the OAuth2 Provider Integration HTTP Headers  This governs the \"oauth2_provider.headers\" setting.
     */
    'kratos_oauth2_provider_headers'?: object;
    /**
     * Kratos OAuth2 Provider Override Return To  Enabling this allows Kratos to set the return_to parameter automatically to the OAuth2 request URL on the login flow, allowing complex flows such as recovery to continue to the initial OAuth2 flow.  This governs the \"oauth2_provider.override_return_to\" setting.
     */
    'kratos_oauth2_provider_override_return_to'?: boolean;
    /**
     * The Revisions\' OAuth2 Provider Integration URL  This governs the \"oauth2_provider.url\" setting.
     */
    'kratos_oauth2_provider_url'?: string;
    /**
     * Configures the default read consistency level for identity APIs  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.  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`  Defaults to \"strong\" for new and existing projects. This feature is in preview. Use with caution. This governs the \"preview.default_read_consistency_level\" setting.
     */
    'kratos_preview_default_read_consistency_level'?: string;
    /**
     * Configures the Ory Kratos Cipher Secret  This governs the \"secrets.cipher\" setting.
     */
    'kratos_secrets_cipher'?: Array<string>;
    /**
     * Configures the Ory Kratos Cookie Secret  This governs the \"secrets.cookie\" setting.
     */
    'kratos_secrets_cookie'?: Array<string>;
    /**
     * Configures the Ory Kratos Default Secret  This governs the \"secrets.default\" setting.
     */
    'kratos_secrets_default'?: Array<string>;
    /**
     * Configures the Ory Kratos Pagination Secret  This governs the \"secrets.pagination\" setting.
     */
    'kratos_secrets_pagination'?: Array<string>;
    /**
     * Configures if account enumeration should be mitigated when using identifier first login.  This governs the \"security.account_enumeration.mitigate\" setting.
     */
    'kratos_security_account_enumeration_mitigate'?: boolean;
    /**
     * Configures the Ory Kratos Allowed Return URLs  This governs the \"selfservice.allowed_return_urls\" setting.
     */
    'kratos_selfservice_allowed_return_urls'?: Array<string>;
    /**
     * Configures the Ory Kratos Default Return URL  This governs the \"selfservice.default_browser_return_url\" setting.
     */
    'kratos_selfservice_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Error UI URL  This governs the \"selfservice.flows.error.ui_url\" setting.
     */
    'kratos_selfservice_flows_error_ui_url'?: string;
    /**
     * Configures the Ory Kratos Login After Code Default Return URL  This governs the \"selfservice.flows.login.after.code.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_code_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login Default Return URL  This governs the \"selfservice.flows.login.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Lookup Secret Default Return URL  This governs the \"selfservice.flows.login.after.lookup_secret.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_lookup_secret_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After OIDC Default Return URL  This governs the \"selfservice.flows.login.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Passkey Default Return URL  This governs the \"selfservice.flows.login.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After Password Default Return URL  This governs the \"selfservice.flows.login.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After TOTP Default Return URL  This governs the \"selfservice.flows.login.after.totp.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_totp_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login After WebAuthn Default Return URL  This governs the \"selfservice.flows.login.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_login_after_webauthn_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Login Lifespan  This governs the \"selfservice.flows.login.lifespan\" setting.
     */
    'kratos_selfservice_flows_login_lifespan'?: string;
    /**
     * Configures the Ory Kratos Login Flow Style  This governs the \"selfservice.flows.login.style\" setting. Possible values are \"unified\" and \"identifier_first\".
     */
    'kratos_selfservice_flows_login_style'?: string;
    /**
     * Configures the Ory Kratos Login UI URL  This governs the \"selfservice.flows.login.ui_url\" setting.
     */
    'kratos_selfservice_flows_login_ui_url'?: string;
    /**
     * Configures the Ory Kratos Logout Default Return URL  This governs the \"selfservice.flows.logout.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_logout_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Recovery Default Return URL  This governs the \"selfservice.flows.recovery.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_recovery_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Recovery Enabled Setting  This governs the \"selfservice.flows.recovery.enabled\" setting.
     */
    'kratos_selfservice_flows_recovery_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Recovery Lifespan  This governs the \"selfservice.flows.recovery.lifespan\" setting.
     */
    'kratos_selfservice_flows_recovery_lifespan'?: string;
    /**
     * Configures whether to notify unknown recipients of a Ory Kratos recovery flow  This governs the \"selfservice.flows.recovery.notify_unknown_recipients\" setting.
     */
    'kratos_selfservice_flows_recovery_notify_unknown_recipients'?: boolean;
    /**
     * Configures the Ory Kratos Recovery UI URL  This governs the \"selfservice.flows.recovery.ui_url\" setting.
     */
    'kratos_selfservice_flows_recovery_ui_url'?: string;
    /**
     * Configures the Ory Kratos Recovery strategy to use (\"link\" or \"code\")  This governs the \"selfservice.flows.recovery.use\" setting. link SelfServiceMessageVerificationStrategyLink code SelfServiceMessageVerificationStrategyCode
     */
    'kratos_selfservice_flows_recovery_use'?: NormalizedProjectRevisionKratosSelfserviceFlowsRecoveryUseEnum;
    /**
     * Configures the Ory Kratos Registration After Code Default Return URL  This governs the \"selfservice.flows.registration.after.code.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_code_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration Default Return URL  This governs the \"selfservice.flows.registration.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After OIDC Default Return URL  This governs the \"selfservice.flows.registration.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Passkey Default Return URL  This governs the \"selfservice.flows.registration.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Password Default Return URL  This governs the \"selfservice.flows.registration.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Registration After Webauthn Default Return URL  This governs the \"selfservice.flows.registration.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_registration_after_webauthn_default_browser_return_url'?: string;
    /**
     * Disable two-step registration  Two-step registration is a significantly improved sign up flow and recommended when using more than one sign up methods. To revert to one-step registration, set this to `true`.  This governs the \"selfservice.flows.registration.enable_legacy_one_step\" setting.
     */
    'kratos_selfservice_flows_registration_enable_legacy_one_step'?: boolean;
    /**
     * Configures the Whether Ory Kratos Registration is Enabled  This governs the \"selfservice.flows.registration.enabled\" setting.0
     */
    'kratos_selfservice_flows_registration_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Registration Lifespan  This governs the \"selfservice.flows.registration.lifespan\" setting.
     */
    'kratos_selfservice_flows_registration_lifespan'?: string;
    /**
     * Configures the Ory Kratos Registration Login Hints  Shows helpful information when a user tries to sign up with a duplicate account.  This governs the \"selfservice.flows.registration.login_hints\" setting.
     */
    'kratos_selfservice_flows_registration_login_hints'?: boolean;
    /**
     * Configures the Ory Kratos Registration UI URL  This governs the \"selfservice.flows.registration.ui_url\" setting.
     */
    'kratos_selfservice_flows_registration_ui_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL  This governs the \"selfservice.flows.settings.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Lookup Secrets  This governs the \"selfservice.flows.settings.after.lookup_secret.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_lookup_secret_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Social Sign In  This governs the \"selfservice.flows.settings.after.oidc.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_oidc_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Passkey  This governs the \"selfservice.flows.settings.after.passkey.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_passkey_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Passwords  This governs the \"selfservice.flows.settings.after.password.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_password_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating Profiles  This governs the \"selfservice.flows.settings.after.profile.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_profile_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating TOTP  This governs the \"selfservice.flows.settings.after.totp.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_totp_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Default Return URL After Updating WebAuthn  This governs the \"selfservice.flows.settings.after.webauthn.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_settings_after_webauthn_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Settings Lifespan  This governs the \"selfservice.flows.settings.lifespan\" setting.
     */
    'kratos_selfservice_flows_settings_lifespan'?: string;
    /**
     * Configures the Ory Kratos Settings Privileged Session Max Age  This governs the \"selfservice.flows.settings.privileged_session_max_age\" setting.
     */
    'kratos_selfservice_flows_settings_privileged_session_max_age'?: string;
    /**
     * Configures the Ory Kratos Settings Required AAL  This governs the \"selfservice.flows.settings.required_aal\" setting.
     */
    'kratos_selfservice_flows_settings_required_aal'?: string;
    /**
     * Configures the Ory Kratos Settings UI URL  This governs the \"selfservice.flows.settings.ui_url\" setting.
     */
    'kratos_selfservice_flows_settings_ui_url'?: string;
    /**
     * Configures the Ory Kratos Verification Default Return URL  This governs the \"selfservice.flows.verification.after.default_browser_return_url\" setting.
     */
    'kratos_selfservice_flows_verification_after_default_browser_return_url'?: string;
    /**
     * Configures the Ory Kratos Verification Enabled Setting  This governs the \"selfservice.flows.verification.enabled\" setting.
     */
    'kratos_selfservice_flows_verification_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Verification Lifespan  This governs the \"selfservice.flows.verification.lifespan\" setting.
     */
    'kratos_selfservice_flows_verification_lifespan'?: string;
    /**
     * Configures whether to notify unknown recipients of a Ory Kratos verification flow  This governs the \"selfservice.flows.verification.notify_unknown_recipients\" setting.
     */
    'kratos_selfservice_flows_verification_notify_unknown_recipients'?: boolean;
    /**
     * Configures the Ory Kratos Verification UI URL  This governs the \"selfservice.flows.verification.ui_url\" setting.
     */
    'kratos_selfservice_flows_verification_ui_url'?: string;
    /**
     * Configures the Ory Kratos Strategy to use for Verification  This governs the \"selfservice.flows.verification.use\" setting. link SelfServiceMessageVerificationStrategyLink code SelfServiceMessageVerificationStrategyCode
     */
    'kratos_selfservice_flows_verification_use'?: NormalizedProjectRevisionKratosSelfserviceFlowsVerificationUseEnum;
    /**
     * Configures the CAPTCHA allowed domains list  This governs the \"selfservice.methods.captcha.config.allowed_domains\" setting.
     */
    'kratos_selfservice_methods_captcha_config_allowed_domains'?: Array<string>;
    /**
     * Configures whether to use BYO or managed widget  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.byo\" setting.
     */
    'kratos_selfservice_methods_captcha_config_byo'?: boolean;
    /**
     * Configures the Cloudflare Turnstile site secret for Ory BYO CAPTCHA protection  The site secret is private and will be never be shared with the client. This key is write only and the value will not be returned in response to a read request.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.secret\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_byo_secret'?: string;
    /**
     * Configures the Cloudflare Turnstile site key for Ory BYO CAPTCHA protection  The site key is public and will be shared with the client.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.sitekey\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_byo_sitekey'?: string;
    /**
     * Configures the Cloudflare Turnstile site secret for managed CAPTCHA protection  The site secret is private and will be never be shared with the client. This key is write only and the value will not be returned in response to a read request.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.secret\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_secret'?: string;
    /**
     * Configures the Cloudflare Turnstile site key for managed CAPTCHA protection  The site key is public and will be shared with the client.  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.cf_turnstile.sitekey\" setting.
     */
    'kratos_selfservice_methods_captcha_config_cf_turnstile_sitekey'?: string;
    /**
     * Configures legacy CAPTCHA node injection behavior  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.config.legacy_inject_node\" setting.
     */
    'kratos_selfservice_methods_captcha_config_legacy_inject_node'?: boolean;
    /**
     * Configures the Ory Kratos Self-Service Methods\' Captcha Enabled Setting  Reach out to your account manager to enable this feature.  This governs the \"selfservice.methods.captcha.enabled\" setting.
     */
    'kratos_selfservice_methods_captcha_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Code Method\'s lifespan  This governs the \"selfservice.methods.code.config.lifespan\" setting.
     */
    'kratos_selfservice_methods_code_config_lifespan'?: string;
    /**
     * Configures the maximum number of attempts to submit a one-time code in kratos.  This governs the \"selfservice.methods.code.max_submissions\" setting.
     */
    'kratos_selfservice_methods_code_config_max_submissions'?: number;
    /**
     * Enables a fallback method required in certain legacy use cases.  This governs the \"selfservice.methods.code.config.missing_credential_fallback_enabled\" setting.
     */
    'kratos_selfservice_methods_code_config_missing_credential_fallback_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Code Method is enabled  This governs the \"selfservice.methods.code.enabled\" setting.
     */
    'kratos_selfservice_methods_code_enabled'?: boolean;
    /**
     * Configures whether the code method can be used to fulfil MFA flows  This governs the \"selfservice.methods.code.mfa_enabled\" setting.
     */
    'kratos_selfservice_methods_code_mfa_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Passwordless should use the Code Method  This governs the \"selfservice.methods.code.passwordless_enabled\" setting.
     */
    'kratos_selfservice_methods_code_passwordless_enabled'?: boolean;
    /**
     * This setting allows the code method to always login a user with code if they have registered with another authentication method such as password or social sign in.  This governs the \"selfservice.methods.code.passwordless_login_fallback_enabled\" setting.
     */
    'kratos_selfservice_methods_code_passwordless_login_fallback_enabled'?: boolean;
    /**
     * Configures the Base URL which Recovery, Verification, and Login Links Point to  It is recommended to leave this value empty. It will be appropriately configured to the best matching domain (e.g. when using custom domains) automatically.  This governs the \"selfservice.methods.link.config.base_url\" setting.
     */
    'kratos_selfservice_methods_link_config_base_url'?: string;
    /**
     * Configures the Ory Kratos Link Method\'s lifespan  This governs the \"selfservice.methods.link.config.lifespan\" setting.
     */
    'kratos_selfservice_methods_link_config_lifespan'?: string;
    /**
     * Configures whether Ory Kratos Link Method is enabled  This governs the \"selfservice.methods.link.enabled\" setting.
     */
    'kratos_selfservice_methods_link_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos TOTP Lookup Secret is enabled  This governs the \"selfservice.methods.lookup_secret.enabled\" setting.
     */
    'kratos_selfservice_methods_lookup_secret_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Third Party / OpenID Connect base redirect URI  This governs the \"selfservice.methods.oidc.config.base_redirect_uri\" setting.
     */
    'kratos_selfservice_methods_oidc_config_base_redirect_uri'?: string;
    'kratos_selfservice_methods_oidc_config_providers'?: Array<NormalizedProjectRevisionThirdPartyProvider>;
    /**
     * Configures whether Ory Kratos allows auto-linking of OIDC credentials without a subject  This governs the \"selfservice.methods.oidc.enable_auto_link_policy\" setting.
     */
    'kratos_selfservice_methods_oidc_enable_auto_link_policy'?: boolean;
    /**
     * Configures whether Ory Kratos Third Party / OpenID Connect Login is enabled  This governs the \"selfservice.methods.oidc.enabled\" setting.
     */
    'kratos_selfservice_methods_oidc_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Passkey RP Display Name  This governs the \"selfservice.methods.passkey.config.rp.display_name\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_display_name'?: string;
    /**
     * Configures the Ory Kratos Passkey RP ID  This governs the \"selfservice.methods.passkey.config.rp.id\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_id'?: string;
    /**
     * Configures the Ory Kratos Passkey RP Origins  This governs the \"selfservice.methods.passkey.config.rp.origins\" setting.
     */
    'kratos_selfservice_methods_passkey_config_rp_origins'?: Array<string>;
    /**
     * Configures whether Ory Kratos Passkey authentication is enabled  This governs the \"selfservice.methods.passkey.enabled\" setting.
     */
    'kratos_selfservice_methods_passkey_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password HIBP Checks is enabled  This governs the \"selfservice.methods.password.config.haveibeenpwned_enabled\" setting.
     */
    'kratos_selfservice_methods_password_config_haveibeenpwned_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password should disable the similarity policy.  This governs the \"selfservice.methods.password.config.identifier_similarity_check_enabled\" setting.
     */
    'kratos_selfservice_methods_password_config_identifier_similarity_check_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Password Should ignore HIBPWND Network Errors  This governs the \"selfservice.methods.password.config.ignore_network_errors\" setting.
     */
    'kratos_selfservice_methods_password_config_ignore_network_errors'?: boolean;
    /**
     * Configures Ory Kratos Password Max Breaches Detection  This governs the \"selfservice.methods.password.config.max_breaches\" setting.
     */
    'kratos_selfservice_methods_password_config_max_breaches'?: number;
    /**
     * Configures the minimum length of passwords.  This governs the \"selfservice.methods.password.config.min_password_length\" setting.
     */
    'kratos_selfservice_methods_password_config_min_password_length'?: number;
    /**
     * Configures whether Ory Kratos Password Method is enabled  This governs the \"selfservice.methods.password.enabled\" setting.
     */
    'kratos_selfservice_methods_password_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Profile Method is enabled  This governs the \"selfservice.methods.profile.enabled\" setting.
     */
    'kratos_selfservice_methods_profile_enabled'?: boolean;
    'kratos_selfservice_methods_saml_config_providers'?: Array<NormalizedProjectRevisionSAMLProvider>;
    /**
     * Configures whether Ory Kratos SAML Login is enabled  This governs the \"selfservice.methods.saml.enabled\" setting.
     */
    'kratos_selfservice_methods_saml_enabled'?: boolean;
    /**
     * Configures Ory Kratos TOTP Issuer  This governs the \"selfservice.methods.totp.config.issuer\" setting.
     */
    'kratos_selfservice_methods_totp_config_issuer'?: string;
    /**
     * Configures whether Ory Kratos TOTP Method is enabled  This governs the \"selfservice.methods.totp.enabled\" setting.
     */
    'kratos_selfservice_methods_totp_enabled'?: boolean;
    /**
     * Configures whether Ory Kratos Webauthn is used for passwordless flows  This governs the \"selfservice.methods.webauthn.config.passwordless\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_passwordless'?: boolean;
    /**
     * Configures the Ory Kratos Webauthn RP Display Name  This governs the \"selfservice.methods.webauthn.config.rp.display_name\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_display_name'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP Icon  This governs the \"selfservice.methods.webauthn.config.rp.icon\" setting. Deprecated: This value will be ignored due to security considerations.
     */
    'kratos_selfservice_methods_webauthn_config_rp_icon'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP ID  This governs the \"selfservice.methods.webauthn.config.rp.id\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_id'?: string;
    /**
     * Configures the Ory Kratos Webauthn RP Origins  This governs the \"selfservice.methods.webauthn.config.rp.origins\" setting.
     */
    'kratos_selfservice_methods_webauthn_config_rp_origins'?: Array<string>;
    /**
     * Configures whether Ory Kratos Webauthn is enabled  This governs the \"selfservice.methods.webauthn.enabled\" setting.
     */
    'kratos_selfservice_methods_webauthn_enabled'?: boolean;
    /**
     * Configures the Ory Kratos Session Cookie Persistent Attribute  This governs the \"session.cookie.persistent\" setting.
     */
    'kratos_session_cookie_persistent'?: boolean;
    /**
     * Configures the Ory Kratos Session Cookie SameSite Attribute  This governs the \"session.cookie.same_site\" setting.
     */
    'kratos_session_cookie_same_site'?: string;
    /**
     * Configures the Ory Kratos Session Lifespan  This governs the \"session.lifespan\" setting.
     */
    'kratos_session_lifespan'?: string;
    /**
     * Configures the Ory Kratos Session Whoami AAL requirement  This governs the \"session.whoami.required_aal\" setting.
     */
    'kratos_session_whoami_required_aal'?: string;
    'kratos_session_whoami_tokenizer_templates'?: Array<NormalizedProjectRevisionTokenizerTemplate>;
    /**
     * The project\'s name.
     */
    'name': string;
    'organizations'?: Array<Organization>;
    /**
     * The Revision\'s Project ID
     */
    'project_id'?: string;
    'project_revision_hooks'?: Array<NormalizedProjectRevisionHook>;
    'scim_clients'?: Array<NormalizedProjectRevisionScimClient>;
    /**
     * Configures the CORS Allowed Origins on admin APIs  This governs the \"serve.admin.cors.allowed_origins\" setting.
     */
    'serve_admin_cors_allowed_origins'?: Array<string>;
    /**
     * Enable CORS headers on all admin APIs  This governs the \"serve.admin.cors.enabled\" setting.
     */
    'serve_admin_cors_enabled'?: boolean;
    /**
     * Configures the CORS Allowed Origins on public APIs  This governs the \"serve.public.cors.allowed_origins\" setting.
     */
    'serve_public_cors_allowed_origins'?: Array<string>;
    /**
     * Enable CORS headers on all public APIs  This governs the \"serve.public.cors.enabled\" setting.
     */
    'serve_public_cors_enabled'?: boolean;
    /**
     * Whether the project should employ strict security measures. Setting this to true is recommended for going into production.
     */
    'strict_security'?: boolean;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
}

export const NormalizedProjectRevisionHydraStrategiesAccessTokenEnum = {
    Opaque: 'opaque',
    Jwt: 'jwt',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionHydraStrategiesAccessTokenEnum = typeof NormalizedProjectRevisionHydraStrategiesAccessTokenEnum[keyof typeof NormalizedProjectRevisionHydraStrategiesAccessTokenEnum];
export const NormalizedProjectRevisionHydraStrategiesJwtScopeClaimEnum = {
    List: 'list',
    String: 'string',
    Both: 'both',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionHydraStrategiesJwtScopeClaimEnum = typeof NormalizedProjectRevisionHydraStrategiesJwtScopeClaimEnum[keyof typeof NormalizedProjectRevisionHydraStrategiesJwtScopeClaimEnum];
export const NormalizedProjectRevisionHydraStrategiesScopeEnum = {
    Exact: 'exact',
    Wildcard: 'wildcard',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionHydraStrategiesScopeEnum = typeof NormalizedProjectRevisionHydraStrategiesScopeEnum[keyof typeof NormalizedProjectRevisionHydraStrategiesScopeEnum];
export const NormalizedProjectRevisionKratosSelfserviceFlowsRecoveryUseEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionKratosSelfserviceFlowsRecoveryUseEnum = typeof NormalizedProjectRevisionKratosSelfserviceFlowsRecoveryUseEnum[keyof typeof NormalizedProjectRevisionKratosSelfserviceFlowsRecoveryUseEnum];
export const NormalizedProjectRevisionKratosSelfserviceFlowsVerificationUseEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionKratosSelfserviceFlowsVerificationUseEnum = typeof NormalizedProjectRevisionKratosSelfserviceFlowsVerificationUseEnum[keyof typeof NormalizedProjectRevisionKratosSelfserviceFlowsVerificationUseEnum];

export interface NormalizedProjectRevisionCourierChannel {
    /**
     * The Channel\'s public ID
     */
    'channel_id': string;
    /**
     * The creation date
     */
    'created_at'?: string;
    /**
     * API key location  Can either be \"header\" or \"query\"
     */
    'request_config_auth_config_api_key_in'?: string;
    /**
     * API key name  Only used if the auth type is api_key
     */
    'request_config_auth_config_api_key_name'?: string;
    /**
     * API key value  Only used if the auth type is api_key
     */
    'request_config_auth_config_api_key_value'?: string;
    /**
     * Basic Auth Password  Only used if the auth type is basic_auth
     */
    'request_config_auth_config_basic_auth_password'?: string;
    /**
     * Basic Auth Username  Only used if the auth type is basic_auth
     */
    'request_config_auth_config_basic_auth_user'?: string;
    /**
     * HTTP Auth Method to use for the HTTP call  Can either be basic_auth or api_key basic_auth CourierChannelAuthTypeBasicAuth api_key CourierChannelAuthTypeApiKey
     */
    'request_config_auth_type'?: NormalizedProjectRevisionCourierChannelRequestConfigAuthTypeEnum;
    /**
     * URI pointing to the JsonNet template used for HTTP body payload generation.
     */
    'request_config_body': string;
    /**
     * NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
     */
    'request_config_headers'?: object | null;
    /**
     * The HTTP method to use (GET, POST, etc) for the HTTP call
     */
    'request_config_method': string;
    'request_config_url'?: string;
    /**
     * Last upate time
     */
    'updated_at'?: string;
}

export const NormalizedProjectRevisionCourierChannelRequestConfigAuthTypeEnum = {
    BasicAuth: 'basic_auth',
    ApiKey: 'api_key',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionCourierChannelRequestConfigAuthTypeEnum = typeof NormalizedProjectRevisionCourierChannelRequestConfigAuthTypeEnum[keyof typeof NormalizedProjectRevisionCourierChannelRequestConfigAuthTypeEnum];

export interface NormalizedProjectRevisionHook {
    /**
     * The Hooks Config Key
     */
    'config_key': string;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    /**
     * The Hook Type
     */
    'hook': string;
    /**
     * ID of the entry
     */
    'id'?: string;
    /**
     * The Revision\'s ID this schema belongs to
     */
    'project_revision_id'?: string;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
    /**
     * Whether to send the API Key in the HTTP Header or as a HTTP Cookie
     */
    'web_hook_config_auth_api_key_in'?: string;
    /**
     * The name of the api key
     */
    'web_hook_config_auth_api_key_name'?: string;
    /**
     * The value of the api key
     */
    'web_hook_config_auth_api_key_value'?: string;
    /**
     * The password to be sent in the HTTP Basic Auth Header
     */
    'web_hook_config_auth_basic_auth_password'?: string;
    /**
     * The username to be sent in the HTTP Basic Auth Header
     */
    'web_hook_config_auth_basic_auth_user'?: string;
    /**
     * HTTP Auth Method to use for the Web-Hook
     */
    'web_hook_config_auth_type'?: string;
    /**
     * URI pointing to the JsonNet template used for Web-Hook payload generation. Only used for those HTTP methods, which support HTTP body payloads.
     */
    'web_hook_config_body'?: string;
    /**
     * If enabled allows the web hook to interrupt / abort the self-service flow. It only applies to certain flows (registration/verification/login/settings) and requires a valid response format.
     */
    'web_hook_config_can_interrupt'?: boolean;
    /**
     * The HTTP method to use (GET, POST, etc) for the Web-Hook
     */
    'web_hook_config_method'?: string;
    /**
     * Whether to ignore the Web Hook response
     */
    'web_hook_config_response_ignore'?: boolean;
    /**
     * Whether to parse the Web Hook response
     */
    'web_hook_config_response_parse'?: boolean;
    /**
     * The URL the Web-Hook should call
     */
    'web_hook_config_url'?: string;
}
export interface NormalizedProjectRevisionIdentitySchema {
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    /**
     * The unique ID of this entry.
     */
    'id'?: string;
    'identity_schema'?: ManagedIdentitySchema;
    'identity_schema_id'?: string | null;
    /**
     * The imported (named) ID of the Identity Schema referenced in the Ory Kratos config.
     */
    'import_id'?: string;
    /**
     * The ImportURL can be used to import an Identity Schema from a bse64 encoded string. In the future, this key also support HTTPS and other sources!  If you import an Ory Kratos configuration, this would be akin to the `identity.schemas.#.url` key.  The configuration will always return the import URL when you fetch it from the API.
     */
    'import_url'?: string;
    /**
     * If true sets the default schema for identities  Only one schema can ever be the default schema. If you try to add two schemas with default to true, the request will fail.
     */
    'is_default'?: boolean;
    /**
     * Use a preset instead of a custom identity schema.
     */
    'preset'?: string;
    /**
     * The Revision\'s ID this schema belongs to
     */
    'project_revision_id'?: string;
    'selfservice_selectable'?: boolean;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
}
export interface NormalizedProjectRevisionSAMLProvider {
    'audience_override_base_url'?: string | null;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    'id'?: string;
    /**
     * Label represents an optional label which can be used in the UI generation.
     */
    'label'?: string;
    /**
     * Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider\'s data (e.g. GitHub or Google profile information) to hydrate the identity\'s data.
     */
    'mapper_url'?: string;
    'organization_id'?: string | null;
    /**
     * The Revision\'s ID this schema belongs to
     */
    'project_revision_id'?: string;
    /**
     * ID is the provider\'s ID
     */
    'provider_id'?: string;
    'proxy_acs_url'?: string | null;
    'proxy_saml_audience_override'?: string | null;
    /**
     * RawIDPMetadataXML is the raw XML metadata of the IDP.
     */
    'raw_idp_metadata_xml'?: string;
    /**
     * State indicates the state of the provider  Only providers with state `enabled` will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled
     */
    'state'?: NormalizedProjectRevisionSAMLProviderStateEnum;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
    /**
     * Valid to dates of all signing certs associated with the SAML connection
     */
    'valid_to'?: Array<string>;
}

export const NormalizedProjectRevisionSAMLProviderStateEnum = {
    Enabled: 'enabled',
    Disabled: 'disabled',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionSAMLProviderStateEnum = typeof NormalizedProjectRevisionSAMLProviderStateEnum[keyof typeof NormalizedProjectRevisionSAMLProviderStateEnum];

/**
 * SCIMClient represents a SCIM client configuration to be used by an external identity provider.
 */
export interface NormalizedProjectRevisionScimClient {
    /**
     * The secret that the client uses in the authorization header to authenticate itself.
     */
    'authorization_header_secret': string;
    /**
     * The unique ID of the SCIM server.
     */
    'client_id': string;
    /**
     * The SCIM client\'s creation time
     */
    'created_at'?: string;
    'id'?: string;
    /**
     * The SCIM server\'s label
     */
    'label': string;
    /**
     * Mapper specifies the JSONNet code snippet which uses the SCIM provider\'s data to hydrate the identity\'s data.
     */
    'mapper_url': string;
    /**
     * OrganizationID is the organization ID for this SCIM server.
     */
    'organization_id': string;
    'proxy_scim_server_url'?: string | null;
    /**
     * State indicates the state of the SCIM server  Only servers with state `enabled` will be available for SCIM provisioning. enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled
     */
    'state'?: NormalizedProjectRevisionScimClientStateEnum;
    /**
     * Last time the SCIM client was updated
     */
    'updated_at'?: string;
}

export const NormalizedProjectRevisionScimClientStateEnum = {
    Enabled: 'enabled',
    Disabled: 'disabled',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionScimClientStateEnum = typeof NormalizedProjectRevisionScimClientStateEnum[keyof typeof NormalizedProjectRevisionScimClientStateEnum];

export interface NormalizedProjectRevisionThirdPartyProvider {
    /**
     * AAL2ACRValues lists upstream OIDC `acr` claim values that should elevate the resulting Kratos session to AAL2. Empty means the upstream `acr` claim is ignored when deciding session AAL.
     */
    'aal2_acr_values'?: Array<string>;
    /**
     * AAL2AMRValues lists upstream OIDC `amr` claim values that should elevate the resulting Kratos session to AAL2 when any of them appears in the upstream `amr` array. Empty means the upstream `amr` claim is ignored when deciding session AAL.
     */
    'aal2_amr_values'?: Array<string>;
    /**
     * AccountLinkingMode controls how account conflicts are resolved for this provider.  Possible values are `confirm_with_existing_credential` (default) and `automatic`. `automatic` silently links accounts when the provider verifies email ownership. Only supported for `apple` and `google` providers. automatic AccountLinkingModeAutomatic  AccountLinkingModeAutomatic silently links accounts if the provider verifies email ownership. confirm_with_existing_credential AccountLinkingModeConfirmWithExistingCredential  AccountLinkingModeConfirmWithExistingCredential requires the user to confirm the account linking by providing an existing credential.
     */
    'account_linking_mode'?: NormalizedProjectRevisionThirdPartyProviderAccountLinkingModeEnum;
    /**
     * AdditionalIDTokenAudiences is a list of additional audiences allowed in the ID Token.  This is only relevant in OIDC flows that submit an IDToken instead of using the callback from the OIDC provider.
     */
    'additional_id_token_audiences'?: Array<string>;
    'apple_private_key'?: string | null;
    /**
     * Apple Private Key Identifier  Sign In with Apple Private Key Identifier needed for generating a JWT token for client secret
     */
    'apple_private_key_id'?: string;
    /**
     * Apple Developer Team ID  Apple Developer Team ID needed for generating a JWT token for client secret
     */
    'apple_team_id'?: string;
    /**
     * AuthURL is the authorize url, typically something like: https://example.org/oauth2/auth Should only be used when the OAuth2 / OpenID Connect server is not supporting OpenID Connect Discovery and when `provider` is set to `generic`.
     */
    'auth_url'?: string;
    /**
     * Tenant is the Azure AD Tenant to use for authentication, and must be set when `provider` is set to `microsoft`.  Can be either `common`, `organizations`, `consumers` for a multitenant application or a specific tenant like `8eaef023-2b34-4da1-9baa-8bc8c9d6a490` or `contoso.onmicrosoft.com`.
     */
    'azure_tenant'?: string;
    'claims_source'?: string | null;
    /**
     * ClientID is the application\'s Client ID.
     */
    'client_id'?: string;
    'client_secret'?: string | null;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    'fedcm_config_url'?: string | null;
    'id'?: string;
    /**
     * IssuerURL is the OpenID Connect Server URL. You can leave this empty if `provider` is not set to `generic`. If set, neither `auth_url` nor `token_url` are required.
     */
    'issuer_url'?: string;
    /**
     * Label represents an optional label which can be used in the UI generation.
     */
    'label'?: string;
    /**
     * Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider\'s data (e.g. GitHub or Google profile information) to hydrate the identity\'s data.
     */
    'mapper_url'?: string;
    'net_id_token_origin_header'?: string | null;
    'organization_id'?: string | null;
    'pkce'?: NormalizedProjectRevisionThirdPartyProviderPkceEnum | null;
    /**
     * The Revision\'s ID this provider belongs to
     */
    'project_revision_id'?: string;
    /**
     * Provider is either \"generic\" for a generic OAuth 2.0 / OpenID Connect Provider or one of: generic google github gitlab microsoft discord slack facebook vk yandex apple
     */
    'provider'?: string;
    /**
     * ID is the provider\'s ID
     */
    'provider_id'?: string;
    /**
     * Proxy OIDC Redirect URL if overriding with a customer-controlled URL
     */
    'proxy_oidc_redirect_url'?: string;
    'requested_claims'?: object;
    /**
     * Scope specifies optional requested permissions.
     */
    'scope'?: Array<string>;
    /**
     * State indicates the state of the provider  Only providers with state `enabled` will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled
     */
    'state'?: NormalizedProjectRevisionThirdPartyProviderStateEnum;
    'subject_source'?: string | null;
    /**
     * TokenURL is the token url, typically something like: https://example.org/oauth2/token  Should only be used when the OAuth2 / OpenID Connect server is not supporting OpenID Connect Discovery and when `provider` is set to `generic`.
     */
    'token_url'?: string;
    /**
     * UpdateIdentityOnLogin controls whether the identity is updated from OIDC claims on each login.  Possible values are \"never\" (default) and \"automatic\". never UpdateIdentityOnLoginNever  UpdateIdentityOnLoginNever disables identity updates on login (default). automatic UpdateIdentityOnLoginAutomatic  UpdateIdentityOnLoginAutomatic re-runs the Jsonnet claims mapper on every  OIDC login and updates the identity\'s traits and metadata automatically.
     */
    'update_identity_on_login'?: NormalizedProjectRevisionThirdPartyProviderUpdateIdentityOnLoginEnum;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
}

export const NormalizedProjectRevisionThirdPartyProviderAccountLinkingModeEnum = {
    Automatic: 'automatic',
    ConfirmWithExistingCredential: 'confirm_with_existing_credential',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionThirdPartyProviderAccountLinkingModeEnum = typeof NormalizedProjectRevisionThirdPartyProviderAccountLinkingModeEnum[keyof typeof NormalizedProjectRevisionThirdPartyProviderAccountLinkingModeEnum];
export const NormalizedProjectRevisionThirdPartyProviderPkceEnum = {
    Auto: 'auto',
    Never: 'never',
    Force: 'force',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionThirdPartyProviderPkceEnum = typeof NormalizedProjectRevisionThirdPartyProviderPkceEnum[keyof typeof NormalizedProjectRevisionThirdPartyProviderPkceEnum];
export const NormalizedProjectRevisionThirdPartyProviderStateEnum = {
    Enabled: 'enabled',
    Disabled: 'disabled',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionThirdPartyProviderStateEnum = typeof NormalizedProjectRevisionThirdPartyProviderStateEnum[keyof typeof NormalizedProjectRevisionThirdPartyProviderStateEnum];
export const NormalizedProjectRevisionThirdPartyProviderUpdateIdentityOnLoginEnum = {
    Never: 'never',
    Automatic: 'automatic',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionThirdPartyProviderUpdateIdentityOnLoginEnum = typeof NormalizedProjectRevisionThirdPartyProviderUpdateIdentityOnLoginEnum[keyof typeof NormalizedProjectRevisionThirdPartyProviderUpdateIdentityOnLoginEnum];

export interface NormalizedProjectRevisionTokenizerTemplate {
    /**
     * Claims mapper URL
     */
    'claims_mapper_url'?: string;
    /**
     * The Project\'s Revision Creation Date
     */
    'created_at'?: string;
    /**
     * The revision ID.
     */
    'id'?: string;
    /**
     * JSON Web Key URL
     */
    'jwks_url'?: string;
    /**
     * The unique key of the template
     */
    'key'?: string;
    /**
     * The Revision\'s ID this schema belongs to
     */
    'project_revision_id'?: string;
    /**
     * Subject source for the tokenizer  Can be either id or external_id or empty
     */
    'subject_source'?: NormalizedProjectRevisionTokenizerTemplateSubjectSourceEnum;
    /**
     * Token time to live
     */
    'ttl'?: string;
    /**
     * Last Time Project\'s Revision was Updated
     */
    'updated_at'?: string;
}

export const NormalizedProjectRevisionTokenizerTemplateSubjectSourceEnum = {
    Id: 'id',
    ExternalId: 'external_id',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type NormalizedProjectRevisionTokenizerTemplateSubjectSourceEnum = typeof NormalizedProjectRevisionTokenizerTemplateSubjectSourceEnum[keyof typeof NormalizedProjectRevisionTokenizerTemplateSubjectSourceEnum];

/**
 * OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 */
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.com/docs/oauth2-oidc/jwt-access-token Setting the strategy here overrides the global setting in `strategies.access_token`.
     */
    'access_token_strategy'?: string;
    /**
     * OAuth 2.0 Client Allowed CORS Origins  One or more URLs (scheme://host[:port]) which are allowed to make CORS requests to the /oauth/token endpoint. If this array is empty, the server\'s CORS origin configuration (`CORS_ALLOWED_ORIGINS`) will be used instead. If this array is set, the allowed origins are appended to the server\'s CORS origin configuration. Be aware that environment variable `CORS_ENABLED` MUST be set to `true` for this to work.
     */
    'allowed_cors_origins'?: Array<string>;
    /**
     * OAuth 2.0 Client Audience  An allow-list defining the audiences this client is allowed to request tokens for. An audience limits the applicability of an OAuth 2.0 Access Token to, for example, certain API endpoints. The value is a list of URLs. URLs MUST NOT contain whitespaces.
     */
    'audience'?: Array<string>;
    'authorization_code_grant_access_token_lifespan'?: string | null;
    'authorization_code_grant_id_token_lifespan'?: string | null;
    'authorization_code_grant_refresh_token_lifespan'?: string | null;
    /**
     * 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.
     */
    '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.
     */
    'backchannel_logout_uri'?: string;
    'client_credentials_grant_access_token_lifespan'?: string | null;
    /**
     * OAuth 2.0 Client ID  The ID is immutable. If no ID is provided, a UUID4 will be generated.
     */
    'client_id'?: string;
    /**
     * OAuth 2.0 Client Name  The human-readable name of the client to be presented to the end-user during authorization.
     */
    '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.
     */
    'client_secret'?: string;
    /**
     * OAuth 2.0 Client Secret Expires At  The field is currently not supported and its value is always 0.
     */
    '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.
     */
    'client_uri'?: string;
    /**
     * OAuth 2.0 Client Contact  An array of strings representing ways to contact people responsible for this client, typically email addresses.
     */
    'contacts'?: Array<string>;
    /**
     * OAuth 2.0 Client Creation Date  CreatedAt returns the timestamp of the client\'s creation.
     */
    'created_at'?: string;
    'device_authorization_grant_access_token_lifespan'?: string | null;
    'device_authorization_grant_id_token_lifespan'?: string | null;
    'device_authorization_grant_refresh_token_lifespan'?: string | null;
    /**
     * 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.
     */
    '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.
     */
    'frontchannel_logout_uri'?: string;
    /**
     * OAuth 2.0 Client Grant Types  An array of OAuth 2.0 grant types the client is allowed to use. Can be one of:  Client Credentials Grant: `client_credentials` Authorization Code Grant: `authorization_code` OpenID Connect Implicit Grant (deprecated!): `implicit` Refresh Token Grant: `refresh_token` OAuth 2.0 Token Exchange: `urn:ietf:params:oauth:grant-type:jwt-bearer` OAuth 2.0 Device Code Grant: `urn:ietf:params:oauth:grant-type:device_code`
     */
    'grant_types'?: Array<string>;
    'implicit_grant_access_token_lifespan'?: string | null;
    'implicit_grant_id_token_lifespan'?: string | null;
    'jwks'?: JsonWebKeySet;
    /**
     * 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.
     */
    'jwks_uri'?: string;
    'jwt_bearer_grant_access_token_lifespan'?: string | null;
    /**
     * OAuth 2.0 Client Logo URI  A URL string referencing the client\'s logo.
     */
    'logo_uri'?: string;
    'metadata'?: object;
    /**
     * OAuth 2.0 Client Owner  Owner is a string identifying the owner of the OAuth 2.0 Client.
     */
    '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.
     */
    'policy_uri'?: string;
    /**
     * Allowed Post-Redirect Logout URIs  Array of URLs supplied by the RP to which it MAY request that the End-User\'s User Agent be redirected using the post_logout_redirect_uri parameter after a logout has been performed.
     */
    'post_logout_redirect_uris'?: Array<string>;
    /**
     * OAuth 2.0 Client Redirect URIs  RedirectURIs is an array of allowed redirect urls for the client.
     */
    'redirect_uris'?: Array<string>;
    'refresh_token_grant_access_token_lifespan'?: string | null;
    'refresh_token_grant_id_token_lifespan'?: string | null;
    'refresh_token_grant_refresh_token_lifespan'?: string | null;
    /**
     * 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.
     */
    'registration_access_token'?: string;
    /**
     * OpenID Connect Dynamic Client Registration URL  RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.
     */
    '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.
     */
    'request_object_signing_alg'?: string;
    /**
     * OpenID Connect Request URIs  Array of request_uri values that are pre-registered by the RP for use at the OP. Servers MAY cache the contents of the files referenced by these URIs and not retrieve them at the time they are used in a request. OPs can require that request_uri values used be pre-registered with the require_request_uri_registration discovery parameter.
     */
    'request_uris'?: Array<string>;
    /**
     * OAuth 2.0 Client Response Types  An array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint. Can be one of:  Needed for OpenID Connect Implicit Grant: Returns ID Token to redirect URI: `id_token` Returns Access token redirect URI: `token` Needed for Authorization Code Grant: `code`
     */
    'response_types'?: Array<string>;
    /**
     * 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.
     */
    '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.
     */
    'sector_identifier_uri'?: string;
    /**
     * SkipConsent skips the consent screen for this client. This field can only be set from the admin API.
     */
    'skip_consent'?: boolean;
    /**
     * SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.
     */
    '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`.
     */
    '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.
     */
    'token_endpoint_auth_method'?: string;
    /**
     * OAuth 2.0 Token Endpoint Signing Algorithm  Requested Client Authentication signing algorithm for the Token Endpoint.
     */
    '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.
     */
    'tos_uri'?: string;
    /**
     * OAuth 2.0 Client Last Update Date  UpdatedAt returns the timestamp of the last update.
     */
    '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.
     */
    'userinfo_signed_response_alg'?: string;
}
/**
 * Lifespans of different token types issued for this OAuth 2.0 Client.
 */
export interface OAuth2ClientTokenLifespans {
    'authorization_code_grant_access_token_lifespan'?: string | null;
    'authorization_code_grant_id_token_lifespan'?: string | null;
    'authorization_code_grant_refresh_token_lifespan'?: string | null;
    'client_credentials_grant_access_token_lifespan'?: string | null;
    'device_authorization_grant_access_token_lifespan'?: string | null;
    'device_authorization_grant_id_token_lifespan'?: string | null;
    'device_authorization_grant_refresh_token_lifespan'?: string | null;
    'implicit_grant_access_token_lifespan'?: string | null;
    'implicit_grant_id_token_lifespan'?: string | null;
    'jwt_bearer_grant_access_token_lifespan'?: string | null;
    'refresh_token_grant_access_token_lifespan'?: string | null;
    'refresh_token_grant_id_token_lifespan'?: string | null;
    'refresh_token_grant_refresh_token_lifespan'?: string | null;
}
export interface OAuth2ConsentRequest {
    /**
     * ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
     */
    'acr'?: string;
    /**
     * AMR is the Authentication Methods References value for this authentication session. You can use it to specify the method a user used to authenticate. For example, if the acr indicates a user used two factor authentication, the amr can express they used a software-secured key.
     */
    'amr'?: Array<string>;
    /**
     * Challenge is used to retrieve/accept/deny the consent request.
     */
    'challenge': string;
    'client'?: OAuth2Client;
    /**
     * ConsentRequestID is the ID of the consent request.
     */
    'consent_request_id'?: string;
    'context'?: object;
    /**
     * LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.
     */
    'login_challenge'?: string;
    /**
     * LoginSessionID 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.
     */
    'login_session_id'?: string;
    '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.
     */
    'request_url'?: string;
    /**
     * RequestedAudience contains the access token audience as requested by the OAuth 2.0 Client.
     */
    'requested_access_token_audience'?: Array<string>;
    /**
     * RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
     */
    'requested_scope'?: Array<string>;
    /**
     * Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.
     */
    '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.
     */
    'subject'?: string;
}
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.
     */
    'acr_values'?: Array<string>;
    /**
     * 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.
     */
    '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.
     */
    '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.
     */
    '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.
     */
    'ui_locales'?: Array<string>;
}
/**
 * A completed OAuth 2.0 Consent Session.
 */
export interface OAuth2ConsentSession {
    'consent_request'?: OAuth2ConsentRequest;
    /**
     * ConsentRequestID is the identifier of the consent request that initiated this consent session.
     */
    'consent_request_id'?: string;
    'context'?: object;
    /**
     * Audience Granted  GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.
     */
    'grant_access_token_audience'?: Array<string>;
    /**
     * Scope Granted  GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`.
     */
    'grant_scope'?: Array<string>;
    'handled_at'?: string;
    /**
     * Remember Consent  Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
     */
    'remember'?: boolean;
    /**
     * Remember Consent For  RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.
     */
    'remember_for'?: number;
    'session'?: AcceptOAuth2ConsentRequestSession;
}
export interface OAuth2LoginRequest {
    /**
     * ID is the identifier of the login request.
     */
    'challenge': string;
    'client': OAuth2Client;
    '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.
     */
    'request_url': string;
    /**
     * RequestedAudience contains the access token audience as requested by the OAuth 2.0 Client.
     */
    'requested_access_token_audience'?: Array<string>;
    /**
     * RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
     */
    'requested_scope'?: Array<string>;
    /**
     * 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.
     */
    '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.
     */
    '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.
     */
    'subject': string;
}
export interface OAuth2LogoutRequest {
    /**
     * Challenge is the identifier of the logout authentication request.
     */
    'challenge'?: string;
    'client'?: OAuth2Client;
    'expires_at'?: string;
    /**
     * RequestURL is the original Logout URL requested.
     */
    'request_url'?: string;
    'requested_at'?: string;
    /**
     * RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.
     */
    'rp_initiated'?: boolean;
    /**
     * SessionID is the login session ID that was requested to log out.
     */
    'sid'?: string;
    /**
     * Subject is the user for whom the logout was request.
     */
    'subject'?: string;
}
/**
 * Contains a redirect URL used to complete a login, consent, or logout request.
 */
export interface OAuth2RedirectTo {
    /**
     * RedirectURL is the URL which you should redirect the user\'s browser to once the authentication process is completed.
     */
    'redirect_to': string;
}
/**
 * OAuth2 Token Exchange Result
 */
export interface OAuth2TokenExchange {
    /**
     * The access token issued by the authorization server.
     */
    'access_token'?: string;
    /**
     * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.
     */
    'expires_in'?: number;
    /**
     * To retrieve a refresh token request the id_token scope.
     */
    'id_token'?: string;
    /**
     * The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.
     */
    'refresh_token'?: string;
    /**
     * The scope of the access token
     */
    'scope'?: string;
    /**
     * The type of the token issued
     */
    'token_type'?: string;
}
/**
 * Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others.
 */
export interface OidcConfiguration {
    /**
     * OAuth 2.0 Authorization Endpoint URL
     */
    'authorization_endpoint': string;
    /**
     * OpenID Connect Back-Channel Logout Session Required  Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
     */
    'backchannel_logout_session_supported'?: boolean;
    /**
     * OpenID Connect Back-Channel Logout Supported  Boolean value specifying whether the OP supports back-channel logout, with true indicating support.
     */
    'backchannel_logout_supported'?: boolean;
    /**
     * OpenID Connect Claims Parameter Parameter Supported  Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.
     */
    'claims_parameter_supported'?: boolean;
    /**
     * OpenID Connect Supported Claims  JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.
     */
    'claims_supported'?: Array<string>;
    /**
     * OAuth 2.0 PKCE Supported Code Challenge Methods  JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.
     */
    'code_challenge_methods_supported'?: Array<string>;
    /**
     * OpenID Connect Verifiable Credentials Endpoint  Contains the URL of the Verifiable Credentials Endpoint.
     */
    'credentials_endpoint_draft_00'?: string;
    /**
     * OpenID Connect Verifiable Credentials Supported  JSON array containing a list of the Verifiable Credentials supported by this authorization server.
     */
    'credentials_supported_draft_00'?: Array<CredentialSupportedDraft00>;
    /**
     * OAuth 2.0 Device Authorization Endpoint URL
     */
    'device_authorization_endpoint': string;
    /**
     * OpenID Connect End-Session Endpoint  URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.
     */
    'end_session_endpoint'?: string;
    /**
     * OpenID Connect Front-Channel Logout Session Required  Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.
     */
    'frontchannel_logout_session_supported'?: boolean;
    /**
     * OpenID Connect Front-Channel Logout Supported  Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.
     */
    'frontchannel_logout_supported'?: boolean;
    /**
     * OAuth 2.0 Supported Grant Types  JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.
     */
    'grant_types_supported'?: Array<string>;
    /**
     * OpenID Connect Default ID Token Signing Algorithms  Algorithm used to sign OpenID Connect ID Tokens.
     */
    'id_token_signed_response_alg': Array<string>;
    /**
     * OpenID Connect Supported ID Token Signing Algorithms  JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.
     */
    'id_token_signing_alg_values_supported': Array<string>;
    /**
     * OpenID Connect Issuer URL  An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
     */
    'issuer': string;
    /**
     * OpenID Connect Well-Known JSON Web Keys URL  URL of the OP\'s JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server\'s encryption key(s), which are used by RPs to encrypt requests to the Server. 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.
     */
    'jwks_uri': string;
    /**
     * OpenID Connect Dynamic Client Registration Endpoint URL
     */
    'registration_endpoint'?: string;
    /**
     * OpenID Connect Supported Request Object Signing Algorithms  JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).
     */
    'request_object_signing_alg_values_supported'?: Array<string>;
    /**
     * OpenID Connect Request Parameter Supported  Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.
     */
    'request_parameter_supported'?: boolean;
    /**
     * OpenID Connect Request URI Parameter Supported  Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.
     */
    'request_uri_parameter_supported'?: boolean;
    /**
     * OpenID Connect Requires Request URI Registration  Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.
     */
    'require_request_uri_registration'?: boolean;
    /**
     * OAuth 2.0 Supported Response Modes  JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.
     */
    'response_modes_supported'?: Array<string>;
    /**
     * OAuth 2.0 Supported Response Types  JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.
     */
    'response_types_supported': Array<string>;
    /**
     * OAuth 2.0 Token Revocation URL  URL of the authorization server\'s OAuth 2.0 revocation endpoint.
     */
    'revocation_endpoint'?: string;
    /**
     * OAuth 2.0 Supported Scope Values  JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used
     */
    'scopes_supported'?: Array<string>;
    /**
     * OpenID Connect Supported Subject Types  JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
     */
    'subject_types_supported': Array<string>;
    /**
     * OAuth 2.0 Token Endpoint URL
     */
    'token_endpoint': string;
    /**
     * OAuth 2.0 Supported Client Authentication Methods  JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0
     */
    'token_endpoint_auth_methods_supported'?: Array<string>;
    /**
     * OpenID Connect Userinfo URL  URL of the OP\'s UserInfo Endpoint.
     */
    'userinfo_endpoint'?: string;
    /**
     * OpenID Connect User Userinfo Signing Algorithm  Algorithm used to sign OpenID Connect Userinfo Responses.
     */
    'userinfo_signed_response_alg': Array<string>;
    /**
     * OpenID Connect Supported Userinfo Signing Algorithm  JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
     */
    'userinfo_signing_alg_values_supported'?: Array<string>;
}
/**
 * OpenID Connect Userinfo
 */
export interface OidcUserInfo {
    /**
     * End-User\'s birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform\'s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.
     */
    'birthdate'?: string;
    /**
     * End-User\'s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
     */
    'email'?: string;
    /**
     * True if the End-User\'s e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.
     */
    'email_verified'?: boolean;
    /**
     * Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.
     */
    'family_name'?: string;
    /**
     * End-User\'s gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.
     */
    'gender'?: string;
    /**
     * Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.
     */
    'given_name'?: string;
    /**
     * End-User\'s locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.
     */
    'locale'?: string;
    /**
     * Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.
     */
    'middle_name'?: string;
    /**
     * End-User\'s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User\'s locale and preferences.
     */
    'name'?: string;
    /**
     * Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.
     */
    'nickname'?: string;
    /**
     * End-User\'s preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.
     */
    'phone_number'?: string;
    /**
     * True if the End-User\'s phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.
     */
    'phone_number_verified'?: boolean;
    /**
     * URL of the End-User\'s profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.
     */
    'picture'?: string;
    /**
     * Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.
     */
    'preferred_username'?: string;
    /**
     * URL of the End-User\'s profile page. The contents of this Web page SHOULD be about the End-User.
     */
    'profile'?: string;
    /**
     * Subject - Identifier for the End-User at the IssuerURL.
     */
    'sub'?: string;
    /**
     * Time the End-User\'s information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.
     */
    'updated_at'?: number;
    /**
     * URL of the End-User\'s Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.
     */
    'website'?: string;
    /**
     * String from zoneinfo [zoneinfo] time zone database representing the End-User\'s time zone. For example, Europe/Paris or America/Los_Angeles.
     */
    'zoneinfo'?: string;
}
export interface OnboardingPortalLink {
    /**
     * AppleMapper specifies the JSONNet code snippet which uses Apple\'s profile information to hydrate the identity\'s data.
     */
    'apple_mapper_url'?: string;
    /**
     * Auth0Mapper specifies the JSONNet code snippet which uses Auth0\'s profile information to hydrate the identity\'s data.
     */
    'auth0_mapper_url'?: string;
    /**
     * The onboarding portal link\'s creation date
     */
    'created_at'?: string;
    'custom_hostname_id'?: string | null;
    /**
     * Feature flag to enable SCIM configuration
     */
    'enable_scim'?: boolean;
    /**
     * Feature flag to enable SSO configuration
     */
    'enable_sso'?: boolean;
    /**
     * The onboarding portal link\'s expiry date
     */
    'expires_at': string;
    /**
     * FacebookMapper specifies the JSONNet code snippet which uses Facebook\'s profile information to hydrate the identity\'s data.
     */
    'facebook_mapper_url'?: string;
    /**
     * GenericOIDCMapper specifies the JSONNet code snippet which uses the OIDC Provider\'s profile information to hydrate the identity\'s data.
     */
    'generic_oidc_mapper_url'?: string;
    /**
     * GithubMapper specifies the JSONNet code snippet which uses GitHub\'s profile information to hydrate the identity\'s data.
     */
    'github_mapper_url'?: string;
    /**
     * GitLabMapper specifies the JSONNet code snippet which uses GitLab\'s profile information to hydrate the identity\'s data.
     */
    'gitlab_mapper_url'?: string;
    /**
     * GoogleMapper specifies the JSONNet code snippet which uses Google\'s profile information to hydrate the identity\'s data.
     */
    'google_mapper_url'?: string;
    /**
     * The onboarding portal link\'s ID.
     */
    'id': string;
    /**
     * MicrosoftMapper specifies the JSONNet code snippet which uses Microsoft\'s profile information to hydrate the identity\'s data.
     */
    'microsoft_mapper_url'?: string;
    /**
     * NetIDMapper specifies the JSONNet code snippet which uses NetID\'s profile information to hydrate the identity\'s data.
     */
    'netid_mapper_url'?: string;
    /**
     * The onboarding portal link\'s organization ID
     */
    'organization_id': string;
    /**
     * The onboarding portal link\'s project ID
     */
    'project_id': string;
    /**
     * Proxy ACS URL if overriding with a customer-controlled URL
     */
    'proxy_acs_url'?: string;
    /**
     * Proxy OIDC Redirect URL if overriding with a customer-controlled URL
     */
    'proxy_oidc_redirect_url'?: string;
    /**
     * SAML Audience Override if overriding with a customer-controlled one
     */
    'proxy_saml_audience_override'?: string;
    /**
     * Proxy SCIM Server URL if overriding with a customer-controlled URL
     */
    'proxy_scim_server_url'?: string;
    /**
     * SAMLMapper specifies the JSONNet code snippet which uses the SAML Provider\'s profile information to hydrate the identity\'s data.
     */
    'saml_mapper_url'?: string;
    /**
     * SCIMMapper specifies the JSONNet code snippet which uses the SCIM Provider\'s profile information to hydrate the identity\'s data.
     */
    'scim_mapper_url'?: string;
    /**
     * The onboarding portal link\'s value
     */
    'value': string;
}
export interface OnboardingPortalOrganization {
    /**
     * AppleMapper specifies the JSONNet code snippet which uses Apple\'s profile information to hydrate the identity\'s data.
     */
    'apple_mapper_url'?: string;
    /**
     * Auth0Mapper specifies the JSONNet code snippet which uses Auth0\'s profile information to hydrate the identity\'s data.
     */
    'auth0_mapper_url'?: string;
    'base_url': string;
    /**
     * FacebookMapper specifies the JSONNet code snippet which uses Facebook\'s profile information to hydrate the identity\'s data.
     */
    'facebook_mapper_url'?: string;
    /**
     * GenericOIDCMapper specifies the JSONNet code snippet which uses the OIDC Provider\'s profile information to hydrate the identity\'s data.
     */
    'generic_oidc_mapper_url'?: string;
    /**
     * GithubMapper specifies the JSONNet code snippet which uses GitHub\'s profile information to hydrate the identity\'s data.
     */
    'github_mapper_url'?: string;
    /**
     * GitLabMapper specifies the JSONNet code snippet which uses GitLab\'s profile information to hydrate the identity\'s data.
     */
    'gitlab_mapper_url'?: string;
    /**
     * GoogleMapper specifies the JSONNet code snippet which uses Google\'s profile information to hydrate the identity\'s data.
     */
    'google_mapper_url'?: string;
    'kratos_selfservice_methods_oidc_config_providers': Array<NormalizedProjectRevisionThirdPartyProvider>;
    'kratos_selfservice_methods_saml_config_providers': Array<NormalizedProjectRevisionSAMLProvider>;
    /**
     * MicrosoftMapper specifies the JSONNet code snippet which uses Microsoft\'s profile information to hydrate the identity\'s data.
     */
    'microsoft_mapper_url'?: string;
    /**
     * NetIDMapper specifies the JSONNet code snippet which uses NetID\'s profile information to hydrate the identity\'s data.
     */
    'netid_mapper_url'?: string;
    'oidc_sso_enabled'?: boolean;
    'organization_id': string;
    /**
     * Organization Label
     */
    'organization_label'?: string;
    /**
     * Proxy ACS URL if overriding with a customer-controlled URL
     */
    'proxy_acs_url'?: string;
    /**
     * Proxy OIDC Redirect URL if overriding with a customer-controlled URL
     */
    'proxy_oidc_redirect_url'?: string;
    /**
     * SAML Audience Override if overriding with a customer-controlled one
     */
    'proxy_saml_audience_override'?: string;
    /**
     * Proxy SCIM Server URL if overriding with a customer-controlled URL
     */
    'proxy_scim_server_url'?: string;
    'revision_id': string;
    /**
     * SAMLMapper specifies the JSONNet code snippet which uses the SAML Provider\'s profile information to hydrate the identity\'s data.
     */
    'saml_mapper_url'?: string;
    'saml_sso_enabled'?: boolean;
    'scim_clients': Array<NormalizedProjectRevisionScimClient>;
    'scim_enabled': boolean;
    /**
     * SCIMMapper specifies the JSONNet code snippet which uses the SCIM Provider\'s profile information to hydrate the identity\'s data.
     */
    'scim_mapper_url'?: string;
    'sso_enabled': boolean;
}
/**
 * B2B SSO Organization
 */
export interface Organization {
    'created_at': string;
    /**
     * The list of organization\'s domains.
     */
    'domains': Array<string>;
    /**
     * The organization\'s ID.
     */
    'id': string;
    /**
     * The organization\'s human-readable label.
     */
    'label': string;
}
/**
 * Create B2B SSO Organization Request Body
 */
export interface OrganizationBody {
    /**
     * Domains contains the list of organization\'s domains.
     */
    'domains'?: Array<string>;
    /**
     * Label contains the organization\'s label.
     */
    'label'?: string;
}
export interface OrganizationOnboardingPortalLinksResponse {
    'links': Array<OnboardingPortalLink>;
}
export interface ParseError {
    'end'?: SourcePosition;
    'message'?: string;
    'start'?: SourcePosition;
}
/**
 * Patch Identities Body
 */
export interface PatchIdentitiesBody {
    /**
     * Identities holds the list of patches to apply  required
     */
    'identities'?: Array<IdentityPatch>;
}
export interface PatchWorkspaceMemberBody {
    /**
     * Whether to enable break-glass recovery for this member.
     */
    'break_glass'?: boolean;
}
/**
 * Perform Native Logout Request Body
 */
export interface PerformNativeLogoutBody {
    /**
     * The Session Token  Invalidate this session token.
     */
    'session_token': string;
}
/**
 * Get Permissions on Project Request Parameters
 */
export interface PermissionsOnWorkspace {
    'permissions'?: { [key: string]: boolean; };
}
export interface Plan {
    /**
     * Name is the name of the plan.
     */
    'name': string;
    /**
     * Version is the version of the plan. The combination of `name@version` must be unique.
     */
    'version': number;
}
export interface PlanDetails {
    /**
     * BaseFeeMonthly is the monthly base fee for the plan.
     */
    'base_fee_monthly': number;
    /**
     * BaseFeeYearly is the yearly base fee for the plan.
     */
    'base_fee_yearly': number;
    /**
     * Custom is true if the plan is custom. This means it will be hidden from the pricing page.
     */
    'custom': boolean;
    /**
     * Description is the description of the plan.
     */
    'description': string;
    'development_features': { [key: string]: GenericUsage; };
    'features': { [key: string]: GenericUsage; };
    /**
     * Latest is true if the plan is the latest version of a plan and should be available for self-service usage.
     */
    'latest'?: boolean;
    /**
     * Name is the name of the plan.
     */
    'name': string;
    'production_features': { [key: string]: GenericUsage; };
    'staging_features': { [key: string]: GenericUsage; };
    /**
     * Version is the version of the plan. The combination of `name@version` must be unique.
     */
    'version': number;
    /**
     * YearlyOnly is true if the plan only supports yearly billing.
     */
    'yearly_only': boolean;
}
/**
 * Check Permission using Post Request Body
 */
export interface PostCheckPermissionBody {
    /**
     * Namespace to query
     */
    'namespace'?: string;
    /**
     * Object to query
     */
    'object'?: string;
    /**
     * Relation to query
     */
    'relation'?: string;
    /**
     * SubjectID to query  Either SubjectSet or SubjectID can be provided.
     */
    'subject_id'?: string;
    'subject_set'?: SubjectSet;
}
/**
 * Post Check Permission Or Error Body
 */
export interface PostCheckPermissionOrErrorBody {
    /**
     * Namespace to query
     */
    'namespace'?: string;
    /**
     * Object to query
     */
    'object'?: string;
    /**
     * Relation to query
     */
    'relation'?: string;
    /**
     * SubjectID to query  Either SubjectSet or SubjectID can be provided.
     */
    'subject_id'?: string;
    'subject_set'?: SubjectSet;
}
export interface Project {
    'cors_admin'?: ProjectCors;
    'cors_public'?: ProjectCors;
    /**
     * The environment of the project. prod Production stage Staging dev Development
     */
    'environment': ProjectEnvironmentEnum;
    /**
     * The project home region.  This is used to set where the project data is stored and where the project\'s endpoints are located. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest us US global Global
     */
    'home_region': ProjectHomeRegionEnum;
    /**
     * The project\'s ID.
     */
    'id': string;
    /**
     * The name of the project.
     */
    'name': string;
    /**
     * The organizations of the project.  Organizations are used to group users and enforce certain restrictions like usage of SSO.
     */
    'organizations': Array<BasicOrganization>;
    /**
     * The configuration revision ID.
     */
    'revision_id': string;
    'services': ProjectServices;
    /**
     * The project\'s slug
     */
    'slug': string;
    /**
     * The state of the project. running Running halted Halted deleted Deleted
     */
    'state': ProjectStateEnum;
    'workspace_id'?: string | null;
}

export const ProjectEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectEnvironmentEnum = typeof ProjectEnvironmentEnum[keyof typeof ProjectEnvironmentEnum];
export const ProjectHomeRegionEnum = {
    EuCentral: 'eu-central',
    AsiaNortheast: 'asia-northeast',
    UsEast: 'us-east',
    UsWest: 'us-west',
    Us: 'us',
    Global: 'global',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectHomeRegionEnum = typeof ProjectHomeRegionEnum[keyof typeof ProjectHomeRegionEnum];
export const ProjectStateEnum = {
    Running: 'running',
    Halted: 'halted',
    Deleted: 'deleted',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectStateEnum = typeof ProjectStateEnum[keyof typeof ProjectStateEnum];

export interface ProjectApiKey {
    /**
     * The token\'s creation date
     */
    'created_at'?: string;
    'expires_at'?: string;
    /**
     * The token\'s ID.
     */
    'id': string;
    /**
     * The Token\'s Name  Set this to help you remember, for example, where you use the token.
     */
    'name': string;
    /**
     * The token\'s owner
     */
    'owner_id': string;
    /**
     * The Token\'s Project ID
     */
    'project_id'?: string;
    /**
     * The token\'s last update date
     */
    'updated_at'?: string;
    /**
     * The token\'s value
     */
    'value'?: string;
}
export interface ProjectBranding {
    /**
     * The Customization Creation Date
     */
    'created_at': string;
    'default_theme': ProjectBrandingTheme;
    /**
     * The customization ID.
     */
    'id': string;
    /**
     * The Project\'s ID this customization is associated with
     */
    'project_id': string;
    'themes': Array<ProjectBrandingTheme>;
    /**
     * Last Time Branding was Updated
     */
    'updated_at': string;
}
export interface ProjectBrandingColors {
    /**
     * AccentDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_default_color'?: string;
    /**
     * AccentDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_disabled_color'?: string;
    /**
     * AccentEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_emphasis_color'?: string;
    /**
     * AccentMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_muted_color'?: string;
    /**
     * AccentSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_subtle_color'?: string;
    /**
     * BackgroundCanvasColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_canvas_color'?: string;
    /**
     * BackgroundSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_subtle_color'?: string;
    /**
     * BackgroundSurfaceColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_surface_color'?: string;
    /**
     * BorderDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'border_default_color'?: string;
    /**
     * ErrorDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_default_color'?: string;
    /**
     * ErrorEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_emphasis_color'?: string;
    /**
     * ErrorMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_muted_color'?: string;
    /**
     * ErrorSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_subtle_color'?: string;
    /**
     * ForegroundDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_default_color'?: string;
    /**
     * ForegroundDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_disabled_color'?: string;
    /**
     * ForegroundMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_muted_color'?: string;
    /**
     * ForegroundOnAccentColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_accent_color'?: string;
    /**
     * ForegroundOnDarkColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_dark_color'?: string;
    /**
     * ForegroundOnDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_disabled_color'?: string;
    /**
     * ForegroundSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_subtle_color'?: string;
    /**
     * InputBackgroundColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_background_color'?: string;
    /**
     * InputDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_disabled_color'?: string;
    /**
     * InputPlaceholderColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_placeholder_color'?: string;
    /**
     * InputTextColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_text_color'?: string;
    /**
     * Primary color is an hsla color value used to derive the other colors from for the Ory Account Experience theme.
     */
    'primary_color'?: string;
    /**
     * Secondary color is a hsla color code used to derive the other colors from for the Ory Account Experience theme.
     */
    'secondary_color'?: string;
    /**
     * SuccessEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'success_emphasis_color'?: string;
    /**
     * TextDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'text_default_color'?: string;
    /**
     * TextDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'text_disabled_color'?: string;
}
export interface ProjectBrandingTheme {
    /**
     * AccentDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_default_color'?: string;
    /**
     * AccentDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_disabled_color'?: string;
    /**
     * AccentEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_emphasis_color'?: string;
    /**
     * AccentMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_muted_color'?: string;
    /**
     * AccentSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'accent_subtle_color'?: string;
    /**
     * BackgroundCanvasColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_canvas_color'?: string;
    /**
     * BackgroundSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_subtle_color'?: string;
    /**
     * BackgroundSurfaceColor is a hex color code used by the Ory Account Experience theme.
     */
    'background_surface_color'?: string;
    /**
     * BorderDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'border_default_color'?: string;
    /**
     * The Customization Creation Date.
     */
    'created_at': string;
    /**
     * ErrorDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_default_color'?: string;
    /**
     * ErrorEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_emphasis_color'?: string;
    /**
     * ErrorMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_muted_color'?: string;
    /**
     * ErrorSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'error_subtle_color'?: string;
    /**
     * Favicon Type The Favicon mime type.
     */
    'favicon_type'?: string;
    /**
     * Favicon URL Favicon can be an https:// or base64:// URL. If the URL is not allowed, the favicon will be stored inside the Ory Network storage bucket.
     */
    'favicon_url'?: string;
    /**
     * ForegroundDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_default_color'?: string;
    /**
     * ForegroundDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_disabled_color'?: string;
    /**
     * ForegroundMutedColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_muted_color'?: string;
    /**
     * ForegroundOnAccentColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_accent_color'?: string;
    /**
     * ForegroundOnDarkColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_dark_color'?: string;
    /**
     * ForegroundOnDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_on_disabled_color'?: string;
    /**
     * ForegroundSubtleColor is a hex color code used by the Ory Account Experience theme.
     */
    'foreground_subtle_color'?: string;
    /**
     * The customization theme ID.
     */
    'id': string;
    /**
     * InputBackgroundColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_background_color'?: string;
    /**
     * InputDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_disabled_color'?: string;
    /**
     * InputPlaceholderColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_placeholder_color'?: string;
    /**
     * InputTextColor is a hex color code used by the Ory Account Experience theme.
     */
    'input_text_color'?: string;
    /**
     * Logo Type The Logo mime type.
     */
    'logo_type'?: string;
    /**
     * Logo URL Logo can be an https:// or base64:// URL. If the URL is not allowed, the logo will be stored inside the Ory Network storage bucket.
     */
    'logo_url'?: string;
    /**
     * The customization theme name.
     */
    'name': string;
    /**
     * Primary color is an hsla color value used to derive the other colors from for the Ory Account Experience theme.
     */
    'primary_color'?: string;
    /**
     * The ProjectBranding ID this customization is associated with.
     */
    'project_branding_id': string;
    /**
     * Secondary color is a hsla color code used to derive the other colors from for the Ory Account Experience theme.
     */
    'secondary_color'?: string;
    /**
     * SuccessEmphasisColor is a hex color code used by the Ory Account Experience theme.
     */
    'success_emphasis_color'?: string;
    /**
     * TextDefaultColor is a hex color code used by the Ory Account Experience theme.
     */
    'text_default_color'?: string;
    /**
     * TextDisabledColor is a hex color code used by the Ory Account Experience theme.
     */
    'text_disabled_color'?: string;
    /**
     * Last Time Branding was Updated.
     */
    'updated_at': string;
}
export interface ProjectCors {
    /**
     * Whether CORS is enabled for this endpoint.
     */
    'enabled'?: boolean;
    /**
     * The allowed origins. Use `*` to allow all origins. A wildcard can also be used in the subdomain, i.e. `https://_*.example.com` will allow all origins on all subdomains of `example.com`.
     */
    'origins'?: Array<string>;
}
export interface ProjectEventsDatapoint {
    /**
     * Event attributes with details
     */
    'attributes': Array<Attribute>;
    /**
     * Name of the event
     */
    'name': string;
    /**
     * Time of occurence
     */
    'timestamp': string;
}
export interface ProjectHost {
    /**
     * The project\'s host.
     */
    'host': string;
    /**
     * The mapping\'s ID.
     */
    'id': string;
    /**
     * The Revision\'s Project ID
     */
    'project_id': string;
}
export interface ProjectMember {
    /**
     * BreakGlass is true when the identity\'s recovery address has break-glass recovery enabled for the identity\'s current organization.
     */
    'break_glass'?: boolean;
    'email': string;
    'email_verified': boolean;
    'id': string;
    'name': string;
    'organization_id'?: string | null;
    'role': string;
    /**
     * Whether the member has access through the project directly or through workspace membership.
     */
    'source'?: ProjectMemberSourceEnum;
}

export const ProjectMemberSourceEnum = {
    Project: 'project',
    Workspace: 'workspace',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectMemberSourceEnum = typeof ProjectMemberSourceEnum[keyof typeof ProjectMemberSourceEnum];

export interface ProjectMetadata {
    /**
     * The Project\'s Creation Date
     */
    'created_at': string;
    /**
     * The environment of the project. prod Production stage Staging dev Development
     */
    'environment': ProjectMetadataEnvironmentEnum;
    /**
     * The project\'s data home region eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest us US global Global
     */
    'home_region': ProjectMetadataHomeRegionEnum;
    /**
     * The FQDN hostnames this project listens on
     */
    'hosts': Array<string>;
    /**
     * The project\'s ID.
     */
    'id': string;
    /**
     * The project\'s name if set
     */
    'name': string;
    /**
     * The project\'s slug
     */
    'slug': string;
    /**
     * The state of the project. running Running halted Halted deleted Deleted
     */
    'state': ProjectMetadataStateEnum;
    'subscription_id'?: string | null;
    'subscription_plan'?: string | null;
    /**
     * Last Time Project was Updated
     */
    'updated_at': string;
    'workspace'?: Workspace;
    'workspace_id'?: string | null;
}

export const ProjectMetadataEnvironmentEnum = {
    Prod: 'prod',
    Stage: 'stage',
    Dev: 'dev',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectMetadataEnvironmentEnum = typeof ProjectMetadataEnvironmentEnum[keyof typeof ProjectMetadataEnvironmentEnum];
export const ProjectMetadataHomeRegionEnum = {
    EuCentral: 'eu-central',
    AsiaNortheast: 'asia-northeast',
    UsEast: 'us-east',
    UsWest: 'us-west',
    Us: 'us',
    Global: 'global',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectMetadataHomeRegionEnum = typeof ProjectMetadataHomeRegionEnum[keyof typeof ProjectMetadataHomeRegionEnum];
export const ProjectMetadataStateEnum = {
    Running: 'running',
    Halted: 'halted',
    Deleted: 'deleted',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type ProjectMetadataStateEnum = typeof ProjectMetadataStateEnum[keyof typeof ProjectMetadataStateEnum];

export interface ProjectServiceAccountExperience {
    'config': object;
}
export interface ProjectServiceIdentity {
    'config': object;
}
export interface ProjectServiceOAuth2 {
    'config': object;
}
export interface ProjectServicePermission {
    'config': object;
}
export interface ProjectServices {
    'account_experience'?: ProjectServiceAccountExperience;
    'identity'?: ProjectServiceIdentity;
    'oauth2'?: ProjectServiceOAuth2;
    'permission'?: ProjectServicePermission;
}
export interface Provider {
    /**
     * The RP\'s client identifier, issued by the IdP.
     */
    'client_id'?: string;
    /**
     * A full path of the IdP config file.
     */
    'config_url'?: string;
    /**
     * By specifying one of domain_hints values provided by the accounts endpoints, the FedCM dialog selectively shows the specified account.
     */
    '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.
     */
    'fields'?: Array<string>;
    /**
     * By specifying one of login_hints values provided by the accounts endpoints, the FedCM dialog selectively shows the specified account.
     */
    'login_hint'?: string;
    /**
     * A random string to ensure the response is issued for this specific request. Prevents replay attacks.
     */
    '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.
     */
    'parameters'?: { [key: string]: string; };
}
export interface QuotaUsage {
    /**
     * The additional price per unit in cents.
     */
    'additional_price': string;
    'can_use_more': boolean;
    /**
     *  production_projects ProductionProjects staging_projects StagingProjects development_projects DevelopmentProjects daily_active_users DailyActiveUsers custom_domains CustomDomains event_streams EventStreams event_stream_events EventStreamEvents sla SLA collaborator_seats CollaboratorSeats edge_cache EdgeCache branding_themes BrandingThemes zendesk_support ZendeskSupport zendesk_support_on_call ZendeskSupportOnCall project_metrics ProjectMetrics project_metrics_time_window ProjectMetricsTimeWindow project_metrics_events_history ProjectMetricsEventsHistory organizations Organizations rop_grant ResourceOwnerPasswordGrant concierge_onboarding ConciergeOnboarding credit Credit data_location_global DataLocationGlobal data_location_us DataLocationUS data_location_asiane DataLocationAsiaNorthEast m2m_token_issuance M2MTokenIssuance permission_checks PermissionChecks captcha Captcha captcha_byo CaptchaBYO identity_search_api IdentitySearchAPI saml_sp SAMLSP saml_idp SAMLIDP auto_link_policy AutoLinkPolicy scim_clients SCIMClients default_smtp_email_customization DefaultSMTPEmailCustomization onboarding_portal OnboardingPortal console_organization_sso ConsoleOrganizationSSO update_self_service_registration_rate_limit_tier RateLimitTierUpdateSelfServiceRegistration  Self-service rate limits update_self_service_recovery_rate_limit_tier RateLimitTierUpdateSelfServiceRecovery update_self_service_settings_rate_limit_tier RateLimitTierUpdateSelfServiceSettings update_self_service_verification_rate_limit_tier RateLimitTierUpdateSelfServiceVerification identities_create_rate_limit_tier RateLimitTierIdentitiesCreate identities_import_rate_limit_tier RateLimitTierIdentitiesImport fed_cm_parameters_rate_limit_tier RateLimitTierFedCMParameters data_location_regional DataLocationRegional  Required Features rate_limit_tier RateLimitTier session_rate_limit_tier RateLimitTierSessions identities_list_rate_limit_tier RateLimitTierIdentitiesList permission_checks_rate_limit_tier RateLimitTierPermissionChecks oauth2_introspect_rate_limit_tier RateLimitTierOAuth2Introspect create_recovery_admin_rate_limit_tier RateLimitTierCreateAdminRecovery scim_rate_limit_tier RateLimitTierSCIM hydra_admin_high_rate_limit_tier RateLimitTierHydraAdminHigh  Bucket-specific rate limit tiers hydra_admin_medium_rate_limit_tier RateLimitTierHydraAdminMedium hydra_admin_low_rate_limit_tier RateLimitTierHydraAdminLow hydra_public_high_rate_limit_tier RateLimitTierHydraPublicHigh hydra_public_medium_rate_limit_tier RateLimitTierHydraPublicMedium hydra_public_low_rate_limit_tier RateLimitTierHydraPublicLow keto_admin_low_rate_limit_tier RateLimitTierKetoAdminLow keto_admin_medium_rate_limit_tier RateLimitTierKetoAdminMedium keto_public_high_rate_limit_tier RateLimitTierKetoPublicHigh kratos_admin_high_rate_limit_tier RateLimitTierKratosAdminHigh kratos_admin_medium_rate_limit_tier RateLimitTierKratosAdminMedium kratos_admin_low_rate_limit_tier RateLimitTierKratosAdminLow kratos_public_high_rate_limit_tier RateLimitTierKratosPublicHigh kratos_public_medium_rate_limit_tier RateLimitTierKratosPublicMedium kratos_public_low_rate_limit_tier RateLimitTierKratosPublicLow polis_public_high_rate_limit_tier RateLimitTierPolisPublicHigh polis_public_medium_rate_limit_tier RateLimitTierPolisPublicMedium unassigned_rate_limit_tier RateLimitTierUnassigned
     */
    'feature': QuotaUsageFeatureEnum;
    'feature_available': boolean;
    'included': number;
    'is_unlimited': boolean;
    'used': number;
}

export const QuotaUsageFeatureEnum = {
    ProductionProjects: 'production_projects',
    StagingProjects: 'staging_projects',
    DevelopmentProjects: 'development_projects',
    DailyActiveUsers: 'daily_active_users',
    CustomDomains: 'custom_domains',
    EventStreams: 'event_streams',
    EventStreamEvents: 'event_stream_events',
    Sla: 'sla',
    CollaboratorSeats: 'collaborator_seats',
    EdgeCache: 'edge_cache',
    BrandingThemes: 'branding_themes',
    ZendeskSupport: 'zendesk_support',
    ZendeskSupportOnCall: 'zendesk_support_on_call',
    ProjectMetrics: 'project_metrics',
    ProjectMetricsTimeWindow: 'project_metrics_time_window',
    ProjectMetricsEventsHistory: 'project_metrics_events_history',
    Organizations: 'organizations',
    RopGrant: 'rop_grant',
    ConciergeOnboarding: 'concierge_onboarding',
    Credit: 'credit',
    DataLocationGlobal: 'data_location_global',
    DataLocationUs: 'data_location_us',
    DataLocationAsiane: 'data_location_asiane',
    M2mTokenIssuance: 'm2m_token_issuance',
    PermissionChecks: 'permission_checks',
    Captcha: 'captcha',
    CaptchaByo: 'captcha_byo',
    IdentitySearchApi: 'identity_search_api',
    SamlSp: 'saml_sp',
    SamlIdp: 'saml_idp',
    AutoLinkPolicy: 'auto_link_policy',
    ScimClients: 'scim_clients',
    DefaultSmtpEmailCustomization: 'default_smtp_email_customization',
    OnboardingPortal: 'onboarding_portal',
    ConsoleOrganizationSso: 'console_organization_sso',
    UpdateSelfServiceRegistrationRateLimitTier: 'update_self_service_registration_rate_limit_tier',
    UpdateSelfServiceRecoveryRateLimitTier: 'update_self_service_recovery_rate_limit_tier',
    UpdateSelfServiceSettingsRateLimitTier: 'update_self_service_settings_rate_limit_tier',
    UpdateSelfServiceVerificationRateLimitTier: 'update_self_service_verification_rate_limit_tier',
    IdentitiesCreateRateLimitTier: 'identities_create_rate_limit_tier',
    IdentitiesImportRateLimitTier: 'identities_import_rate_limit_tier',
    FedCmParametersRateLimitTier: 'fed_cm_parameters_rate_limit_tier',
    DataLocationRegional: 'data_location_regional',
    RateLimitTier: 'rate_limit_tier',
    SessionRateLimitTier: 'session_rate_limit_tier',
    IdentitiesListRateLimitTier: 'identities_list_rate_limit_tier',
    PermissionChecksRateLimitTier: 'permission_checks_rate_limit_tier',
    Oauth2IntrospectRateLimitTier: 'oauth2_introspect_rate_limit_tier',
    CreateRecoveryAdminRateLimitTier: 'create_recovery_admin_rate_limit_tier',
    ScimRateLimitTier: 'scim_rate_limit_tier',
    HydraAdminHighRateLimitTier: 'hydra_admin_high_rate_limit_tier',
    HydraAdminMediumRateLimitTier: 'hydra_admin_medium_rate_limit_tier',
    HydraAdminLowRateLimitTier: 'hydra_admin_low_rate_limit_tier',
    HydraPublicHighRateLimitTier: 'hydra_public_high_rate_limit_tier',
    HydraPublicMediumRateLimitTier: 'hydra_public_medium_rate_limit_tier',
    HydraPublicLowRateLimitTier: 'hydra_public_low_rate_limit_tier',
    KetoAdminLowRateLimitTier: 'keto_admin_low_rate_limit_tier',
    KetoAdminMediumRateLimitTier: 'keto_admin_medium_rate_limit_tier',
    KetoPublicHighRateLimitTier: 'keto_public_high_rate_limit_tier',
    KratosAdminHighRateLimitTier: 'kratos_admin_high_rate_limit_tier',
    KratosAdminMediumRateLimitTier: 'kratos_admin_medium_rate_limit_tier',
    KratosAdminLowRateLimitTier: 'kratos_admin_low_rate_limit_tier',
    KratosPublicHighRateLimitTier: 'kratos_public_high_rate_limit_tier',
    KratosPublicMediumRateLimitTier: 'kratos_public_medium_rate_limit_tier',
    KratosPublicLowRateLimitTier: 'kratos_public_low_rate_limit_tier',
    PolisPublicHighRateLimitTier: 'polis_public_high_rate_limit_tier',
    PolisPublicMediumRateLimitTier: 'polis_public_medium_rate_limit_tier',
    UnassignedRateLimitTier: 'unassigned_rate_limit_tier',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type QuotaUsageFeatureEnum = typeof QuotaUsageFeatureEnum[keyof typeof QuotaUsageFeatureEnum];

export interface RFC6749ErrorJson {
    'error'?: string;
    'error_debug'?: string;
    'error_description'?: string;
    'error_hint'?: string;
    'status_code'?: number;
}
/**
 * Used when an administrator creates a recovery code for an identity.
 */
export interface RecoveryCodeForIdentity {
    /**
     * Expires At is the timestamp of when the recovery flow expires  The timestamp when the recovery code expires.
     */
    'expires_at'?: string;
    /**
     * RecoveryCode is the code that can be used to recover the account
     */
    'recovery_code': string;
    /**
     * RecoveryLink with flow  This link opens the recovery UI with an empty `code` field.
     */
    '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 {
    /**
     * Active, if set, contains the recovery method that is being used. It is initially not set.
     */
    'active'?: string;
    /**
     * Contains possible actions that could follow this flow
     */
    'continue_with'?: Array<ContinueWith>;
    /**
     * 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.
     */
    '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://<selfservice.flows.recovery.ui_url>?request=<id>
     */
    'id': string;
    /**
     * IssuedAt is the time (UTC) when the request occurred.
     */
    '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.
     */
    'request_url': string;
    /**
     * ReturnTo contains the requested return_to URL.
     */
    '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.
     */
    'state': any;
    /**
     * TransientPayload is used to pass data from the recovery flow to hooks and email templates
     */
    'transient_payload'?: object;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'type': string;
    'ui': UiContainer;
}
/**
 * The experimental state represents the state of a recovery flow. This field is EXPERIMENTAL and subject to change!
 */

export const RecoveryFlowState = {
    ChooseMethod: 'choose_method',
    SentEmail: 'sent_email',
    PassedChallenge: 'passed_challenge',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type RecoveryFlowState = typeof RecoveryFlowState[keyof typeof RecoveryFlowState];


export interface RecoveryIdentityAddress {
    'break_glass_for_organization'?: string | null;
    /**
     * CreatedAt is a helper struct field for gobuffalo.pop.
     */
    'created_at'?: string;
    'id'?: string;
    /**
     * UpdatedAt is a helper struct field for gobuffalo.pop.
     */
    'updated_at'?: string;
    'value': string;
    'via': string;
}
/**
 * Used when an administrator creates a recovery link for an identity.
 */
export interface RecoveryLinkForIdentity {
    /**
     * Recovery Link Expires At  The timestamp when the recovery link expires.
     */
    'expires_at'?: string;
    /**
     * Recovery Link  This link can be used to recover the account.
     */
    'recovery_link': string;
}
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 deviceauthn CredentialsTypeDeviceAuthn 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
     */
    '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.
     */
    '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://<selfservice.flows.registration.ui_url>/?flow=<id>
     */
    'id': string;
    /**
     * IdentitySchema optionally holds the ID of the identity schema that is used for this flow. This value can be set by the user when creating the flow and should be retained when the flow is saved or converted to another flow.
     */
    'identity_schema'?: string;
    /**
     * IssuedAt is the time (UTC) when the flow occurred.
     */
    '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.
     */
    'oauth2_login_challenge'?: string;
    'oauth2_login_request'?: OAuth2LoginRequest;
    '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.
     */
    'request_url': string;
    /**
     * ReturnTo contains the requested return_to URL.
     */
    '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.
     */
    '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.
     */
    'state': any;
    /**
     * TransientPayload is used to pass data from the registration to a webhook
     */
    'transient_payload'?: object;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'type': string;
    'ui': UiContainer;
}

export const RegistrationFlowActiveEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} 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 const RegistrationFlowState = {
    ChooseMethod: 'choose_method',
    SentEmail: 'sent_email',
    PassedChallenge: 'passed_challenge',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type RegistrationFlowState = typeof RegistrationFlowState[keyof typeof RegistrationFlowState];


export interface RejectOAuth2Request {
    /**
     * The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`).  Defaults to `request_denied`.
     */
    'error'?: string;
    /**
     * Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.
     */
    'error_debug'?: string;
    /**
     * Description of the error in a human readable format.
     */
    'error_description'?: string;
    /**
     * Hint to help resolve the error.
     */
    'error_hint'?: string;
    /**
     * Represents the HTTP status code of the error (e.g. 401 or 403)  Defaults to 400
     */
    'status_code'?: number;
}
/**
 * Relation Query
 */
export interface RelationQuery {
    /**
     * Namespace to query
     */
    'namespace'?: string;
    /**
     * Object to query
     */
    'object'?: string;
    /**
     * Relation to query
     */
    'relation'?: string;
    /**
     * SubjectID to query  Either SubjectSet or SubjectID can be provided.
     */
    'subject_id'?: string;
    'subject_set'?: SubjectSet;
}
/**
 * Relationship
 */
export interface Relationship {
    /**
     * Namespace of the Relation Tuple
     */
    'namespace': string;
    /**
     * Object of the Relation Tuple
     */
    'object': string;
    /**
     * Relation of the Relation Tuple
     */
    'relation': string;
    /**
     * SubjectID of the Relation Tuple  Either SubjectSet or SubjectID can be provided.
     */
    'subject_id'?: string;
    'subject_set'?: SubjectSet;
}
/**
 * Relationship Namespace List
 */
export interface RelationshipNamespaces {
    'namespaces'?: Array<Namespace>;
}
/**
 * Payload for patching a relationship
 */
export interface RelationshipPatch {
    'action'?: RelationshipPatchActionEnum;
    'relation_tuple'?: Relationship;
}

export const RelationshipPatchActionEnum = {
    Insert: 'insert',
    Delete: 'delete',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type RelationshipPatchActionEnum = typeof RelationshipPatchActionEnum[keyof typeof RelationshipPatchActionEnum];

/**
 * Paginated Relationship List
 */
export interface Relationships {
    /**
     * The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page.
     */
    'next_page_token'?: string;
    'relation_tuples'?: Array<Relationship>;
}
export interface RevisionAccountExperienceCustomTranslation {
    /**
     * The locale (e.g. \"en\", \"de\")
     */
    'locale': string;
    /**
     * The URL where the i18n json can be found
     */
    'translations': string;
}
export interface SchemaPatch {
    /**
     * The json schema
     */
    'data': object;
    /**
     * The user defined schema name
     */
    'name': string;
}
/**
 * Is sent when a flow is expired
 */
export interface SelfServiceFlowExpiredError {
    'error'?: GenericError;
    /**
     * When the flow has expired
     */
    '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.
     */
    'since'?: number;
    /**
     * The flow ID that should be used for the new flow as it contains the correct messages.
     */
    'use_flow_id'?: string;
}
/**
 * A Session
 */
export interface Session {
    /**
     * Active state. If false the session is no longer active.
     */
    '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).
     */
    'authenticated_at'?: string;
    /**
     * A list of authenticators which were used to authenticate the session.
     */
    'authentication_methods'?: Array<SessionAuthenticationMethod>;
    'authenticator_assurance_level'?: AuthenticatorAssuranceLevel;
    /**
     * Devices has history of all endpoints where the session was used
     */
    'devices'?: Array<SessionDevice>;
    /**
     * The Session Expiry  When this session expires at.
     */
    'expires_at'?: string;
    /**
     * Session ID
     */
    'id': string;
    'identity'?: Identity;
    /**
     * The Session Issuance Timestamp  When this session was issued at. Usually equal or close to `authenticated_at`.
     */
    'issued_at'?: string;
    /**
     * Tokenized is the tokenized (e.g. JWT) version of the session.  It is only set when the `tokenize_as` query parameter was set to a valid tokenize template during calls to `/session/whoami`.
     */
    'tokenized'?: string;
}


export interface SessionActivityDatapoint {
    /**
     * Country of the events
     */
    'country': string;
    /**
     * Number of events that failed in the given timeframe
     */
    'failed': number;
    /**
     * Number of events that succeeded in the given timeframe
     */
    'succeeded': number;
}
/**
 * A singular authenticator used during authentication / login.
 */
export interface SessionAuthenticationMethod {
    'aal'?: AuthenticatorAssuranceLevel;
    /**
     * When the authentication challenge was completed.
     */
    'completed_at'?: string;
    /**
     * The method used in this authenticator. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn 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
     */
    'method'?: SessionAuthenticationMethodMethodEnum;
    /**
     * The Organization id used for authentication
     */
    'organization'?: string;
    /**
     * OIDC or SAML provider id used for authentication
     */
    'provider'?: string;
    /**
     * UpstreamACR is the `acr` claim reported by the upstream OIDC provider, if any. Populated only for OIDC login methods when the upstream ID token contained an `acr` claim.
     */
    'upstream_acr'?: string;
    /**
     * UpstreamAMR is the `amr` claim reported by the upstream OIDC provider, if any. Populated only for OIDC login methods when the upstream ID token contained an `amr` claim.
     */
    'upstream_amr'?: Array<string>;
}

export const SessionAuthenticationMethodMethodEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type SessionAuthenticationMethodMethodEnum = typeof SessionAuthenticationMethodMethodEnum[keyof typeof SessionAuthenticationMethodMethodEnum];

/**
 * Device corresponding to a Session
 */
export interface SessionDevice {
    /**
     * Device record ID
     */
    'id': string;
    /**
     * IPAddress of the client
     */
    'ip_address'?: string;
    /**
     * Geo Location corresponding to the IP Address
     */
    'location'?: string;
    /**
     * UserAgent of the client
     */
    'user_agent'?: string;
}
/**
 * Update Custom Hostname Body
 */
export interface SetCustomDomainBody {
    /**
     * The domain where cookies will be set. Has to be a parent domain of the custom hostname to work.
     */
    'cookie_domain'?: string;
    /**
     * CORS Allowed origins for the custom hostname.
     */
    'cors_allowed_origins'?: Array<string>;
    /**
     * CORS Enabled for the custom hostname.
     */
    'cors_enabled'?: boolean;
    /**
     * The custom UI base URL where the UI will be exposed.
     */
    'custom_ui_base_url'?: string;
    /**
     * The custom hostname where the API will be exposed.
     */
    'hostname'?: string;
}
/**
 * Update Event Stream Body
 */
export interface SetEventStreamBody {
    /**
     * The HTTPS endpoint URL to send events to. Required if type is https.
     */
    'https_endpoint'?: string;
    /**
     * The AWS IAM role ARN to assume when publishing to the SNS topic. Required if type is sns.
     */
    'role_arn'?: string;
    /**
     * The AWS SNS topic ARN. Required if type is sns.
     */
    'topic_arn'?: string;
    /**
     * The type of the event stream (AWS SNS or HTTPS webhook).
     */
    'type': SetEventStreamBodyTypeEnum;
}

export const SetEventStreamBodyTypeEnum = {
    Sns: 'sns',
    Https: 'https',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type SetEventStreamBodyTypeEnum = typeof SetEventStreamBodyTypeEnum[keyof typeof SetEventStreamBodyTypeEnum];

export interface SetOrganizationFromOnboardingPortalLinkBody {
    'kratos_selfservice_methods_oidc_config_providers'?: Array<NormalizedProjectRevisionThirdPartyProvider>;
    'kratos_selfservice_methods_saml_config_providers'?: Array<NormalizedProjectRevisionSAMLProvider>;
    'revision_id': string;
    'scim_clients'?: Array<NormalizedProjectRevisionScimClient>;
}
export interface SetProject {
    'cors_admin': ProjectCors;
    'cors_public': ProjectCors;
    /**
     * The name of the project.
     */
    'name': string;
    /**
     * The organizations that are part of this project.
     */
    'organizations': Array<BasicOrganization>;
    'services': ProjectServices;
}
export interface SetProjectBrandingThemeBody {
    /**
     * Favicon Type
     */
    'favicon_type'?: string;
    /**
     * Favicon URL
     */
    'favicon_url'?: string;
    /**
     * Logo type
     */
    'logo_type'?: string;
    /**
     * Logo URL
     */
    'logo_url'?: string;
    /**
     * Branding name
     */
    'name'?: string;
    'theme'?: ProjectBrandingColors;
}
/**
 * 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 {
    /**
     * Active, if set, contains the registration method that is being used. It is initially not set.
     */
    '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.
     */
    'continue_with'?: Array<ContinueWith>;
    /**
     * ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, a new flow has to be initiated.
     */
    '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://<selfservice.flows.settings.ui_url>?flow=<id>
     */
    'id': string;
    'identity': Identity;
    /**
     * IssuedAt is the time (UTC) when the flow occurred.
     */
    '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.
     */
    'request_url': string;
    /**
     * ReturnTo contains the requested return_to URL.
     */
    '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.
     */
    'state': any;
    /**
     * TransientPayload is used to pass data from the settings flow to hooks and email templates
     */
    'transient_payload'?: object;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'type': string;
    'ui': UiContainer;
}
/**
 * The experimental state represents the state of a settings flow. This field is EXPERIMENTAL and subject to change!
 */

export const SettingsFlowState = {
    ShowForm: 'show_form',
    Success: 'success',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type SettingsFlowState = typeof SettingsFlowState[keyof typeof SettingsFlowState];


export interface SourcePosition {
    'Line'?: number;
    'column'?: number;
}
export interface SubjectSet {
    /**
     * Namespace of the Subject Set
     */
    'namespace': string;
    /**
     * Object of the Subject Set
     */
    'object': string;
    /**
     * Relation of the Subject Set
     */
    'relation': string;
}
export interface Subscription {
    'created_at': string;
    /**
     * The currency of the subscription. To change this, a new subscription must be created. usd USD eur Euro
     */
    'currency': SubscriptionCurrencyEnum;
    /**
     * The currently active interval of the subscription monthly Monthly yearly Yearly
     */
    'current_interval': SubscriptionCurrentIntervalEnum;
    /**
     * The currently active plan of the subscription
     */
    'current_plan': string;
    'current_plan_details'?: PlanDetails;
    /**
     * The ID of the stripe customer
     */
    'customer_id': string;
    /**
     * The ID of the subscription
     */
    'id': string;
    'interval_changes_to': string | null;
    'ongoing_stripe_checkout_id'?: string | null;
    /**
     * Until when the subscription is payed
     */
    'payed_until': string;
    'plan_changes_at'?: string;
    'plan_changes_to': string | null;
    /**
     * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.  A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.  A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn\'t generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription\'s status unchanged.  If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).  If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
     */
    'status': string;
    'stripe_checkout_expires_at'?: string;
    'updated_at': string;
}

export const SubscriptionCurrencyEnum = {
    Usd: 'usd',
    Eur: 'eur',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type SubscriptionCurrencyEnum = typeof SubscriptionCurrencyEnum[keyof typeof SubscriptionCurrencyEnum];
export const SubscriptionCurrentIntervalEnum = {
    Monthly: 'monthly',
    Yearly: 'yearly',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type SubscriptionCurrentIntervalEnum = typeof SubscriptionCurrentIntervalEnum[keyof typeof SubscriptionCurrentIntervalEnum];

/**
 * The Response for Registration Flows via API
 */
export interface 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!
     */
    'session_token'?: string;
}
/**
 * The Response for Login Flows via API
 */
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.
     */
    'continue_with'?: Array<ContinueWith>;
    '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!
     */
    'session_token'?: string;
}
/**
 * The Response for Registration Flows via API
 */
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.
     */
    'continue_with'?: Array<ContinueWith>;
    'identity': Identity;
    '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!
     */
    'session_token'?: string;
}
export interface SuccessfulProjectUpdate {
    'project': Project;
    /**
     * Import Warnings  Not all configuration items can be imported to the Ory Network. For example, setting the port does not make sense because the Ory Network provides the runtime and networking.  This field contains warnings where configuration keys were found but can not be imported. These keys will be ignored by the Ory Network. This field will help you understand why certain configuration keys might not be respected!
     */
    'warnings': Array<Warning>;
}
export interface TaxLineItem {
    'amount_in_cent'?: number;
    'title'?: string;
}
export interface TimeInterval {
    /**
     * The end of the time period.
     */
    'end': string;
    /**
     * The start of the time period.
     */
    'start': string;
}
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.com/docs/ecosystem/api-design#pagination).
     */
    'page_size'?: number;
    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    'page_token'?: string;
}
export interface TokenPaginationHeaders {
    /**
     * The link header contains pagination links.  For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).  in: header
     */
    'link'?: string;
    /**
     * The total number of clients.  in: header
     */
    'x-total-count'?: string;
}
/**
 * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"`  For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
 */
export interface TokenPaginationRequestParameters {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    'page_size'?: number;
    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    'page_token'?: string;
}
/**
 * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"`  For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
 */
export interface TokenPaginationResponseHeaders {
    /**
     * The Link HTTP Header  The `Link` header contains a comma-delimited list of links to the following pages:  first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results.  Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples:  </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\"
     */
    'link'?: string;
    /**
     * The X-Total-Count HTTP Header  The `X-Total-Count` header contains the total number of items in the collection.
     */
    'x-total-count'?: number;
}
/**
 * Trust OAuth2 JWT Bearer Grant Type Issuer Request Body
 */
export interface TrustOAuth2JwtGrantIssuer {
    /**
     * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.
     */
    'allow_any_subject'?: boolean;
    /**
     * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".
     */
    'expires_at': string;
    /**
     * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).
     */
    'issuer': string;
    'jwk': JsonWebKey;
    /**
     * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])
     */
    'scope': Array<string>;
    /**
     * The \"subject\" identifies the principal that is the subject of the JWT.
     */
    'subject'?: string;
}
/**
 * OAuth2 JWT Bearer Grant Type Issuer Trust Relationship
 */
export interface TrustedOAuth2JwtGrantIssuer {
    /**
     * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.
     */
    'allow_any_subject'?: boolean;
    /**
     * The \"created_at\" indicates, when grant was created.
     */
    'created_at'?: string;
    /**
     * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".
     */
    'expires_at'?: string;
    'id'?: string;
    /**
     * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).
     */
    'issuer'?: string;
    'public_key'?: TrustedOAuth2JwtGrantJsonWebKey;
    /**
     * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])
     */
    'scope'?: Array<string>;
    /**
     * The \"subject\" identifies the principal that is the subject of the JWT.
     */
    'subject'?: string;
}
/**
 * OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key
 */
export interface TrustedOAuth2JwtGrantJsonWebKey {
    /**
     * The \"key_id\" is key unique identifier (same as kid header in jws/jwt).
     */
    'kid'?: string;
    /**
     * The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.
     */
    'set'?: string;
}
/**
 * Container represents a HTML Form. The container can work with both HTTP Form and JSON requests
 */
export interface UiContainer {
    /**
     * Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`.
     */
    'action': string;
    'messages'?: Array<UiText>;
    /**
     * Method is the form method (e.g. POST)
     */
    'method': string;
    'nodes': Array<UiNode>;
}
/**
 * Nodes are represented as HTML elements or their native UI equivalents. For example, a node can be an `<img>` tag, or an `<input element>` but also `some plain text`.
 */
export interface 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 deviceauthn DeviceAuthnGroup
     */
    'group': UiNodeGroupEnum;
    'messages': Array<UiText>;
    'meta': UiNodeMeta;
    /**
     * The node\'s type text Text input Input img Image a Anchor script Script div Division
     */
    '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',
    Deviceauthn: 'deviceauthn',
    Oauth2Consent: 'oauth2_consent',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeGroupEnum = typeof UiNodeGroupEnum[keyof typeof UiNodeGroupEnum];
export const UiNodeTypeEnum = {
    Text: 'text',
    Input: 'input',
    Img: 'img',
    A: 'a',
    Script: 'script',
    Div: 'div',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeTypeEnum = typeof UiNodeTypeEnum[keyof typeof UiNodeTypeEnum];

export interface UiNodeAnchorAttributes {
    /**
     * The link\'s href (destination) URL.  format: uri
     */
    'href': string;
    /**
     * A unique identifier
     */
    '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 div Division
     */
    'node_type': UiNodeAnchorAttributesNodeTypeEnum;
    'title': UiText;
}

export const UiNodeAnchorAttributesNodeTypeEnum = {
    A: 'a',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeAnchorAttributesNodeTypeEnum = typeof UiNodeAnchorAttributesNodeTypeEnum[keyof typeof UiNodeAnchorAttributesNodeTypeEnum];

/**
 * @type UiNodeAttributes
 */
export type UiNodeAttributes = { node_type: 'a' } & UiNodeAnchorAttributes | { node_type: 'div' } & UiNodeDivisionAttributes | { node_type: 'img' } & UiNodeImageAttributes | { node_type: 'input' } & UiNodeInputAttributes | { node_type: 'script' } & UiNodeScriptAttributes | { node_type: 'text' } & UiNodeTextAttributes;

/**
 * Division sections are used for interactive widgets that require a hook in the DOM / view.
 */
export interface UiNodeDivisionAttributes {
    /**
     * A classname that should be rendered into the DOM.
     */
    'class'?: string;
    /**
     * Data is a map of key-value pairs that are passed to the division.  They may be used for `data-...` attributes.
     */
    'data'?: { [key: string]: string; };
    /**
     * A unique identifier
     */
    'id': string;
    /**
     * NodeType represents this node\'s type. 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 div Division
     */
    'node_type': UiNodeDivisionAttributesNodeTypeEnum;
}

export const UiNodeDivisionAttributesNodeTypeEnum = {
    Div: 'div',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeDivisionAttributesNodeTypeEnum = typeof UiNodeDivisionAttributesNodeTypeEnum[keyof typeof UiNodeDivisionAttributesNodeTypeEnum];

export interface UiNodeImageAttributes {
    /**
     * Height of the image
     */
    'height': number;
    /**
     * A unique identifier
     */
    '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 div Division
     */
    'node_type': UiNodeImageAttributesNodeTypeEnum;
    /**
     * The image\'s source URL.  format: uri
     */
    'src': string;
    /**
     * Width of the image
     */
    'width': number;
}

export const UiNodeImageAttributesNodeTypeEnum = {
    Img: 'img',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeImageAttributesNodeTypeEnum = typeof UiNodeImageAttributesNodeTypeEnum[keyof typeof UiNodeImageAttributesNodeTypeEnum];

/**
 * InputAttributes represents the attributes of an input node
 */
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 username webauthn InputAttributeAutocompleteUsernameWebauthn
     */
    'autocomplete'?: UiNodeInputAttributesAutocompleteEnum;
    /**
     * Sets the input\'s disabled field to true or false.
     */
    'disabled': boolean;
    'label'?: UiText;
    /**
     * MaxLength may contain the input\'s maximum length.
     */
    'maxlength'?: number;
    /**
     * The input\'s element name.
     */
    '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 div Division
     */
    '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.
     */
    '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
     */
    '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.
     */
    '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
     */
    'onloadTrigger'?: UiNodeInputAttributesOnloadTriggerEnum;
    /**
     * The allowed values for the input when the underlying JSON schema defines an `enum`. When present, clients should render the field as a select/dropdown rather than a free-form text input. When absent, clients continue to render a plain text input, so this field is backward compatible with UIs that do not look at it.
     */
    'options'?: Array<UiNodeInputAttributesOption>;
    /**
     * The input\'s pattern.
     */
    'pattern'?: string;
    /**
     * Mark this input field as required.
     */
    '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': UiNodeInputAttributesTypeEnum;
    /**
     * The input\'s value.
     */
    'value'?: any | null;
}

export const UiNodeInputAttributesAutocompleteEnum = {
    Email: 'email',
    Tel: 'tel',
    Url: 'url',
    CurrentPassword: 'current-password',
    NewPassword: 'new-password',
    OneTimeCode: 'one-time-code',
    UsernameWebauthn: 'username webauthn',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeInputAttributesAutocompleteEnum = typeof UiNodeInputAttributesAutocompleteEnum[keyof typeof UiNodeInputAttributesAutocompleteEnum];
export const UiNodeInputAttributesNodeTypeEnum = {
    Input: 'input',
    UnknownDefaultOpenApi: '11184809'
} 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',
    UnknownDefaultOpenApi: '11184809'
} 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',
    UnknownDefaultOpenApi: '11184809'
} 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',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeInputAttributesTypeEnum = typeof UiNodeInputAttributesTypeEnum[keyof typeof UiNodeInputAttributesTypeEnum];

/**
 * Represents a single selectable value for an input whose JSON schema defined an `enum`. The value is always a scalar JSON type (string, number, or boolean) serialized verbatim from the schema. When present, clients should render the parent input as a select/dropdown.
 */
export interface UiNodeInputAttributesOption {
    /**
     * The value that will be submitted when this option is picked. It is serialized verbatim from the JSON schema `enum` entry, so it is always a scalar JSON value (string, number, or boolean).
     */
    'value': any;
}
/**
 * This might include a label and other information that can optionally be used to render UIs.
 */
export interface UiNodeMeta {
    'label'?: UiText;
}
export interface UiNodeScriptAttributes {
    /**
     * The script async type
     */
    'async': boolean;
    /**
     * The script cross origin policy
     */
    'crossorigin': string;
    /**
     * A unique identifier
     */
    'id': string;
    /**
     * The script\'s integrity hash
     */
    '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 div Division
     */
    '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!
     */
    'nonce': string;
    /**
     * The script referrer policy
     */
    'referrerpolicy': string;
    /**
     * The script source
     */
    'src': string;
    /**
     * The script MIME type
     */
    'type': string;
}

export const UiNodeScriptAttributesNodeTypeEnum = {
    Script: 'script',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeScriptAttributesNodeTypeEnum = typeof UiNodeScriptAttributesNodeTypeEnum[keyof typeof UiNodeScriptAttributesNodeTypeEnum];

export interface UiNodeTextAttributes {
    /**
     * A unique identifier
     */
    '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 div Division
     */
    'node_type': UiNodeTextAttributesNodeTypeEnum;
    'text': UiText;
}

export const UiNodeTextAttributesNodeTypeEnum = {
    Text: 'text',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiNodeTextAttributesNodeTypeEnum = typeof UiNodeTextAttributesNodeTypeEnum[keyof typeof UiNodeTextAttributesNodeTypeEnum];

export interface UiText {
    /**
     * The message\'s context. Useful when customizing messages.
     */
    'context'?: object;
    'id': number;
    /**
     * The message text. Written in american english.
     */
    'text': string;
    /**
     * The message type. info Info error Error success Success
     */
    'type': UiTextTypeEnum;
}

export const UiTextTypeEnum = {
    Info: 'info',
    Error: 'error',
    Success: 'success',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UiTextTypeEnum = typeof UiTextTypeEnum[keyof typeof UiTextTypeEnum];

export interface UpdateFedcmFlowBody {
    /**
     * CSRFToken is the anti-CSRF token.
     */
    '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.
     */
    'nonce'?: string;
    /**
     * Token contains the result of `navigator.credentials.get`.
     */
    'token': string;
    /**
     * Transient data to pass along to any webhooks.
     */
    'transient_payload'?: object;
}
/**
 * Update Identity Body
 */
export interface UpdateIdentityBody {
    'credentials'?: IdentityWithCredentials;
    /**
     * ExternalID is an optional external ID of the identity. This is used to link the identity to an external system. If set, the external ID must be unique across all identities.
     */
    'external_id'?: string;
    /**
     * Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/<id>`.
     */
    '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.
     */
    '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.
     */
    'schema_id': string;
    /**
     * State is the identity\'s state. active StateActive inactive StateInactive
     */
    '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`.
     */
    'traits': object;
}

export const UpdateIdentityBodyStateEnum = {
    Active: 'active',
    Inactive: 'inactive',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateIdentityBodyStateEnum = typeof UpdateIdentityBodyStateEnum[keyof typeof UpdateIdentityBodyStateEnum];

/**
 * @type UpdateLoginFlowBody
 */
export type UpdateLoginFlowBody = { method: 'code' } & UpdateLoginFlowWithCodeMethod | { method: 'identifier_first' } & UpdateLoginFlowWithIdentifierFirstMethod | { method: 'lookup_secret' } & UpdateLoginFlowWithLookupSecretMethod | { method: 'oidc' } & UpdateLoginFlowWithOidcMethod | { method: 'passkey' } & UpdateLoginFlowWithPasskeyMethod | { method: 'password' } & UpdateLoginFlowWithPasswordMethod | { method: 'saml' } & UpdateLoginFlowWithSamlMethod | { method: 'totp' } & UpdateLoginFlowWithTotpMethod | { method: 'webauthn' } & UpdateLoginFlowWithWebAuthnMethod;

/**
 * Update Login flow using the code method
 */
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.
     */
    'address'?: string;
    /**
     * Code is the 6 digits code sent to the user
     */
    'code'?: string;
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token': string;
    /**
     * Identifier is the code identifier The identifier requires that the user has already completed the registration or settings with code flow.
     */
    'identifier'?: string;
    /**
     * Method should be set to \"code\" when logging in using the code strategy.
     */
    'method': string;
    /**
     * Resend is set when the user wants to resend the code
     */
    'resend'?: string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Login Flow with Multi-Step Method
 */
export interface UpdateLoginFlowWithIdentifierFirstMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * Identifier is the email or username of the user trying to log in.
     */
    'identifier': string;
    /**
     * Method should be set to \"password\" when logging in using the identifier and password strategy.
     */
    'method': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Login Flow with Lookup Secret Method
 */
export interface UpdateLoginFlowWithLookupSecretMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * The lookup secret.
     */
    'lookup_secret': string;
    /**
     * Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy.
     */
    'method': string;
}
/**
 * Update Login Flow with OpenID Connect Method
 */
export interface UpdateLoginFlowWithOidcMethod {
    /**
     * The CSRF Token
     */
    '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
     */
    '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.
     */
    'id_token_nonce'?: string;
    /**
     * Method to use  This field must be set to `oidc` when using the oidc method.
     */
    'method': string;
    /**
     * The provider to register with
     */
    'provider': string;
    /**
     * The identity traits. This is a placeholder for the registration flow.
     */
    'traits'?: object;
    /**
     * Transient data to pass along to any webhooks
     */
    '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`. `acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.
     */
    'upstream_parameters'?: object;
}
/**
 * Update Login Flow with Passkey Method
 */
export interface UpdateLoginFlowWithPasskeyMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * Method should be set to \"passkey\" when logging in using the Passkey strategy.
     */
    'method': string;
    /**
     * Login a WebAuthn Security Key  This must contain the ID of the WebAuthN connection.
     */
    'passkey_login'?: string;
}
/**
 * Update Login Flow with Password Method
 */
export interface UpdateLoginFlowWithPasswordMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * Identifier is the email or username of the user trying to log in.
     */
    'identifier': string;
    /**
     * Method should be set to \"password\" when logging in using the identifier and password strategy.
     */
    'method': string;
    /**
     * The user\'s password.
     */
    'password': string;
    /**
     * Identifier is the email or username of the user trying to log in. This field is deprecated!
     */
    'password_identifier'?: string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update login flow using SAML
 */
export interface UpdateLoginFlowWithSamlMethod {
    /**
     * The CSRF Token
     */
    'csrf_token'?: string;
    /**
     * Method to use  This field must be set to `saml` when using the saml method.
     */
    'method': string;
    /**
     * The provider to register with
     */
    'provider': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Login Flow with TOTP Method
 */
export interface UpdateLoginFlowWithTotpMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * Method should be set to \"totp\" when logging in using the TOTP strategy.
     */
    'method': string;
    /**
     * The TOTP code.
     */
    'totp_code': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Login Flow with WebAuthn Method
 */
export interface UpdateLoginFlowWithWebAuthnMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * Identifier is the email or username of the user trying to log in.
     */
    'identifier': string;
    /**
     * Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy.
     */
    'method': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
    /**
     * Login a WebAuthn Security Key  This must contain the ID of the WebAuthN connection.
     */
    'webauthn_login'?: string;
}
export interface UpdateOrganizationOnboardingPortalLinkBody {
    /**
     * Feature flag to enable SCIM configuration
     */
    'enable_scim': boolean;
    /**
     * Feature flag to enable SSO configuration
     */
    'enable_sso': boolean;
    'expires_at'?: string;
}
/**
 * @type UpdateRecoveryFlowBody
 * Update Recovery Flow Request Body
 */
export type UpdateRecoveryFlowBody = { method: 'code' } & UpdateRecoveryFlowWithCodeMethod | { method: 'link' } & UpdateRecoveryFlowWithLinkMethod;

/**
 * Update Recovery Flow with Code Method
 */
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.
     */
    'code'?: string;
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    '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.com/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
     */
    'email'?: string;
    /**
     * Method is the method that should be used for this recovery flow  Allowed values are `link` and `code`. link RecoveryStrategyLink code RecoveryStrategyCode
     */
    'method': UpdateRecoveryFlowWithCodeMethodMethodEnum;
    /**
     * A recovery address that is registered for the user. It can be an email, a phone number (to receive the code via SMS), etc. Used in RecoveryV2.
     */
    'recovery_address'?: string;
    /**
     * If there are multiple recovery addresses registered for the user, and the initially provided address is different from the address chosen when the choice (of masked addresses) is presented, then we need to make sure that the user actually knows the full address to avoid information exfiltration, so we ask for the full address. Used in RecoveryV2.
     */
    'recovery_confirm_address'?: string;
    /**
     * If there are multiple addresses registered for the user, a choice is presented and this field stores the result of this choice. Addresses are \'masked\' (never sent in full to the client and shown partially in the UI) since at this point in the recovery flow, the user has not yet proven that it knows the full address and we want to avoid information exfiltration. So for all intents and purposes, the value of this field should be treated as an opaque identifier. Used in RecoveryV2.
     */
    'recovery_select_address'?: string;
    /**
     * Set to \"previous\" to go back in the flow, meaningfully. Used in RecoveryV2.
     */
    'screen'?: string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}

export const UpdateRecoveryFlowWithCodeMethodMethodEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateRecoveryFlowWithCodeMethodMethodEnum = typeof UpdateRecoveryFlowWithCodeMethodMethodEnum[keyof typeof UpdateRecoveryFlowWithCodeMethodMethodEnum];

/**
 * Update Recovery Flow with Link Method
 */
export interface UpdateRecoveryFlowWithLinkMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    '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, an email with details on what happened will be sent instead.  format: email
     */
    'email': string;
    /**
     * Method is the method that should be used for this recovery flow  Allowed values are `link` and `code` link RecoveryStrategyLink code RecoveryStrategyCode
     */
    'method': UpdateRecoveryFlowWithLinkMethodMethodEnum;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}

export const UpdateRecoveryFlowWithLinkMethodMethodEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateRecoveryFlowWithLinkMethodMethodEnum = typeof UpdateRecoveryFlowWithLinkMethodMethodEnum[keyof typeof UpdateRecoveryFlowWithLinkMethodMethodEnum];

/**
 * @type UpdateRegistrationFlowBody
 * Update Registration Request Body
 */
export type UpdateRegistrationFlowBody = { method: 'code' } & UpdateRegistrationFlowWithCodeMethod | { method: 'oidc' } & UpdateRegistrationFlowWithOidcMethod | { method: 'passkey' } & UpdateRegistrationFlowWithPasskeyMethod | { method: 'password' } & UpdateRegistrationFlowWithPasswordMethod | { method: 'profile' } & UpdateRegistrationFlowWithProfileMethod | { method: 'saml' } & UpdateRegistrationFlowWithSamlMethod | { method: 'webauthn' } & UpdateRegistrationFlowWithWebAuthnMethod;

/**
 * Update Registration Flow with Code Method
 */
export interface UpdateRegistrationFlowWithCodeMethod {
    /**
     * The OTP Code sent to the user
     */
    'code'?: string;
    /**
     * The CSRF Token
     */
    'csrf_token'?: string;
    /**
     * Method to use  This field must be set to `code` when using the code method.
     */
    'method': string;
    /**
     * Resend restarts the flow with a new code
     */
    'resend'?: string;
    /**
     * The identity\'s traits
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Registration Flow with OpenID Connect Method
 */
export interface UpdateRegistrationFlowWithOidcMethod {
    /**
     * The CSRF Token
     */
    '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
     */
    '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.
     */
    'id_token_nonce'?: string;
    /**
     * Method to use  This field must be set to `oidc` when using the oidc method.
     */
    'method': string;
    /**
     * The provider to register with
     */
    'provider': string;
    /**
     * The identity traits
     */
    'traits'?: object;
    /**
     * Transient data to pass along to any webhooks
     */
    '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`. `acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.
     */
    'upstream_parameters'?: object;
}
/**
 * Update Registration Flow with Passkey Method
 */
export interface UpdateRegistrationFlowWithPasskeyMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to \"passkey\" when trying to add, update, or remove a Passkey.
     */
    'method': string;
    /**
     * Register a WebAuthn Security Key  It is expected that the JSON returned by the WebAuthn registration process is included here.
     */
    'passkey_register'?: string;
    /**
     * The identity\'s traits
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Registration Flow with Password Method
 */
export interface UpdateRegistrationFlowWithPasswordMethod {
    /**
     * The CSRF Token
     */
    'csrf_token'?: string;
    /**
     * Method to use  This field must be set to `password` when using the password method.
     */
    'method': string;
    /**
     * Password to sign the user up with
     */
    'password': string;
    /**
     * The identity\'s traits
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Registration Flow with Profile Method
 */
export interface UpdateRegistrationFlowWithProfileMethod {
    /**
     * The Anti-CSRF Token  This token is only required when performing browser flows.
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to profile when trying to update a profile.
     */
    '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
     */
    'screen'?: UpdateRegistrationFlowWithProfileMethodScreenEnum;
    /**
     * Traits  The identity\'s traits.
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}

export const UpdateRegistrationFlowWithProfileMethodScreenEnum = {
    CredentialSelection: 'credential-selection',
    Previous: 'previous',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateRegistrationFlowWithProfileMethodScreenEnum = typeof UpdateRegistrationFlowWithProfileMethodScreenEnum[keyof typeof UpdateRegistrationFlowWithProfileMethodScreenEnum];

/**
 * Update registration flow using SAML
 */
export interface UpdateRegistrationFlowWithSamlMethod {
    /**
     * The CSRF Token
     */
    'csrf_token'?: string;
    /**
     * Method to use  This field must be set to `saml` when using the saml method.
     */
    'method': string;
    /**
     * The provider to register with
     */
    'provider': string;
    /**
     * The identity traits
     */
    'traits'?: object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Registration Flow with WebAuthn Method
 */
export interface UpdateRegistrationFlowWithWebAuthnMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing.
     */
    'method': string;
    /**
     * The identity\'s traits
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
    /**
     * Register a WebAuthn Security Key  It is expected that the JSON returned by the WebAuthn registration process is included here.
     */
    'webauthn_register'?: string;
    /**
     * Name of the WebAuthn Security Key to be Added  A human-readable name for the security key which will be added.
     */
    'webauthn_register_displayname'?: string;
}
/**
 * @type UpdateSettingsFlowBody
 * Update Settings Flow Request Body
 */
export type UpdateSettingsFlowBody = { method: 'lookup_secret' } & UpdateSettingsFlowWithLookupMethod | { method: 'oidc' } & UpdateSettingsFlowWithOidcMethod | { method: 'passkey' } & UpdateSettingsFlowWithPasskeyMethod | { method: 'password' } & UpdateSettingsFlowWithPasswordMethod | { method: 'profile' } & UpdateSettingsFlowWithProfileMethod | { method: 'saml' } & UpdateSettingsFlowWithSamlMethod | { method: 'totp' } & UpdateSettingsFlowWithTotpMethod | { method: 'webauthn' } & UpdateSettingsFlowWithWebAuthnMethod;

/**
 * Update Settings Flow with Lookup Method
 */
export interface UpdateSettingsFlowWithLookupMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * If set to true will save the regenerated lookup secrets
     */
    'lookup_secret_confirm'?: boolean;
    /**
     * Disables this method if true.
     */
    'lookup_secret_disable'?: boolean;
    /**
     * If set to true will regenerate the lookup secrets
     */
    'lookup_secret_regenerate'?: boolean;
    /**
     * If set to true will reveal the lookup secrets
     */
    'lookup_secret_reveal'?: boolean;
    /**
     * Method  Should be set to \"lookup\" when trying to add, update, or remove a lookup pairing.
     */
    'method': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Settings Flow with OpenID Connect Method
 */
export interface UpdateSettingsFlowWithOidcMethod {
    /**
     * Flow ID is the flow\'s ID.  in: query
     */
    'flow'?: string;
    /**
     * Link this provider  Either this or `unlink` must be set.  type: string in: body
     */
    'link'?: string;
    /**
     * Method  Should be set to profile when trying to update a profile.
     */
    'method': string;
    /**
     * The identity\'s traits  in: body
     */
    'traits'?: object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
    /**
     * Unlink this provider  Either this or `link` must be set.  type: string in: body
     */
    '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`. `acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.
     */
    'upstream_parameters'?: object;
}
/**
 * Update Settings Flow with Passkey Method
 */
export interface UpdateSettingsFlowWithPasskeyMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to \"passkey\" when trying to add, update, or remove a webAuthn pairing.
     */
    'method': string;
    /**
     * Remove a WebAuthn Security Key  This must contain the ID of the WebAuthN connection.
     */
    'passkey_remove'?: string;
    /**
     * Register a WebAuthn Security Key  It is expected that the JSON returned by the WebAuthn registration process is included here.
     */
    'passkey_settings_register'?: string;
}
/**
 * Update Settings Flow with Password Method
 */
export interface UpdateSettingsFlowWithPasswordMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to password when trying to update a password.
     */
    'method': string;
    /**
     * Password is the updated password
     */
    'password': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Settings Flow with Profile Method
 */
export interface UpdateSettingsFlowWithProfileMethod {
    /**
     * The Anti-CSRF Token  This token is only required when performing browser flows.
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to profile when trying to update a profile.
     */
    'method': string;
    /**
     * Traits  The identity\'s traits.
     */
    'traits': object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update settings flow using SAML
 */
export interface UpdateSettingsFlowWithSamlMethod {
    /**
     * The CSRF Token
     */
    'csrf_token'?: string;
    /**
     * Flow ID is the flow\'s ID.  in: query
     */
    'flow'?: string;
    /**
     * Link this provider  Either this or `unlink` must be set.  type: string in: body
     */
    'link'?: string;
    /**
     * Method  Should be set to saml when trying to update a profile.
     */
    'method': string;
    /**
     * The identity\'s traits  in: body
     */
    'traits'?: object;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
    /**
     * Unlink this provider  Either this or `link` must be set.  type: string in: body
     */
    'unlink'?: string;
}
/**
 * Update Settings Flow with TOTP Method
 */
export interface UpdateSettingsFlowWithTotpMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to \"totp\" when trying to add, update, or remove a totp pairing.
     */
    'method': string;
    /**
     * ValidationTOTP must contain a valid TOTP based on the
     */
    '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.
     */
    'totp_unlink'?: boolean;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}
/**
 * Update Settings Flow with WebAuthn Method
 */
export interface UpdateSettingsFlowWithWebAuthnMethod {
    /**
     * CSRFToken is the anti-CSRF token
     */
    'csrf_token'?: string;
    /**
     * Method  Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing.
     */
    'method': string;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
    /**
     * Register a WebAuthn Security Key  It is expected that the JSON returned by the WebAuthn registration process is included here.
     */
    'webauthn_register'?: string;
    /**
     * Name of the WebAuthn Security Key to be Added  A human-readable name for the security key which will be added.
     */
    'webauthn_register_displayname'?: string;
    /**
     * Remove a WebAuthn Security Key  This must contain the ID of the WebAuthN connection.
     */
    'webauthn_remove'?: string;
}
export interface UpdateSubscriptionBody {
    /**
     *  monthly Monthly yearly Yearly
     */
    'interval': UpdateSubscriptionBodyIntervalEnum;
    'plan': string;
    'return_to'?: string;
}

export const UpdateSubscriptionBodyIntervalEnum = {
    Monthly: 'monthly',
    Yearly: 'yearly',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateSubscriptionBodyIntervalEnum = typeof UpdateSubscriptionBodyIntervalEnum[keyof typeof UpdateSubscriptionBodyIntervalEnum];

/**
 * @type UpdateVerificationFlowBody
 * Update Verification Flow Request Body
 */
export type UpdateVerificationFlowBody = { method: 'code' } & UpdateVerificationFlowWithCodeMethod | { method: 'link' } & UpdateVerificationFlowWithLinkMethod;

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.
     */
    'code'?: string;
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    'csrf_token'?: string;
    /**
     * The email address or phone number to verify  If the provided address belongs to a valid account, a verification email or SMS 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.com/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.
     */
    'email'?: string;
    /**
     * Method is the method that should be used for this verification flow  Allowed values are `link` and `code`. link VerificationStrategyLink code VerificationStrategyCode
     */
    'method': UpdateVerificationFlowWithCodeMethodMethodEnum;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}

export const UpdateVerificationFlowWithCodeMethodMethodEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateVerificationFlowWithCodeMethodMethodEnum = typeof UpdateVerificationFlowWithCodeMethodMethodEnum[keyof typeof UpdateVerificationFlowWithCodeMethodMethodEnum];

/**
 * Update Verification Flow with Link Method
 */
export interface UpdateVerificationFlowWithLinkMethod {
    /**
     * Sending the anti-csrf token is only required for browser login flows.
     */
    '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
     */
    'email': string;
    /**
     * Method is the method that should be used for this verification flow  Allowed values are `link` and `code` link VerificationStrategyLink code VerificationStrategyCode
     */
    'method': UpdateVerificationFlowWithLinkMethodMethodEnum;
    /**
     * Transient data to pass along to any webhooks
     */
    'transient_payload'?: object;
}

export const UpdateVerificationFlowWithLinkMethodMethodEnum = {
    Link: 'link',
    Code: 'code',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateVerificationFlowWithLinkMethodMethodEnum = typeof UpdateVerificationFlowWithLinkMethodMethodEnum[keyof typeof UpdateVerificationFlowWithLinkMethodMethodEnum];

export interface UpdateWorkspaceBody {
    /**
     * The access policy of the workspace. If the workspace is not linked to an organization, this field is ignored and the access policy is set to \"INVITED_MEMBERS\", which allows all invited members to access the workspace. CHECK_ORGANIZATION_AND_WORKSPACE_MEMBERSHIP WorkspaceAccessPolicyOrganizationMembershipRequired  Only invited members that are part of the organization defined for the workspace can access it CHECK_ACCESS_PERMISSION WorkspaceAccessPolicyMembershipRequired  All invited members can access the workspace, regardless of their organization membership  This is useful for migration scenarios where workspaces previously did not have an organization assigned  If a user is just a member of a project within the workspace, they\'ll still have access to the project, but not to the workspace itself (the default for existing workspaces)
     */
    'access_policy'?: UpdateWorkspaceBodyAccessPolicyEnum;
    /**
     * The name of the workspace.
     */
    'name': string;
}

export const UpdateWorkspaceBodyAccessPolicyEnum = {
    CheckOrganizationAndWorkspaceMembership: 'CHECK_ORGANIZATION_AND_WORKSPACE_MEMBERSHIP',
    CheckAccessPermission: 'CHECK_ACCESS_PERMISSION',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type UpdateWorkspaceBodyAccessPolicyEnum = typeof UpdateWorkspaceBodyAccessPolicyEnum[keyof typeof UpdateWorkspaceBodyAccessPolicyEnum];

export interface Usage {
    'GenericUsage'?: GenericUsage;
}
export interface VerifiableCredentialPrimingResponse {
    'c_nonce'?: string;
    'c_nonce_expires_in'?: number;
    'error'?: string;
    'error_debug'?: string;
    'error_description'?: string;
    'error_hint'?: string;
    'format'?: string;
    'status_code'?: number;
}
export interface VerifiableCredentialProof {
    'jwt'?: string;
    'proof_type'?: string;
}
export interface VerifiableCredentialResponse {
    'credential_draft_00'?: string;
    'format'?: string;
}
/**
 * VerifiableAddress is an identity\'s verifiable address
 */
export interface VerifiableIdentityAddress {
    /**
     * When this entry was created
     */
    'created_at'?: string;
    /**
     * The ID
     */
    'id'?: string;
    /**
     * VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema
     */
    'status': string;
    /**
     * When this entry was last updated
     */
    'updated_at'?: string;
    /**
     * The address value  example foo@user.com
     */
    'value': string;
    /**
     * Indicates if the address has already been verified
     */
    'verified': boolean;
    'verified_at'?: string;
    /**
     * The delivery method
     */
    'via': VerifiableIdentityAddressViaEnum;
}

export const VerifiableIdentityAddressViaEnum = {
    Email: 'email',
    Sms: 'sms',
    UnknownDefaultOpenApi: '11184809'
} 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.com/docs/kratos/self-service/flows/verify-email-account-activation
 */
export interface VerificationFlow {
    /**
     * Active, if set, contains the registration method that is being used. It is initially not set.
     */
    '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.
     */
    '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://<selfservice.flows.verification.ui_url>?request=<id>  type: string format: uuid
     */
    'id': string;
    /**
     * IssuedAt is the time (UTC) when the request occurred.
     */
    '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.
     */
    'request_url'?: string;
    /**
     * ReturnTo contains the requested return_to URL.
     */
    '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.
     */
    'state': any;
    /**
     * TransientPayload is used to pass data from the verification flow to hooks and email templates
     */
    'transient_payload'?: object;
    /**
     * The flow type can either be `api` or `browser`.
     */
    'type': string;
    'ui': UiContainer;
}
/**
 * The experimental state represents the state of a verification flow. This field is EXPERIMENTAL and subject to change!
 */

export const VerificationFlowState = {
    ChooseMethod: 'choose_method',
    SentEmail: 'sent_email',
    PassedChallenge: 'passed_challenge',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type VerificationFlowState = typeof VerificationFlowState[keyof typeof VerificationFlowState];


export interface VerifyUserCodeRequest {
    'client'?: OAuth2Client;
    'device_code_request_id'?: string;
    /**
     * RequestURL is the original Device Authorization URL requested.
     */
    'request_url'?: string;
    /**
     * RequestedAudience contains the access token audience as requested by the OAuth 2.0 Client.
     */
    'requested_access_token_audience'?: Array<string>;
    /**
     * RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
     */
    'requested_scope'?: Array<string>;
}
export interface Version {
    /**
     * Version is the service\'s version.
     */
    'version'?: string;
}
export interface Warning {
    'code'?: number;
    'message'?: string;
}
export interface Workspace {
    /**
     * Controls who can access the workspace and its projects  This does not control access level, only who can access it at all. CHECK_ORGANIZATION_AND_WORKSPACE_MEMBERSHIP WorkspaceAccessPolicyOrganizationMembershipRequired  Only invited members that are part of the organization defined for the workspace can access it CHECK_ACCESS_PERMISSION WorkspaceAccessPolicyMembershipRequired  All invited members can access the workspace, regardless of their organization membership  This is useful for migration scenarios where workspaces previously did not have an organization assigned  If a user is just a member of a project within the workspace, they\'ll still have access to the project, but not to the workspace itself (the default for existing workspaces)
     */
    'access_policy'?: WorkspaceAccessPolicyEnum;
    'created_at': string;
    'id': string;
    'name': string;
    'organization_id'?: string | null;
    'subscription_id'?: string | null;
    'subscription_plan'?: string | null;
    'updated_at': string;
}

export const WorkspaceAccessPolicyEnum = {
    CheckOrganizationAndWorkspaceMembership: 'CHECK_ORGANIZATION_AND_WORKSPACE_MEMBERSHIP',
    CheckAccessPermission: 'CHECK_ACCESS_PERMISSION',
    UnknownDefaultOpenApi: '11184809'
} as const;

export type WorkspaceAccessPolicyEnum = typeof WorkspaceAccessPolicyEnum[keyof typeof WorkspaceAccessPolicyEnum];

export interface WorkspaceApiKey {
    /**
     * The API key\'s creation date
     */
    'created_at'?: string;
    'expires_at'?: string;
    /**
     * The key\'s ID.
     */
    'id': string;
    /**
     * The API key\'s Name  Set this to help you remember, for example, where you use the API key.
     */
    'name': string;
    /**
     * The key\'s owner
     */
    'owner_id': string;
    /**
     * The API key\'s last update date
     */
    'updated_at'?: string;
    /**
     * The key\'s value
     */
    'value'?: string;
    /**
     * The API key\'s workspace ID
     */
    'workspace_id'?: string;
}
export interface WorkspaceOrganization {
    'active_link'?: OnboardingPortalLink;
    'created_at': string;
    /**
     * The list of organization\'s domains.
     */
    'domains': Array<string>;
    /**
     * The organization\'s ID.
     */
    'id': string;
    /**
     * The organization\'s human-readable label.
     */
    'label': string;
    'providers': Array<string>;
}

/**
 * CourierApi - axios parameter creator
 */
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<RequestArgs> => {
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, 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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {CourierMessageStatus} [status] Status filters out messages based on status. If no value is provided, it doesn\&#39;t take effect on filter.
         * @param {string} [recipient] Recipient filters out messages based on recipient. If no value is provided, it doesn\&#39;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<RequestArgs> => {
            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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, 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 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<Message>> {
            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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {CourierMessageStatus} [status] Status filters out messages based on status. If no value is provided, it doesn\&#39;t take effect on filter.
         * @param {string} [recipient] Recipient filters out messages based on recipient. If no value is provided, it doesn\&#39;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<Array<Message>>> {
            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 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<Message> {
            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<Array<Message>> {
            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 {
    /**
     * MessageID is the ID of the message.
     */
    readonly id: string
}

/**
 * Request parameters for listCourierMessages operation in CourierApi.
 */
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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Status filters out messages based on status. If no value is provided, it doesn\&#39;t take effect on filter.
     */
    readonly status?: CourierMessageStatus

    /**
     * Recipient filters out messages based on recipient. If no value is provided, it doesn\&#39;t take effect on filter.
     */
    readonly recipient?: string
}

/**
 * CourierApi - object-oriented interface
 */
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}
     */
    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}
     */
    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));
    }
}



/**
 * EventsApi - axios parameter creator
 */
export const EventsApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create an event stream for your project.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {CreateEventStreamBody} createEventStreamBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEventStream: async (projectId: string, createEventStreamBody: CreateEventStreamBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('createEventStream', 'projectId', projectId)
            // verify required parameter 'createEventStreamBody' is not null or undefined
            assertParamExists('createEventStream', 'createEventStreamBody', createEventStreamBody)
            const localVarPath = `/projects/{project_id}/eventstreams`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createEventStreamBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove an event stream from a project.
         * @summary Remove an event stream from a project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} eventStreamId Event Stream ID  The ID of the event stream to be deleted, as returned when created.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEventStream: async (projectId: string, eventStreamId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('deleteEventStream', 'projectId', projectId)
            // verify required parameter 'eventStreamId' is not null or undefined
            assertParamExists('deleteEventStream', 'eventStreamId', eventStreamId)
            const localVarPath = `/projects/{project_id}/eventstreams/{event_stream_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"event_stream_id"}}`, encodeURIComponent(String(eventStreamId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List all event streams for the project. This endpoint is not paginated.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEventStreams: async (projectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('listEventStreams', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}/eventstreams`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Update an event stream for a project.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} eventStreamId Event Stream ID  The event stream\&#39;s ID.
         * @param {SetEventStreamBody} [setEventStreamBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setEventStream: async (projectId: string, eventStreamId: string, setEventStreamBody?: SetEventStreamBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('setEventStream', 'projectId', projectId)
            // verify required parameter 'eventStreamId' is not null or undefined
            assertParamExists('setEventStream', 'eventStreamId', eventStreamId)
            const localVarPath = `/projects/{project_id}/eventstreams/{event_stream_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"event_stream_id"}}`, encodeURIComponent(String(eventStreamId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(setEventStreamBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * EventsApi - functional programming interface
 */
export const EventsApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = EventsApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create an event stream for your project.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {CreateEventStreamBody} createEventStreamBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createEventStream(projectId: string, createEventStreamBody: CreateEventStreamBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventStream>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createEventStream(projectId, createEventStreamBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventsApi.createEventStream']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Remove an event stream from a project.
         * @summary Remove an event stream from a project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} eventStreamId Event Stream ID  The ID of the event stream to be deleted, as returned when created.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteEventStream(projectId: string, eventStreamId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEventStream(projectId, eventStreamId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventsApi.deleteEventStream']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List all event streams for the project. This endpoint is not paginated.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEventStreams(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEventStreams>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEventStreams(projectId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventsApi.listEventStreams']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Update an event stream for a project.
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} eventStreamId Event Stream ID  The event stream\&#39;s ID.
         * @param {SetEventStreamBody} [setEventStreamBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setEventStream(projectId: string, eventStreamId: string, setEventStreamBody?: SetEventStreamBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventStream>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setEventStream(projectId, eventStreamId, setEventStreamBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventsApi.setEventStream']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * EventsApi - factory interface
 */
export const EventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = EventsApiFp(configuration)
    return {
        /**
         * 
         * @summary Create an event stream for your project.
         * @param {EventsApiCreateEventStreamRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEventStream(requestParameters: EventsApiCreateEventStreamRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventStream> {
            return localVarFp.createEventStream(requestParameters.projectId, requestParameters.createEventStreamBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove an event stream from a project.
         * @summary Remove an event stream from a project
         * @param {EventsApiDeleteEventStreamRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEventStream(requestParameters: EventsApiDeleteEventStreamRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteEventStream(requestParameters.projectId, requestParameters.eventStreamId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List all event streams for the project. This endpoint is not paginated.
         * @param {EventsApiListEventStreamsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEventStreams(requestParameters: EventsApiListEventStreamsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListEventStreams> {
            return localVarFp.listEventStreams(requestParameters.projectId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Update an event stream for a project.
         * @param {EventsApiSetEventStreamRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setEventStream(requestParameters: EventsApiSetEventStreamRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventStream> {
            return localVarFp.setEventStream(requestParameters.projectId, requestParameters.eventStreamId, requestParameters.setEventStreamBody, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createEventStream operation in EventsApi.
 */
export interface EventsApiCreateEventStreamRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    readonly createEventStreamBody: CreateEventStreamBody
}

/**
 * Request parameters for deleteEventStream operation in EventsApi.
 */
export interface EventsApiDeleteEventStreamRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Event Stream ID  The ID of the event stream to be deleted, as returned when created.
     */
    readonly eventStreamId: string
}

/**
 * Request parameters for listEventStreams operation in EventsApi.
 */
export interface EventsApiListEventStreamsRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string
}

/**
 * Request parameters for setEventStream operation in EventsApi.
 */
export interface EventsApiSetEventStreamRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Event Stream ID  The event stream\&#39;s ID.
     */
    readonly eventStreamId: string

    readonly setEventStreamBody?: SetEventStreamBody
}

/**
 * EventsApi - object-oriented interface
 */
export class EventsApi extends BaseAPI {
    /**
     * 
     * @summary Create an event stream for your project.
     * @param {EventsApiCreateEventStreamRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createEventStream(requestParameters: EventsApiCreateEventStreamRequest, options?: RawAxiosRequestConfig) {
        return EventsApiFp(this.configuration).createEventStream(requestParameters.projectId, requestParameters.createEventStreamBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Remove an event stream from a project.
     * @summary Remove an event stream from a project
     * @param {EventsApiDeleteEventStreamRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteEventStream(requestParameters: EventsApiDeleteEventStreamRequest, options?: RawAxiosRequestConfig) {
        return EventsApiFp(this.configuration).deleteEventStream(requestParameters.projectId, requestParameters.eventStreamId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List all event streams for the project. This endpoint is not paginated.
     * @param {EventsApiListEventStreamsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listEventStreams(requestParameters: EventsApiListEventStreamsRequest, options?: RawAxiosRequestConfig) {
        return EventsApiFp(this.configuration).listEventStreams(requestParameters.projectId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Update an event stream for a project.
     * @param {EventsApiSetEventStreamRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setEventStream(requestParameters: EventsApiSetEventStreamRequest, options?: RawAxiosRequestConfig) {
        return EventsApiFp(this.configuration).setEventStream(requestParameters.projectId, requestParameters.eventStreamId, requestParameters.setEventStreamBody, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * FrontendApi - axios parameter creator
 */
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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
         * @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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?login_challenge&#x3D;abcde&#x60;).
         * @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\&#39;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 {string} [identitySchema] An optional identity schema to use for the login flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserLoginFlow: async (refresh?: boolean, aal?: string, returnTo?: string, cookie?: string, loginChallenge?: string, organization?: string, via?: string, identitySchema?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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 (identitySchema !== undefined) {
                localVarQueryParameter['identity_schema'] = identitySchema;
            }


    
            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<RequestArgs> => {
            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 {string} [skipSettings] Skip redirection to the settings UI after the recovery flow was completed. Instead, the user will be redirected to the URL specified in &#x60;return_to&#x60; query parameter or the default return URL if &#x60;return_to&#x60; is not set.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserRecoveryFlow: async (returnTo?: string, skipSettings?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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;
            }

            if (skipSettings !== undefined) {
                localVarQueryParameter['skip_settings'] = skipSettings;
            }


    
            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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?login_challenge&#x3D;abcde&#x60;).  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 &#x60;selfservice.flows.verification.after.default_redirect_to&#x60; 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 {string} [identitySchema] An optional identity schema to use for the registration flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserRegistrationFlow: async (returnTo?: string, loginChallenge?: string, afterVerificationReturnTo?: string, organization?: string, identitySchema?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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;
            }

            if (identitySchema !== undefined) {
                localVarQueryParameter['identity_schema'] = identitySchema;
            }


    
            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<RequestArgs> => {
            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.com/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<RequestArgs> => {
            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<RequestArgs> => {
            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=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
         * @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\&#39;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 {string} [identitySchema] An optional identity schema to use for the login flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeLoginFlow: async (refresh?: boolean, aal?: string, xSessionToken?: string, returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, via?: string, identitySchema?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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 (identitySchema !== undefined) {
                localVarQueryParameter['identity_schema'] = identitySchema;
            }


    
            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<RequestArgs> => {
            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=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 {string} [identitySchema] An optional identity schema to use for the registration flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeRegistrationFlow: async (returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, identitySchema?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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;
            }

            if (identitySchema !== undefined) {
                localVarQueryParameter['identity_schema'] = identitySchema;
            }


    
            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=<flow_id>`.  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<RequestArgs> => {
            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=<flow_id>`.  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.com/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<RequestArgs> => {
            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 &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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<RequestArgs> => {
            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\&#39;s ID.
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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.com/docs/kratos/self-service/flows/user-facing-errors).
         * @summary Get User-Flow Errors
         * @param {string} id Error is the error\&#39;s ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getFlowError: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
         * @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<RequestArgs> => {
            // 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 &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
         * @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<RequestArgs> => {
            // 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
         * @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<RequestArgs> => {
            // 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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
         * @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<RequestArgs> => {
            // 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.com/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 &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
         * @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<RequestArgs> => {
            // 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 <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ```  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Get WebAuthn JavaScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getWebAuthnJavaScript: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/.well-known/ory/webauthn.js`;
            // 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 endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
         * @summary Get My Active Sessions
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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}
         */
        listMySessions: async (perPage?: number, page?: number, pageSize?: number, pageToken?: string, xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            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: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (perPage !== undefined) {
                localVarQueryParameter['per_page'] = perPage;
            }

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }


    
            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,
            };
        },
        /**
         * Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before.  If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.  This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
         * @summary Perform Logout for Native Apps
         * @param {PerformNativeLogoutBody} performNativeLogoutBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        performNativeLogout: async (performNativeLogoutBody: PerformNativeLogoutBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'performNativeLogoutBody' is not null or undefined
            assertParamExists('performNativeLogout', 'performNativeLogoutBody', performNativeLogoutBody)
            const localVarPath = `/self-service/logout/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: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(performNativeLogoutBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response.  If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:  ```js pseudo-code example router.get(\'/protected-endpoint\', async function (req, res) { const session = await client.toSession(undefined, req.header(\'cookie\'))  console.log(session) }) ```  When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\")  console.log(session) ```  When using a token template, the token is included in the `tokenized` field of the session.  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\", { tokenize_as: \"example-jwt-template\" })  console.log(session.tokenized) // The JWT ```  Depending on your configuration this endpoint might return a 403 status code 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.  This endpoint is useful for:  AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header!  This endpoint authenticates users by checking:  if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.  If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.  As explained above, this request may fail due to several reasons. The `error.id` can be one of:  `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
         * @summary Check Who the Current HTTP Session Belongs To
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
         * @param {string} [tokenizeAs] Returns the session additionally as a token (such as a JWT)  The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toSession: async (xSessionToken?: string, cookie?: string, tokenizeAs?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/sessions/whoami`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (tokenizeAs !== undefined) {
                localVarQueryParameter['tokenize_as'] = tokenizeAs;
            }


    
            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,
            };
        },
        /**
         * Use this endpoint to submit a token from a FedCM provider through `navigator.credentials.get` and log the user in. The parameters from `navigator.credentials.get` must have come from `GET self-service/fed-cm/parameters`.
         * @summary Submit a FedCM token
         * @param {UpdateFedcmFlowBody} updateFedcmFlowBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFedcmFlow: async (updateFedcmFlowBody: UpdateFedcmFlowBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'updateFedcmFlowBody' is not null or undefined
            assertParamExists('updateFedcmFlow', 'updateFedcmFlowBody', updateFedcmFlowBody)
            const localVarPath = `/self-service/fed-cm/token`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateFedcmFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Submit a Login Flow
         * @param {string} flow The Login Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
         * @param {UpdateLoginFlowBody} updateLoginFlowBody 
         * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow.
         * @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}
         */
        updateLoginFlow: async (flow: string, updateLoginFlowBody: UpdateLoginFlowBody, xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'flow' is not null or undefined
            assertParamExists('updateLoginFlow', 'flow', flow)
            // verify required parameter 'updateLoginFlowBody' is not null or undefined
            assertParamExists('updateLoginFlow', 'updateLoginFlowBody', updateLoginFlowBody)
            const localVarPath = `/self-service/login`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (flow !== undefined) {
                localVarQueryParameter['flow'] = flow;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            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};
            localVarRequestOptions.data = serializeDataIfNeeded(updateLoginFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint logs out an identity in a self-service manner.  If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.  If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead.  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.  More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.com/docs/next/kratos/self-service/flows/user-logout).
         * @summary Update Logout Flow
         * @param {string} [token] A Valid Logout Token  If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.
         * @param {string} [returnTo] The URL to return to after the logout 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}
         */
        updateLogoutFlow: async (token?: string, returnTo?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/self-service/logout`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (token !== undefined) {
                localVarQueryParameter['token'] = token;
            }

            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,
            };
        },
        /**
         * Use this endpoint to update a recovery flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid.  More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
         * @summary Update Recovery Flow
         * @param {string} flow The Recovery Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
         * @param {UpdateRecoveryFlowBody} updateRecoveryFlowBody 
         * @param {string} [token] Recovery Token  The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
         * @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}
         */
        updateRecoveryFlow: async (flow: string, updateRecoveryFlowBody: UpdateRecoveryFlowBody, token?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'flow' is not null or undefined
            assertParamExists('updateRecoveryFlow', 'flow', flow)
            // verify required parameter 'updateRecoveryFlowBody' is not null or undefined
            assertParamExists('updateRecoveryFlow', 'updateRecoveryFlowBody', updateRecoveryFlowBody)
            const localVarPath = `/self-service/recovery`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (flow !== undefined) {
                localVarQueryParameter['flow'] = flow;
            }

            if (token !== undefined) {
                localVarQueryParameter['token'] = token;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            if (cookie != null) {
                localVarHeaderParameter['Cookie'] = String(cookie);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateRecoveryFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Update Registration Flow
         * @param {string} flow The Registration Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
         * @param {UpdateRegistrationFlowBody} updateRegistrationFlowBody 
         * @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}
         */
        updateRegistrationFlow: async (flow: string, updateRegistrationFlowBody: UpdateRegistrationFlowBody, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'flow' is not null or undefined
            assertParamExists('updateRegistrationFlow', 'flow', flow)
            // verify required parameter 'updateRegistrationFlowBody' is not null or undefined
            assertParamExists('updateRegistrationFlow', 'updateRegistrationFlowBody', updateRegistrationFlowBody)
            const localVarPath = `/self-service/registration`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (flow !== undefined) {
                localVarQueryParameter['flow'] = flow;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            if (cookie != null) {
                localVarHeaderParameter['Cookie'] = String(cookie);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateRegistrationFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low. Implies that the user needs to re-authenticate.  Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.  Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session\'s AAL is too low. HTTP 400 on form validation errors.  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 with a `Accept: application/json` HTTP header, 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_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `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. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
         * @summary Complete Settings Flow
         * @param {string} flow The Settings Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
         * @param {UpdateSettingsFlowBody} updateSettingsFlowBody 
         * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow.
         * @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}
         */
        updateSettingsFlow: async (flow: string, updateSettingsFlowBody: UpdateSettingsFlowBody, xSessionToken?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'flow' is not null or undefined
            assertParamExists('updateSettingsFlow', 'flow', flow)
            // verify required parameter 'updateSettingsFlowBody' is not null or undefined
            assertParamExists('updateSettingsFlow', 'updateSettingsFlowBody', updateSettingsFlowBody)
            const localVarPath = `/self-service/settings`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (flow !== undefined) {
                localVarQueryParameter['flow'] = flow;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            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};
            localVarRequestOptions.data = serializeDataIfNeeded(updateSettingsFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid.  More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Complete Verification Flow
         * @param {string} flow The Verification Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
         * @param {UpdateVerificationFlowBody} updateVerificationFlowBody 
         * @param {string} [token] Verification Token  The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
         * @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}
         */
        updateVerificationFlow: async (flow: string, updateVerificationFlowBody: UpdateVerificationFlowBody, token?: string, cookie?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'flow' is not null or undefined
            assertParamExists('updateVerificationFlow', 'flow', flow)
            // verify required parameter 'updateVerificationFlowBody' is not null or undefined
            assertParamExists('updateVerificationFlow', 'updateVerificationFlowBody', updateVerificationFlowBody)
            const localVarPath = `/self-service/verification`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (flow !== undefined) {
                localVarQueryParameter['flow'] = flow;
            }

            if (token !== undefined) {
                localVarQueryParameter['token'] = token;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            if (cookie != null) {
                localVarHeaderParameter['Cookie'] = String(cookie);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateVerificationFlowBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * FrontendApi - functional programming interface
 */
export const FrontendApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = FrontendApiAxiosParamCreator(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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
         * @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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?login_challenge&#x3D;abcde&#x60;).
         * @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\&#39;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 {string} [identitySchema] An optional identity schema to use for the login flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createBrowserLoginFlow(refresh?: boolean, aal?: string, returnTo?: string, cookie?: string, loginChallenge?: string, organization?: string, via?: string, identitySchema?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserLoginFlow(refresh, aal, returnTo, cookie, loginChallenge, organization, via, identitySchema, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserLoginFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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}
         */
        async createBrowserLogoutFlow(cookie?: string, returnTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserLogoutFlow(cookie, returnTo, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserLogoutFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL.  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 {string} [skipSettings] Skip redirection to the settings UI after the recovery flow was completed. Instead, the user will be redirected to the URL specified in &#x60;return_to&#x60; query parameter or the default return URL if &#x60;return_to&#x60; is not set.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createBrowserRecoveryFlow(returnTo?: string, skipSettings?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserRecoveryFlow(returnTo, skipSettings, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserRecoveryFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?login_challenge&#x3D;abcde&#x60;).  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 &#x60;selfservice.flows.verification.after.default_redirect_to&#x60; 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 {string} [identitySchema] An optional identity schema to use for the registration flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createBrowserRegistrationFlow(returnTo?: string, loginChallenge?: string, afterVerificationReturnTo?: string, organization?: string, identitySchema?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegistrationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserRegistrationFlow(returnTo, loginChallenge, afterVerificationReturnTo, organization, identitySchema, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserRegistrationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized.  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}
         */
        async createBrowserSettingsFlow(returnTo?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SettingsFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserSettingsFlow(returnTo, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserSettingsFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.  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.com/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}
         */
        async createBrowserVerificationFlow(returnTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerificationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBrowserVerificationFlow(returnTo, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createBrowserVerificationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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}
         */
        async createFedcmFlow(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateFedcmFlowResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createFedcmFlow(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createFedcmFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
         * @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\&#39;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 {string} [identitySchema] An optional identity schema to use for the login flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createNativeLoginFlow(refresh?: boolean, aal?: string, xSessionToken?: string, returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, via?: string, identitySchema?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createNativeLoginFlow(refresh, aal, xSessionToken, returnSessionTokenExchangeCode, returnTo, organization, via, identitySchema, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createNativeLoginFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error.  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}
         */
        async createNativeRecoveryFlow(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createNativeRecoveryFlow(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createNativeRecoveryFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set.  To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 {string} [identitySchema] An optional identity schema to use for the registration flow.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createNativeRegistrationFlow(returnSessionTokenExchangeCode?: boolean, returnTo?: string, organization?: string, identitySchema?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegistrationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createNativeRegistrationFlow(returnSessionTokenExchangeCode, returnTo, organization, identitySchema, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createNativeRegistrationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.  To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`.  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}
         */
        async createNativeSettingsFlow(xSessionToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SettingsFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createNativeSettingsFlow(xSessionToken, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createNativeSettingsFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.  To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`.  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.com/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}
         */
        async createNativeVerificationFlow(returnTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerificationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createNativeVerificationFlow(returnTo, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.createNativeVerificationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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 &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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}
         */
        async disableMyOtherSessions(xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteMySessionsCount>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.disableMyOtherSessions(xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.disableMyOtherSessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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\&#39;s ID.
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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}
         */
        async disableMySession(id: string, xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.disableMySession(id, xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.disableMySession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @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}
         */
        async exchangeSessionToken(initCode: string, returnToCode: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulNativeLogin>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.exchangeSessionToken(initCode, returnToCode, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.exchangeSessionToken']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint returns the error associated with a user-facing self service errors.  This endpoint supports stub values to help you implement the error UI:  `?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.com/docs/kratos/self-service/flows/user-facing-errors).
         * @summary Get User-Flow Errors
         * @param {string} id Error is the error\&#39;s ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getFlowError(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FlowError>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getFlowError(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getFlowError']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
         * @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}
         */
        async getLoginFlow(id: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getLoginFlow(id, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getLoginFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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 &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
         * @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}
         */
        async getRecoveryFlow(id: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRecoveryFlow(id, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getRecoveryFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
         * @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}
         */
        async getRegistrationFlow(id: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegistrationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRegistrationFlow(id, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getRegistrationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When accessing this endpoint through Ory Kratos\' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set.  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 &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
         * @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}
         */
        async getSettingsFlow(id: string, xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SettingsFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getSettingsFlow(id, xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getSettingsFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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.com/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 &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
         * @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}
         */
        async getVerificationFlow(id: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerificationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getVerificationFlow(id, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getVerificationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 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 <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ```  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Get WebAuthn JavaScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getWebAuthnJavaScript(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getWebAuthnJavaScript(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.getWebAuthnJavaScript']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
         * @summary Get My Active Sessions
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  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}
         */
        async listMySessions(perPage?: number, page?: number, pageSize?: number, pageToken?: string, xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Session>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listMySessions(perPage, page, pageSize, pageToken, xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.listMySessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before.  If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.  This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
         * @summary Perform Logout for Native Apps
         * @param {PerformNativeLogoutBody} performNativeLogoutBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async performNativeLogout(performNativeLogoutBody: PerformNativeLogoutBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.performNativeLogout(performNativeLogoutBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.performNativeLogout']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response.  If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:  ```js pseudo-code example router.get(\'/protected-endpoint\', async function (req, res) { const session = await client.toSession(undefined, req.header(\'cookie\'))  console.log(session) }) ```  When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\")  console.log(session) ```  When using a token template, the token is included in the `tokenized` field of the session.  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\", { tokenize_as: \"example-jwt-template\" })  console.log(session.tokenized) // The JWT ```  Depending on your configuration this endpoint might return a 403 status code 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.  This endpoint is useful for:  AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header!  This endpoint authenticates users by checking:  if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.  If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.  As explained above, this request may fail due to several reasons. The `error.id` can be one of:  `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
         * @summary Check Who the Current HTTP Session Belongs To
         * @param {string} [xSessionToken] Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
         * @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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
         * @param {string} [tokenizeAs] Returns the session additionally as a token (such as a JWT)  The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async toSession(xSessionToken?: string, cookie?: string, tokenizeAs?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.toSession(xSessionToken, cookie, tokenizeAs, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.toSession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to submit a token from a FedCM provider through `navigator.credentials.get` and log the user in. The parameters from `navigator.credentials.get` must have come from `GET self-service/fed-cm/parameters`.
         * @summary Submit a FedCM token
         * @param {UpdateFedcmFlowBody} updateFedcmFlowBody 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateFedcmFlow(updateFedcmFlowBody: UpdateFedcmFlowBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulNativeLogin>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateFedcmFlow(updateFedcmFlowBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateFedcmFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Submit a Login Flow
         * @param {string} flow The Login Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
         * @param {UpdateLoginFlowBody} updateLoginFlowBody 
         * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow.
         * @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}
         */
        async updateLoginFlow(flow: string, updateLoginFlowBody: UpdateLoginFlowBody, xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulNativeLogin>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateLoginFlow(flow, updateLoginFlowBody, xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateLoginFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint logs out an identity in a self-service manner.  If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.  If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead.  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.  More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.com/docs/next/kratos/self-service/flows/user-logout).
         * @summary Update Logout Flow
         * @param {string} [token] A Valid Logout Token  If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.
         * @param {string} [returnTo] The URL to return to after the logout 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}
         */
        async updateLogoutFlow(token?: string, returnTo?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateLogoutFlow(token, returnTo, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateLogoutFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to update a recovery flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid.  More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
         * @summary Update Recovery Flow
         * @param {string} flow The Recovery Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
         * @param {UpdateRecoveryFlowBody} updateRecoveryFlowBody 
         * @param {string} [token] Recovery Token  The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
         * @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}
         */
        async updateRecoveryFlow(flow: string, updateRecoveryFlowBody: UpdateRecoveryFlowBody, token?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateRecoveryFlow(flow, updateRecoveryFlowBody, token, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateRecoveryFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Update Registration Flow
         * @param {string} flow The Registration Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
         * @param {UpdateRegistrationFlowBody} updateRegistrationFlowBody 
         * @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}
         */
        async updateRegistrationFlow(flow: string, updateRegistrationFlowBody: UpdateRegistrationFlowBody, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulNativeRegistration>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateRegistrationFlow(flow, updateRegistrationFlowBody, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateRegistrationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low. Implies that the user needs to re-authenticate.  Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.  Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session\'s AAL is too low. HTTP 400 on form validation errors.  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 with a `Accept: application/json` HTTP header, 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_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `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. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
         * @summary Complete Settings Flow
         * @param {string} flow The Settings Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
         * @param {UpdateSettingsFlowBody} updateSettingsFlowBody 
         * @param {string} [xSessionToken] The Session Token of the Identity performing the settings flow.
         * @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}
         */
        async updateSettingsFlow(flow: string, updateSettingsFlowBody: UpdateSettingsFlowBody, xSessionToken?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SettingsFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateSettingsFlow(flow, updateSettingsFlowBody, xSessionToken, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateSettingsFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid.  More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Complete Verification Flow
         * @param {string} flow The Verification Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
         * @param {UpdateVerificationFlowBody} updateVerificationFlowBody 
         * @param {string} [token] Verification Token  The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
         * @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}
         */
        async updateVerificationFlow(flow: string, updateVerificationFlowBody: UpdateVerificationFlowBody, token?: string, cookie?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerificationFlow>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateVerificationFlow(flow, updateVerificationFlowBody, token, cookie, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['FrontendApi.updateVerificationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * FrontendApi - factory interface
 */
export const FrontendApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = FrontendApiFp(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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Create Login Flow for Browsers
         * @param {FrontendApiCreateBrowserLoginFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserLoginFlow(requestParameters: FrontendApiCreateBrowserLoginFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<LoginFlow> {
            return localVarFp.createBrowserLoginFlow(requestParameters.refresh, requestParameters.aal, requestParameters.returnTo, requestParameters.cookie, requestParameters.loginChallenge, requestParameters.organization, requestParameters.via, requestParameters.identitySchema, options).then((request) => request(axios, basePath));
        },
        /**
         * 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 {FrontendApiCreateBrowserLogoutFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserLogoutFlow(requestParameters: FrontendApiCreateBrowserLogoutFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<LogoutFlow> {
            return localVarFp.createBrowserLogoutFlow(requestParameters.cookie, requestParameters.returnTo, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL.  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 {FrontendApiCreateBrowserRecoveryFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserRecoveryFlow(requestParameters: FrontendApiCreateBrowserRecoveryFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<RecoveryFlow> {
            return localVarFp.createBrowserRecoveryFlow(requestParameters.returnTo, requestParameters.skipSettings, options).then((request) => request(axios, basePath));
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Create Registration Flow for Browsers
         * @param {FrontendApiCreateBrowserRegistrationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserRegistrationFlow(requestParameters: FrontendApiCreateBrowserRegistrationFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<RegistrationFlow> {
            return localVarFp.createBrowserRegistrationFlow(requestParameters.returnTo, requestParameters.loginChallenge, requestParameters.afterVerificationReturnTo, requestParameters.organization, requestParameters.identitySchema, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized.  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 {FrontendApiCreateBrowserSettingsFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserSettingsFlow(requestParameters: FrontendApiCreateBrowserSettingsFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<SettingsFlow> {
            return localVarFp.createBrowserSettingsFlow(requestParameters.returnTo, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.  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.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Create Verification Flow for Browser Clients
         * @param {FrontendApiCreateBrowserVerificationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBrowserVerificationFlow(requestParameters: FrontendApiCreateBrowserVerificationFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<VerificationFlow> {
            return localVarFp.createBrowserVerificationFlow(requestParameters.returnTo, options).then((request) => request(axios, basePath));
        },
        /**
         * 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(options?: RawAxiosRequestConfig): AxiosPromise<CreateFedcmFlowResponse> {
            return localVarFp.createFedcmFlow(options).then((request) => request(axios, basePath));
        },
        /**
         * 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=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Create Login Flow for Native Apps
         * @param {FrontendApiCreateNativeLoginFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeLoginFlow(requestParameters: FrontendApiCreateNativeLoginFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<LoginFlow> {
            return localVarFp.createNativeLoginFlow(requestParameters.refresh, requestParameters.aal, requestParameters.xSessionToken, requestParameters.returnSessionTokenExchangeCode, requestParameters.returnTo, requestParameters.organization, requestParameters.via, requestParameters.identitySchema, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error.  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(options?: RawAxiosRequestConfig): AxiosPromise<RecoveryFlow> {
            return localVarFp.createNativeRecoveryFlow(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set.  To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Create Registration Flow for Native Apps
         * @param {FrontendApiCreateNativeRegistrationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeRegistrationFlow(requestParameters: FrontendApiCreateNativeRegistrationFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<RegistrationFlow> {
            return localVarFp.createNativeRegistrationFlow(requestParameters.returnSessionTokenExchangeCode, requestParameters.returnTo, requestParameters.organization, requestParameters.identitySchema, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.  To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`.  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 {FrontendApiCreateNativeSettingsFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeSettingsFlow(requestParameters: FrontendApiCreateNativeSettingsFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<SettingsFlow> {
            return localVarFp.createNativeSettingsFlow(requestParameters.xSessionToken, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.  To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`.  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.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Create Verification Flow for Native Apps
         * @param {FrontendApiCreateNativeVerificationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createNativeVerificationFlow(requestParameters: FrontendApiCreateNativeVerificationFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<VerificationFlow> {
            return localVarFp.createNativeVerificationFlow(requestParameters.returnTo, options).then((request) => request(axios, basePath));
        },
        /**
         * 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 {FrontendApiDisableMyOtherSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableMyOtherSessions(requestParameters: FrontendApiDisableMyOtherSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<DeleteMySessionsCount> {
            return localVarFp.disableMyOtherSessions(requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 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 {FrontendApiDisableMySessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableMySession(requestParameters: FrontendApiDisableMySessionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.disableMySession(requestParameters.id, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Exchange Session Token
         * @param {FrontendApiExchangeSessionTokenRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exchangeSessionToken(requestParameters: FrontendApiExchangeSessionTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulNativeLogin> {
            return localVarFp.exchangeSessionToken(requestParameters.initCode, requestParameters.returnToCode, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint returns the error associated with a user-facing self service errors.  This endpoint supports stub values to help you implement the error UI:  `?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.com/docs/kratos/self-service/flows/user-facing-errors).
         * @summary Get User-Flow Errors
         * @param {FrontendApiGetFlowErrorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getFlowError(requestParameters: FrontendApiGetFlowErrorRequest, options?: RawAxiosRequestConfig): AxiosPromise<FlowError> {
            return localVarFp.getFlowError(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Get Login Flow
         * @param {FrontendApiGetLoginFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getLoginFlow(requestParameters: FrontendApiGetLoginFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<LoginFlow> {
            return localVarFp.getLoginFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 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 {FrontendApiGetRecoveryFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRecoveryFlow(requestParameters: FrontendApiGetRecoveryFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<RecoveryFlow> {
            return localVarFp.getRecoveryFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Get Registration Flow
         * @param {FrontendApiGetRegistrationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRegistrationFlow(requestParameters: FrontendApiGetRegistrationFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegistrationFlow> {
            return localVarFp.getRegistrationFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * When accessing this endpoint through Ory Kratos\' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set.  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 {FrontendApiGetSettingsFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSettingsFlow(requestParameters: FrontendApiGetSettingsFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<SettingsFlow> {
            return localVarFp.getSettingsFlow(requestParameters.id, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 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.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Get Verification Flow
         * @param {FrontendApiGetVerificationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getVerificationFlow(requestParameters: FrontendApiGetVerificationFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<VerificationFlow> {
            return localVarFp.getVerificationFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * 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 <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ```  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Get WebAuthn JavaScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getWebAuthnJavaScript(options?: RawAxiosRequestConfig): AxiosPromise<string> {
            return localVarFp.getWebAuthnJavaScript(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
         * @summary Get My Active Sessions
         * @param {FrontendApiListMySessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listMySessions(requestParameters: FrontendApiListMySessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<Session>> {
            return localVarFp.listMySessions(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before.  If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.  This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
         * @summary Perform Logout for Native Apps
         * @param {FrontendApiPerformNativeLogoutRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        performNativeLogout(requestParameters: FrontendApiPerformNativeLogoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.performNativeLogout(requestParameters.performNativeLogoutBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response.  If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:  ```js pseudo-code example router.get(\'/protected-endpoint\', async function (req, res) { const session = await client.toSession(undefined, req.header(\'cookie\'))  console.log(session) }) ```  When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\")  console.log(session) ```  When using a token template, the token is included in the `tokenized` field of the session.  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\", { tokenize_as: \"example-jwt-template\" })  console.log(session.tokenized) // The JWT ```  Depending on your configuration this endpoint might return a 403 status code 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.  This endpoint is useful for:  AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header!  This endpoint authenticates users by checking:  if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.  If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.  As explained above, this request may fail due to several reasons. The `error.id` can be one of:  `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
         * @summary Check Who the Current HTTP Session Belongs To
         * @param {FrontendApiToSessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toSession(requestParameters: FrontendApiToSessionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Session> {
            return localVarFp.toSession(requestParameters.xSessionToken, requestParameters.cookie, requestParameters.tokenizeAs, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to submit a token from a FedCM provider through `navigator.credentials.get` and log the user in. The parameters from `navigator.credentials.get` must have come from `GET self-service/fed-cm/parameters`.
         * @summary Submit a FedCM token
         * @param {FrontendApiUpdateFedcmFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFedcmFlow(requestParameters: FrontendApiUpdateFedcmFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulNativeLogin> {
            return localVarFp.updateFedcmFlow(requestParameters.updateFedcmFlowBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Submit a Login Flow
         * @param {FrontendApiUpdateLoginFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateLoginFlow(requestParameters: FrontendApiUpdateLoginFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulNativeLogin> {
            return localVarFp.updateLoginFlow(requestParameters.flow, requestParameters.updateLoginFlowBody, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint logs out an identity in a self-service manner.  If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.  If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead.  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.  More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.com/docs/next/kratos/self-service/flows/user-logout).
         * @summary Update Logout Flow
         * @param {FrontendApiUpdateLogoutFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateLogoutFlow(requestParameters: FrontendApiUpdateLogoutFlowRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.updateLogoutFlow(requestParameters.token, requestParameters.returnTo, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to update a recovery flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid.  More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
         * @summary Update Recovery Flow
         * @param {FrontendApiUpdateRecoveryFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRecoveryFlow(requestParameters: FrontendApiUpdateRecoveryFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<RecoveryFlow> {
            return localVarFp.updateRecoveryFlow(requestParameters.flow, requestParameters.updateRecoveryFlowBody, requestParameters.token, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
         * @summary Update Registration Flow
         * @param {FrontendApiUpdateRegistrationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRegistrationFlow(requestParameters: FrontendApiUpdateRegistrationFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulNativeRegistration> {
            return localVarFp.updateRegistrationFlow(requestParameters.flow, requestParameters.updateRegistrationFlowBody, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low. Implies that the user needs to re-authenticate.  Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.  Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session\'s AAL is too low. HTTP 400 on form validation errors.  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 with a `Accept: application/json` HTTP header, 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_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `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. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
         * @summary Complete Settings Flow
         * @param {FrontendApiUpdateSettingsFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSettingsFlow(requestParameters: FrontendApiUpdateSettingsFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<SettingsFlow> {
            return localVarFp.updateSettingsFlow(requestParameters.flow, requestParameters.updateSettingsFlowBody, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid.  More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).
         * @summary Complete Verification Flow
         * @param {FrontendApiUpdateVerificationFlowRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateVerificationFlow(requestParameters: FrontendApiUpdateVerificationFlowRequest, options?: RawAxiosRequestConfig): AxiosPromise<VerificationFlow> {
            return localVarFp.updateVerificationFlow(requestParameters.flow, requestParameters.updateVerificationFlowBody, requestParameters.token, requestParameters.cookie, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createBrowserLoginFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserLoginFlowRequest {
    /**
     * 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.
     */
    readonly refresh?: boolean

    /**
     * Request a Specific AuthenticationMethod Assurance Level  Use this parameter to upgrade an existing session\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
     */
    readonly aal?: string

    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * 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.
     */
    readonly cookie?: string

    /**
     * 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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?login_challenge&#x3D;abcde&#x60;).
     */
    readonly loginChallenge?: string

    /**
     * An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network.
     */
    readonly organization?: string

    /**
     * Via should contain the identity\&#39;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.
     */
    readonly via?: string

    /**
     * An optional identity schema to use for the login flow.
     */
    readonly identitySchema?: string
}

/**
 * Request parameters for createBrowserLogoutFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserLogoutFlowRequest {
    /**
     * HTTP Cookies  If you call this endpoint from a backend, please include the original Cookie header in the request.
     */
    readonly cookie?: string

    /**
     * Return to URL  The URL to which the browser should be redirected to after the logout has been performed.
     */
    readonly returnTo?: string
}

/**
 * Request parameters for createBrowserRecoveryFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserRecoveryFlowRequest {
    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * Skip redirection to the settings UI after the recovery flow was completed. Instead, the user will be redirected to the URL specified in &#x60;return_to&#x60; query parameter or the default return URL if &#x60;return_to&#x60; is not set.
     */
    readonly skipSettings?: string
}

/**
 * Request parameters for createBrowserRegistrationFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserRegistrationFlowRequest {
    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * 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 &#x60;login_challenge&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?login_challenge&#x3D;abcde&#x60;).  This feature is compatible with Ory Hydra when not running on the Ory Network.
     */
    readonly loginChallenge?: string

    /**
     * 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 &#x60;selfservice.flows.verification.after.default_redirect_to&#x60; value.
     */
    readonly afterVerificationReturnTo?: string

    /**
     * An optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network.
     */
    readonly organization?: string

    /**
     * An optional identity schema to use for the registration flow.
     */
    readonly identitySchema?: string
}

/**
 * Request parameters for createBrowserSettingsFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserSettingsFlowRequest {
    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for createBrowserVerificationFlow operation in FrontendApi.
 */
export interface FrontendApiCreateBrowserVerificationFlowRequest {
    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string
}

/**
 * Request parameters for createNativeLoginFlow operation in FrontendApi.
 */
export interface FrontendApiCreateNativeLoginFlowRequest {
    /**
     * 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.
     */
    readonly refresh?: boolean

    /**
     * Request a Specific AuthenticationMethod Assurance Level  Use this parameter to upgrade an existing session\&#39;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 \&quot;upgrade\&quot; the session\&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
     */
    readonly aal?: string

    /**
     * The Session Token of the Identity performing the settings flow.
     */
    readonly xSessionToken?: string

    /**
     * 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.
     */
    readonly returnSessionTokenExchangeCode?: boolean

    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network.
     */
    readonly organization?: string

    /**
     * Via should contain the identity\&#39;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.
     */
    readonly via?: string

    /**
     * An optional identity schema to use for the login flow.
     */
    readonly identitySchema?: string
}

/**
 * Request parameters for createNativeRegistrationFlow operation in FrontendApi.
 */
export interface FrontendApiCreateNativeRegistrationFlowRequest {
    /**
     * 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.
     */
    readonly returnSessionTokenExchangeCode?: boolean

    /**
     * The URL to return the browser to after the flow was completed.
     */
    readonly returnTo?: string

    /**
     * An optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network.
     */
    readonly organization?: string

    /**
     * An optional identity schema to use for the registration flow.
     */
    readonly identitySchema?: string
}

/**
 * Request parameters for createNativeSettingsFlow operation in FrontendApi.
 */
export interface FrontendApiCreateNativeSettingsFlowRequest {
    /**
     * The Session Token of the Identity performing the settings flow.
     */
    readonly xSessionToken?: string
}

/**
 * Request parameters for createNativeVerificationFlow operation in FrontendApi.
 */
export interface FrontendApiCreateNativeVerificationFlowRequest {
    /**
     * 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.
     */
    readonly returnTo?: string
}

/**
 * Request parameters for disableMyOtherSessions operation in FrontendApi.
 */
export interface FrontendApiDisableMyOtherSessionsRequest {
    /**
     * Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
     */
    readonly xSessionToken?: string

    /**
     * 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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
     */
    readonly cookie?: string
}

/**
 * Request parameters for disableMySession operation in FrontendApi.
 */
export interface FrontendApiDisableMySessionRequest {
    /**
     * ID is the session\&#39;s ID.
     */
    readonly id: string

    /**
     * Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
     */
    readonly xSessionToken?: string

    /**
     * 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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
     */
    readonly cookie?: string
}

/**
 * Request parameters for exchangeSessionToken operation in FrontendApi.
 */
export interface FrontendApiExchangeSessionTokenRequest {
    /**
     * The part of the code return when initializing the flow.
     */
    readonly initCode: string

    /**
     * The part of the code returned by the return_to URL.
     */
    readonly returnToCode: string
}

/**
 * Request parameters for getFlowError operation in FrontendApi.
 */
export interface FrontendApiGetFlowErrorRequest {
    /**
     * Error is the error\&#39;s ID
     */
    readonly id: string
}

/**
 * Request parameters for getLoginFlow operation in FrontendApi.
 */
export interface FrontendApiGetLoginFlowRequest {
    /**
     * The Login Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
     */
    readonly id: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for getRecoveryFlow operation in FrontendApi.
 */
export interface FrontendApiGetRecoveryFlowRequest {
    /**
     * The Flow ID  The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
     */
    readonly id: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for getRegistrationFlow operation in FrontendApi.
 */
export interface FrontendApiGetRegistrationFlowRequest {
    /**
     * The Registration Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
     */
    readonly id: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for getSettingsFlow operation in FrontendApi.
 */
export interface FrontendApiGetSettingsFlowRequest {
    /**
     * ID is the Settings Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
     */
    readonly id: string

    /**
     * The Session Token  When using the SDK in an app without a browser, please include the session token here.
     */
    readonly xSessionToken?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for getVerificationFlow operation in FrontendApi.
 */
export interface FrontendApiGetVerificationFlowRequest {
    /**
     * The Flow ID  The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
     */
    readonly id: string

    /**
     * HTTP Cookies  When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
     */
    readonly cookie?: string
}

/**
 * Request parameters for listMySessions operation in FrontendApi.
 */
export interface FrontendApiListMySessionsRequest {
    /**
     * Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
     */
    readonly perPage?: number

    /**
     * Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
     */
    readonly page?: number

    /**
     * Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
     */
    readonly xSessionToken?: string

    /**
     * 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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
     */
    readonly cookie?: string
}

/**
 * Request parameters for performNativeLogout operation in FrontendApi.
 */
export interface FrontendApiPerformNativeLogoutRequest {
    readonly performNativeLogoutBody: PerformNativeLogoutBody
}

/**
 * Request parameters for toSession operation in FrontendApi.
 */
export interface FrontendApiToSessionRequest {
    /**
     * Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
     */
    readonly xSessionToken?: string

    /**
     * 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: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;.  It is ok if more than one cookie are included here as all other cookies will be ignored.
     */
    readonly cookie?: string

    /**
     * Returns the session additionally as a token (such as a JWT)  The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors).
     */
    readonly tokenizeAs?: string
}

/**
 * Request parameters for updateFedcmFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateFedcmFlowRequest {
    readonly updateFedcmFlowBody: UpdateFedcmFlowBody
}

/**
 * Request parameters for updateLoginFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateLoginFlowRequest {
    /**
     * The Login Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
     */
    readonly flow: string

    readonly updateLoginFlowBody: UpdateLoginFlowBody

    /**
     * The Session Token of the Identity performing the settings flow.
     */
    readonly xSessionToken?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for updateLogoutFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateLogoutFlowRequest {
    /**
     * A Valid Logout Token  If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.
     */
    readonly token?: string

    /**
     * The URL to return to after the logout was completed.
     */
    readonly returnTo?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for updateRecoveryFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateRecoveryFlowRequest {
    /**
     * The Recovery Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
     */
    readonly flow: string

    readonly updateRecoveryFlowBody: UpdateRecoveryFlowBody

    /**
     * Recovery Token  The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
     */
    readonly token?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for updateRegistrationFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateRegistrationFlowRequest {
    /**
     * The Registration Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
     */
    readonly flow: string

    readonly updateRegistrationFlowBody: UpdateRegistrationFlowBody

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for updateSettingsFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateSettingsFlowRequest {
    /**
     * The Settings Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
     */
    readonly flow: string

    readonly updateSettingsFlowBody: UpdateSettingsFlowBody

    /**
     * The Session Token of the Identity performing the settings flow.
     */
    readonly xSessionToken?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * Request parameters for updateVerificationFlow operation in FrontendApi.
 */
export interface FrontendApiUpdateVerificationFlowRequest {
    /**
     * The Verification Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
     */
    readonly flow: string

    readonly updateVerificationFlowBody: UpdateVerificationFlowBody

    /**
     * Verification Token  The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user.  This parameter is usually set in a link and not used by any direct API call.
     */
    readonly token?: string

    /**
     * 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.
     */
    readonly cookie?: string
}

/**
 * FrontendApi - object-oriented interface
 */
export class FrontendApi extends BaseAPI {
    /**
     * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Create Login Flow for Browsers
     * @param {FrontendApiCreateBrowserLoginFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserLoginFlow(requestParameters: FrontendApiCreateBrowserLoginFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserLoginFlow(requestParameters.refresh, requestParameters.aal, requestParameters.returnTo, requestParameters.cookie, requestParameters.loginChallenge, requestParameters.organization, requestParameters.via, requestParameters.identitySchema, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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 {FrontendApiCreateBrowserLogoutFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserLogoutFlow(requestParameters: FrontendApiCreateBrowserLogoutFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserLogoutFlow(requestParameters.cookie, requestParameters.returnTo, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL.  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 {FrontendApiCreateBrowserRecoveryFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserRecoveryFlow(requestParameters: FrontendApiCreateBrowserRecoveryFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserRecoveryFlow(requestParameters.returnTo, requestParameters.skipSettings, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Create Registration Flow for Browsers
     * @param {FrontendApiCreateBrowserRegistrationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserRegistrationFlow(requestParameters: FrontendApiCreateBrowserRegistrationFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserRegistrationFlow(requestParameters.returnTo, requestParameters.loginChallenge, requestParameters.afterVerificationReturnTo, requestParameters.organization, requestParameters.identitySchema, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized.  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 {FrontendApiCreateBrowserSettingsFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserSettingsFlow(requestParameters: FrontendApiCreateBrowserSettingsFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserSettingsFlow(requestParameters.returnTo, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.  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.com/docs/kratos/self-service/flows/verify-email-account-activation).
     * @summary Create Verification Flow for Browser Clients
     * @param {FrontendApiCreateBrowserVerificationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createBrowserVerificationFlow(requestParameters: FrontendApiCreateBrowserVerificationFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createBrowserVerificationFlow(requestParameters.returnTo, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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}
     */
    public createFedcmFlow(options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createFedcmFlow(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Create Login Flow for Native Apps
     * @param {FrontendApiCreateNativeLoginFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createNativeLoginFlow(requestParameters: FrontendApiCreateNativeLoginFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createNativeLoginFlow(requestParameters.refresh, requestParameters.aal, requestParameters.xSessionToken, requestParameters.returnSessionTokenExchangeCode, requestParameters.returnTo, requestParameters.organization, requestParameters.via, requestParameters.identitySchema, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error.  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}
     */
    public createNativeRecoveryFlow(options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createNativeRecoveryFlow(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.  If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set.  To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`.  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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Create Registration Flow for Native Apps
     * @param {FrontendApiCreateNativeRegistrationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createNativeRegistrationFlow(requestParameters: FrontendApiCreateNativeRegistrationFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createNativeRegistrationFlow(requestParameters.returnSessionTokenExchangeCode, requestParameters.returnTo, requestParameters.organization, requestParameters.identitySchema, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.  To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`.  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 {FrontendApiCreateNativeSettingsFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createNativeSettingsFlow(requestParameters: FrontendApiCreateNativeSettingsFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createNativeSettingsFlow(requestParameters.xSessionToken, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.  To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`.  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.com/docs/kratos/self-service/flows/verify-email-account-activation).
     * @summary Create Verification Flow for Native Apps
     * @param {FrontendApiCreateNativeVerificationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createNativeVerificationFlow(requestParameters: FrontendApiCreateNativeVerificationFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).createNativeVerificationFlow(requestParameters.returnTo, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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 {FrontendApiDisableMyOtherSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public disableMyOtherSessions(requestParameters: FrontendApiDisableMyOtherSessionsRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).disableMyOtherSessions(requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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 {FrontendApiDisableMySessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public disableMySession(requestParameters: FrontendApiDisableMySessionRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).disableMySession(requestParameters.id, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Exchange Session Token
     * @param {FrontendApiExchangeSessionTokenRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public exchangeSessionToken(requestParameters: FrontendApiExchangeSessionTokenRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).exchangeSessionToken(requestParameters.initCode, requestParameters.returnToCode, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint returns the error associated with a user-facing self service errors.  This endpoint supports stub values to help you implement the error UI:  `?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.com/docs/kratos/self-service/flows/user-facing-errors).
     * @summary Get User-Flow Errors
     * @param {FrontendApiGetFlowErrorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getFlowError(requestParameters: FrontendApiGetFlowErrorRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getFlowError(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Get Login Flow
     * @param {FrontendApiGetLoginFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getLoginFlow(requestParameters: FrontendApiGetLoginFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getLoginFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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 {FrontendApiGetRecoveryFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getRecoveryFlow(requestParameters: FrontendApiGetRecoveryFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getRecoveryFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Get Registration Flow
     * @param {FrontendApiGetRegistrationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getRegistrationFlow(requestParameters: FrontendApiGetRegistrationFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getRegistrationFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When accessing this endpoint through Ory Kratos\' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set.  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 {FrontendApiGetSettingsFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getSettingsFlow(requestParameters: FrontendApiGetSettingsFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getSettingsFlow(requestParameters.id, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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.com/docs/kratos/self-service/flows/verify-email-account-activation).
     * @summary Get Verification Flow
     * @param {FrontendApiGetVerificationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getVerificationFlow(requestParameters: FrontendApiGetVerificationFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getVerificationFlow(requestParameters.id, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 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 <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ```  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Get WebAuthn JavaScript
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getWebAuthnJavaScript(options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).getWebAuthnJavaScript(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
     * @summary Get My Active Sessions
     * @param {FrontendApiListMySessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listMySessions(requestParameters: FrontendApiListMySessionsRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).listMySessions(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before.  If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.  This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
     * @summary Perform Logout for Native Apps
     * @param {FrontendApiPerformNativeLogoutRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public performNativeLogout(requestParameters: FrontendApiPerformNativeLogoutRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).performNativeLogout(requestParameters.performNativeLogoutBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. When the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response.  If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:  ```js pseudo-code example router.get(\'/protected-endpoint\', async function (req, res) { const session = await client.toSession(undefined, req.header(\'cookie\'))  console.log(session) }) ```  When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\")  console.log(session) ```  When using a token template, the token is included in the `tokenized` field of the session.  ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\", { tokenize_as: \"example-jwt-template\" })  console.log(session.tokenized) // The JWT ```  Depending on your configuration this endpoint might return a 403 status code 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.  This endpoint is useful for:  AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header!  This endpoint authenticates users by checking:  if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.  If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.  As explained above, this request may fail due to several reasons. The `error.id` can be one of:  `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
     * @summary Check Who the Current HTTP Session Belongs To
     * @param {FrontendApiToSessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public toSession(requestParameters: FrontendApiToSessionRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).toSession(requestParameters.xSessionToken, requestParameters.cookie, requestParameters.tokenizeAs, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to submit a token from a FedCM provider through `navigator.credentials.get` and log the user in. The parameters from `navigator.credentials.get` must have come from `GET self-service/fed-cm/parameters`.
     * @summary Submit a FedCM token
     * @param {FrontendApiUpdateFedcmFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateFedcmFlow(requestParameters: FrontendApiUpdateFedcmFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateFedcmFlow(requestParameters.updateFedcmFlowBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Submit a Login Flow
     * @param {FrontendApiUpdateLoginFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateLoginFlow(requestParameters: FrontendApiUpdateLoginFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateLoginFlow(requestParameters.flow, requestParameters.updateLoginFlowBody, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint logs out an identity in a self-service manner.  If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.  If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead.  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.  More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.com/docs/next/kratos/self-service/flows/user-logout).
     * @summary Update Logout Flow
     * @param {FrontendApiUpdateLogoutFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateLogoutFlow(requestParameters: FrontendApiUpdateLogoutFlowRequest = {}, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateLogoutFlow(requestParameters.token, requestParameters.returnTo, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to update a recovery flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid.  More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
     * @summary Update Recovery Flow
     * @param {FrontendApiUpdateRecoveryFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateRecoveryFlow(requestParameters: FrontendApiUpdateRecoveryFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateRecoveryFlow(requestParameters.flow, requestParameters.updateRecoveryFlowBody, requestParameters.token, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint behaves differently for API and browser flows.  API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors.  Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.  Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.  If this endpoint is called with `Accept: application/json` in the header, 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! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).
     * @summary Update Registration Flow
     * @param {FrontendApiUpdateRegistrationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateRegistrationFlow(requestParameters: FrontendApiUpdateRegistrationFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateRegistrationFlow(requestParameters.flow, requestParameters.updateRegistrationFlowBody, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low. Implies that the user needs to re-authenticate.  Browser flows without HTTP Header `Accept` or with `Accept: text/_*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.  Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session\'s AAL is too low. HTTP 400 on form validation errors.  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 with a `Accept: application/json` HTTP header, 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_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `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. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.  More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
     * @summary Complete Settings Flow
     * @param {FrontendApiUpdateSettingsFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateSettingsFlow(requestParameters: FrontendApiUpdateSettingsFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateSettingsFlow(requestParameters.flow, requestParameters.updateSettingsFlowBody, requestParameters.xSessionToken, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states:  `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/_*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid.  More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).
     * @summary Complete Verification Flow
     * @param {FrontendApiUpdateVerificationFlowRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateVerificationFlow(requestParameters: FrontendApiUpdateVerificationFlowRequest, options?: RawAxiosRequestConfig) {
        return FrontendApiFp(this.configuration).updateVerificationFlow(requestParameters.flow, requestParameters.updateVerificationFlowBody, requestParameters.token, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * IdentityApi - axios parameter creator
 */
export const IdentityApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Creates multiple [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model).  You can also use this endpoint to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods.  If the patch includes hashed passwords you can import up to 1,000 identities per request.  If the patch includes at least one plaintext password you can import up to 200 identities per request.  Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored.  If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected.  If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt  If the issue persists, contact support.
         * @summary Create multiple identities
         * @param {PatchIdentitiesBody} [patchIdentitiesBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchPatchIdentities: async (patchIdentitiesBody?: PatchIdentitiesBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/identities`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(patchIdentitiesBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model).  This endpoint can also be used to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
         * @summary Create an Identity
         * @param {CreateIdentityBody} [createIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createIdentity: async (createIdentityBody?: CreateIdentityBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/identities`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createIdentityBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Code
         * @param {CreateRecoveryCodeForIdentityBody} [createRecoveryCodeForIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRecoveryCodeForIdentity: async (createRecoveryCodeForIdentityBody?: CreateRecoveryCodeForIdentityBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/recovery/code`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createRecoveryCodeForIdentityBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Link
         * @param {string} [returnTo] 
         * @param {CreateRecoveryLinkForIdentityBody} [createRecoveryLinkForIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRecoveryLinkForIdentity: async (returnTo?: string, createRecoveryLinkForIdentityBody?: CreateRecoveryLinkForIdentityBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/recovery/link`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (returnTo !== undefined) {
                localVarQueryParameter['return_to'] = returnTo;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createRecoveryLinkForIdentityBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
         * @summary Delete an Identity
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentity: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteIdentity', 'id', id)
            const localVarPath = `/admin/identities/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
         * @summary Delete a credential for a specific identity
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {DeleteIdentityCredentialsTypeEnum} type Type is the type of credentials to delete. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn 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
         * @param {string} [identifier] Identifier is the identifier of the OIDC/SAML credential to delete. Find the identifier by calling the &#x60;GET /admin/identities/{id}?include_credential&#x3D;{oidc,saml}&#x60; endpoint.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentityCredentials: async (id: string, type: DeleteIdentityCredentialsTypeEnum, identifier?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteIdentityCredentials', 'id', id)
            // verify required parameter 'type' is not null or undefined
            assertParamExists('deleteIdentityCredentials', 'type', type)
            const localVarPath = `/admin/identities/{id}/credentials/{type}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)))
                .replace(`{${"type"}}`, encodeURIComponent(String(type)));
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (identifier !== undefined) {
                localVarQueryParameter['identifier'] = identifier;
            }


    
            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 irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
         * @summary Delete & Invalidate an Identity\'s Sessions
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentitySessions: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteIdentitySessions', 'id', id)
            const localVarPath = `/admin/identities/{id}/sessions`
                .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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            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 deactivates the specified session. Session data is not deleted.
         * @summary Deactivate a Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableSession: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('disableSession', 'id', id)
            const localVarPath = `/admin/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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            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 extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.  This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon.  This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist.  Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
         * @summary Extend a Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        extendSession: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('extendSession', 'id', id)
            const localVarPath = `/admin/sessions/{id}/extend`
                .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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity
         * @param {string} id ID must be set to the ID of identity you want to get
         * @param {Array<GetIdentityIncludeCredentialEnum>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentity: async (id: string, includeCredential?: Array<GetIdentityIncludeCredentialEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getIdentity', 'id', id)
            const localVarPath = `/admin/identities/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (includeCredential) {
                localVarQueryParameter['include_credential'] = includeCredential;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity by its External ID
         * @param {string} externalID ExternalID must be set to the ID of identity you want to get
         * @param {Array<GetIdentityByExternalIDIncludeCredentialEnum>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentityByExternalID: async (externalID: string, includeCredential?: Array<GetIdentityByExternalIDIncludeCredentialEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'externalID' is not null or undefined
            assertParamExists('getIdentityByExternalID', 'externalID', externalID)
            const localVarPath = `/admin/identities/by/external/{externalID}`
                .replace(`{${"externalID"}}`, encodeURIComponent(String(externalID)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (includeCredential) {
                localVarQueryParameter['include_credential'] = includeCredential;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Return a specific identity schema.
         * @summary Get Identity JSON Schema
         * @param {string} id ID must be set to the ID of schema you want to get
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentitySchema: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getIdentitySchema', 'id', id)
            const localVarPath = `/schemas/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint is useful for:  Getting a session object with all specified expandables that exist in an administrative context.
         * @summary Get Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {Array<GetSessionExpandEnum>} [expand] ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand&#x3D;Identity&amp;expand&#x3D;Devices If no value is provided, the expandable properties are skipped.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSession: async (id: string, expand?: Array<GetSessionExpandEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getSession', 'id', id)
            const localVarPath = `/admin/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: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (expand) {
                localVarQueryParameter['expand'] = expand;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Lists all [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
         * @summary List Identities
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {ListIdentitiesConsistencyEnum} [consistency] 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 &#x60;ory patch project --replace \&#39;/previews/default_read_consistency_level&#x3D;\&quot;strong\&quot;\&#39;&#x60;.  Setting the default consistency level to &#x60;eventual&#x60; may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting:  &#x60;GET /admin/identities&#x60;  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.
         * @param {Array<string>} [ids] Retrieve multiple identities by their IDs.  This parameter has the following limitations:  Duplicate or non-existent IDs are ignored. The order of returned IDs may be different from the request. This filter does not support pagination. You must implement your own pagination as the maximum number of items returned by this endpoint may not exceed a certain threshold (currently 500).
         * @param {string} [credentialsIdentifier] CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
         * @param {string} [previewCredentialsIdentifierSimilar] This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH.  CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
         * @param {Array<string>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {string} [organizationId] List identities that belong to a specific organization.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentities: async (perPage?: number, page?: number, pageSize?: number, pageToken?: string, consistency?: ListIdentitiesConsistencyEnum, ids?: Array<string>, credentialsIdentifier?: string, previewCredentialsIdentifierSimilar?: string, includeCredential?: Array<string>, organizationId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/identities`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (perPage !== undefined) {
                localVarQueryParameter['per_page'] = perPage;
            }

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (consistency !== undefined) {
                localVarQueryParameter['consistency'] = consistency;
            }

            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }

            if (credentialsIdentifier !== undefined) {
                localVarQueryParameter['credentials_identifier'] = credentialsIdentifier;
            }

            if (previewCredentialsIdentifierSimilar !== undefined) {
                localVarQueryParameter['preview_credentials_identifier_similar'] = previewCredentialsIdentifierSimilar;
            }

            if (includeCredential) {
                localVarQueryParameter['include_credential'] = includeCredential;
            }

            if (organizationId !== undefined) {
                localVarQueryParameter['organization_id'] = organizationId;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns a list of all identity schemas currently in use.
         * @summary Get all Identity Schemas
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentitySchemas: async (perPage?: number, page?: number, pageSize?: number, pageToken?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/schemas`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (perPage !== undefined) {
                localVarQueryParameter['per_page'] = perPage;
            }

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }


    
            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 all sessions that belong to the given Identity.
         * @summary List an Identity\'s Sessions
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {boolean} [active] Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentitySessions: async (id: string, perPage?: number, page?: number, pageSize?: number, pageToken?: string, active?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('listIdentitySessions', 'id', id)
            const localVarPath = `/admin/identities/{id}/sessions`
                .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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (perPage !== undefined) {
                localVarQueryParameter['per_page'] = perPage;
            }

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (active !== undefined) {
                localVarQueryParameter['active'] = active;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Listing all sessions that exist.
         * @summary List All Sessions
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {boolean} [active] Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
         * @param {Array<ListSessionsExpandEnum>} [expand] ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listSessions: async (pageSize?: number, pageToken?: string, active?: boolean, expand?: Array<ListSessionsExpandEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/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: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (active !== undefined) {
                localVarQueryParameter['active'] = active;
            }

            if (expand) {
                localVarQueryParameter['expand'] = expand;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Partially updates an [identity\'s](https://www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](https://jsonpatch.com/). The fields `id`, `stateChangedAt` and `credentials` can not be updated using this method.
         * @summary Patch an Identity
         * @param {string} id ID must be set to the ID of identity you want to update
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchIdentity: async (id: string, jsonPatch?: Array<JsonPatch>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('patchIdentity', 'id', id)
            const localVarPath = `/admin/identities/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonPatch, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint updates an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected.  It is possible to update the identity\'s credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here:  `password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it\'s added to the identity\'s identifiers list while preserving previous user handles. `code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`{\"ory.sh/kratos\":{\"code\":{\"identifier\":true\", \"via\":\"email\"}}}`).
         * @summary Update an Identity
         * @param {string} id ID must be set to the ID of identity you want to update
         * @param {UpdateIdentityBody} [updateIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateIdentity: async (id: string, updateIdentityBody?: UpdateIdentityBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('updateIdentity', 'id', id)
            const localVarPath = `/admin/identities/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateIdentityBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * IdentityApi - functional programming interface
 */
export const IdentityApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = IdentityApiAxiosParamCreator(configuration)
    return {
        /**
         * Creates multiple [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model).  You can also use this endpoint to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods.  If the patch includes hashed passwords you can import up to 1,000 identities per request.  If the patch includes at least one plaintext password you can import up to 200 identities per request.  Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored.  If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected.  If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt  If the issue persists, contact support.
         * @summary Create multiple identities
         * @param {PatchIdentitiesBody} [patchIdentitiesBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async batchPatchIdentities(patchIdentitiesBody?: PatchIdentitiesBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchPatchIdentitiesResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.batchPatchIdentities(patchIdentitiesBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.batchPatchIdentities']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model).  This endpoint can also be used to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
         * @summary Create an Identity
         * @param {CreateIdentityBody} [createIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createIdentity(createIdentityBody?: CreateIdentityBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Identity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createIdentity(createIdentityBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.createIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Code
         * @param {CreateRecoveryCodeForIdentityBody} [createRecoveryCodeForIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createRecoveryCodeForIdentity(createRecoveryCodeForIdentityBody?: CreateRecoveryCodeForIdentityBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryCodeForIdentity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createRecoveryCodeForIdentity(createRecoveryCodeForIdentityBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.createRecoveryCodeForIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Link
         * @param {string} [returnTo] 
         * @param {CreateRecoveryLinkForIdentityBody} [createRecoveryLinkForIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createRecoveryLinkForIdentity(returnTo?: string, createRecoveryLinkForIdentityBody?: CreateRecoveryLinkForIdentityBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecoveryLinkForIdentity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createRecoveryLinkForIdentity(returnTo, createRecoveryLinkForIdentityBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.createRecoveryLinkForIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
         * @summary Delete an Identity
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteIdentity(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteIdentity(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.deleteIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
         * @summary Delete a credential for a specific identity
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {DeleteIdentityCredentialsTypeEnum} type Type is the type of credentials to delete. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn 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
         * @param {string} [identifier] Identifier is the identifier of the OIDC/SAML credential to delete. Find the identifier by calling the &#x60;GET /admin/identities/{id}?include_credential&#x3D;{oidc,saml}&#x60; endpoint.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteIdentityCredentials(id: string, type: DeleteIdentityCredentialsTypeEnum, identifier?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteIdentityCredentials(id, type, identifier, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.deleteIdentityCredentials']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
         * @summary Delete & Invalidate an Identity\'s Sessions
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteIdentitySessions(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteIdentitySessions(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.deleteIdentitySessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Calling this endpoint deactivates the specified session. Session data is not deleted.
         * @summary Deactivate a Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async disableSession(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.disableSession(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.disableSession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.  This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon.  This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist.  Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
         * @summary Extend a Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async extendSession(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.extendSession(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.extendSession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity
         * @param {string} id ID must be set to the ID of identity you want to get
         * @param {Array<GetIdentityIncludeCredentialEnum>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getIdentity(id: string, includeCredential?: Array<GetIdentityIncludeCredentialEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Identity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentity(id, includeCredential, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.getIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity by its External ID
         * @param {string} externalID ExternalID must be set to the ID of identity you want to get
         * @param {Array<GetIdentityByExternalIDIncludeCredentialEnum>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getIdentityByExternalID(externalID: string, includeCredential?: Array<GetIdentityByExternalIDIncludeCredentialEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Identity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentityByExternalID(externalID, includeCredential, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.getIdentityByExternalID']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Return a specific identity schema.
         * @summary Get Identity JSON Schema
         * @param {string} id ID must be set to the ID of schema you want to get
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getIdentitySchema(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getIdentitySchema(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.getIdentitySchema']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint is useful for:  Getting a session object with all specified expandables that exist in an administrative context.
         * @summary Get Session
         * @param {string} id ID is the session\&#39;s ID.
         * @param {Array<GetSessionExpandEnum>} [expand] ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand&#x3D;Identity&amp;expand&#x3D;Devices If no value is provided, the expandable properties are skipped.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getSession(id: string, expand?: Array<GetSessionExpandEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getSession(id, expand, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.getSession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Lists all [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
         * @summary List Identities
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {ListIdentitiesConsistencyEnum} [consistency] 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 &#x60;ory patch project --replace \&#39;/previews/default_read_consistency_level&#x3D;\&quot;strong\&quot;\&#39;&#x60;.  Setting the default consistency level to &#x60;eventual&#x60; may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting:  &#x60;GET /admin/identities&#x60;  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.
         * @param {Array<string>} [ids] Retrieve multiple identities by their IDs.  This parameter has the following limitations:  Duplicate or non-existent IDs are ignored. The order of returned IDs may be different from the request. This filter does not support pagination. You must implement your own pagination as the maximum number of items returned by this endpoint may not exceed a certain threshold (currently 500).
         * @param {string} [credentialsIdentifier] CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
         * @param {string} [previewCredentialsIdentifierSimilar] This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH.  CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
         * @param {Array<string>} [includeCredential] Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
         * @param {string} [organizationId] List identities that belong to a specific organization.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listIdentities(perPage?: number, page?: number, pageSize?: number, pageToken?: string, consistency?: ListIdentitiesConsistencyEnum, ids?: Array<string>, credentialsIdentifier?: string, previewCredentialsIdentifierSimilar?: string, includeCredential?: Array<string>, organizationId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Identity>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listIdentities(perPage, page, pageSize, pageToken, consistency, ids, credentialsIdentifier, previewCredentialsIdentifierSimilar, includeCredential, organizationId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.listIdentities']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Returns a list of all identity schemas currently in use.
         * @summary Get all Identity Schemas
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listIdentitySchemas(perPage?: number, page?: number, pageSize?: number, pageToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<IdentitySchemaContainer>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listIdentitySchemas(perPage, page, pageSize, pageToken, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.listIdentitySchemas']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint returns all sessions that belong to the given Identity.
         * @summary List an Identity\'s Sessions
         * @param {string} id ID is the identity\&#39;s ID.
         * @param {number} [perPage] Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
         * @param {number} [page] Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
         * @param {number} [pageSize] Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {boolean} [active] Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listIdentitySessions(id: string, perPage?: number, page?: number, pageSize?: number, pageToken?: string, active?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Session>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listIdentitySessions(id, perPage, page, pageSize, pageToken, active, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.listIdentitySessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Listing all sessions that exist.
         * @summary List All Sessions
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {boolean} [active] Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
         * @param {Array<ListSessionsExpandEnum>} [expand] ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listSessions(pageSize?: number, pageToken?: string, active?: boolean, expand?: Array<ListSessionsExpandEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Session>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listSessions(pageSize, pageToken, active, expand, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.listSessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Partially updates an [identity\'s](https://www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](https://jsonpatch.com/). The fields `id`, `stateChangedAt` and `credentials` can not be updated using this method.
         * @summary Patch an Identity
         * @param {string} id ID must be set to the ID of identity you want to update
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchIdentity(id: string, jsonPatch?: Array<JsonPatch>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Identity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchIdentity(id, jsonPatch, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.patchIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint updates an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected.  It is possible to update the identity\'s credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here:  `password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it\'s added to the identity\'s identifiers list while preserving previous user handles. `code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`{\"ory.sh/kratos\":{\"code\":{\"identifier\":true\", \"via\":\"email\"}}}`).
         * @summary Update an Identity
         * @param {string} id ID must be set to the ID of identity you want to update
         * @param {UpdateIdentityBody} [updateIdentityBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateIdentity(id: string, updateIdentityBody?: UpdateIdentityBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Identity>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateIdentity(id, updateIdentityBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['IdentityApi.updateIdentity']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * IdentityApi - factory interface
 */
export const IdentityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = IdentityApiFp(configuration)
    return {
        /**
         * Creates multiple [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model).  You can also use this endpoint to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods.  If the patch includes hashed passwords you can import up to 1,000 identities per request.  If the patch includes at least one plaintext password you can import up to 200 identities per request.  Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored.  If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected.  If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt  If the issue persists, contact support.
         * @summary Create multiple identities
         * @param {IdentityApiBatchPatchIdentitiesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchPatchIdentities(requestParameters: IdentityApiBatchPatchIdentitiesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<BatchPatchIdentitiesResponse> {
            return localVarFp.batchPatchIdentities(requestParameters.patchIdentitiesBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Create an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model).  This endpoint can also be used to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
         * @summary Create an Identity
         * @param {IdentityApiCreateIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createIdentity(requestParameters: IdentityApiCreateIdentityRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Identity> {
            return localVarFp.createIdentity(requestParameters.createIdentityBody, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Code
         * @param {IdentityApiCreateRecoveryCodeForIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRecoveryCodeForIdentity(requestParameters: IdentityApiCreateRecoveryCodeForIdentityRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<RecoveryCodeForIdentity> {
            return localVarFp.createRecoveryCodeForIdentity(requestParameters.createRecoveryCodeForIdentityBody, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
         * @summary Create a Recovery Link
         * @param {IdentityApiCreateRecoveryLinkForIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRecoveryLinkForIdentity(requestParameters: IdentityApiCreateRecoveryLinkForIdentityRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<RecoveryLinkForIdentity> {
            return localVarFp.createRecoveryLinkForIdentity(requestParameters.returnTo, requestParameters.createRecoveryLinkForIdentityBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
         * @summary Delete an Identity
         * @param {IdentityApiDeleteIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentity(requestParameters: IdentityApiDeleteIdentityRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteIdentity(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
         * @summary Delete a credential for a specific identity
         * @param {IdentityApiDeleteIdentityCredentialsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentityCredentials(requestParameters: IdentityApiDeleteIdentityCredentialsRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteIdentityCredentials(requestParameters.id, requestParameters.type, requestParameters.identifier, options).then((request) => request(axios, basePath));
        },
        /**
         * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
         * @summary Delete & Invalidate an Identity\'s Sessions
         * @param {IdentityApiDeleteIdentitySessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteIdentitySessions(requestParameters: IdentityApiDeleteIdentitySessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteIdentitySessions(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * Calling this endpoint deactivates the specified session. Session data is not deleted.
         * @summary Deactivate a Session
         * @param {IdentityApiDisableSessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        disableSession(requestParameters: IdentityApiDisableSessionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.disableSession(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.  This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon.  This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist.  Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
         * @summary Extend a Session
         * @param {IdentityApiExtendSessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        extendSession(requestParameters: IdentityApiExtendSessionRequest, options?: RawAxiosRequestConfig): AxiosPromise<Session> {
            return localVarFp.extendSession(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity
         * @param {IdentityApiGetIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentity(requestParameters: IdentityApiGetIdentityRequest, options?: RawAxiosRequestConfig): AxiosPromise<Identity> {
            return localVarFp.getIdentity(requestParameters.id, requestParameters.includeCredential, options).then((request) => request(axios, basePath));
        },
        /**
         * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
         * @summary Get an Identity by its External ID
         * @param {IdentityApiGetIdentityByExternalIDRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentityByExternalID(requestParameters: IdentityApiGetIdentityByExternalIDRequest, options?: RawAxiosRequestConfig): AxiosPromise<Identity> {
            return localVarFp.getIdentityByExternalID(requestParameters.externalID, requestParameters.includeCredential, options).then((request) => request(axios, basePath));
        },
        /**
         * Return a specific identity schema.
         * @summary Get Identity JSON Schema
         * @param {IdentityApiGetIdentitySchemaRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getIdentitySchema(requestParameters: IdentityApiGetIdentitySchemaRequest, options?: RawAxiosRequestConfig): AxiosPromise<object> {
            return localVarFp.getIdentitySchema(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint is useful for:  Getting a session object with all specified expandables that exist in an administrative context.
         * @summary Get Session
         * @param {IdentityApiGetSessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getSession(requestParameters: IdentityApiGetSessionRequest, options?: RawAxiosRequestConfig): AxiosPromise<Session> {
            return localVarFp.getSession(requestParameters.id, requestParameters.expand, options).then((request) => request(axios, basePath));
        },
        /**
         * Lists all [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
         * @summary List Identities
         * @param {IdentityApiListIdentitiesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentities(requestParameters: IdentityApiListIdentitiesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<Identity>> {
            return localVarFp.listIdentities(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.consistency, requestParameters.ids, requestParameters.credentialsIdentifier, requestParameters.previewCredentialsIdentifierSimilar, requestParameters.includeCredential, requestParameters.organizationId, options).then((request) => request(axios, basePath));
        },
        /**
         * Returns a list of all identity schemas currently in use.
         * @summary Get all Identity Schemas
         * @param {IdentityApiListIdentitySchemasRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentitySchemas(requestParameters: IdentityApiListIdentitySchemasRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<IdentitySchemaContainer>> {
            return localVarFp.listIdentitySchemas(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint returns all sessions that belong to the given Identity.
         * @summary List an Identity\'s Sessions
         * @param {IdentityApiListIdentitySessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listIdentitySessions(requestParameters: IdentityApiListIdentitySessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Session>> {
            return localVarFp.listIdentitySessions(requestParameters.id, requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.active, options).then((request) => request(axios, basePath));
        },
        /**
         * Listing all sessions that exist.
         * @summary List All Sessions
         * @param {IdentityApiListSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listSessions(requestParameters: IdentityApiListSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<Session>> {
            return localVarFp.listSessions(requestParameters.pageSize, requestParameters.pageToken, requestParameters.active, requestParameters.expand, options).then((request) => request(axios, basePath));
        },
        /**
         * Partially updates an [identity\'s](https://www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](https://jsonpatch.com/). The fields `id`, `stateChangedAt` and `credentials` can not be updated using this method.
         * @summary Patch an Identity
         * @param {IdentityApiPatchIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchIdentity(requestParameters: IdentityApiPatchIdentityRequest, options?: RawAxiosRequestConfig): AxiosPromise<Identity> {
            return localVarFp.patchIdentity(requestParameters.id, requestParameters.jsonPatch, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint updates an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected.  It is possible to update the identity\'s credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here:  `password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it\'s added to the identity\'s identifiers list while preserving previous user handles. `code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`{\"ory.sh/kratos\":{\"code\":{\"identifier\":true\", \"via\":\"email\"}}}`).
         * @summary Update an Identity
         * @param {IdentityApiUpdateIdentityRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateIdentity(requestParameters: IdentityApiUpdateIdentityRequest, options?: RawAxiosRequestConfig): AxiosPromise<Identity> {
            return localVarFp.updateIdentity(requestParameters.id, requestParameters.updateIdentityBody, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for batchPatchIdentities operation in IdentityApi.
 */
export interface IdentityApiBatchPatchIdentitiesRequest {
    readonly patchIdentitiesBody?: PatchIdentitiesBody
}

/**
 * Request parameters for createIdentity operation in IdentityApi.
 */
export interface IdentityApiCreateIdentityRequest {
    readonly createIdentityBody?: CreateIdentityBody
}

/**
 * Request parameters for createRecoveryCodeForIdentity operation in IdentityApi.
 */
export interface IdentityApiCreateRecoveryCodeForIdentityRequest {
    readonly createRecoveryCodeForIdentityBody?: CreateRecoveryCodeForIdentityBody
}

/**
 * Request parameters for createRecoveryLinkForIdentity operation in IdentityApi.
 */
export interface IdentityApiCreateRecoveryLinkForIdentityRequest {
    readonly returnTo?: string

    readonly createRecoveryLinkForIdentityBody?: CreateRecoveryLinkForIdentityBody
}

/**
 * Request parameters for deleteIdentity operation in IdentityApi.
 */
export interface IdentityApiDeleteIdentityRequest {
    /**
     * ID is the identity\&#39;s ID.
     */
    readonly id: string
}

/**
 * Request parameters for deleteIdentityCredentials operation in IdentityApi.
 */
export interface IdentityApiDeleteIdentityCredentialsRequest {
    /**
     * ID is the identity\&#39;s ID.
     */
    readonly id: string

    /**
     * Type is the type of credentials to delete. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn 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
     */
    readonly type: DeleteIdentityCredentialsTypeEnum

    /**
     * Identifier is the identifier of the OIDC/SAML credential to delete. Find the identifier by calling the &#x60;GET /admin/identities/{id}?include_credential&#x3D;{oidc,saml}&#x60; endpoint.
     */
    readonly identifier?: string
}

/**
 * Request parameters for deleteIdentitySessions operation in IdentityApi.
 */
export interface IdentityApiDeleteIdentitySessionsRequest {
    /**
     * ID is the identity\&#39;s ID.
     */
    readonly id: string
}

/**
 * Request parameters for disableSession operation in IdentityApi.
 */
export interface IdentityApiDisableSessionRequest {
    /**
     * ID is the session\&#39;s ID.
     */
    readonly id: string
}

/**
 * Request parameters for extendSession operation in IdentityApi.
 */
export interface IdentityApiExtendSessionRequest {
    /**
     * ID is the session\&#39;s ID.
     */
    readonly id: string
}

/**
 * Request parameters for getIdentity operation in IdentityApi.
 */
export interface IdentityApiGetIdentityRequest {
    /**
     * ID must be set to the ID of identity you want to get
     */
    readonly id: string

    /**
     * Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
     */
    readonly includeCredential?: Array<GetIdentityIncludeCredentialEnum>
}

/**
 * Request parameters for getIdentityByExternalID operation in IdentityApi.
 */
export interface IdentityApiGetIdentityByExternalIDRequest {
    /**
     * ExternalID must be set to the ID of identity you want to get
     */
    readonly externalID: string

    /**
     * Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
     */
    readonly includeCredential?: Array<GetIdentityByExternalIDIncludeCredentialEnum>
}

/**
 * Request parameters for getIdentitySchema operation in IdentityApi.
 */
export interface IdentityApiGetIdentitySchemaRequest {
    /**
     * ID must be set to the ID of schema you want to get
     */
    readonly id: string
}

/**
 * Request parameters for getSession operation in IdentityApi.
 */
export interface IdentityApiGetSessionRequest {
    /**
     * ID is the session\&#39;s ID.
     */
    readonly id: string

    /**
     * ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand&#x3D;Identity&amp;expand&#x3D;Devices If no value is provided, the expandable properties are skipped.
     */
    readonly expand?: Array<GetSessionExpandEnum>
}

/**
 * Request parameters for listIdentities operation in IdentityApi.
 */
export interface IdentityApiListIdentitiesRequest {
    /**
     * Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
     */
    readonly perPage?: number

    /**
     * Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
     */
    readonly page?: number

    /**
     * Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * 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 &#x60;ory patch project --replace \&#39;/previews/default_read_consistency_level&#x3D;\&quot;strong\&quot;\&#39;&#x60;.  Setting the default consistency level to &#x60;eventual&#x60; may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting:  &#x60;GET /admin/identities&#x60;  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.
     */
    readonly consistency?: ListIdentitiesConsistencyEnum

    /**
     * Retrieve multiple identities by their IDs.  This parameter has the following limitations:  Duplicate or non-existent IDs are ignored. The order of returned IDs may be different from the request. This filter does not support pagination. You must implement your own pagination as the maximum number of items returned by this endpoint may not exceed a certain threshold (currently 500).
     */
    readonly ids?: Array<string>

    /**
     * CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
     */
    readonly credentialsIdentifier?: string

    /**
     * This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH.  CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used.
     */
    readonly previewCredentialsIdentifierSimilar?: string

    /**
     * Include Credentials in Response  Include any credential, for example &#x60;password&#x60; or &#x60;oidc&#x60;, in the response. When set to &#x60;oidc&#x60;, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token, and the OpenID Connect ID Token if available.
     */
    readonly includeCredential?: Array<string>

    /**
     * List identities that belong to a specific organization.
     */
    readonly organizationId?: string
}

/**
 * Request parameters for listIdentitySchemas operation in IdentityApi.
 */
export interface IdentityApiListIdentitySchemasRequest {
    /**
     * Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
     */
    readonly perPage?: number

    /**
     * Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
     */
    readonly page?: number

    /**
     * Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string
}

/**
 * Request parameters for listIdentitySessions operation in IdentityApi.
 */
export interface IdentityApiListIdentitySessionsRequest {
    /**
     * ID is the identity\&#39;s ID.
     */
    readonly id: string

    /**
     * Deprecated Items per Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This is the number of items per page.
     */
    readonly perPage?: number

    /**
     * Deprecated Pagination Page  DEPRECATED: Please use &#x60;page_token&#x60; instead. This parameter will be removed in the future.  This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list.  For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the &#x60;Link&#x60; header.
     */
    readonly page?: number

    /**
     * Page Size  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
     */
    readonly active?: boolean
}

/**
 * Request parameters for listSessions operation in IdentityApi.
 */
export interface IdentityApiListSessionsRequest {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
     */
    readonly active?: boolean

    /**
     * ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped.
     */
    readonly expand?: Array<ListSessionsExpandEnum>
}

/**
 * Request parameters for patchIdentity operation in IdentityApi.
 */
export interface IdentityApiPatchIdentityRequest {
    /**
     * ID must be set to the ID of identity you want to update
     */
    readonly id: string

    readonly jsonPatch?: Array<JsonPatch>
}

/**
 * Request parameters for updateIdentity operation in IdentityApi.
 */
export interface IdentityApiUpdateIdentityRequest {
    /**
     * ID must be set to the ID of identity you want to update
     */
    readonly id: string

    readonly updateIdentityBody?: UpdateIdentityBody
}

/**
 * IdentityApi - object-oriented interface
 */
export class IdentityApi extends BaseAPI {
    /**
     * Creates multiple [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model).  You can also use this endpoint to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods.  If the patch includes hashed passwords you can import up to 1,000 identities per request.  If the patch includes at least one plaintext password you can import up to 200 identities per request.  Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored.  If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected.  If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt  If the issue persists, contact support.
     * @summary Create multiple identities
     * @param {IdentityApiBatchPatchIdentitiesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public batchPatchIdentities(requestParameters: IdentityApiBatchPatchIdentitiesRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).batchPatchIdentities(requestParameters.patchIdentitiesBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model).  This endpoint can also be used to [import credentials](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
     * @summary Create an Identity
     * @param {IdentityApiCreateIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createIdentity(requestParameters: IdentityApiCreateIdentityRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).createIdentity(requestParameters.createIdentityBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
     * @summary Create a Recovery Code
     * @param {IdentityApiCreateRecoveryCodeForIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createRecoveryCodeForIdentity(requestParameters: IdentityApiCreateRecoveryCodeForIdentityRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).createRecoveryCodeForIdentity(requestParameters.createRecoveryCodeForIdentityBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
     * @summary Create a Recovery Link
     * @param {IdentityApiCreateRecoveryLinkForIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createRecoveryLinkForIdentity(requestParameters: IdentityApiCreateRecoveryLinkForIdentityRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).createRecoveryLinkForIdentity(requestParameters.returnTo, requestParameters.createRecoveryLinkForIdentityBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
     * @summary Delete an Identity
     * @param {IdentityApiDeleteIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteIdentity(requestParameters: IdentityApiDeleteIdentityRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).deleteIdentity(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
     * @summary Delete a credential for a specific identity
     * @param {IdentityApiDeleteIdentityCredentialsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteIdentityCredentials(requestParameters: IdentityApiDeleteIdentityCredentialsRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).deleteIdentityCredentials(requestParameters.id, requestParameters.type, requestParameters.identifier, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
     * @summary Delete & Invalidate an Identity\'s Sessions
     * @param {IdentityApiDeleteIdentitySessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteIdentitySessions(requestParameters: IdentityApiDeleteIdentitySessionsRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).deleteIdentitySessions(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Calling this endpoint deactivates the specified session. Session data is not deleted.
     * @summary Deactivate a Session
     * @param {IdentityApiDisableSessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public disableSession(requestParameters: IdentityApiDisableSessionRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).disableSession(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.  This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon.  This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist.  Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
     * @summary Extend a Session
     * @param {IdentityApiExtendSessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public extendSession(requestParameters: IdentityApiExtendSessionRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).extendSession(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
     * @summary Get an Identity
     * @param {IdentityApiGetIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getIdentity(requestParameters: IdentityApiGetIdentityRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).getIdentity(requestParameters.id, requestParameters.includeCredential, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Return an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
     * @summary Get an Identity by its External ID
     * @param {IdentityApiGetIdentityByExternalIDRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getIdentityByExternalID(requestParameters: IdentityApiGetIdentityByExternalIDRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).getIdentityByExternalID(requestParameters.externalID, requestParameters.includeCredential, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Return a specific identity schema.
     * @summary Get Identity JSON Schema
     * @param {IdentityApiGetIdentitySchemaRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getIdentitySchema(requestParameters: IdentityApiGetIdentitySchemaRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).getIdentitySchema(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint is useful for:  Getting a session object with all specified expandables that exist in an administrative context.
     * @summary Get Session
     * @param {IdentityApiGetSessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getSession(requestParameters: IdentityApiGetSessionRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).getSession(requestParameters.id, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Lists all [identities](https://www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
     * @summary List Identities
     * @param {IdentityApiListIdentitiesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listIdentities(requestParameters: IdentityApiListIdentitiesRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).listIdentities(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.consistency, requestParameters.ids, requestParameters.credentialsIdentifier, requestParameters.previewCredentialsIdentifierSimilar, requestParameters.includeCredential, requestParameters.organizationId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns a list of all identity schemas currently in use.
     * @summary Get all Identity Schemas
     * @param {IdentityApiListIdentitySchemasRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listIdentitySchemas(requestParameters: IdentityApiListIdentitySchemasRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).listIdentitySchemas(requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint returns all sessions that belong to the given Identity.
     * @summary List an Identity\'s Sessions
     * @param {IdentityApiListIdentitySessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listIdentitySessions(requestParameters: IdentityApiListIdentitySessionsRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).listIdentitySessions(requestParameters.id, requestParameters.perPage, requestParameters.page, requestParameters.pageSize, requestParameters.pageToken, requestParameters.active, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Listing all sessions that exist.
     * @summary List All Sessions
     * @param {IdentityApiListSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listSessions(requestParameters: IdentityApiListSessionsRequest = {}, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).listSessions(requestParameters.pageSize, requestParameters.pageToken, requestParameters.active, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Partially updates an [identity\'s](https://www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](https://jsonpatch.com/). The fields `id`, `stateChangedAt` and `credentials` can not be updated using this method.
     * @summary Patch an Identity
     * @param {IdentityApiPatchIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public patchIdentity(requestParameters: IdentityApiPatchIdentityRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).patchIdentity(requestParameters.id, requestParameters.jsonPatch, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint updates an [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected.  It is possible to update the identity\'s credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here:  `password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it\'s added to the identity\'s identifiers list while preserving previous user handles. `code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`{\"ory.sh/kratos\":{\"code\":{\"identifier\":true\", \"via\":\"email\"}}}`).
     * @summary Update an Identity
     * @param {IdentityApiUpdateIdentityRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateIdentity(requestParameters: IdentityApiUpdateIdentityRequest, options?: RawAxiosRequestConfig) {
        return IdentityApiFp(this.configuration).updateIdentity(requestParameters.id, requestParameters.updateIdentityBody, options).then((request) => request(this.axios, this.basePath));
    }
}

export const DeleteIdentityCredentialsTypeEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type DeleteIdentityCredentialsTypeEnum = typeof DeleteIdentityCredentialsTypeEnum[keyof typeof DeleteIdentityCredentialsTypeEnum];
export const GetIdentityIncludeCredentialEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type GetIdentityIncludeCredentialEnum = typeof GetIdentityIncludeCredentialEnum[keyof typeof GetIdentityIncludeCredentialEnum];
export const GetIdentityByExternalIDIncludeCredentialEnum = {
    Password: 'password',
    Oidc: 'oidc',
    Totp: 'totp',
    LookupSecret: 'lookup_secret',
    Webauthn: 'webauthn',
    Code: 'code',
    Passkey: 'passkey',
    Profile: 'profile',
    Saml: 'saml',
    Deviceauthn: 'deviceauthn',
    LinkRecovery: 'link_recovery',
    CodeRecovery: 'code_recovery',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type GetIdentityByExternalIDIncludeCredentialEnum = typeof GetIdentityByExternalIDIncludeCredentialEnum[keyof typeof GetIdentityByExternalIDIncludeCredentialEnum];
export const GetSessionExpandEnum = {
    Identity: 'identity',
    Devices: 'devices',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type GetSessionExpandEnum = typeof GetSessionExpandEnum[keyof typeof GetSessionExpandEnum];
export const ListIdentitiesConsistencyEnum = {
    Empty: '',
    Strong: 'strong',
    Eventual: 'eventual',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type ListIdentitiesConsistencyEnum = typeof ListIdentitiesConsistencyEnum[keyof typeof ListIdentitiesConsistencyEnum];
export const ListSessionsExpandEnum = {
    Identity: 'identity',
    Devices: 'devices',
    UnknownDefaultOpenApi: '11184809'
} as const;
export type ListSessionsExpandEnum = typeof ListSessionsExpandEnum[keyof typeof ListSessionsExpandEnum];


/**
 * JwkApi - axios parameter creator
 */
export const JwkApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Create JSON Web Key
         * @param {string} set The JSON Web Key Set ID
         * @param {CreateJsonWebKeySet} createJsonWebKeySet 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createJsonWebKeySet: async (set: string, createJsonWebKeySet: CreateJsonWebKeySet, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('createJsonWebKeySet', 'set', set)
            // verify required parameter 'createJsonWebKeySet' is not null or undefined
            assertParamExists('createJsonWebKeySet', 'createJsonWebKeySet', createJsonWebKeySet)
            const localVarPath = `/admin/keys/{set}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createJsonWebKeySet, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to delete a single JSON Web Key.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key
         * @param {string} set The JSON Web Key Set
         * @param {string} kid The JSON Web Key ID (kid)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteJsonWebKey: async (set: string, kid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('deleteJsonWebKey', 'set', set)
            // verify required parameter 'kid' is not null or undefined
            assertParamExists('deleteJsonWebKey', 'kid', kid)
            const localVarPath = `/admin/keys/{set}/{kid}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)))
                .replace(`{${"kid"}}`, encodeURIComponent(String(kid)));
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key Set
         * @param {string} set The JSON Web Key Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteJsonWebKeySet: async (set: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('deleteJsonWebKeySet', 'set', set)
            const localVarPath = `/admin/keys/{set}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)));
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            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 singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).
         * @summary Get JSON Web Key
         * @param {string} set JSON Web Key Set ID
         * @param {string} kid JSON Web Key ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getJsonWebKey: async (set: string, kid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('getJsonWebKey', 'set', set)
            // verify required parameter 'kid' is not null or undefined
            assertParamExists('getJsonWebKey', 'kid', kid)
            const localVarPath = `/admin/keys/{set}/{kid}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)))
                .replace(`{${"kid"}}`, encodeURIComponent(String(kid)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Retrieve a JSON Web Key Set
         * @param {string} set JSON Web Key Set ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getJsonWebKeySet: async (set: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('getJsonWebKeySet', 'set', set)
            const localVarPath = `/admin/keys/{set}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Set JSON Web Key
         * @param {string} set The JSON Web Key Set ID
         * @param {string} kid JSON Web Key ID
         * @param {JsonWebKey} [jsonWebKey] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setJsonWebKey: async (set: string, kid: string, jsonWebKey?: JsonWebKey, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('setJsonWebKey', 'set', set)
            // verify required parameter 'kid' is not null or undefined
            assertParamExists('setJsonWebKey', 'kid', kid)
            const localVarPath = `/admin/keys/{set}/{kid}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)))
                .replace(`{${"kid"}}`, encodeURIComponent(String(kid)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonWebKey, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Update a JSON Web Key Set
         * @param {string} set The JSON Web Key Set ID
         * @param {JsonWebKeySet} [jsonWebKeySet] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setJsonWebKeySet: async (set: string, jsonWebKeySet?: JsonWebKeySet, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'set' is not null or undefined
            assertParamExists('setJsonWebKeySet', 'set', set)
            const localVarPath = `/admin/keys/{set}`
                .replace(`{${"set"}}`, encodeURIComponent(String(set)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonWebKeySet, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * JwkApi - functional programming interface
 */
export const JwkApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = JwkApiAxiosParamCreator(configuration)
    return {
        /**
         * This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Create JSON Web Key
         * @param {string} set The JSON Web Key Set ID
         * @param {CreateJsonWebKeySet} createJsonWebKeySet 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKeySet>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createJsonWebKeySet(set, createJsonWebKeySet, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.createJsonWebKeySet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to delete a single JSON Web Key.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key
         * @param {string} set The JSON Web Key Set
         * @param {string} kid The JSON Web Key ID (kid)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteJsonWebKey(set: string, kid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKey(set, kid, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.deleteJsonWebKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key Set
         * @param {string} set The JSON Web Key Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteJsonWebKeySet(set: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKeySet(set, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.deleteJsonWebKeySet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).
         * @summary Get JSON Web Key
         * @param {string} set JSON Web Key Set ID
         * @param {string} kid JSON Web Key ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getJsonWebKey(set: string, kid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKeySet>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKey(set, kid, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.getJsonWebKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Retrieve a JSON Web Key Set
         * @param {string} set JSON Web Key Set ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getJsonWebKeySet(set: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKeySet>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKeySet(set, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.getJsonWebKeySet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Set JSON Web Key
         * @param {string} set The JSON Web Key Set ID
         * @param {string} kid JSON Web Key ID
         * @param {JsonWebKey} [jsonWebKey] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKey>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKey(set, kid, jsonWebKey, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.setJsonWebKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Update a JSON Web Key Set
         * @param {string} set The JSON Web Key Set ID
         * @param {JsonWebKeySet} [jsonWebKeySet] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKeySet>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKeySet(set, jsonWebKeySet, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['JwkApi.setJsonWebKeySet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * JwkApi - factory interface
 */
export const JwkApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = JwkApiFp(configuration)
    return {
        /**
         * This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Create JSON Web Key
         * @param {JwkApiCreateJsonWebKeySetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createJsonWebKeySet(requestParameters: JwkApiCreateJsonWebKeySetRequest, options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKeySet> {
            return localVarFp.createJsonWebKeySet(requestParameters.set, requestParameters.createJsonWebKeySet, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to delete a single JSON Web Key.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key
         * @param {JwkApiDeleteJsonWebKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteJsonWebKey(requestParameters: JwkApiDeleteJsonWebKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteJsonWebKey(requestParameters.set, requestParameters.kid, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Delete JSON Web Key Set
         * @param {JwkApiDeleteJsonWebKeySetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteJsonWebKeySet(requestParameters: JwkApiDeleteJsonWebKeySetRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteJsonWebKeySet(requestParameters.set, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).
         * @summary Get JSON Web Key
         * @param {JwkApiGetJsonWebKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getJsonWebKey(requestParameters: JwkApiGetJsonWebKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKeySet> {
            return localVarFp.getJsonWebKey(requestParameters.set, requestParameters.kid, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Retrieve a JSON Web Key Set
         * @param {JwkApiGetJsonWebKeySetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getJsonWebKeySet(requestParameters: JwkApiGetJsonWebKeySetRequest, options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKeySet> {
            return localVarFp.getJsonWebKeySet(requestParameters.set, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Set JSON Web Key
         * @param {JwkApiSetJsonWebKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setJsonWebKey(requestParameters: JwkApiSetJsonWebKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKey> {
            return localVarFp.setJsonWebKey(requestParameters.set, requestParameters.kid, requestParameters.jsonWebKey, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
         * @summary Update a JSON Web Key Set
         * @param {JwkApiSetJsonWebKeySetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setJsonWebKeySet(requestParameters: JwkApiSetJsonWebKeySetRequest, options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKeySet> {
            return localVarFp.setJsonWebKeySet(requestParameters.set, requestParameters.jsonWebKeySet, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createJsonWebKeySet operation in JwkApi.
 */
export interface JwkApiCreateJsonWebKeySetRequest {
    /**
     * The JSON Web Key Set ID
     */
    readonly set: string

    readonly createJsonWebKeySet: CreateJsonWebKeySet
}

/**
 * Request parameters for deleteJsonWebKey operation in JwkApi.
 */
export interface JwkApiDeleteJsonWebKeyRequest {
    /**
     * The JSON Web Key Set
     */
    readonly set: string

    /**
     * The JSON Web Key ID (kid)
     */
    readonly kid: string
}

/**
 * Request parameters for deleteJsonWebKeySet operation in JwkApi.
 */
export interface JwkApiDeleteJsonWebKeySetRequest {
    /**
     * The JSON Web Key Set
     */
    readonly set: string
}

/**
 * Request parameters for getJsonWebKey operation in JwkApi.
 */
export interface JwkApiGetJsonWebKeyRequest {
    /**
     * JSON Web Key Set ID
     */
    readonly set: string

    /**
     * JSON Web Key ID
     */
    readonly kid: string
}

/**
 * Request parameters for getJsonWebKeySet operation in JwkApi.
 */
export interface JwkApiGetJsonWebKeySetRequest {
    /**
     * JSON Web Key Set ID
     */
    readonly set: string
}

/**
 * Request parameters for setJsonWebKey operation in JwkApi.
 */
export interface JwkApiSetJsonWebKeyRequest {
    /**
     * The JSON Web Key Set ID
     */
    readonly set: string

    /**
     * JSON Web Key ID
     */
    readonly kid: string

    readonly jsonWebKey?: JsonWebKey
}

/**
 * Request parameters for setJsonWebKeySet operation in JwkApi.
 */
export interface JwkApiSetJsonWebKeySetRequest {
    /**
     * The JSON Web Key Set ID
     */
    readonly set: string

    readonly jsonWebKeySet?: JsonWebKeySet
}

/**
 * JwkApi - object-oriented interface
 */
export class JwkApi extends BaseAPI {
    /**
     * This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Create JSON Web Key
     * @param {JwkApiCreateJsonWebKeySetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createJsonWebKeySet(requestParameters: JwkApiCreateJsonWebKeySetRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).createJsonWebKeySet(requestParameters.set, requestParameters.createJsonWebKeySet, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to delete a single JSON Web Key.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Delete JSON Web Key
     * @param {JwkApiDeleteJsonWebKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteJsonWebKey(requestParameters: JwkApiDeleteJsonWebKeyRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).deleteJsonWebKey(requestParameters.set, requestParameters.kid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Delete JSON Web Key Set
     * @param {JwkApiDeleteJsonWebKeySetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteJsonWebKeySet(requestParameters: JwkApiDeleteJsonWebKeySetRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).deleteJsonWebKeySet(requestParameters.set, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).
     * @summary Get JSON Web Key
     * @param {JwkApiGetJsonWebKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getJsonWebKey(requestParameters: JwkApiGetJsonWebKeyRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).getJsonWebKey(requestParameters.set, requestParameters.kid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Retrieve a JSON Web Key Set
     * @param {JwkApiGetJsonWebKeySetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getJsonWebKeySet(requestParameters: JwkApiGetJsonWebKeySetRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).getJsonWebKeySet(requestParameters.set, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Set JSON Web Key
     * @param {JwkApiSetJsonWebKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setJsonWebKey(requestParameters: JwkApiSetJsonWebKeyRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).setJsonWebKey(requestParameters.set, requestParameters.kid, requestParameters.jsonWebKey, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
     * @summary Update a JSON Web Key Set
     * @param {JwkApiSetJsonWebKeySetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setJsonWebKeySet(requestParameters: JwkApiSetJsonWebKeySetRequest, options?: RawAxiosRequestConfig) {
        return JwkApiFp(this.configuration).setJsonWebKeySet(requestParameters.set, requestParameters.jsonWebKeySet, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * MetadataApi - axios parameter creator
 */
export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * This endpoint returns the version of Ory Kratos.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
         * @summary Return Running Software Version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getVersion: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/version`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * MetadataApi - functional programming interface
 */
export const MetadataApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration)
    return {
        /**
         * This endpoint returns the version of Ory Kratos.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
         * @summary Return Running Software Version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getVersion(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetVersion200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getVersion(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['MetadataApi.getVersion']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * MetadataApi - factory interface
 */
export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = MetadataApiFp(configuration)
    return {
        /**
         * This endpoint returns the version of Ory Kratos.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
         * @summary Return Running Software Version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getVersion(options?: RawAxiosRequestConfig): AxiosPromise<GetVersion200Response> {
            return localVarFp.getVersion(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * MetadataApi - object-oriented interface
 */
export class MetadataApi extends BaseAPI {
    /**
     * This endpoint returns the version of Ory Kratos.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
     * @summary Return Running Software Version.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getVersion(options?: RawAxiosRequestConfig) {
        return MetadataApiFp(this.configuration).getVersion(options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * OAuth2Api - axios parameter creator
 */
export const OAuth2ApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Accept OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2ConsentRequest: async (consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'consentChallenge' is not null or undefined
            assertParamExists('acceptOAuth2ConsentRequest', 'consentChallenge', consentChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/consent/accept`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (consentChallenge !== undefined) {
                localVarQueryParameter['consent_challenge'] = consentChallenge;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(acceptOAuth2ConsentRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2LoginRequest: async (loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'loginChallenge' is not null or undefined
            assertParamExists('acceptOAuth2LoginRequest', 'loginChallenge', loginChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/login/accept`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (loginChallenge !== undefined) {
                localVarQueryParameter['login_challenge'] = loginChallenge;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(acceptOAuth2LoginRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2LogoutRequest: async (logoutChallenge: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'logoutChallenge' is not null or undefined
            assertParamExists('acceptOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/logout/accept`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (logoutChallenge !== undefined) {
                localVarQueryParameter['logout_challenge'] = logoutChallenge;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Accepts a device grant user_code request
         * @summary Accepts a device grant user_code request
         * @param {string} deviceChallenge 
         * @param {AcceptDeviceUserCodeRequest} [acceptDeviceUserCodeRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptUserCodeRequest: async (deviceChallenge: string, acceptDeviceUserCodeRequest?: AcceptDeviceUserCodeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'deviceChallenge' is not null or undefined
            assertParamExists('acceptUserCodeRequest', 'deviceChallenge', deviceChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/device/accept`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (deviceChallenge !== undefined) {
                localVarQueryParameter['device_challenge'] = deviceChallenge;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(acceptDeviceUserCodeRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
         * @summary Create OAuth 2.0 Client
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOAuth2Client: async (oAuth2Client: OAuth2Client, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'oAuth2Client' is not null or undefined
            assertParamExists('createOAuth2Client', 'oAuth2Client', oAuth2Client)
            const localVarPath = `/admin/clients`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete an existing OAuth 2.0 Client by its ID.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.  Make sure that this endpoint is well protected and only callable by first-party components.
         * @summary Delete OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuth2Client: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteOAuth2Client', 'id', id)
            const localVarPath = `/admin/clients/{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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
         * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
         * @param {string} clientId OAuth 2.0 Client ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuth2Token: async (clientId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'clientId' is not null or undefined
            assertParamExists('deleteOAuth2Token', 'clientId', clientId)
            const localVarPath = `/admin/oauth2/tokens`;
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (clientId !== undefined) {
                localVarQueryParameter['client_id'] = clientId;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.  Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
         * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {string} id The id of the desired grant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteTrustedOAuth2JwtGrantIssuer: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteTrustedOAuth2JwtGrantIssuer', 'id', id)
            const localVarPath = `/admin/trust/grants/jwt-bearer/issuers/{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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Get an OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2Client: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getOAuth2Client', 'id', id)
            const localVarPath = `/admin/clients/{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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Get OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2ConsentRequest: async (consentChallenge: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'consentChallenge' is not null or undefined
            assertParamExists('getOAuth2ConsentRequest', 'consentChallenge', consentChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/consent`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (consentChallenge !== undefined) {
                localVarQueryParameter['consent_challenge'] = consentChallenge;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
         * @summary Get OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2LoginRequest: async (loginChallenge: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'loginChallenge' is not null or undefined
            assertParamExists('getOAuth2LoginRequest', 'loginChallenge', loginChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/login`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (loginChallenge !== undefined) {
                localVarQueryParameter['login_challenge'] = loginChallenge;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to fetch an Ory OAuth 2.0 logout request.
         * @summary Get OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2LogoutRequest: async (logoutChallenge: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'logoutChallenge' is not null or undefined
            assertParamExists('getOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/logout`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (logoutChallenge !== undefined) {
                localVarQueryParameter['logout_challenge'] = logoutChallenge;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
         * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {string} id The id of the desired grant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getTrustedOAuth2JwtGrantIssuer: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getTrustedOAuth2JwtGrantIssuer', 'id', id)
            const localVarPath = `/admin/trust/grants/jwt-bearer/issuers/{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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow.
         * @summary Introspect OAuth2 Access and Refresh Tokens
         * @param {string} token The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
         * @param {string} [scope] An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        introspectOAuth2Token: async (token: string, scope?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'token' is not null or undefined
            assertParamExists('introspectOAuth2Token', 'token', token)
            const localVarPath = `/admin/oauth2/introspect`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;
            const localVarFormParams = new URLSearchParams();

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


            if (scope !== undefined) { 
                localVarFormParams.set('scope', scope as any);
            }
    
            if (token !== undefined) { 
                localVarFormParams.set('token', token as any);
            }
    
    
            localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams.toString();

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.
         * @summary List OAuth 2.0 Clients
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [clientName] The name of the clients to filter by.
         * @param {string} [owner] The owner of the clients to filter by.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOAuth2Clients: async (pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/clients`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (clientName !== undefined) {
                localVarQueryParameter['client_name'] = clientName;
            }

            if (owner !== undefined) {
                localVarQueryParameter['owner'] = owner;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.
         * @summary List OAuth 2.0 Consent Sessions of a Subject
         * @param {string} subject The subject to list the consent sessions for.
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [loginSessionId] The login session id to list the consent sessions for.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOAuth2ConsentSessions: async (subject: string, pageSize?: number, pageToken?: string, loginSessionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'subject' is not null or undefined
            assertParamExists('listOAuth2ConsentSessions', 'subject', subject)
            const localVarPath = `/admin/oauth2/auth/sessions/consent`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (subject !== undefined) {
                localVarQueryParameter['subject'] = subject;
            }

            if (loginSessionId !== undefined) {
                localVarQueryParameter['login_session_id'] = loginSessionId;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
         * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [issuer] If optional \&quot;issuer\&quot; is supplied, only jwt-bearer grants with this issuer will be returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listTrustedOAuth2JwtGrantIssuers: async (pageSize?: number, pageToken?: string, issuer?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/trust/grants/jwt-bearer/issuers`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (issuer !== undefined) {
                localVarQueryParameter['issuer'] = issuer;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary OAuth 2.0 Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oAuth2Authorize: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/oauth2/auth`;
            // 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 is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exist.  To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc8628
         * @summary The OAuth 2.0 Device Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oAuth2DeviceFlow: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/oauth2/device/auth`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary The OAuth 2.0 Token Endpoint
         * @param {string} grantType 
         * @param {string} [clientId] 
         * @param {string} [code] 
         * @param {string} [redirectUri] 
         * @param {string} [refreshToken] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oauth2TokenExchange: async (grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'grantType' is not null or undefined
            assertParamExists('oauth2TokenExchange', 'grantType', grantType)
            const localVarPath = `/oauth2/token`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;
            const localVarFormParams = new URLSearchParams();

            // authentication basic required
            // http basic authentication required
            setBasicAuthToObject(localVarRequestOptions, configuration)

            // authentication oauth2 required
            // oauth required
            await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration)


            if (clientId !== undefined) { 
                localVarFormParams.set('client_id', clientId as any);
            }
    
            if (code !== undefined) { 
                localVarFormParams.set('code', code as any);
            }
    
            if (grantType !== undefined) { 
                localVarFormParams.set('grant_type', grantType as any);
            }
    
            if (redirectUri !== undefined) { 
                localVarFormParams.set('redirect_uri', redirectUri as any);
            }
    
            if (refreshToken !== undefined) { 
                localVarFormParams.set('refresh_token', refreshToken as any);
            }
    
    
            localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams.toString();

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Patch OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {Array<JsonPatch>} jsonPatch OAuth 2.0 Client JSON Patch Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchOAuth2Client: async (id: string, jsonPatch: Array<JsonPatch>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('patchOAuth2Client', 'id', id)
            // verify required parameter 'jsonPatch' is not null or undefined
            assertParamExists('patchOAuth2Client', 'jsonPatch', jsonPatch)
            const localVarPath = `/admin/clients/{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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonPatch, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This is the device user verification endpoint. The user is redirected here when trying to log in using the device flow.
         * @summary OAuth 2.0 Device Verification Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        performOAuth2DeviceVerificationFlow: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/oauth2/device/verify`;
            // 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,
            };
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Reject OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {RejectOAuth2Request} [rejectOAuth2Request] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2ConsentRequest: async (consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'consentChallenge' is not null or undefined
            assertParamExists('rejectOAuth2ConsentRequest', 'consentChallenge', consentChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/consent/reject`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (consentChallenge !== undefined) {
                localVarQueryParameter['consent_challenge'] = consentChallenge;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(rejectOAuth2Request, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Reject OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {RejectOAuth2Request} [rejectOAuth2Request] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2LoginRequest: async (loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'loginChallenge' is not null or undefined
            assertParamExists('rejectOAuth2LoginRequest', 'loginChallenge', loginChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/login/reject`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (loginChallenge !== undefined) {
                localVarQueryParameter['login_challenge'] = loginChallenge;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(rejectOAuth2Request, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required.  The response is empty as the logout provider has to chose what action to perform next.
         * @summary Reject OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2LogoutRequest: async (logoutChallenge: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'logoutChallenge' is not null or undefined
            assertParamExists('rejectOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge)
            const localVarPath = `/admin/oauth2/auth/requests/logout/reject`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (logoutChallenge !== undefined) {
                localVarQueryParameter['logout_challenge'] = logoutChallenge;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.
         * @summary Revoke OAuth 2.0 Consent Sessions of a Subject
         * @param {string} [subject] OAuth 2.0 Consent Subject  The subject whose consent sessions should be deleted.
         * @param {string} [client] OAuth 2.0 Client ID  If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.
         * @param {string} [consentRequestId] Consent Request ID  If set, revoke all token chains derived from this particular consent request ID.
         * @param {boolean} [all] Revoke All Consent Sessions  If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2ConsentSessions: async (subject?: string, client?: string, consentRequestId?: string, all?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/oauth2/auth/sessions/consent`;
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (subject !== undefined) {
                localVarQueryParameter['subject'] = subject;
            }

            if (client !== undefined) {
                localVarQueryParameter['client'] = client;
            }

            if (consentRequestId !== undefined) {
                localVarQueryParameter['consent_request_id'] = consentRequestId;
            }

            if (all !== undefined) {
                localVarQueryParameter['all'] = all;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.  If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case.  Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.  When using Ory for the identity provider, the login provider will also invalidate the session cookie.
         * @summary Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
         * @param {string} [subject] OAuth 2.0 Subject  The subject to revoke authentication sessions for.
         * @param {string} [sid] Login Session ID  The login session to revoke.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2LoginSessions: async (subject?: string, sid?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/oauth2/auth/sessions/login`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (subject !== undefined) {
                localVarQueryParameter['subject'] = subject;
            }

            if (sid !== undefined) {
                localVarQueryParameter['sid'] = sid;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
         * @summary Revoke OAuth 2.0 Access or Refresh Token
         * @param {string} token 
         * @param {string} [clientId] 
         * @param {string} [clientSecret] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2Token: async (token: string, clientId?: string, clientSecret?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'token' is not null or undefined
            assertParamExists('revokeOAuth2Token', 'token', token)
            const localVarPath = `/oauth2/revoke`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;
            const localVarFormParams = new URLSearchParams();

            // authentication basic required
            // http basic authentication required
            setBasicAuthToObject(localVarRequestOptions, configuration)

            // authentication oauth2 required
            // oauth required
            await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration)


            if (clientId !== undefined) { 
                localVarFormParams.set('client_id', clientId as any);
            }
    
            if (clientSecret !== undefined) { 
                localVarFormParams.set('client_secret', clientSecret as any);
            }
    
            if (token !== undefined) { 
                localVarFormParams.set('token', token as any);
            }
    
    
            localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams.toString();

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used.  If set, the secret is echoed in the response. It is not possible to retrieve it later on.  OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth 2.0 Client
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOAuth2Client: async (id: string, oAuth2Client: OAuth2Client, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('setOAuth2Client', 'id', id)
            // verify required parameter 'oAuth2Client' is not null or undefined
            assertParamExists('setOAuth2Client', 'oAuth2Client', oAuth2Client)
            const localVarPath = `/admin/clients/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.
         * @summary Set OAuth2 Client Token Lifespans
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOAuth2ClientLifespans: async (id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('setOAuth2ClientLifespans', 'id', id)
            const localVarPath = `/admin/clients/{id}/lifespans`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(oAuth2ClientTokenLifespans, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
         * @summary Trust OAuth2 JWT Bearer Grant Type Issuer
         * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        trustOAuth2JwtGrantIssuer: async (trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/trust/grants/jwt-bearer/issuers`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(trustOAuth2JwtGrantIssuer, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * OAuth2Api - functional programming interface
 */
export const OAuth2ApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = OAuth2ApiAxiosParamCreator(configuration)
    return {
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Accept OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async acceptOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LogoutRequest(logoutChallenge, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Accepts a device grant user_code request
         * @summary Accepts a device grant user_code request
         * @param {string} deviceChallenge 
         * @param {AcceptDeviceUserCodeRequest} [acceptDeviceUserCodeRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async acceptUserCodeRequest(deviceChallenge: string, acceptDeviceUserCodeRequest?: AcceptDeviceUserCodeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.acceptUserCodeRequest(deviceChallenge, acceptDeviceUserCodeRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptUserCodeRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
         * @summary Create OAuth 2.0 Client
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createOAuth2Client(oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createOAuth2Client(oAuth2Client, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.createOAuth2Client']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete an existing OAuth 2.0 Client by its ID.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.  Make sure that this endpoint is well protected and only callable by first-party components.
         * @summary Delete OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOAuth2Client(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOAuth2Client(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteOAuth2Client']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
         * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
         * @param {string} clientId OAuth 2.0 Client ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOAuth2Token(clientId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOAuth2Token(clientId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteOAuth2Token']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.  Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
         * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {string} id The id of the desired grant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTrustedOAuth2JwtGrantIssuer(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteTrustedOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Get an OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOAuth2Client(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2Client(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2Client']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Get OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOAuth2ConsentRequest(consentChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2ConsentRequest>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2ConsentRequest(consentChallenge, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
         * @summary Get OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOAuth2LoginRequest(loginChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2LoginRequest>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LoginRequest(loginChallenge, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to fetch an Ory OAuth 2.0 logout request.
         * @summary Get OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2LogoutRequest>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LogoutRequest(logoutChallenge, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
         * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {string} id The id of the desired grant
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getTrustedOAuth2JwtGrantIssuer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TrustedOAuth2JwtGrantIssuer>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getTrustedOAuth2JwtGrantIssuer(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getTrustedOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow.
         * @summary Introspect OAuth2 Access and Refresh Tokens
         * @param {string} token The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
         * @param {string} [scope] An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async introspectOAuth2Token(token: string, scope?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IntrospectedOAuth2Token>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.introspectOAuth2Token(token, scope, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.introspectOAuth2Token']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.
         * @summary List OAuth 2.0 Clients
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [clientName] The name of the clients to filter by.
         * @param {string} [owner] The owner of the clients to filter by.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OAuth2Client>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2Clients(pageSize, pageToken, clientName, owner, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listOAuth2Clients']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.
         * @summary List OAuth 2.0 Consent Sessions of a Subject
         * @param {string} subject The subject to list the consent sessions for.
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [loginSessionId] The login session id to list the consent sessions for.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, loginSessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OAuth2ConsentSession>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2ConsentSessions(subject, pageSize, pageToken, loginSessionId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listOAuth2ConsentSessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
         * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [issuer] If optional \&quot;issuer\&quot; is supplied, only jwt-bearer grants with this issuer will be returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listTrustedOAuth2JwtGrantIssuers(pageSize?: number, pageToken?: string, issuer?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TrustedOAuth2JwtGrantIssuer>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listTrustedOAuth2JwtGrantIssuers(pageSize, pageToken, issuer, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listTrustedOAuth2JwtGrantIssuers']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary OAuth 2.0 Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async oAuth2Authorize(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ErrorOAuth2>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.oAuth2Authorize(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.oAuth2Authorize']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exist.  To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc8628
         * @summary The OAuth 2.0 Device Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async oAuth2DeviceFlow(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceAuthorization>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.oAuth2DeviceFlow(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.oAuth2DeviceFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary The OAuth 2.0 Token Endpoint
         * @param {string} grantType 
         * @param {string} [clientId] 
         * @param {string} [code] 
         * @param {string} [redirectUri] 
         * @param {string} [refreshToken] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2TokenExchange>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.oauth2TokenExchange']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Patch OAuth 2.0 Client
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {Array<JsonPatch>} jsonPatch OAuth 2.0 Client JSON Patch Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchOAuth2Client(id: string, jsonPatch: Array<JsonPatch>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchOAuth2Client(id, jsonPatch, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.patchOAuth2Client']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This is the device user verification endpoint. The user is redirected here when trying to log in using the device flow.
         * @summary OAuth 2.0 Device Verification Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async performOAuth2DeviceVerificationFlow(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ErrorOAuth2>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.performOAuth2DeviceVerificationFlow(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.performOAuth2DeviceVerificationFlow']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Reject OAuth 2.0 Consent Request
         * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge
         * @param {RejectOAuth2Request} [rejectOAuth2Request] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Reject OAuth 2.0 Login Request
         * @param {string} loginChallenge OAuth 2.0 Login Request Challenge
         * @param {RejectOAuth2Request} [rejectOAuth2Request] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2RedirectTo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required.  The response is empty as the logout provider has to chose what action to perform next.
         * @summary Reject OAuth 2.0 Session Logout Request
         * @param {string} logoutChallenge 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async rejectOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LogoutRequest(logoutChallenge, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.
         * @summary Revoke OAuth 2.0 Consent Sessions of a Subject
         * @param {string} [subject] OAuth 2.0 Consent Subject  The subject whose consent sessions should be deleted.
         * @param {string} [client] OAuth 2.0 Client ID  If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.
         * @param {string} [consentRequestId] Consent Request ID  If set, revoke all token chains derived from this particular consent request ID.
         * @param {boolean} [all] Revoke All Consent Sessions  If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async revokeOAuth2ConsentSessions(subject?: string, client?: string, consentRequestId?: string, all?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2ConsentSessions(subject, client, consentRequestId, all, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2ConsentSessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.  If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case.  Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.  When using Ory for the identity provider, the login provider will also invalidate the session cookie.
         * @summary Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
         * @param {string} [subject] OAuth 2.0 Subject  The subject to revoke authentication sessions for.
         * @param {string} [sid] Login Session ID  The login session to revoke.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async revokeOAuth2LoginSessions(subject?: string, sid?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2LoginSessions(subject, sid, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2LoginSessions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
         * @summary Revoke OAuth 2.0 Access or Refresh Token
         * @param {string} token 
         * @param {string} [clientId] 
         * @param {string} [clientSecret] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async revokeOAuth2Token(token: string, clientId?: string, clientSecret?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2Token(token, clientId, clientSecret, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2Token']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used.  If set, the secret is echoed in the response. It is not possible to retrieve it later on.  OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth 2.0 Client
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2Client(id, oAuth2Client, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.setOAuth2Client']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.
         * @summary Set OAuth2 Client Token Lifespans
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.setOAuth2ClientLifespans']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
         * @summary Trust OAuth2 JWT Bearer Grant Type Issuer
         * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TrustedOAuth2JwtGrantIssuer>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OAuth2Api.trustOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * OAuth2Api - factory interface
 */
export const OAuth2ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = OAuth2ApiFp(configuration)
    return {
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Accept OAuth 2.0 Consent Request
         * @param {OAuth2ApiAcceptOAuth2ConsentRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2ConsentRequest(requestParameters: OAuth2ApiAcceptOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.acceptOAuth2ConsentRequest(requestParameters.consentChallenge, requestParameters.acceptOAuth2ConsentRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Login Request
         * @param {OAuth2ApiAcceptOAuth2LoginRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2LoginRequest(requestParameters: OAuth2ApiAcceptOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.acceptOAuth2LoginRequest(requestParameters.loginChallenge, requestParameters.acceptOAuth2LoginRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
         * @summary Accept OAuth 2.0 Session Logout Request
         * @param {OAuth2ApiAcceptOAuth2LogoutRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptOAuth2LogoutRequest(requestParameters: OAuth2ApiAcceptOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.acceptOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(axios, basePath));
        },
        /**
         * Accepts a device grant user_code request
         * @summary Accepts a device grant user_code request
         * @param {OAuth2ApiAcceptUserCodeRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        acceptUserCodeRequest(requestParameters: OAuth2ApiAcceptUserCodeRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.acceptUserCodeRequest(requestParameters.deviceChallenge, requestParameters.acceptDeviceUserCodeRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
         * @summary Create OAuth 2.0 Client
         * @param {OAuth2ApiCreateOAuth2ClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOAuth2Client(requestParameters: OAuth2ApiCreateOAuth2ClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.createOAuth2Client(requestParameters.oAuth2Client, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete an existing OAuth 2.0 Client by its ID.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.  Make sure that this endpoint is well protected and only callable by first-party components.
         * @summary Delete OAuth 2.0 Client
         * @param {OAuth2ApiDeleteOAuth2ClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuth2Client(requestParameters: OAuth2ApiDeleteOAuth2ClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOAuth2Client(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
         * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
         * @param {OAuth2ApiDeleteOAuth2TokenRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuth2Token(requestParameters: OAuth2ApiDeleteOAuth2TokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOAuth2Token(requestParameters.clientId, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.  Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
         * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteTrustedOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteTrustedOAuth2JwtGrantIssuer(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Get an OAuth 2.0 Client
         * @param {OAuth2ApiGetOAuth2ClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2Client(requestParameters: OAuth2ApiGetOAuth2ClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.getOAuth2Client(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Get OAuth 2.0 Consent Request
         * @param {OAuth2ApiGetOAuth2ConsentRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2ConsentRequest(requestParameters: OAuth2ApiGetOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2ConsentRequest> {
            return localVarFp.getOAuth2ConsentRequest(requestParameters.consentChallenge, options).then((request) => request(axios, basePath));
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
         * @summary Get OAuth 2.0 Login Request
         * @param {OAuth2ApiGetOAuth2LoginRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2LoginRequest(requestParameters: OAuth2ApiGetOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2LoginRequest> {
            return localVarFp.getOAuth2LoginRequest(requestParameters.loginChallenge, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to fetch an Ory OAuth 2.0 logout request.
         * @summary Get OAuth 2.0 Session Logout Request
         * @param {OAuth2ApiGetOAuth2LogoutRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOAuth2LogoutRequest(requestParameters: OAuth2ApiGetOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2LogoutRequest> {
            return localVarFp.getOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
         * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer
         * @param {OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getTrustedOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest, options?: RawAxiosRequestConfig): AxiosPromise<TrustedOAuth2JwtGrantIssuer> {
            return localVarFp.getTrustedOAuth2JwtGrantIssuer(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow.
         * @summary Introspect OAuth2 Access and Refresh Tokens
         * @param {OAuth2ApiIntrospectOAuth2TokenRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        introspectOAuth2Token(requestParameters: OAuth2ApiIntrospectOAuth2TokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<IntrospectedOAuth2Token> {
            return localVarFp.introspectOAuth2Token(requestParameters.token, requestParameters.scope, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.
         * @summary List OAuth 2.0 Clients
         * @param {OAuth2ApiListOAuth2ClientsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOAuth2Clients(requestParameters: OAuth2ApiListOAuth2ClientsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<OAuth2Client>> {
            return localVarFp.listOAuth2Clients(requestParameters.pageSize, requestParameters.pageToken, requestParameters.clientName, requestParameters.owner, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.
         * @summary List OAuth 2.0 Consent Sessions of a Subject
         * @param {OAuth2ApiListOAuth2ConsentSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOAuth2ConsentSessions(requestParameters: OAuth2ApiListOAuth2ConsentSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<OAuth2ConsentSession>> {
            return localVarFp.listOAuth2ConsentSessions(requestParameters.subject, requestParameters.pageSize, requestParameters.pageToken, requestParameters.loginSessionId, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
         * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers
         * @param {OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listTrustedOAuth2JwtGrantIssuers(requestParameters: OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<TrustedOAuth2JwtGrantIssuer>> {
            return localVarFp.listTrustedOAuth2JwtGrantIssuers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.issuer, options).then((request) => request(axios, basePath));
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary OAuth 2.0 Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oAuth2Authorize(options?: RawAxiosRequestConfig): AxiosPromise<ErrorOAuth2> {
            return localVarFp.oAuth2Authorize(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exist.  To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc8628
         * @summary The OAuth 2.0 Device Authorize Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oAuth2DeviceFlow(options?: RawAxiosRequestConfig): AxiosPromise<DeviceAuthorization> {
            return localVarFp.oAuth2DeviceFlow(options).then((request) => request(axios, basePath));
        },
        /**
         * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
         * @summary The OAuth 2.0 Token Endpoint
         * @param {OAuth2ApiOauth2TokenExchangeRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        oauth2TokenExchange(requestParameters: OAuth2ApiOauth2TokenExchangeRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2TokenExchange> {
            return localVarFp.oauth2TokenExchange(requestParameters.grantType, requestParameters.clientId, requestParameters.code, requestParameters.redirectUri, requestParameters.refreshToken, options).then((request) => request(axios, basePath));
        },
        /**
         * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Patch OAuth 2.0 Client
         * @param {OAuth2ApiPatchOAuth2ClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchOAuth2Client(requestParameters: OAuth2ApiPatchOAuth2ClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.patchOAuth2Client(requestParameters.id, requestParameters.jsonPatch, options).then((request) => request(axios, basePath));
        },
        /**
         * This is the device user verification endpoint. The user is redirected here when trying to log in using the device flow.
         * @summary OAuth 2.0 Device Verification Endpoint
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        performOAuth2DeviceVerificationFlow(options?: RawAxiosRequestConfig): AxiosPromise<ErrorOAuth2> {
            return localVarFp.performOAuth2DeviceVerificationFlow(options).then((request) => request(axios, basePath));
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
         * @summary Reject OAuth 2.0 Consent Request
         * @param {OAuth2ApiRejectOAuth2ConsentRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2ConsentRequest(requestParameters: OAuth2ApiRejectOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.rejectOAuth2ConsentRequest(requestParameters.consentChallenge, requestParameters.rejectOAuth2Request, options).then((request) => request(axios, basePath));
        },
        /**
         * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied.  The response contains a redirect URL which the login provider should redirect the user-agent to.
         * @summary Reject OAuth 2.0 Login Request
         * @param {OAuth2ApiRejectOAuth2LoginRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2LoginRequest(requestParameters: OAuth2ApiRejectOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2RedirectTo> {
            return localVarFp.rejectOAuth2LoginRequest(requestParameters.loginChallenge, requestParameters.rejectOAuth2Request, options).then((request) => request(axios, basePath));
        },
        /**
         * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required.  The response is empty as the logout provider has to chose what action to perform next.
         * @summary Reject OAuth 2.0 Session Logout Request
         * @param {OAuth2ApiRejectOAuth2LogoutRequestRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rejectOAuth2LogoutRequest(requestParameters: OAuth2ApiRejectOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.rejectOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.
         * @summary Revoke OAuth 2.0 Consent Sessions of a Subject
         * @param {OAuth2ApiRevokeOAuth2ConsentSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2ConsentSessions(requestParameters: OAuth2ApiRevokeOAuth2ConsentSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.revokeOAuth2ConsentSessions(requestParameters.subject, requestParameters.client, requestParameters.consentRequestId, requestParameters.all, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.  If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case.  Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.  When using Ory for the identity provider, the login provider will also invalidate the session cookie.
         * @summary Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
         * @param {OAuth2ApiRevokeOAuth2LoginSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2LoginSessions(requestParameters: OAuth2ApiRevokeOAuth2LoginSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.revokeOAuth2LoginSessions(requestParameters.subject, requestParameters.sid, options).then((request) => request(axios, basePath));
        },
        /**
         * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
         * @summary Revoke OAuth 2.0 Access or Refresh Token
         * @param {OAuth2ApiRevokeOAuth2TokenRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOAuth2Token(requestParameters: OAuth2ApiRevokeOAuth2TokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.revokeOAuth2Token(requestParameters.token, requestParameters.clientId, requestParameters.clientSecret, options).then((request) => request(axios, basePath));
        },
        /**
         * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used.  If set, the secret is echoed in the response. It is not possible to retrieve it later on.  OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth 2.0 Client
         * @param {OAuth2ApiSetOAuth2ClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOAuth2Client(requestParameters: OAuth2ApiSetOAuth2ClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.setOAuth2Client(requestParameters.id, requestParameters.oAuth2Client, options).then((request) => request(axios, basePath));
        },
        /**
         * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.
         * @summary Set OAuth2 Client Token Lifespans
         * @param {OAuth2ApiSetOAuth2ClientLifespansRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOAuth2ClientLifespans(requestParameters: OAuth2ApiSetOAuth2ClientLifespansRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.setOAuth2ClientLifespans(requestParameters.id, requestParameters.oAuth2ClientTokenLifespans, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
         * @summary Trust OAuth2 JWT Bearer Grant Type Issuer
         * @param {OAuth2ApiTrustOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        trustOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiTrustOAuth2JwtGrantIssuerRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<TrustedOAuth2JwtGrantIssuer> {
            return localVarFp.trustOAuth2JwtGrantIssuer(requestParameters.trustOAuth2JwtGrantIssuer, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for acceptOAuth2ConsentRequest operation in OAuth2Api.
 */
export interface OAuth2ApiAcceptOAuth2ConsentRequestRequest {
    /**
     * OAuth 2.0 Consent Request Challenge
     */
    readonly consentChallenge: string

    readonly acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest
}

/**
 * Request parameters for acceptOAuth2LoginRequest operation in OAuth2Api.
 */
export interface OAuth2ApiAcceptOAuth2LoginRequestRequest {
    /**
     * OAuth 2.0 Login Request Challenge
     */
    readonly loginChallenge: string

    readonly acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest
}

/**
 * Request parameters for acceptOAuth2LogoutRequest operation in OAuth2Api.
 */
export interface OAuth2ApiAcceptOAuth2LogoutRequestRequest {
    /**
     * OAuth 2.0 Logout Request Challenge
     */
    readonly logoutChallenge: string
}

/**
 * Request parameters for acceptUserCodeRequest operation in OAuth2Api.
 */
export interface OAuth2ApiAcceptUserCodeRequestRequest {
    readonly deviceChallenge: string

    readonly acceptDeviceUserCodeRequest?: AcceptDeviceUserCodeRequest
}

/**
 * Request parameters for createOAuth2Client operation in OAuth2Api.
 */
export interface OAuth2ApiCreateOAuth2ClientRequest {
    /**
     * OAuth 2.0 Client Request Body
     */
    readonly oAuth2Client: OAuth2Client
}

/**
 * Request parameters for deleteOAuth2Client operation in OAuth2Api.
 */
export interface OAuth2ApiDeleteOAuth2ClientRequest {
    /**
     * The id of the OAuth 2.0 Client.
     */
    readonly id: string
}

/**
 * Request parameters for deleteOAuth2Token operation in OAuth2Api.
 */
export interface OAuth2ApiDeleteOAuth2TokenRequest {
    /**
     * OAuth 2.0 Client ID
     */
    readonly clientId: string
}

/**
 * Request parameters for deleteTrustedOAuth2JwtGrantIssuer operation in OAuth2Api.
 */
export interface OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest {
    /**
     * The id of the desired grant
     */
    readonly id: string
}

/**
 * Request parameters for getOAuth2Client operation in OAuth2Api.
 */
export interface OAuth2ApiGetOAuth2ClientRequest {
    /**
     * The id of the OAuth 2.0 Client.
     */
    readonly id: string
}

/**
 * Request parameters for getOAuth2ConsentRequest operation in OAuth2Api.
 */
export interface OAuth2ApiGetOAuth2ConsentRequestRequest {
    /**
     * OAuth 2.0 Consent Request Challenge
     */
    readonly consentChallenge: string
}

/**
 * Request parameters for getOAuth2LoginRequest operation in OAuth2Api.
 */
export interface OAuth2ApiGetOAuth2LoginRequestRequest {
    /**
     * OAuth 2.0 Login Request Challenge
     */
    readonly loginChallenge: string
}

/**
 * Request parameters for getOAuth2LogoutRequest operation in OAuth2Api.
 */
export interface OAuth2ApiGetOAuth2LogoutRequestRequest {
    readonly logoutChallenge: string
}

/**
 * Request parameters for getTrustedOAuth2JwtGrantIssuer operation in OAuth2Api.
 */
export interface OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest {
    /**
     * The id of the desired grant
     */
    readonly id: string
}

/**
 * Request parameters for introspectOAuth2Token operation in OAuth2Api.
 */
export interface OAuth2ApiIntrospectOAuth2TokenRequest {
    /**
     * The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
     */
    readonly token: string

    /**
     * An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
     */
    readonly scope?: string
}

/**
 * Request parameters for listOAuth2Clients operation in OAuth2Api.
 */
export interface OAuth2ApiListOAuth2ClientsRequest {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * The name of the clients to filter by.
     */
    readonly clientName?: string

    /**
     * The owner of the clients to filter by.
     */
    readonly owner?: string
}

/**
 * Request parameters for listOAuth2ConsentSessions operation in OAuth2Api.
 */
export interface OAuth2ApiListOAuth2ConsentSessionsRequest {
    /**
     * The subject to list the consent sessions for.
     */
    readonly subject: string

    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * The login session id to list the consent sessions for.
     */
    readonly loginSessionId?: string
}

/**
 * Request parameters for listTrustedOAuth2JwtGrantIssuers operation in OAuth2Api.
 */
export interface OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * If optional \&quot;issuer\&quot; is supplied, only jwt-bearer grants with this issuer will be returned.
     */
    readonly issuer?: string
}

/**
 * Request parameters for oauth2TokenExchange operation in OAuth2Api.
 */
export interface OAuth2ApiOauth2TokenExchangeRequest {
    readonly grantType: string

    readonly clientId?: string

    readonly code?: string

    readonly redirectUri?: string

    readonly refreshToken?: string
}

/**
 * Request parameters for patchOAuth2Client operation in OAuth2Api.
 */
export interface OAuth2ApiPatchOAuth2ClientRequest {
    /**
     * The id of the OAuth 2.0 Client.
     */
    readonly id: string

    /**
     * OAuth 2.0 Client JSON Patch Body
     */
    readonly jsonPatch: Array<JsonPatch>
}

/**
 * Request parameters for rejectOAuth2ConsentRequest operation in OAuth2Api.
 */
export interface OAuth2ApiRejectOAuth2ConsentRequestRequest {
    /**
     * OAuth 2.0 Consent Request Challenge
     */
    readonly consentChallenge: string

    readonly rejectOAuth2Request?: RejectOAuth2Request
}

/**
 * Request parameters for rejectOAuth2LoginRequest operation in OAuth2Api.
 */
export interface OAuth2ApiRejectOAuth2LoginRequestRequest {
    /**
     * OAuth 2.0 Login Request Challenge
     */
    readonly loginChallenge: string

    readonly rejectOAuth2Request?: RejectOAuth2Request
}

/**
 * Request parameters for rejectOAuth2LogoutRequest operation in OAuth2Api.
 */
export interface OAuth2ApiRejectOAuth2LogoutRequestRequest {
    readonly logoutChallenge: string
}

/**
 * Request parameters for revokeOAuth2ConsentSessions operation in OAuth2Api.
 */
export interface OAuth2ApiRevokeOAuth2ConsentSessionsRequest {
    /**
     * OAuth 2.0 Consent Subject  The subject whose consent sessions should be deleted.
     */
    readonly subject?: string

    /**
     * OAuth 2.0 Client ID  If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.
     */
    readonly client?: string

    /**
     * Consent Request ID  If set, revoke all token chains derived from this particular consent request ID.
     */
    readonly consentRequestId?: string

    /**
     * Revoke All Consent Sessions  If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.
     */
    readonly all?: boolean
}

/**
 * Request parameters for revokeOAuth2LoginSessions operation in OAuth2Api.
 */
export interface OAuth2ApiRevokeOAuth2LoginSessionsRequest {
    /**
     * OAuth 2.0 Subject  The subject to revoke authentication sessions for.
     */
    readonly subject?: string

    /**
     * Login Session ID  The login session to revoke.
     */
    readonly sid?: string
}

/**
 * Request parameters for revokeOAuth2Token operation in OAuth2Api.
 */
export interface OAuth2ApiRevokeOAuth2TokenRequest {
    readonly token: string

    readonly clientId?: string

    readonly clientSecret?: string
}

/**
 * Request parameters for setOAuth2Client operation in OAuth2Api.
 */
export interface OAuth2ApiSetOAuth2ClientRequest {
    /**
     * OAuth 2.0 Client ID
     */
    readonly id: string

    /**
     * OAuth 2.0 Client Request Body
     */
    readonly oAuth2Client: OAuth2Client
}

/**
 * Request parameters for setOAuth2ClientLifespans operation in OAuth2Api.
 */
export interface OAuth2ApiSetOAuth2ClientLifespansRequest {
    /**
     * OAuth 2.0 Client ID
     */
    readonly id: string

    readonly oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans
}

/**
 * Request parameters for trustOAuth2JwtGrantIssuer operation in OAuth2Api.
 */
export interface OAuth2ApiTrustOAuth2JwtGrantIssuerRequest {
    readonly trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer
}

/**
 * OAuth2Api - object-oriented interface
 */
export class OAuth2Api extends BaseAPI {
    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
     * @summary Accept OAuth 2.0 Consent Request
     * @param {OAuth2ApiAcceptOAuth2ConsentRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public acceptOAuth2ConsentRequest(requestParameters: OAuth2ApiAcceptOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).acceptOAuth2ConsentRequest(requestParameters.consentChallenge, requestParameters.acceptOAuth2ConsentRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie.  The response contains a redirect URL which the login provider should redirect the user-agent to.
     * @summary Accept OAuth 2.0 Login Request
     * @param {OAuth2ApiAcceptOAuth2LoginRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public acceptOAuth2LoginRequest(requestParameters: OAuth2ApiAcceptOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).acceptOAuth2LoginRequest(requestParameters.loginChallenge, requestParameters.acceptOAuth2LoginRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
     * @summary Accept OAuth 2.0 Session Logout Request
     * @param {OAuth2ApiAcceptOAuth2LogoutRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public acceptOAuth2LogoutRequest(requestParameters: OAuth2ApiAcceptOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).acceptOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Accepts a device grant user_code request
     * @summary Accepts a device grant user_code request
     * @param {OAuth2ApiAcceptUserCodeRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public acceptUserCodeRequest(requestParameters: OAuth2ApiAcceptUserCodeRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).acceptUserCodeRequest(requestParameters.deviceChallenge, requestParameters.acceptDeviceUserCodeRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
     * @summary Create OAuth 2.0 Client
     * @param {OAuth2ApiCreateOAuth2ClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createOAuth2Client(requestParameters: OAuth2ApiCreateOAuth2ClientRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).createOAuth2Client(requestParameters.oAuth2Client, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete an existing OAuth 2.0 Client by its ID.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.  Make sure that this endpoint is well protected and only callable by first-party components.
     * @summary Delete OAuth 2.0 Client
     * @param {OAuth2ApiDeleteOAuth2ClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteOAuth2Client(requestParameters: OAuth2ApiDeleteOAuth2ClientRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).deleteOAuth2Client(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
     * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
     * @param {OAuth2ApiDeleteOAuth2TokenRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteOAuth2Token(requestParameters: OAuth2ApiDeleteOAuth2TokenRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).deleteOAuth2Token(requestParameters.clientId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.  Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
     * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
     * @param {OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteTrustedOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).deleteTrustedOAuth2JwtGrantIssuer(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
     * @summary Get an OAuth 2.0 Client
     * @param {OAuth2ApiGetOAuth2ClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOAuth2Client(requestParameters: OAuth2ApiGetOAuth2ClientRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).getOAuth2Client(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
     * @summary Get OAuth 2.0 Consent Request
     * @param {OAuth2ApiGetOAuth2ConsentRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOAuth2ConsentRequest(requestParameters: OAuth2ApiGetOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).getOAuth2ConsentRequest(requestParameters.consentChallenge, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
     * @summary Get OAuth 2.0 Login Request
     * @param {OAuth2ApiGetOAuth2LoginRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOAuth2LoginRequest(requestParameters: OAuth2ApiGetOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).getOAuth2LoginRequest(requestParameters.loginChallenge, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to fetch an Ory OAuth 2.0 logout request.
     * @summary Get OAuth 2.0 Session Logout Request
     * @param {OAuth2ApiGetOAuth2LogoutRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOAuth2LogoutRequest(requestParameters: OAuth2ApiGetOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).getOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
     * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer
     * @param {OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getTrustedOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).getTrustedOAuth2JwtGrantIssuer(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow.
     * @summary Introspect OAuth2 Access and Refresh Tokens
     * @param {OAuth2ApiIntrospectOAuth2TokenRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public introspectOAuth2Token(requestParameters: OAuth2ApiIntrospectOAuth2TokenRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).introspectOAuth2Token(requestParameters.token, requestParameters.scope, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.
     * @summary List OAuth 2.0 Clients
     * @param {OAuth2ApiListOAuth2ClientsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listOAuth2Clients(requestParameters: OAuth2ApiListOAuth2ClientsRequest = {}, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).listOAuth2Clients(requestParameters.pageSize, requestParameters.pageToken, requestParameters.clientName, requestParameters.owner, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.
     * @summary List OAuth 2.0 Consent Sessions of a Subject
     * @param {OAuth2ApiListOAuth2ConsentSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listOAuth2ConsentSessions(requestParameters: OAuth2ApiListOAuth2ConsentSessionsRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).listOAuth2ConsentSessions(requestParameters.subject, requestParameters.pageSize, requestParameters.pageToken, requestParameters.loginSessionId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
     * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers
     * @param {OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listTrustedOAuth2JwtGrantIssuers(requestParameters: OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest = {}, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).listTrustedOAuth2JwtGrantIssuers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.issuer, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
     * @summary OAuth 2.0 Authorize Endpoint
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public oAuth2Authorize(options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).oAuth2Authorize(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exist.  To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc8628
     * @summary The OAuth 2.0 Device Authorize Endpoint
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public oAuth2DeviceFlow(options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).oAuth2DeviceFlow(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/  This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.
     * @summary The OAuth 2.0 Token Endpoint
     * @param {OAuth2ApiOauth2TokenExchangeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public oauth2TokenExchange(requestParameters: OAuth2ApiOauth2TokenExchangeRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).oauth2TokenExchange(requestParameters.grantType, requestParameters.clientId, requestParameters.code, requestParameters.redirectUri, requestParameters.refreshToken, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
     * @summary Patch OAuth 2.0 Client
     * @param {OAuth2ApiPatchOAuth2ClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public patchOAuth2Client(requestParameters: OAuth2ApiPatchOAuth2ClientRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).patchOAuth2Client(requestParameters.id, requestParameters.jsonPatch, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This is the device user verification endpoint. The user is redirected here when trying to log in using the device flow.
     * @summary OAuth 2.0 Device Verification Endpoint
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public performOAuth2DeviceVerificationFlow(options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).performOAuth2DeviceVerificationFlow(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf.  The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.  This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.  The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.
     * @summary Reject OAuth 2.0 Consent Request
     * @param {OAuth2ApiRejectOAuth2ConsentRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public rejectOAuth2ConsentRequest(requestParameters: OAuth2ApiRejectOAuth2ConsentRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).rejectOAuth2ConsentRequest(requestParameters.consentChallenge, requestParameters.rejectOAuth2Request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it.  The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied.  The response contains a redirect URL which the login provider should redirect the user-agent to.
     * @summary Reject OAuth 2.0 Login Request
     * @param {OAuth2ApiRejectOAuth2LoginRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public rejectOAuth2LoginRequest(requestParameters: OAuth2ApiRejectOAuth2LoginRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).rejectOAuth2LoginRequest(requestParameters.loginChallenge, requestParameters.rejectOAuth2Request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required.  The response is empty as the logout provider has to chose what action to perform next.
     * @summary Reject OAuth 2.0 Session Logout Request
     * @param {OAuth2ApiRejectOAuth2LogoutRequestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public rejectOAuth2LogoutRequest(requestParameters: OAuth2ApiRejectOAuth2LogoutRequestRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).rejectOAuth2LogoutRequest(requestParameters.logoutChallenge, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.
     * @summary Revoke OAuth 2.0 Consent Sessions of a Subject
     * @param {OAuth2ApiRevokeOAuth2ConsentSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public revokeOAuth2ConsentSessions(requestParameters: OAuth2ApiRevokeOAuth2ConsentSessionsRequest = {}, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).revokeOAuth2ConsentSessions(requestParameters.subject, requestParameters.client, requestParameters.consentRequestId, requestParameters.all, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.  If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case.  Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.  When using Ory for the identity provider, the login provider will also invalidate the session cookie.
     * @summary Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
     * @param {OAuth2ApiRevokeOAuth2LoginSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public revokeOAuth2LoginSessions(requestParameters: OAuth2ApiRevokeOAuth2LoginSessionsRequest = {}, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).revokeOAuth2LoginSessions(requestParameters.subject, requestParameters.sid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
     * @summary Revoke OAuth 2.0 Access or Refresh Token
     * @param {OAuth2ApiRevokeOAuth2TokenRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public revokeOAuth2Token(requestParameters: OAuth2ApiRevokeOAuth2TokenRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).revokeOAuth2Token(requestParameters.token, requestParameters.clientId, requestParameters.clientSecret, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used.  If set, the secret is echoed in the response. It is not possible to retrieve it later on.  OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
     * @summary Set OAuth 2.0 Client
     * @param {OAuth2ApiSetOAuth2ClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setOAuth2Client(requestParameters: OAuth2ApiSetOAuth2ClientRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).setOAuth2Client(requestParameters.id, requestParameters.oAuth2Client, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.
     * @summary Set OAuth2 Client Token Lifespans
     * @param {OAuth2ApiSetOAuth2ClientLifespansRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setOAuth2ClientLifespans(requestParameters: OAuth2ApiSetOAuth2ClientLifespansRequest, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).setOAuth2ClientLifespans(requestParameters.id, requestParameters.oAuth2ClientTokenLifespans, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
     * @summary Trust OAuth2 JWT Bearer Grant Type Issuer
     * @param {OAuth2ApiTrustOAuth2JwtGrantIssuerRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public trustOAuth2JwtGrantIssuer(requestParameters: OAuth2ApiTrustOAuth2JwtGrantIssuerRequest = {}, options?: RawAxiosRequestConfig) {
        return OAuth2ApiFp(this.configuration).trustOAuth2JwtGrantIssuer(requestParameters.trustOAuth2JwtGrantIssuer, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * OidcApi - axios parameter creator
 */
export const OidcApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`.  The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
         * @summary Register OAuth2 Client using OpenID Dynamic Client Registration
         * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOidcDynamicClient: async (oAuth2Client: OAuth2Client, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'oAuth2Client' is not null or undefined
            assertParamExists('createOidcDynamicClient', 'oAuth2Client', oAuth2Client)
            const localVarPath = `/oauth2/register`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair.  More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html.
         * @summary Issues a Verifiable Credential
         * @param {CreateVerifiableCredentialRequestBody} [createVerifiableCredentialRequestBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createVerifiableCredential: async (createVerifiableCredentialRequestBody?: CreateVerifiableCredentialRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/credentials`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createVerifiableCredentialRequestBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOidcDynamicClient: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteOidcDynamicClient', 'id', id)
            const localVarPath = `/oauth2/register/{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;

            // authentication bearer required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
         * @summary OpenID Connect Discovery
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        discoverOidcConfiguration: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/.well-known/openid-configuration`;
            // 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 behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.
         * @summary Get OAuth2 Client using OpenID Dynamic Client Registration
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOidcDynamicClient: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getOidcDynamicClient', 'id', id)
            const localVarPath = `/oauth2/register/{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 bearer required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            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 payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request.  In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
         * @summary OpenID Connect Userinfo
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOidcUserInfo: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/userinfo`;
            // 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 oauth2 required
            // oauth required
            await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration)


    
            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 and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:  https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html  Back-channel logout is performed asynchronously and does not affect logout flow.
         * @summary OpenID Connect Front- and Back-channel Enabled Logout
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOidcSession: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/oauth2/sessions/logout`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol.  This feature is disabled per default. It can be enabled by a system administrator.  If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth2 Client using OpenID Dynamic Client Registration
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOidcDynamicClient: async (id: string, oAuth2Client: OAuth2Client, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('setOidcDynamicClient', 'id', id)
            // verify required parameter 'oAuth2Client' is not null or undefined
            assertParamExists('setOidcDynamicClient', 'oAuth2Client', oAuth2Client)
            const localVarPath = `/oauth2/register/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication bearer required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * OidcApi - functional programming interface
 */
export const OidcApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = OidcApiAxiosParamCreator(configuration)
    return {
        /**
         * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`.  The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
         * @summary Register OAuth2 Client using OpenID Dynamic Client Registration
         * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createOidcDynamicClient(oAuth2Client, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.createOidcDynamicClient']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair.  More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html.
         * @summary Issues a Verifiable Credential
         * @param {CreateVerifiableCredentialRequestBody} [createVerifiableCredentialRequestBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createVerifiableCredential(createVerifiableCredentialRequestBody?: CreateVerifiableCredentialRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifiableCredentialResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createVerifiableCredential(createVerifiableCredentialRequestBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.createVerifiableCredential']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOidcDynamicClient(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOidcDynamicClient(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.deleteOidcDynamicClient']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
         * @summary OpenID Connect Discovery
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async discoverOidcConfiguration(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OidcConfiguration>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.discoverOidcConfiguration(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.discoverOidcConfiguration']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.
         * @summary Get OAuth2 Client using OpenID Dynamic Client Registration
         * @param {string} id The id of the OAuth 2.0 Client.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOidcDynamicClient(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcDynamicClient(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.getOidcDynamicClient']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request.  In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
         * @summary OpenID Connect Userinfo
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOidcUserInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OidcUserInfo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcUserInfo(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.getOidcUserInfo']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:  https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html  Back-channel logout is performed asynchronously and does not affect logout flow.
         * @summary OpenID Connect Front- and Back-channel Enabled Logout
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async revokeOidcSession(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOidcSession(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.revokeOidcSession']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol.  This feature is disabled per default. It can be enabled by a system administrator.  If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth2 Client using OpenID Dynamic Client Registration
         * @param {string} id OAuth 2.0 Client ID
         * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuth2Client>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setOidcDynamicClient(id, oAuth2Client, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OidcApi.setOidcDynamicClient']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * OidcApi - factory interface
 */
export const OidcApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = OidcApiFp(configuration)
    return {
        /**
         * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`.  The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
         * @summary Register OAuth2 Client using OpenID Dynamic Client Registration
         * @param {OidcApiCreateOidcDynamicClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOidcDynamicClient(requestParameters: OidcApiCreateOidcDynamicClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.createOidcDynamicClient(requestParameters.oAuth2Client, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair.  More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html.
         * @summary Issues a Verifiable Credential
         * @param {OidcApiCreateVerifiableCredentialRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createVerifiableCredential(requestParameters: OidcApiCreateVerifiableCredentialRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<VerifiableCredentialResponse> {
            return localVarFp.createVerifiableCredential(requestParameters.createVerifiableCredentialRequestBody, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
         * @param {OidcApiDeleteOidcDynamicClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOidcDynamicClient(requestParameters: OidcApiDeleteOidcDynamicClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOidcDynamicClient(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
         * @summary OpenID Connect Discovery
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        discoverOidcConfiguration(options?: RawAxiosRequestConfig): AxiosPromise<OidcConfiguration> {
            return localVarFp.discoverOidcConfiguration(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.
         * @summary Get OAuth2 Client using OpenID Dynamic Client Registration
         * @param {OidcApiGetOidcDynamicClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOidcDynamicClient(requestParameters: OidcApiGetOidcDynamicClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.getOidcDynamicClient(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request.  In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
         * @summary OpenID Connect Userinfo
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOidcUserInfo(options?: RawAxiosRequestConfig): AxiosPromise<OidcUserInfo> {
            return localVarFp.getOidcUserInfo(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:  https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html  Back-channel logout is performed asynchronously and does not affect logout flow.
         * @summary OpenID Connect Front- and Back-channel Enabled Logout
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        revokeOidcSession(options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.revokeOidcSession(options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol.  This feature is disabled per default. It can be enabled by a system administrator.  If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
         * @summary Set OAuth2 Client using OpenID Dynamic Client Registration
         * @param {OidcApiSetOidcDynamicClientRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setOidcDynamicClient(requestParameters: OidcApiSetOidcDynamicClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<OAuth2Client> {
            return localVarFp.setOidcDynamicClient(requestParameters.id, requestParameters.oAuth2Client, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createOidcDynamicClient operation in OidcApi.
 */
export interface OidcApiCreateOidcDynamicClientRequest {
    /**
     * Dynamic Client Registration Request Body
     */
    readonly oAuth2Client: OAuth2Client
}

/**
 * Request parameters for createVerifiableCredential operation in OidcApi.
 */
export interface OidcApiCreateVerifiableCredentialRequest {
    readonly createVerifiableCredentialRequestBody?: CreateVerifiableCredentialRequestBody
}

/**
 * Request parameters for deleteOidcDynamicClient operation in OidcApi.
 */
export interface OidcApiDeleteOidcDynamicClientRequest {
    /**
     * The id of the OAuth 2.0 Client.
     */
    readonly id: string
}

/**
 * Request parameters for getOidcDynamicClient operation in OidcApi.
 */
export interface OidcApiGetOidcDynamicClientRequest {
    /**
     * The id of the OAuth 2.0 Client.
     */
    readonly id: string
}

/**
 * Request parameters for setOidcDynamicClient operation in OidcApi.
 */
export interface OidcApiSetOidcDynamicClientRequest {
    /**
     * OAuth 2.0 Client ID
     */
    readonly id: string

    /**
     * OAuth 2.0 Client Request Body
     */
    readonly oAuth2Client: OAuth2Client
}

/**
 * OidcApi - object-oriented interface
 */
export class OidcApi extends BaseAPI {
    /**
     * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`.  The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
     * @summary Register OAuth2 Client using OpenID Dynamic Client Registration
     * @param {OidcApiCreateOidcDynamicClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createOidcDynamicClient(requestParameters: OidcApiCreateOidcDynamicClientRequest, options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).createOidcDynamicClient(requestParameters.oAuth2Client, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair.  More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html.
     * @summary Issues a Verifiable Credential
     * @param {OidcApiCreateVerifiableCredentialRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createVerifiableCredential(requestParameters: OidcApiCreateVerifiableCredentialRequest = {}, options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).createVerifiableCredential(requestParameters.createVerifiableCredentialRequestBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
     * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
     * @param {OidcApiDeleteOidcDynamicClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteOidcDynamicClient(requestParameters: OidcApiDeleteOidcDynamicClientRequest, options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).deleteOidcDynamicClient(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
     * @summary OpenID Connect Discovery
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public discoverOidcConfiguration(options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).discoverOidcConfiguration(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.
     * @summary Get OAuth2 Client using OpenID Dynamic Client Registration
     * @param {OidcApiGetOidcDynamicClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOidcDynamicClient(requestParameters: OidcApiGetOidcDynamicClientRequest, options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).getOidcDynamicClient(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request.  In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
     * @summary OpenID Connect Userinfo
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOidcUserInfo(options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).getOidcUserInfo(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:  https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html  Back-channel logout is performed asynchronously and does not affect logout flow.
     * @summary OpenID Connect Front- and Back-channel Enabled Logout
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public revokeOidcSession(options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).revokeOidcSession(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol.  This feature is disabled per default. It can be enabled by a system administrator.  If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on.  To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
     * @summary Set OAuth2 Client using OpenID Dynamic Client Registration
     * @param {OidcApiSetOidcDynamicClientRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setOidcDynamicClient(requestParameters: OidcApiSetOidcDynamicClientRequest, options?: RawAxiosRequestConfig) {
        return OidcApiFp(this.configuration).setOidcDynamicClient(requestParameters.id, requestParameters.oAuth2Client, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * PermissionApi - axios parameter creator
 */
export const PermissionApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Batch check permissions
         * @param {number} [maxDepth] 
         * @param {BatchCheckPermissionBody} [batchCheckPermissionBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchCheckPermission: async (maxDepth?: number, batchCheckPermissionBody?: BatchCheckPermissionBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples/batch/check`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(batchCheckPermissionBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkPermission: async (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples/check/openapi`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (namespace !== undefined) {
                localVarQueryParameter['namespace'] = namespace;
            }

            if (object !== undefined) {
                localVarQueryParameter['object'] = object;
            }

            if (relation !== undefined) {
                localVarQueryParameter['relation'] = relation;
            }

            if (subjectId !== undefined) {
                localVarQueryParameter['subject_id'] = subjectId;
            }

            if (subjectSetNamespace !== undefined) {
                localVarQueryParameter['subject_set.namespace'] = subjectSetNamespace;
            }

            if (subjectSetObject !== undefined) {
                localVarQueryParameter['subject_set.object'] = subjectSetObject;
            }

            if (subjectSetRelation !== undefined) {
                localVarQueryParameter['subject_set.relation'] = subjectSetRelation;
            }

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkPermissionOrError: async (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples/check`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (namespace !== undefined) {
                localVarQueryParameter['namespace'] = namespace;
            }

            if (object !== undefined) {
                localVarQueryParameter['object'] = object;
            }

            if (relation !== undefined) {
                localVarQueryParameter['relation'] = relation;
            }

            if (subjectId !== undefined) {
                localVarQueryParameter['subject_id'] = subjectId;
            }

            if (subjectSetNamespace !== undefined) {
                localVarQueryParameter['subject_set.namespace'] = subjectSetNamespace;
            }

            if (subjectSetObject !== undefined) {
                localVarQueryParameter['subject_set.object'] = subjectSetObject;
            }

            if (subjectSetRelation !== undefined) {
                localVarQueryParameter['subject_set.relation'] = subjectSetRelation;
            }

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to expand a relationship tuple into permissions.
         * @summary Expand a Relationship into permissions.
         * @param {string} namespace Namespace of the Subject Set
         * @param {string} object Object of the Subject Set
         * @param {string} relation Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        expandPermissions: async (namespace: string, object: string, relation: string, maxDepth?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'namespace' is not null or undefined
            assertParamExists('expandPermissions', 'namespace', namespace)
            // verify required parameter 'object' is not null or undefined
            assertParamExists('expandPermissions', 'object', object)
            // verify required parameter 'relation' is not null or undefined
            assertParamExists('expandPermissions', 'relation', relation)
            const localVarPath = `/relation-tuples/expand`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (namespace !== undefined) {
                localVarQueryParameter['namespace'] = namespace;
            }

            if (object !== undefined) {
                localVarQueryParameter['object'] = object;
            }

            if (relation !== undefined) {
                localVarQueryParameter['relation'] = relation;
            }

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {number} [maxDepth] 
         * @param {PostCheckPermissionBody} [postCheckPermissionBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        postCheckPermission: async (maxDepth?: number, postCheckPermissionBody?: PostCheckPermissionBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples/check/openapi`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(postCheckPermissionBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {number} [maxDepth] 
         * @param {PostCheckPermissionOrErrorBody} [postCheckPermissionOrErrorBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        postCheckPermissionOrError: async (maxDepth?: number, postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples/check`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (maxDepth !== undefined) {
                localVarQueryParameter['max-depth'] = maxDepth;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(postCheckPermissionOrErrorBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * PermissionApi - functional programming interface
 */
export const PermissionApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = PermissionApiAxiosParamCreator(configuration)
    return {
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Batch check permissions
         * @param {number} [maxDepth] 
         * @param {BatchCheckPermissionBody} [batchCheckPermissionBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async batchCheckPermission(maxDepth?: number, batchCheckPermissionBody?: BatchCheckPermissionBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchCheckPermissionResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.batchCheckPermission(maxDepth, batchCheckPermissionBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.batchCheckPermission']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async checkPermission(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckPermissionResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.checkPermission(namespace, object, relation, subjectId, subjectSetNamespace, subjectSetObject, subjectSetRelation, maxDepth, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.checkPermission']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async checkPermissionOrError(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckPermissionResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.checkPermissionOrError(namespace, object, relation, subjectId, subjectSetNamespace, subjectSetObject, subjectSetRelation, maxDepth, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.checkPermissionOrError']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to expand a relationship tuple into permissions.
         * @summary Expand a Relationship into permissions.
         * @param {string} namespace Namespace of the Subject Set
         * @param {string} object Object of the Subject Set
         * @param {string} relation Relation of the Subject Set
         * @param {number} [maxDepth] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async expandPermissions(namespace: string, object: string, relation: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExpandedPermissionTree>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.expandPermissions(namespace, object, relation, maxDepth, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.expandPermissions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {number} [maxDepth] 
         * @param {PostCheckPermissionBody} [postCheckPermissionBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async postCheckPermission(maxDepth?: number, postCheckPermissionBody?: PostCheckPermissionBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckPermissionResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.postCheckPermission(maxDepth, postCheckPermissionBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.postCheckPermission']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {number} [maxDepth] 
         * @param {PostCheckPermissionOrErrorBody} [postCheckPermissionOrErrorBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async postCheckPermissionOrError(maxDepth?: number, postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckPermissionResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.postCheckPermissionOrError(maxDepth, postCheckPermissionOrErrorBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['PermissionApi.postCheckPermissionOrError']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * PermissionApi - factory interface
 */
export const PermissionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = PermissionApiFp(configuration)
    return {
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Batch check permissions
         * @param {PermissionApiBatchCheckPermissionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchCheckPermission(requestParameters: PermissionApiBatchCheckPermissionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<BatchCheckPermissionResult> {
            return localVarFp.batchCheckPermission(requestParameters.maxDepth, requestParameters.batchCheckPermissionBody, options).then((request) => request(axios, basePath));
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {PermissionApiCheckPermissionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkPermission(requestParameters: PermissionApiCheckPermissionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CheckPermissionResult> {
            return localVarFp.checkPermission(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, requestParameters.maxDepth, options).then((request) => request(axios, basePath));
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {PermissionApiCheckPermissionOrErrorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkPermissionOrError(requestParameters: PermissionApiCheckPermissionOrErrorRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CheckPermissionResult> {
            return localVarFp.checkPermissionOrError(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, requestParameters.maxDepth, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to expand a relationship tuple into permissions.
         * @summary Expand a Relationship into permissions.
         * @param {PermissionApiExpandPermissionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        expandPermissions(requestParameters: PermissionApiExpandPermissionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExpandedPermissionTree> {
            return localVarFp.expandPermissions(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.maxDepth, options).then((request) => request(axios, basePath));
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {PermissionApiPostCheckPermissionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        postCheckPermission(requestParameters: PermissionApiPostCheckPermissionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CheckPermissionResult> {
            return localVarFp.postCheckPermission(requestParameters.maxDepth, requestParameters.postCheckPermissionBody, options).then((request) => request(axios, basePath));
        },
        /**
         * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
         * @summary Check a permission
         * @param {PermissionApiPostCheckPermissionOrErrorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        postCheckPermissionOrError(requestParameters: PermissionApiPostCheckPermissionOrErrorRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CheckPermissionResult> {
            return localVarFp.postCheckPermissionOrError(requestParameters.maxDepth, requestParameters.postCheckPermissionOrErrorBody, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for batchCheckPermission operation in PermissionApi.
 */
export interface PermissionApiBatchCheckPermissionRequest {
    readonly maxDepth?: number

    readonly batchCheckPermissionBody?: BatchCheckPermissionBody
}

/**
 * Request parameters for checkPermission operation in PermissionApi.
 */
export interface PermissionApiCheckPermissionRequest {
    /**
     * Namespace of the Relationship
     */
    readonly namespace?: string

    /**
     * Object of the Relationship
     */
    readonly object?: string

    /**
     * Relation of the Relationship
     */
    readonly relation?: string

    /**
     * SubjectID of the Relationship
     */
    readonly subjectId?: string

    /**
     * Namespace of the Subject Set
     */
    readonly subjectSetNamespace?: string

    /**
     * Object of the Subject Set
     */
    readonly subjectSetObject?: string

    /**
     * Relation of the Subject Set
     */
    readonly subjectSetRelation?: string

    readonly maxDepth?: number
}

/**
 * Request parameters for checkPermissionOrError operation in PermissionApi.
 */
export interface PermissionApiCheckPermissionOrErrorRequest {
    /**
     * Namespace of the Relationship
     */
    readonly namespace?: string

    /**
     * Object of the Relationship
     */
    readonly object?: string

    /**
     * Relation of the Relationship
     */
    readonly relation?: string

    /**
     * SubjectID of the Relationship
     */
    readonly subjectId?: string

    /**
     * Namespace of the Subject Set
     */
    readonly subjectSetNamespace?: string

    /**
     * Object of the Subject Set
     */
    readonly subjectSetObject?: string

    /**
     * Relation of the Subject Set
     */
    readonly subjectSetRelation?: string

    readonly maxDepth?: number
}

/**
 * Request parameters for expandPermissions operation in PermissionApi.
 */
export interface PermissionApiExpandPermissionsRequest {
    /**
     * Namespace of the Subject Set
     */
    readonly namespace: string

    /**
     * Object of the Subject Set
     */
    readonly object: string

    /**
     * Relation of the Subject Set
     */
    readonly relation: string

    readonly maxDepth?: number
}

/**
 * Request parameters for postCheckPermission operation in PermissionApi.
 */
export interface PermissionApiPostCheckPermissionRequest {
    readonly maxDepth?: number

    readonly postCheckPermissionBody?: PostCheckPermissionBody
}

/**
 * Request parameters for postCheckPermissionOrError operation in PermissionApi.
 */
export interface PermissionApiPostCheckPermissionOrErrorRequest {
    readonly maxDepth?: number

    readonly postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody
}

/**
 * PermissionApi - object-oriented interface
 */
export class PermissionApi extends BaseAPI {
    /**
     * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
     * @summary Batch check permissions
     * @param {PermissionApiBatchCheckPermissionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public batchCheckPermission(requestParameters: PermissionApiBatchCheckPermissionRequest = {}, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).batchCheckPermission(requestParameters.maxDepth, requestParameters.batchCheckPermissionBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
     * @summary Check a permission
     * @param {PermissionApiCheckPermissionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public checkPermission(requestParameters: PermissionApiCheckPermissionRequest = {}, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).checkPermission(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, requestParameters.maxDepth, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
     * @summary Check a permission
     * @param {PermissionApiCheckPermissionOrErrorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public checkPermissionOrError(requestParameters: PermissionApiCheckPermissionOrErrorRequest = {}, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).checkPermissionOrError(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, requestParameters.maxDepth, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to expand a relationship tuple into permissions.
     * @summary Expand a Relationship into permissions.
     * @param {PermissionApiExpandPermissionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public expandPermissions(requestParameters: PermissionApiExpandPermissionsRequest, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).expandPermissions(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.maxDepth, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
     * @summary Check a permission
     * @param {PermissionApiPostCheckPermissionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public postCheckPermission(requestParameters: PermissionApiPostCheckPermissionRequest = {}, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).postCheckPermission(requestParameters.maxDepth, requestParameters.postCheckPermissionBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).
     * @summary Check a permission
     * @param {PermissionApiPostCheckPermissionOrErrorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public postCheckPermissionOrError(requestParameters: PermissionApiPostCheckPermissionOrErrorRequest = {}, options?: RawAxiosRequestConfig) {
        return PermissionApiFp(this.configuration).postCheckPermissionOrError(requestParameters.maxDepth, requestParameters.postCheckPermissionOrErrorBody, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * ProjectApi - axios parameter creator
 */
export const ProjectApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Creates an Enterprise SSO Organization in a project.
         * @summary Create an Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {OrganizationBody} [organizationBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrganization: async (projectId: string, organizationBody?: OrganizationBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('createOrganization', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}/organizations`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(organizationBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create a onboarding portal link for an organization.
         * @summary Create organization onboarding portal link
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {CreateOrganizationOnboardingPortalLinkBody} [createOrganizationOnboardingPortalLinkBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrganizationOnboardingPortalLink: async (projectId: string, organizationId: string, createOrganizationOnboardingPortalLinkBody?: CreateOrganizationOnboardingPortalLinkBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('createOrganizationOnboardingPortalLink', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('createOrganizationOnboardingPortalLink', 'organizationId', organizationId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}/onboarding-portal-links`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createOrganizationOnboardingPortalLinkBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Creates a new project.
         * @summary Create a Project
         * @param {CreateProjectBody} [createProjectBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createProject: async (createProjectBody?: CreateProjectBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/projects`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createProjectBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create an API key for a project.
         * @summary Create project API key
         * @param {string} project The Project ID or Project slug
         * @param {CreateProjectApiKeyRequest} [createProjectApiKeyRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createProjectApiKey: async (project: string, createProjectApiKeyRequest?: CreateProjectApiKeyRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'project' is not null or undefined
            assertParamExists('createProjectApiKey', 'project', project)
            const localVarPath = `/projects/{project}/tokens`
                .replace(`{${"project"}}`, encodeURIComponent(String(project)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createProjectApiKeyRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Irrecoverably deletes an Enterprise SSO Organization in a project by its ID.
         * @summary Delete Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrganization: async (projectId: string, organizationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('deleteOrganization', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('deleteOrganization', 'organizationId', organizationId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deletes a onboarding portal link for an organization.
         * @summary Delete an organization onboarding portal link
         * @param {string} projectId 
         * @param {string} organizationId 
         * @param {string} onboardingPortalLinkId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrganizationOnboardingPortalLink: async (projectId: string, organizationId: string, onboardingPortalLinkId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('deleteOrganizationOnboardingPortalLink', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('deleteOrganizationOnboardingPortalLink', 'organizationId', organizationId)
            // verify required parameter 'onboardingPortalLinkId' is not null or undefined
            assertParamExists('deleteOrganizationOnboardingPortalLink', 'onboardingPortalLinkId', onboardingPortalLinkId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}/onboarding-portal-links/{onboarding_portal_link_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)))
                .replace(`{${"onboarding_portal_link_id"}}`, encodeURIComponent(String(onboardingPortalLinkId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete project API key
         * @param {string} project The Project ID or Project slug
         * @param {string} tokenId The Token ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteProjectApiKey: async (project: string, tokenId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'project' is not null or undefined
            assertParamExists('deleteProjectApiKey', 'project', project)
            // verify required parameter 'tokenId' is not null or undefined
            assertParamExists('deleteProjectApiKey', 'tokenId', tokenId)
            const localVarPath = `/projects/{project}/tokens/{token_id}`
                .replace(`{${"project"}}`, encodeURIComponent(String(project)))
                .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deprecated: use getProject instead  Retrieves an Enterprise SSO Organization for a project by its ID
         * @summary Get Enterprise SSO Organization by ID
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOrganization: async (projectId: string, organizationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('getOrganization', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('getOrganization', 'organizationId', organizationId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Retrieves the organization onboarding portal links.
         * @summary Get the organization onboarding portal links
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOrganizationOnboardingPortalLinks: async (projectId: string, organizationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('getOrganizationOnboardingPortalLinks', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('getOrganizationOnboardingPortalLinks', 'organizationId', organizationId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}/onboarding-portal-links`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get a project you have access to by its ID.
         * @summary Get a Project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getProject: async (projectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('getProject', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.
         * @summary Get all members associated with this project
         * @param {string} project 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getProjectMembers: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'project' is not null or undefined
            assertParamExists('getProjectMembers', 'project', project)
            const localVarPath = `/projects/{project}/members`
                .replace(`{${"project"}}`, encodeURIComponent(String(project)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deprecated: use getProject instead  Lists all Enterprise SSO organizations in a project.
         * @summary List all Enterprise SSO organizations
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [domain] Domain  If set, only organizations with that domain will be returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrganizations: async (projectId: string, pageSize?: number, pageToken?: string, domain?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('listOrganizations', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}/organizations`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * A list of all the project\'s API keys.
         * @summary List a project\'s API keys
         * @param {string} project The Project ID or Project slug
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listProjectApiKeys: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'project' is not null or undefined
            assertParamExists('listProjectApiKeys', 'project', project)
            const localVarPath = `/projects/{project}/tokens`
                .replace(`{${"project"}}`, encodeURIComponent(String(project)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, 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 projects you have access to.
         * @summary List All Projects
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listProjects: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/projects`;
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for.  This endpoints allows you to patch individual Ory Network project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchProject: async (projectId: string, jsonPatch?: Array<JsonPatch>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('patchProject', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // 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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonPatch, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoints allows you to patch individual Ory Network Project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration based on a revision ID
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} revisionId Revision ID  The revision ID that this patch was generated for.
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchProjectWithRevision: async (projectId: string, revisionId: string, jsonPatch?: Array<JsonPatch>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('patchProjectWithRevision', 'projectId', projectId)
            // verify required parameter 'revisionId' is not null or undefined
            assertParamExists('patchProjectWithRevision', 'revisionId', revisionId)
            const localVarPath = `/projects/{project_id}/revision/{revision_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"revision_id"}}`, encodeURIComponent(String(revisionId)));
            // 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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(jsonPatch, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * !! Use with extreme caution !!  Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data.  Calling this endpoint will additionally delete custom domains and other related data.  If the project is linked to a subscription, the subscription needs to be unlinked first.
         * @summary Irrecoverably purge a project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        purgeProject: async (projectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('purgeProject', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.
         * @summary Remove a member associated with this project
         * @param {string} project 
         * @param {string} member 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        removeProjectMember: async (project: string, member: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'project' is not null or undefined
            assertParamExists('removeProjectMember', 'project', project)
            // verify required parameter 'member' is not null or undefined
            assertParamExists('removeProjectMember', 'member', member)
            const localVarPath = `/projects/{project}/members/{member}`
                .replace(`{${"project"}}`, encodeURIComponent(String(project)))
                .replace(`{${"member"}}`, encodeURIComponent(String(member)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, ...). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.  Be aware that updating any service\'s configuration will completely override your current configuration for that service!
         * @summary Update an Ory Network Project Configuration
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {SetProject} [setProject] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setProject: async (projectId: string, setProject?: SetProject, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('setProject', 'projectId', projectId)
            const localVarPath = `/projects/{project_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(setProject, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Updates an Enterprise SSO Organization in a project by its ID.
         * @summary Update an Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {OrganizationBody} [organizationBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOrganization: async (projectId: string, organizationId: string, organizationBody?: OrganizationBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('updateOrganization', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('updateOrganization', 'organizationId', organizationId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(organizationBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a onboarding portal link for an organization.
         * @summary Update organization onboarding portal link
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {string} onboardingPortalLinkId 
         * @param {UpdateOrganizationOnboardingPortalLinkBody} [updateOrganizationOnboardingPortalLinkBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOrganizationOnboardingPortalLink: async (projectId: string, organizationId: string, onboardingPortalLinkId: string, updateOrganizationOnboardingPortalLinkBody?: UpdateOrganizationOnboardingPortalLinkBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('updateOrganizationOnboardingPortalLink', 'projectId', projectId)
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('updateOrganizationOnboardingPortalLink', 'organizationId', organizationId)
            // verify required parameter 'onboardingPortalLinkId' is not null or undefined
            assertParamExists('updateOrganizationOnboardingPortalLink', 'onboardingPortalLinkId', onboardingPortalLinkId)
            const localVarPath = `/projects/{project_id}/organizations/{organization_id}/onboarding-portal-links/{onboarding_portal_link_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)))
                .replace(`{${"onboarding_portal_link_id"}}`, encodeURIComponent(String(onboardingPortalLinkId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateOrganizationOnboardingPortalLinkBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ProjectApi - functional programming interface
 */
export const ProjectApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ProjectApiAxiosParamCreator(configuration)
    return {
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Creates an Enterprise SSO Organization in a project.
         * @summary Create an Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {OrganizationBody} [organizationBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createOrganization(projectId: string, organizationBody?: OrganizationBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Organization>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createOrganization(projectId, organizationBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.createOrganization']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create a onboarding portal link for an organization.
         * @summary Create organization onboarding portal link
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {CreateOrganizationOnboardingPortalLinkBody} [createOrganizationOnboardingPortalLinkBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createOrganizationOnboardingPortalLink(projectId: string, organizationId: string, createOrganizationOnboardingPortalLinkBody?: CreateOrganizationOnboardingPortalLinkBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnboardingPortalLink>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createOrganizationOnboardingPortalLink(projectId, organizationId, createOrganizationOnboardingPortalLinkBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.createOrganizationOnboardingPortalLink']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Creates a new project.
         * @summary Create a Project
         * @param {CreateProjectBody} [createProjectBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createProject(createProjectBody?: CreateProjectBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Project>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createProject(createProjectBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.createProject']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create an API key for a project.
         * @summary Create project API key
         * @param {string} project The Project ID or Project slug
         * @param {CreateProjectApiKeyRequest} [createProjectApiKeyRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createProjectApiKey(project: string, createProjectApiKeyRequest?: CreateProjectApiKeyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectApiKey>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createProjectApiKey(project, createProjectApiKeyRequest, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.createProjectApiKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Irrecoverably deletes an Enterprise SSO Organization in a project by its ID.
         * @summary Delete Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOrganization(projectId: string, organizationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(projectId, organizationId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.deleteOrganization']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deletes a onboarding portal link for an organization.
         * @summary Delete an organization onboarding portal link
         * @param {string} projectId 
         * @param {string} organizationId 
         * @param {string} onboardingPortalLinkId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOrganizationOnboardingPortalLink(projectId: string, organizationId: string, onboardingPortalLinkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationOnboardingPortalLink(projectId, organizationId, onboardingPortalLinkId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.deleteOrganizationOnboardingPortalLink']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete project API key
         * @param {string} project The Project ID or Project slug
         * @param {string} tokenId The Token ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteProjectApiKey(project: string, tokenId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProjectApiKey(project, tokenId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.deleteProjectApiKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deprecated: use getProject instead  Retrieves an Enterprise SSO Organization for a project by its ID
         * @summary Get Enterprise SSO Organization by ID
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOrganization(projectId: string, organizationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrganizationResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(projectId, organizationId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.getOrganization']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Retrieves the organization onboarding portal links.
         * @summary Get the organization onboarding portal links
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOrganizationOnboardingPortalLinks(projectId: string, organizationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrganizationOnboardingPortalLinksResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationOnboardingPortalLinks(projectId, organizationId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.getOrganizationOnboardingPortalLinks']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get a project you have access to by its ID.
         * @summary Get a Project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getProject(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Project>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getProject(projectId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.getProject']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.
         * @summary Get all members associated with this project
         * @param {string} project 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getProjectMembers(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProjectMember>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectMembers(project, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.getProjectMembers']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deprecated: use getProject instead  Lists all Enterprise SSO organizations in a project.
         * @summary List all Enterprise SSO organizations
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [domain] Domain  If set, only organizations with that domain will be returned.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listOrganizations(projectId: string, pageSize?: number, pageToken?: string, domain?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrganizationsResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations(projectId, pageSize, pageToken, domain, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.listOrganizations']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * A list of all the project\'s API keys.
         * @summary List a project\'s API keys
         * @param {string} project The Project ID or Project slug
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listProjectApiKeys(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProjectApiKey>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listProjectApiKeys(project, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.listProjectApiKeys']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Lists all projects you have access to.
         * @summary List All Projects
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listProjects(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProjectMetadata>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.listProjects']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for.  This endpoints allows you to patch individual Ory Network project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchProject(projectId: string, jsonPatch?: Array<JsonPatch>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulProjectUpdate>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchProject(projectId, jsonPatch, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.patchProject']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoints allows you to patch individual Ory Network Project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration based on a revision ID
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} revisionId Revision ID  The revision ID that this patch was generated for.
         * @param {Array<JsonPatch>} [jsonPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchProjectWithRevision(projectId: string, revisionId: string, jsonPatch?: Array<JsonPatch>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulProjectUpdate>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchProjectWithRevision(projectId, revisionId, jsonPatch, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.patchProjectWithRevision']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * !! Use with extreme caution !!  Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data.  Calling this endpoint will additionally delete custom domains and other related data.  If the project is linked to a subscription, the subscription needs to be unlinked first.
         * @summary Irrecoverably purge a project
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async purgeProject(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.purgeProject(projectId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.purgeProject']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.
         * @summary Remove a member associated with this project
         * @param {string} project 
         * @param {string} member 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async removeProjectMember(project: string, member: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.removeProjectMember(project, member, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.removeProjectMember']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, ...). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.  Be aware that updating any service\'s configuration will completely override your current configuration for that service!
         * @summary Update an Ory Network Project Configuration
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {SetProject} [setProject] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setProject(projectId: string, setProject?: SetProject, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessfulProjectUpdate>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setProject(projectId, setProject, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.setProject']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Updates an Enterprise SSO Organization in a project by its ID.
         * @summary Update an Enterprise SSO Organization
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {OrganizationBody} [organizationBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateOrganization(projectId: string, organizationId: string, organizationBody?: OrganizationBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Organization>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(projectId, organizationId, organizationBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.updateOrganization']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update a onboarding portal link for an organization.
         * @summary Update organization onboarding portal link
         * @param {string} projectId Project ID  The project\&#39;s ID.
         * @param {string} organizationId Organization ID  The Organization\&#39;s ID.
         * @param {string} onboardingPortalLinkId 
         * @param {UpdateOrganizationOnboardingPortalLinkBody} [updateOrganizationOnboardingPortalLinkBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateOrganizationOnboardingPortalLink(projectId: string, organizationId: string, onboardingPortalLinkId: string, updateOrganizationOnboardingPortalLinkBody?: UpdateOrganizationOnboardingPortalLinkBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnboardingPortalLink>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganizationOnboardingPortalLink(projectId, organizationId, onboardingPortalLinkId, updateOrganizationOnboardingPortalLinkBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ProjectApi.updateOrganizationOnboardingPortalLink']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ProjectApi - factory interface
 */
export const ProjectApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ProjectApiFp(configuration)
    return {
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Creates an Enterprise SSO Organization in a project.
         * @summary Create an Enterprise SSO Organization
         * @param {ProjectApiCreateOrganizationRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrganization(requestParameters: ProjectApiCreateOrganizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<Organization> {
            return localVarFp.createOrganization(requestParameters.projectId, requestParameters.organizationBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Create a onboarding portal link for an organization.
         * @summary Create organization onboarding portal link
         * @param {ProjectApiCreateOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrganizationOnboardingPortalLink(requestParameters: ProjectApiCreateOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise<OnboardingPortalLink> {
            return localVarFp.createOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.createOrganizationOnboardingPortalLinkBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Creates a new project.
         * @summary Create a Project
         * @param {ProjectApiCreateProjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createProject(requestParameters: ProjectApiCreateProjectRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Project> {
            return localVarFp.createProject(requestParameters.createProjectBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Create an API key for a project.
         * @summary Create project API key
         * @param {ProjectApiCreateProjectApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createProjectApiKey(requestParameters: ProjectApiCreateProjectApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProjectApiKey> {
            return localVarFp.createProjectApiKey(requestParameters.project, requestParameters.createProjectApiKeyRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Irrecoverably deletes an Enterprise SSO Organization in a project by its ID.
         * @summary Delete Enterprise SSO Organization
         * @param {ProjectApiDeleteOrganizationRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrganization(requestParameters: ProjectApiDeleteOrganizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOrganization(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(axios, basePath));
        },
        /**
         * Deletes a onboarding portal link for an organization.
         * @summary Delete an organization onboarding portal link
         * @param {ProjectApiDeleteOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrganizationOnboardingPortalLink(requestParameters: ProjectApiDeleteOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.onboardingPortalLinkId, options).then((request) => request(axios, basePath));
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete project API key
         * @param {ProjectApiDeleteProjectApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteProjectApiKey(requestParameters: ProjectApiDeleteProjectApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteProjectApiKey(requestParameters.project, requestParameters.tokenId, options).then((request) => request(axios, basePath));
        },
        /**
         * Deprecated: use getProject instead  Retrieves an Enterprise SSO Organization for a project by its ID
         * @summary Get Enterprise SSO Organization by ID
         * @param {ProjectApiGetOrganizationRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOrganization(requestParameters: ProjectApiGetOrganizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetOrganizationResponse> {
            return localVarFp.getOrganization(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(axios, basePath));
        },
        /**
         * Retrieves the organization onboarding portal links.
         * @summary Get the organization onboarding portal links
         * @param {ProjectApiGetOrganizationOnboardingPortalLinksRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOrganizationOnboardingPortalLinks(requestParameters: ProjectApiGetOrganizationOnboardingPortalLinksRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrganizationOnboardingPortalLinksResponse> {
            return localVarFp.getOrganizationOnboardingPortalLinks(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a project you have access to by its ID.
         * @summary Get a Project
         * @param {ProjectApiGetProjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getProject(requestParameters: ProjectApiGetProjectRequest, options?: RawAxiosRequestConfig): AxiosPromise<Project> {
            return localVarFp.getProject(requestParameters.projectId, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.
         * @summary Get all members associated with this project
         * @param {ProjectApiGetProjectMembersRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getProjectMembers(requestParameters: ProjectApiGetProjectMembersRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ProjectMember>> {
            return localVarFp.getProjectMembers(requestParameters.project, options).then((request) => request(axios, basePath));
        },
        /**
         * Deprecated: use getProject instead  Lists all Enterprise SSO organizations in a project.
         * @summary List all Enterprise SSO organizations
         * @param {ProjectApiListOrganizationsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrganizations(requestParameters: ProjectApiListOrganizationsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListOrganizationsResponse> {
            return localVarFp.listOrganizations(requestParameters.projectId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.domain, options).then((request) => request(axios, basePath));
        },
        /**
         * A list of all the project\'s API keys.
         * @summary List a project\'s API keys
         * @param {ProjectApiListProjectApiKeysRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listProjectApiKeys(requestParameters: ProjectApiListProjectApiKeysRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ProjectApiKey>> {
            return localVarFp.listProjectApiKeys(requestParameters.project, options).then((request) => request(axios, basePath));
        },
        /**
         * Lists all projects you have access to.
         * @summary List All Projects
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listProjects(options?: RawAxiosRequestConfig): AxiosPromise<Array<ProjectMetadata>> {
            return localVarFp.listProjects(options).then((request) => request(axios, basePath));
        },
        /**
         * Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for.  This endpoints allows you to patch individual Ory Network project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration
         * @param {ProjectApiPatchProjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchProject(requestParameters: ProjectApiPatchProjectRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulProjectUpdate> {
            return localVarFp.patchProject(requestParameters.projectId, requestParameters.jsonPatch, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoints allows you to patch individual Ory Network Project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
         * @summary Patch an Ory Network Project Configuration based on a revision ID
         * @param {ProjectApiPatchProjectWithRevisionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchProjectWithRevision(requestParameters: ProjectApiPatchProjectWithRevisionRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulProjectUpdate> {
            return localVarFp.patchProjectWithRevision(requestParameters.projectId, requestParameters.revisionId, requestParameters.jsonPatch, options).then((request) => request(axios, basePath));
        },
        /**
         * !! Use with extreme caution !!  Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data.  Calling this endpoint will additionally delete custom domains and other related data.  If the project is linked to a subscription, the subscription needs to be unlinked first.
         * @summary Irrecoverably purge a project
         * @param {ProjectApiPurgeProjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        purgeProject(requestParameters: ProjectApiPurgeProjectRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.purgeProject(requestParameters.projectId, options).then((request) => request(axios, basePath));
        },
        /**
         * This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.
         * @summary Remove a member associated with this project
         * @param {ProjectApiRemoveProjectMemberRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        removeProjectMember(requestParameters: ProjectApiRemoveProjectMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.removeProjectMember(requestParameters.project, requestParameters.member, options).then((request) => request(axios, basePath));
        },
        /**
         * This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, ...). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.  Be aware that updating any service\'s configuration will completely override your current configuration for that service!
         * @summary Update an Ory Network Project Configuration
         * @param {ProjectApiSetProjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setProject(requestParameters: ProjectApiSetProjectRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessfulProjectUpdate> {
            return localVarFp.setProject(requestParameters.projectId, requestParameters.setProject, options).then((request) => request(axios, basePath));
        },
        /**
         * Deprecated: use setProject or patchProjectWithRevision instead  Updates an Enterprise SSO Organization in a project by its ID.
         * @summary Update an Enterprise SSO Organization
         * @param {ProjectApiUpdateOrganizationRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOrganization(requestParameters: ProjectApiUpdateOrganizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<Organization> {
            return localVarFp.updateOrganization(requestParameters.projectId, requestParameters.organizationId, requestParameters.organizationBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a onboarding portal link for an organization.
         * @summary Update organization onboarding portal link
         * @param {ProjectApiUpdateOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOrganizationOnboardingPortalLink(requestParameters: ProjectApiUpdateOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise<OnboardingPortalLink> {
            return localVarFp.updateOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.onboardingPortalLinkId, requestParameters.updateOrganizationOnboardingPortalLinkBody, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createOrganization operation in ProjectApi.
 */
export interface ProjectApiCreateOrganizationRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    readonly organizationBody?: OrganizationBody
}

/**
 * Request parameters for createOrganizationOnboardingPortalLink operation in ProjectApi.
 */
export interface ProjectApiCreateOrganizationOnboardingPortalLinkRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string

    readonly createOrganizationOnboardingPortalLinkBody?: CreateOrganizationOnboardingPortalLinkBody
}

/**
 * Request parameters for createProject operation in ProjectApi.
 */
export interface ProjectApiCreateProjectRequest {
    readonly createProjectBody?: CreateProjectBody
}

/**
 * Request parameters for createProjectApiKey operation in ProjectApi.
 */
export interface ProjectApiCreateProjectApiKeyRequest {
    /**
     * The Project ID or Project slug
     */
    readonly project: string

    readonly createProjectApiKeyRequest?: CreateProjectApiKeyRequest
}

/**
 * Request parameters for deleteOrganization operation in ProjectApi.
 */
export interface ProjectApiDeleteOrganizationRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string
}

/**
 * Request parameters for deleteOrganizationOnboardingPortalLink operation in ProjectApi.
 */
export interface ProjectApiDeleteOrganizationOnboardingPortalLinkRequest {
    readonly projectId: string

    readonly organizationId: string

    readonly onboardingPortalLinkId: string
}

/**
 * Request parameters for deleteProjectApiKey operation in ProjectApi.
 */
export interface ProjectApiDeleteProjectApiKeyRequest {
    /**
     * The Project ID or Project slug
     */
    readonly project: string

    /**
     * The Token ID
     */
    readonly tokenId: string
}

/**
 * Request parameters for getOrganization operation in ProjectApi.
 */
export interface ProjectApiGetOrganizationRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string
}

/**
 * Request parameters for getOrganizationOnboardingPortalLinks operation in ProjectApi.
 */
export interface ProjectApiGetOrganizationOnboardingPortalLinksRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string
}

/**
 * Request parameters for getProject operation in ProjectApi.
 */
export interface ProjectApiGetProjectRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string
}

/**
 * Request parameters for getProjectMembers operation in ProjectApi.
 */
export interface ProjectApiGetProjectMembersRequest {
    readonly project: string
}

/**
 * Request parameters for listOrganizations operation in ProjectApi.
 */
export interface ProjectApiListOrganizationsRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Domain  If set, only organizations with that domain will be returned.
     */
    readonly domain?: string
}

/**
 * Request parameters for listProjectApiKeys operation in ProjectApi.
 */
export interface ProjectApiListProjectApiKeysRequest {
    /**
     * The Project ID or Project slug
     */
    readonly project: string
}

/**
 * Request parameters for patchProject operation in ProjectApi.
 */
export interface ProjectApiPatchProjectRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    readonly jsonPatch?: Array<JsonPatch>
}

/**
 * Request parameters for patchProjectWithRevision operation in ProjectApi.
 */
export interface ProjectApiPatchProjectWithRevisionRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Revision ID  The revision ID that this patch was generated for.
     */
    readonly revisionId: string

    readonly jsonPatch?: Array<JsonPatch>
}

/**
 * Request parameters for purgeProject operation in ProjectApi.
 */
export interface ProjectApiPurgeProjectRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string
}

/**
 * Request parameters for removeProjectMember operation in ProjectApi.
 */
export interface ProjectApiRemoveProjectMemberRequest {
    readonly project: string

    readonly member: string
}

/**
 * Request parameters for setProject operation in ProjectApi.
 */
export interface ProjectApiSetProjectRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    readonly setProject?: SetProject
}

/**
 * Request parameters for updateOrganization operation in ProjectApi.
 */
export interface ProjectApiUpdateOrganizationRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string

    readonly organizationBody?: OrganizationBody
}

/**
 * Request parameters for updateOrganizationOnboardingPortalLink operation in ProjectApi.
 */
export interface ProjectApiUpdateOrganizationOnboardingPortalLinkRequest {
    /**
     * Project ID  The project\&#39;s ID.
     */
    readonly projectId: string

    /**
     * Organization ID  The Organization\&#39;s ID.
     */
    readonly organizationId: string

    readonly onboardingPortalLinkId: string

    readonly updateOrganizationOnboardingPortalLinkBody?: UpdateOrganizationOnboardingPortalLinkBody
}

/**
 * ProjectApi - object-oriented interface
 */
export class ProjectApi extends BaseAPI {
    /**
     * Deprecated: use setProject or patchProjectWithRevision instead  Creates an Enterprise SSO Organization in a project.
     * @summary Create an Enterprise SSO Organization
     * @param {ProjectApiCreateOrganizationRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createOrganization(requestParameters: ProjectApiCreateOrganizationRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).createOrganization(requestParameters.projectId, requestParameters.organizationBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create a onboarding portal link for an organization.
     * @summary Create organization onboarding portal link
     * @param {ProjectApiCreateOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createOrganizationOnboardingPortalLink(requestParameters: ProjectApiCreateOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).createOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.createOrganizationOnboardingPortalLinkBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Creates a new project.
     * @summary Create a Project
     * @param {ProjectApiCreateProjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createProject(requestParameters: ProjectApiCreateProjectRequest = {}, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).createProject(requestParameters.createProjectBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create an API key for a project.
     * @summary Create project API key
     * @param {ProjectApiCreateProjectApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createProjectApiKey(requestParameters: ProjectApiCreateProjectApiKeyRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).createProjectApiKey(requestParameters.project, requestParameters.createProjectApiKeyRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deprecated: use setProject or patchProjectWithRevision instead  Irrecoverably deletes an Enterprise SSO Organization in a project by its ID.
     * @summary Delete Enterprise SSO Organization
     * @param {ProjectApiDeleteOrganizationRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteOrganization(requestParameters: ProjectApiDeleteOrganizationRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).deleteOrganization(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deletes a onboarding portal link for an organization.
     * @summary Delete an organization onboarding portal link
     * @param {ProjectApiDeleteOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteOrganizationOnboardingPortalLink(requestParameters: ProjectApiDeleteOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).deleteOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.onboardingPortalLinkId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deletes an API key and immediately removes it.
     * @summary Delete project API key
     * @param {ProjectApiDeleteProjectApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteProjectApiKey(requestParameters: ProjectApiDeleteProjectApiKeyRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).deleteProjectApiKey(requestParameters.project, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deprecated: use getProject instead  Retrieves an Enterprise SSO Organization for a project by its ID
     * @summary Get Enterprise SSO Organization by ID
     * @param {ProjectApiGetOrganizationRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOrganization(requestParameters: ProjectApiGetOrganizationRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).getOrganization(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Retrieves the organization onboarding portal links.
     * @summary Get the organization onboarding portal links
     * @param {ProjectApiGetOrganizationOnboardingPortalLinksRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getOrganizationOnboardingPortalLinks(requestParameters: ProjectApiGetOrganizationOnboardingPortalLinksRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).getOrganizationOnboardingPortalLinks(requestParameters.projectId, requestParameters.organizationId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get a project you have access to by its ID.
     * @summary Get a Project
     * @param {ProjectApiGetProjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getProject(requestParameters: ProjectApiGetProjectRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).getProject(requestParameters.projectId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.
     * @summary Get all members associated with this project
     * @param {ProjectApiGetProjectMembersRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getProjectMembers(requestParameters: ProjectApiGetProjectMembersRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).getProjectMembers(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deprecated: use getProject instead  Lists all Enterprise SSO organizations in a project.
     * @summary List all Enterprise SSO organizations
     * @param {ProjectApiListOrganizationsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listOrganizations(requestParameters: ProjectApiListOrganizationsRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).listOrganizations(requestParameters.projectId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.domain, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * A list of all the project\'s API keys.
     * @summary List a project\'s API keys
     * @param {ProjectApiListProjectApiKeysRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listProjectApiKeys(requestParameters: ProjectApiListProjectApiKeysRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).listProjectApiKeys(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Lists all projects you have access to.
     * @summary List All Projects
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listProjects(options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).listProjects(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for.  This endpoints allows you to patch individual Ory Network project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
     * @summary Patch an Ory Network Project Configuration
     * @param {ProjectApiPatchProjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public patchProject(requestParameters: ProjectApiPatchProjectRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).patchProject(requestParameters.projectId, requestParameters.jsonPatch, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoints allows you to patch individual Ory Network Project configuration keys for Ory\'s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
     * @summary Patch an Ory Network Project Configuration based on a revision ID
     * @param {ProjectApiPatchProjectWithRevisionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public patchProjectWithRevision(requestParameters: ProjectApiPatchProjectWithRevisionRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).patchProjectWithRevision(requestParameters.projectId, requestParameters.revisionId, requestParameters.jsonPatch, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * !! Use with extreme caution !!  Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data.  Calling this endpoint will additionally delete custom domains and other related data.  If the project is linked to a subscription, the subscription needs to be unlinked first.
     * @summary Irrecoverably purge a project
     * @param {ProjectApiPurgeProjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public purgeProject(requestParameters: ProjectApiPurgeProjectRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).purgeProject(requestParameters.projectId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.
     * @summary Remove a member associated with this project
     * @param {ProjectApiRemoveProjectMemberRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public removeProjectMember(requestParameters: ProjectApiRemoveProjectMemberRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).removeProjectMember(requestParameters.project, requestParameters.member, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, ...). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.  Be aware that updating any service\'s configuration will completely override your current configuration for that service!
     * @summary Update an Ory Network Project Configuration
     * @param {ProjectApiSetProjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public setProject(requestParameters: ProjectApiSetProjectRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).setProject(requestParameters.projectId, requestParameters.setProject, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deprecated: use setProject or patchProjectWithRevision instead  Updates an Enterprise SSO Organization in a project by its ID.
     * @summary Update an Enterprise SSO Organization
     * @param {ProjectApiUpdateOrganizationRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateOrganization(requestParameters: ProjectApiUpdateOrganizationRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).updateOrganization(requestParameters.projectId, requestParameters.organizationId, requestParameters.organizationBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update a onboarding portal link for an organization.
     * @summary Update organization onboarding portal link
     * @param {ProjectApiUpdateOrganizationOnboardingPortalLinkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateOrganizationOnboardingPortalLink(requestParameters: ProjectApiUpdateOrganizationOnboardingPortalLinkRequest, options?: RawAxiosRequestConfig) {
        return ProjectApiFp(this.configuration).updateOrganizationOnboardingPortalLink(requestParameters.projectId, requestParameters.organizationId, requestParameters.onboardingPortalLinkId, requestParameters.updateOrganizationOnboardingPortalLinkBody, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * RelationshipApi - axios parameter creator
 */
export const RelationshipApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * The OPL file is expected in the body of the request.
         * @summary Check the syntax of an OPL file
         * @param {string} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkOplSyntax: async (body?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/opl/syntax/check`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'text/plain';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to create a relationship.
         * @summary Create a Relationship
         * @param {CreateRelationshipBody} [createRelationshipBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRelationship: async (createRelationshipBody?: CreateRelationshipBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/relation-tuples`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createRelationshipBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to delete relationships
         * @summary Delete Relationships
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRelationships: async (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/relation-tuples`;
            // 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;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (namespace !== undefined) {
                localVarQueryParameter['namespace'] = namespace;
            }

            if (object !== undefined) {
                localVarQueryParameter['object'] = object;
            }

            if (relation !== undefined) {
                localVarQueryParameter['relation'] = relation;
            }

            if (subjectId !== undefined) {
                localVarQueryParameter['subject_id'] = subjectId;
            }

            if (subjectSetNamespace !== undefined) {
                localVarQueryParameter['subject_set.namespace'] = subjectSetNamespace;
            }

            if (subjectSetObject !== undefined) {
                localVarQueryParameter['subject_set.object'] = subjectSetObject;
            }

            if (subjectSetRelation !== undefined) {
                localVarQueryParameter['subject_set.relation'] = subjectSetRelation;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get all relationships that match the query. Only the namespace field is required.
         * @summary Query relationships
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRelationships: async (pageSize?: number, pageToken?: string, namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/relation-tuples`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }

            if (namespace !== undefined) {
                localVarQueryParameter['namespace'] = namespace;
            }

            if (object !== undefined) {
                localVarQueryParameter['object'] = object;
            }

            if (relation !== undefined) {
                localVarQueryParameter['relation'] = relation;
            }

            if (subjectId !== undefined) {
                localVarQueryParameter['subject_id'] = subjectId;
            }

            if (subjectSetNamespace !== undefined) {
                localVarQueryParameter['subject_set.namespace'] = subjectSetNamespace;
            }

            if (subjectSetObject !== undefined) {
                localVarQueryParameter['subject_set.object'] = subjectSetObject;
            }

            if (subjectSetRelation !== undefined) {
                localVarQueryParameter['subject_set.relation'] = subjectSetRelation;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get all namespaces
         * @summary Query namespaces
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRelationshipNamespaces: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/namespaces`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Use this endpoint to patch one or more relationships.
         * @summary Patch Multiple Relationships
         * @param {Array<RelationshipPatch>} [relationshipPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchRelationships: async (relationshipPatch?: Array<RelationshipPatch>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/relation-tuples`;
            // 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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryAccessToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(relationshipPatch, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * RelationshipApi - functional programming interface
 */
export const RelationshipApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = RelationshipApiAxiosParamCreator(configuration)
    return {
        /**
         * The OPL file is expected in the body of the request.
         * @summary Check the syntax of an OPL file
         * @param {string} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async checkOplSyntax(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckOplSyntaxResult>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.checkOplSyntax(body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.checkOplSyntax']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to create a relationship.
         * @summary Create a Relationship
         * @param {CreateRelationshipBody} [createRelationshipBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createRelationship(createRelationshipBody?: CreateRelationshipBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Relationship>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createRelationship(createRelationshipBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.createRelationship']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to delete relationships
         * @summary Delete Relationships
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteRelationships(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRelationships(namespace, object, relation, subjectId, subjectSetNamespace, subjectSetObject, subjectSetRelation, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.deleteRelationships']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get all relationships that match the query. Only the namespace field is required.
         * @summary Query relationships
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {string} [namespace] Namespace of the Relationship
         * @param {string} [object] Object of the Relationship
         * @param {string} [relation] Relation of the Relationship
         * @param {string} [subjectId] SubjectID of the Relationship
         * @param {string} [subjectSetNamespace] Namespace of the Subject Set
         * @param {string} [subjectSetObject] Object of the Subject Set
         * @param {string} [subjectSetRelation] Relation of the Subject Set
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getRelationships(pageSize?: number, pageToken?: string, namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Relationships>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRelationships(pageSize, pageToken, namespace, object, relation, subjectId, subjectSetNamespace, subjectSetObject, subjectSetRelation, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.getRelationships']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get all namespaces
         * @summary Query namespaces
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listRelationshipNamespaces(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RelationshipNamespaces>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listRelationshipNamespaces(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.listRelationshipNamespaces']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Use this endpoint to patch one or more relationships.
         * @summary Patch Multiple Relationships
         * @param {Array<RelationshipPatch>} [relationshipPatch] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchRelationships(relationshipPatch?: Array<RelationshipPatch>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchRelationships(relationshipPatch, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['RelationshipApi.patchRelationships']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * RelationshipApi - factory interface
 */
export const RelationshipApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = RelationshipApiFp(configuration)
    return {
        /**
         * The OPL file is expected in the body of the request.
         * @summary Check the syntax of an OPL file
         * @param {RelationshipApiCheckOplSyntaxRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        checkOplSyntax(requestParameters: RelationshipApiCheckOplSyntaxRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CheckOplSyntaxResult> {
            return localVarFp.checkOplSyntax(requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to create a relationship.
         * @summary Create a Relationship
         * @param {RelationshipApiCreateRelationshipRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRelationship(requestParameters: RelationshipApiCreateRelationshipRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Relationship> {
            return localVarFp.createRelationship(requestParameters.createRelationshipBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to delete relationships
         * @summary Delete Relationships
         * @param {RelationshipApiDeleteRelationshipsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRelationships(requestParameters: RelationshipApiDeleteRelationshipsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteRelationships(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, options).then((request) => request(axios, basePath));
        },
        /**
         * Get all relationships that match the query. Only the namespace field is required.
         * @summary Query relationships
         * @param {RelationshipApiGetRelationshipsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRelationships(requestParameters: RelationshipApiGetRelationshipsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Relationships> {
            return localVarFp.getRelationships(requestParameters.pageSize, requestParameters.pageToken, requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, options).then((request) => request(axios, basePath));
        },
        /**
         * Get all namespaces
         * @summary Query namespaces
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRelationshipNamespaces(options?: RawAxiosRequestConfig): AxiosPromise<RelationshipNamespaces> {
            return localVarFp.listRelationshipNamespaces(options).then((request) => request(axios, basePath));
        },
        /**
         * Use this endpoint to patch one or more relationships.
         * @summary Patch Multiple Relationships
         * @param {RelationshipApiPatchRelationshipsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchRelationships(requestParameters: RelationshipApiPatchRelationshipsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.patchRelationships(requestParameters.relationshipPatch, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for checkOplSyntax operation in RelationshipApi.
 */
export interface RelationshipApiCheckOplSyntaxRequest {
    readonly body?: string
}

/**
 * Request parameters for createRelationship operation in RelationshipApi.
 */
export interface RelationshipApiCreateRelationshipRequest {
    readonly createRelationshipBody?: CreateRelationshipBody
}

/**
 * Request parameters for deleteRelationships operation in RelationshipApi.
 */
export interface RelationshipApiDeleteRelationshipsRequest {
    /**
     * Namespace of the Relationship
     */
    readonly namespace?: string

    /**
     * Object of the Relationship
     */
    readonly object?: string

    /**
     * Relation of the Relationship
     */
    readonly relation?: string

    /**
     * SubjectID of the Relationship
     */
    readonly subjectId?: string

    /**
     * Namespace of the Subject Set
     */
    readonly subjectSetNamespace?: string

    /**
     * Object of the Subject Set
     */
    readonly subjectSetObject?: string

    /**
     * Relation of the Subject Set
     */
    readonly subjectSetRelation?: string
}

/**
 * Request parameters for getRelationships operation in RelationshipApi.
 */
export interface RelationshipApiGetRelationshipsRequest {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string

    /**
     * Namespace of the Relationship
     */
    readonly namespace?: string

    /**
     * Object of the Relationship
     */
    readonly object?: string

    /**
     * Relation of the Relationship
     */
    readonly relation?: string

    /**
     * SubjectID of the Relationship
     */
    readonly subjectId?: string

    /**
     * Namespace of the Subject Set
     */
    readonly subjectSetNamespace?: string

    /**
     * Object of the Subject Set
     */
    readonly subjectSetObject?: string

    /**
     * Relation of the Subject Set
     */
    readonly subjectSetRelation?: string
}

/**
 * Request parameters for patchRelationships operation in RelationshipApi.
 */
export interface RelationshipApiPatchRelationshipsRequest {
    readonly relationshipPatch?: Array<RelationshipPatch>
}

/**
 * RelationshipApi - object-oriented interface
 */
export class RelationshipApi extends BaseAPI {
    /**
     * The OPL file is expected in the body of the request.
     * @summary Check the syntax of an OPL file
     * @param {RelationshipApiCheckOplSyntaxRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public checkOplSyntax(requestParameters: RelationshipApiCheckOplSyntaxRequest = {}, options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).checkOplSyntax(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to create a relationship.
     * @summary Create a Relationship
     * @param {RelationshipApiCreateRelationshipRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createRelationship(requestParameters: RelationshipApiCreateRelationshipRequest = {}, options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).createRelationship(requestParameters.createRelationshipBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to delete relationships
     * @summary Delete Relationships
     * @param {RelationshipApiDeleteRelationshipsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteRelationships(requestParameters: RelationshipApiDeleteRelationshipsRequest = {}, options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).deleteRelationships(requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get all relationships that match the query. Only the namespace field is required.
     * @summary Query relationships
     * @param {RelationshipApiGetRelationshipsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getRelationships(requestParameters: RelationshipApiGetRelationshipsRequest = {}, options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).getRelationships(requestParameters.pageSize, requestParameters.pageToken, requestParameters.namespace, requestParameters.object, requestParameters.relation, requestParameters.subjectId, requestParameters.subjectSetNamespace, requestParameters.subjectSetObject, requestParameters.subjectSetRelation, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get all namespaces
     * @summary Query namespaces
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listRelationshipNamespaces(options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).listRelationshipNamespaces(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Use this endpoint to patch one or more relationships.
     * @summary Patch Multiple Relationships
     * @param {RelationshipApiPatchRelationshipsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public patchRelationships(requestParameters: RelationshipApiPatchRelationshipsRequest = {}, options?: RawAxiosRequestConfig) {
        return RelationshipApiFp(this.configuration).patchRelationships(requestParameters.relationshipPatch, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * WellknownApi - axios parameter creator
 */
export const WellknownApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.  Adding custom keys requires first creating a keyset via the createJsonWebKeySet operation, and then configuring the webfinger.jwks.broadcast_keys configuration value to include the keyset name.
         * @summary Discover Well-Known JSON Web Keys
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        discoverJsonWebKeys: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/.well-known/jwks.json`;
            // 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,
            };
        },
    }
};

/**
 * WellknownApi - functional programming interface
 */
export const WellknownApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = WellknownApiAxiosParamCreator(configuration)
    return {
        /**
         * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.  Adding custom keys requires first creating a keyset via the createJsonWebKeySet operation, and then configuring the webfinger.jwks.broadcast_keys configuration value to include the keyset name.
         * @summary Discover Well-Known JSON Web Keys
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async discoverJsonWebKeys(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JsonWebKeySet>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.discoverJsonWebKeys(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WellknownApi.discoverJsonWebKeys']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * WellknownApi - factory interface
 */
export const WellknownApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = WellknownApiFp(configuration)
    return {
        /**
         * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.  Adding custom keys requires first creating a keyset via the createJsonWebKeySet operation, and then configuring the webfinger.jwks.broadcast_keys configuration value to include the keyset name.
         * @summary Discover Well-Known JSON Web Keys
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        discoverJsonWebKeys(options?: RawAxiosRequestConfig): AxiosPromise<JsonWebKeySet> {
            return localVarFp.discoverJsonWebKeys(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * WellknownApi - object-oriented interface
 */
export class WellknownApi extends BaseAPI {
    /**
     * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.  Adding custom keys requires first creating a keyset via the createJsonWebKeySet operation, and then configuring the webfinger.jwks.broadcast_keys configuration value to include the keyset name.
     * @summary Discover Well-Known JSON Web Keys
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public discoverJsonWebKeys(options?: RawAxiosRequestConfig) {
        return WellknownApiFp(this.configuration).discoverJsonWebKeys(options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * WorkspaceApi - axios parameter creator
 */
export const WorkspaceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create a new workspace
         * @param {CreateWorkspaceBody} [createWorkspaceBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createWorkspace: async (createWorkspaceBody?: CreateWorkspaceBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/workspaces`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createWorkspaceBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create an API key for a workspace.
         * @summary Create workspace API key
         * @param {string} workspace The Workspace ID
         * @param {CreateWorkspaceApiKeyBody} [createWorkspaceApiKeyBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createWorkspaceApiKey: async (workspace: string, createWorkspaceApiKeyBody?: CreateWorkspaceApiKeyBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('createWorkspaceApiKey', 'workspace', workspace)
            const localVarPath = `/workspaces/{workspace}/tokens`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createWorkspaceApiKeyBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete workspace API key
         * @param {string} workspace The Workspace ID or Workspace slug
         * @param {string} tokenId The Token ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteWorkspaceApiKey: async (workspace: string, tokenId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('deleteWorkspaceApiKey', 'workspace', workspace)
            // verify required parameter 'tokenId' is not null or undefined
            assertParamExists('deleteWorkspaceApiKey', 'tokenId', tokenId)
            const localVarPath = `/workspaces/{workspace}/tokens/{token_id}`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)))
                .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)));
            // 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;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary Get a workspace
         * @param {string} workspace 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getWorkspace: async (workspace: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('getWorkspace', 'workspace', workspace)
            const localVarPath = `/workspaces/{workspace}`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * A list of all the workspace\'s API keys.
         * @summary List a workspace\'s API keys
         * @param {string} workspace The Workspace ID or Workspace slug
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaceApiKeys: async (workspace: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('listWorkspaceApiKeys', 'workspace', workspace)
            const localVarPath = `/workspaces/{workspace}/tokens`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary List all projects of a workspace
         * @param {string} workspace 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaceProjects: async (workspace: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('listWorkspaceProjects', 'workspace', workspace)
            const localVarPath = `/workspaces/{workspace}/projects`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List workspaces the user is a member of
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaces: async (pageSize?: number, pageToken?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/workspaces`;
            // 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 oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            if (pageSize !== undefined) {
                localVarQueryParameter['page_size'] = pageSize;
            }

            if (pageToken !== undefined) {
                localVarQueryParameter['page_token'] = pageToken;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Workspace members with the role `OWNER` can access this endpoint.
         * @summary Update an workspace
         * @param {string} workspace 
         * @param {UpdateWorkspaceBody} [updateWorkspaceBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateWorkspace: async (workspace: string, updateWorkspaceBody?: UpdateWorkspaceBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspace' is not null or undefined
            assertParamExists('updateWorkspace', 'workspace', workspace)
            const localVarPath = `/workspaces/{workspace}`
                .replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication oryWorkspaceApiKey required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(updateWorkspaceBody, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * WorkspaceApi - functional programming interface
 */
export const WorkspaceApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = WorkspaceApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create a new workspace
         * @param {CreateWorkspaceBody} [createWorkspaceBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createWorkspace(createWorkspaceBody?: CreateWorkspaceBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkspace(createWorkspaceBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.createWorkspace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create an API key for a workspace.
         * @summary Create workspace API key
         * @param {string} workspace The Workspace ID
         * @param {CreateWorkspaceApiKeyBody} [createWorkspaceApiKeyBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createWorkspaceApiKey(workspace: string, createWorkspaceApiKeyBody?: CreateWorkspaceApiKeyBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkspaceApiKey>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkspaceApiKey(workspace, createWorkspaceApiKeyBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.createWorkspaceApiKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete workspace API key
         * @param {string} workspace The Workspace ID or Workspace slug
         * @param {string} tokenId The Token ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteWorkspaceApiKey(workspace: string, tokenId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkspaceApiKey(workspace, tokenId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.deleteWorkspaceApiKey']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary Get a workspace
         * @param {string} workspace 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getWorkspace(workspace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkspace(workspace, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.getWorkspace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * A list of all the workspace\'s API keys.
         * @summary List a workspace\'s API keys
         * @param {string} workspace The Workspace ID or Workspace slug
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listWorkspaceApiKeys(workspace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<WorkspaceApiKey>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspaceApiKeys(workspace, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.listWorkspaceApiKeys']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary List all projects of a workspace
         * @param {string} workspace 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listWorkspaceProjects(workspace: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkspaceProjects>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspaceProjects(workspace, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.listWorkspaceProjects']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List workspaces the user is a member of
         * @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.com/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.com/docs/ecosystem/api-design#pagination).
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listWorkspaces(pageSize?: number, pageToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkspaces>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspaces(pageSize, pageToken, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.listWorkspaces']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Workspace members with the role `OWNER` can access this endpoint.
         * @summary Update an workspace
         * @param {string} workspace 
         * @param {UpdateWorkspaceBody} [updateWorkspaceBody] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateWorkspace(workspace: string, updateWorkspaceBody?: UpdateWorkspaceBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkspace(workspace, updateWorkspaceBody, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.updateWorkspace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * WorkspaceApi - factory interface
 */
export const WorkspaceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = WorkspaceApiFp(configuration)
    return {
        /**
         * 
         * @summary Create a new workspace
         * @param {WorkspaceApiCreateWorkspaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createWorkspace(requestParameters: WorkspaceApiCreateWorkspaceRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.createWorkspace(requestParameters.createWorkspaceBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Create an API key for a workspace.
         * @summary Create workspace API key
         * @param {WorkspaceApiCreateWorkspaceApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createWorkspaceApiKey(requestParameters: WorkspaceApiCreateWorkspaceApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<WorkspaceApiKey> {
            return localVarFp.createWorkspaceApiKey(requestParameters.workspace, requestParameters.createWorkspaceApiKeyBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Deletes an API key and immediately removes it.
         * @summary Delete workspace API key
         * @param {WorkspaceApiDeleteWorkspaceApiKeyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteWorkspaceApiKey(requestParameters: WorkspaceApiDeleteWorkspaceApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteWorkspaceApiKey(requestParameters.workspace, requestParameters.tokenId, options).then((request) => request(axios, basePath));
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary Get a workspace
         * @param {WorkspaceApiGetWorkspaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getWorkspace(requestParameters: WorkspaceApiGetWorkspaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.getWorkspace(requestParameters.workspace, options).then((request) => request(axios, basePath));
        },
        /**
         * A list of all the workspace\'s API keys.
         * @summary List a workspace\'s API keys
         * @param {WorkspaceApiListWorkspaceApiKeysRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaceApiKeys(requestParameters: WorkspaceApiListWorkspaceApiKeysRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<WorkspaceApiKey>> {
            return localVarFp.listWorkspaceApiKeys(requestParameters.workspace, options).then((request) => request(axios, basePath));
        },
        /**
         * Any workspace member can access this endpoint.
         * @summary List all projects of a workspace
         * @param {WorkspaceApiListWorkspaceProjectsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaceProjects(requestParameters: WorkspaceApiListWorkspaceProjectsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListWorkspaceProjects> {
            return localVarFp.listWorkspaceProjects(requestParameters.workspace, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List workspaces the user is a member of
         * @param {WorkspaceApiListWorkspacesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listWorkspaces(requestParameters: WorkspaceApiListWorkspacesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<ListWorkspaces> {
            return localVarFp.listWorkspaces(requestParameters.pageSize, requestParameters.pageToken, options).then((request) => request(axios, basePath));
        },
        /**
         * Workspace members with the role `OWNER` can access this endpoint.
         * @summary Update an workspace
         * @param {WorkspaceApiUpdateWorkspaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateWorkspace(requestParameters: WorkspaceApiUpdateWorkspaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.updateWorkspace(requestParameters.workspace, requestParameters.updateWorkspaceBody, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for createWorkspace operation in WorkspaceApi.
 */
export interface WorkspaceApiCreateWorkspaceRequest {
    readonly createWorkspaceBody?: CreateWorkspaceBody
}

/**
 * Request parameters for createWorkspaceApiKey operation in WorkspaceApi.
 */
export interface WorkspaceApiCreateWorkspaceApiKeyRequest {
    /**
     * The Workspace ID
     */
    readonly workspace: string

    readonly createWorkspaceApiKeyBody?: CreateWorkspaceApiKeyBody
}

/**
 * Request parameters for deleteWorkspaceApiKey operation in WorkspaceApi.
 */
export interface WorkspaceApiDeleteWorkspaceApiKeyRequest {
    /**
     * The Workspace ID or Workspace slug
     */
    readonly workspace: string

    /**
     * The Token ID
     */
    readonly tokenId: string
}

/**
 * Request parameters for getWorkspace operation in WorkspaceApi.
 */
export interface WorkspaceApiGetWorkspaceRequest {
    readonly workspace: string
}

/**
 * Request parameters for listWorkspaceApiKeys operation in WorkspaceApi.
 */
export interface WorkspaceApiListWorkspaceApiKeysRequest {
    /**
     * The Workspace ID or Workspace slug
     */
    readonly workspace: string
}

/**
 * Request parameters for listWorkspaceProjects operation in WorkspaceApi.
 */
export interface WorkspaceApiListWorkspaceProjectsRequest {
    readonly workspace: string
}

/**
 * Request parameters for listWorkspaces operation in WorkspaceApi.
 */
export interface WorkspaceApiListWorkspacesRequest {
    /**
     * 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.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageSize?: number

    /**
     * Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
     */
    readonly pageToken?: string
}

/**
 * Request parameters for updateWorkspace operation in WorkspaceApi.
 */
export interface WorkspaceApiUpdateWorkspaceRequest {
    readonly workspace: string

    readonly updateWorkspaceBody?: UpdateWorkspaceBody
}

/**
 * WorkspaceApi - object-oriented interface
 */
export class WorkspaceApi extends BaseAPI {
    /**
     * 
     * @summary Create a new workspace
     * @param {WorkspaceApiCreateWorkspaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createWorkspace(requestParameters: WorkspaceApiCreateWorkspaceRequest = {}, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).createWorkspace(requestParameters.createWorkspaceBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create an API key for a workspace.
     * @summary Create workspace API key
     * @param {WorkspaceApiCreateWorkspaceApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public createWorkspaceApiKey(requestParameters: WorkspaceApiCreateWorkspaceApiKeyRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).createWorkspaceApiKey(requestParameters.workspace, requestParameters.createWorkspaceApiKeyBody, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deletes an API key and immediately removes it.
     * @summary Delete workspace API key
     * @param {WorkspaceApiDeleteWorkspaceApiKeyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public deleteWorkspaceApiKey(requestParameters: WorkspaceApiDeleteWorkspaceApiKeyRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).deleteWorkspaceApiKey(requestParameters.workspace, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Any workspace member can access this endpoint.
     * @summary Get a workspace
     * @param {WorkspaceApiGetWorkspaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public getWorkspace(requestParameters: WorkspaceApiGetWorkspaceRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).getWorkspace(requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * A list of all the workspace\'s API keys.
     * @summary List a workspace\'s API keys
     * @param {WorkspaceApiListWorkspaceApiKeysRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listWorkspaceApiKeys(requestParameters: WorkspaceApiListWorkspaceApiKeysRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).listWorkspaceApiKeys(requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Any workspace member can access this endpoint.
     * @summary List all projects of a workspace
     * @param {WorkspaceApiListWorkspaceProjectsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listWorkspaceProjects(requestParameters: WorkspaceApiListWorkspaceProjectsRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).listWorkspaceProjects(requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List workspaces the user is a member of
     * @param {WorkspaceApiListWorkspacesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public listWorkspaces(requestParameters: WorkspaceApiListWorkspacesRequest = {}, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).listWorkspaces(requestParameters.pageSize, requestParameters.pageToken, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Workspace members with the role `OWNER` can access this endpoint.
     * @summary Update an workspace
     * @param {WorkspaceApiUpdateWorkspaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateWorkspace(requestParameters: WorkspaceApiUpdateWorkspaceRequest, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).updateWorkspace(requestParameters.workspace, requestParameters.updateWorkspaceBody, options).then((request) => request(this.axios, this.basePath));
    }
}



