The generated request message type.
The generated response type.
Runs one unary SDK request and exposes its result and diagnostics.
Generated service methods return this object. You can await the object
directly because it implements PromiseLike, or you can await
Request.result. Keep the object when you also need metadata, status,
request IDs, or cancellation.
The runtime adds authorization metadata when a provider exists. It adds one
idempotency key to mutating methods and reuses that key for every retry. For
update methods, it can also create an x-resetmask header from the request.
Formats the current request state for Node.js inspection.
Returns a JSON-safe value for logs.
Creates and starts a request.
Generated service clients call this constructor. Construction starts authorization and the gRPC call without waiting for the result.
The generated request message type.
The generated response type.
OptionalrequestOptions: Partial<CallOptions> & RetryOptionsReadonly$typeContains the fully qualified runtime type name.
ReadonlyinitialResolves with the response headers when gRPC reports them.
ReadonlyrequestResolves with x-request-id when the server returns that header.
Do not await this promise as a completion signal. It stays pending when the server does not return the header.
ReadonlyresultResolves with the response, or rejects with the final request error.
ReadonlystatusResolves with the final Google RPC status for success or failure.
ReadonlytraceResolves with x-trace-id when the server returns that header.
Do not await this promise as a completion signal. It stays pending when the server does not return the header.
ReadonlytrailingResolves with the response trailers when gRPC reports them.
Returns a JSON-safe value for logs.
Cancels active gRPC calls and prevents later retries.
Cancellation is safe to call more than once. The result rejects with a cancellation error after the active call reports cancellation.
Optionalreason: stringimport {
BucketService,
GetBucketRequest,
} from '@nebius/js-sdk/api/nebius/storage/v1/index';
async function getWithLocalTimeout(client: BucketService) {
const call = client.get(GetBucketRequest.create({ id: 'bucket-id' }));
const timer = setTimeout(() => call.cancel('local timeout'), 5_000);
try {
return await call.result;
} finally {
clearTimeout(timer);
}
}
Registers handlers for the request result.
This method makes awaiting the request equivalent to awaiting Request.result.
Runs one unary SDK request and exposes its result and diagnostics.
Generated service methods return this object. You can await the object directly because it implements
PromiseLike, or you can await Request.result. Keep the object when you also need metadata, status, request IDs, or cancellation.The runtime adds authorization metadata when a provider exists. It adds one idempotency key to mutating methods and reuses that key for every retry. For update methods, it can also create an
x-resetmaskheader from the request.Example