/// 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 { File } from '../../../../../yandex/cloud/ai/files/v1/file'; export declare const protobufPackage = "yandex.cloud.ai.files.v1"; /** Request message for creating a new file. */ export interface CreateFileRequest { folderId: string; /** Name of the file. */ name: string; /** Description of the file. */ description: string; /** * MIME type of the file, indicating the file's format (e.g., "application/pdf"). * If not specified, will be deduced automatically based on the file content. */ mimeType: string; /** Binary content of the file. */ content: Buffer; /** Set of key-value pairs to label the file. */ labels: { [key: string]: string; }; /** Expiration configuration for the file. */ expirationConfig?: ExpirationConfig; } export interface CreateFileRequest_LabelsEntry { key: string; value: string; } /** Request message for retrieving a file by ID. */ export interface GetFileRequest { /** ID of the file to retrieve. */ fileId: string; } /** Request message for retrieving the URL of a specific file. */ export interface GetFileUrlRequest { /** ID of the file which the URL is requested. */ fileId: string; } /** Response message containing the URL to access the requested file. */ export interface GetFileUrlResponse { /** URL that can be used to access or download the file. */ url: string; } /** Request message for updating an existing file. */ export interface UpdateFileRequest { /** ID of the file to update. */ fileId: string; /** Field mask specifying which fields to update. */ updateMask?: FieldMask; /** New name for the file. */ name: string; /** New description for the file. */ description: string; /** New expiration configuration for the file. */ expirationConfig?: ExpirationConfig; /** New set of labels for the file. */ labels: { [key: string]: string; }; } export interface UpdateFileRequest_LabelsEntry { key: string; value: string; } /** Request message for deleting a file by ID. */ export interface DeleteFileRequest { /** ID of the file to delete. */ fileId: string; } /** Response message for the delete operation. */ export interface DeleteFileResponse { } /** Request message for listing files in a specific folder. */ export interface ListFilesRequest { /** Folder ID from which to list files. */ folderId: string; /** Maximum number of files to return per page. */ pageSize: number; /** Token to retrieve the next page of results. */ pageToken: string; } /** Response message for the list operation. */ export interface ListFilesResponse { /** List of files in the specified folder. */ files: File[]; /** Token to retrieve the next page of results. */ nextPageToken: string; } export declare const CreateFileRequest: { encode(message: CreateFileRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateFileRequest; fromJSON(object: any): CreateFileRequest; toJSON(message: CreateFileRequest): unknown; fromPartial, never>) | 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; } & Record, never>>(object: I): CreateFileRequest; }; export declare const CreateFileRequest_LabelsEntry: { encode(message: CreateFileRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateFileRequest_LabelsEntry; fromJSON(object: any): CreateFileRequest_LabelsEntry; toJSON(message: CreateFileRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): CreateFileRequest_LabelsEntry; }; export declare const GetFileRequest: { encode(message: GetFileRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetFileRequest; fromJSON(object: any): GetFileRequest; toJSON(message: GetFileRequest): unknown; fromPartial, never>>(object: I): GetFileRequest; }; export declare const GetFileUrlRequest: { encode(message: GetFileUrlRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetFileUrlRequest; fromJSON(object: any): GetFileUrlRequest; toJSON(message: GetFileUrlRequest): unknown; fromPartial, never>>(object: I): GetFileUrlRequest; }; export declare const GetFileUrlResponse: { encode(message: GetFileUrlResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetFileUrlResponse; fromJSON(object: any): GetFileUrlResponse; toJSON(message: GetFileUrlResponse): unknown; fromPartial, never>>(object: I): GetFileUrlResponse; }; export declare const UpdateFileRequest: { encode(message: UpdateFileRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateFileRequest; fromJSON(object: any): UpdateFileRequest; toJSON(message: UpdateFileRequest): 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; } & Record, never>>(object: I): UpdateFileRequest; }; export declare const UpdateFileRequest_LabelsEntry: { encode(message: UpdateFileRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateFileRequest_LabelsEntry; fromJSON(object: any): UpdateFileRequest_LabelsEntry; toJSON(message: UpdateFileRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): UpdateFileRequest_LabelsEntry; }; export declare const DeleteFileRequest: { encode(message: DeleteFileRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFileRequest; fromJSON(object: any): DeleteFileRequest; toJSON(message: DeleteFileRequest): unknown; fromPartial, never>>(object: I): DeleteFileRequest; }; export declare const DeleteFileResponse: { encode(_: DeleteFileResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFileResponse; fromJSON(_: any): DeleteFileResponse; toJSON(_: DeleteFileResponse): unknown; fromPartial, never>>(_: I): DeleteFileResponse; }; export declare const ListFilesRequest: { encode(message: ListFilesRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesRequest; fromJSON(object: any): ListFilesRequest; toJSON(message: ListFilesRequest): unknown; fromPartial, never>>(object: I): ListFilesRequest; }; export declare const ListFilesResponse: { encode(message: ListFilesResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListFilesResponse; fromJSON(object: any): ListFilesResponse; toJSON(message: ListFilesResponse): unknown; fromPartial, never>) | undefined; expiresAt?: Date | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListFilesResponse; }; /** FileService provides operations for managing files. */ export declare const FileServiceService: { /** Create a new file. */ readonly create: { readonly path: "/yandex.cloud.ai.files.v1.FileService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateFileRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateFileRequest; readonly responseSerialize: (value: File) => Buffer; readonly responseDeserialize: (value: Buffer) => File; }; /** Retrieve details of a specific file by its ID. */ readonly get: { readonly path: "/yandex.cloud.ai.files.v1.FileService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetFileRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetFileRequest; readonly responseSerialize: (value: File) => Buffer; readonly responseDeserialize: (value: Buffer) => File; }; /** Retrieve a URL for accessing or downloading a specific file. */ readonly getUrl: { readonly path: "/yandex.cloud.ai.files.v1.FileService/GetUrl"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetFileUrlRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetFileUrlRequest; readonly responseSerialize: (value: GetFileUrlResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => GetFileUrlResponse; }; /** Update an existing file. */ readonly update: { readonly path: "/yandex.cloud.ai.files.v1.FileService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateFileRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateFileRequest; readonly responseSerialize: (value: File) => Buffer; readonly responseDeserialize: (value: Buffer) => File; }; /** Delete a file by its ID. */ readonly delete: { readonly path: "/yandex.cloud.ai.files.v1.FileService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteFileRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteFileRequest; readonly responseSerialize: (value: DeleteFileResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => DeleteFileResponse; }; /** List files in a specific folder. */ readonly list: { readonly path: "/yandex.cloud.ai.files.v1.FileService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListFilesRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListFilesRequest; readonly responseSerialize: (value: ListFilesResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListFilesResponse; }; }; export interface FileServiceServer extends UntypedServiceImplementation { /** Create a new file. */ create: handleUnaryCall; /** Retrieve details of a specific file by its ID. */ get: handleUnaryCall; /** Retrieve a URL for accessing or downloading a specific file. */ getUrl: handleUnaryCall; /** Update an existing file. */ update: handleUnaryCall; /** Delete a file by its ID. */ delete: handleUnaryCall; /** List files in a specific folder. */ list: handleUnaryCall; } export interface FileServiceClient extends Client { /** Create a new file. */ create(request: CreateFileRequest, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; create(request: CreateFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; create(request: CreateFileRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; /** Retrieve details of a specific file by its ID. */ get(request: GetFileRequest, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; get(request: GetFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; get(request: GetFileRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; /** Retrieve a URL for accessing or downloading a specific file. */ getUrl(request: GetFileUrlRequest, callback: (error: ServiceError | null, response: GetFileUrlResponse) => void): ClientUnaryCall; getUrl(request: GetFileUrlRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetFileUrlResponse) => void): ClientUnaryCall; getUrl(request: GetFileUrlRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: GetFileUrlResponse) => void): ClientUnaryCall; /** Update an existing file. */ update(request: UpdateFileRequest, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; update(request: UpdateFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; update(request: UpdateFileRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: File) => void): ClientUnaryCall; /** Delete a file by its ID. */ delete(request: DeleteFileRequest, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall; delete(request: DeleteFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall; delete(request: DeleteFileRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall; /** List files in a specific folder. */ list(request: ListFilesRequest, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall; list(request: ListFilesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall; list(request: ListFilesRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall; } export declare const FileServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): FileServiceClient; service: typeof FileServiceService; }; 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 {};