/** * 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 Analytics { 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 Analytics { protected readonly _options: Analytics.Options; constructor(_options?: Analytics.Options); /** * @param {string} domain * @param {FernAI.GetAnalyticsHistogramRequest} request * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.analytics.getAnalyticsHistogram("domain", { * start_date: "2024-01-15T09:30:00Z", * end_date: "2024-01-15T09:30:00Z", * group_by: "DAY" * }) */ getAnalyticsHistogram(domain: string, request?: FernAI.GetAnalyticsHistogramRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __getAnalyticsHistogram; /** * Generate insights for all domains with queries in the specified period. * * @param {FernAI.GenerateAllInsightsRequest} request * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.analytics.generateAllInsights({ * start_date: "2024-01-15T09:30:00Z", * end_date: "2024-01-15T09:30:00Z" * }) */ generateAllInsights(request?: FernAI.GenerateAllInsightsRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __generateAllInsights; /** * Manually trigger the scheduled weekly insights generation job. * * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.analytics.triggerScheduledInsightsGeneration() */ triggerScheduledInsightsGeneration(requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __triggerScheduledInsightsGeneration; /** * Get the most recent insights for a domain. * * @param {string} domain * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.analytics.getQueryInsights("domain") */ getQueryInsights(domain: string, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __getQueryInsights; /** * Get the status of the scheduler and its jobs. * * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.analytics.getSchedulerStatus() */ getSchedulerStatus(requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __getSchedulerStatus; /** * Get conversation resolution metrics for a domain in a given time period. * * @param {string} domain * @param {FernAI.GetConversationResolutionRequest} request * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.analytics.getConversationResolution("domain", { * start_date: "2024-01-15T09:30:00Z", * end_date: "2024-01-15T09:30:00Z" * }) */ getConversationResolution(domain: string, request?: FernAI.GetConversationResolutionRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise; private __getConversationResolution; protected _getAuthorizationHeader(): Promise; }