windmill-client 0.2.0 → 0.3.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.
Files changed (212) hide show
  1. package/build.sh +0 -1
  2. package/dist/core/ApiError.js +15 -0
  3. package/dist/core/ApiRequestOptions.js +2 -0
  4. package/dist/core/ApiResult.js +2 -0
  5. package/dist/core/CancelablePromise.js +94 -0
  6. package/dist/core/OpenAPI.js +14 -0
  7. package/dist/core/request.js +269 -0
  8. package/dist/index.d.ts +97 -0
  9. package/dist/index.js +87 -0
  10. package/dist/models/AppWithLastVersion.js +15 -0
  11. package/dist/models/AppWithLastVersionWDraft.js +5 -0
  12. package/dist/models/AuditLog.js +32 -0
  13. package/dist/models/BranchAll.js +5 -0
  14. package/dist/models/BranchOne.js +5 -0
  15. package/dist/models/CompletedJob.js +26 -0
  16. package/dist/models/ContextualVariable.js +5 -0
  17. package/dist/models/CreateInput.js +5 -0
  18. package/dist/models/CreateResource.js +5 -0
  19. package/dist/models/CreateVariable.js +5 -0
  20. package/dist/models/CreateWorkspace.js +5 -0
  21. package/dist/models/EditResource.js +5 -0
  22. package/dist/models/EditResourceType.js +5 -0
  23. package/dist/models/EditSchedule.js +5 -0
  24. package/dist/models/EditVariable.js +5 -0
  25. package/dist/models/EditWorkspaceUser.js +5 -0
  26. package/dist/models/Flow.js +5 -0
  27. package/dist/models/FlowMetadata.js +5 -0
  28. package/dist/models/FlowModule.js +5 -0
  29. package/dist/models/FlowModuleValue.js +5 -0
  30. package/dist/models/FlowPreview.js +5 -0
  31. package/dist/models/FlowStatus.js +5 -0
  32. package/dist/models/FlowStatusModule.js +18 -0
  33. package/dist/models/FlowValue.js +5 -0
  34. package/dist/models/Folder.js +5 -0
  35. package/dist/models/ForloopFlow.js +5 -0
  36. package/dist/models/GlobalUserInfo.js +14 -0
  37. package/dist/models/Group.js +5 -0
  38. package/dist/models/Identity.js +5 -0
  39. package/dist/models/Input.js +5 -0
  40. package/dist/models/InputTransform.js +5 -0
  41. package/dist/models/JavascriptTransform.js +5 -0
  42. package/dist/models/Job.js +14 -0
  43. package/dist/models/ListableApp.js +15 -0
  44. package/dist/models/ListableRawApp.d.ts +9 -0
  45. package/dist/models/ListableRawApp.js +5 -0
  46. package/dist/models/ListableResource.js +5 -0
  47. package/dist/models/ListableVariable.js +5 -0
  48. package/dist/models/Login.js +5 -0
  49. package/dist/models/MainArgSignature.js +14 -0
  50. package/dist/models/NewSchedule.js +5 -0
  51. package/dist/models/NewScript.js +24 -0
  52. package/dist/models/NewScriptWithDraft.js +5 -0
  53. package/dist/models/NewToken.js +5 -0
  54. package/dist/models/NewTokenImpersonate.js +5 -0
  55. package/dist/models/NewUser.js +5 -0
  56. package/dist/models/OpenFlow.js +5 -0
  57. package/dist/models/OpenFlowWPath.js +5 -0
  58. package/dist/models/PathFlow.js +5 -0
  59. package/dist/models/PathScript.js +5 -0
  60. package/dist/models/Policy.js +15 -0
  61. package/dist/models/Preview.js +16 -0
  62. package/dist/models/QueuedJob.js +26 -0
  63. package/dist/models/RawScript.js +16 -0
  64. package/dist/models/Resource.js +5 -0
  65. package/dist/models/ResourceType.js +5 -0
  66. package/dist/models/Retry.js +5 -0
  67. package/dist/models/RunnableType.js +12 -0
  68. package/dist/models/Schedule.js +5 -0
  69. package/dist/models/Script.js +24 -0
  70. package/dist/models/ScriptArgs.js +5 -0
  71. package/dist/models/SlackToken.js +5 -0
  72. package/dist/models/StaticTransform.js +5 -0
  73. package/dist/models/TokenResponse.js +5 -0
  74. package/dist/models/TruncatedToken.js +5 -0
  75. package/dist/models/UpdateInput.js +5 -0
  76. package/dist/models/Usage.js +5 -0
  77. package/dist/models/User.js +5 -0
  78. package/dist/models/UserWorkspaceList.js +5 -0
  79. package/dist/models/WorkerPing.js +5 -0
  80. package/dist/models/Workspace.js +5 -0
  81. package/dist/models/WorkspaceInvite.js +5 -0
  82. package/dist/services/AdminService.js +56 -0
  83. package/{src → dist}/services/AppService.d.ts +19 -18
  84. package/dist/services/AppService.js +211 -0
  85. package/dist/services/AuditService.js +47 -0
  86. package/dist/services/CaptureService.js +56 -0
  87. package/dist/services/DraftService.js +24 -0
  88. package/{src → dist}/services/FavoriteService.d.ts +2 -2
  89. package/dist/services/FavoriteService.js +40 -0
  90. package/dist/services/FlowService.js +200 -0
  91. package/dist/services/FolderService.js +155 -0
  92. package/{src → dist}/services/GranularAclService.d.ts +3 -3
  93. package/dist/services/GranularAclService.js +60 -0
  94. package/dist/services/GroupService.js +140 -0
  95. package/dist/services/InputService.js +99 -0
  96. package/{src → dist}/services/JobService.d.ts +12 -0
  97. package/dist/services/JobService.js +579 -0
  98. package/dist/services/OauthService.js +124 -0
  99. package/dist/services/RawAppService.d.ts +103 -0
  100. package/dist/services/RawAppService.js +110 -0
  101. package/dist/services/ResourceService.js +244 -0
  102. package/dist/services/ScheduleService.js +134 -0
  103. package/dist/services/ScriptService.js +339 -0
  104. package/dist/services/SettingsService.js +30 -0
  105. package/dist/services/UserService.js +376 -0
  106. package/dist/services/VariableService.js +123 -0
  107. package/dist/services/WorkerService.js +34 -0
  108. package/dist/services/WorkspaceService.js +275 -0
  109. package/package.json +1 -1
  110. package/publish.sh +3 -0
  111. package/src/core/OpenAPI.ts +1 -1
  112. package/src/index.ts +2 -0
  113. package/src/models/ListableRawApp.ts +14 -0
  114. package/src/services/AppService.ts +33 -32
  115. package/src/services/FavoriteService.ts +2 -2
  116. package/src/services/GranularAclService.ts +3 -3
  117. package/src/services/JobService.ts +25 -0
  118. package/src/services/RawAppService.ts +209 -0
  119. package/tsconfig.json +1 -1
  120. /package/{src → dist}/core/ApiError.d.ts +0 -0
  121. /package/{src → dist}/core/ApiRequestOptions.d.ts +0 -0
  122. /package/{src → dist}/core/ApiResult.d.ts +0 -0
  123. /package/{src → dist}/core/CancelablePromise.d.ts +0 -0
  124. /package/{src → dist}/core/OpenAPI.d.ts +0 -0
  125. /package/{src → dist}/core/request.d.ts +0 -0
  126. /package/{src → dist}/models/AppWithLastVersion.d.ts +0 -0
  127. /package/{src → dist}/models/AppWithLastVersionWDraft.d.ts +0 -0
  128. /package/{src → dist}/models/AuditLog.d.ts +0 -0
  129. /package/{src → dist}/models/BranchAll.d.ts +0 -0
  130. /package/{src → dist}/models/BranchOne.d.ts +0 -0
  131. /package/{src → dist}/models/CompletedJob.d.ts +0 -0
  132. /package/{src → dist}/models/ContextualVariable.d.ts +0 -0
  133. /package/{src → dist}/models/CreateInput.d.ts +0 -0
  134. /package/{src → dist}/models/CreateResource.d.ts +0 -0
  135. /package/{src → dist}/models/CreateVariable.d.ts +0 -0
  136. /package/{src → dist}/models/CreateWorkspace.d.ts +0 -0
  137. /package/{src → dist}/models/EditResource.d.ts +0 -0
  138. /package/{src → dist}/models/EditResourceType.d.ts +0 -0
  139. /package/{src → dist}/models/EditSchedule.d.ts +0 -0
  140. /package/{src → dist}/models/EditVariable.d.ts +0 -0
  141. /package/{src → dist}/models/EditWorkspaceUser.d.ts +0 -0
  142. /package/{src → dist}/models/Flow.d.ts +0 -0
  143. /package/{src → dist}/models/FlowMetadata.d.ts +0 -0
  144. /package/{src → dist}/models/FlowModule.d.ts +0 -0
  145. /package/{src → dist}/models/FlowModuleValue.d.ts +0 -0
  146. /package/{src → dist}/models/FlowPreview.d.ts +0 -0
  147. /package/{src → dist}/models/FlowStatus.d.ts +0 -0
  148. /package/{src → dist}/models/FlowStatusModule.d.ts +0 -0
  149. /package/{src → dist}/models/FlowValue.d.ts +0 -0
  150. /package/{src → dist}/models/Folder.d.ts +0 -0
  151. /package/{src → dist}/models/ForloopFlow.d.ts +0 -0
  152. /package/{src → dist}/models/GlobalUserInfo.d.ts +0 -0
  153. /package/{src → dist}/models/Group.d.ts +0 -0
  154. /package/{src → dist}/models/Identity.d.ts +0 -0
  155. /package/{src → dist}/models/Input.d.ts +0 -0
  156. /package/{src → dist}/models/InputTransform.d.ts +0 -0
  157. /package/{src → dist}/models/JavascriptTransform.d.ts +0 -0
  158. /package/{src → dist}/models/Job.d.ts +0 -0
  159. /package/{src → dist}/models/ListableApp.d.ts +0 -0
  160. /package/{src → dist}/models/ListableResource.d.ts +0 -0
  161. /package/{src → dist}/models/ListableVariable.d.ts +0 -0
  162. /package/{src → dist}/models/Login.d.ts +0 -0
  163. /package/{src → dist}/models/MainArgSignature.d.ts +0 -0
  164. /package/{src → dist}/models/NewSchedule.d.ts +0 -0
  165. /package/{src → dist}/models/NewScript.d.ts +0 -0
  166. /package/{src → dist}/models/NewScriptWithDraft.d.ts +0 -0
  167. /package/{src → dist}/models/NewToken.d.ts +0 -0
  168. /package/{src → dist}/models/NewTokenImpersonate.d.ts +0 -0
  169. /package/{src → dist}/models/NewUser.d.ts +0 -0
  170. /package/{src → dist}/models/OpenFlow.d.ts +0 -0
  171. /package/{src → dist}/models/OpenFlowWPath.d.ts +0 -0
  172. /package/{src → dist}/models/PathFlow.d.ts +0 -0
  173. /package/{src → dist}/models/PathScript.d.ts +0 -0
  174. /package/{src → dist}/models/Policy.d.ts +0 -0
  175. /package/{src → dist}/models/Preview.d.ts +0 -0
  176. /package/{src → dist}/models/QueuedJob.d.ts +0 -0
  177. /package/{src → dist}/models/RawScript.d.ts +0 -0
  178. /package/{src → dist}/models/Resource.d.ts +0 -0
  179. /package/{src → dist}/models/ResourceType.d.ts +0 -0
  180. /package/{src → dist}/models/Retry.d.ts +0 -0
  181. /package/{src → dist}/models/RunnableType.d.ts +0 -0
  182. /package/{src → dist}/models/Schedule.d.ts +0 -0
  183. /package/{src → dist}/models/Script.d.ts +0 -0
  184. /package/{src → dist}/models/ScriptArgs.d.ts +0 -0
  185. /package/{src → dist}/models/SlackToken.d.ts +0 -0
  186. /package/{src → dist}/models/StaticTransform.d.ts +0 -0
  187. /package/{src → dist}/models/TokenResponse.d.ts +0 -0
  188. /package/{src → dist}/models/TruncatedToken.d.ts +0 -0
  189. /package/{src → dist}/models/UpdateInput.d.ts +0 -0
  190. /package/{src → dist}/models/Usage.d.ts +0 -0
  191. /package/{src → dist}/models/User.d.ts +0 -0
  192. /package/{src → dist}/models/UserWorkspaceList.d.ts +0 -0
  193. /package/{src → dist}/models/WorkerPing.d.ts +0 -0
  194. /package/{src → dist}/models/Workspace.d.ts +0 -0
  195. /package/{src → dist}/models/WorkspaceInvite.d.ts +0 -0
  196. /package/{src → dist}/services/AdminService.d.ts +0 -0
  197. /package/{src → dist}/services/AuditService.d.ts +0 -0
  198. /package/{src → dist}/services/CaptureService.d.ts +0 -0
  199. /package/{src → dist}/services/DraftService.d.ts +0 -0
  200. /package/{src → dist}/services/FlowService.d.ts +0 -0
  201. /package/{src → dist}/services/FolderService.d.ts +0 -0
  202. /package/{src → dist}/services/GroupService.d.ts +0 -0
  203. /package/{src → dist}/services/InputService.d.ts +0 -0
  204. /package/{src → dist}/services/OauthService.d.ts +0 -0
  205. /package/{src → dist}/services/ResourceService.d.ts +0 -0
  206. /package/{src → dist}/services/ScheduleService.d.ts +0 -0
  207. /package/{src → dist}/services/ScriptService.d.ts +0 -0
  208. /package/{src → dist}/services/SettingsService.d.ts +0 -0
  209. /package/{src → dist}/services/UserService.d.ts +0 -0
  210. /package/{src → dist}/services/VariableService.d.ts +0 -0
  211. /package/{src → dist}/services/WorkerService.d.ts +0 -0
  212. /package/{src → dist}/services/WorkspaceService.d.ts +0 -0
