/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Mercoa from "../../../index.js"; import { NotificationConfiguration } from "../resources/notificationConfiguration/client/Client.js"; export declare namespace Organization { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token: core.Supplier; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; /** Additional headers to include in requests. */ headers?: Record | undefined>; } 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 query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; } } export declare class Organization { protected readonly _options: Organization.Options; protected _notificationConfiguration: NotificationConfiguration | undefined; constructor(_options: Organization.Options); get notificationConfiguration(): NotificationConfiguration; /** * Get current organization information * * @param {Mercoa.organization.GetOrganizationRequest} request * @param {Organization.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.organization.get() */ get(request?: Mercoa.organization.GetOrganizationRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise; private __get; /** * Update current organization * * @param {Mercoa.OrganizationRequest} request * @param {Organization.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.organization.update({}) */ update(request: Mercoa.OrganizationRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise; private __update; /** * Get log of all emails sent to this organization. Content format subject to change. * * @param {Mercoa.organization.GetEmailLogRequest} request * @param {Organization.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.organization.emailLog() */ emailLog(request?: Mercoa.organization.GetEmailLogRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise; private __emailLog; /** * Invalidate all JWT tokens for the current organization. This is considered a break-glass action and should be used only if tokens have been compromised. All tokens will be invalidated, including tokens on links, emails, and currently logged in sessions. API keys are not affected by this action. This action may take 60 seconds to propagate. * * @param {Mercoa.organization.InvalidateTokensRequest} request * @param {Organization.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.organization.invalidateTokens({ * sessionId: ["session_123", "session_456"] * }) * * @example * await client.organization.invalidateTokens() */ invalidateTokens(request?: Mercoa.organization.InvalidateTokensRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise; private __invalidateTokens; protected _getAuthorizationHeader(): Promise; }