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.
- package/build.sh +7 -0
- package/package.json +7 -0
- package/src/core/ApiError.ts +24 -0
- package/src/core/ApiRequestOptions.ts +16 -0
- package/src/core/ApiResult.ts +10 -0
- package/src/core/CancelablePromise.ts +128 -0
- package/src/core/OpenAPI.ts +31 -0
- package/src/core/request.ts +308 -0
- package/src/index.ts +100 -0
- package/src/models/AppWithLastVersion.ts +31 -0
- package/src/models/AppWithLastVersionWDraft.ts +11 -0
- package/src/models/AuditLog.ts +42 -0
- package/src/models/BranchAll.ts +16 -0
- package/src/models/BranchOne.ts +16 -0
- package/src/models/CompletedJob.ts +68 -0
- package/src/models/ContextualVariable.ts +10 -0
- package/src/models/CreateInput.ts +9 -0
- package/src/models/CreateResource.ts +11 -0
- package/src/models/CreateVariable.ts +13 -0
- package/src/models/CreateWorkspace.ts +10 -0
- package/src/models/EditResource.ts +10 -0
- package/src/models/EditResourceType.ts +9 -0
- package/src/models/EditSchedule.ts +12 -0
- package/src/models/EditVariable.ts +11 -0
- package/src/models/EditWorkspaceUser.ts +10 -0
- package/src/models/Flow.ts +9 -0
- package/src/models/FlowMetadata.ts +16 -0
- package/src/models/FlowModule.ts +24 -0
- package/src/models/FlowModuleValue.ts +14 -0
- package/src/models/FlowPreview.ts +13 -0
- package/src/models/FlowStatus.ts +18 -0
- package/src/models/FlowStatusModule.ts +43 -0
- package/src/models/FlowValue.ts +12 -0
- package/src/models/Folder.ts +10 -0
- package/src/models/ForloopFlow.ts +15 -0
- package/src/models/GlobalUserInfo.ts +23 -0
- package/src/models/Group.ts +11 -0
- package/src/models/Identity.ts +9 -0
- package/src/models/Input.ts +13 -0
- package/src/models/InputTransform.ts +9 -0
- package/src/models/JavascriptTransform.ts +9 -0
- package/src/models/Job.ts +21 -0
- package/src/models/ListableApp.ts +27 -0
- package/src/models/ListableResource.ts +19 -0
- package/src/models/ListableVariable.ts +19 -0
- package/src/models/Login.ts +9 -0
- package/src/models/MainArgSignature.ts +42 -0
- package/src/models/NewSchedule.ts +16 -0
- package/src/models/NewScript.ts +39 -0
- package/src/models/NewScriptWithDraft.ts +11 -0
- package/src/models/NewToken.ts +9 -0
- package/src/models/NewTokenImpersonate.ts +10 -0
- package/src/models/NewUser.ts +10 -0
- package/src/models/OpenFlow.ts +13 -0
- package/src/models/OpenFlowWPath.ts +10 -0
- package/src/models/PathFlow.ts +12 -0
- package/src/models/PathScript.ts +13 -0
- package/src/models/Policy.ts +22 -0
- package/src/models/Preview.ts +26 -0
- package/src/models/QueuedJob.ts +66 -0
- package/src/models/RawScript.ts +28 -0
- package/src/models/Resource.ts +14 -0
- package/src/models/ResourceType.ts +11 -0
- package/src/models/Retry.ts +16 -0
- package/src/models/RunnableType.ts +9 -0
- package/src/models/Schedule.ts +21 -0
- package/src/models/Script.ts +53 -0
- package/src/models/ScriptArgs.ts +5 -0
- package/src/models/SlackToken.ts +13 -0
- package/src/models/StaticTransform.ts +9 -0
- package/src/models/TokenResponse.ts +11 -0
- package/src/models/TruncatedToken.ts +12 -0
- package/src/models/UpdateInput.ts +10 -0
- package/src/models/Usage.ts +8 -0
- package/src/models/User.ts +20 -0
- package/src/models/UserWorkspaceList.ts +13 -0
- package/src/models/WorkerPing.ts +13 -0
- package/src/models/Workspace.ts +11 -0
- package/src/models/WorkspaceInvite.ts +11 -0
- package/src/services/AdminService.ts +90 -0
- package/src/services/AppService.ts +383 -0
- package/src/services/AuditService.ts +103 -0
- package/src/services/CaptureService.ts +79 -0
- package/src/services/DraftService.ts +37 -0
- package/src/services/FavoriteService.ts +62 -0
- package/src/services/FlowService.ts +368 -0
- package/src/services/FolderService.ts +269 -0
- package/src/services/GranularAclService.ts +104 -0
- package/src/services/GroupService.ts +238 -0
- package/src/services/InputService.ts +175 -0
- package/src/services/JobService.ts +1247 -0
- package/src/services/OauthService.ts +197 -0
- package/src/services/ResourceService.ts +395 -0
- package/src/services/ScheduleService.ts +223 -0
- package/src/services/ScriptService.ts +601 -0
- package/src/services/SettingsService.ts +34 -0
- package/src/services/UserService.ts +574 -0
- package/src/services/VariableService.ts +194 -0
- package/src/services/WorkerService.ts +52 -0
- package/src/services/WorkspaceService.ts +446 -0
|
@@ -0,0 +1,62 @@
|
|
|
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 FavoriteService {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* star item
|
|
12
|
+
* @returns any star item
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
public static star({
|
|
16
|
+
workspace,
|
|
17
|
+
requestBody,
|
|
18
|
+
}: {
|
|
19
|
+
workspace: string,
|
|
20
|
+
requestBody?: {
|
|
21
|
+
path?: string;
|
|
22
|
+
favorite_kind?: 'flow' | 'app' | 'script';
|
|
23
|
+
},
|
|
24
|
+
}): CancelablePromise<any> {
|
|
25
|
+
return __request(OpenAPI, {
|
|
26
|
+
method: 'POST',
|
|
27
|
+
url: '/w/{workspace}/favorites/star',
|
|
28
|
+
path: {
|
|
29
|
+
'workspace': workspace,
|
|
30
|
+
},
|
|
31
|
+
body: requestBody,
|
|
32
|
+
mediaType: 'application/json',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* unstar item
|
|
38
|
+
* @returns any unstar item
|
|
39
|
+
* @throws ApiError
|
|
40
|
+
*/
|
|
41
|
+
public static unstar({
|
|
42
|
+
workspace,
|
|
43
|
+
requestBody,
|
|
44
|
+
}: {
|
|
45
|
+
workspace: string,
|
|
46
|
+
requestBody?: {
|
|
47
|
+
path?: string;
|
|
48
|
+
favorite_kind?: 'flow' | 'app' | 'script';
|
|
49
|
+
},
|
|
50
|
+
}): CancelablePromise<any> {
|
|
51
|
+
return __request(OpenAPI, {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
url: '/w/{workspace}/favorites/unstar',
|
|
54
|
+
path: {
|
|
55
|
+
'workspace': workspace,
|
|
56
|
+
},
|
|
57
|
+
body: requestBody,
|
|
58
|
+
mediaType: 'application/json',
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type { Flow } from '../models/Flow';
|
|
5
|
+
import type { Input } from '../models/Input';
|
|
6
|
+
import type { OpenFlow } from '../models/OpenFlow';
|
|
7
|
+
import type { OpenFlowWPath } from '../models/OpenFlowWPath';
|
|
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 FlowService {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* list all available hub flows
|
|
17
|
+
* @returns any hub flows list
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
public static listHubFlows(): CancelablePromise<{
|
|
21
|
+
flows?: Array<{
|
|
22
|
+
id: number;
|
|
23
|
+
flow_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: '/flows/hub/list',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* get hub flow by id
|
|
38
|
+
* @returns any flow
|
|
39
|
+
* @throws ApiError
|
|
40
|
+
*/
|
|
41
|
+
public static getHubFlowById({
|
|
42
|
+
id,
|
|
43
|
+
}: {
|
|
44
|
+
id: number,
|
|
45
|
+
}): CancelablePromise<{
|
|
46
|
+
flow?: OpenFlow;
|
|
47
|
+
}> {
|
|
48
|
+
return __request(OpenAPI, {
|
|
49
|
+
method: 'GET',
|
|
50
|
+
url: '/flows/hub/get/{id}',
|
|
51
|
+
path: {
|
|
52
|
+
'id': id,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* list all available flow paths
|
|
59
|
+
* @returns string list of flow paths
|
|
60
|
+
* @throws ApiError
|
|
61
|
+
*/
|
|
62
|
+
public static listFlowPaths({
|
|
63
|
+
workspace,
|
|
64
|
+
}: {
|
|
65
|
+
workspace: string,
|
|
66
|
+
}): CancelablePromise<Array<string>> {
|
|
67
|
+
return __request(OpenAPI, {
|
|
68
|
+
method: 'GET',
|
|
69
|
+
url: '/w/{workspace}/flows/list_paths',
|
|
70
|
+
path: {
|
|
71
|
+
'workspace': workspace,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* list all available flows
|
|
78
|
+
* @returns any All available flow
|
|
79
|
+
* @throws ApiError
|
|
80
|
+
*/
|
|
81
|
+
public static listFlows({
|
|
82
|
+
workspace,
|
|
83
|
+
page,
|
|
84
|
+
perPage,
|
|
85
|
+
orderDesc,
|
|
86
|
+
createdBy,
|
|
87
|
+
pathStart,
|
|
88
|
+
pathExact,
|
|
89
|
+
showArchived,
|
|
90
|
+
starredOnly,
|
|
91
|
+
}: {
|
|
92
|
+
workspace: string,
|
|
93
|
+
/**
|
|
94
|
+
* which page to return (start at 1, default 1)
|
|
95
|
+
*/
|
|
96
|
+
page?: number,
|
|
97
|
+
/**
|
|
98
|
+
* number of items to return for a given page (default 30, max 100)
|
|
99
|
+
*/
|
|
100
|
+
perPage?: number,
|
|
101
|
+
/**
|
|
102
|
+
* order by desc order (default true)
|
|
103
|
+
*/
|
|
104
|
+
orderDesc?: boolean,
|
|
105
|
+
/**
|
|
106
|
+
* mask to filter exact matching user creator
|
|
107
|
+
*/
|
|
108
|
+
createdBy?: string,
|
|
109
|
+
/**
|
|
110
|
+
* mask to filter matching starting path
|
|
111
|
+
*/
|
|
112
|
+
pathStart?: string,
|
|
113
|
+
/**
|
|
114
|
+
* mask to filter exact matching path
|
|
115
|
+
*/
|
|
116
|
+
pathExact?: string,
|
|
117
|
+
/**
|
|
118
|
+
* (default false)
|
|
119
|
+
* show also the archived files.
|
|
120
|
+
* when multiple archived hash share the same path, only the ones with the latest create_at
|
|
121
|
+
* are displayed.
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
showArchived?: boolean,
|
|
125
|
+
/**
|
|
126
|
+
* (default false)
|
|
127
|
+
* show only the starred items
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
starredOnly?: boolean,
|
|
131
|
+
}): CancelablePromise<Array<(Flow & {
|
|
132
|
+
has_draft?: boolean;
|
|
133
|
+
draft_only?: boolean;
|
|
134
|
+
})>> {
|
|
135
|
+
return __request(OpenAPI, {
|
|
136
|
+
method: 'GET',
|
|
137
|
+
url: '/w/{workspace}/flows/list',
|
|
138
|
+
path: {
|
|
139
|
+
'workspace': workspace,
|
|
140
|
+
},
|
|
141
|
+
query: {
|
|
142
|
+
'page': page,
|
|
143
|
+
'per_page': perPage,
|
|
144
|
+
'order_desc': orderDesc,
|
|
145
|
+
'created_by': createdBy,
|
|
146
|
+
'path_start': pathStart,
|
|
147
|
+
'path_exact': pathExact,
|
|
148
|
+
'show_archived': showArchived,
|
|
149
|
+
'starred_only': starredOnly,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* get flow by path
|
|
156
|
+
* @returns Flow flow details
|
|
157
|
+
* @throws ApiError
|
|
158
|
+
*/
|
|
159
|
+
public static getFlowByPath({
|
|
160
|
+
workspace,
|
|
161
|
+
path,
|
|
162
|
+
}: {
|
|
163
|
+
workspace: string,
|
|
164
|
+
path: string,
|
|
165
|
+
}): CancelablePromise<Flow> {
|
|
166
|
+
return __request(OpenAPI, {
|
|
167
|
+
method: 'GET',
|
|
168
|
+
url: '/w/{workspace}/flows/get/{path}',
|
|
169
|
+
path: {
|
|
170
|
+
'workspace': workspace,
|
|
171
|
+
'path': path,
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* get flow by path with draft
|
|
178
|
+
* @returns any flow details with draft
|
|
179
|
+
* @throws ApiError
|
|
180
|
+
*/
|
|
181
|
+
public static getFlowByPathWithDraft({
|
|
182
|
+
workspace,
|
|
183
|
+
path,
|
|
184
|
+
}: {
|
|
185
|
+
workspace: string,
|
|
186
|
+
path: string,
|
|
187
|
+
}): CancelablePromise<(Flow & {
|
|
188
|
+
draft?: Flow;
|
|
189
|
+
})> {
|
|
190
|
+
return __request(OpenAPI, {
|
|
191
|
+
method: 'GET',
|
|
192
|
+
url: '/w/{workspace}/flows/get/draft/{path}',
|
|
193
|
+
path: {
|
|
194
|
+
'workspace': workspace,
|
|
195
|
+
'path': path,
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* exists flow by path
|
|
202
|
+
* @returns boolean flow details
|
|
203
|
+
* @throws ApiError
|
|
204
|
+
*/
|
|
205
|
+
public static existsFlowByPath({
|
|
206
|
+
workspace,
|
|
207
|
+
path,
|
|
208
|
+
}: {
|
|
209
|
+
workspace: string,
|
|
210
|
+
path: string,
|
|
211
|
+
}): CancelablePromise<boolean> {
|
|
212
|
+
return __request(OpenAPI, {
|
|
213
|
+
method: 'GET',
|
|
214
|
+
url: '/w/{workspace}/flows/exists/{path}',
|
|
215
|
+
path: {
|
|
216
|
+
'workspace': workspace,
|
|
217
|
+
'path': path,
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* create flow
|
|
224
|
+
* @returns string flow created
|
|
225
|
+
* @throws ApiError
|
|
226
|
+
*/
|
|
227
|
+
public static createFlow({
|
|
228
|
+
workspace,
|
|
229
|
+
requestBody,
|
|
230
|
+
}: {
|
|
231
|
+
workspace: string,
|
|
232
|
+
/**
|
|
233
|
+
* Partially filled flow
|
|
234
|
+
*/
|
|
235
|
+
requestBody: (OpenFlowWPath & {
|
|
236
|
+
draft_only?: boolean;
|
|
237
|
+
}),
|
|
238
|
+
}): CancelablePromise<string> {
|
|
239
|
+
return __request(OpenAPI, {
|
|
240
|
+
method: 'POST',
|
|
241
|
+
url: '/w/{workspace}/flows/create',
|
|
242
|
+
path: {
|
|
243
|
+
'workspace': workspace,
|
|
244
|
+
},
|
|
245
|
+
body: requestBody,
|
|
246
|
+
mediaType: 'application/json',
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* update flow
|
|
252
|
+
* @returns string flow updated
|
|
253
|
+
* @throws ApiError
|
|
254
|
+
*/
|
|
255
|
+
public static updateFlow({
|
|
256
|
+
workspace,
|
|
257
|
+
path,
|
|
258
|
+
requestBody,
|
|
259
|
+
}: {
|
|
260
|
+
workspace: string,
|
|
261
|
+
path: string,
|
|
262
|
+
/**
|
|
263
|
+
* Partially filled flow
|
|
264
|
+
*/
|
|
265
|
+
requestBody: OpenFlowWPath,
|
|
266
|
+
}): CancelablePromise<string> {
|
|
267
|
+
return __request(OpenAPI, {
|
|
268
|
+
method: 'POST',
|
|
269
|
+
url: '/w/{workspace}/flows/update/{path}',
|
|
270
|
+
path: {
|
|
271
|
+
'workspace': workspace,
|
|
272
|
+
'path': path,
|
|
273
|
+
},
|
|
274
|
+
body: requestBody,
|
|
275
|
+
mediaType: 'application/json',
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* archive flow by path
|
|
281
|
+
* @returns string flow archived
|
|
282
|
+
* @throws ApiError
|
|
283
|
+
*/
|
|
284
|
+
public static archiveFlowByPath({
|
|
285
|
+
workspace,
|
|
286
|
+
path,
|
|
287
|
+
requestBody,
|
|
288
|
+
}: {
|
|
289
|
+
workspace: string,
|
|
290
|
+
path: string,
|
|
291
|
+
/**
|
|
292
|
+
* archiveFlow
|
|
293
|
+
*/
|
|
294
|
+
requestBody: {
|
|
295
|
+
archived?: boolean;
|
|
296
|
+
},
|
|
297
|
+
}): CancelablePromise<string> {
|
|
298
|
+
return __request(OpenAPI, {
|
|
299
|
+
method: 'POST',
|
|
300
|
+
url: '/w/{workspace}/flows/archive/{path}',
|
|
301
|
+
path: {
|
|
302
|
+
'workspace': workspace,
|
|
303
|
+
'path': path,
|
|
304
|
+
},
|
|
305
|
+
body: requestBody,
|
|
306
|
+
mediaType: 'application/json',
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* delete flow by path
|
|
312
|
+
* @returns string flow delete
|
|
313
|
+
* @throws ApiError
|
|
314
|
+
*/
|
|
315
|
+
public static deleteFlowByPath({
|
|
316
|
+
workspace,
|
|
317
|
+
path,
|
|
318
|
+
}: {
|
|
319
|
+
workspace: string,
|
|
320
|
+
path: string,
|
|
321
|
+
}): CancelablePromise<string> {
|
|
322
|
+
return __request(OpenAPI, {
|
|
323
|
+
method: 'DELETE',
|
|
324
|
+
url: '/w/{workspace}/flows/delete/{path}',
|
|
325
|
+
path: {
|
|
326
|
+
'workspace': workspace,
|
|
327
|
+
'path': path,
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* list inputs for previous completed flow jobs
|
|
334
|
+
* @returns Input input history for completed jobs with this flow path
|
|
335
|
+
* @throws ApiError
|
|
336
|
+
*/
|
|
337
|
+
public static getFlowInputHistoryByPath({
|
|
338
|
+
workspace,
|
|
339
|
+
path,
|
|
340
|
+
page,
|
|
341
|
+
perPage,
|
|
342
|
+
}: {
|
|
343
|
+
workspace: string,
|
|
344
|
+
path: string,
|
|
345
|
+
/**
|
|
346
|
+
* which page to return (start at 1, default 1)
|
|
347
|
+
*/
|
|
348
|
+
page?: number,
|
|
349
|
+
/**
|
|
350
|
+
* number of items to return for a given page (default 30, max 100)
|
|
351
|
+
*/
|
|
352
|
+
perPage?: number,
|
|
353
|
+
}): CancelablePromise<Array<Input>> {
|
|
354
|
+
return __request(OpenAPI, {
|
|
355
|
+
method: 'GET',
|
|
356
|
+
url: '/w/{workspace}/flows/input_history/p/{path}',
|
|
357
|
+
path: {
|
|
358
|
+
'workspace': workspace,
|
|
359
|
+
'path': path,
|
|
360
|
+
},
|
|
361
|
+
query: {
|
|
362
|
+
'page': page,
|
|
363
|
+
'per_page': perPage,
|
|
364
|
+
},
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type { Folder } from '../models/Folder';
|
|
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 FolderService {
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* list folders
|
|
14
|
+
* @returns Folder folder list
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
public static listFolders({
|
|
18
|
+
workspace,
|
|
19
|
+
page,
|
|
20
|
+
perPage,
|
|
21
|
+
}: {
|
|
22
|
+
workspace: string,
|
|
23
|
+
/**
|
|
24
|
+
* which page to return (start at 1, default 1)
|
|
25
|
+
*/
|
|
26
|
+
page?: number,
|
|
27
|
+
/**
|
|
28
|
+
* number of items to return for a given page (default 30, max 100)
|
|
29
|
+
*/
|
|
30
|
+
perPage?: number,
|
|
31
|
+
}): CancelablePromise<Array<Folder>> {
|
|
32
|
+
return __request(OpenAPI, {
|
|
33
|
+
method: 'GET',
|
|
34
|
+
url: '/w/{workspace}/folders/list',
|
|
35
|
+
path: {
|
|
36
|
+
'workspace': workspace,
|
|
37
|
+
},
|
|
38
|
+
query: {
|
|
39
|
+
'page': page,
|
|
40
|
+
'per_page': perPage,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* list folder names
|
|
47
|
+
* @returns string folder list
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
public static listFolderNames({
|
|
51
|
+
workspace,
|
|
52
|
+
onlyMemberOf,
|
|
53
|
+
}: {
|
|
54
|
+
workspace: string,
|
|
55
|
+
/**
|
|
56
|
+
* only list the folders the user is member of (default false)
|
|
57
|
+
*/
|
|
58
|
+
onlyMemberOf?: boolean,
|
|
59
|
+
}): CancelablePromise<Array<string>> {
|
|
60
|
+
return __request(OpenAPI, {
|
|
61
|
+
method: 'GET',
|
|
62
|
+
url: '/w/{workspace}/folders/listnames',
|
|
63
|
+
path: {
|
|
64
|
+
'workspace': workspace,
|
|
65
|
+
},
|
|
66
|
+
query: {
|
|
67
|
+
'only_member_of': onlyMemberOf,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* create folder
|
|
74
|
+
* @returns string folder created
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
public static createFolder({
|
|
78
|
+
workspace,
|
|
79
|
+
requestBody,
|
|
80
|
+
}: {
|
|
81
|
+
workspace: string,
|
|
82
|
+
/**
|
|
83
|
+
* create folder
|
|
84
|
+
*/
|
|
85
|
+
requestBody: {
|
|
86
|
+
name: string;
|
|
87
|
+
owners?: Array<string>;
|
|
88
|
+
extra_perms?: any;
|
|
89
|
+
},
|
|
90
|
+
}): CancelablePromise<string> {
|
|
91
|
+
return __request(OpenAPI, {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
url: '/w/{workspace}/folders/create',
|
|
94
|
+
path: {
|
|
95
|
+
'workspace': workspace,
|
|
96
|
+
},
|
|
97
|
+
body: requestBody,
|
|
98
|
+
mediaType: 'application/json',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* update folder
|
|
104
|
+
* @returns string folder updated
|
|
105
|
+
* @throws ApiError
|
|
106
|
+
*/
|
|
107
|
+
public static updateFolder({
|
|
108
|
+
workspace,
|
|
109
|
+
name,
|
|
110
|
+
requestBody,
|
|
111
|
+
}: {
|
|
112
|
+
workspace: string,
|
|
113
|
+
name: string,
|
|
114
|
+
/**
|
|
115
|
+
* update folder
|
|
116
|
+
*/
|
|
117
|
+
requestBody: {
|
|
118
|
+
owners?: Array<string>;
|
|
119
|
+
extra_perms?: any;
|
|
120
|
+
},
|
|
121
|
+
}): CancelablePromise<string> {
|
|
122
|
+
return __request(OpenAPI, {
|
|
123
|
+
method: 'POST',
|
|
124
|
+
url: '/w/{workspace}/folders/update/{name}',
|
|
125
|
+
path: {
|
|
126
|
+
'workspace': workspace,
|
|
127
|
+
'name': name,
|
|
128
|
+
},
|
|
129
|
+
body: requestBody,
|
|
130
|
+
mediaType: 'application/json',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* delete folder
|
|
136
|
+
* @returns string folder deleted
|
|
137
|
+
* @throws ApiError
|
|
138
|
+
*/
|
|
139
|
+
public static deleteFolder({
|
|
140
|
+
workspace,
|
|
141
|
+
name,
|
|
142
|
+
}: {
|
|
143
|
+
workspace: string,
|
|
144
|
+
name: string,
|
|
145
|
+
}): CancelablePromise<string> {
|
|
146
|
+
return __request(OpenAPI, {
|
|
147
|
+
method: 'DELETE',
|
|
148
|
+
url: '/w/{workspace}/folders/delete/{name}',
|
|
149
|
+
path: {
|
|
150
|
+
'workspace': workspace,
|
|
151
|
+
'name': name,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* get folder
|
|
158
|
+
* @returns Folder folder
|
|
159
|
+
* @throws ApiError
|
|
160
|
+
*/
|
|
161
|
+
public static getFolder({
|
|
162
|
+
workspace,
|
|
163
|
+
name,
|
|
164
|
+
}: {
|
|
165
|
+
workspace: string,
|
|
166
|
+
name: string,
|
|
167
|
+
}): CancelablePromise<Folder> {
|
|
168
|
+
return __request(OpenAPI, {
|
|
169
|
+
method: 'GET',
|
|
170
|
+
url: '/w/{workspace}/folders/get/{name}',
|
|
171
|
+
path: {
|
|
172
|
+
'workspace': workspace,
|
|
173
|
+
'name': name,
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* get folder usage
|
|
180
|
+
* @returns any folder
|
|
181
|
+
* @throws ApiError
|
|
182
|
+
*/
|
|
183
|
+
public static getFolderUsage({
|
|
184
|
+
workspace,
|
|
185
|
+
name,
|
|
186
|
+
}: {
|
|
187
|
+
workspace: string,
|
|
188
|
+
name: string,
|
|
189
|
+
}): CancelablePromise<{
|
|
190
|
+
scripts: number;
|
|
191
|
+
flows: number;
|
|
192
|
+
apps: number;
|
|
193
|
+
resources: number;
|
|
194
|
+
variables: number;
|
|
195
|
+
schedules: number;
|
|
196
|
+
}> {
|
|
197
|
+
return __request(OpenAPI, {
|
|
198
|
+
method: 'GET',
|
|
199
|
+
url: '/w/{workspace}/folders/getusage/{name}',
|
|
200
|
+
path: {
|
|
201
|
+
'workspace': workspace,
|
|
202
|
+
'name': name,
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* add owner to folder
|
|
209
|
+
* @returns string owner added to folder
|
|
210
|
+
* @throws ApiError
|
|
211
|
+
*/
|
|
212
|
+
public static addOwnerToFolder({
|
|
213
|
+
workspace,
|
|
214
|
+
name,
|
|
215
|
+
requestBody,
|
|
216
|
+
}: {
|
|
217
|
+
workspace: string,
|
|
218
|
+
name: string,
|
|
219
|
+
/**
|
|
220
|
+
* owner user to folder
|
|
221
|
+
*/
|
|
222
|
+
requestBody: {
|
|
223
|
+
owner?: string;
|
|
224
|
+
},
|
|
225
|
+
}): CancelablePromise<string> {
|
|
226
|
+
return __request(OpenAPI, {
|
|
227
|
+
method: 'POST',
|
|
228
|
+
url: '/w/{workspace}/folders/addowner/{name}',
|
|
229
|
+
path: {
|
|
230
|
+
'workspace': workspace,
|
|
231
|
+
'name': name,
|
|
232
|
+
},
|
|
233
|
+
body: requestBody,
|
|
234
|
+
mediaType: 'application/json',
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* remove owner to folder
|
|
240
|
+
* @returns string owner removed from folder
|
|
241
|
+
* @throws ApiError
|
|
242
|
+
*/
|
|
243
|
+
public static removeOwnerToFolder({
|
|
244
|
+
workspace,
|
|
245
|
+
name,
|
|
246
|
+
requestBody,
|
|
247
|
+
}: {
|
|
248
|
+
workspace: string,
|
|
249
|
+
name: string,
|
|
250
|
+
/**
|
|
251
|
+
* added owner to folder
|
|
252
|
+
*/
|
|
253
|
+
requestBody: {
|
|
254
|
+
owner?: string;
|
|
255
|
+
},
|
|
256
|
+
}): CancelablePromise<string> {
|
|
257
|
+
return __request(OpenAPI, {
|
|
258
|
+
method: 'POST',
|
|
259
|
+
url: '/w/{workspace}/folders/removeowner/{name}',
|
|
260
|
+
path: {
|
|
261
|
+
'workspace': workspace,
|
|
262
|
+
'name': name,
|
|
263
|
+
},
|
|
264
|
+
body: requestBody,
|
|
265
|
+
mediaType: 'application/json',
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
}
|