/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Airtop from "../../../index"; export declare namespace Sessions { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Sessions { protected readonly _options: Sessions.Options; constructor(_options: Sessions.Options); /** * Get a paginated list of sessions filtered by ID or status * * @param {Airtop.SessionsListRequest} request * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Airtop.NotFoundError} * @throws {@link Airtop.UnprocessableEntityError} * @throws {@link Airtop.InternalServerError} * * @example * await client.sessions.list({ * offset: 1, * limit: 10 * }) */ list(request?: Airtop.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise; /** * @param {Airtop.SessionRestInputV1} request * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.sessions.create() */ create(request?: Airtop.SessionRestInputV1, requestOptions?: Sessions.RequestOptions): Promise; /** * Get a session by ID * * @param {string} id - Id of the session to get * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Airtop.NotFoundError} * @throws {@link Airtop.UnprocessableEntityError} * @throws {@link Airtop.InternalServerError} * * @example * await client.sessions.getInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b") */ getInfo(id: string, requestOptions?: Sessions.RequestOptions): Promise; /** * Ends a session by ID. If a given session id does not exist within the organization, it is ignored. * * @param {string} id - ID of the session to delete. * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.sessions.terminate("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b") */ terminate(id: string, requestOptions?: Sessions.RequestOptions): Promise; /** * Get a session event stream for a given session ID */ events(id: string, request?: Airtop.SessionsEventsRequest, requestOptions?: Sessions.RequestOptions): Promise>; /** * @param {string} sessionId - ID of the session. * @param {string} profileName - Name under which to save the profile. * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.sessions.saveProfileOnTermination("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "myProfile") */ saveProfileOnTermination(sessionId: string, profileName: string, requestOptions?: Sessions.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }