Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions packages/apps/src/v1/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ export class AppsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.createSpaceOperation(req);
* const result = await op.wait();
*/
async createSpaceOperation(
req: CreateSpaceRequest,
options?: CallOptions
Expand Down Expand Up @@ -425,6 +433,14 @@ export class AppsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.deleteSpaceOperation(req);
* const result = await op.wait();
*/
async deleteSpaceOperation(
req: DeleteSpaceRequest,
options?: CallOptions
Expand Down Expand Up @@ -1022,6 +1038,14 @@ export class AppsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.updateSpaceOperation(req);
* const result = await op.wait();
*/
async updateSpaceOperation(
req: UpdateSpaceRequest,
options?: CallOptions
Expand Down Expand Up @@ -1053,9 +1077,9 @@ export class CreateSpaceOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<Space> {
let result: Space | undefined;
Expand Down Expand Up @@ -1135,9 +1159,9 @@ export class DeleteSpaceOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<void> {
const call = async (callSignal?: AbortSignal): Promise<void> => {
Expand Down Expand Up @@ -1205,9 +1229,9 @@ export class UpdateSpaceOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<Space> {
let result: Space | undefined;
Expand Down
42 changes: 33 additions & 9 deletions packages/environments/src/v1/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ export class EnvironmentsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.createWorkspaceBaseEnvironmentOperation(req);
* const result = await op.wait();
*/
async createWorkspaceBaseEnvironmentOperation(
req: CreateWorkspaceBaseEnvironmentRequest,
options?: CallOptions
Expand Down Expand Up @@ -372,6 +380,14 @@ export class EnvironmentsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.refreshWorkspaceBaseEnvironmentOperation(req);
* const result = await op.wait();
*/
async refreshWorkspaceBaseEnvironmentOperation(
req: RefreshWorkspaceBaseEnvironmentRequest,
options?: CallOptions
Expand Down Expand Up @@ -467,6 +483,14 @@ export class EnvironmentsClient {
return resp;
}

/**
* Starts the operation and returns a handle to it. Call `wait()` on the
* returned handle to poll until the operation completes.
*
* @example
* const op = await client.updateWorkspaceBaseEnvironmentOperation(req);
* const result = await op.wait();
*/
async updateWorkspaceBaseEnvironmentOperation(
req: UpdateWorkspaceBaseEnvironmentRequest,
options?: CallOptions
Expand Down Expand Up @@ -500,9 +524,9 @@ export class CreateWorkspaceBaseEnvironmentOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<WorkspaceBaseEnvironment> {
let result: WorkspaceBaseEnvironment | undefined;
Expand Down Expand Up @@ -586,9 +610,9 @@ export class RefreshWorkspaceBaseEnvironmentOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<WorkspaceBaseEnvironment> {
let result: WorkspaceBaseEnvironment | undefined;
Expand Down Expand Up @@ -672,9 +696,9 @@ export class UpdateWorkspaceBaseEnvironmentOperation {
}

/**
* Polls the operation until it completes.
*
* Throws if the operation failed.
* Polls the operation until it completes and returns the result. Throws if the
* operation failed. `options` is optional; call `wait()` to poll with the
* defaults.
*/
async wait(options?: LroOptions): Promise<WorkspaceBaseEnvironment> {
let result: WorkspaceBaseEnvironment | undefined;
Expand Down
Loading
Loading