windmill-components 1.13.1 → 1.13.4
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/{lib/common.d.ts → common.d.ts} +0 -0
- package/components/ArgInfo.svelte +1 -1
- package/{lib/components → components}/ArgInfo.svelte.d.ts +0 -0
- package/{lib/components → components}/ArgInput.svelte.d.ts +0 -0
- package/{lib/components → components}/AutosizedTextarea.svelte.d.ts +0 -0
- package/{lib/components → components}/Badge.svelte.d.ts +0 -0
- package/{lib/components → components}/Button.svelte.d.ts +0 -0
- package/{lib/components → components}/ButtonAndDropdown.svelte.d.ts +1 -1
- package/{lib/components → components}/CenteredPage.svelte.d.ts +0 -0
- package/{lib/components → components}/ChevronButton.svelte.d.ts +0 -0
- package/{lib/components → components}/DisplayResult.svelte.d.ts +0 -0
- package/{lib/components → components}/Dropdown.svelte.d.ts +1 -1
- package/components/Editor.svelte +4 -1
- package/{lib/components → components}/Editor.svelte.d.ts +2 -0
- package/{lib/components → components}/FieldHeader.svelte.d.ts +0 -0
- package/components/FlowBuilder.svelte +1 -1
- package/{lib/components → components}/FlowBuilder.svelte.d.ts +1 -1
- package/components/FlowEditor.svelte +1 -1
- package/{lib/components → components}/FlowEditor.svelte.d.ts +1 -1
- package/components/FlowPreview.svelte +1 -1
- package/{lib/components → components}/FlowPreview.svelte.d.ts +2 -2
- package/components/FlowStatusViewer.svelte +1 -1
- package/{lib/components → components}/FlowStatusViewer.svelte.d.ts +1 -1
- package/components/GroupModal.svelte +1 -1
- package/{lib/components → components}/GroupModal.svelte.d.ts +0 -0
- package/{lib/components → components}/IconedResourceType.svelte.d.ts +0 -0
- package/components/InviteGlobalUser.svelte +1 -1
- package/{lib/components → components}/InviteGlobalUser.svelte.d.ts +0 -0
- package/components/InviteUser.svelte +1 -1
- package/{lib/components → components}/InviteUser.svelte.d.ts +0 -0
- package/{lib/components → components}/ItemPicker.svelte.d.ts +0 -0
- package/{lib/components → components}/JobStatus.svelte.d.ts +1 -1
- package/{lib/components → components}/Modal.svelte.d.ts +0 -0
- package/{lib/components → components}/ModuleStep.svelte.d.ts +2 -2
- package/{lib/components → components}/Multiselect.svelte.d.ts +0 -0
- package/components/ObjectResourceInput.svelte +1 -1
- package/{lib/components → components}/ObjectResourceInput.svelte.d.ts +0 -0
- package/{lib/components → components}/ObjectTypeNarrowing.svelte.d.ts +0 -0
- package/{lib/components → components}/PageHeader.svelte.d.ts +0 -0
- package/{lib/components → components}/Password.svelte.d.ts +0 -0
- package/components/Path.svelte +1 -1
- package/{lib/components → components}/Path.svelte.d.ts +1 -1
- package/{lib/components → components}/RadioButton.svelte.d.ts +0 -0
- package/{lib/components → components}/Required.svelte.d.ts +0 -0
- package/components/ResourceEditor.svelte +1 -1
- package/{lib/components → components}/ResourceEditor.svelte.d.ts +0 -0
- package/components/ResourcePicker.svelte +1 -1
- package/{lib/components → components}/ResourcePicker.svelte.d.ts +0 -0
- package/components/ResourceTypePicker.svelte +1 -1
- package/{lib/components → components}/ResourceTypePicker.svelte.d.ts +0 -0
- package/{lib/components → components}/RunForm.svelte.d.ts +1 -1
- package/components/SchemaEditor.svelte +75 -70
- package/{lib/components → components}/SchemaEditor.svelte.d.ts +1 -4
- package/{lib/components → components}/SchemaForm.svelte.d.ts +1 -1
- package/{lib/components → components}/SchemaModal.svelte.d.ts +1 -1
- package/{lib/components → components}/SchemaViewer.svelte.d.ts +1 -1
- package/components/ScriptBuilder.svelte +1 -1
- package/{lib/components → components}/ScriptBuilder.svelte.d.ts +1 -1
- package/components/ScriptEditor.svelte +1 -1
- package/{lib/components → components}/ScriptEditor.svelte.d.ts +2 -2
- package/components/ScriptPicker.svelte +1 -1
- package/{lib/components → components}/ScriptPicker.svelte.d.ts +0 -0
- package/{lib/components → components}/ScriptSchema.svelte.d.ts +1 -1
- package/components/ShareModal.svelte +2 -2
- package/{lib/components → components}/ShareModal.svelte.d.ts +0 -0
- package/{lib/components → components}/SharedBadge.svelte.d.ts +0 -0
- package/{lib/components → components}/StringTypeNarrowing.svelte.d.ts +0 -0
- package/{lib/components → components}/Switch.svelte.d.ts +0 -0
- package/{lib/components → components}/TableCustom.svelte.d.ts +0 -0
- package/{lib/components → components}/TableSimple.svelte.d.ts +0 -0
- package/{lib/components → components}/Tabs.svelte.d.ts +0 -0
- package/{lib/components → components}/Tooltip.svelte.d.ts +0 -0
- package/components/VariableEditor.svelte +1 -1
- package/{lib/components → components}/VariableEditor.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/DbIcon.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Mail.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Mysql.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/PostgresIcon.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Slack.svelte.d.ts +0 -0
- package/gen/core/ApiError.js +10 -0
- package/gen/core/ApiRequestOptions.js +1 -0
- package/gen/core/ApiResult.js +1 -0
- package/gen/core/CancelablePromise.js +86 -0
- package/gen/core/OpenAPI.js +11 -0
- package/gen/core/request.js +261 -0
- package/gen/index.js +30 -0
- package/gen/models/AuditLog.js +29 -0
- package/gen/models/CompletedJob.js +19 -0
- package/gen/models/ContextualVariable.js +4 -0
- package/gen/models/CreateResource.js +4 -0
- package/gen/models/CreateVariable.js +4 -0
- package/gen/models/CreateWorkspace.js +4 -0
- package/gen/models/EditResource.js +4 -0
- package/gen/models/EditResourceType.js +4 -0
- package/gen/models/EditSchedule.js +4 -0
- package/gen/models/EditVariable.js +4 -0
- package/gen/models/EditWorkspaceUser.js +4 -0
- package/gen/models/Flow.js +4 -0
- package/gen/models/FlowModule.js +4 -0
- package/gen/models/FlowModuleValue.js +11 -0
- package/gen/models/FlowPreview.js +4 -0
- package/gen/models/FlowStatus.js +4 -0
- package/gen/models/FlowStatusModule.js +15 -0
- package/gen/models/FlowValue.js +4 -0
- package/gen/models/GlobalUserInfo.js +11 -0
- package/gen/models/Group.js +4 -0
- package/gen/models/InputTransform.js +11 -0
- package/gen/models/Job.js +11 -0
- package/gen/models/ListableVariable.js +4 -0
- package/gen/models/Login.js +4 -0
- package/gen/models/MainArgSignature.js +4 -0
- package/gen/models/NewSchedule.js +4 -0
- package/gen/models/NewToken.js +4 -0
- package/gen/models/NewUser.js +4 -0
- package/gen/models/Preview.js +11 -0
- package/gen/models/QueuedJob.js +19 -0
- package/gen/models/Resource.js +4 -0
- package/gen/models/ResourceType.js +4 -0
- package/gen/models/Schedule.js +4 -0
- package/gen/models/Script.js +11 -0
- package/gen/models/ScriptArgs.js +4 -0
- package/gen/models/TruncatedToken.js +4 -0
- package/gen/models/User.js +4 -0
- package/gen/models/UserWorkspaceList.js +4 -0
- package/gen/models/WorkerPing.js +4 -0
- package/gen/models/Workspace.js +4 -0
- package/gen/models/WorkspaceInvite.js +4 -0
- package/gen/services/AdminService.js +52 -0
- package/gen/services/AuditService.js +43 -0
- package/gen/services/FlowService.js +90 -0
- package/gen/services/GranularAclService.js +56 -0
- package/gen/services/GroupService.js +133 -0
- package/gen/services/JobService.js +260 -0
- package/gen/services/ResourceService.js +177 -0
- package/gen/services/ScheduleService.js +100 -0
- package/gen/services/ScriptService.js +188 -0
- package/gen/services/SettingsService.js +26 -0
- package/gen/services/UserService.js +302 -0
- package/gen/services/VariableService.js +98 -0
- package/gen/services/WorkerService.js +19 -0
- package/gen/services/WorkspaceService.js +185 -0
- package/{lib/infer.d.ts → infer.d.ts} +0 -0
- package/infer.js +1 -1
- package/package.json +63 -1
- package/{lib/stores.d.ts → stores.d.ts} +2 -1
- package/{lib/utils.d.ts → utils.d.ts} +1 -1
- package/utils.js +1 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
2
|
+
import { request as __request } from '../core/request';
|
|
3
|
+
export class ScriptService {
|
|
4
|
+
/**
|
|
5
|
+
* list all available hub scripts
|
|
6
|
+
* @returns any hub scripts list
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static listHubScripts() {
|
|
10
|
+
return __request(OpenAPI, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/scripts/hub/list',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* get hub script content by path
|
|
17
|
+
* @returns string script details
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
static getHubScriptContentByPath({ path, }) {
|
|
21
|
+
return __request(OpenAPI, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
url: '/scripts/hub/get/{path}',
|
|
24
|
+
path: {
|
|
25
|
+
'path': path,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* list all available scripts
|
|
31
|
+
* @returns Script All available scripts
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
static listScripts({ workspace, page, perPage, orderDesc, createdBy, pathStart, pathExact, firstParentHash, lastParentHash, parentHash, showArchived, isTemplate, }) {
|
|
35
|
+
return __request(OpenAPI, {
|
|
36
|
+
method: 'GET',
|
|
37
|
+
url: '/w/{workspace}/scripts/list',
|
|
38
|
+
path: {
|
|
39
|
+
'workspace': workspace,
|
|
40
|
+
},
|
|
41
|
+
query: {
|
|
42
|
+
'page': page,
|
|
43
|
+
'per_page': perPage,
|
|
44
|
+
'order_desc': orderDesc,
|
|
45
|
+
'created_by': createdBy,
|
|
46
|
+
'path_start': pathStart,
|
|
47
|
+
'path_exact': pathExact,
|
|
48
|
+
'first_parent_hash': firstParentHash,
|
|
49
|
+
'last_parent_hash': lastParentHash,
|
|
50
|
+
'parent_hash': parentHash,
|
|
51
|
+
'show_archived': showArchived,
|
|
52
|
+
'is_template': isTemplate,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* create script
|
|
58
|
+
* @returns string script created
|
|
59
|
+
* @throws ApiError
|
|
60
|
+
*/
|
|
61
|
+
static createScript({ workspace, requestBody, }) {
|
|
62
|
+
return __request(OpenAPI, {
|
|
63
|
+
method: 'POST',
|
|
64
|
+
url: '/w/{workspace}/scripts/create',
|
|
65
|
+
path: {
|
|
66
|
+
'workspace': workspace,
|
|
67
|
+
},
|
|
68
|
+
body: requestBody,
|
|
69
|
+
mediaType: 'application/json',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* inspect python code to infer jsonschema of arguments
|
|
74
|
+
* @returns MainArgSignature parsed args
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
static pythonToJsonschema({ requestBody, }) {
|
|
78
|
+
return __request(OpenAPI, {
|
|
79
|
+
method: 'POST',
|
|
80
|
+
url: '/scripts/python/tojsonschema',
|
|
81
|
+
body: requestBody,
|
|
82
|
+
mediaType: 'application/json',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* inspect deno code to infer jsonschema of arguments
|
|
87
|
+
* @returns MainArgSignature parsed args
|
|
88
|
+
* @throws ApiError
|
|
89
|
+
*/
|
|
90
|
+
static denoToJsonschema({ requestBody, }) {
|
|
91
|
+
return __request(OpenAPI, {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
url: '/scripts/deno/tojsonschema',
|
|
94
|
+
body: requestBody,
|
|
95
|
+
mediaType: 'application/json',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* archive script by path
|
|
100
|
+
* @returns string script archived
|
|
101
|
+
* @throws ApiError
|
|
102
|
+
*/
|
|
103
|
+
static archiveScriptByPath({ workspace, path, }) {
|
|
104
|
+
return __request(OpenAPI, {
|
|
105
|
+
method: 'POST',
|
|
106
|
+
url: '/w/{workspace}/scripts/archive/p/{path}',
|
|
107
|
+
path: {
|
|
108
|
+
'workspace': workspace,
|
|
109
|
+
'path': path,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* archive script by hash
|
|
115
|
+
* @returns Script script details
|
|
116
|
+
* @throws ApiError
|
|
117
|
+
*/
|
|
118
|
+
static archiveScriptByHash({ workspace, hash, }) {
|
|
119
|
+
return __request(OpenAPI, {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
url: '/w/{workspace}/scripts/archive/h/{hash}',
|
|
122
|
+
path: {
|
|
123
|
+
'workspace': workspace,
|
|
124
|
+
'hash': hash,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* delete script by hash (erase content but keep hash)
|
|
130
|
+
* @returns Script script details
|
|
131
|
+
* @throws ApiError
|
|
132
|
+
*/
|
|
133
|
+
static deleteScriptByHash({ workspace, hash, }) {
|
|
134
|
+
return __request(OpenAPI, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
url: '/w/{workspace}/scripts/delete/h/{hash}',
|
|
137
|
+
path: {
|
|
138
|
+
'workspace': workspace,
|
|
139
|
+
'hash': hash,
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* get script by path
|
|
145
|
+
* @returns Script script details
|
|
146
|
+
* @throws ApiError
|
|
147
|
+
*/
|
|
148
|
+
static getScriptByPath({ workspace, path, }) {
|
|
149
|
+
return __request(OpenAPI, {
|
|
150
|
+
method: 'GET',
|
|
151
|
+
url: '/w/{workspace}/scripts/get/p/{path}',
|
|
152
|
+
path: {
|
|
153
|
+
'workspace': workspace,
|
|
154
|
+
'path': path,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* get script by hash
|
|
160
|
+
* @returns Script script details
|
|
161
|
+
* @throws ApiError
|
|
162
|
+
*/
|
|
163
|
+
static getScriptByHash({ workspace, hash, }) {
|
|
164
|
+
return __request(OpenAPI, {
|
|
165
|
+
method: 'GET',
|
|
166
|
+
url: '/w/{workspace}/scripts/get/h/{hash}',
|
|
167
|
+
path: {
|
|
168
|
+
'workspace': workspace,
|
|
169
|
+
'hash': hash,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* get script deployment status
|
|
175
|
+
* @returns any script details
|
|
176
|
+
* @throws ApiError
|
|
177
|
+
*/
|
|
178
|
+
static getScriptDeploymentStatus({ workspace, hash, }) {
|
|
179
|
+
return __request(OpenAPI, {
|
|
180
|
+
method: 'GET',
|
|
181
|
+
url: '/w/{workspace}/scripts/deployment_status/h/{hash}',
|
|
182
|
+
path: {
|
|
183
|
+
'workspace': workspace,
|
|
184
|
+
'hash': hash,
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
2
|
+
import { request as __request } from '../core/request';
|
|
3
|
+
export class SettingsService {
|
|
4
|
+
/**
|
|
5
|
+
* get backend version
|
|
6
|
+
* @returns string git version of backend
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static backendVersion() {
|
|
10
|
+
return __request(OpenAPI, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/version',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* get openapi yaml spec
|
|
17
|
+
* @returns string openapi yaml file content
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
static getOpenApiYaml() {
|
|
21
|
+
return __request(OpenAPI, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
url: '/openapi.yaml',
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
2
|
+
import { request as __request } from '../core/request';
|
|
3
|
+
export class UserService {
|
|
4
|
+
/**
|
|
5
|
+
* login with password
|
|
6
|
+
* @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience.
|
|
7
|
+
*
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static login({ requestBody, }) {
|
|
11
|
+
return __request(OpenAPI, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
url: '/auth/login',
|
|
14
|
+
body: requestBody,
|
|
15
|
+
mediaType: 'application/json',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* create user (require admin privilege)
|
|
20
|
+
* @returns string user created
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
static createUser({ workspace, requestBody, }) {
|
|
24
|
+
return __request(OpenAPI, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
url: '/w/{workspace}/users/add',
|
|
27
|
+
path: {
|
|
28
|
+
'workspace': workspace,
|
|
29
|
+
},
|
|
30
|
+
body: requestBody,
|
|
31
|
+
mediaType: 'application/json',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* update user (require admin privilege)
|
|
36
|
+
* @returns string edited user
|
|
37
|
+
* @throws ApiError
|
|
38
|
+
*/
|
|
39
|
+
static updateUser({ workspace, username, requestBody, }) {
|
|
40
|
+
return __request(OpenAPI, {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
url: '/w/{workspace}/users/update/{username}',
|
|
43
|
+
path: {
|
|
44
|
+
'workspace': workspace,
|
|
45
|
+
'username': username,
|
|
46
|
+
},
|
|
47
|
+
body: requestBody,
|
|
48
|
+
mediaType: 'application/json',
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* set password
|
|
53
|
+
* @returns string password set
|
|
54
|
+
* @throws ApiError
|
|
55
|
+
*/
|
|
56
|
+
static setPassword({ requestBody, }) {
|
|
57
|
+
return __request(OpenAPI, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
url: '/users/setpassword',
|
|
60
|
+
body: requestBody,
|
|
61
|
+
mediaType: 'application/json',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* create user
|
|
66
|
+
* @returns string user created
|
|
67
|
+
* @throws ApiError
|
|
68
|
+
*/
|
|
69
|
+
static createUserGlobally({ requestBody, }) {
|
|
70
|
+
return __request(OpenAPI, {
|
|
71
|
+
method: 'POST',
|
|
72
|
+
url: '/users/create',
|
|
73
|
+
body: requestBody,
|
|
74
|
+
mediaType: 'application/json',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* global update user (require super admin)
|
|
79
|
+
* @returns string user updated
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
82
|
+
static globalUserUpdate({ email, requestBody, }) {
|
|
83
|
+
return __request(OpenAPI, {
|
|
84
|
+
method: 'POST',
|
|
85
|
+
url: '/users/update/{email}',
|
|
86
|
+
path: {
|
|
87
|
+
'email': email,
|
|
88
|
+
},
|
|
89
|
+
body: requestBody,
|
|
90
|
+
mediaType: 'application/json',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* delete user (require admin privilege)
|
|
95
|
+
* @returns string delete user
|
|
96
|
+
* @throws ApiError
|
|
97
|
+
*/
|
|
98
|
+
static deleteUser({ workspace, username, }) {
|
|
99
|
+
return __request(OpenAPI, {
|
|
100
|
+
method: 'DELETE',
|
|
101
|
+
url: '/w/{workspace}/users/delete/{username}',
|
|
102
|
+
path: {
|
|
103
|
+
'workspace': workspace,
|
|
104
|
+
'username': username,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* logout
|
|
110
|
+
* @returns string logout
|
|
111
|
+
* @throws ApiError
|
|
112
|
+
*/
|
|
113
|
+
static logout() {
|
|
114
|
+
return __request(OpenAPI, {
|
|
115
|
+
method: 'POST',
|
|
116
|
+
url: '/users/logout',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* get current user email (if logged in)
|
|
121
|
+
* @returns string user email
|
|
122
|
+
* @throws ApiError
|
|
123
|
+
*/
|
|
124
|
+
static getCurrentEmail() {
|
|
125
|
+
return __request(OpenAPI, {
|
|
126
|
+
method: 'GET',
|
|
127
|
+
url: '/users/email',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* get current global whoami (if logged in)
|
|
132
|
+
* @returns GlobalUserInfo user email
|
|
133
|
+
* @throws ApiError
|
|
134
|
+
*/
|
|
135
|
+
static globalWhoami() {
|
|
136
|
+
return __request(OpenAPI, {
|
|
137
|
+
method: 'GET',
|
|
138
|
+
url: '/users/whoami',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* list all workspace invites
|
|
143
|
+
* @returns WorkspaceInvite list all workspace invites
|
|
144
|
+
* @throws ApiError
|
|
145
|
+
*/
|
|
146
|
+
static listWorkspaceInvites() {
|
|
147
|
+
return __request(OpenAPI, {
|
|
148
|
+
method: 'GET',
|
|
149
|
+
url: '/users/list_invites',
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* whoami
|
|
154
|
+
* @returns User user
|
|
155
|
+
* @throws ApiError
|
|
156
|
+
*/
|
|
157
|
+
static whoami({ workspace, }) {
|
|
158
|
+
return __request(OpenAPI, {
|
|
159
|
+
method: 'GET',
|
|
160
|
+
url: '/w/{workspace}/users/whoami',
|
|
161
|
+
path: {
|
|
162
|
+
'workspace': workspace,
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* leave workspace
|
|
168
|
+
* @returns string status
|
|
169
|
+
* @throws ApiError
|
|
170
|
+
*/
|
|
171
|
+
static leaveWorkspace({ workspace, }) {
|
|
172
|
+
return __request(OpenAPI, {
|
|
173
|
+
method: 'POST',
|
|
174
|
+
url: '/w/{workspace}/users/leave_workspace',
|
|
175
|
+
path: {
|
|
176
|
+
'workspace': workspace,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* accept invite to workspace
|
|
182
|
+
* @returns string status
|
|
183
|
+
* @throws ApiError
|
|
184
|
+
*/
|
|
185
|
+
static acceptInvite({ requestBody, }) {
|
|
186
|
+
return __request(OpenAPI, {
|
|
187
|
+
method: 'POST',
|
|
188
|
+
url: '/users/accept_invite',
|
|
189
|
+
body: requestBody,
|
|
190
|
+
mediaType: 'application/json',
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* decline invite to workspace
|
|
195
|
+
* @returns string status
|
|
196
|
+
* @throws ApiError
|
|
197
|
+
*/
|
|
198
|
+
static declineInvite({ requestBody, }) {
|
|
199
|
+
return __request(OpenAPI, {
|
|
200
|
+
method: 'POST',
|
|
201
|
+
url: '/users/decline_invite',
|
|
202
|
+
body: requestBody,
|
|
203
|
+
mediaType: 'application/json',
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* whois
|
|
208
|
+
* @returns User user
|
|
209
|
+
* @throws ApiError
|
|
210
|
+
*/
|
|
211
|
+
static whois({ workspace, username, }) {
|
|
212
|
+
return __request(OpenAPI, {
|
|
213
|
+
method: 'GET',
|
|
214
|
+
url: '/w/{workspace}/users/whois/{username}',
|
|
215
|
+
path: {
|
|
216
|
+
'workspace': workspace,
|
|
217
|
+
'username': username,
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* list all users as super admin (require to be super amdin)
|
|
223
|
+
* @returns GlobalUserInfo user
|
|
224
|
+
* @throws ApiError
|
|
225
|
+
*/
|
|
226
|
+
static listUsersAsSuperAdmin({ page, perPage, }) {
|
|
227
|
+
return __request(OpenAPI, {
|
|
228
|
+
method: 'GET',
|
|
229
|
+
url: '/users/list_as_super_admin',
|
|
230
|
+
query: {
|
|
231
|
+
'page': page,
|
|
232
|
+
'per_page': perPage,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* list users
|
|
238
|
+
* @returns User user
|
|
239
|
+
* @throws ApiError
|
|
240
|
+
*/
|
|
241
|
+
static listUsers({ workspace, }) {
|
|
242
|
+
return __request(OpenAPI, {
|
|
243
|
+
method: 'GET',
|
|
244
|
+
url: '/w/{workspace}/users/list',
|
|
245
|
+
path: {
|
|
246
|
+
'workspace': workspace,
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* list usernames
|
|
252
|
+
* @returns string user
|
|
253
|
+
* @throws ApiError
|
|
254
|
+
*/
|
|
255
|
+
static listUsernames({ workspace, }) {
|
|
256
|
+
return __request(OpenAPI, {
|
|
257
|
+
method: 'GET',
|
|
258
|
+
url: '/w/{workspace}/users/list_usernames',
|
|
259
|
+
path: {
|
|
260
|
+
'workspace': workspace,
|
|
261
|
+
},
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* create token
|
|
266
|
+
* @returns string token created
|
|
267
|
+
* @throws ApiError
|
|
268
|
+
*/
|
|
269
|
+
static createToken({ requestBody, }) {
|
|
270
|
+
return __request(OpenAPI, {
|
|
271
|
+
method: 'POST',
|
|
272
|
+
url: '/users/tokens/create',
|
|
273
|
+
body: requestBody,
|
|
274
|
+
mediaType: 'application/json',
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* delete token
|
|
279
|
+
* @returns string delete token
|
|
280
|
+
* @throws ApiError
|
|
281
|
+
*/
|
|
282
|
+
static deleteToken({ tokenPrefix, }) {
|
|
283
|
+
return __request(OpenAPI, {
|
|
284
|
+
method: 'DELETE',
|
|
285
|
+
url: '/users/tokens/delete/{token_prefix}',
|
|
286
|
+
path: {
|
|
287
|
+
'token_prefix': tokenPrefix,
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* list token
|
|
293
|
+
* @returns TruncatedToken truncated token
|
|
294
|
+
* @throws ApiError
|
|
295
|
+
*/
|
|
296
|
+
static listTokens() {
|
|
297
|
+
return __request(OpenAPI, {
|
|
298
|
+
method: 'GET',
|
|
299
|
+
url: '/users/tokens/list',
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
2
|
+
import { request as __request } from '../core/request';
|
|
3
|
+
export class VariableService {
|
|
4
|
+
/**
|
|
5
|
+
* create variable
|
|
6
|
+
* @returns string variable created
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static createVariable({ workspace, requestBody, }) {
|
|
10
|
+
return __request(OpenAPI, {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
url: '/w/{workspace}/variables/create',
|
|
13
|
+
path: {
|
|
14
|
+
'workspace': workspace,
|
|
15
|
+
},
|
|
16
|
+
body: requestBody,
|
|
17
|
+
mediaType: 'application/json',
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* delete variable
|
|
22
|
+
* @returns string variable deleted
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
static deleteVariable({ workspace, path, }) {
|
|
26
|
+
return __request(OpenAPI, {
|
|
27
|
+
method: 'DELETE',
|
|
28
|
+
url: '/w/{workspace}/variables/delete/{path}',
|
|
29
|
+
path: {
|
|
30
|
+
'workspace': workspace,
|
|
31
|
+
'path': path,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* update variable
|
|
37
|
+
* @returns string variable updated
|
|
38
|
+
* @throws ApiError
|
|
39
|
+
*/
|
|
40
|
+
static updateVariable({ workspace, path, requestBody, }) {
|
|
41
|
+
return __request(OpenAPI, {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
url: '/w/{workspace}/variables/update/{path}',
|
|
44
|
+
path: {
|
|
45
|
+
'workspace': workspace,
|
|
46
|
+
'path': path,
|
|
47
|
+
},
|
|
48
|
+
body: requestBody,
|
|
49
|
+
mediaType: 'application/json',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* get variable
|
|
54
|
+
* @returns ListableVariable variable
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
static getVariable({ workspace, path, decryptSecret, }) {
|
|
58
|
+
return __request(OpenAPI, {
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: '/w/{workspace}/variables/get/{path}',
|
|
61
|
+
path: {
|
|
62
|
+
'workspace': workspace,
|
|
63
|
+
'path': path,
|
|
64
|
+
},
|
|
65
|
+
query: {
|
|
66
|
+
'decrypt_secret': decryptSecret,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* list variables
|
|
72
|
+
* @returns ListableVariable variable list
|
|
73
|
+
* @throws ApiError
|
|
74
|
+
*/
|
|
75
|
+
static listVariable({ workspace, }) {
|
|
76
|
+
return __request(OpenAPI, {
|
|
77
|
+
method: 'GET',
|
|
78
|
+
url: '/w/{workspace}/variables/list',
|
|
79
|
+
path: {
|
|
80
|
+
'workspace': workspace,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* list contextual variables
|
|
86
|
+
* @returns ContextualVariable contextual variable list
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
static listContextualVariables({ workspace, }) {
|
|
90
|
+
return __request(OpenAPI, {
|
|
91
|
+
method: 'GET',
|
|
92
|
+
url: '/w/{workspace}/variables/list_contextual',
|
|
93
|
+
path: {
|
|
94
|
+
'workspace': workspace,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
2
|
+
import { request as __request } from '../core/request';
|
|
3
|
+
export class WorkerService {
|
|
4
|
+
/**
|
|
5
|
+
* list workers
|
|
6
|
+
* @returns WorkerPing a list of workers
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static listWorkers({ page, perPage, }) {
|
|
10
|
+
return __request(OpenAPI, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/workers/list',
|
|
13
|
+
query: {
|
|
14
|
+
'page': page,
|
|
15
|
+
'per_page': perPage,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|