/// 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 { User } from '../../../../../../yandex/cloud/ai/assistants/v1/users/user'; export declare const protobufPackage = "yandex.cloud.ai.assistants.v1.users"; /** Request message for creating a new user. */ export interface CreateUserRequest { folderId: string; /** Name of the user. */ name: string; /** Description of the user. */ description: string; source: string; /** Expiration configuration for the user. */ expirationConfig?: ExpirationConfig; /** Set of key-value pairs to label the user. */ labels: { [key: string]: string; }; } export interface CreateUserRequest_LabelsEntry { key: string; value: string; } /** Request message for retrieving a user by ID. */ export interface GetUserRequest { /** ID of the user to retrieve. */ userId: string; } /** Request message for updating an existing user. */ export interface UpdateUserRequest { /** ID of the user to update. */ userId: string; /** A field mask specifying which fields to update. */ updateMask?: FieldMask; /** New name for the user. */ name: string; /** New description for the user. */ description: string; /** New expiration configuration for the user. */ expirationConfig?: ExpirationConfig; /** New set of labels for the user. */ labels: { [key: string]: string; }; } export interface UpdateUserRequest_LabelsEntry { key: string; value: string; } /** Request message for deleting a user by ID. */ export interface DeleteUserRequest { /** ID of the user to delete. */ userId: string; } /** Response message for the delete operation. */ export interface DeleteUserResponse { } /** Request message for listing users in a specific folder. */ export interface ListUsersRequest { /** Folder ID from which to list users. */ folderId: string; /** Maximum number of users to return per page. */ pageSize: number; /** Token to retrieve the next page of results. */ pageToken: string; } /** Response message for the list operation. */ export interface ListUsersResponse { /** List of users in the specified folder. */ users: User[]; /** Token to retrieve the next page of results. */ nextPageToken: string; } export declare const CreateUserRequest: { encode(message: CreateUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserRequest; fromJSON(object: any): CreateUserRequest; toJSON(message: CreateUserRequest): unknown; fromPartial, never>) | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): CreateUserRequest; }; export declare const CreateUserRequest_LabelsEntry: { encode(message: CreateUserRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserRequest_LabelsEntry; fromJSON(object: any): CreateUserRequest_LabelsEntry; toJSON(message: CreateUserRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): CreateUserRequest_LabelsEntry; }; export declare const GetUserRequest: { encode(message: GetUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetUserRequest; fromJSON(object: any): GetUserRequest; toJSON(message: GetUserRequest): unknown; fromPartial, never>>(object: I): GetUserRequest; }; export declare const UpdateUserRequest: { encode(message: UpdateUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserRequest; fromJSON(object: any): UpdateUserRequest; toJSON(message: UpdateUserRequest): 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): UpdateUserRequest; }; export declare const UpdateUserRequest_LabelsEntry: { encode(message: UpdateUserRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserRequest_LabelsEntry; fromJSON(object: any): UpdateUserRequest_LabelsEntry; toJSON(message: UpdateUserRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): UpdateUserRequest_LabelsEntry; }; export declare const DeleteUserRequest: { encode(message: DeleteUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserRequest; fromJSON(object: any): DeleteUserRequest; toJSON(message: DeleteUserRequest): unknown; fromPartial, never>>(object: I): DeleteUserRequest; }; export declare const DeleteUserResponse: { encode(_: DeleteUserResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserResponse; fromJSON(_: any): DeleteUserResponse; toJSON(_: DeleteUserResponse): unknown; fromPartial, never>>(_: I): DeleteUserResponse; }; export declare const ListUsersRequest: { encode(message: ListUsersRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListUsersRequest; fromJSON(object: any): ListUsersRequest; toJSON(message: ListUsersRequest): unknown; fromPartial, never>>(object: I): ListUsersRequest; }; export declare const ListUsersResponse: { encode(message: ListUsersResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListUsersResponse; fromJSON(object: any): ListUsersResponse; toJSON(message: ListUsersResponse): 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): ListUsersResponse; }; /** UserService provides operations for managing users. */ export declare const UserServiceService: { /** Create a new user. */ readonly create: { readonly path: "/yandex.cloud.ai.assistants.v1.users.UserService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateUserRequest; readonly responseSerialize: (value: User) => Buffer; readonly responseDeserialize: (value: Buffer) => User; }; /** Retrieve details of a specific user by its ID. */ readonly get: { readonly path: "/yandex.cloud.ai.assistants.v1.users.UserService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetUserRequest; readonly responseSerialize: (value: User) => Buffer; readonly responseDeserialize: (value: Buffer) => User; }; /** Update an existing user. */ readonly update: { readonly path: "/yandex.cloud.ai.assistants.v1.users.UserService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateUserRequest; readonly responseSerialize: (value: User) => Buffer; readonly responseDeserialize: (value: Buffer) => User; }; /** Delete a user by its ID. */ readonly delete: { readonly path: "/yandex.cloud.ai.assistants.v1.users.UserService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteUserRequest; readonly responseSerialize: (value: DeleteUserResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => DeleteUserResponse; }; /** List users in a specific folder. */ readonly list: { readonly path: "/yandex.cloud.ai.assistants.v1.users.UserService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListUsersRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListUsersRequest; readonly responseSerialize: (value: ListUsersResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListUsersResponse; }; }; export interface UserServiceServer extends UntypedServiceImplementation { /** Create a new user. */ create: handleUnaryCall; /** Retrieve details of a specific user by its ID. */ get: handleUnaryCall; /** Update an existing user. */ update: handleUnaryCall; /** Delete a user by its ID. */ delete: handleUnaryCall; /** List users in a specific folder. */ list: handleUnaryCall; } export interface UserServiceClient extends Client { /** Create a new user. */ create(request: CreateUserRequest, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; create(request: CreateUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; create(request: CreateUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; /** Retrieve details of a specific user by its ID. */ get(request: GetUserRequest, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; get(request: GetUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; get(request: GetUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; /** Update an existing user. */ update(request: UpdateUserRequest, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; update(request: UpdateUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; update(request: UpdateUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; /** Delete a user by its ID. */ delete(request: DeleteUserRequest, callback: (error: ServiceError | null, response: DeleteUserResponse) => void): ClientUnaryCall; delete(request: DeleteUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteUserResponse) => void): ClientUnaryCall; delete(request: DeleteUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: DeleteUserResponse) => void): ClientUnaryCall; /** List users in a specific folder. */ list(request: ListUsersRequest, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; list(request: ListUsersRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; list(request: ListUsersRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; } export declare const UserServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): UserServiceClient; service: typeof UserServiceService; }; 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 {};