@databricks/sdk-pipelines 0.1.0-dev.1 → 0.1.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@databricks/sdk-pipelines",
3
- "version": "0.1.0-dev.1",
3
+ "version": "0.1.0-dev.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./v2": {
8
8
  "types": "./dist/v2/index.d.ts",
9
- "import": "./dist/v2/index.js"
9
+ "import": "./dist/v2/index.js",
10
+ "default": "./dist/v2/index.js"
10
11
  }
11
12
  },
12
13
  "files": [
@@ -28,9 +29,9 @@
28
29
  "author": "Databricks",
29
30
  "license": "Apache-2.0",
30
31
  "dependencies": {
31
- "@databricks/sdk-auth": ">=0.1.0-dev.2 <1.0.0",
32
- "@databricks/sdk-core": ">=0.1.0-dev.3 <1.0.0",
33
- "@databricks/sdk-options": ">=0.1.0-dev.2 <1.0.0",
32
+ "@databricks/sdk-auth": ">=0.1.0-dev.4 <1.0.0",
33
+ "@databricks/sdk-core": ">=0.1.0-dev.5 <1.0.0",
34
+ "@databricks/sdk-options": ">=0.1.0-dev.4 <1.0.0",
34
35
  "@js-temporal/polyfill": "^0.5.0",
35
36
  "json-bigint": "^1.0.0",
36
37
  "zod": "^4.3.6"
package/src/v2/client.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
3
  import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
4
- import type {Call} from '@databricks/sdk-core/api';
5
- import {retryOn} from '@databricks/sdk-core/api';
6
4
  import {createDefault} from '@databricks/sdk-core/clientinfo';
7
5
  import type {Logger} from '@databricks/sdk-core/logger';
8
6
  import {NoOpLogger} from '@databricks/sdk-core/logger';
9
7
  import type {CallOptions} from '@databricks/sdk-options/call';
10
8
  import type {ClientOptions} from '@databricks/sdk-options/client';
9
+ import type {LroOptions} from '@databricks/sdk-options/lro';
11
10
  import type {HttpClient} from '@databricks/sdk-core/http';
12
11
  import {newHttpClient} from './transport';
13
12
  import {
@@ -16,35 +15,37 @@ import {
16
15
  executeHttpCall,
17
16
  marshalRequest,
18
17
  parseResponse,
18
+ executeWait,
19
+ StillRunningError,
19
20
  } from './utils';
20
21
  import pkgJson from '../../package.json' with {type: 'json'};
21
22
  import type {
22
23
  ApplyEnvironmentRequest,
23
- ApplyEnvironmentRequest_Response,
24
+ ApplyEnvironmentResponse,
24
25
  ClonePipelineRequest,
25
- ClonePipelineRequest_Response,
26
+ ClonePipelineResponse,
26
27
  CreatePipelineRequest,
27
- CreatePipelineRequest_Response,
28
+ CreatePipelineResponse,
28
29
  DeletePipelineRequest,
29
- DeletePipelineRequest_Response,
30
+ DeletePipelineResponse,
30
31
  EditPipelineRequest,
31
- EditPipelineRequest_Response,
32
+ EditPipelineResponse,
32
33
  GetPipelineRequest,
33
- GetPipelineRequest_Response,
34
+ GetPipelineResponse,
34
35
  GetUpdateRequest,
35
- GetUpdateRequest_Response,
36
+ GetUpdateResponse,
36
37
  ListPipelineEventsRequest,
37
- ListPipelineEventsRequest_Response,
38
+ ListPipelineEventsResponse,
38
39
  ListPipelinesRequest,
39
- ListPipelinesRequest_Response,
40
+ ListPipelinesResponse,
40
41
  ListUpdatesRequest,
41
- ListUpdatesRequest_Response,
42
+ ListUpdatesResponse,
42
43
  PipelineEvent,
43
44
  PipelineStateInfo,
44
45
  StartUpdateRequest,
45
- StartUpdateRequest_Response,
46
+ StartUpdateResponse,
46
47
  StopPipelineRequest,
47
- StopPipelineRequest_Response,
48
+ StopPipelineResponse,
48
49
  } from './model';
49
50
  import {
50
51
  PipelineState_PipelineState,
@@ -54,18 +55,18 @@ import {
54
55
  marshalEditPipelineRequestSchema,
55
56
  marshalStartUpdateRequestSchema,
56
57
  marshalStopPipelineRequestSchema,
57
- unmarshalApplyEnvironmentRequest_ResponseSchema,
58
- unmarshalClonePipelineRequest_ResponseSchema,
59
- unmarshalCreatePipelineRequest_ResponseSchema,
60
- unmarshalDeletePipelineRequest_ResponseSchema,
61
- unmarshalEditPipelineRequest_ResponseSchema,
62
- unmarshalGetPipelineRequest_ResponseSchema,
63
- unmarshalGetUpdateRequest_ResponseSchema,
64
- unmarshalListPipelineEventsRequest_ResponseSchema,
65
- unmarshalListPipelinesRequest_ResponseSchema,
66
- unmarshalListUpdatesRequest_ResponseSchema,
67
- unmarshalStartUpdateRequest_ResponseSchema,
68
- unmarshalStopPipelineRequest_ResponseSchema,
58
+ unmarshalApplyEnvironmentResponseSchema,
59
+ unmarshalClonePipelineResponseSchema,
60
+ unmarshalCreatePipelineResponseSchema,
61
+ unmarshalDeletePipelineResponseSchema,
62
+ unmarshalEditPipelineResponseSchema,
63
+ unmarshalGetPipelineResponseSchema,
64
+ unmarshalGetUpdateResponseSchema,
65
+ unmarshalListPipelineEventsResponseSchema,
66
+ unmarshalListPipelinesResponseSchema,
67
+ unmarshalListUpdatesResponseSchema,
68
+ unmarshalStartUpdateResponseSchema,
69
+ unmarshalStopPipelineResponseSchema,
69
70
  } from './model';
70
71
 
71
72
  // Package identity segment for this client to be used in the User-Agent header.
@@ -74,8 +75,6 @@ const PACKAGE_SEGMENT = {
74
75
  value: pkgJson.version,
75
76
  };
76
77
 
77
- class StillRunningError extends Error {}
78
-
79
78
  export class PipelinesClient {
80
79
  private readonly host: string;
81
80
  // Workspace ID used to route workspace-level calls on unified hosts (SPOG).
@@ -112,11 +111,11 @@ export class PipelinesClient {
112
111
  async applyEnvironment(
113
112
  req: ApplyEnvironmentRequest,
114
113
  options?: CallOptions
115
- ): Promise<ApplyEnvironmentRequest_Response> {
114
+ ): Promise<ApplyEnvironmentResponse> {
116
115
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/environment/apply`;
117
116
  const body = marshalRequest(req, marshalApplyEnvironmentRequestSchema);
118
- let resp: ApplyEnvironmentRequest_Response | undefined;
119
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
117
+ let resp: ApplyEnvironmentResponse | undefined;
118
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
120
119
  const headers = new Headers({'Content-Type': 'application/json'});
121
120
  if (this.workspaceId !== undefined) {
122
121
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -128,14 +127,11 @@ export class PipelinesClient {
128
127
  httpClient: this.httpClient,
129
128
  logger: this.logger,
130
129
  });
131
- resp = parseResponse(
132
- respBody,
133
- unmarshalApplyEnvironmentRequest_ResponseSchema
134
- );
130
+ resp = parseResponse(respBody, unmarshalApplyEnvironmentResponseSchema);
135
131
  };
136
132
  await executeCall(call, options);
137
133
  if (resp === undefined) {
138
- throw new Error('API call completed without a result.');
134
+ throw new Error('operation completed without a result.');
139
135
  }
140
136
  return resp;
141
137
  }
@@ -148,11 +144,11 @@ export class PipelinesClient {
148
144
  async clone(
149
145
  req: ClonePipelineRequest,
150
146
  options?: CallOptions
151
- ): Promise<ClonePipelineRequest_Response> {
147
+ ): Promise<ClonePipelineResponse> {
152
148
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/clone`;
153
149
  const body = marshalRequest(req, marshalClonePipelineRequestSchema);
154
- let resp: ClonePipelineRequest_Response | undefined;
155
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
150
+ let resp: ClonePipelineResponse | undefined;
151
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
156
152
  const headers = new Headers({'Content-Type': 'application/json'});
157
153
  if (this.workspaceId !== undefined) {
158
154
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -164,14 +160,11 @@ export class PipelinesClient {
164
160
  httpClient: this.httpClient,
165
161
  logger: this.logger,
166
162
  });
167
- resp = parseResponse(
168
- respBody,
169
- unmarshalClonePipelineRequest_ResponseSchema
170
- );
163
+ resp = parseResponse(respBody, unmarshalClonePipelineResponseSchema);
171
164
  };
172
165
  await executeCall(call, options);
173
166
  if (resp === undefined) {
174
- throw new Error('API call completed without a result.');
167
+ throw new Error('operation completed without a result.');
175
168
  }
176
169
  return resp;
177
170
  }
@@ -183,11 +176,11 @@ export class PipelinesClient {
183
176
  async create(
184
177
  req: CreatePipelineRequest,
185
178
  options?: CallOptions
186
- ): Promise<CreatePipelineRequest_Response> {
179
+ ): Promise<CreatePipelineResponse> {
187
180
  const url = `${this.host}/api/2.0/pipelines`;
188
181
  const body = marshalRequest(req, marshalCreatePipelineRequestSchema);
189
- let resp: CreatePipelineRequest_Response | undefined;
190
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
182
+ let resp: CreatePipelineResponse | undefined;
183
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
191
184
  const headers = new Headers({'Content-Type': 'application/json'});
192
185
  if (this.workspaceId !== undefined) {
193
186
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -199,14 +192,11 @@ export class PipelinesClient {
199
192
  httpClient: this.httpClient,
200
193
  logger: this.logger,
201
194
  });
202
- resp = parseResponse(
203
- respBody,
204
- unmarshalCreatePipelineRequest_ResponseSchema
205
- );
195
+ resp = parseResponse(respBody, unmarshalCreatePipelineResponseSchema);
206
196
  };
207
197
  await executeCall(call, options);
208
198
  if (resp === undefined) {
209
- throw new Error('API call completed without a result.');
199
+ throw new Error('operation completed without a result.');
210
200
  }
211
201
  return resp;
212
202
  }
@@ -218,7 +208,7 @@ export class PipelinesClient {
218
208
  async delete(
219
209
  req: DeletePipelineRequest,
220
210
  options?: CallOptions
221
- ): Promise<DeletePipelineRequest_Response> {
211
+ ): Promise<DeletePipelineResponse> {
222
212
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}`;
223
213
  const params = new URLSearchParams();
224
214
  if (req.force !== undefined) {
@@ -229,8 +219,8 @@ export class PipelinesClient {
229
219
  }
230
220
  const query = params.toString();
231
221
  const fullUrl = query !== '' ? `${url}?${query}` : url;
232
- let resp: DeletePipelineRequest_Response | undefined;
233
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
222
+ let resp: DeletePipelineResponse | undefined;
223
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
234
224
  const headers = new Headers();
235
225
  if (this.workspaceId !== undefined) {
236
226
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -242,14 +232,11 @@ export class PipelinesClient {
242
232
  httpClient: this.httpClient,
243
233
  logger: this.logger,
244
234
  });
245
- resp = parseResponse(
246
- respBody,
247
- unmarshalDeletePipelineRequest_ResponseSchema
248
- );
235
+ resp = parseResponse(respBody, unmarshalDeletePipelineResponseSchema);
249
236
  };
250
237
  await executeCall(call, options);
251
238
  if (resp === undefined) {
252
- throw new Error('API call completed without a result.');
239
+ throw new Error('operation completed without a result.');
253
240
  }
254
241
  return resp;
255
242
  }
@@ -258,11 +245,11 @@ export class PipelinesClient {
258
245
  async edit(
259
246
  req: EditPipelineRequest,
260
247
  options?: CallOptions
261
- ): Promise<EditPipelineRequest_Response> {
248
+ ): Promise<EditPipelineResponse> {
262
249
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}`;
263
250
  const body = marshalRequest(req, marshalEditPipelineRequestSchema);
264
- let resp: EditPipelineRequest_Response | undefined;
265
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
251
+ let resp: EditPipelineResponse | undefined;
252
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
266
253
  const headers = new Headers({'Content-Type': 'application/json'});
267
254
  if (this.workspaceId !== undefined) {
268
255
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -274,14 +261,11 @@ export class PipelinesClient {
274
261
  httpClient: this.httpClient,
275
262
  logger: this.logger,
276
263
  });
277
- resp = parseResponse(
278
- respBody,
279
- unmarshalEditPipelineRequest_ResponseSchema
280
- );
264
+ resp = parseResponse(respBody, unmarshalEditPipelineResponseSchema);
281
265
  };
282
266
  await executeCall(call, options);
283
267
  if (resp === undefined) {
284
- throw new Error('API call completed without a result.');
268
+ throw new Error('operation completed without a result.');
285
269
  }
286
270
  return resp;
287
271
  }
@@ -290,7 +274,7 @@ export class PipelinesClient {
290
274
  async events(
291
275
  req: ListPipelineEventsRequest,
292
276
  options?: CallOptions
293
- ): Promise<ListPipelineEventsRequest_Response> {
277
+ ): Promise<ListPipelineEventsResponse> {
294
278
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/events`;
295
279
  const params = new URLSearchParams();
296
280
  if (req.pageToken !== undefined) {
@@ -307,8 +291,8 @@ export class PipelinesClient {
307
291
  }
308
292
  const query = params.toString();
309
293
  const fullUrl = query !== '' ? `${url}?${query}` : url;
310
- let resp: ListPipelineEventsRequest_Response | undefined;
311
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
294
+ let resp: ListPipelineEventsResponse | undefined;
295
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
312
296
  const headers = new Headers();
313
297
  if (this.workspaceId !== undefined) {
314
298
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -320,14 +304,11 @@ export class PipelinesClient {
320
304
  httpClient: this.httpClient,
321
305
  logger: this.logger,
322
306
  });
323
- resp = parseResponse(
324
- respBody,
325
- unmarshalListPipelineEventsRequest_ResponseSchema
326
- );
307
+ resp = parseResponse(respBody, unmarshalListPipelineEventsResponseSchema);
327
308
  };
328
309
  await executeCall(call, options);
329
310
  if (resp === undefined) {
330
- throw new Error('API call completed without a result.');
311
+ throw new Error('operation completed without a result.');
331
312
  }
332
313
  return resp;
333
314
  }
@@ -353,10 +334,10 @@ export class PipelinesClient {
353
334
  async get(
354
335
  req: GetPipelineRequest,
355
336
  options?: CallOptions
356
- ): Promise<GetPipelineRequest_Response> {
337
+ ): Promise<GetPipelineResponse> {
357
338
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}`;
358
- let resp: GetPipelineRequest_Response | undefined;
359
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
339
+ let resp: GetPipelineResponse | undefined;
340
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
360
341
  const headers = new Headers();
361
342
  if (this.workspaceId !== undefined) {
362
343
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -368,14 +349,11 @@ export class PipelinesClient {
368
349
  httpClient: this.httpClient,
369
350
  logger: this.logger,
370
351
  });
371
- resp = parseResponse(
372
- respBody,
373
- unmarshalGetPipelineRequest_ResponseSchema
374
- );
352
+ resp = parseResponse(respBody, unmarshalGetPipelineResponseSchema);
375
353
  };
376
354
  await executeCall(call, options);
377
355
  if (resp === undefined) {
378
- throw new Error('API call completed without a result.');
356
+ throw new Error('operation completed without a result.');
379
357
  }
380
358
  return resp;
381
359
  }
@@ -384,10 +362,10 @@ export class PipelinesClient {
384
362
  async getUpdate(
385
363
  req: GetUpdateRequest,
386
364
  options?: CallOptions
387
- ): Promise<GetUpdateRequest_Response> {
365
+ ): Promise<GetUpdateResponse> {
388
366
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/updates/${req.updateId ?? ''}`;
389
- let resp: GetUpdateRequest_Response | undefined;
390
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
367
+ let resp: GetUpdateResponse | undefined;
368
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
391
369
  const headers = new Headers();
392
370
  if (this.workspaceId !== undefined) {
393
371
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -399,11 +377,11 @@ export class PipelinesClient {
399
377
  httpClient: this.httpClient,
400
378
  logger: this.logger,
401
379
  });
402
- resp = parseResponse(respBody, unmarshalGetUpdateRequest_ResponseSchema);
380
+ resp = parseResponse(respBody, unmarshalGetUpdateResponseSchema);
403
381
  };
404
382
  await executeCall(call, options);
405
383
  if (resp === undefined) {
406
- throw new Error('API call completed without a result.');
384
+ throw new Error('operation completed without a result.');
407
385
  }
408
386
  return resp;
409
387
  }
@@ -412,7 +390,7 @@ export class PipelinesClient {
412
390
  async list(
413
391
  req: ListPipelinesRequest,
414
392
  options?: CallOptions
415
- ): Promise<ListPipelinesRequest_Response> {
393
+ ): Promise<ListPipelinesResponse> {
416
394
  const url = `${this.host}/api/2.0/pipelines`;
417
395
  const params = new URLSearchParams();
418
396
  if (req.pageToken !== undefined) {
@@ -429,8 +407,8 @@ export class PipelinesClient {
429
407
  }
430
408
  const query = params.toString();
431
409
  const fullUrl = query !== '' ? `${url}?${query}` : url;
432
- let resp: ListPipelinesRequest_Response | undefined;
433
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
410
+ let resp: ListPipelinesResponse | undefined;
411
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
434
412
  const headers = new Headers();
435
413
  if (this.workspaceId !== undefined) {
436
414
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -442,14 +420,11 @@ export class PipelinesClient {
442
420
  httpClient: this.httpClient,
443
421
  logger: this.logger,
444
422
  });
445
- resp = parseResponse(
446
- respBody,
447
- unmarshalListPipelinesRequest_ResponseSchema
448
- );
423
+ resp = parseResponse(respBody, unmarshalListPipelinesResponseSchema);
449
424
  };
450
425
  await executeCall(call, options);
451
426
  if (resp === undefined) {
452
- throw new Error('API call completed without a result.');
427
+ throw new Error('operation completed without a result.');
453
428
  }
454
429
  return resp;
455
430
  }
@@ -475,7 +450,7 @@ export class PipelinesClient {
475
450
  async listUpdates(
476
451
  req: ListUpdatesRequest,
477
452
  options?: CallOptions
478
- ): Promise<ListUpdatesRequest_Response> {
453
+ ): Promise<ListUpdatesResponse> {
479
454
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/updates`;
480
455
  const params = new URLSearchParams();
481
456
  if (req.pageToken !== undefined) {
@@ -489,8 +464,8 @@ export class PipelinesClient {
489
464
  }
490
465
  const query = params.toString();
491
466
  const fullUrl = query !== '' ? `${url}?${query}` : url;
492
- let resp: ListUpdatesRequest_Response | undefined;
493
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
467
+ let resp: ListUpdatesResponse | undefined;
468
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
494
469
  const headers = new Headers();
495
470
  if (this.workspaceId !== undefined) {
496
471
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -502,14 +477,11 @@ export class PipelinesClient {
502
477
  httpClient: this.httpClient,
503
478
  logger: this.logger,
504
479
  });
505
- resp = parseResponse(
506
- respBody,
507
- unmarshalListUpdatesRequest_ResponseSchema
508
- );
480
+ resp = parseResponse(respBody, unmarshalListUpdatesResponseSchema);
509
481
  };
510
482
  await executeCall(call, options);
511
483
  if (resp === undefined) {
512
- throw new Error('API call completed without a result.');
484
+ throw new Error('operation completed without a result.');
513
485
  }
514
486
  return resp;
515
487
  }
@@ -518,11 +490,11 @@ export class PipelinesClient {
518
490
  async start(
519
491
  req: StartUpdateRequest,
520
492
  options?: CallOptions
521
- ): Promise<StartUpdateRequest_Response> {
493
+ ): Promise<StartUpdateResponse> {
522
494
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/updates`;
523
495
  const body = marshalRequest(req, marshalStartUpdateRequestSchema);
524
- let resp: StartUpdateRequest_Response | undefined;
525
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
496
+ let resp: StartUpdateResponse | undefined;
497
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
526
498
  const headers = new Headers({'Content-Type': 'application/json'});
527
499
  if (this.workspaceId !== undefined) {
528
500
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -534,27 +506,24 @@ export class PipelinesClient {
534
506
  httpClient: this.httpClient,
535
507
  logger: this.logger,
536
508
  });
537
- resp = parseResponse(
538
- respBody,
539
- unmarshalStartUpdateRequest_ResponseSchema
540
- );
509
+ resp = parseResponse(respBody, unmarshalStartUpdateResponseSchema);
541
510
  };
542
511
  await executeCall(call, options);
543
512
  if (resp === undefined) {
544
- throw new Error('API call completed without a result.');
513
+ throw new Error('operation completed without a result.');
545
514
  }
546
515
  return resp;
547
516
  }
548
517
 
549
518
  /** Stops the pipeline by canceling the active update. If there is no active update for the pipeline, this request is a no-op. */
550
- async stop(
519
+ private async stop(
551
520
  req: StopPipelineRequest,
552
521
  options?: CallOptions
553
- ): Promise<StopPipelineRequest_Response> {
522
+ ): Promise<StopPipelineResponse> {
554
523
  const url = `${this.host}/api/2.0/pipelines/${req.pipelineId ?? ''}/stop`;
555
524
  const body = marshalRequest(req, marshalStopPipelineRequestSchema);
556
- let resp: StopPipelineRequest_Response | undefined;
557
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
525
+ let resp: StopPipelineResponse | undefined;
526
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
558
527
  const headers = new Headers({'Content-Type': 'application/json'});
559
528
  if (this.workspaceId !== undefined) {
560
529
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -566,14 +535,11 @@ export class PipelinesClient {
566
535
  httpClient: this.httpClient,
567
536
  logger: this.logger,
568
537
  });
569
- resp = parseResponse(
570
- respBody,
571
- unmarshalStopPipelineRequest_ResponseSchema
572
- );
538
+ resp = parseResponse(respBody, unmarshalStopPipelineResponseSchema);
573
539
  };
574
540
  await executeCall(call, options);
575
541
  if (resp === undefined) {
576
- throw new Error('API call completed without a result.');
542
+ throw new Error('operation completed without a result.');
577
543
  }
578
544
  return resp;
579
545
  }
@@ -603,15 +569,15 @@ export class StopWaiter {
603
569
  *
604
570
  * Throws if a failure state is reached.
605
571
  */
606
- async wait(options?: CallOptions): Promise<GetPipelineRequest_Response> {
607
- let result: GetPipelineRequest_Response | undefined;
572
+ async wait(options?: LroOptions): Promise<GetPipelineResponse> {
573
+ let result: GetPipelineResponse | undefined;
608
574
 
609
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
575
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
610
576
  const pollResp = await this.client.get(
611
577
  {
612
578
  pipelineId: this.pipelineId,
613
579
  },
614
- {...options, ...(callSignal !== undefined && {signal: callSignal})}
580
+ callSignal !== undefined ? {signal: callSignal} : undefined
615
581
  );
616
582
 
617
583
  const status = pollResp.state;
@@ -632,16 +598,9 @@ export class StopWaiter {
632
598
  }
633
599
  };
634
600
 
635
- const retryOptions: CallOptions = {
636
- ...(options?.signal !== undefined && {signal: options.signal}),
637
- retrier: () =>
638
- retryOn({}, (err: Error) => {
639
- return err instanceof StillRunningError;
640
- }),
641
- };
642
- await executeCall(call, retryOptions);
601
+ await executeWait(call, options);
643
602
  if (result === undefined) {
644
- throw new Error('API call completed without a result.');
603
+ throw new Error('operation completed without a result.');
645
604
  }
646
605
  return result;
647
606
  }
package/src/v2/index.ts CHANGED
@@ -33,30 +33,30 @@ export {
33
33
 
34
34
  export type {
35
35
  ApplyEnvironmentRequest,
36
- ApplyEnvironmentRequest_Response,
36
+ ApplyEnvironmentResponse,
37
37
  AutoFullRefreshPolicy,
38
38
  ClonePipelineRequest,
39
39
  ClonePipelineRequest_ConfigurationEntry,
40
- ClonePipelineRequest_Response,
41
40
  ClonePipelineRequest_TagsEntry,
41
+ ClonePipelineResponse,
42
42
  ConfluenceConnectorOptions,
43
43
  ConnectionParameters,
44
44
  ConnectorOptions,
45
45
  CreatePipelineRequest,
46
46
  CreatePipelineRequest_ConfigurationEntry,
47
47
  CreatePipelineRequest_ParametersEntry,
48
- CreatePipelineRequest_Response,
49
48
  CreatePipelineRequest_TagsEntry,
49
+ CreatePipelineResponse,
50
50
  CronTrigger,
51
51
  DataPlaneId,
52
52
  DataStagingOptions,
53
53
  DeletePipelineRequest,
54
- DeletePipelineRequest_Response,
54
+ DeletePipelineResponse,
55
55
  EditPipelineRequest,
56
56
  EditPipelineRequest_ConfigurationEntry,
57
57
  EditPipelineRequest_ParametersEntry,
58
- EditPipelineRequest_Response,
59
58
  EditPipelineRequest_TagsEntry,
59
+ EditPipelineResponse,
60
60
  ErrorDetail,
61
61
  EventLogSpec,
62
62
  FileFilter,
@@ -64,10 +64,10 @@ export type {
64
64
  FileIngestionOptions_FormatOptionsEntry,
65
65
  Filters,
66
66
  GetPipelineRequest,
67
- GetPipelineRequest_Response,
68
- GetPipelineRequest_Response_ParametersEntry,
67
+ GetPipelineResponse,
68
+ GetPipelineResponse_ParametersEntry,
69
69
  GetUpdateRequest,
70
- GetUpdateRequest_Response,
70
+ GetUpdateResponse,
71
71
  GoogleAdsConfig,
72
72
  GoogleAdsOptions,
73
73
  GoogleDriveOptions,
@@ -87,11 +87,11 @@ export type {
87
87
  KafkaOptions,
88
88
  KafkaOptions_ClientConfigEntry,
89
89
  ListPipelineEventsRequest,
90
- ListPipelineEventsRequest_Response,
90
+ ListPipelineEventsResponse,
91
91
  ListPipelinesRequest,
92
- ListPipelinesRequest_Response,
92
+ ListPipelinesResponse,
93
93
  ListUpdatesRequest,
94
- ListUpdatesRequest_Response,
94
+ ListUpdatesResponse,
95
95
  ManualTrigger,
96
96
  MetaMarketingOptions,
97
97
  NotebookLibrary,
@@ -140,9 +140,9 @@ export type {
140
140
  StackFrame,
141
141
  StartUpdateRequest,
142
142
  StartUpdateRequest_ParametersEntry,
143
- StartUpdateRequest_Response,
143
+ StartUpdateResponse,
144
144
  StopPipelineRequest,
145
- StopPipelineRequest_Response,
145
+ StopPipelineResponse,
146
146
  TikTokAdsOptions,
147
147
  Transformer,
148
148
  Truncation,