@@ -0,0 +1,579 @@
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
+ * get completed job result if job is completed
356
+ * @returns any result
357
+ * @throws ApiError
358
+ */
359
+ static getCompletedJobResultMaybe({ workspace, id, }) {
360
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
361
+ method: 'GET',
362
+ url: '/w/{workspace}/jobs/completed/get_result_maybe/{id}',
363
+ path: {
364
+ 'workspace': workspace,
365
+ 'id': id,
366
+ },
367
+ });
368
+ }
369
+ /**
370
+ * delete completed job (erase content but keep run id)
371
+ * @returns CompletedJob job details
372
+ * @throws ApiError
373
+ */
374
+ static deleteCompletedJob({ workspace, id, }) {
375
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
376
+ method: 'POST',
377
+ url: '/w/{workspace}/jobs/completed/delete/{id}',
378
+ path: {
379
+ 'workspace': workspace,
380
+ 'id': id,
381
+ },
382
+ });
383
+ }
384
+ /**
385
+ * cancel queued job
386
+ * @returns string job canceled
387
+ * @throws ApiError
388
+ */
389
+ static cancelQueuedJob({ workspace, id, requestBody, }) {
390
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
391
+ method: 'POST',
392
+ url: '/w/{workspace}/jobs_u/queue/cancel/{id}',
393
+ path: {
394
+ 'workspace': workspace,
395
+ 'id': id,
396
+ },
397
+ body: requestBody,
398
+ mediaType: 'application/json',
399
+ });
400
+ }
401
+ /**
402
+ * force cancel queued job
403
+ * @returns string job canceled
404
+ * @throws ApiError
405
+ */
406
+ static forceCancelQueuedJob({ workspace, id, requestBody, }) {
407
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
408
+ method: 'POST',
409
+ url: '/w/{workspace}/jobs_u/queue/force_cancel/{id}',
410
+ path: {
411
+ 'workspace': workspace,
412
+ 'id': id,
413
+ },
414
+ body: requestBody,
415
+ mediaType: 'application/json',
416
+ });
417
+ }
418
+ /**
419
+ * create an HMac signature given a job id and a resume id
420
+ * @returns string job signature
421
+ * @throws ApiError
422
+ */
423
+ static createJobSignature({ workspace, id, resumeId, approver, }) {
424
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
425
+ method: 'GET',
426
+ url: '/w/{workspace}/jobs/job_signature/{id}/{resume_id}',
427
+ path: {
428
+ 'workspace': workspace,
429
+ 'id': id,
430
+ 'resume_id': resumeId,
431
+ },
432
+ query: {
433
+ 'approver': approver,
434
+ },
435
+ });
436
+ }
437
+ /**
438
+ * get resume urls given a job_id, resume_id and a nonce to resume a flow
439
+ * @returns any url endpoints
440
+ * @throws ApiError
441
+ */
442
+ static getResumeUrls({ workspace, id, resumeId, approver, }) {
443
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
444
+ method: 'GET',
445
+ url: '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}',
446
+ path: {
447
+ 'workspace': workspace,
448
+ 'id': id,
449
+ 'resume_id': resumeId,
450
+ },
451
+ query: {
452
+ 'approver': approver,
453
+ },
454
+ });
455
+ }
456
+ /**
457
+ * resume a job for a suspended flow
458
+ * @returns string job resumed
459
+ * @throws ApiError
460
+ */
461
+ static resumeSuspendedJobGet({ workspace, id, resumeId, signature, payload, approver, }) {
462
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
463
+ method: 'GET',
464
+ url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}',
465
+ path: {
466
+ 'workspace': workspace,
467
+ 'id': id,
468
+ 'resume_id': resumeId,
469
+ 'signature': signature,
470
+ },
471
+ query: {
472
+ 'payload': payload,
473
+ 'approver': approver,
474
+ },
475
+ });
476
+ }
477
+ /**
478
+ * resume a job for a suspended flow
479
+ * @returns string job resumed
480
+ * @throws ApiError
481
+ */
482
+ static resumeSuspendedJobPost({ workspace, id, resumeId, signature, requestBody, approver, }) {
483
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
484
+ method: 'POST',
485
+ url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}',
486
+ path: {
487
+ 'workspace': workspace,
488
+ 'id': id,
489
+ 'resume_id': resumeId,
490
+ 'signature': signature,
491
+ },
492
+ query: {
493
+ 'approver': approver,
494
+ },
495
+ body: requestBody,
496
+ mediaType: 'application/json',
497
+ });
498
+ }
499
+ /**
500
+ * resume a job for a suspended flow as an owner
501
+ * @returns string job resumed
502
+ * @throws ApiError
503
+ */
504
+ static resumeSuspendedFlowAsOwner({ workspace, id, requestBody, }) {
505
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
506
+ method: 'POST',
507
+ url: '/w/{workspace}/jobs/flow/resume/{id}',
508
+ path: {
509
+ 'workspace': workspace,
510
+ 'id': id,
511
+ },
512
+ body: requestBody,
513
+ mediaType: 'application/json',
514
+ });
515
+ }
516
+ /**
517
+ * cancel a job for a suspended flow
518
+ * @returns string job resumed
519
+ * @throws ApiError
520
+ */
521
+ static cancelSuspendedJobGet({ workspace, id, resumeId, signature, approver, }) {
522
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
523
+ method: 'GET',
524
+ url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}',
525
+ path: {
526
+ 'workspace': workspace,
527
+ 'id': id,
528
+ 'resume_id': resumeId,
529
+ 'signature': signature,
530
+ },
531
+ query: {
532
+ 'approver': approver,
533
+ },
534
+ });
535
+ }
536
+ /**
537
+ * cancel a job for a suspended flow
538
+ * @returns string job resumed
539
+ * @throws ApiError
540
+ */
541
+ static cancelSuspendedJobPost({ workspace, id, resumeId, signature, requestBody, approver, }) {
542
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
543
+ method: 'POST',
544
+ url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}',
545
+ path: {
546
+ 'workspace': workspace,
547
+ 'id': id,
548
+ 'resume_id': resumeId,
549
+ 'signature': signature,
550
+ },
551
+ query: {
552
+ 'approver': approver,
553
+ },
554
+ body: requestBody,
555
+ mediaType: 'application/json',
556
+ });
557
+ }
558
+ /**
559
+ * get parent flow job of suspended job
560
+ * @returns any parent flow details
561
+ * @throws ApiError
562
+ */
563
+ static getSuspendedJobFlow({ workspace, id, resumeId, signature, approver, }) {
564
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
565
+ method: 'GET',
566
+ url: '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}',
567
+ path: {
568
+ 'workspace': workspace,
569
+ 'id': id,
570
+ 'resume_id': resumeId,
571
+ 'signature': signature,
572
+ },
573
+ query: {
574
+ 'approver': approver,
575
+ },
576
+ });
577
+ }
578
+ }
579
+ exports.JobService = JobService;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OauthService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class OauthService {
7
+ /**
8
+ * connect slack callback
9
+ * @returns string slack token
10
+ * @throws ApiError
11
+ */
12
+ static connectSlackCallback({ workspace, requestBody, }) {
13
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
+ method: 'POST',
15
+ url: '/w/{workspace}/oauth/connect_slack_callback',
16
+ path: {
17
+ 'workspace': workspace,
18
+ },
19
+ body: requestBody,
20
+ mediaType: 'application/json',
21
+ });
22
+ }
23
+ /**
24
+ * connect callback
25
+ * @returns TokenResponse oauth token
26
+ * @throws ApiError
27
+ */
28
+ static connectCallback({ clientName, requestBody, }) {
29
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
30
+ method: 'POST',
31
+ url: '/oauth/connect_callback/{client_name}',
32
+ path: {
33
+ 'client_name': clientName,
34
+ },
35
+ body: requestBody,
36
+ mediaType: 'application/json',
37
+ });
38
+ }
39
+ /**
40
+ * create OAuth account
41
+ * @returns string account set
42
+ * @throws ApiError
43
+ */
44
+ static createAccount({ workspace, requestBody, }) {
45
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
46
+ method: 'POST',
47
+ url: '/w/{workspace}/oauth/create_account',
48
+ path: {
49
+ 'workspace': workspace,
50
+ },
51
+ body: requestBody,
52
+ mediaType: 'application/json',
53
+ });
54
+ }
55
+ /**
56
+ * refresh token
57
+ * @returns string token refreshed
58
+ * @throws ApiError
59
+ */
60
+ static refreshToken({ workspace, id, requestBody, }) {
61
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
62
+ method: 'POST',
63
+ url: '/w/{workspace}/oauth/refresh_token/{id}',
64
+ path: {
65
+ 'workspace': workspace,
66
+ 'id': id,
67
+ },
68
+ body: requestBody,
69
+ mediaType: 'application/json',
70
+ });
71
+ }
72
+ /**
73
+ * disconnect account
74
+ * @returns string disconnected client
75
+ * @throws ApiError
76
+ */
77
+ static disconnectAccount({ workspace, id, }) {
78
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
79
+ method: 'POST',
80
+ url: '/w/{workspace}/oauth/disconnect/{id}',
81
+ path: {
82
+ 'workspace': workspace,
83
+ 'id': id,
84
+ },
85
+ });
86
+ }
87
+ /**
88
+ * disconnect slack
89
+ * @returns string disconnected slack
90
+ * @throws ApiError
91
+ */
92
+ static disconnectSlack({ workspace, }) {
93
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
94
+ method: 'POST',
95
+ url: '/w/{workspace}/oauth/disconnect_slack',
96
+ path: {
97
+ 'workspace': workspace,
98
+ },
99
+ });
100
+ }
101
+ /**
102
+ * list oauth logins
103
+ * @returns string list of oauth login clients
104
+ * @throws ApiError
105
+ */
106
+ static listOAuthLogins() {
107
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
108
+ method: 'GET',
109
+ url: '/oauth/list_logins',
110
+ });
111
+ }
112
+ /**
113
+ * list oauth connects
114
+ * @returns any list of oauth connects clients
115
+ * @throws ApiError
116
+ */
117
+ static listOAuthConnects() {
118
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
119
+ method: 'GET',
120
+ url: '/oauth/list_connects',
121
+ });
122
+ }
123
+ }
124
+ exports.OauthService = OauthService;