From 35d772bebaa0352385a39e128ef24f0007521c09 Mon Sep 17 00:00:00 2001 From: Parth Bansal Date: Wed, 3 Jun 2026 16:40:05 +0000 Subject: [PATCH] Regenerate clients with two-step LRO start/poll JSDoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Regenerates the `apps`, `environments`, and `postgres` clients to pick up the new long-running-operation JSDoc emitted by the genkit generator. The generated surface is otherwise unchanged. ## Why Bug-bash testers found the LRO call pattern confusing: `await client.createXOperation(req)` returns a handle and `await op.wait()` polls it to completion, but the generated `createXOperation` factory method had no JSDoc, so the two-step relationship was invisible at the call site and `op.wait(undefined)` looked mandatory. The `wait()` signature was already `wait(options?: LroOptions)`, so a no-argument `op.wait()` already compiled — only the discoverability was missing. ## What changed ### Interface changes None. No signatures change; `wait()` was already `wait(options?: LroOptions)`. ### Behavioral changes None. This is a docs-only regeneration. Each `createXOperation` / `deleteXOperation` / `updateXOperation` / `undeleteXOperation` factory now carries a concise JSDoc describing the start/poll pattern with a no-argument `await op.wait()` example, and each `wait()` JSDoc notes that `options` is optional. ### Internal changes Regenerated `packages/{apps,environments,postgres}/src/v1/client.ts` from the shared descriptor. Pairs with the universe genkit generator change in `openapi/genkit/codegen/sdkjs/method.go` (`lroTmpl` and `waitMethodTmpl`); the JSDoc text lives in that template, not hand-written here. ## How is this tested? `npm run build`, `npm run lint`, `npm run typecheck`, and `npm run format:check` all pass across the workspace; `npm test` for `@databricks/sdk-core` passes (357 tests). The generated packages have no test suites of their own. Co-authored-by: Isaac --- packages/apps/src/v1/client.ts | 42 +++- packages/environments/src/v1/client.ts | 42 +++- packages/postgres/src/v1/client.ts | 294 +++++++++++++++++++------ 3 files changed, 297 insertions(+), 81 deletions(-) diff --git a/packages/apps/src/v1/client.ts b/packages/apps/src/v1/client.ts index a4000b7d..47cc294e 100644 --- a/packages/apps/src/v1/client.ts +++ b/packages/apps/src/v1/client.ts @@ -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 @@ -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 @@ -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 @@ -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 { let result: Space | undefined; @@ -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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -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 { let result: Space | undefined; diff --git a/packages/environments/src/v1/client.ts b/packages/environments/src/v1/client.ts index 72ffe729..ca37896d 100644 --- a/packages/environments/src/v1/client.ts +++ b/packages/environments/src/v1/client.ts @@ -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 @@ -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 @@ -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 @@ -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 { let result: WorkspaceBaseEnvironment | undefined; @@ -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 { let result: WorkspaceBaseEnvironment | undefined; @@ -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 { let result: WorkspaceBaseEnvironment | undefined; diff --git a/packages/postgres/src/v1/client.ts b/packages/postgres/src/v1/client.ts index bd5fbe09..77ed590b 100644 --- a/packages/postgres/src/v1/client.ts +++ b/packages/postgres/src/v1/client.ts @@ -190,6 +190,14 @@ export class PostgresClient { 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.createBranchOperation(req); + * const result = await op.wait(); + */ async createBranchOperation( req: CreateBranchRequest, options?: CallOptions @@ -239,6 +247,14 @@ export class PostgresClient { 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.createCatalogOperation(req); + * const result = await op.wait(); + */ async createCatalogOperation( req: CreateCatalogRequest, options?: CallOptions @@ -292,6 +308,14 @@ export class PostgresClient { 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.createDatabaseOperation(req); + * const result = await op.wait(); + */ async createDatabaseOperation( req: CreateDatabaseRequest, options?: CallOptions @@ -344,6 +368,14 @@ export class PostgresClient { 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.createEndpointOperation(req); + * const result = await op.wait(); + */ async createEndpointOperation( req: CreateEndpointRequest, options?: CallOptions @@ -393,6 +425,14 @@ export class PostgresClient { 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.createProjectOperation(req); + * const result = await op.wait(); + */ async createProjectOperation( req: CreateProjectRequest, options?: CallOptions @@ -442,6 +482,14 @@ export class PostgresClient { 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.createRoleOperation(req); + * const result = await op.wait(); + */ async createRoleOperation( req: CreateRoleRequest, options?: CallOptions @@ -491,6 +539,14 @@ export class PostgresClient { 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.createSyncedTableOperation(req); + * const result = await op.wait(); + */ async createSyncedTableOperation( req: CreateSyncedTableRequest, options?: CallOptions @@ -533,6 +589,14 @@ export class PostgresClient { 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.deleteBranchOperation(req); + * const result = await op.wait(); + */ async deleteBranchOperation( req: DeleteBranchRequest, options?: CallOptions @@ -569,6 +633,14 @@ export class PostgresClient { 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.deleteCatalogOperation(req); + * const result = await op.wait(); + */ async deleteCatalogOperation( req: DeleteCatalogRequest, options?: CallOptions @@ -605,6 +677,14 @@ export class PostgresClient { 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.deleteDatabaseOperation(req); + * const result = await op.wait(); + */ async deleteDatabaseOperation( req: DeleteDatabaseRequest, options?: CallOptions @@ -641,6 +721,14 @@ export class PostgresClient { 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.deleteEndpointOperation(req); + * const result = await op.wait(); + */ async deleteEndpointOperation( req: DeleteEndpointRequest, options?: CallOptions @@ -683,6 +771,14 @@ export class PostgresClient { 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.deleteProjectOperation(req); + * const result = await op.wait(); + */ async deleteProjectOperation( req: DeleteProjectRequest, options?: CallOptions @@ -725,6 +821,14 @@ export class PostgresClient { 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.deleteRoleOperation(req); + * const result = await op.wait(); + */ async deleteRoleOperation( req: DeleteRoleRequest, options?: CallOptions @@ -761,6 +865,14 @@ export class PostgresClient { 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.deleteSyncedTableOperation(req); + * const result = await op.wait(); + */ async deleteSyncedTableOperation( req: DeleteSyncedTableRequest, options?: CallOptions @@ -1327,6 +1439,14 @@ export class PostgresClient { 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.undeleteBranchOperation(req); + * const result = await op.wait(); + */ async undeleteBranchOperation( req: UndeleteBranchRequest, options?: CallOptions @@ -1364,6 +1484,14 @@ export class PostgresClient { 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.undeleteProjectOperation(req); + * const result = await op.wait(); + */ async undeleteProjectOperation( req: UndeleteProjectRequest, options?: CallOptions @@ -1413,6 +1541,14 @@ export class PostgresClient { 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.updateBranchOperation(req); + * const result = await op.wait(); + */ async updateBranchOperation( req: UpdateBranchRequest, options?: CallOptions @@ -1462,6 +1598,14 @@ export class PostgresClient { 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.updateDatabaseOperation(req); + * const result = await op.wait(); + */ async updateDatabaseOperation( req: UpdateDatabaseRequest, options?: CallOptions @@ -1511,6 +1655,14 @@ export class PostgresClient { 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.updateEndpointOperation(req); + * const result = await op.wait(); + */ async updateEndpointOperation( req: UpdateEndpointRequest, options?: CallOptions @@ -1560,6 +1712,14 @@ export class PostgresClient { 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.updateProjectOperation(req); + * const result = await op.wait(); + */ async updateProjectOperation( req: UpdateProjectRequest, options?: CallOptions @@ -1609,6 +1769,14 @@ export class PostgresClient { 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.updateRoleOperation(req); + * const result = await op.wait(); + */ async updateRoleOperation( req: UpdateRoleRequest, options?: CallOptions @@ -1642,9 +1810,9 @@ export class CreateBranchOperation { } /** - * 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 { let result: Branch | undefined; @@ -1726,9 +1894,9 @@ export class CreateCatalogOperation { } /** - * 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 { let result: Catalog | undefined; @@ -1810,9 +1978,9 @@ export class CreateDatabaseOperation { } /** - * 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 { let result: Database | undefined; @@ -1894,9 +2062,9 @@ export class CreateEndpointOperation { } /** - * 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 { let result: Endpoint | undefined; @@ -1978,9 +2146,9 @@ export class CreateProjectOperation { } /** - * 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 { let result: Project | undefined; @@ -2062,9 +2230,9 @@ export class CreateRoleOperation { } /** - * 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 { let result: Role | undefined; @@ -2146,9 +2314,9 @@ export class CreateSyncedTableOperation { } /** - * 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 { let result: SyncedTable | undefined; @@ -2232,9 +2400,9 @@ export class DeleteBranchOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2304,9 +2472,9 @@ export class DeleteCatalogOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2376,9 +2544,9 @@ export class DeleteDatabaseOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2448,9 +2616,9 @@ export class DeleteEndpointOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2520,9 +2688,9 @@ export class DeleteProjectOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2592,9 +2760,9 @@ export class DeleteRoleOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2664,9 +2832,9 @@ export class DeleteSyncedTableOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2736,9 +2904,9 @@ export class UndeleteBranchOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2808,9 +2976,9 @@ export class UndeleteProjectOperation { } /** - * 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 { const call = async (callSignal?: AbortSignal): Promise => { @@ -2880,9 +3048,9 @@ export class UpdateBranchOperation { } /** - * 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 { let result: Branch | undefined; @@ -2964,9 +3132,9 @@ export class UpdateDatabaseOperation { } /** - * 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 { let result: Database | undefined; @@ -3048,9 +3216,9 @@ export class UpdateEndpointOperation { } /** - * 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 { let result: Endpoint | undefined; @@ -3132,9 +3300,9 @@ export class UpdateProjectOperation { } /** - * 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 { let result: Project | undefined; @@ -3216,9 +3384,9 @@ export class UpdateRoleOperation { } /** - * 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 { let result: Role | undefined;