import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Corti from "../../../index.js"; import { ClassicClient } from "../resources/classic/client/Client.js"; import { SectionsClient } from "../resources/sections/client/Client.js"; import { TemplatesClient } from "../resources/templates/client/Client.js"; export declare namespace DocumentsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class DocumentsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _classic: ClassicClient | undefined; protected _templates: TemplatesClient | undefined; protected _sections: SectionsClient | undefined; constructor(options: DocumentsClient.Options); get classic(): ClassicClient; get templates(): TemplatesClient; get sections(): SectionsClient; /** * Guided Documents list (`GET /documents/`). For classic interaction-scoped documents, use `client.documents.classic.list`. * * Returns a list of previously generated documents. * Use query parameters to filter by template, interaction, or label. * * @param {Corti.GuidedDocumentsListRequest} request * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Corti.BadRequestError} * * @example * await client.documents.list() */ list(request?: Corti.GuidedDocumentsListRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Generates a structured document using one of three template-supply paths: a stored template reference (optionally with runtime overrides), an ad-hoc assembly of stored sections, or a fully inline dynamic template. Exactly one of `templateRef`, `assemblyTemplate`, or `dynamicTemplate` must be provided. * Context can combine different types or reference an interactionId to automatically fetch existing context to pass to the LLM. Note that discarded facts are not passed to the LLM. * With the exception of the plain `templateRef` path (no overrides), every call creates a new auto-generated template aggregate that snapshots the resolved prompts as a drift-proof receipt, persisted for 30 days. * * @param {Corti.GuidedDocumentsGenerateRequest} request * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Corti.BadRequestError} * @throws {@link Corti.NotFoundError} * @throws {@link Corti.UnprocessableEntityError} * @throws {@link Corti.InternalServerError} * * @example * await client.documents.generate({ * outputLanguage: "outputLanguage", * templateRef: { * templateId: "templateId" * } * }) */ generate(request: Corti.GuidedDocumentsGenerateRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __generate; /** * Guided Documents get (`GET /documents/{documentID}`). For classic interaction-scoped documents, use `client.documents.classic.get`. * * Returns a previously generated document by ID, including its rendered string output * and structured object. * * @param {string} documentID * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Corti.NotFoundError} * * @example * await client.documents.get("documentID") */ get(documentID: string, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Guided Documents delete (`DELETE /documents/{documentID}`). For classic interaction-scoped documents, use `client.documents.classic.delete`. * * Deletes the document. This cannot be undone. * * @param {string} documentID * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Corti.NotFoundError} * * @example * await client.documents.delete("documentID") */ delete(documentID: string, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Guided Documents update (`PATCH /documents/{documentID}`). For classic interaction-scoped documents, use `client.documents.classic.update`. * * Updates the document's `name`, `labels`, or rendered output (`stringDocument` / `structuredDocument`). * Use this to persist edits made to a previously generated document. * * @param {string} documentID * @param {Corti.GuidedDocumentsUpdateRequest} request * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Corti.BadRequestError} * @throws {@link Corti.NotFoundError} * * @example * await client.documents.update("documentID") */ update(documentID: string, request?: Corti.GuidedDocumentsUpdateRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __update; }