/** * 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 Code { 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 Code { protected readonly _options: Code.Options; constructor(_options?: Code.Options); /** * @param {string} domain * @param {FernAI.CreateCodeRecordRequest} request * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.createCodeRecord("domain", { * document: "document" * }) */ createCodeRecord(domain: string, request: FernAI.CreateCodeRecordRequest, requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __createCodeRecord; /** * @param {string} domain * @param {FernAI.CreateCodeRecordRequest[]} request * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.batchCreateCodeRecords("domain", [{ * document: "document" * }]) */ batchCreateCodeRecords(domain: string, request: FernAI.CreateCodeRecordRequest[], requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __batchCreateCodeRecords; /** * @param {string} domain * @param {string} codeId * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.getCodeRecordById("domain", "code_id") */ getCodeRecordById(domain: string, codeId: string, requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __getCodeRecordById; /** * @param {string} domain * @param {FernAI.GetCodeRecordsRequest} request * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.getCodeRecords("domain", { * page: 1, * limit: 1 * }) */ getCodeRecords(domain: string, request?: FernAI.GetCodeRecordsRequest, requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __getCodeRecords; /** * @param {string} domain * @param {FernAI.DeleteCodeRecordRequest} request * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.deleteCodeRecordById("domain", { * code_id: "code_id" * }) */ deleteCodeRecordById(domain: string, request: FernAI.DeleteCodeRecordRequest, requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __deleteCodeRecordById; /** * @param {string} domain * @param {Code.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.code.deleteAllCodeRecords("domain") */ deleteAllCodeRecords(domain: string, requestOptions?: Code.RequestOptions): core.HttpResponsePromise; private __deleteAllCodeRecords; protected _getAuthorizationHeader(): Promise; }