windmill-client 0.1.0

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 (100) hide show
  1. package/build.sh +7 -0
  2. package/package.json +7 -0
  3. package/src/core/ApiError.ts +24 -0
  4. package/src/core/ApiRequestOptions.ts +16 -0
  5. package/src/core/ApiResult.ts +10 -0
  6. package/src/core/CancelablePromise.ts +128 -0
  7. package/src/core/OpenAPI.ts +31 -0
  8. package/src/core/request.ts +308 -0
  9. package/src/index.ts +100 -0
  10. package/src/models/AppWithLastVersion.ts +31 -0
  11. package/src/models/AppWithLastVersionWDraft.ts +11 -0
  12. package/src/models/AuditLog.ts +42 -0
  13. package/src/models/BranchAll.ts +16 -0
  14. package/src/models/BranchOne.ts +16 -0
  15. package/src/models/CompletedJob.ts +68 -0
  16. package/src/models/ContextualVariable.ts +10 -0
  17. package/src/models/CreateInput.ts +9 -0
  18. package/src/models/CreateResource.ts +11 -0
  19. package/src/models/CreateVariable.ts +13 -0
  20. package/src/models/CreateWorkspace.ts +10 -0
  21. package/src/models/EditResource.ts +10 -0
  22. package/src/models/EditResourceType.ts +9 -0
  23. package/src/models/EditSchedule.ts +12 -0
  24. package/src/models/EditVariable.ts +11 -0
  25. package/src/models/EditWorkspaceUser.ts +10 -0
  26. package/src/models/Flow.ts +9 -0
  27. package/src/models/FlowMetadata.ts +16 -0
  28. package/src/models/FlowModule.ts +24 -0
  29. package/src/models/FlowModuleValue.ts +14 -0
  30. package/src/models/FlowPreview.ts +13 -0
  31. package/src/models/FlowStatus.ts +18 -0
  32. package/src/models/FlowStatusModule.ts +43 -0
  33. package/src/models/FlowValue.ts +12 -0
  34. package/src/models/Folder.ts +10 -0
  35. package/src/models/ForloopFlow.ts +15 -0
  36. package/src/models/GlobalUserInfo.ts +23 -0
  37. package/src/models/Group.ts +11 -0
  38. package/src/models/Identity.ts +9 -0
  39. package/src/models/Input.ts +13 -0
  40. package/src/models/InputTransform.ts +9 -0
  41. package/src/models/JavascriptTransform.ts +9 -0
  42. package/src/models/Job.ts +21 -0
  43. package/src/models/ListableApp.ts +27 -0
  44. package/src/models/ListableResource.ts +19 -0
  45. package/src/models/ListableVariable.ts +19 -0
  46. package/src/models/Login.ts +9 -0
  47. package/src/models/MainArgSignature.ts +42 -0
  48. package/src/models/NewSchedule.ts +16 -0
  49. package/src/models/NewScript.ts +39 -0
  50. package/src/models/NewScriptWithDraft.ts +11 -0
  51. package/src/models/NewToken.ts +9 -0
  52. package/src/models/NewTokenImpersonate.ts +10 -0
  53. package/src/models/NewUser.ts +10 -0
  54. package/src/models/OpenFlow.ts +13 -0
  55. package/src/models/OpenFlowWPath.ts +10 -0
  56. package/src/models/PathFlow.ts +12 -0
  57. package/src/models/PathScript.ts +13 -0
  58. package/src/models/Policy.ts +22 -0
  59. package/src/models/Preview.ts +26 -0
  60. package/src/models/QueuedJob.ts +66 -0
  61. package/src/models/RawScript.ts +28 -0
  62. package/src/models/Resource.ts +14 -0
  63. package/src/models/ResourceType.ts +11 -0
  64. package/src/models/Retry.ts +16 -0
  65. package/src/models/RunnableType.ts +9 -0
  66. package/src/models/Schedule.ts +21 -0
  67. package/src/models/Script.ts +53 -0
  68. package/src/models/ScriptArgs.ts +5 -0
  69. package/src/models/SlackToken.ts +13 -0
  70. package/src/models/StaticTransform.ts +9 -0
  71. package/src/models/TokenResponse.ts +11 -0
  72. package/src/models/TruncatedToken.ts +12 -0
  73. package/src/models/UpdateInput.ts +10 -0
  74. package/src/models/Usage.ts +8 -0
  75. package/src/models/User.ts +20 -0
  76. package/src/models/UserWorkspaceList.ts +13 -0
  77. package/src/models/WorkerPing.ts +13 -0
  78. package/src/models/Workspace.ts +11 -0
  79. package/src/models/WorkspaceInvite.ts +11 -0
  80. package/src/services/AdminService.ts +90 -0
  81. package/src/services/AppService.ts +383 -0
  82. package/src/services/AuditService.ts +103 -0
  83. package/src/services/CaptureService.ts +79 -0
  84. package/src/services/DraftService.ts +37 -0
  85. package/src/services/FavoriteService.ts +62 -0
  86. package/src/services/FlowService.ts +368 -0
  87. package/src/services/FolderService.ts +269 -0
  88. package/src/services/GranularAclService.ts +104 -0
  89. package/src/services/GroupService.ts +238 -0
  90. package/src/services/InputService.ts +175 -0
  91. package/src/services/JobService.ts +1247 -0
  92. package/src/services/OauthService.ts +197 -0
  93. package/src/services/ResourceService.ts +395 -0
  94. package/src/services/ScheduleService.ts +223 -0
  95. package/src/services/ScriptService.ts +601 -0
  96. package/src/services/SettingsService.ts +34 -0
  97. package/src/services/UserService.ts +574 -0
  98. package/src/services/VariableService.ts +194 -0
  99. package/src/services/WorkerService.ts +52 -0
  100. package/src/services/WorkspaceService.ts +446 -0
