/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { ExpirationConfig } from '../../../../../../yandex/cloud/ai/common/common'; import { FieldMask } from '../../../../../../google/protobuf/field_mask'; import { MessageData } from '../../../../../../yandex/cloud/ai/assistants/v1/threads/message'; import { Tool } from '../../../../../../yandex/cloud/ai/assistants/v1/common'; import { Thread } from '../../../../../../yandex/cloud/ai/assistants/v1/threads/thread'; export declare const protobufPackage = "yandex.cloud.ai.assistants.v1.threads"; /** Request message for creating a new thread. */ export interface CreateThreadRequest { folderId: string; /** List of messages to initialize the thread. */ messages: MessageData[]; /** Name of the thread. */ name: string; /** Description of the thread. */ description: string; /** Default user ID that will be used as the author for thread messages if no other author is specified. */ defaultMessageAuthorId: string; /** Expiration configuration for the thread. */ expirationConfig?: ExpirationConfig; /** Set of key-value pairs to label the thread. */ labels: { [key: string]: string; }; /** List of tools that are available for assistants to use in this thread. */ tools: Tool[]; } export interface CreateThreadRequest_LabelsEntry { key: string; value: string; } /** Request message for retrieving a thread by ID. */ export interface GetThreadRequest { /** ID of the thread to retrieve. */ threadId: string; } /** Request message for updating an existing thread. */ export interface UpdateThreadRequest { /** ID of the thread to update. */ threadId: string; /** Field mask specifying which fields to update. */ updateMask?: FieldMask; /** New name for the thread. */ name: string; /** New description for the thread. */ description: string; /** New expiration configuration for the thread. */ expirationConfig?: ExpirationConfig; /** New set of labels for the thread. */ labels: { [key: string]: string; }; /** A new list of tools that are available for assistants to use in this thread. */ tools: Tool[]; } export interface UpdateThreadRequest_LabelsEntry { key: string; value: string; } /** Request message for deleting a thread by ID. */ export interface DeleteThreadRequest { /** ID of the thread to delete. */ threadId: string; } /** Response message for the delete operation. */ export interface DeleteThreadResponse { } /** Request message for listing threads in a specific folder. */ export interface ListThreadsRequest { /** Folder ID from which to list threads. */ folderId: string; /** Maximum number of threads to return per page. */ pageSize: number; /** Token to retrieve the next page of results. */ pageToken: string; } /** Response message for the list operation. */ export interface ListThreadsResponse { /** List of threads in the specified folder. */ threads: Thread[]; /** Token to retrieve the next page of results. */ nextPageToken: string; } export declare const CreateThreadRequest: { encode(message: CreateThreadRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateThreadRequest; fromJSON(object: any): CreateThreadRequest; toJSON(message: CreateThreadRequest): unknown; fromPartial, never>) | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; content?: ({ content?: { text?: { content?: string | undefined; } | undefined; }[] | undefined; } & { content?: ({ text?: { content?: string | undefined; } | undefined; }[] & ({ text?: { content?: string | undefined; } | undefined; } & { text?: ({ content?: string | undefined; } & { content?: string | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; name?: string | undefined; description?: string | undefined; defaultMessageAuthorId?: string | undefined; expirationConfig?: ({ expirationPolicy?: import("../../../../../../yandex/cloud/ai/common/common").ExpirationConfig_ExpirationPolicy | undefined; ttlDays?: number | undefined; } & { expirationPolicy?: import("../../../../../../yandex/cloud/ai/common/common").ExpirationConfig_ExpirationPolicy | undefined; ttlDays?: number | undefined; } & Record, never>) | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; tools?: ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; }[] & ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; } & { searchIndex?: ({ searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } & { searchIndexIds?: (string[] & string[] & Record, never>) | undefined; maxNumResults?: number | undefined; rephraserOptions?: ({ rephraserUri?: string | undefined; } & { rephraserUri?: string | undefined; } & Record, never>) | undefined; callStrategy?: ({ alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } & { alwaysCall?: ({} & {} & Record, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; function?: ({ name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } & { name?: string | undefined; description?: string | undefined; parameters?: ({ [x: string]: any; } & { [x: string]: any; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): CreateThreadRequest; }; export declare const CreateThreadRequest_LabelsEntry: { encode(message: CreateThreadRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateThreadRequest_LabelsEntry; fromJSON(object: any): CreateThreadRequest_LabelsEntry; toJSON(message: CreateThreadRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): CreateThreadRequest_LabelsEntry; }; export declare const GetThreadRequest: { encode(message: GetThreadRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetThreadRequest; fromJSON(object: any): GetThreadRequest; toJSON(message: GetThreadRequest): unknown; fromPartial, never>>(object: I): GetThreadRequest; }; export declare const UpdateThreadRequest: { encode(message: UpdateThreadRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateThreadRequest; fromJSON(object: any): UpdateThreadRequest; toJSON(message: UpdateThreadRequest): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; name?: string | undefined; description?: string | undefined; expirationConfig?: ({ expirationPolicy?: import("../../../../../../yandex/cloud/ai/common/common").ExpirationConfig_ExpirationPolicy | undefined; ttlDays?: number | undefined; } & { expirationPolicy?: import("../../../../../../yandex/cloud/ai/common/common").ExpirationConfig_ExpirationPolicy | undefined; ttlDays?: number | undefined; } & Record, never>) | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; tools?: ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; }[] & ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; } & { searchIndex?: ({ searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } & { searchIndexIds?: (string[] & string[] & Record, never>) | undefined; maxNumResults?: number | undefined; rephraserOptions?: ({ rephraserUri?: string | undefined; } & { rephraserUri?: string | undefined; } & Record, never>) | undefined; callStrategy?: ({ alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } & { alwaysCall?: ({} & {} & Record, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; function?: ({ name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } & { name?: string | undefined; description?: string | undefined; parameters?: ({ [x: string]: any; } & { [x: string]: any; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): UpdateThreadRequest; }; export declare const UpdateThreadRequest_LabelsEntry: { encode(message: UpdateThreadRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateThreadRequest_LabelsEntry; fromJSON(object: any): UpdateThreadRequest_LabelsEntry; toJSON(message: UpdateThreadRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): UpdateThreadRequest_LabelsEntry; }; export declare const DeleteThreadRequest: { encode(message: DeleteThreadRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteThreadRequest; fromJSON(object: any): DeleteThreadRequest; toJSON(message: DeleteThreadRequest): unknown; fromPartial, never>>(object: I): DeleteThreadRequest; }; export declare const DeleteThreadResponse: { encode(_: DeleteThreadResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteThreadResponse; fromJSON(_: any): DeleteThreadResponse; toJSON(_: DeleteThreadResponse): unknown; fromPartial, never>>(_: I): DeleteThreadResponse; }; export declare const ListThreadsRequest: { encode(message: ListThreadsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListThreadsRequest; fromJSON(object: any): ListThreadsRequest; toJSON(message: ListThreadsRequest): unknown; fromPartial, never>>(object: I): ListThreadsRequest; }; export declare const ListThreadsResponse: { encode(message: ListThreadsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListThreadsResponse; fromJSON(object: any): ListThreadsResponse; toJSON(message: ListThreadsResponse): unknown; fromPartial, never>) | undefined; expiresAt?: Date | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; tools?: ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; }[] & ({ searchIndex?: { searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } | undefined; function?: { name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } | undefined; } & { searchIndex?: ({ searchIndexIds?: string[] | undefined; maxNumResults?: number | undefined; rephraserOptions?: { rephraserUri?: string | undefined; } | undefined; callStrategy?: { alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } | undefined; } & { searchIndexIds?: (string[] & string[] & Record, never>) | undefined; maxNumResults?: number | undefined; rephraserOptions?: ({ rephraserUri?: string | undefined; } & { rephraserUri?: string | undefined; } & Record, never>) | undefined; callStrategy?: ({ alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } & { alwaysCall?: ({} & {} & Record, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; function?: ({ name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } & { name?: string | undefined; description?: string | undefined; parameters?: ({ [x: string]: any; } & { [x: string]: any; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListThreadsResponse; }; /** ThreadService provides operations for managing threads. */ export declare const ThreadServiceService: { /** Create a new thread. */ readonly create: { readonly path: "/yandex.cloud.ai.assistants.v1.threads.ThreadService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateThreadRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateThreadRequest; readonly responseSerialize: (value: Thread) => Buffer; readonly responseDeserialize: (value: Buffer) => Thread; }; /** Retrieve details of a specific thread by its ID. */ readonly get: { readonly path: "/yandex.cloud.ai.assistants.v1.threads.ThreadService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetThreadRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetThreadRequest; readonly responseSerialize: (value: Thread) => Buffer; readonly responseDeserialize: (value: Buffer) => Thread; }; /** Update an existing thread. */ readonly update: { readonly path: "/yandex.cloud.ai.assistants.v1.threads.ThreadService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateThreadRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateThreadRequest; readonly responseSerialize: (value: Thread) => Buffer; readonly responseDeserialize: (value: Buffer) => Thread; }; /** Delete a thread by its ID. */ readonly delete: { readonly path: "/yandex.cloud.ai.assistants.v1.threads.ThreadService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteThreadRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteThreadRequest; readonly responseSerialize: (value: DeleteThreadResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => DeleteThreadResponse; }; /** List threads in a specific folder. */ readonly list: { readonly path: "/yandex.cloud.ai.assistants.v1.threads.ThreadService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListThreadsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListThreadsRequest; readonly responseSerialize: (value: ListThreadsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListThreadsResponse; }; }; export interface ThreadServiceServer extends UntypedServiceImplementation { /** Create a new thread. */ create: handleUnaryCall; /** Retrieve details of a specific thread by its ID. */ get: handleUnaryCall; /** Update an existing thread. */ update: handleUnaryCall; /** Delete a thread by its ID. */ delete: handleUnaryCall; /** List threads in a specific folder. */ list: handleUnaryCall; } export interface ThreadServiceClient extends Client { /** Create a new thread. */ create(request: CreateThreadRequest, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; create(request: CreateThreadRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; create(request: CreateThreadRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; /** Retrieve details of a specific thread by its ID. */ get(request: GetThreadRequest, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; get(request: GetThreadRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; get(request: GetThreadRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; /** Update an existing thread. */ update(request: UpdateThreadRequest, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; update(request: UpdateThreadRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; update(request: UpdateThreadRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Thread) => void): ClientUnaryCall; /** Delete a thread by its ID. */ delete(request: DeleteThreadRequest, callback: (error: ServiceError | null, response: DeleteThreadResponse) => void): ClientUnaryCall; delete(request: DeleteThreadRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteThreadResponse) => void): ClientUnaryCall; delete(request: DeleteThreadRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: DeleteThreadResponse) => void): ClientUnaryCall; /** List threads in a specific folder. */ list(request: ListThreadsRequest, callback: (error: ServiceError | null, response: ListThreadsResponse) => void): ClientUnaryCall; list(request: ListThreadsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListThreadsResponse) => void): ClientUnaryCall; list(request: ListThreadsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListThreadsResponse) => void): ClientUnaryCall; } export declare const ThreadServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): ThreadServiceClient; service: typeof ThreadServiceService; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};
= P extends Builtin ? P : P & { [K in keyof P]: Exact
; } & Record>, never>; export {};