@databricks/sdk-jobs 0.1.0-dev.2 → 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/dist/v2/client.d.ts +20 -20
- package/dist/v2/client.d.ts.map +1 -1
- package/dist/v2/client.js +20 -20
- package/dist/v2/client.js.map +1 -1
- package/dist/v2/index.d.ts +1 -1
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/model.d.ts +56 -56
- package/dist/v2/model.d.ts.map +1 -1
- package/dist/v2/model.js +21 -40
- package/dist/v2/model.js.map +1 -1
- package/package.json +6 -5
- package/src/v2/client.ts +103 -112
- package/src/v2/index.ts +21 -21
- package/src/v2/model.ts +283 -324
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/sdk-jobs",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
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.
|
|
32
|
-
"@databricks/sdk-core": ">=0.1.0-dev.
|
|
33
|
-
"@databricks/sdk-options": ">=0.1.0-dev.
|
|
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
|
@@ -23,44 +23,44 @@ import type {
|
|
|
23
23
|
BaseJob,
|
|
24
24
|
BaseRun,
|
|
25
25
|
CancelAllRunsRequest,
|
|
26
|
-
|
|
26
|
+
CancelAllRunsResponse,
|
|
27
27
|
CancelRunRequest,
|
|
28
|
-
|
|
28
|
+
CancelRunResponse,
|
|
29
29
|
CreateJobRequest,
|
|
30
|
-
|
|
30
|
+
CreateJobResponse,
|
|
31
31
|
DeleteJobRequest,
|
|
32
|
-
|
|
32
|
+
DeleteJobResponse,
|
|
33
33
|
DeleteRunRequest,
|
|
34
|
-
|
|
34
|
+
DeleteRunResponse,
|
|
35
35
|
EnforcePolicyComplianceForJob,
|
|
36
|
-
|
|
36
|
+
EnforcePolicyComplianceResponse,
|
|
37
37
|
ExportRunRequest,
|
|
38
|
-
|
|
38
|
+
ExportRunResponse,
|
|
39
39
|
GetJobRequest,
|
|
40
|
-
|
|
40
|
+
GetJobResponse,
|
|
41
41
|
GetPolicyComplianceForJob,
|
|
42
|
-
|
|
42
|
+
GetPolicyComplianceForJobResponse,
|
|
43
43
|
GetRunOutputRequest,
|
|
44
|
-
|
|
44
|
+
GetRunOutputResponse,
|
|
45
45
|
GetRunRequest,
|
|
46
|
-
|
|
46
|
+
GetRunResponse,
|
|
47
47
|
ListJobComplianceForPolicy,
|
|
48
48
|
ListJobComplianceForPolicy_JobCompliance,
|
|
49
|
-
|
|
49
|
+
ListJobComplianceResponse,
|
|
50
50
|
ListJobsRequest,
|
|
51
|
-
|
|
51
|
+
ListJobsResponse,
|
|
52
52
|
ListRunsRequest,
|
|
53
|
-
|
|
53
|
+
ListRunsResponse,
|
|
54
54
|
RepairRunRequest,
|
|
55
|
-
|
|
55
|
+
RepairRunResponse,
|
|
56
56
|
ResetJobRequest,
|
|
57
|
-
|
|
57
|
+
ResetJobResponse,
|
|
58
58
|
RunNowRequest,
|
|
59
|
-
|
|
59
|
+
RunNowResponse,
|
|
60
60
|
SubmitRunRequest,
|
|
61
|
-
|
|
61
|
+
SubmitRunResponse,
|
|
62
62
|
UpdateJobRequest,
|
|
63
|
-
|
|
63
|
+
UpdateJobResponse,
|
|
64
64
|
} from './model';
|
|
65
65
|
import {
|
|
66
66
|
RunLifeCycleState_RunLifeCycleState,
|
|
@@ -75,25 +75,25 @@ import {
|
|
|
75
75
|
marshalRunNowRequestSchema,
|
|
76
76
|
marshalSubmitRunRequestSchema,
|
|
77
77
|
marshalUpdateJobRequestSchema,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
78
|
+
unmarshalCancelAllRunsResponseSchema,
|
|
79
|
+
unmarshalCancelRunResponseSchema,
|
|
80
|
+
unmarshalCreateJobResponseSchema,
|
|
81
|
+
unmarshalDeleteJobResponseSchema,
|
|
82
|
+
unmarshalDeleteRunResponseSchema,
|
|
83
|
+
unmarshalEnforcePolicyComplianceResponseSchema,
|
|
84
|
+
unmarshalExportRunResponseSchema,
|
|
85
|
+
unmarshalGetJobResponseSchema,
|
|
86
|
+
unmarshalGetPolicyComplianceForJobResponseSchema,
|
|
87
|
+
unmarshalGetRunOutputResponseSchema,
|
|
88
|
+
unmarshalGetRunResponseSchema,
|
|
89
|
+
unmarshalListJobComplianceResponseSchema,
|
|
90
|
+
unmarshalListJobsResponseSchema,
|
|
91
|
+
unmarshalListRunsResponseSchema,
|
|
92
|
+
unmarshalRepairRunResponseSchema,
|
|
93
|
+
unmarshalResetJobResponseSchema,
|
|
94
|
+
unmarshalRunNowResponseSchema,
|
|
95
|
+
unmarshalSubmitRunResponseSchema,
|
|
96
|
+
unmarshalUpdateJobResponseSchema,
|
|
97
97
|
} from './model';
|
|
98
98
|
|
|
99
99
|
// Package identity segment for this client to be used in the User-Agent header.
|
|
@@ -139,13 +139,13 @@ export class JobsClient {
|
|
|
139
139
|
async enforcePolicyComplianceForJob(
|
|
140
140
|
req: EnforcePolicyComplianceForJob,
|
|
141
141
|
options?: CallOptions
|
|
142
|
-
): Promise<
|
|
142
|
+
): Promise<EnforcePolicyComplianceResponse> {
|
|
143
143
|
const url = `${this.host}/api/2.0/policies/jobs/enforce-compliance`;
|
|
144
144
|
const body = marshalRequest(
|
|
145
145
|
req,
|
|
146
146
|
marshalEnforcePolicyComplianceForJobSchema
|
|
147
147
|
);
|
|
148
|
-
let resp:
|
|
148
|
+
let resp: EnforcePolicyComplianceResponse | undefined;
|
|
149
149
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
150
150
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
151
151
|
if (this.workspaceId !== undefined) {
|
|
@@ -160,7 +160,7 @@ export class JobsClient {
|
|
|
160
160
|
});
|
|
161
161
|
resp = parseResponse(
|
|
162
162
|
respBody,
|
|
163
|
-
|
|
163
|
+
unmarshalEnforcePolicyComplianceResponseSchema
|
|
164
164
|
);
|
|
165
165
|
};
|
|
166
166
|
await executeCall(call, options);
|
|
@@ -179,7 +179,7 @@ export class JobsClient {
|
|
|
179
179
|
async getPolicyComplianceForJob(
|
|
180
180
|
req: GetPolicyComplianceForJob,
|
|
181
181
|
options?: CallOptions
|
|
182
|
-
): Promise<
|
|
182
|
+
): Promise<GetPolicyComplianceForJobResponse> {
|
|
183
183
|
const url = `${this.host}/api/2.0/policies/jobs/get-compliance`;
|
|
184
184
|
const params = new URLSearchParams();
|
|
185
185
|
if (req.jobId !== undefined) {
|
|
@@ -187,7 +187,7 @@ export class JobsClient {
|
|
|
187
187
|
}
|
|
188
188
|
const query = params.toString();
|
|
189
189
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
190
|
-
let resp:
|
|
190
|
+
let resp: GetPolicyComplianceForJobResponse | undefined;
|
|
191
191
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
192
192
|
const headers = new Headers();
|
|
193
193
|
if (this.workspaceId !== undefined) {
|
|
@@ -202,7 +202,7 @@ export class JobsClient {
|
|
|
202
202
|
});
|
|
203
203
|
resp = parseResponse(
|
|
204
204
|
respBody,
|
|
205
|
-
|
|
205
|
+
unmarshalGetPolicyComplianceForJobResponseSchema
|
|
206
206
|
);
|
|
207
207
|
};
|
|
208
208
|
await executeCall(call, options);
|
|
@@ -221,7 +221,7 @@ export class JobsClient {
|
|
|
221
221
|
async listJobComplianceForPolicy(
|
|
222
222
|
req: ListJobComplianceForPolicy,
|
|
223
223
|
options?: CallOptions
|
|
224
|
-
): Promise<
|
|
224
|
+
): Promise<ListJobComplianceResponse> {
|
|
225
225
|
const url = `${this.host}/api/2.0/policies/jobs/list-compliance`;
|
|
226
226
|
const params = new URLSearchParams();
|
|
227
227
|
if (req.policyId !== undefined) {
|
|
@@ -235,7 +235,7 @@ export class JobsClient {
|
|
|
235
235
|
}
|
|
236
236
|
const query = params.toString();
|
|
237
237
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
238
|
-
let resp:
|
|
238
|
+
let resp: ListJobComplianceResponse | undefined;
|
|
239
239
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
240
240
|
const headers = new Headers();
|
|
241
241
|
if (this.workspaceId !== undefined) {
|
|
@@ -248,10 +248,7 @@ export class JobsClient {
|
|
|
248
248
|
httpClient: this.httpClient,
|
|
249
249
|
logger: this.logger,
|
|
250
250
|
});
|
|
251
|
-
resp = parseResponse(
|
|
252
|
-
respBody,
|
|
253
|
-
unmarshalListJobComplianceForPolicy_ResponseSchema
|
|
254
|
-
);
|
|
251
|
+
resp = parseResponse(respBody, unmarshalListJobComplianceResponseSchema);
|
|
255
252
|
};
|
|
256
253
|
await executeCall(call, options);
|
|
257
254
|
if (resp === undefined) {
|
|
@@ -284,10 +281,10 @@ export class JobsClient {
|
|
|
284
281
|
async cancelAllRuns(
|
|
285
282
|
req: CancelAllRunsRequest,
|
|
286
283
|
options?: CallOptions
|
|
287
|
-
): Promise<
|
|
284
|
+
): Promise<CancelAllRunsResponse> {
|
|
288
285
|
const url = `${this.host}/api/2.2/jobs/runs/cancel-all`;
|
|
289
286
|
const body = marshalRequest(req, marshalCancelAllRunsRequestSchema);
|
|
290
|
-
let resp:
|
|
287
|
+
let resp: CancelAllRunsResponse | undefined;
|
|
291
288
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
292
289
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
293
290
|
if (this.workspaceId !== undefined) {
|
|
@@ -300,10 +297,7 @@ export class JobsClient {
|
|
|
300
297
|
httpClient: this.httpClient,
|
|
301
298
|
logger: this.logger,
|
|
302
299
|
});
|
|
303
|
-
resp = parseResponse(
|
|
304
|
-
respBody,
|
|
305
|
-
unmarshalCancelAllRunsRequest_ResponseSchema
|
|
306
|
-
);
|
|
300
|
+
resp = parseResponse(respBody, unmarshalCancelAllRunsResponseSchema);
|
|
307
301
|
};
|
|
308
302
|
await executeCall(call, options);
|
|
309
303
|
if (resp === undefined) {
|
|
@@ -319,10 +313,10 @@ export class JobsClient {
|
|
|
319
313
|
private async cancelRun(
|
|
320
314
|
req: CancelRunRequest,
|
|
321
315
|
options?: CallOptions
|
|
322
|
-
): Promise<
|
|
316
|
+
): Promise<CancelRunResponse> {
|
|
323
317
|
const url = `${this.host}/api/2.2/jobs/runs/cancel`;
|
|
324
318
|
const body = marshalRequest(req, marshalCancelRunRequestSchema);
|
|
325
|
-
let resp:
|
|
319
|
+
let resp: CancelRunResponse | undefined;
|
|
326
320
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
327
321
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
328
322
|
if (this.workspaceId !== undefined) {
|
|
@@ -335,7 +329,7 @@ export class JobsClient {
|
|
|
335
329
|
httpClient: this.httpClient,
|
|
336
330
|
logger: this.logger,
|
|
337
331
|
});
|
|
338
|
-
resp = parseResponse(respBody,
|
|
332
|
+
resp = parseResponse(respBody, unmarshalCancelRunResponseSchema);
|
|
339
333
|
};
|
|
340
334
|
await executeCall(call, options);
|
|
341
335
|
if (resp === undefined) {
|
|
@@ -359,10 +353,10 @@ export class JobsClient {
|
|
|
359
353
|
async createJob(
|
|
360
354
|
req: CreateJobRequest,
|
|
361
355
|
options?: CallOptions
|
|
362
|
-
): Promise<
|
|
356
|
+
): Promise<CreateJobResponse> {
|
|
363
357
|
const url = `${this.host}/api/2.2/jobs/create`;
|
|
364
358
|
const body = marshalRequest(req, marshalCreateJobRequestSchema);
|
|
365
|
-
let resp:
|
|
359
|
+
let resp: CreateJobResponse | undefined;
|
|
366
360
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
367
361
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
368
362
|
if (this.workspaceId !== undefined) {
|
|
@@ -375,7 +369,7 @@ export class JobsClient {
|
|
|
375
369
|
httpClient: this.httpClient,
|
|
376
370
|
logger: this.logger,
|
|
377
371
|
});
|
|
378
|
-
resp = parseResponse(respBody,
|
|
372
|
+
resp = parseResponse(respBody, unmarshalCreateJobResponseSchema);
|
|
379
373
|
};
|
|
380
374
|
await executeCall(call, options);
|
|
381
375
|
if (resp === undefined) {
|
|
@@ -388,10 +382,10 @@ export class JobsClient {
|
|
|
388
382
|
async deleteJob(
|
|
389
383
|
req: DeleteJobRequest,
|
|
390
384
|
options?: CallOptions
|
|
391
|
-
): Promise<
|
|
385
|
+
): Promise<DeleteJobResponse> {
|
|
392
386
|
const url = `${this.host}/api/2.2/jobs/delete`;
|
|
393
387
|
const body = marshalRequest(req, marshalDeleteJobRequestSchema);
|
|
394
|
-
let resp:
|
|
388
|
+
let resp: DeleteJobResponse | undefined;
|
|
395
389
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
396
390
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
397
391
|
if (this.workspaceId !== undefined) {
|
|
@@ -404,7 +398,7 @@ export class JobsClient {
|
|
|
404
398
|
httpClient: this.httpClient,
|
|
405
399
|
logger: this.logger,
|
|
406
400
|
});
|
|
407
|
-
resp = parseResponse(respBody,
|
|
401
|
+
resp = parseResponse(respBody, unmarshalDeleteJobResponseSchema);
|
|
408
402
|
};
|
|
409
403
|
await executeCall(call, options);
|
|
410
404
|
if (resp === undefined) {
|
|
@@ -417,10 +411,10 @@ export class JobsClient {
|
|
|
417
411
|
async deleteRun(
|
|
418
412
|
req: DeleteRunRequest,
|
|
419
413
|
options?: CallOptions
|
|
420
|
-
): Promise<
|
|
414
|
+
): Promise<DeleteRunResponse> {
|
|
421
415
|
const url = `${this.host}/api/2.2/jobs/runs/delete`;
|
|
422
416
|
const body = marshalRequest(req, marshalDeleteRunRequestSchema);
|
|
423
|
-
let resp:
|
|
417
|
+
let resp: DeleteRunResponse | undefined;
|
|
424
418
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
425
419
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
426
420
|
if (this.workspaceId !== undefined) {
|
|
@@ -433,7 +427,7 @@ export class JobsClient {
|
|
|
433
427
|
httpClient: this.httpClient,
|
|
434
428
|
logger: this.logger,
|
|
435
429
|
});
|
|
436
|
-
resp = parseResponse(respBody,
|
|
430
|
+
resp = parseResponse(respBody, unmarshalDeleteRunResponseSchema);
|
|
437
431
|
};
|
|
438
432
|
await executeCall(call, options);
|
|
439
433
|
if (resp === undefined) {
|
|
@@ -446,7 +440,7 @@ export class JobsClient {
|
|
|
446
440
|
async exportRun(
|
|
447
441
|
req: ExportRunRequest,
|
|
448
442
|
options?: CallOptions
|
|
449
|
-
): Promise<
|
|
443
|
+
): Promise<ExportRunResponse> {
|
|
450
444
|
const url = `${this.host}/api/2.2/jobs/runs/export`;
|
|
451
445
|
const params = new URLSearchParams();
|
|
452
446
|
if (req.runId !== undefined) {
|
|
@@ -457,7 +451,7 @@ export class JobsClient {
|
|
|
457
451
|
}
|
|
458
452
|
const query = params.toString();
|
|
459
453
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
460
|
-
let resp:
|
|
454
|
+
let resp: ExportRunResponse | undefined;
|
|
461
455
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
462
456
|
const headers = new Headers();
|
|
463
457
|
if (this.workspaceId !== undefined) {
|
|
@@ -470,7 +464,7 @@ export class JobsClient {
|
|
|
470
464
|
httpClient: this.httpClient,
|
|
471
465
|
logger: this.logger,
|
|
472
466
|
});
|
|
473
|
-
resp = parseResponse(respBody,
|
|
467
|
+
resp = parseResponse(respBody, unmarshalExportRunResponseSchema);
|
|
474
468
|
};
|
|
475
469
|
await executeCall(call, options);
|
|
476
470
|
if (resp === undefined) {
|
|
@@ -490,7 +484,7 @@ export class JobsClient {
|
|
|
490
484
|
async getJob(
|
|
491
485
|
req: GetJobRequest,
|
|
492
486
|
options?: CallOptions
|
|
493
|
-
): Promise<
|
|
487
|
+
): Promise<GetJobResponse> {
|
|
494
488
|
const url = `${this.host}/api/2.2/jobs/get`;
|
|
495
489
|
const params = new URLSearchParams();
|
|
496
490
|
if (req.jobId !== undefined) {
|
|
@@ -504,7 +498,7 @@ export class JobsClient {
|
|
|
504
498
|
}
|
|
505
499
|
const query = params.toString();
|
|
506
500
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
507
|
-
let resp:
|
|
501
|
+
let resp: GetJobResponse | undefined;
|
|
508
502
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
509
503
|
const headers = new Headers();
|
|
510
504
|
if (this.workspaceId !== undefined) {
|
|
@@ -517,7 +511,7 @@ export class JobsClient {
|
|
|
517
511
|
httpClient: this.httpClient,
|
|
518
512
|
logger: this.logger,
|
|
519
513
|
});
|
|
520
|
-
resp = parseResponse(respBody,
|
|
514
|
+
resp = parseResponse(respBody, unmarshalGetJobResponseSchema);
|
|
521
515
|
};
|
|
522
516
|
await executeCall(call, options);
|
|
523
517
|
if (resp === undefined) {
|
|
@@ -537,7 +531,7 @@ export class JobsClient {
|
|
|
537
531
|
async getRun(
|
|
538
532
|
req: GetRunRequest,
|
|
539
533
|
options?: CallOptions
|
|
540
|
-
): Promise<
|
|
534
|
+
): Promise<GetRunResponse> {
|
|
541
535
|
const url = `${this.host}/api/2.2/jobs/runs/get`;
|
|
542
536
|
const params = new URLSearchParams();
|
|
543
537
|
if (req.runId !== undefined) {
|
|
@@ -557,7 +551,7 @@ export class JobsClient {
|
|
|
557
551
|
}
|
|
558
552
|
const query = params.toString();
|
|
559
553
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
560
|
-
let resp:
|
|
554
|
+
let resp: GetRunResponse | undefined;
|
|
561
555
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
562
556
|
const headers = new Headers();
|
|
563
557
|
if (this.workspaceId !== undefined) {
|
|
@@ -570,7 +564,7 @@ export class JobsClient {
|
|
|
570
564
|
httpClient: this.httpClient,
|
|
571
565
|
logger: this.logger,
|
|
572
566
|
});
|
|
573
|
-
resp = parseResponse(respBody,
|
|
567
|
+
resp = parseResponse(respBody, unmarshalGetRunResponseSchema);
|
|
574
568
|
};
|
|
575
569
|
await executeCall(call, options);
|
|
576
570
|
if (resp === undefined) {
|
|
@@ -593,7 +587,7 @@ export class JobsClient {
|
|
|
593
587
|
async getRunOutput(
|
|
594
588
|
req: GetRunOutputRequest,
|
|
595
589
|
options?: CallOptions
|
|
596
|
-
): Promise<
|
|
590
|
+
): Promise<GetRunOutputResponse> {
|
|
597
591
|
const url = `${this.host}/api/2.2/jobs/runs/get-output`;
|
|
598
592
|
const params = new URLSearchParams();
|
|
599
593
|
if (req.runId !== undefined) {
|
|
@@ -601,7 +595,7 @@ export class JobsClient {
|
|
|
601
595
|
}
|
|
602
596
|
const query = params.toString();
|
|
603
597
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
604
|
-
let resp:
|
|
598
|
+
let resp: GetRunOutputResponse | undefined;
|
|
605
599
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
606
600
|
const headers = new Headers();
|
|
607
601
|
if (this.workspaceId !== undefined) {
|
|
@@ -614,10 +608,7 @@ export class JobsClient {
|
|
|
614
608
|
httpClient: this.httpClient,
|
|
615
609
|
logger: this.logger,
|
|
616
610
|
});
|
|
617
|
-
resp = parseResponse(
|
|
618
|
-
respBody,
|
|
619
|
-
unmarshalGetRunOutputRequest_ResponseSchema
|
|
620
|
-
);
|
|
611
|
+
resp = parseResponse(respBody, unmarshalGetRunOutputResponseSchema);
|
|
621
612
|
};
|
|
622
613
|
await executeCall(call, options);
|
|
623
614
|
if (resp === undefined) {
|
|
@@ -630,7 +621,7 @@ export class JobsClient {
|
|
|
630
621
|
async listJobs(
|
|
631
622
|
req: ListJobsRequest,
|
|
632
623
|
options?: CallOptions
|
|
633
|
-
): Promise<
|
|
624
|
+
): Promise<ListJobsResponse> {
|
|
634
625
|
const url = `${this.host}/api/2.2/jobs/list`;
|
|
635
626
|
const params = new URLSearchParams();
|
|
636
627
|
if (req.offset !== undefined) {
|
|
@@ -650,7 +641,7 @@ export class JobsClient {
|
|
|
650
641
|
}
|
|
651
642
|
const query = params.toString();
|
|
652
643
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
653
|
-
let resp:
|
|
644
|
+
let resp: ListJobsResponse | undefined;
|
|
654
645
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
655
646
|
const headers = new Headers();
|
|
656
647
|
if (this.workspaceId !== undefined) {
|
|
@@ -663,7 +654,7 @@ export class JobsClient {
|
|
|
663
654
|
httpClient: this.httpClient,
|
|
664
655
|
logger: this.logger,
|
|
665
656
|
});
|
|
666
|
-
resp = parseResponse(respBody,
|
|
657
|
+
resp = parseResponse(respBody, unmarshalListJobsResponseSchema);
|
|
667
658
|
};
|
|
668
659
|
await executeCall(call, options);
|
|
669
660
|
if (resp === undefined) {
|
|
@@ -693,7 +684,7 @@ export class JobsClient {
|
|
|
693
684
|
async listRuns(
|
|
694
685
|
req: ListRunsRequest,
|
|
695
686
|
options?: CallOptions
|
|
696
|
-
): Promise<
|
|
687
|
+
): Promise<ListRunsResponse> {
|
|
697
688
|
const url = `${this.host}/api/2.2/jobs/runs/list`;
|
|
698
689
|
const params = new URLSearchParams();
|
|
699
690
|
if (req.jobId !== undefined) {
|
|
@@ -731,7 +722,7 @@ export class JobsClient {
|
|
|
731
722
|
}
|
|
732
723
|
const query = params.toString();
|
|
733
724
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
734
|
-
let resp:
|
|
725
|
+
let resp: ListRunsResponse | undefined;
|
|
735
726
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
736
727
|
const headers = new Headers();
|
|
737
728
|
if (this.workspaceId !== undefined) {
|
|
@@ -744,7 +735,7 @@ export class JobsClient {
|
|
|
744
735
|
httpClient: this.httpClient,
|
|
745
736
|
logger: this.logger,
|
|
746
737
|
});
|
|
747
|
-
resp = parseResponse(respBody,
|
|
738
|
+
resp = parseResponse(respBody, unmarshalListRunsResponseSchema);
|
|
748
739
|
};
|
|
749
740
|
await executeCall(call, options);
|
|
750
741
|
if (resp === undefined) {
|
|
@@ -778,10 +769,10 @@ export class JobsClient {
|
|
|
778
769
|
private async repair(
|
|
779
770
|
req: RepairRunRequest,
|
|
780
771
|
options?: CallOptions
|
|
781
|
-
): Promise<
|
|
772
|
+
): Promise<RepairRunResponse> {
|
|
782
773
|
const url = `${this.host}/api/2.2/jobs/runs/repair`;
|
|
783
774
|
const body = marshalRequest(req, marshalRepairRunRequestSchema);
|
|
784
|
-
let resp:
|
|
775
|
+
let resp: RepairRunResponse | undefined;
|
|
785
776
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
786
777
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
787
778
|
if (this.workspaceId !== undefined) {
|
|
@@ -794,7 +785,7 @@ export class JobsClient {
|
|
|
794
785
|
httpClient: this.httpClient,
|
|
795
786
|
logger: this.logger,
|
|
796
787
|
});
|
|
797
|
-
resp = parseResponse(respBody,
|
|
788
|
+
resp = parseResponse(respBody, unmarshalRepairRunResponseSchema);
|
|
798
789
|
};
|
|
799
790
|
await executeCall(call, options);
|
|
800
791
|
if (resp === undefined) {
|
|
@@ -818,10 +809,10 @@ export class JobsClient {
|
|
|
818
809
|
async resetJob(
|
|
819
810
|
req: ResetJobRequest,
|
|
820
811
|
options?: CallOptions
|
|
821
|
-
): Promise<
|
|
812
|
+
): Promise<ResetJobResponse> {
|
|
822
813
|
const url = `${this.host}/api/2.2/jobs/reset`;
|
|
823
814
|
const body = marshalRequest(req, marshalResetJobRequestSchema);
|
|
824
|
-
let resp:
|
|
815
|
+
let resp: ResetJobResponse | undefined;
|
|
825
816
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
826
817
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
827
818
|
if (this.workspaceId !== undefined) {
|
|
@@ -834,7 +825,7 @@ export class JobsClient {
|
|
|
834
825
|
httpClient: this.httpClient,
|
|
835
826
|
logger: this.logger,
|
|
836
827
|
});
|
|
837
|
-
resp = parseResponse(respBody,
|
|
828
|
+
resp = parseResponse(respBody, unmarshalResetJobResponseSchema);
|
|
838
829
|
};
|
|
839
830
|
await executeCall(call, options);
|
|
840
831
|
if (resp === undefined) {
|
|
@@ -847,10 +838,10 @@ export class JobsClient {
|
|
|
847
838
|
private async runNow(
|
|
848
839
|
req: RunNowRequest,
|
|
849
840
|
options?: CallOptions
|
|
850
|
-
): Promise<
|
|
841
|
+
): Promise<RunNowResponse> {
|
|
851
842
|
const url = `${this.host}/api/2.2/jobs/run-now`;
|
|
852
843
|
const body = marshalRequest(req, marshalRunNowRequestSchema);
|
|
853
|
-
let resp:
|
|
844
|
+
let resp: RunNowResponse | undefined;
|
|
854
845
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
855
846
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
856
847
|
if (this.workspaceId !== undefined) {
|
|
@@ -863,7 +854,7 @@ export class JobsClient {
|
|
|
863
854
|
httpClient: this.httpClient,
|
|
864
855
|
logger: this.logger,
|
|
865
856
|
});
|
|
866
|
-
resp = parseResponse(respBody,
|
|
857
|
+
resp = parseResponse(respBody, unmarshalRunNowResponseSchema);
|
|
867
858
|
};
|
|
868
859
|
await executeCall(call, options);
|
|
869
860
|
if (resp === undefined) {
|
|
@@ -899,10 +890,10 @@ export class JobsClient {
|
|
|
899
890
|
private async submitRun(
|
|
900
891
|
req: SubmitRunRequest,
|
|
901
892
|
options?: CallOptions
|
|
902
|
-
): Promise<
|
|
893
|
+
): Promise<SubmitRunResponse> {
|
|
903
894
|
const url = `${this.host}/api/2.2/jobs/runs/submit`;
|
|
904
895
|
const body = marshalRequest(req, marshalSubmitRunRequestSchema);
|
|
905
|
-
let resp:
|
|
896
|
+
let resp: SubmitRunResponse | undefined;
|
|
906
897
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
907
898
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
908
899
|
if (this.workspaceId !== undefined) {
|
|
@@ -915,7 +906,7 @@ export class JobsClient {
|
|
|
915
906
|
httpClient: this.httpClient,
|
|
916
907
|
logger: this.logger,
|
|
917
908
|
});
|
|
918
|
-
resp = parseResponse(respBody,
|
|
909
|
+
resp = parseResponse(respBody, unmarshalSubmitRunResponseSchema);
|
|
919
910
|
};
|
|
920
911
|
await executeCall(call, options);
|
|
921
912
|
if (resp === undefined) {
|
|
@@ -939,10 +930,10 @@ export class JobsClient {
|
|
|
939
930
|
async updateJob(
|
|
940
931
|
req: UpdateJobRequest,
|
|
941
932
|
options?: CallOptions
|
|
942
|
-
): Promise<
|
|
933
|
+
): Promise<UpdateJobResponse> {
|
|
943
934
|
const url = `${this.host}/api/2.2/jobs/update`;
|
|
944
935
|
const body = marshalRequest(req, marshalUpdateJobRequestSchema);
|
|
945
|
-
let resp:
|
|
936
|
+
let resp: UpdateJobResponse | undefined;
|
|
946
937
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
947
938
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
948
939
|
if (this.workspaceId !== undefined) {
|
|
@@ -955,7 +946,7 @@ export class JobsClient {
|
|
|
955
946
|
httpClient: this.httpClient,
|
|
956
947
|
logger: this.logger,
|
|
957
948
|
});
|
|
958
|
-
resp = parseResponse(respBody,
|
|
949
|
+
resp = parseResponse(respBody, unmarshalUpdateJobResponseSchema);
|
|
959
950
|
};
|
|
960
951
|
await executeCall(call, options);
|
|
961
952
|
if (resp === undefined) {
|
|
@@ -976,8 +967,8 @@ export class CancelRunWaiter {
|
|
|
976
967
|
*
|
|
977
968
|
* Throws if a failure state is reached.
|
|
978
969
|
*/
|
|
979
|
-
async wait(options?: LroOptions): Promise<
|
|
980
|
-
let result:
|
|
970
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
971
|
+
let result: GetRunResponse | undefined;
|
|
981
972
|
|
|
982
973
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
983
974
|
const pollResp = await this.client.getRun(
|
|
@@ -1049,8 +1040,8 @@ export class RepairWaiter {
|
|
|
1049
1040
|
*
|
|
1050
1041
|
* Throws if a failure state is reached.
|
|
1051
1042
|
*/
|
|
1052
|
-
async wait(options?: LroOptions): Promise<
|
|
1053
|
-
let result:
|
|
1043
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1044
|
+
let result: GetRunResponse | undefined;
|
|
1054
1045
|
|
|
1055
1046
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1056
1047
|
const pollResp = await this.client.getRun(
|
|
@@ -1122,8 +1113,8 @@ export class RunNowWaiter {
|
|
|
1122
1113
|
*
|
|
1123
1114
|
* Throws if a failure state is reached.
|
|
1124
1115
|
*/
|
|
1125
|
-
async wait(options?: LroOptions): Promise<
|
|
1126
|
-
let result:
|
|
1116
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1117
|
+
let result: GetRunResponse | undefined;
|
|
1127
1118
|
|
|
1128
1119
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1129
1120
|
const pollResp = await this.client.getRun(
|
|
@@ -1195,8 +1186,8 @@ export class SubmitRunWaiter {
|
|
|
1195
1186
|
*
|
|
1196
1187
|
* Throws if a failure state is reached.
|
|
1197
1188
|
*/
|
|
1198
|
-
async wait(options?: LroOptions): Promise<
|
|
1199
|
-
let result:
|
|
1189
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1190
|
+
let result: GetRunResponse | undefined;
|
|
1200
1191
|
|
|
1201
1192
|
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1202
1193
|
const pollResp = await this.client.getRun(
|