@@ -0,0 +1,90 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { EditWorkspaceUser } from '../models/EditWorkspaceUser';
5
+ import type { NewUser } from '../models/NewUser';
6
+
7
+ import type { CancelablePromise } from '../core/CancelablePromise';
8
+ import { OpenAPI } from '../core/OpenAPI';
9
+ import { request as __request } from '../core/request';
10
+
11
+ export class AdminService {
12
+
13
+ /**
14
+ * create user (require admin privilege)
15
+ * @returns string user created
16
+ * @throws ApiError
17
+ */
18
+ public static createUser({
19
+ workspace,
20
+ requestBody,
21
+ }: {
22
+ workspace: string,
23
+ /**
24
+ * new user
25
+ */
26
+ requestBody: NewUser,
27
+ }): CancelablePromise<string> {
28
+ return __request(OpenAPI, {
29
+ method: 'POST',
30
+ url: '/w/{workspace}/users/add',
31
+ path: {
32
+ 'workspace': workspace,
33
+ },
34
+ body: requestBody,
35
+ mediaType: 'application/json',
36
+ });
37
+ }
38
+
39
+ /**
40
+ * update user (require admin privilege)
41
+ * @returns string edited user
42
+ * @throws ApiError
43
+ */
44
+ public static updateUser({
45
+ workspace,
46
+ username,
47
+ requestBody,
48
+ }: {
49
+ workspace: string,
50
+ username: string,
51
+ /**
52
+ * new user
53
+ */
54
+ requestBody: EditWorkspaceUser,
55
+ }): CancelablePromise<string> {
56
+ return __request(OpenAPI, {
57
+ method: 'POST',
58
+ url: '/w/{workspace}/users/update/{username}',
59
+ path: {
60
+ 'workspace': workspace,
61
+ 'username': username,
62
+ },
63
+ body: requestBody,
64
+ mediaType: 'application/json',
65
+ });
66
+ }
67
+
68
+ /**
69
+ * delete user (require admin privilege)
70
+ * @returns string delete user
71
+ * @throws ApiError
72
+ */
73
+ public static deleteUser({
74
+ workspace,
75
+ username,
76
+ }: {
77
+ workspace: string,
78
+ username: string,
79
+ }): CancelablePromise<string> {
80
+ return __request(OpenAPI, {
81
+ method: 'DELETE',
82
+ url: '/w/{workspace}/users/delete/{username}',
83
+ path: {
84
+ 'workspace': workspace,
85
+ 'username': username,
86
+ },
87
+ });
88
+ }
89
+
90
+ }
@@ -0,0 +1,383 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { AppWithLastVersion } from '../models/AppWithLastVersion';
5
+ import type { AppWithLastVersionWDraft } from '../models/AppWithLastVersionWDraft';
6
+ import type { ListableApp } from '../models/ListableApp';
7
+ import type { Policy } from '../models/Policy';
8
+
9
+ import type { CancelablePromise } from '../core/CancelablePromise';
10
+ import { OpenAPI } from '../core/OpenAPI';
11
+ import { request as __request } from '../core/request';
12
+
13
+ export class AppService {
14
+
15
+ /**
16
+ * list all available hub apps
17
+ * @returns any hub apps list
18
+ * @throws ApiError
19
+ */
20
+ public static listHubApps(): CancelablePromise<{
21
+ apps?: Array<{
22
+ id: number;
23
+ app_id: number;
24
+ summary: string;
25
+ apps: Array<string>;
26
+ approved: boolean;
27
+ votes: number;
28
+ }>;
29
+ }> {
30
+ return __request(OpenAPI, {
31
+ method: 'GET',
32
+ url: '/apps/hub/list',
33
+ });
34
+ }
35
+
36
+ /**
37
+ * get hub app by id
38
+ * @returns any app
39
+ * @throws ApiError
40
+ */
41
+ public static getHubAppById({
42
+ id,
43
+ }: {
44
+ id: number,
45
+ }): CancelablePromise<{
46
+ app: {
47
+ summary: string;
48
+ value: any;
49
+ };
50
+ }> {
51
+ return __request(OpenAPI, {
52
+ method: 'GET',
53
+ url: '/apps/hub/get/{id}',
54
+ path: {
55
+ 'id': id,
56
+ },
57
+ });
58
+ }
59
+
60
+ /**
61
+ * list all available apps
62
+ * @returns ListableApp All available apps
63
+ * @throws ApiError
64
+ */
65
+ public static listApps({
66
+ workspace,
67
+ page,
68
+ perPage,
69
+ orderDesc,
70
+ createdBy,
71
+ pathStart,
72
+ pathExact,
73
+ starredOnly,
74
+ }: {
75
+ workspace: string,
76
+ /**
77
+ * which page to return (start at 1, default 1)
78
+ */
79
+ page?: number,
80
+ /**
81
+ * number of items to return for a given page (default 30, max 100)
82
+ */
83
+ perPage?: number,
84
+ /**
85
+ * order by desc order (default true)
86
+ */
87
+ orderDesc?: boolean,
88
+ /**
89
+ * mask to filter exact matching user creator
90
+ */
91
+ createdBy?: string,
92
+ /**
93
+ * mask to filter matching starting path
94
+ */
95
+ pathStart?: string,
96
+ /**
97
+ * mask to filter exact matching path
98
+ */
99
+ pathExact?: string,
100
+ /**
101
+ * (default false)
102
+ * show only the starred items
103
+ *
104
+ */
105
+ starredOnly?: boolean,
106
+ }): CancelablePromise<Array<ListableApp>> {
107
+ return __request(OpenAPI, {
108
+ method: 'GET',
109
+ url: '/w/{workspace}/apps/list',
110
+ path: {
111
+ 'workspace': workspace,
112
+ },
113
+ query: {
114
+ 'page': page,
115
+ 'per_page': perPage,
116
+ 'order_desc': orderDesc,
117
+ 'created_by': createdBy,
118
+ 'path_start': pathStart,
119
+ 'path_exact': pathExact,
120
+ 'starred_only': starredOnly,
121
+ },
122
+ });
123
+ }
124
+
125
+ /**
126
+ * does an app exisst at path
127
+ * @returns boolean app exists
128
+ * @throws ApiError
129
+ */
130
+ public static existsApp({
131
+ workspace,
132
+ path,
133
+ }: {
134
+ workspace: string,
135
+ path: string,
136
+ }): CancelablePromise<boolean> {
137
+ return __request(OpenAPI, {
138
+ method: 'GET',
139
+ url: '/w/{workspace}/apps/exists/{path}',
140
+ path: {
141
+ 'workspace': workspace,
142
+ 'path': path,
143
+ },
144
+ });
145
+ }
146
+
147
+ /**
148
+ * get app by path
149
+ * @returns AppWithLastVersion app details
150
+ * @throws ApiError
151
+ */
152
+ public static getAppByPath({
153
+ workspace,
154
+ path,
155
+ }: {
156
+ workspace: string,
157
+ path: string,
158
+ }): CancelablePromise<AppWithLastVersion> {
159
+ return __request(OpenAPI, {
160
+ method: 'GET',
161
+ url: '/w/{workspace}/apps/get/p/{path}',
162
+ path: {
163
+ 'workspace': workspace,
164
+ 'path': path,
165
+ },
166
+ });
167
+ }
168
+
169
+ /**
170
+ * get app by path with draft
171
+ * @returns AppWithLastVersionWDraft app details with draft
172
+ * @throws ApiError
173
+ */
174
+ public static getAppByPathWithDraft({
175
+ workspace,
176
+ path,
177
+ }: {
178
+ workspace: string,
179
+ path: string,
180
+ }): CancelablePromise<AppWithLastVersionWDraft> {
181
+ return __request(OpenAPI, {
182
+ method: 'GET',
183
+ url: '/w/{workspace}/apps/get/draft/{path}',
184
+ path: {
185
+ 'workspace': workspace,
186
+ 'path': path,
187
+ },
188
+ });
189
+ }
190
+
191
+ /**
192
+ * get public app by secret
193
+ * @returns AppWithLastVersion app details
194
+ * @throws ApiError
195
+ */
196
+ public static getPublicAppBySecret({
197
+ workspace,
198
+ path,
199
+ }: {
200
+ workspace: string,
201
+ path: string,
202
+ }): CancelablePromise<AppWithLastVersion> {
203
+ return __request(OpenAPI, {
204
+ method: 'GET',
205
+ url: '/w/{workspace}/apps_u/public_app/{path}',
206
+ path: {
207
+ 'workspace': workspace,
208
+ 'path': path,
209
+ },
210
+ });
211
+ }
212
+
213
+ /**
214
+ * get public secret of app
215
+ * @returns string app secret
216
+ * @throws ApiError
217
+ */
218
+ public static getPublicSecretOfApp({
219
+ workspace,
220
+ path,
221
+ }: {
222
+ workspace: string,
223
+ path: string,
224
+ }): CancelablePromise<string> {
225
+ return __request(OpenAPI, {
226
+ method: 'GET',
227
+ url: '/w/{workspace}/apps/secret_of/{path}',
228
+ path: {
229
+ 'workspace': workspace,
230
+ 'path': path,
231
+ },
232
+ });
233
+ }
234
+
235
+ /**
236
+ * get app by version
237
+ * @returns AppWithLastVersion app details
238
+ * @throws ApiError
239
+ */
240
+ public static getAppByVersion({
241
+ workspace,
242
+ id,
243
+ }: {
244
+ workspace: string,
245
+ id: number,
246
+ }): CancelablePromise<AppWithLastVersion> {
247
+ return __request(OpenAPI, {
248
+ method: 'GET',
249
+ url: '/w/{workspace}/apps/get/v/{id}',
250
+ path: {
251
+ 'workspace': workspace,
252
+ 'id': id,
253
+ },
254
+ });
255
+ }
256
+
257
+ /**
258
+ * create app
259
+ * @returns string app created
260
+ * @throws ApiError
261
+ */
262
+ public static createApp({
263
+ workspace,
264
+ requestBody,
265
+ }: {
266
+ workspace: string,
267
+ /**
268
+ * new app
269
+ */
270
+ requestBody: {
271
+ path: string;
272
+ value: any;
273
+ summary: string;
274
+ policy: Policy;
275
+ draft_only?: boolean;
276
+ },
277
+ }): CancelablePromise<string> {
278
+ return __request(OpenAPI, {
279
+ method: 'POST',
280
+ url: '/w/{workspace}/apps/create',
281
+ path: {
282
+ 'workspace': workspace,
283
+ },
284
+ body: requestBody,
285
+ mediaType: 'application/json',
286
+ });
287
+ }
288
+
289
+ /**
290
+ * delete app
291
+ * @returns string app deleted
292
+ * @throws ApiError
293
+ */
294
+ public static deleteApp({
295
+ workspace,
296
+ path,
297
+ }: {
298
+ workspace: string,
299
+ path: string,
300
+ }): CancelablePromise<string> {
301
+ return __request(OpenAPI, {
302
+ method: 'DELETE',
303
+ url: '/w/{workspace}/apps/delete/{path}',
304
+ path: {
305
+ 'workspace': workspace,
306
+ 'path': path,
307
+ },
308
+ });
309
+ }
310
+
311
+ /**
312
+ * update app
313
+ * @returns string app updated
314
+ * @throws ApiError
315
+ */
316
+ public static updateApp({
317
+ workspace,
318
+ path,
319
+ requestBody,
320
+ }: {
321
+ workspace: string,
322
+ path: string,
323
+ /**
324
+ * update app
325
+ */
326
+ requestBody: {
327
+ path?: string;
328
+ summary?: string;
329
+ value?: any;
330
+ policy?: Policy;
331
+ },
332
+ }): CancelablePromise<string> {
333
+ return __request(OpenAPI, {
334
+ method: 'POST',
335
+ url: '/w/{workspace}/apps/update/{path}',
336
+ path: {
337
+ 'workspace': workspace,
338
+ 'path': path,
339
+ },
340
+ body: requestBody,
341
+ mediaType: 'application/json',
342
+ });
343
+ }
344
+
345
+ /**
346
+ * executeComponent
347
+ * @returns string job uuid
348
+ * @throws ApiError
349
+ */
350
+ public static executeComponent({
351
+ workspace,
352
+ path,
353
+ requestBody,
354
+ }: {
355
+ workspace: string,
356
+ path: string,
357
+ /**
358
+ * update app
359
+ */
360
+ requestBody: {
361
+ path?: string;
362
+ args: any;
363
+ raw_code?: {
364
+ content: string;
365
+ language: string;
366
+ path?: string;
367
+ };
368
+ force_viewer_static_fields?: any;
369
+ },
370
+ }): CancelablePromise<string> {
371
+ return __request(OpenAPI, {
372
+ method: 'POST',
373
+ url: '/w/{workspace}/apps_u/execute_component/{path}',
374
+ path: {
375
+ 'workspace': workspace,
376
+ 'path': path,
377
+ },
378
+ body: requestBody,
379
+ mediaType: 'application/json',
380
+ });
381
+ }
382
+
383
+ }
@@ -0,0 +1,103 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { AuditLog } from '../models/AuditLog';
5
+
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ import { OpenAPI } from '../core/OpenAPI';
8
+ import { request as __request } from '../core/request';
9
+
10
+ export class AuditService {
11
+
12
+ /**
13
+ * get audit log (requires admin privilege)
14
+ * @returns AuditLog an audit log
15
+ * @throws ApiError
16
+ */
17
+ public static getAuditLog({
18
+ workspace,
19
+ id,
20
+ }: {
21
+ workspace: string,
22
+ id: number,
23
+ }): CancelablePromise<AuditLog> {
24
+ return __request(OpenAPI, {
25
+ method: 'GET',
26
+ url: '/w/{workspace}/audit/get/{id}',
27
+ path: {
28
+ 'workspace': workspace,
29
+ 'id': id,
30
+ },
31
+ });
32
+ }
33
+
34
+ /**
35
+ * list audit logs (requires admin privilege)
36
+ * @returns AuditLog a list of audit logs
37
+ * @throws ApiError
38
+ */
39
+ public static listAuditLogs({
40
+ workspace,
41
+ page,
42
+ perPage,
43
+ before,
44
+ after,
45
+ username,
46
+ operation,
47
+ resource,
48
+ actionKind,
49
+ }: {
50
+ workspace: string,
51
+ /**
52
+ * which page to return (start at 1, default 1)
53
+ */
54
+ page?: number,
55
+ /**
56
+ * number of items to return for a given page (default 30, max 100)
57
+ */
58
+ perPage?: number,
59
+ /**
60
+ * filter on created before (exclusive) timestamp
61
+ */
62
+ before?: string,
63
+ /**
64
+ * filter on created after (exclusive) timestamp
65
+ */
66
+ after?: string,
67
+ /**
68
+ * filter on exact username of user
69
+ */
70
+ username?: string,
71
+ /**
72
+ * filter on exact or prefix name of operation
73
+ */
74
+ operation?: string,
75
+ /**
76
+ * filter on exact or prefix name of resource
77
+ */
78
+ resource?: string,
79
+ /**
80
+ * filter on type of operation
81
+ */
82
+ actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute',
83
+ }): CancelablePromise<Array<AuditLog>> {
84
+ return __request(OpenAPI, {
85
+ method: 'GET',
86
+ url: '/w/{workspace}/audit/list',
87
+ path: {
88
+ 'workspace': workspace,
89
+ },
90
+ query: {
91
+ 'page': page,
92
+ 'per_page': perPage,
93
+ 'before': before,
94
+ 'after': after,
95
+ 'username': username,
96
+ 'operation': operation,
97
+ 'resource': resource,
98
+ 'action_kind': actionKind,
99
+ },
100
+ });
101
+ }
102
+
103
+ }
@@ -0,0 +1,79 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ import { OpenAPI } from '../core/OpenAPI';
6
+ import { request as __request } from '../core/request';
7
+
8
+ export class CaptureService {
9
+
10
+ /**
11
+ * update flow preview capture
12
+ * @returns void
13
+ * @throws ApiError
14
+ */
15
+ public static updateCapture({
16
+ workspace,
17
+ path,
18
+ }: {
19
+ workspace: string,
20
+ path: string,
21
+ }): CancelablePromise<void> {
22
+ return __request(OpenAPI, {
23
+ method: 'POST',
24
+ url: '/w/{workspace}/capture_u/{path}',
25
+ path: {
26
+ 'workspace': workspace,
27
+ 'path': path,
28
+ },
29
+ });
30
+ }
31
+
32
+ /**
33
+ * create flow preview capture
34
+ * @returns any flow preview capture created
35
+ * @throws ApiError
36
+ */
37
+ public static createCapture({
38
+ workspace,
39
+ path,
40
+ }: {
41
+ workspace: string,
42
+ path: string,
43
+ }): CancelablePromise<any> {
44
+ return __request(OpenAPI, {
45
+ method: 'PUT',
46
+ url: '/w/{workspace}/capture/{path}',
47
+ path: {
48
+ 'workspace': workspace,
49
+ 'path': path,
50
+ },
51
+ });
52
+ }
53
+
54
+ /**
55
+ * get flow preview capture
56
+ * @returns any captured flow preview
57
+ * @throws ApiError
58
+ */
59
+ public static getCapture({
60
+ workspace,
61
+ path,
62
+ }: {
63
+ workspace: string,
64
+ path: string,
65
+ }): CancelablePromise<any> {
66
+ return __request(OpenAPI, {
67
+ method: 'GET',
68
+ url: '/w/{workspace}/capture/{path}',
69
+ path: {
70
+ 'workspace': workspace,
71
+ 'path': path,
72
+ },
73
+ errors: {
74
+ 404: `capture does not exist for this flow`,
75
+ },
76
+ });
77
+ }
78
+
79
+ }
@@ -0,0 +1,37 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ import { OpenAPI } from '../core/OpenAPI';
6
+ import { request as __request } from '../core/request';
7
+
8
+ export class DraftService {
9
+
10
+ /**
11
+ * create draft
12
+ * @returns string draft created
13
+ * @throws ApiError
14
+ */
15
+ public static createDraft({
16
+ workspace,
17
+ requestBody,
18
+ }: {
19
+ workspace: string,
20
+ requestBody: {
21
+ path: string;
22
+ typ: 'flow' | 'script' | 'app';
23
+ value?: any;
24
+ },
25
+ }): CancelablePromise<string> {
26
+ return __request(OpenAPI, {
27
+ method: 'POST',
28
+ url: '/w/{workspace}/drafts/create',
29
+ path: {
30
+ 'workspace': workspace,
31
+ },
32
+ body: requestBody,
33
+ mediaType: 'application/json',
34
+ });
35
+ }
36
+
37
+ }