UNPKG

@leancodepl/kratos

Version:

Headless React components library for building Ory Kratos authentication flows

631 lines (630 loc) 49.8 kB
/** * 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.20.10 * 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 * as runtime from '../runtime'; import type { BatchPatchIdentitiesResponse, CreateIdentityBody, CreateRecoveryCodeForIdentityBody, CreateRecoveryLinkForIdentityBody, Identity, IdentitySchemaContainer, JsonPatch, PatchIdentitiesBody, RecoveryCodeForIdentity, RecoveryLinkForIdentity, Session, UpdateIdentityBody } from '../models/index'; export interface BatchPatchIdentitiesRequest { patchIdentitiesBody?: PatchIdentitiesBody; } export interface CreateIdentityRequest { createIdentityBody?: CreateIdentityBody; } export interface CreateRecoveryCodeForIdentityRequest { createRecoveryCodeForIdentityBody?: CreateRecoveryCodeForIdentityBody; } export interface CreateRecoveryLinkForIdentityRequest { returnTo?: string; createRecoveryLinkForIdentityBody?: CreateRecoveryLinkForIdentityBody; } export interface DeleteIdentityRequest { id: string; } export interface DeleteIdentityCredentialsRequest { id: string; type: DeleteIdentityCredentialsTypeEnum; identifier?: string; } export interface DeleteIdentitySessionsRequest { id: string; } export interface DisableSessionRequest { id: string; } export interface ExtendSessionRequest { id: string; } export interface GetIdentityRequest { id: string; includeCredential?: Array<GetIdentityIncludeCredentialEnum>; } export interface GetIdentitySchemaRequest { id: string; } export interface GetSessionRequest { id: string; expand?: Array<GetSessionExpandEnum>; } export interface ListIdentitiesRequest { perPage?: number; page?: number; pageSize?: number; pageToken?: string; consistency?: ListIdentitiesConsistencyEnum; ids?: Array<string>; credentialsIdentifier?: string; previewCredentialsIdentifierSimilar?: string; includeCredential?: Array<string>; organizationId?: string; } export interface ListIdentitySchemasRequest { perPage?: number; page?: number; pageSize?: number; pageToken?: string; } export interface ListIdentitySessionsRequest { id: string; perPage?: number; page?: number; pageSize?: number; pageToken?: string; active?: boolean; } export interface ListSessionsRequest { pageSize?: number; pageToken?: string; active?: boolean; expand?: Array<ListSessionsExpandEnum>; } export interface PatchIdentityRequest { id: string; jsonPatch?: Array<JsonPatch>; } export interface UpdateIdentityRequest { id: string; updateIdentityBody?: UpdateIdentityBody; } /** * IdentityApi - interface * * @export * @interface IdentityApiInterface */ export interface IdentityApiInterface { /** * Creates multiple [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * @summary Create multiple identities * @param {PatchIdentitiesBody} [patchIdentitiesBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IdentityApiInterface */ batchPatchIdentitiesRaw(requestParameters: BatchPatchIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchPatchIdentitiesResponse>>; /** * Creates multiple [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create multiple identities */ batchPatchIdentities(requestParameters: BatchPatchIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchPatchIdentitiesResponse>; /** * Create an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/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} * @memberof IdentityApiInterface */ createIdentityRaw(requestParameters: CreateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Create an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create an Identity */ createIdentity(requestParameters: CreateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * 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} * @memberof IdentityApiInterface */ createRecoveryCodeForIdentityRaw(requestParameters: CreateRecoveryCodeForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecoveryCodeForIdentity>>; /** * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Code */ createRecoveryCodeForIdentity(requestParameters: CreateRecoveryCodeForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecoveryCodeForIdentity>; /** * 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} * @memberof IdentityApiInterface */ createRecoveryLinkForIdentityRaw(requestParameters: CreateRecoveryLinkForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecoveryLinkForIdentity>>; /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Link */ createRecoveryLinkForIdentity(requestParameters: CreateRecoveryLinkForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecoveryLinkForIdentity>; /** * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.sh/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 when the identity was not found, in which case it is assumed that is has been deleted already. * @summary Delete an Identity * @param {string} id ID is the identity\&#39;s ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IdentityApiInterface */ deleteIdentityRaw(requestParameters: DeleteIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.sh/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 when the identity was not found, in which case it is assumed that is has been deleted already. * Delete an Identity */ deleteIdentity(requestParameters: DeleteIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Delete an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete password 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 {'password' | 'oidc' | 'totp' | 'lookup_secret' | 'webauthn' | 'code' | 'passkey' | 'profile' | 'saml' | 'link_recovery' | 'code_recovery'} 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 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 credential to delete. Find the identifier by calling the &#x60;GET /admin/identities/{id}?include_credential&#x3D;oidc&#x60; endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IdentityApiInterface */ deleteIdentityCredentialsRaw(requestParameters: DeleteIdentityCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Delete an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete password or code auth credentials through this API. * Delete a credential for a specific identity */ deleteIdentityCredentials(requestParameters: DeleteIdentityCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * 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} * @memberof IdentityApiInterface */ deleteIdentitySessionsRaw(requestParameters: DeleteIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. * Delete & Invalidate an Identity\'s Sessions */ deleteIdentitySessions(requestParameters: DeleteIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * 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} * @memberof IdentityApiInterface */ disableSessionRaw(requestParameters: DisableSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint deactivates the specified session. Session data is not deleted. * Deactivate a Session */ disableSession(requestParameters: DisableSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * 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} * @memberof IdentityApiInterface */ extendSessionRaw(requestParameters: ExtendSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Session>>; /** * 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. * Extend a Session */ extendSession(requestParameters: ExtendSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Session | null | undefined>; /** * Return an [identity](https://www.ory.sh/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<'password' | 'oidc' | 'totp' | 'lookup_secret' | 'webauthn' | 'code' | 'passkey' | 'profile' | 'saml' | 'link_recovery' | 'code_recovery'>} [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} * @memberof IdentityApiInterface */ getIdentityRaw(requestParameters: GetIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Return an [identity](https://www.ory.sh/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. * Get an Identity */ getIdentity(requestParameters: GetIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * 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} * @memberof IdentityApiInterface */ getIdentitySchemaRaw(requestParameters: GetIdentitySchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>; /** * Return a specific identity schema. * Get Identity JSON Schema */ getIdentitySchema(requestParameters: GetIdentitySchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>; /** * 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<'identity' | 'devices'>} [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} * @memberof IdentityApiInterface */ getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Session>>; /** * This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context. * Get Session */ getSession(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Session>; /** * Lists all [identities](https://www.ory.sh/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.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {'' | 'strong' | 'eventual'} [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} * @memberof IdentityApiInterface */ listIdentitiesRaw(requestParameters: ListIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Identity>>>; /** * Lists all [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined. * List Identities */ listIdentities(requestParameters: ListIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Identity>>; /** * 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.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IdentityApiInterface */ listIdentitySchemasRaw(requestParameters: ListIdentitySchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IdentitySchemaContainer>>>; /** * Returns a list of all identity schemas currently in use. * Get all Identity Schemas */ listIdentitySchemas(requestParameters: ListIdentitySchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IdentitySchemaContainer>>; /** * 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.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {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} * @memberof IdentityApiInterface */ listIdentitySessionsRaw(requestParameters: ListIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Session>>>; /** * This endpoint returns all sessions that belong to the given Identity. * List an Identity\'s Sessions */ listIdentitySessions(requestParameters: ListIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Session>>; /** * 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.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {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<'identity' | 'devices'>} [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} * @memberof IdentityApiInterface */ listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Session>>>; /** * Listing all sessions that exist. * List All Sessions */ listSessions(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Session>>; /** * Partially updates an [identity\'s](https://www.ory.sh/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} * @memberof IdentityApiInterface */ patchIdentityRaw(requestParameters: PatchIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Partially updates an [identity\'s](https://www.ory.sh/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. * Patch an Identity */ patchIdentity(requestParameters: PatchIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * This endpoint updates an [identity](https://www.ory.sh/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. * @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} * @memberof IdentityApiInterface */ updateIdentityRaw(requestParameters: UpdateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * This endpoint updates an [identity](https://www.ory.sh/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. * Update an Identity */ updateIdentity(requestParameters: UpdateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; } /** * */ export declare class IdentityApi extends runtime.BaseAPI implements IdentityApiInterface { /** * Creates multiple [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create multiple identities */ batchPatchIdentitiesRaw(requestParameters: BatchPatchIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchPatchIdentitiesResponse>>; /** * Creates multiple [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create multiple identities */ batchPatchIdentities(requestParameters?: BatchPatchIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchPatchIdentitiesResponse>; /** * Create an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create an Identity */ createIdentityRaw(requestParameters: CreateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Create an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations or multifactor methods. * Create an Identity */ createIdentity(requestParameters?: CreateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Code */ createRecoveryCodeForIdentityRaw(requestParameters: CreateRecoveryCodeForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecoveryCodeForIdentity>>; /** * This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Code */ createRecoveryCodeForIdentity(requestParameters?: CreateRecoveryCodeForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecoveryCodeForIdentity>; /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Link */ createRecoveryLinkForIdentityRaw(requestParameters: CreateRecoveryLinkForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecoveryLinkForIdentity>>; /** * This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. * Create a Recovery Link */ createRecoveryLinkForIdentity(requestParameters?: CreateRecoveryLinkForIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecoveryLinkForIdentity>; /** * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.sh/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 when the identity was not found, in which case it is assumed that is has been deleted already. * Delete an Identity */ deleteIdentityRaw(requestParameters: DeleteIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint irrecoverably and permanently deletes the [identity](https://www.ory.sh/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 when the identity was not found, in which case it is assumed that is has been deleted already. * Delete an Identity */ deleteIdentity(requestParameters: DeleteIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Delete an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete password or code auth credentials through this API. * Delete a credential for a specific identity */ deleteIdentityCredentialsRaw(requestParameters: DeleteIdentityCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Delete an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete password or code auth credentials through this API. * Delete a credential for a specific identity */ deleteIdentityCredentials(requestParameters: DeleteIdentityCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. * Delete & Invalidate an Identity\'s Sessions */ deleteIdentitySessionsRaw(requestParameters: DeleteIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. * Delete & Invalidate an Identity\'s Sessions */ deleteIdentitySessions(requestParameters: DeleteIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Calling this endpoint deactivates the specified session. Session data is not deleted. * Deactivate a Session */ disableSessionRaw(requestParameters: DisableSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Calling this endpoint deactivates the specified session. Session data is not deleted. * Deactivate a Session */ disableSession(requestParameters: DisableSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * 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. * Extend a Session */ extendSessionRaw(requestParameters: ExtendSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Session>>; /** * 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. * Extend a Session */ extendSession(requestParameters: ExtendSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Session | null | undefined>; /** * Return an [identity](https://www.ory.sh/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. * Get an Identity */ getIdentityRaw(requestParameters: GetIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Return an [identity](https://www.ory.sh/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. * Get an Identity */ getIdentity(requestParameters: GetIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * Return a specific identity schema. * Get Identity JSON Schema */ getIdentitySchemaRaw(requestParameters: GetIdentitySchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>; /** * Return a specific identity schema. * Get Identity JSON Schema */ getIdentitySchema(requestParameters: GetIdentitySchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>; /** * This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context. * Get Session */ getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Session>>; /** * This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context. * Get Session */ getSession(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Session>; /** * Lists all [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined. * List Identities */ listIdentitiesRaw(requestParameters: ListIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Identity>>>; /** * Lists all [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined. * List Identities */ listIdentities(requestParameters?: ListIdentitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Identity>>; /** * Returns a list of all identity schemas currently in use. * Get all Identity Schemas */ listIdentitySchemasRaw(requestParameters: ListIdentitySchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IdentitySchemaContainer>>>; /** * Returns a list of all identity schemas currently in use. * Get all Identity Schemas */ listIdentitySchemas(requestParameters?: ListIdentitySchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IdentitySchemaContainer>>; /** * This endpoint returns all sessions that belong to the given Identity. * List an Identity\'s Sessions */ listIdentitySessionsRaw(requestParameters: ListIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Session>>>; /** * This endpoint returns all sessions that belong to the given Identity. * List an Identity\'s Sessions */ listIdentitySessions(requestParameters: ListIdentitySessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Session>>; /** * Listing all sessions that exist. * List All Sessions */ listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Session>>>; /** * Listing all sessions that exist. * List All Sessions */ listSessions(requestParameters?: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Session>>; /** * Partially updates an [identity\'s](https://www.ory.sh/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. * Patch an Identity */ patchIdentityRaw(requestParameters: PatchIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * Partially updates an [identity\'s](https://www.ory.sh/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. * Patch an Identity */ patchIdentity(requestParameters: PatchIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; /** * This endpoint updates an [identity](https://www.ory.sh/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. * Update an Identity */ updateIdentityRaw(requestParameters: UpdateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Identity>>; /** * This endpoint updates an [identity](https://www.ory.sh/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. * Update an Identity */ updateIdentity(requestParameters: UpdateIdentityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Identity>; } /** * @export */ export declare const DeleteIdentityCredentialsTypeEnum: { readonly Password: "password"; readonly Oidc: "oidc"; readonly Totp: "totp"; readonly LookupSecret: "lookup_secret"; readonly Webauthn: "webauthn"; readonly Code: "code"; readonly Passkey: "passkey"; readonly Profile: "profile"; readonly Saml: "saml"; readonly LinkRecovery: "link_recovery"; readonly CodeRecovery: "code_recovery"; readonly UnknownDefaultOpenApi: "11184809"; }; export type DeleteIdentityCredentialsTypeEnum = typeof DeleteIdentityCredentialsTypeEnum[keyof typeof DeleteIdentityCredentialsTypeEnum]; /** * @export */ export declare const GetIdentityIncludeCredentialEnum: { readonly Password: "password"; readonly Oidc: "oidc"; readonly Totp: "totp"; readonly LookupSecret: "lookup_secret"; readonly Webauthn: "webauthn"; readonly Code: "code"; readonly Passkey: "passkey"; readonly Profile: "profile"; readonly Saml: "saml"; readonly LinkRecovery: "link_recovery"; readonly CodeRecovery: "code_recovery"; readonly UnknownDefaultOpenApi: "11184809"; }; export type GetIdentityIncludeCredentialEnum = typeof GetIdentityIncludeCredentialEnum[keyof typeof GetIdentityIncludeCredentialEnum]; /** * @export */ export declare const GetSessionExpandEnum: { readonly Identity: "identity"; readonly Devices: "devices"; readonly UnknownDefaultOpenApi: "11184809"; }; export type GetSessionExpandEnum = typeof GetSessionExpandEnum[keyof typeof GetSessionExpandEnum]; /** * @export */ export declare const ListIdentitiesConsistencyEnum: { readonly Empty: ""; readonly Strong: "strong"; readonly Eventual: "eventual"; readonly UnknownDefaultOpenApi: "11184809"; }; export type ListIdentitiesConsistencyEnum = typeof ListIdentitiesConsistencyEnum[keyof typeof ListIdentitiesConsistencyEnum]; /** * @export */ export declare const ListSessionsExpandEnum: { readonly Identity: "identity"; readonly Devices: "devices"; readonly UnknownDefaultOpenApi: "11184809"; }; export type ListSessionsExpandEnum = typeof ListSessionsExpandEnum[keyof typeof ListSessionsExpandEnum];