import { type Client } from '../../../../seam/connect/client.js'; import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../seam/connect/options.js'; import type { ClientSession } from '../../../../seam/connect/resources/client-session.js'; import { SeamHttpRequest } from '../../../../seam/connect/seam-http-request.js'; import { SeamPaginator } from '../../../../seam/connect/seam-paginator.js'; export declare class SeamHttpClientSessions { client: Client; readonly defaults: Required; readonly ltsVersion = "1.0.0"; static ltsVersion: string; constructor(apiKeyOrOptions?: string | SeamHttpOptions); static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit): SeamHttpClientSessions; static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit): SeamHttpClientSessions; static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit): SeamHttpClientSessions; static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise; static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit): SeamHttpClientSessions; static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit): SeamHttpClientSessions; createPaginator(request: SeamHttpRequest): SeamPaginator; updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise; /** * Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ create(parameters?: ClientSessionsCreateParameters, options?: ClientSessionsCreateOptions): ClientSessionsCreateRequest; /** * Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ delete(parameters: ClientSessionsDeleteParameters, options?: ClientSessionsDeleteOptions): ClientSessionsDeleteRequest; /** * Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ get(parameters?: ClientSessionsGetParameters, options?: ClientSessionsGetOptions): ClientSessionsGetRequest; /** * Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. */ getOrCreate(parameters?: ClientSessionsGetOrCreateParameters, options?: ClientSessionsGetOrCreateOptions): ClientSessionsGetOrCreateRequest; /** * Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. */ grantAccess(parameters?: ClientSessionsGrantAccessParameters, options?: ClientSessionsGrantAccessOptions): ClientSessionsGrantAccessRequest; /** * Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ list(parameters?: ClientSessionsListParameters, options?: ClientSessionsListOptions): ClientSessionsListRequest; /** * Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). * * Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. */ revoke(parameters: ClientSessionsRevokeParameters, options?: ClientSessionsRevokeOptions): ClientSessionsRevokeRequest; } export type ClientSessionsCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session. */ connect_webview_ids?: Array | undefined; /** * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session. */ connected_account_ids?: Array | undefined; /** * Customer ID that you want to associate with the new client session. */ customer_id?: string | undefined; /** * Customer key that you want to associate with the new client session. */ customer_key?: string | undefined; /** * Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */ expires_at?: string | undefined; /** * Your user ID for the user for whom you want to create a client session. */ user_identifier_key?: string | undefined; /** * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. */ user_identity_id?: string | undefined; /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. * @deprecated Use `user_identity_id` instead. */ user_identity_ids?: Array | undefined; }; /** * @deprecated Use ClientSessionsCreateRequest instead. */ export type ClientSessionsCreateResponse = { client_session: ClientSession; }; export type ClientSessionsCreateRequest = SeamHttpRequest; export interface ClientSessionsCreateOptions { } export type ClientSessionsDeleteParameters = { /** * ID of the client session that you want to delete. */ client_session_id: string; }; /** * @deprecated Use ClientSessionsDeleteRequest instead. */ export type ClientSessionsDeleteResponse = void; export type ClientSessionsDeleteRequest = SeamHttpRequest; export interface ClientSessionsDeleteOptions { } export type ClientSessionsGetParameters = { /** * ID of the client session that you want to get. */ client_session_id?: string | undefined; /** * User identifier key associated with the client session that you want to get. */ user_identifier_key?: string | undefined; }; /** * @deprecated Use ClientSessionsGetRequest instead. */ export type ClientSessionsGetResponse = { client_session: ClientSession; }; export type ClientSessionsGetRequest = SeamHttpRequest; export interface ClientSessionsGetOptions { } export type ClientSessionsGetOrCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). */ connect_webview_ids?: Array | undefined; /** * IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session). */ connected_account_ids?: Array | undefined; /** * Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. */ expires_at?: string | undefined; /** * Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). */ user_identifier_key?: string | undefined; /** * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). */ user_identity_id?: string | undefined; /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. * @deprecated Use `user_identity_id`. */ user_identity_ids?: Array | undefined; }; /** * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ export type ClientSessionsGetOrCreateResponse = { client_session: ClientSession; }; export type ClientSessionsGetOrCreateRequest = SeamHttpRequest; export interface ClientSessionsGetOrCreateOptions { } export type ClientSessionsGrantAccessParameters = { /** * ID of the client session to which you want to grant access to resources. */ client_session_id?: string | undefined; /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session. */ connect_webview_ids?: Array | undefined; /** * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session. */ connected_account_ids?: Array | undefined; /** * Your user ID for the user that you want to associate with the client session. */ user_identifier_key?: string | undefined; /** * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. */ user_identity_id?: string | undefined; /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. * @deprecated Use `user_identity_id`. */ user_identity_ids?: Array | undefined; }; /** * @deprecated Use ClientSessionsGrantAccessRequest instead. */ export type ClientSessionsGrantAccessResponse = void; export type ClientSessionsGrantAccessRequest = SeamHttpRequest; export interface ClientSessionsGrantAccessOptions { } export type ClientSessionsListParameters = { /** * ID of the client session that you want to retrieve. */ client_session_id?: string | undefined; /** * ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions. */ connect_webview_id?: string | undefined; /** * Your user ID for the user by which you want to filter client sessions. */ user_identifier_key?: string | undefined; /** * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. */ user_identity_id?: string | undefined; /** * Indicates whether to retrieve only client sessions without associated user identifier keys. */ without_user_identifier_key?: boolean | undefined; }; /** * @deprecated Use ClientSessionsListRequest instead. */ export type ClientSessionsListResponse = { client_sessions: Array; }; export type ClientSessionsListRequest = SeamHttpRequest; export interface ClientSessionsListOptions { } export type ClientSessionsRevokeParameters = { /** * ID of the client session that you want to revoke. */ client_session_id: string; }; /** * @deprecated Use ClientSessionsRevokeRequest instead. */ export type ClientSessionsRevokeResponse = void; export type ClientSessionsRevokeRequest = SeamHttpRequest; export interface ClientSessionsRevokeOptions { }