import { APIResource } from "../../core/resource.mjs"; import * as SharedAPI from "./shared.mjs"; import { Shared, SharedCloneParams, SharedCloneResponse, SharedDeleteParams, SharedDeleteResponse, SharedListParams, SharedRetrieveParams } from "./shared.mjs"; import * as ConversationsAPI from "../conversations/conversations.mjs"; import * as ShareAPI from "../conversations/share.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class ConversationLegacy extends APIResource { shared: SharedAPI.Shared; /** * Create a new conversation with optional title. NOTE: This endpoint is DEPRECATED * and will be removed soon. Please use `POST /conversations` instead. * * @deprecated Use `conversations.create` instead. */ create(params: ConversationLegacyCreateParams, options?: RequestOptions): APIPromise; /** * Get messages from a specific conversation with optional limit and date * filtering. NOTE: This endpoint is DEPRECATED and will be removed soon. Please * use `GET /conversations/{conversation_id}` instead. * * @deprecated Use `conversations.messages.list` instead. */ retrieve(conversationID: string, params?: ConversationLegacyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Update a conversation document's status, number of chunks, and optional message * information. NOTE: This endpoint is DEPRECATED and will be removed soon. Please * use `PATCH /conversations/documents/{document_id}` instead. * * @deprecated Use `conversations.documents.update` instead. */ update(documentID: string, params: ConversationLegacyUpdateParams, options?: RequestOptions): APIPromise; /** * Delete a specific conversation by ID and remove any associated attachments and * vector DB documents. NOTE: This endpoint is DEPRECATED and will be removed soon. * Please use `DELETE /conversations/{conversation_id}` instead. * * @deprecated Use `conversations.delete` instead. */ delete(conversationID: string, params?: ConversationLegacyDeleteParams | null | undefined, options?: RequestOptions): APIPromise; /** * Generate a title for an existing conversation based on its content. NOTE: This * endpoint is DEPRECATED and will be removed soon. Please use * `POST /conversations/{conversation_id}/generate-title` instead. * * @deprecated Use `conversations.title.generate` instead. */ generateTitle(conversationID: string, params: ConversationLegacyGenerateTitleParams, options?: RequestOptions): APIPromise; /** * Rename an existing conversation with a new title. NOTE: This endpoint is * DEPRECATED and will be removed soon. Please use * `PATCH /conversations/{conversation_id}` instead. * * @deprecated Use `conversations.update` instead. */ rename(conversationID: string, params: ConversationLegacyRenameParams, options?: RequestOptions): APIPromise; /** * Create a shareable link for a conversation with optional expiry days. NOTE: This * endpoint is DEPRECATED and will be removed soon. Please use * `POST /conversations/{conversation_id}/share` instead. * * @deprecated Use `conversations.share.createOrUpdate` instead. */ share(conversationID: string, params?: ConversationLegacyShareParams | null | undefined, options?: RequestOptions): APIPromise; } export type ConversationLegacyRetrieveResponse = { [key: string]: unknown; }; export type ConversationLegacyUpdateResponse = { [key: string]: unknown; }; export type ConversationLegacyDeleteResponse = { [key: string]: unknown; }; export type ConversationLegacyGenerateTitleResponse = { [key: string]: unknown; }; export interface ConversationLegacyCreateParams { /** * Body param */ chatbot_id: string; /** * Body param */ user_id: string; /** * Body param */ metadata_?: string | null; /** * Body param */ model_name?: string; /** * Body param */ title?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyRetrieveParams { /** * Query param */ limit?: number | null; /** * Query param */ max_date?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyUpdateParams { /** * Body param */ number_of_chunks: number; /** * Body param */ status: string; /** * Body param */ message?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyDeleteParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyGenerateTitleParams { /** * Body param */ message: string; /** * Body param */ anonymize_lm?: boolean; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyRenameParams { /** * Body param */ title: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ConversationLegacyShareParams { /** * Body param */ expiry_days?: number | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace ConversationLegacy { export { type ConversationLegacyRetrieveResponse as ConversationLegacyRetrieveResponse, type ConversationLegacyUpdateResponse as ConversationLegacyUpdateResponse, type ConversationLegacyDeleteResponse as ConversationLegacyDeleteResponse, type ConversationLegacyGenerateTitleResponse as ConversationLegacyGenerateTitleResponse, type ConversationLegacyCreateParams as ConversationLegacyCreateParams, type ConversationLegacyRetrieveParams as ConversationLegacyRetrieveParams, type ConversationLegacyUpdateParams as ConversationLegacyUpdateParams, type ConversationLegacyDeleteParams as ConversationLegacyDeleteParams, type ConversationLegacyGenerateTitleParams as ConversationLegacyGenerateTitleParams, type ConversationLegacyRenameParams as ConversationLegacyRenameParams, type ConversationLegacyShareParams as ConversationLegacyShareParams, }; export { Shared as Shared, type SharedDeleteResponse as SharedDeleteResponse, type SharedCloneResponse as SharedCloneResponse, type SharedRetrieveParams as SharedRetrieveParams, type SharedListParams as SharedListParams, type SharedDeleteParams as SharedDeleteParams, type SharedCloneParams as SharedCloneParams, }; } //# sourceMappingURL=conversation-legacy.d.mts.map