@ydbjs/api
Version:
TypeScript gRPC service definitions and protobuf types for all YDB APIs. Enables strongly-typed client generation and low-level protocol access.
277 lines • 9.97 kB
TypeScript
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { Any } from "../google/protobuf/any_pb.js";
import type { Duration } from "../google/protobuf/duration_pb.js";
import type { CostInfo, FeatureFlag_Status } from "./ydb_common_pb.js";
import type { IssueMessage } from "./ydb_issue_message_pb.js";
import type { StatusIds_StatusCode } from "./ydb_status_codes_pb.js";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file protos/ydb_operation.proto.
*/
export declare const file_protos_ydb_operation: GenFile;
/**
* @generated from message Ydb.Operations.OperationParams
*/
export type OperationParams = Message<"Ydb.Operations.OperationParams"> & {
/**
* @generated from field: Ydb.Operations.OperationParams.OperationMode operation_mode = 1;
*/
operationMode: OperationParams_OperationMode;
/**
* Indicates that client is no longer interested in the result of operation after the specified duration
* starting from the time operation arrives at the server.
* Server will try to stop the execution of operation and if no result is currently available the operation
* will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
* Timeout of operation does not tell anything about its result, it might be completed successfully
* or cancelled on server.
*
* @generated from field: google.protobuf.Duration operation_timeout = 2;
*/
operationTimeout?: Duration;
/**
* Server will try to cancel the operation after the specified duration starting from the time
* the operation arrives at server.
* In case of successful cancellation operation will receive CANCELLED status code, which will be
* sent back to client if it was waiting for the operation result.
* In case when cancellation isn't possible, no action will be performed.
*
* @generated from field: google.protobuf.Duration cancel_after = 3;
*/
cancelAfter?: Duration;
/**
* User-defined labels of operation.
*
* @generated from field: map<string, string> labels = 4;
*/
labels: {
[key: string]: string;
};
/**
* If enabled, server will report cost information, if supported by the operation.
* This flag is mostly useful for SYNC operations, to get the cost information in the response.
*
* @generated from field: Ydb.FeatureFlag.Status report_cost_info = 5;
*/
reportCostInfo: FeatureFlag_Status;
};
/**
* Describes the message Ydb.Operations.OperationParams.
* Use `create(OperationParamsSchema)` to create a new message.
*/
export declare const OperationParamsSchema: GenMessage<OperationParams>;
/**
* @generated from enum Ydb.Operations.OperationParams.OperationMode
*/
export declare enum OperationParams_OperationMode {
/**
* @generated from enum value: OPERATION_MODE_UNSPECIFIED = 0;
*/
OPERATION_MODE_UNSPECIFIED = 0,
/**
* Server will only reply once operation is finished (ready=true), and operation object won't be
* accessible after the reply. This is a basic request-response mode.
*
* @generated from enum value: SYNC = 1;
*/
SYNC = 1,
/**
* @generated from enum value: ASYNC = 2;
*/
ASYNC = 2
}
/**
* Describes the enum Ydb.Operations.OperationParams.OperationMode.
*/
export declare const OperationParams_OperationModeSchema: GenEnum<OperationParams_OperationMode>;
/**
* @generated from message Ydb.Operations.GetOperationRequest
*/
export type GetOperationRequest = Message<"Ydb.Operations.GetOperationRequest"> & {
/**
* @generated from field: string id = 1;
*/
id: string;
};
/**
* Describes the message Ydb.Operations.GetOperationRequest.
* Use `create(GetOperationRequestSchema)` to create a new message.
*/
export declare const GetOperationRequestSchema: GenMessage<GetOperationRequest>;
/**
* @generated from message Ydb.Operations.GetOperationResponse
*/
export type GetOperationResponse = Message<"Ydb.Operations.GetOperationResponse"> & {
/**
* @generated from field: Ydb.Operations.Operation operation = 1;
*/
operation?: Operation;
};
/**
* Describes the message Ydb.Operations.GetOperationResponse.
* Use `create(GetOperationResponseSchema)` to create a new message.
*/
export declare const GetOperationResponseSchema: GenMessage<GetOperationResponse>;
/**
* @generated from message Ydb.Operations.CancelOperationRequest
*/
export type CancelOperationRequest = Message<"Ydb.Operations.CancelOperationRequest"> & {
/**
* @generated from field: string id = 1;
*/
id: string;
};
/**
* Describes the message Ydb.Operations.CancelOperationRequest.
* Use `create(CancelOperationRequestSchema)` to create a new message.
*/
export declare const CancelOperationRequestSchema: GenMessage<CancelOperationRequest>;
/**
* @generated from message Ydb.Operations.CancelOperationResponse
*/
export type CancelOperationResponse = Message<"Ydb.Operations.CancelOperationResponse"> & {
/**
* @generated from field: Ydb.StatusIds.StatusCode status = 1;
*/
status: StatusIds_StatusCode;
/**
* @generated from field: repeated Ydb.Issue.IssueMessage issues = 2;
*/
issues: IssueMessage[];
};
/**
* Describes the message Ydb.Operations.CancelOperationResponse.
* Use `create(CancelOperationResponseSchema)` to create a new message.
*/
export declare const CancelOperationResponseSchema: GenMessage<CancelOperationResponse>;
/**
* @generated from message Ydb.Operations.ForgetOperationRequest
*/
export type ForgetOperationRequest = Message<"Ydb.Operations.ForgetOperationRequest"> & {
/**
* @generated from field: string id = 1;
*/
id: string;
};
/**
* Describes the message Ydb.Operations.ForgetOperationRequest.
* Use `create(ForgetOperationRequestSchema)` to create a new message.
*/
export declare const ForgetOperationRequestSchema: GenMessage<ForgetOperationRequest>;
/**
* @generated from message Ydb.Operations.ForgetOperationResponse
*/
export type ForgetOperationResponse = Message<"Ydb.Operations.ForgetOperationResponse"> & {
/**
* @generated from field: Ydb.StatusIds.StatusCode status = 1;
*/
status: StatusIds_StatusCode;
/**
* @generated from field: repeated Ydb.Issue.IssueMessage issues = 2;
*/
issues: IssueMessage[];
};
/**
* Describes the message Ydb.Operations.ForgetOperationResponse.
* Use `create(ForgetOperationResponseSchema)` to create a new message.
*/
export declare const ForgetOperationResponseSchema: GenMessage<ForgetOperationResponse>;
/**
* @generated from message Ydb.Operations.ListOperationsRequest
*/
export type ListOperationsRequest = Message<"Ydb.Operations.ListOperationsRequest"> & {
/**
* @generated from field: string kind = 1;
*/
kind: string;
/**
* @generated from field: uint64 page_size = 2;
*/
pageSize: bigint;
/**
* @generated from field: string page_token = 3;
*/
pageToken: string;
};
/**
* Describes the message Ydb.Operations.ListOperationsRequest.
* Use `create(ListOperationsRequestSchema)` to create a new message.
*/
export declare const ListOperationsRequestSchema: GenMessage<ListOperationsRequest>;
/**
* @generated from message Ydb.Operations.ListOperationsResponse
*/
export type ListOperationsResponse = Message<"Ydb.Operations.ListOperationsResponse"> & {
/**
* @generated from field: Ydb.StatusIds.StatusCode status = 1;
*/
status: StatusIds_StatusCode;
/**
* @generated from field: repeated Ydb.Issue.IssueMessage issues = 2;
*/
issues: IssueMessage[];
/**
* @generated from field: repeated Ydb.Operations.Operation operations = 3;
*/
operations: Operation[];
/**
* @generated from field: string next_page_token = 4;
*/
nextPageToken: string;
};
/**
* Describes the message Ydb.Operations.ListOperationsResponse.
* Use `create(ListOperationsResponseSchema)` to create a new message.
*/
export declare const ListOperationsResponseSchema: GenMessage<ListOperationsResponse>;
/**
* @generated from message Ydb.Operations.Operation
*/
export type Operation = Message<"Ydb.Operations.Operation"> & {
/**
* Identifier of the operation, empty value means no active operation object is present (it was forgotten or
* not created in the first place, as in SYNC operation mode).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* true - this operation has beed finished (doesn't matter successful or not),
* so Status field has status code, and Result field can contains result data.
* false - this operation still running. You can repeat request using operation Id.
*
* @generated from field: bool ready = 2;
*/
ready: boolean;
/**
* @generated from field: Ydb.StatusIds.StatusCode status = 3;
*/
status: StatusIds_StatusCode;
/**
* @generated from field: repeated Ydb.Issue.IssueMessage issues = 4;
*/
issues: IssueMessage[];
/**
* Result data
*
* @generated from field: google.protobuf.Any result = 5;
*/
result?: Any;
/**
* @generated from field: google.protobuf.Any metadata = 6;
*/
metadata?: Any;
/**
* Contains information about the cost of the operation.
* For completed operations, it shows the final cost of the operation.
* For operations in progress, it might indicate the current cost of the operation (if supported).
*
* @generated from field: Ydb.CostInfo cost_info = 7;
*/
costInfo?: CostInfo;
};
/**
* Describes the message Ydb.Operations.Operation.
* Use `create(OperationSchema)` to create a new message.
*/
export declare const OperationSchema: GenMessage<Operation>;
//# sourceMappingURL=ydb_operation_pb.d.ts.map