windmill-client 0.2.0 → 0.2.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/core/ApiError.d.ts +10 -0
- package/dist/core/ApiError.js +15 -0
- package/dist/core/ApiRequestOptions.d.ts +13 -0
- package/dist/core/ApiRequestOptions.js +2 -0
- package/dist/core/ApiResult.d.ts +7 -0
- package/dist/core/ApiResult.js +2 -0
- package/dist/core/CancelablePromise.d.ts +26 -0
- package/dist/core/CancelablePromise.js +94 -0
- package/dist/core/OpenAPI.d.ts +16 -0
- package/dist/core/OpenAPI.js +14 -0
- package/dist/core/request.d.ts +13 -0
- package/dist/core/request.js +269 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.js +85 -0
- package/dist/models/AppWithLastVersion.d.ts +21 -0
- package/dist/models/AppWithLastVersion.js +15 -0
- package/dist/models/AppWithLastVersionWDraft.d.ts +5 -0
- package/dist/models/AppWithLastVersionWDraft.js +5 -0
- package/dist/models/AuditLog.d.ts +32 -0
- package/dist/models/AuditLog.js +32 -0
- package/dist/models/BranchAll.d.ts +10 -0
- package/dist/models/BranchAll.js +5 -0
- package/dist/models/BranchOne.d.ts +10 -0
- package/dist/models/BranchOne.js +5 -0
- package/dist/models/CompletedJob.d.ts +57 -0
- package/dist/models/CompletedJob.js +26 -0
- package/dist/models/ContextualVariable.d.ts +5 -0
- package/dist/models/ContextualVariable.js +5 -0
- package/dist/models/CreateInput.d.ts +4 -0
- package/dist/models/CreateInput.js +5 -0
- package/dist/models/CreateResource.d.ts +6 -0
- package/dist/models/CreateResource.js +5 -0
- package/dist/models/CreateVariable.d.ts +8 -0
- package/dist/models/CreateVariable.js +5 -0
- package/dist/models/CreateWorkspace.d.ts +5 -0
- package/dist/models/CreateWorkspace.js +5 -0
- package/dist/models/EditResource.d.ts +5 -0
- package/dist/models/EditResource.js +5 -0
- package/dist/models/EditResourceType.d.ts +4 -0
- package/dist/models/EditResourceType.js +5 -0
- package/dist/models/EditSchedule.d.ts +6 -0
- package/dist/models/EditSchedule.js +5 -0
- package/dist/models/EditVariable.d.ts +6 -0
- package/dist/models/EditVariable.js +5 -0
- package/dist/models/EditWorkspaceUser.d.ts +5 -0
- package/dist/models/EditWorkspaceUser.js +5 -0
- package/dist/models/Flow.d.ts +3 -0
- package/dist/models/Flow.js +5 -0
- package/dist/models/FlowMetadata.d.ts +11 -0
- package/dist/models/FlowMetadata.js +5 -0
- package/dist/models/FlowModule.d.ts +18 -0
- package/dist/models/FlowModule.js +5 -0
- package/dist/models/FlowModuleValue.d.ts +8 -0
- package/dist/models/FlowModuleValue.js +5 -0
- package/dist/models/FlowPreview.d.ts +7 -0
- package/dist/models/FlowPreview.js +5 -0
- package/dist/models/FlowStatus.d.ts +12 -0
- package/dist/models/FlowStatus.js +5 -0
- package/dist/models/FlowStatusModule.d.ts +34 -0
- package/dist/models/FlowStatusModule.js +18 -0
- package/dist/models/FlowValue.d.ts +6 -0
- package/dist/models/FlowValue.js +5 -0
- package/dist/models/Folder.d.ts +5 -0
- package/dist/models/Folder.js +5 -0
- package/dist/models/ForloopFlow.d.ts +9 -0
- package/dist/models/ForloopFlow.js +5 -0
- package/dist/models/GlobalUserInfo.d.ts +14 -0
- package/dist/models/GlobalUserInfo.js +14 -0
- package/dist/models/Group.d.ts +6 -0
- package/dist/models/Group.js +5 -0
- package/dist/models/Identity.d.ts +4 -0
- package/dist/models/Identity.js +5 -0
- package/dist/models/Input.d.ts +8 -0
- package/dist/models/Input.js +5 -0
- package/dist/models/InputTransform.d.ts +3 -0
- package/dist/models/InputTransform.js +5 -0
- package/dist/models/JavascriptTransform.d.ts +4 -0
- package/dist/models/JavascriptTransform.js +5 -0
- package/dist/models/Job.d.ts +11 -0
- package/dist/models/Job.js +14 -0
- package/dist/models/ListableApp.d.ts +18 -0
- package/dist/models/ListableApp.js +15 -0
- package/dist/models/ListableResource.d.ts +14 -0
- package/dist/models/ListableResource.js +5 -0
- package/dist/models/ListableVariable.d.ts +14 -0
- package/dist/models/ListableVariable.js +5 -0
- package/dist/models/Login.d.ts +4 -0
- package/dist/models/Login.js +5 -0
- package/dist/models/MainArgSignature.d.ts +33 -0
- package/dist/models/MainArgSignature.js +14 -0
- package/dist/models/NewSchedule.d.ts +10 -0
- package/dist/models/NewSchedule.js +5 -0
- package/dist/models/NewScript.d.ts +29 -0
- package/dist/models/NewScript.js +24 -0
- package/dist/models/NewScriptWithDraft.d.ts +5 -0
- package/dist/models/NewScriptWithDraft.js +5 -0
- package/dist/models/NewToken.d.ts +4 -0
- package/dist/models/NewToken.js +5 -0
- package/dist/models/NewTokenImpersonate.d.ts +5 -0
- package/dist/models/NewTokenImpersonate.js +5 -0
- package/dist/models/NewUser.d.ts +5 -0
- package/dist/models/NewUser.js +5 -0
- package/dist/models/OpenFlow.d.ts +7 -0
- package/dist/models/OpenFlow.js +5 -0
- package/dist/models/OpenFlowWPath.d.ts +4 -0
- package/dist/models/OpenFlowWPath.js +5 -0
- package/dist/models/PathFlow.d.ts +6 -0
- package/dist/models/PathFlow.js +5 -0
- package/dist/models/PathScript.d.ts +7 -0
- package/dist/models/PathScript.js +5 -0
- package/dist/models/Policy.d.ts +13 -0
- package/dist/models/Policy.js +15 -0
- package/dist/models/Preview.d.ts +16 -0
- package/dist/models/Preview.js +16 -0
- package/dist/models/QueuedJob.d.ts +55 -0
- package/dist/models/QueuedJob.js +26 -0
- package/dist/models/RawScript.d.ts +18 -0
- package/dist/models/RawScript.js +16 -0
- package/dist/models/Resource.d.ts +9 -0
- package/dist/models/Resource.js +5 -0
- package/dist/models/ResourceType.d.ts +6 -0
- package/dist/models/ResourceType.js +5 -0
- package/dist/models/Retry.d.ts +11 -0
- package/dist/models/Retry.js +5 -0
- package/dist/models/RunnableType.d.ts +5 -0
- package/dist/models/RunnableType.js +12 -0
- package/dist/models/Schedule.d.ts +15 -0
- package/dist/models/Schedule.js +5 -0
- package/dist/models/Script.d.ts +43 -0
- package/dist/models/Script.js +24 -0
- package/dist/models/ScriptArgs.d.ts +1 -0
- package/dist/models/ScriptArgs.js +5 -0
- package/dist/models/SlackToken.d.ts +8 -0
- package/dist/models/SlackToken.js +5 -0
- package/dist/models/StaticTransform.d.ts +4 -0
- package/dist/models/StaticTransform.js +5 -0
- package/dist/models/TokenResponse.d.ts +6 -0
- package/dist/models/TokenResponse.js +5 -0
- package/dist/models/TruncatedToken.d.ts +7 -0
- package/dist/models/TruncatedToken.js +5 -0
- package/dist/models/UpdateInput.d.ts +5 -0
- package/dist/models/UpdateInput.js +5 -0
- package/dist/models/Usage.d.ts +3 -0
- package/dist/models/Usage.js +5 -0
- package/dist/models/User.d.ts +14 -0
- package/dist/models/User.js +5 -0
- package/dist/models/UserWorkspaceList.d.ts +8 -0
- package/dist/models/UserWorkspaceList.js +5 -0
- package/dist/models/WorkerPing.d.ts +8 -0
- package/dist/models/WorkerPing.js +5 -0
- package/dist/models/Workspace.d.ts +6 -0
- package/dist/models/Workspace.js +5 -0
- package/dist/models/WorkspaceInvite.d.ts +6 -0
- package/dist/models/WorkspaceInvite.js +5 -0
- package/dist/services/AdminService.d.ts +39 -0
- package/dist/services/AdminService.js +56 -0
- package/dist/services/AppService.d.ts +194 -0
- package/dist/services/AppService.js +211 -0
- package/dist/services/AuditService.d.ts +53 -0
- package/dist/services/AuditService.js +47 -0
- package/dist/services/CaptureService.d.ts +30 -0
- package/dist/services/CaptureService.js +56 -0
- package/dist/services/DraftService.d.ts +16 -0
- package/dist/services/DraftService.js +24 -0
- package/dist/services/FavoriteService.d.ts +27 -0
- package/dist/services/FavoriteService.js +40 -0
- package/dist/services/FlowService.d.ts +186 -0
- package/dist/services/FlowService.js +200 -0
- package/dist/services/FolderService.d.ts +128 -0
- package/dist/services/FolderService.js +155 -0
- package/dist/services/GranularAclService.d.ts +46 -0
- package/dist/services/GranularAclService.js +60 -0
- package/dist/services/GroupService.d.ts +110 -0
- package/dist/services/GroupService.js +140 -0
- package/dist/services/InputService.d.ts +78 -0
- package/dist/services/InputService.js +99 -0
- package/dist/services/JobService.d.ts +636 -0
- package/dist/services/JobService.js +564 -0
- package/dist/services/OauthService.d.ts +95 -0
- package/dist/services/OauthService.js +124 -0
- package/dist/services/ResourceService.d.ts +177 -0
- package/dist/services/ResourceService.js +244 -0
- package/dist/services/ScheduleService.d.ts +103 -0
- package/dist/services/ScheduleService.js +134 -0
- package/dist/services/ScriptService.d.ts +303 -0
- package/dist/services/ScriptService.js +339 -0
- package/dist/services/SettingsService.d.ts +15 -0
- package/dist/services/SettingsService.js +30 -0
- package/dist/services/UserService.d.ts +284 -0
- package/dist/services/UserService.js +376 -0
- package/dist/services/VariableService.d.ts +83 -0
- package/dist/services/VariableService.js +123 -0
- package/dist/services/WorkerService.d.ts +25 -0
- package/dist/services/WorkerService.js +34 -0
- package/dist/services/WorkspaceService.d.ts +227 -0
- package/dist/services/WorkspaceService.js +275 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JobService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class JobService {
|
|
7
|
+
/**
|
|
8
|
+
* run script by path
|
|
9
|
+
* @returns string job created
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static runScriptByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, invisibleToOwner, }) {
|
|
13
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: '/w/{workspace}/jobs/run/p/{path}',
|
|
16
|
+
path: {
|
|
17
|
+
'workspace': workspace,
|
|
18
|
+
'path': path,
|
|
19
|
+
},
|
|
20
|
+
query: {
|
|
21
|
+
'scheduled_for': scheduledFor,
|
|
22
|
+
'scheduled_in_secs': scheduledInSecs,
|
|
23
|
+
'parent_job': parentJob,
|
|
24
|
+
'invisible_to_owner': invisibleToOwner,
|
|
25
|
+
},
|
|
26
|
+
body: requestBody,
|
|
27
|
+
mediaType: 'application/json',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* run script by path
|
|
32
|
+
* @returns any job result
|
|
33
|
+
* @throws ApiError
|
|
34
|
+
*/
|
|
35
|
+
static runWaitResultScriptByPath({ workspace, path, requestBody, parentJob, includeHeader, queueLimit, }) {
|
|
36
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
url: '/w/{workspace}/jobs/run_wait_result/p/{path}',
|
|
39
|
+
path: {
|
|
40
|
+
'workspace': workspace,
|
|
41
|
+
'path': path,
|
|
42
|
+
},
|
|
43
|
+
query: {
|
|
44
|
+
'parent_job': parentJob,
|
|
45
|
+
'include_header': includeHeader,
|
|
46
|
+
'queue_limit': queueLimit,
|
|
47
|
+
},
|
|
48
|
+
body: requestBody,
|
|
49
|
+
mediaType: 'application/json',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* run script by path with get
|
|
54
|
+
* @returns any job result
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
static runWaitResultScriptByPathGet({ workspace, path, parentJob, includeHeader, queueLimit, payload, }) {
|
|
58
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: '/w/{workspace}/jobs/run_wait_result/p/{path}',
|
|
61
|
+
path: {
|
|
62
|
+
'workspace': workspace,
|
|
63
|
+
'path': path,
|
|
64
|
+
},
|
|
65
|
+
query: {
|
|
66
|
+
'parent_job': parentJob,
|
|
67
|
+
'include_header': includeHeader,
|
|
68
|
+
'queue_limit': queueLimit,
|
|
69
|
+
'payload': payload,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* run flow by path and wait until completion
|
|
75
|
+
* @returns any job result
|
|
76
|
+
* @throws ApiError
|
|
77
|
+
*/
|
|
78
|
+
static runWaitResultFlowByPath({ workspace, path, requestBody, includeHeader, queueLimit, }) {
|
|
79
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '/w/{workspace}/jobs/run_wait_result/f/{path}',
|
|
82
|
+
path: {
|
|
83
|
+
'workspace': workspace,
|
|
84
|
+
'path': path,
|
|
85
|
+
},
|
|
86
|
+
query: {
|
|
87
|
+
'include_header': includeHeader,
|
|
88
|
+
'queue_limit': queueLimit,
|
|
89
|
+
},
|
|
90
|
+
body: requestBody,
|
|
91
|
+
mediaType: 'application/json',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* get job result by id
|
|
96
|
+
* @returns any job result
|
|
97
|
+
* @throws ApiError
|
|
98
|
+
*/
|
|
99
|
+
static resultById({ workspace, flowJobId, nodeId, }) {
|
|
100
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
101
|
+
method: 'GET',
|
|
102
|
+
url: '/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}',
|
|
103
|
+
path: {
|
|
104
|
+
'workspace': workspace,
|
|
105
|
+
'flow_job_id': flowJobId,
|
|
106
|
+
'node_id': nodeId,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* run flow by path
|
|
112
|
+
* @returns string job created
|
|
113
|
+
* @throws ApiError
|
|
114
|
+
*/
|
|
115
|
+
static runFlowByPath({ workspace, path, requestBody, scheduledFor, scheduledInSecs, parentJob, includeHeader, invisibleToOwner, }) {
|
|
116
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
117
|
+
method: 'POST',
|
|
118
|
+
url: '/w/{workspace}/jobs/run/f/{path}',
|
|
119
|
+
path: {
|
|
120
|
+
'workspace': workspace,
|
|
121
|
+
'path': path,
|
|
122
|
+
},
|
|
123
|
+
query: {
|
|
124
|
+
'scheduled_for': scheduledFor,
|
|
125
|
+
'scheduled_in_secs': scheduledInSecs,
|
|
126
|
+
'parent_job': parentJob,
|
|
127
|
+
'include_header': includeHeader,
|
|
128
|
+
'invisible_to_owner': invisibleToOwner,
|
|
129
|
+
},
|
|
130
|
+
body: requestBody,
|
|
131
|
+
mediaType: 'application/json',
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* run script by hash
|
|
136
|
+
* @returns string job created
|
|
137
|
+
* @throws ApiError
|
|
138
|
+
*/
|
|
139
|
+
static runScriptByHash({ workspace, hash, requestBody, scheduledFor, scheduledInSecs, parentJob, includeHeader, invisibleToOwner, }) {
|
|
140
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
141
|
+
method: 'POST',
|
|
142
|
+
url: '/w/{workspace}/jobs/run/h/{hash}',
|
|
143
|
+
path: {
|
|
144
|
+
'workspace': workspace,
|
|
145
|
+
'hash': hash,
|
|
146
|
+
},
|
|
147
|
+
query: {
|
|
148
|
+
'scheduled_for': scheduledFor,
|
|
149
|
+
'scheduled_in_secs': scheduledInSecs,
|
|
150
|
+
'parent_job': parentJob,
|
|
151
|
+
'include_header': includeHeader,
|
|
152
|
+
'invisible_to_owner': invisibleToOwner,
|
|
153
|
+
},
|
|
154
|
+
body: requestBody,
|
|
155
|
+
mediaType: 'application/json',
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* run script preview
|
|
160
|
+
* @returns string job created
|
|
161
|
+
* @throws ApiError
|
|
162
|
+
*/
|
|
163
|
+
static runScriptPreview({ workspace, requestBody, includeHeader, invisibleToOwner, }) {
|
|
164
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
165
|
+
method: 'POST',
|
|
166
|
+
url: '/w/{workspace}/jobs/run/preview',
|
|
167
|
+
path: {
|
|
168
|
+
'workspace': workspace,
|
|
169
|
+
},
|
|
170
|
+
query: {
|
|
171
|
+
'include_header': includeHeader,
|
|
172
|
+
'invisible_to_owner': invisibleToOwner,
|
|
173
|
+
},
|
|
174
|
+
body: requestBody,
|
|
175
|
+
mediaType: 'application/json',
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* run flow preview
|
|
180
|
+
* @returns string job created
|
|
181
|
+
* @throws ApiError
|
|
182
|
+
*/
|
|
183
|
+
static runFlowPreview({ workspace, requestBody, includeHeader, invisibleToOwner, }) {
|
|
184
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
185
|
+
method: 'POST',
|
|
186
|
+
url: '/w/{workspace}/jobs/run/preview_flow',
|
|
187
|
+
path: {
|
|
188
|
+
'workspace': workspace,
|
|
189
|
+
},
|
|
190
|
+
query: {
|
|
191
|
+
'include_header': includeHeader,
|
|
192
|
+
'invisible_to_owner': invisibleToOwner,
|
|
193
|
+
},
|
|
194
|
+
body: requestBody,
|
|
195
|
+
mediaType: 'application/json',
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* list all available queued jobs
|
|
200
|
+
* @returns QueuedJob All available queued jobs
|
|
201
|
+
* @throws ApiError
|
|
202
|
+
*/
|
|
203
|
+
static listQueue({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, startedBefore, startedAfter, success, jobKinds, suspended, running, args, result, tag, }) {
|
|
204
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
205
|
+
method: 'GET',
|
|
206
|
+
url: '/w/{workspace}/jobs/queue/list',
|
|
207
|
+
path: {
|
|
208
|
+
'workspace': workspace,
|
|
209
|
+
},
|
|
210
|
+
query: {
|
|
211
|
+
'order_desc': orderDesc,
|
|
212
|
+
'created_by': createdBy,
|
|
213
|
+
'parent_job': parentJob,
|
|
214
|
+
'script_path_exact': scriptPathExact,
|
|
215
|
+
'script_path_start': scriptPathStart,
|
|
216
|
+
'script_hash': scriptHash,
|
|
217
|
+
'started_before': startedBefore,
|
|
218
|
+
'started_after': startedAfter,
|
|
219
|
+
'success': success,
|
|
220
|
+
'job_kinds': jobKinds,
|
|
221
|
+
'suspended': suspended,
|
|
222
|
+
'running': running,
|
|
223
|
+
'args': args,
|
|
224
|
+
'result': result,
|
|
225
|
+
'tag': tag,
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* list all available completed jobs
|
|
231
|
+
* @returns CompletedJob All available completed jobs
|
|
232
|
+
* @throws ApiError
|
|
233
|
+
*/
|
|
234
|
+
static listCompletedJobs({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, startedBefore, startedAfter, success, jobKinds, args, result, tag, isSkipped, isFlowStep, }) {
|
|
235
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
236
|
+
method: 'GET',
|
|
237
|
+
url: '/w/{workspace}/jobs/completed/list',
|
|
238
|
+
path: {
|
|
239
|
+
'workspace': workspace,
|
|
240
|
+
},
|
|
241
|
+
query: {
|
|
242
|
+
'order_desc': orderDesc,
|
|
243
|
+
'created_by': createdBy,
|
|
244
|
+
'parent_job': parentJob,
|
|
245
|
+
'script_path_exact': scriptPathExact,
|
|
246
|
+
'script_path_start': scriptPathStart,
|
|
247
|
+
'script_hash': scriptHash,
|
|
248
|
+
'started_before': startedBefore,
|
|
249
|
+
'started_after': startedAfter,
|
|
250
|
+
'success': success,
|
|
251
|
+
'job_kinds': jobKinds,
|
|
252
|
+
'args': args,
|
|
253
|
+
'result': result,
|
|
254
|
+
'tag': tag,
|
|
255
|
+
'is_skipped': isSkipped,
|
|
256
|
+
'is_flow_step': isFlowStep,
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* list all available jobs
|
|
262
|
+
* @returns Job All jobs
|
|
263
|
+
* @throws ApiError
|
|
264
|
+
*/
|
|
265
|
+
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, startedBefore, startedAfter, jobKinds, args, tag, result, isSkipped, isFlowStep, success, }) {
|
|
266
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
267
|
+
method: 'GET',
|
|
268
|
+
url: '/w/{workspace}/jobs/list',
|
|
269
|
+
path: {
|
|
270
|
+
'workspace': workspace,
|
|
271
|
+
},
|
|
272
|
+
query: {
|
|
273
|
+
'created_by': createdBy,
|
|
274
|
+
'parent_job': parentJob,
|
|
275
|
+
'script_path_exact': scriptPathExact,
|
|
276
|
+
'script_path_start': scriptPathStart,
|
|
277
|
+
'script_hash': scriptHash,
|
|
278
|
+
'started_before': startedBefore,
|
|
279
|
+
'started_after': startedAfter,
|
|
280
|
+
'job_kinds': jobKinds,
|
|
281
|
+
'args': args,
|
|
282
|
+
'tag': tag,
|
|
283
|
+
'result': result,
|
|
284
|
+
'is_skipped': isSkipped,
|
|
285
|
+
'is_flow_step': isFlowStep,
|
|
286
|
+
'success': success,
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* get job
|
|
292
|
+
* @returns Job job details
|
|
293
|
+
* @throws ApiError
|
|
294
|
+
*/
|
|
295
|
+
static getJob({ workspace, id, }) {
|
|
296
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
297
|
+
method: 'GET',
|
|
298
|
+
url: '/w/{workspace}/jobs_u/get/{id}',
|
|
299
|
+
path: {
|
|
300
|
+
'workspace': workspace,
|
|
301
|
+
'id': id,
|
|
302
|
+
},
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* get job updates
|
|
307
|
+
* @returns any job details
|
|
308
|
+
* @throws ApiError
|
|
309
|
+
*/
|
|
310
|
+
static getJobUpdates({ workspace, id, running, logOffset, }) {
|
|
311
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
312
|
+
method: 'GET',
|
|
313
|
+
url: '/w/{workspace}/jobs_u/getupdate/{id}',
|
|
314
|
+
path: {
|
|
315
|
+
'workspace': workspace,
|
|
316
|
+
'id': id,
|
|
317
|
+
},
|
|
318
|
+
query: {
|
|
319
|
+
'running': running,
|
|
320
|
+
'log_offset': logOffset,
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* get completed job
|
|
326
|
+
* @returns CompletedJob job details
|
|
327
|
+
* @throws ApiError
|
|
328
|
+
*/
|
|
329
|
+
static getCompletedJob({ workspace, id, }) {
|
|
330
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
331
|
+
method: 'GET',
|
|
332
|
+
url: '/w/{workspace}/jobs/completed/get/{id}',
|
|
333
|
+
path: {
|
|
334
|
+
'workspace': workspace,
|
|
335
|
+
'id': id,
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* get completed job result
|
|
341
|
+
* @returns any result
|
|
342
|
+
* @throws ApiError
|
|
343
|
+
*/
|
|
344
|
+
static getCompletedJobResult({ workspace, id, }) {
|
|
345
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
346
|
+
method: 'GET',
|
|
347
|
+
url: '/w/{workspace}/jobs/completed/get_result/{id}',
|
|
348
|
+
path: {
|
|
349
|
+
'workspace': workspace,
|
|
350
|
+
'id': id,
|
|
351
|
+
},
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* delete completed job (erase content but keep run id)
|
|
356
|
+
* @returns CompletedJob job details
|
|
357
|
+
* @throws ApiError
|
|
358
|
+
*/
|
|
359
|
+
static deleteCompletedJob({ workspace, id, }) {
|
|
360
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
361
|
+
method: 'POST',
|
|
362
|
+
url: '/w/{workspace}/jobs/completed/delete/{id}',
|
|
363
|
+
path: {
|
|
364
|
+
'workspace': workspace,
|
|
365
|
+
'id': id,
|
|
366
|
+
},
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* cancel queued job
|
|
371
|
+
* @returns string job canceled
|
|
372
|
+
* @throws ApiError
|
|
373
|
+
*/
|
|
374
|
+
static cancelQueuedJob({ workspace, id, requestBody, }) {
|
|
375
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
376
|
+
method: 'POST',
|
|
377
|
+
url: '/w/{workspace}/jobs_u/queue/cancel/{id}',
|
|
378
|
+
path: {
|
|
379
|
+
'workspace': workspace,
|
|
380
|
+
'id': id,
|
|
381
|
+
},
|
|
382
|
+
body: requestBody,
|
|
383
|
+
mediaType: 'application/json',
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* force cancel queued job
|
|
388
|
+
* @returns string job canceled
|
|
389
|
+
* @throws ApiError
|
|
390
|
+
*/
|
|
391
|
+
static forceCancelQueuedJob({ workspace, id, requestBody, }) {
|
|
392
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
393
|
+
method: 'POST',
|
|
394
|
+
url: '/w/{workspace}/jobs_u/queue/force_cancel/{id}',
|
|
395
|
+
path: {
|
|
396
|
+
'workspace': workspace,
|
|
397
|
+
'id': id,
|
|
398
|
+
},
|
|
399
|
+
body: requestBody,
|
|
400
|
+
mediaType: 'application/json',
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* create an HMac signature given a job id and a resume id
|
|
405
|
+
* @returns string job signature
|
|
406
|
+
* @throws ApiError
|
|
407
|
+
*/
|
|
408
|
+
static createJobSignature({ workspace, id, resumeId, approver, }) {
|
|
409
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
410
|
+
method: 'GET',
|
|
411
|
+
url: '/w/{workspace}/jobs/job_signature/{id}/{resume_id}',
|
|
412
|
+
path: {
|
|
413
|
+
'workspace': workspace,
|
|
414
|
+
'id': id,
|
|
415
|
+
'resume_id': resumeId,
|
|
416
|
+
},
|
|
417
|
+
query: {
|
|
418
|
+
'approver': approver,
|
|
419
|
+
},
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* get resume urls given a job_id, resume_id and a nonce to resume a flow
|
|
424
|
+
* @returns any url endpoints
|
|
425
|
+
* @throws ApiError
|
|
426
|
+
*/
|
|
427
|
+
static getResumeUrls({ workspace, id, resumeId, approver, }) {
|
|
428
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
429
|
+
method: 'GET',
|
|
430
|
+
url: '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}',
|
|
431
|
+
path: {
|
|
432
|
+
'workspace': workspace,
|
|
433
|
+
'id': id,
|
|
434
|
+
'resume_id': resumeId,
|
|
435
|
+
},
|
|
436
|
+
query: {
|
|
437
|
+
'approver': approver,
|
|
438
|
+
},
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* resume a job for a suspended flow
|
|
443
|
+
* @returns string job resumed
|
|
444
|
+
* @throws ApiError
|
|
445
|
+
*/
|
|
446
|
+
static resumeSuspendedJobGet({ workspace, id, resumeId, signature, payload, approver, }) {
|
|
447
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
448
|
+
method: 'GET',
|
|
449
|
+
url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}',
|
|
450
|
+
path: {
|
|
451
|
+
'workspace': workspace,
|
|
452
|
+
'id': id,
|
|
453
|
+
'resume_id': resumeId,
|
|
454
|
+
'signature': signature,
|
|
455
|
+
},
|
|
456
|
+
query: {
|
|
457
|
+
'payload': payload,
|
|
458
|
+
'approver': approver,
|
|
459
|
+
},
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* resume a job for a suspended flow
|
|
464
|
+
* @returns string job resumed
|
|
465
|
+
* @throws ApiError
|
|
466
|
+
*/
|
|
467
|
+
static resumeSuspendedJobPost({ workspace, id, resumeId, signature, requestBody, approver, }) {
|
|
468
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
469
|
+
method: 'POST',
|
|
470
|
+
url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}',
|
|
471
|
+
path: {
|
|
472
|
+
'workspace': workspace,
|
|
473
|
+
'id': id,
|
|
474
|
+
'resume_id': resumeId,
|
|
475
|
+
'signature': signature,
|
|
476
|
+
},
|
|
477
|
+
query: {
|
|
478
|
+
'approver': approver,
|
|
479
|
+
},
|
|
480
|
+
body: requestBody,
|
|
481
|
+
mediaType: 'application/json',
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* resume a job for a suspended flow as an owner
|
|
486
|
+
* @returns string job resumed
|
|
487
|
+
* @throws ApiError
|
|
488
|
+
*/
|
|
489
|
+
static resumeSuspendedFlowAsOwner({ workspace, id, requestBody, }) {
|
|
490
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
491
|
+
method: 'POST',
|
|
492
|
+
url: '/w/{workspace}/jobs/flow/resume/{id}',
|
|
493
|
+
path: {
|
|
494
|
+
'workspace': workspace,
|
|
495
|
+
'id': id,
|
|
496
|
+
},
|
|
497
|
+
body: requestBody,
|
|
498
|
+
mediaType: 'application/json',
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* cancel a job for a suspended flow
|
|
503
|
+
* @returns string job resumed
|
|
504
|
+
* @throws ApiError
|
|
505
|
+
*/
|
|
506
|
+
static cancelSuspendedJobGet({ workspace, id, resumeId, signature, approver, }) {
|
|
507
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
508
|
+
method: 'GET',
|
|
509
|
+
url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}',
|
|
510
|
+
path: {
|
|
511
|
+
'workspace': workspace,
|
|
512
|
+
'id': id,
|
|
513
|
+
'resume_id': resumeId,
|
|
514
|
+
'signature': signature,
|
|
515
|
+
},
|
|
516
|
+
query: {
|
|
517
|
+
'approver': approver,
|
|
518
|
+
},
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* cancel a job for a suspended flow
|
|
523
|
+
* @returns string job resumed
|
|
524
|
+
* @throws ApiError
|
|
525
|
+
*/
|
|
526
|
+
static cancelSuspendedJobPost({ workspace, id, resumeId, signature, requestBody, approver, }) {
|
|
527
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
528
|
+
method: 'POST',
|
|
529
|
+
url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}',
|
|
530
|
+
path: {
|
|
531
|
+
'workspace': workspace,
|
|
532
|
+
'id': id,
|
|
533
|
+
'resume_id': resumeId,
|
|
534
|
+
'signature': signature,
|
|
535
|
+
},
|
|
536
|
+
query: {
|
|
537
|
+
'approver': approver,
|
|
538
|
+
},
|
|
539
|
+
body: requestBody,
|
|
540
|
+
mediaType: 'application/json',
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* get parent flow job of suspended job
|
|
545
|
+
* @returns any parent flow details
|
|
546
|
+
* @throws ApiError
|
|
547
|
+
*/
|
|
548
|
+
static getSuspendedJobFlow({ workspace, id, resumeId, signature, approver, }) {
|
|
549
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
550
|
+
method: 'GET',
|
|
551
|
+
url: '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}',
|
|
552
|
+
path: {
|
|
553
|
+
'workspace': workspace,
|
|
554
|
+
'id': id,
|
|
555
|
+
'resume_id': resumeId,
|
|
556
|
+
'signature': signature,
|
|
557
|
+
},
|
|
558
|
+
query: {
|
|
559
|
+
'approver': approver,
|
|
560
|
+
},
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
exports.JobService = JobService;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { TokenResponse } from '../models/TokenResponse';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
+
export declare class OauthService {
|
|
4
|
+
/**
|
|
5
|
+
* connect slack callback
|
|
6
|
+
* @returns string slack token
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static connectSlackCallback({ workspace, requestBody, }: {
|
|
10
|
+
workspace: string;
|
|
11
|
+
/**
|
|
12
|
+
* code endpoint
|
|
13
|
+
*/
|
|
14
|
+
requestBody: {
|
|
15
|
+
code: string;
|
|
16
|
+
state: string;
|
|
17
|
+
};
|
|
18
|
+
}): CancelablePromise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* connect callback
|
|
21
|
+
* @returns TokenResponse oauth token
|
|
22
|
+
* @throws ApiError
|
|
23
|
+
*/
|
|
24
|
+
static connectCallback({ clientName, requestBody, }: {
|
|
25
|
+
clientName: string;
|
|
26
|
+
/**
|
|
27
|
+
* code endpoint
|
|
28
|
+
*/
|
|
29
|
+
requestBody: {
|
|
30
|
+
code: string;
|
|
31
|
+
state: string;
|
|
32
|
+
};
|
|
33
|
+
}): CancelablePromise<TokenResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* create OAuth account
|
|
36
|
+
* @returns string account set
|
|
37
|
+
* @throws ApiError
|
|
38
|
+
*/
|
|
39
|
+
static createAccount({ workspace, requestBody, }: {
|
|
40
|
+
workspace: string;
|
|
41
|
+
/**
|
|
42
|
+
* code endpoint
|
|
43
|
+
*/
|
|
44
|
+
requestBody: {
|
|
45
|
+
refresh_token?: string;
|
|
46
|
+
expires_in: number;
|
|
47
|
+
owner: string;
|
|
48
|
+
client: string;
|
|
49
|
+
};
|
|
50
|
+
}): CancelablePromise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* refresh token
|
|
53
|
+
* @returns string token refreshed
|
|
54
|
+
* @throws ApiError
|
|
55
|
+
*/
|
|
56
|
+
static refreshToken({ workspace, id, requestBody, }: {
|
|
57
|
+
workspace: string;
|
|
58
|
+
id: number;
|
|
59
|
+
/**
|
|
60
|
+
* variable path
|
|
61
|
+
*/
|
|
62
|
+
requestBody: {
|
|
63
|
+
path: string;
|
|
64
|
+
};
|
|
65
|
+
}): CancelablePromise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* disconnect account
|
|
68
|
+
* @returns string disconnected client
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
static disconnectAccount({ workspace, id, }: {
|
|
72
|
+
workspace: string;
|
|
73
|
+
id: number;
|
|
74
|
+
}): CancelablePromise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* disconnect slack
|
|
77
|
+
* @returns string disconnected slack
|
|
78
|
+
* @throws ApiError
|
|
79
|
+
*/
|
|
80
|
+
static disconnectSlack({ workspace, }: {
|
|
81
|
+
workspace: string;
|
|
82
|
+
}): CancelablePromise<string>;
|
|
83
|
+
/**
|
|
84
|
+
* list oauth logins
|
|
85
|
+
* @returns string list of oauth login clients
|
|
86
|
+
* @throws ApiError
|
|
87
|
+
*/
|
|
88
|
+
static listOAuthLogins(): CancelablePromise<Array<string>>;
|
|
89
|
+
/**
|
|
90
|
+
* list oauth connects
|
|
91
|
+
* @returns any list of oauth connects clients
|
|
92
|
+
* @throws ApiError
|
|
93
|
+
*/
|
|
94
|
+
static listOAuthConnects(): CancelablePromise<any>;
|
|
95
|
+
}
|