windmill-client 1.226.1 → 1.227.1
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/client.d.ts +2 -0
- package/dist/client.js +25 -1
- package/dist/core/OpenAPI.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/models/ScheduledForBeforeNow.d.ts +4 -0
- package/dist/models/ScheduledForBeforeNow.js +6 -0
- package/dist/models/WindmillFilePreview.d.ts +1 -0
- package/dist/models/WorkerTag.d.ts +4 -0
- package/dist/models/WorkerTag.js +6 -0
- package/dist/services/HelpersService.d.ts +21 -1
- package/dist/services/HelpersService.js +16 -0
- package/dist/services/JobService.d.ts +55 -8
- package/dist/services/JobService.js +33 -8
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ export declare function getVariable(path: string): Promise<string>;
|
|
|
66
66
|
*/
|
|
67
67
|
export declare function setVariable(path: string, value: string, isSecretIfNotExist?: boolean, descriptionIfNotExist?: string): Promise<void>;
|
|
68
68
|
export declare function databaseUrlFromResource(path: string): Promise<string>;
|
|
69
|
+
export declare function polarsConnectionSettings(s3_resource_path: string | undefined): Promise<any>;
|
|
70
|
+
export declare function duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<any>;
|
|
69
71
|
/**
|
|
70
72
|
* Get URLs needed for resuming a flow after this step
|
|
71
73
|
* @param approver approver name
|
package/dist/client.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.uint8ArrayToBase64 = exports.base64ToUint8Array = exports.getResumeEndpoints = exports.getResumeUrls = exports.databaseUrlFromResource = exports.setVariable = exports.getVariable = exports.getState = exports.getInternalState = exports.setState = exports.setInternalState = exports.setResource = exports.getStatePath = exports.resolveDefaultResource = exports.getResource = exports.getWorkspace = exports.setClient = exports.SHARED_FOLDER = exports.WorkspaceService = exports.UserService = exports.SettingsService = exports.ScheduleService = exports.ScriptService = exports.VariableService = exports.ResourceService = exports.JobService = exports.GroupService = exports.GranularAclService = exports.FlowService = exports.AuditService = exports.AdminService = void 0;
|
|
12
|
+
exports.uint8ArrayToBase64 = exports.base64ToUint8Array = exports.getResumeEndpoints = exports.getResumeUrls = exports.duckdbConnectionSettings = exports.polarsConnectionSettings = exports.databaseUrlFromResource = exports.setVariable = exports.getVariable = exports.getState = exports.getInternalState = exports.setState = exports.setInternalState = exports.setResource = exports.getStatePath = exports.resolveDefaultResource = exports.getResource = exports.getWorkspace = exports.setClient = exports.SHARED_FOLDER = exports.WorkspaceService = exports.UserService = exports.SettingsService = exports.ScheduleService = exports.ScriptService = exports.VariableService = exports.ResourceService = exports.JobService = exports.GroupService = exports.GranularAclService = exports.FlowService = exports.AuditService = exports.AdminService = void 0;
|
|
13
13
|
const index_1 = require("./index");
|
|
14
14
|
const index_2 = require("./index");
|
|
15
15
|
var index_3 = require("./index");
|
|
@@ -257,6 +257,30 @@ function databaseUrlFromResource(path) {
|
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
exports.databaseUrlFromResource = databaseUrlFromResource;
|
|
260
|
+
function polarsConnectionSettings(s3_resource_path) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
const workspace = getWorkspace();
|
|
263
|
+
return yield index_1.HelpersService.polarsConnectionSettingsV2({
|
|
264
|
+
workspace: workspace,
|
|
265
|
+
requestBody: {
|
|
266
|
+
s3_resource_path: s3_resource_path
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
exports.polarsConnectionSettings = polarsConnectionSettings;
|
|
272
|
+
function duckdbConnectionSettings(s3_resource_path) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
const workspace = getWorkspace();
|
|
275
|
+
return yield index_1.HelpersService.duckdbConnectionSettingsV2({
|
|
276
|
+
workspace: workspace,
|
|
277
|
+
requestBody: {
|
|
278
|
+
s3_resource_path: s3_resource_path
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
exports.duckdbConnectionSettings = duckdbConnectionSettings;
|
|
260
284
|
/**
|
|
261
285
|
* Get URLs needed for resuming a flow after this step
|
|
262
286
|
* @param approver approver name
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export type { RunnableTypeQuery } from './models/RunnableTypeQuery';
|
|
|
101
101
|
export type { Running } from './models/Running';
|
|
102
102
|
export type { S3Resource } from './models/S3Resource';
|
|
103
103
|
export type { Schedule } from './models/Schedule';
|
|
104
|
+
export type { ScheduledForBeforeNow } from './models/ScheduledForBeforeNow';
|
|
104
105
|
export type { SchedulePath } from './models/SchedulePath';
|
|
105
106
|
export type { ScheduleWJobs } from './models/ScheduleWJobs';
|
|
106
107
|
export { Script } from './models/Script';
|
|
@@ -131,6 +132,7 @@ export type { WindmillFileMetadata } from './models/WindmillFileMetadata';
|
|
|
131
132
|
export { WindmillFilePreview } from './models/WindmillFilePreview';
|
|
132
133
|
export type { WindmillLargeFile } from './models/WindmillLargeFile';
|
|
133
134
|
export type { WorkerPing } from './models/WorkerPing';
|
|
135
|
+
export type { WorkerTag } from './models/WorkerTag';
|
|
134
136
|
export type { Workspace } from './models/Workspace';
|
|
135
137
|
export type { WorkspaceGitSync } from './models/WorkspaceGitSync';
|
|
136
138
|
export type { WorkspaceId } from './models/WorkspaceId';
|
|
@@ -80,7 +80,7 @@ export declare class HelpersService {
|
|
|
80
80
|
cache_regions: boolean;
|
|
81
81
|
client_kwargs: PolarsClientKwargs;
|
|
82
82
|
};
|
|
83
|
-
polars_cloud_options
|
|
83
|
+
polars_cloud_options: {
|
|
84
84
|
aws_endpoint_url: string;
|
|
85
85
|
aws_access_key_id?: string;
|
|
86
86
|
aws_secret_access_key?: string;
|
|
@@ -88,6 +88,26 @@ export declare class HelpersService {
|
|
|
88
88
|
aws_allow_http: boolean;
|
|
89
89
|
};
|
|
90
90
|
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Converts an S3 resource to the set of arguments necessary to connect to an S3 bucket using boto3 in Python
|
|
93
|
+
* @returns any Connection settings
|
|
94
|
+
* @throws ApiError
|
|
95
|
+
*/
|
|
96
|
+
static boto3ConnectionSettingsV2({ workspace, requestBody, }: {
|
|
97
|
+
workspace: string;
|
|
98
|
+
/**
|
|
99
|
+
* S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used
|
|
100
|
+
*/
|
|
101
|
+
requestBody: {
|
|
102
|
+
s3_resource_path?: string;
|
|
103
|
+
};
|
|
104
|
+
}): CancelablePromise<{
|
|
105
|
+
endpoint_url: string;
|
|
106
|
+
region_name: string;
|
|
107
|
+
use_ssl: boolean;
|
|
108
|
+
aws_access_key_id?: string;
|
|
109
|
+
aws_secret_access_key?: string;
|
|
110
|
+
}>;
|
|
91
111
|
/**
|
|
92
112
|
* Test connection to the workspace datasets storage
|
|
93
113
|
* @returns any Connection settings
|
|
@@ -68,6 +68,22 @@ class HelpersService {
|
|
|
68
68
|
mediaType: 'application/json',
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Converts an S3 resource to the set of arguments necessary to connect to an S3 bucket using boto3 in Python
|
|
73
|
+
* @returns any Connection settings
|
|
74
|
+
* @throws ApiError
|
|
75
|
+
*/
|
|
76
|
+
static boto3ConnectionSettingsV2({ workspace, requestBody, }) {
|
|
77
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
url: '/w/{workspace}/job_helpers/v2/boto3_connection_settings',
|
|
80
|
+
path: {
|
|
81
|
+
'workspace': workspace,
|
|
82
|
+
},
|
|
83
|
+
body: requestBody,
|
|
84
|
+
mediaType: 'application/json',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
71
87
|
/**
|
|
72
88
|
* Test connection to the workspace datasets storage
|
|
73
89
|
* @returns any Connection settings
|
|
@@ -11,7 +11,7 @@ export declare class JobService {
|
|
|
11
11
|
* @returns string job created
|
|
12
12
|
* @throws ApiError
|
|
13
13
|
*/
|
|
14
|
-
static runScriptByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, invisibleToOwner, }: {
|
|
14
|
+
static runScriptByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, invisibleToOwner, }: {
|
|
15
15
|
workspace: string;
|
|
16
16
|
path: string;
|
|
17
17
|
/**
|
|
@@ -30,6 +30,10 @@ export declare class JobService {
|
|
|
30
30
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
31
31
|
*/
|
|
32
32
|
parentJob?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Override the tag to use
|
|
35
|
+
*/
|
|
36
|
+
tag?: string;
|
|
33
37
|
/**
|
|
34
38
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
35
39
|
*/
|
|
@@ -76,7 +80,7 @@ export declare class JobService {
|
|
|
76
80
|
* @returns any job result
|
|
77
81
|
* @throws ApiError
|
|
78
82
|
*/
|
|
79
|
-
static runWaitResultScriptByPath({ workspace, path, requestBody, parentJob, jobId, includeHeader, queueLimit, }: {
|
|
83
|
+
static runWaitResultScriptByPath({ workspace, path, requestBody, parentJob, tag, jobId, includeHeader, queueLimit, }: {
|
|
80
84
|
workspace: string;
|
|
81
85
|
path: string;
|
|
82
86
|
/**
|
|
@@ -87,6 +91,10 @@ export declare class JobService {
|
|
|
87
91
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
88
92
|
*/
|
|
89
93
|
parentJob?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Override the tag to use
|
|
96
|
+
*/
|
|
97
|
+
tag?: string;
|
|
90
98
|
/**
|
|
91
99
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
92
100
|
*/
|
|
@@ -108,13 +116,17 @@ export declare class JobService {
|
|
|
108
116
|
* @returns any job result
|
|
109
117
|
* @throws ApiError
|
|
110
118
|
*/
|
|
111
|
-
static runWaitResultScriptByPathGet({ workspace, path, parentJob, jobId, includeHeader, queueLimit, payload, }: {
|
|
119
|
+
static runWaitResultScriptByPathGet({ workspace, path, parentJob, tag, jobId, includeHeader, queueLimit, payload, }: {
|
|
112
120
|
workspace: string;
|
|
113
121
|
path: string;
|
|
114
122
|
/**
|
|
115
123
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
116
124
|
*/
|
|
117
125
|
parentJob?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Override the tag to use
|
|
128
|
+
*/
|
|
129
|
+
tag?: string;
|
|
118
130
|
/**
|
|
119
131
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
120
132
|
*/
|
|
@@ -208,7 +220,7 @@ export declare class JobService {
|
|
|
208
220
|
* @returns string job created
|
|
209
221
|
* @throws ApiError
|
|
210
222
|
*/
|
|
211
|
-
static runFlowByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }: {
|
|
223
|
+
static runFlowByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }: {
|
|
212
224
|
workspace: string;
|
|
213
225
|
path: string;
|
|
214
226
|
/**
|
|
@@ -227,6 +239,10 @@ export declare class JobService {
|
|
|
227
239
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
228
240
|
*/
|
|
229
241
|
parentJob?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Override the tag to use
|
|
244
|
+
*/
|
|
245
|
+
tag?: string;
|
|
230
246
|
/**
|
|
231
247
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
232
248
|
*/
|
|
@@ -247,7 +263,7 @@ export declare class JobService {
|
|
|
247
263
|
* @returns string job created
|
|
248
264
|
* @throws ApiError
|
|
249
265
|
*/
|
|
250
|
-
static restartFlowAtStep({ workspace, id, stepId, branchOrIterationN, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }: {
|
|
266
|
+
static restartFlowAtStep({ workspace, id, stepId, branchOrIterationN, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }: {
|
|
251
267
|
workspace: string;
|
|
252
268
|
id: string;
|
|
253
269
|
/**
|
|
@@ -274,6 +290,10 @@ export declare class JobService {
|
|
|
274
290
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
275
291
|
*/
|
|
276
292
|
parentJob?: string;
|
|
293
|
+
/**
|
|
294
|
+
* Override the tag to use
|
|
295
|
+
*/
|
|
296
|
+
tag?: string;
|
|
277
297
|
/**
|
|
278
298
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
279
299
|
*/
|
|
@@ -294,7 +314,7 @@ export declare class JobService {
|
|
|
294
314
|
* @returns string job created
|
|
295
315
|
* @throws ApiError
|
|
296
316
|
*/
|
|
297
|
-
static runScriptByHash({ workspace, hash, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }: {
|
|
317
|
+
static runScriptByHash({ workspace, hash, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }: {
|
|
298
318
|
workspace: string;
|
|
299
319
|
hash: string;
|
|
300
320
|
/**
|
|
@@ -313,6 +333,10 @@ export declare class JobService {
|
|
|
313
333
|
* The parent job that is at the origin and responsible for the execution of this script if any
|
|
314
334
|
*/
|
|
315
335
|
parentJob?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Override the tag to use
|
|
338
|
+
*/
|
|
339
|
+
tag?: string;
|
|
316
340
|
/**
|
|
317
341
|
* The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
|
|
318
342
|
*/
|
|
@@ -385,7 +409,7 @@ export declare class JobService {
|
|
|
385
409
|
* @returns QueuedJob All queued jobs
|
|
386
410
|
* @throws ApiError
|
|
387
411
|
*/
|
|
388
|
-
static listQueue({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, success, jobKinds, suspended, running, args, result, tag, }: {
|
|
412
|
+
static listQueue({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, success, scheduledForBeforeNow, jobKinds, suspended, running, args, result, tag, }: {
|
|
389
413
|
workspace: string;
|
|
390
414
|
/**
|
|
391
415
|
* order by desc order (default true)
|
|
@@ -427,6 +451,10 @@ export declare class JobService {
|
|
|
427
451
|
* filter on successful jobs
|
|
428
452
|
*/
|
|
429
453
|
success?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* filter on jobs scheduled_for before now (hence waitinf for a worker)
|
|
456
|
+
*/
|
|
457
|
+
scheduledForBeforeNow?: boolean;
|
|
430
458
|
/**
|
|
431
459
|
* filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
|
|
432
460
|
*/
|
|
@@ -557,7 +585,7 @@ export declare class JobService {
|
|
|
557
585
|
* @returns Job All jobs
|
|
558
586
|
* @throws ApiError
|
|
559
587
|
*/
|
|
560
|
-
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, createdOrStartedBefore, running, createdOrStartedAfter, jobKinds, args, tag, result, isSkipped, isFlowStep, success, }: {
|
|
588
|
+
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, createdOrStartedBefore, running, scheduledForBeforeNow, createdOrStartedAfter, jobKinds, args, tag, result, isSkipped, isFlowStep, success, }: {
|
|
561
589
|
workspace: string;
|
|
562
590
|
/**
|
|
563
591
|
* mask to filter exact matching user creator
|
|
@@ -599,6 +627,10 @@ export declare class JobService {
|
|
|
599
627
|
* filter on running jobs
|
|
600
628
|
*/
|
|
601
629
|
running?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* filter on jobs scheduled_for before now (hence waitinf for a worker)
|
|
632
|
+
*/
|
|
633
|
+
scheduledForBeforeNow?: boolean;
|
|
602
634
|
/**
|
|
603
635
|
* filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp
|
|
604
636
|
*/
|
|
@@ -728,6 +760,21 @@ export declare class JobService {
|
|
|
728
760
|
reason?: string;
|
|
729
761
|
};
|
|
730
762
|
}): CancelablePromise<string>;
|
|
763
|
+
/**
|
|
764
|
+
* cancel all queued jobs for persistent script
|
|
765
|
+
* @returns string persistent job scaled down to zero
|
|
766
|
+
* @throws ApiError
|
|
767
|
+
*/
|
|
768
|
+
static cancelPersistentQueuedJobs({ workspace, path, requestBody, }: {
|
|
769
|
+
workspace: string;
|
|
770
|
+
path: string;
|
|
771
|
+
/**
|
|
772
|
+
* reason
|
|
773
|
+
*/
|
|
774
|
+
requestBody: {
|
|
775
|
+
reason?: string;
|
|
776
|
+
};
|
|
777
|
+
}): CancelablePromise<string>;
|
|
731
778
|
/**
|
|
732
779
|
* force cancel queued job
|
|
733
780
|
* @returns string job canceled
|
|
@@ -9,7 +9,7 @@ class JobService {
|
|
|
9
9
|
* @returns string job created
|
|
10
10
|
* @throws ApiError
|
|
11
11
|
*/
|
|
12
|
-
static runScriptByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, invisibleToOwner, }) {
|
|
12
|
+
static runScriptByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, invisibleToOwner, }) {
|
|
13
13
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
14
14
|
method: 'POST',
|
|
15
15
|
url: '/w/{workspace}/jobs/run/p/{path}',
|
|
@@ -21,6 +21,7 @@ class JobService {
|
|
|
21
21
|
'scheduled_for': scheduledFor,
|
|
22
22
|
'scheduled_in_secs': scheduledInSecs,
|
|
23
23
|
'parent_job': parentJob,
|
|
24
|
+
'tag': tag,
|
|
24
25
|
'job_id': jobId,
|
|
25
26
|
'invisible_to_owner': invisibleToOwner,
|
|
26
27
|
},
|
|
@@ -56,7 +57,7 @@ class JobService {
|
|
|
56
57
|
* @returns any job result
|
|
57
58
|
* @throws ApiError
|
|
58
59
|
*/
|
|
59
|
-
static runWaitResultScriptByPath({ workspace, path, requestBody, parentJob, jobId, includeHeader, queueLimit, }) {
|
|
60
|
+
static runWaitResultScriptByPath({ workspace, path, requestBody, parentJob, tag, jobId, includeHeader, queueLimit, }) {
|
|
60
61
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
61
62
|
method: 'POST',
|
|
62
63
|
url: '/w/{workspace}/jobs/run_wait_result/p/{path}',
|
|
@@ -66,6 +67,7 @@ class JobService {
|
|
|
66
67
|
},
|
|
67
68
|
query: {
|
|
68
69
|
'parent_job': parentJob,
|
|
70
|
+
'tag': tag,
|
|
69
71
|
'job_id': jobId,
|
|
70
72
|
'include_header': includeHeader,
|
|
71
73
|
'queue_limit': queueLimit,
|
|
@@ -79,7 +81,7 @@ class JobService {
|
|
|
79
81
|
* @returns any job result
|
|
80
82
|
* @throws ApiError
|
|
81
83
|
*/
|
|
82
|
-
static runWaitResultScriptByPathGet({ workspace, path, parentJob, jobId, includeHeader, queueLimit, payload, }) {
|
|
84
|
+
static runWaitResultScriptByPathGet({ workspace, path, parentJob, tag, jobId, includeHeader, queueLimit, payload, }) {
|
|
83
85
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
84
86
|
method: 'GET',
|
|
85
87
|
url: '/w/{workspace}/jobs/run_wait_result/p/{path}',
|
|
@@ -89,6 +91,7 @@ class JobService {
|
|
|
89
91
|
},
|
|
90
92
|
query: {
|
|
91
93
|
'parent_job': parentJob,
|
|
94
|
+
'tag': tag,
|
|
92
95
|
'job_id': jobId,
|
|
93
96
|
'include_header': includeHeader,
|
|
94
97
|
'queue_limit': queueLimit,
|
|
@@ -161,7 +164,7 @@ class JobService {
|
|
|
161
164
|
* @returns string job created
|
|
162
165
|
* @throws ApiError
|
|
163
166
|
*/
|
|
164
|
-
static runFlowByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }) {
|
|
167
|
+
static runFlowByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }) {
|
|
165
168
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
166
169
|
method: 'POST',
|
|
167
170
|
url: '/w/{workspace}/jobs/run/f/{path}',
|
|
@@ -173,6 +176,7 @@ class JobService {
|
|
|
173
176
|
'scheduled_for': scheduledFor,
|
|
174
177
|
'scheduled_in_secs': scheduledInSecs,
|
|
175
178
|
'parent_job': parentJob,
|
|
179
|
+
'tag': tag,
|
|
176
180
|
'job_id': jobId,
|
|
177
181
|
'include_header': includeHeader,
|
|
178
182
|
'invisible_to_owner': invisibleToOwner,
|
|
@@ -186,7 +190,7 @@ class JobService {
|
|
|
186
190
|
* @returns string job created
|
|
187
191
|
* @throws ApiError
|
|
188
192
|
*/
|
|
189
|
-
static restartFlowAtStep({ workspace, id, stepId, branchOrIterationN, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }) {
|
|
193
|
+
static restartFlowAtStep({ workspace, id, stepId, branchOrIterationN, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }) {
|
|
190
194
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
191
195
|
method: 'POST',
|
|
192
196
|
url: '/w/{workspace}/jobs/restart/f/{id}/from/{step_id}/{branch_or_iteration_n}',
|
|
@@ -200,6 +204,7 @@ class JobService {
|
|
|
200
204
|
'scheduled_for': scheduledFor,
|
|
201
205
|
'scheduled_in_secs': scheduledInSecs,
|
|
202
206
|
'parent_job': parentJob,
|
|
207
|
+
'tag': tag,
|
|
203
208
|
'job_id': jobId,
|
|
204
209
|
'include_header': includeHeader,
|
|
205
210
|
'invisible_to_owner': invisibleToOwner,
|
|
@@ -213,7 +218,7 @@ class JobService {
|
|
|
213
218
|
* @returns string job created
|
|
214
219
|
* @throws ApiError
|
|
215
220
|
*/
|
|
216
|
-
static runScriptByHash({ workspace, hash, requestBody, scheduledFor, scheduledInSecs, parentJob, jobId, includeHeader, invisibleToOwner, }) {
|
|
221
|
+
static runScriptByHash({ workspace, hash, requestBody, scheduledFor, scheduledInSecs, parentJob, tag, jobId, includeHeader, invisibleToOwner, }) {
|
|
217
222
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
218
223
|
method: 'POST',
|
|
219
224
|
url: '/w/{workspace}/jobs/run/h/{hash}',
|
|
@@ -225,6 +230,7 @@ class JobService {
|
|
|
225
230
|
'scheduled_for': scheduledFor,
|
|
226
231
|
'scheduled_in_secs': scheduledInSecs,
|
|
227
232
|
'parent_job': parentJob,
|
|
233
|
+
'tag': tag,
|
|
228
234
|
'job_id': jobId,
|
|
229
235
|
'include_header': includeHeader,
|
|
230
236
|
'invisible_to_owner': invisibleToOwner,
|
|
@@ -280,7 +286,7 @@ class JobService {
|
|
|
280
286
|
* @returns QueuedJob All queued jobs
|
|
281
287
|
* @throws ApiError
|
|
282
288
|
*/
|
|
283
|
-
static listQueue({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, success, jobKinds, suspended, running, args, result, tag, }) {
|
|
289
|
+
static listQueue({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, success, scheduledForBeforeNow, jobKinds, suspended, running, args, result, tag, }) {
|
|
284
290
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
285
291
|
method: 'GET',
|
|
286
292
|
url: '/w/{workspace}/jobs/queue/list',
|
|
@@ -298,6 +304,7 @@ class JobService {
|
|
|
298
304
|
'started_before': startedBefore,
|
|
299
305
|
'started_after': startedAfter,
|
|
300
306
|
'success': success,
|
|
307
|
+
'scheduled_for_before_now': scheduledForBeforeNow,
|
|
301
308
|
'job_kinds': jobKinds,
|
|
302
309
|
'suspended': suspended,
|
|
303
310
|
'running': running,
|
|
@@ -386,7 +393,7 @@ class JobService {
|
|
|
386
393
|
* @returns Job All jobs
|
|
387
394
|
* @throws ApiError
|
|
388
395
|
*/
|
|
389
|
-
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, createdOrStartedBefore, running, createdOrStartedAfter, jobKinds, args, tag, result, isSkipped, isFlowStep, success, }) {
|
|
396
|
+
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, schedulePath, scriptHash, startedBefore, startedAfter, createdOrStartedBefore, running, scheduledForBeforeNow, createdOrStartedAfter, jobKinds, args, tag, result, isSkipped, isFlowStep, success, }) {
|
|
390
397
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
391
398
|
method: 'GET',
|
|
392
399
|
url: '/w/{workspace}/jobs/list',
|
|
@@ -404,6 +411,7 @@ class JobService {
|
|
|
404
411
|
'started_after': startedAfter,
|
|
405
412
|
'created_or_started_before': createdOrStartedBefore,
|
|
406
413
|
'running': running,
|
|
414
|
+
'scheduled_for_before_now': scheduledForBeforeNow,
|
|
407
415
|
'created_or_started_after': createdOrStartedAfter,
|
|
408
416
|
'job_kinds': jobKinds,
|
|
409
417
|
'args': args,
|
|
@@ -555,6 +563,23 @@ class JobService {
|
|
|
555
563
|
mediaType: 'application/json',
|
|
556
564
|
});
|
|
557
565
|
}
|
|
566
|
+
/**
|
|
567
|
+
* cancel all queued jobs for persistent script
|
|
568
|
+
* @returns string persistent job scaled down to zero
|
|
569
|
+
* @throws ApiError
|
|
570
|
+
*/
|
|
571
|
+
static cancelPersistentQueuedJobs({ workspace, path, requestBody, }) {
|
|
572
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
573
|
+
method: 'POST',
|
|
574
|
+
url: '/w/{workspace}/jobs_u/queue/cancel_persistent/{path}',
|
|
575
|
+
path: {
|
|
576
|
+
'workspace': workspace,
|
|
577
|
+
'path': path,
|
|
578
|
+
},
|
|
579
|
+
body: requestBody,
|
|
580
|
+
mediaType: 'application/json',
|
|
581
|
+
});
|
|
582
|
+
}
|
|
558
583
|
/**
|
|
559
584
|
* force cancel queued job
|
|
560
585
|
* @returns string job canceled
|