/** * 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 FernAI from "../../../index.js"; export declare namespace Settings { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token?: core.Supplier; /** 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>; } } export declare class Settings { protected readonly _options: Settings.Options; constructor(_options?: Settings.Options); /** * Get settings for a domain and organization. * * @param {FernAI.GetDocsSettingsRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.getDocsSettings({ * domain: "domain" * }) */ getDocsSettings(request: FernAI.GetDocsSettingsRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __getDocsSettings; /** * Get settings for a domain and organization. * * @param {FernAI.GetSlackSettingsRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.getSlackSettings({ * domain: "domain" * }) */ getSlackSettings(request: FernAI.GetSlackSettingsRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __getSlackSettings; /** * Get settings for a domain and organization. * * @param {FernAI.GetDiscordSettingsRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.getDiscordSettings({ * domain: "domain" * }) */ getDiscordSettings(request: FernAI.GetDiscordSettingsRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __getDiscordSettings; /** * Enable Ask AI for multiple domains with specified locations and trigger reindex. * * Args: * request: Request containing domains, org_name, and locations to enable * * @param {FernAI.EnableAskAiRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.enableAskAi({ * domains: ["domains"], * org_name: "org_name", * locations: ["locations"] * }) */ enableAskAi(request: FernAI.EnableAskAiRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __enableAskAi; /** * Toggle Ask AI setting and return job_id for tracking. * * Args: * domain: Domain to toggle Ask AI for * org_name: Organization name * preview: Whether this is a preview deployment * locations: Optional list of locations to enable. Valid values: docs, slack, discord * * @param {FernAI.ToggleAskAiRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.toggleAskAi({ * domain: "domain", * org_name: "org_name", * preview: true * }) */ toggleAskAi(request: FernAI.ToggleAskAiRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __toggleAskAi; /** * Manually trigger reindex for an already enabled Ask AI setup. * * @param {FernAI.ReindexAskAiRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.reindexAskAi({ * domain: "domain", * org_name: "org_name" * }) */ reindexAskAi(request: FernAI.ReindexAskAiRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __reindexAskAi; /** * Get the status of Ask AI toggle operation. * * @param {FernAI.GetToggleStatusRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.getToggleStatus({ * domain: "domain" * }) */ getToggleStatus(request: FernAI.GetToggleStatusRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __getToggleStatus; /** * Set the job_id for a domain when reindex starts processing. * * @param {FernAI.SetJobIdRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.setJobId({ * domain: "domain", * job_id: "job_id" * }) */ setJobId(request: FernAI.SetJobIdRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __setJobId; /** * Handle callback from SQS reindexing worker when reindex completes. * * @param {FernAI.ReindexCallbackRequest} request * @param {Settings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.settings.reindexCallback({ * status: "success", * sourceMessageId: "sourceMessageId" * }) */ reindexCallback(request: FernAI.ReindexCallbackRequest, requestOptions?: Settings.RequestOptions): core.HttpResponsePromise; private __reindexCallback; protected _getAuthorizationHeader(): Promise; }