@kora-platform/cli 0.7.0-rc1 → 0.8.0-rc10
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/README.md +21 -0
- package/dist/api-client.d.ts +274 -106
- package/dist/api-client.js +192 -167
- package/dist/api-types.d.ts +301 -163
- package/dist/artifact-api-client.d.ts +28 -1
- package/dist/artifact-api-client.js +33 -0
- package/dist/artifact-commands.d.ts +5 -0
- package/dist/artifact-commands.js +177 -4
- package/dist/audit-commands.d.ts +12 -0
- package/dist/audit-commands.js +74 -0
- package/dist/auth-commands.d.ts +1 -0
- package/dist/auth-commands.js +195 -32
- package/dist/cli-errors.d.ts +7 -1
- package/dist/cli-errors.js +12 -1
- package/dist/command-builders.d.ts +1 -0
- package/dist/command-builders.js +1 -0
- package/dist/command-flags.d.ts +1 -0
- package/dist/command-flags.js +7 -0
- package/dist/command-groups.js +10 -12
- package/dist/command-registry.js +595 -277
- package/dist/commands.js +728 -636
- package/dist/environment-context.d.ts +9 -0
- package/dist/environment-context.js +32 -0
- package/dist/error-code.d.ts +2 -0
- package/dist/error-code.js +9 -0
- package/dist/{integration-commands.d.ts → extension-commands.d.ts} +3 -2
- package/dist/extension-commands.js +446 -0
- package/dist/files.d.ts +44 -4
- package/dist/files.js +349 -26
- package/dist/format.d.ts +6 -0
- package/dist/format.js +83 -1
- package/dist/runner.js +28 -10
- package/dist/schema-registry-data.d.ts +318 -571
- package/dist/schema-registry-data.js +356 -698
- package/dist/session-store.js +80 -0
- package/dist/session.d.ts +1 -0
- package/dist/transport-refresh.d.ts +10 -0
- package/dist/transport-refresh.js +51 -0
- package/dist/transport.d.ts +31 -0
- package/dist/transport.js +102 -36
- package/dist/types.d.ts +2 -1
- package/dist/workspace-source.d.ts +1 -0
- package/dist/workspace-source.js +13 -0
- package/package.json +2 -1
- package/dist/dotenv.d.ts +0 -1
- package/dist/dotenv.js +0 -26
- package/dist/integration-api-client.d.ts +0 -29
- package/dist/integration-api-client.js +0 -50
- package/dist/integration-commands.js +0 -208
package/dist/api-client.js
CHANGED
|
@@ -5,9 +5,12 @@ export function createPlatformApiClient(input) {
|
|
|
5
5
|
const artifactApi = createArtifactApiClient(transport);
|
|
6
6
|
return {
|
|
7
7
|
...artifactApi,
|
|
8
|
+
claimDeviceLogin: transport.claimDeviceLogin,
|
|
8
9
|
getAuthSettings: transport.getAuthSettings,
|
|
9
10
|
login: transport.login,
|
|
10
11
|
refreshSession: transport.refreshSession,
|
|
12
|
+
signup: transport.signup,
|
|
13
|
+
startDeviceLogin: transport.startDeviceLogin,
|
|
11
14
|
async getMe(session) {
|
|
12
15
|
return transport.requestJson({
|
|
13
16
|
path: "/api/v1/auth/me",
|
|
@@ -65,19 +68,11 @@ export function createPlatformApiClient(input) {
|
|
|
65
68
|
session
|
|
66
69
|
});
|
|
67
70
|
},
|
|
68
|
-
async
|
|
71
|
+
async testWorkflowNode(session, orgId, workflowName, nodeId, inputData) {
|
|
69
72
|
return transport.requestJson({
|
|
70
73
|
body: inputData,
|
|
71
74
|
method: "POST",
|
|
72
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
73
|
-
session
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
async getProjectWorkspace(session, orgId, releaseId) {
|
|
77
|
-
return transport.requestJson({
|
|
78
|
-
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/project`, {
|
|
79
|
-
releaseId
|
|
80
|
-
}),
|
|
75
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/tests/workflow-nodes/${encodeURIComponent(workflowName)}/${encodeURIComponent(nodeId)}`,
|
|
81
76
|
session
|
|
82
77
|
});
|
|
83
78
|
},
|
|
@@ -88,242 +83,245 @@ export function createPlatformApiClient(input) {
|
|
|
88
83
|
session
|
|
89
84
|
});
|
|
90
85
|
},
|
|
91
|
-
async listRuntimeVariables(session, orgId) {
|
|
86
|
+
async listRuntimeVariables(session, orgId, inputData = {}) {
|
|
92
87
|
return transport.requestJson({
|
|
93
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables`,
|
|
88
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables`, inputData),
|
|
94
89
|
session
|
|
95
90
|
});
|
|
96
91
|
},
|
|
97
92
|
async replaceRuntimeVariables(session, orgId, inputData) {
|
|
93
|
+
const { environment, ...body } = inputData;
|
|
98
94
|
return transport.requestJson({
|
|
99
|
-
body
|
|
95
|
+
body,
|
|
100
96
|
method: "PUT",
|
|
101
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables`,
|
|
97
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables`, { environment }),
|
|
102
98
|
session
|
|
103
99
|
});
|
|
104
100
|
},
|
|
105
|
-
async
|
|
101
|
+
async upsertRuntimeVariable(session, orgId, inputData) {
|
|
102
|
+
const { environment, name, value } = inputData;
|
|
106
103
|
return transport.requestJson({
|
|
107
|
-
body:
|
|
108
|
-
method: "
|
|
109
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables
|
|
104
|
+
body: { value },
|
|
105
|
+
method: "PUT",
|
|
106
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/runtime-variables/${encodeURIComponent(name)}`, { environment }),
|
|
110
107
|
session
|
|
111
108
|
});
|
|
112
109
|
},
|
|
113
|
-
async listOrgSecrets(session, orgId) {
|
|
110
|
+
async listOrgSecrets(session, orgId, inputData = {}) {
|
|
114
111
|
return transport.requestJson({
|
|
115
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/secrets`,
|
|
112
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/secrets`, inputData),
|
|
116
113
|
session
|
|
117
114
|
});
|
|
118
115
|
},
|
|
119
116
|
async upsertOrgSecret(session, orgId, inputData) {
|
|
117
|
+
const { environment, ...body } = inputData;
|
|
120
118
|
return transport.requestJson({
|
|
121
|
-
body
|
|
119
|
+
body,
|
|
122
120
|
method: "PUT",
|
|
123
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/secrets`,
|
|
121
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/secrets`, { environment }),
|
|
124
122
|
session
|
|
125
123
|
});
|
|
126
124
|
},
|
|
127
|
-
async deleteOrgSecret(session, orgId, name) {
|
|
125
|
+
async deleteOrgSecret(session, orgId, name, inputData) {
|
|
128
126
|
return transport.requestJson({
|
|
129
127
|
method: "DELETE",
|
|
130
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/secrets/${encodeURIComponent(name)}`,
|
|
131
|
-
session
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
async listWorkflows(session, orgId, releaseId) {
|
|
135
|
-
return transport.requestJson({
|
|
136
|
-
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes`, {
|
|
137
|
-
releaseId
|
|
138
|
-
}),
|
|
128
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/secrets/${encodeURIComponent(name)}`, inputData),
|
|
139
129
|
session
|
|
140
130
|
});
|
|
141
131
|
},
|
|
142
|
-
async
|
|
132
|
+
async validateExtensionPackage(session, orgId, inputData) {
|
|
143
133
|
return transport.requestJson({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
async getWorkflowVersion(session, orgId, name, version, releaseId) {
|
|
149
|
-
return transport.requestJson({
|
|
150
|
-
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes/${encodeURIComponent(name)}/versions/${String(version)}`, { releaseId }),
|
|
134
|
+
body: inputData,
|
|
135
|
+
method: "POST",
|
|
136
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages/validate`,
|
|
151
137
|
session
|
|
152
138
|
});
|
|
153
139
|
},
|
|
154
|
-
async
|
|
140
|
+
async validateExtensionPackageArchive(session, orgId, archive, inputData = {}) {
|
|
155
141
|
return transport.requestJson({
|
|
156
|
-
|
|
142
|
+
headers: { "content-type": "application/zip" },
|
|
143
|
+
method: "POST",
|
|
144
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages/validate.zip`, inputData),
|
|
145
|
+
rawBody: archive,
|
|
157
146
|
session
|
|
158
147
|
});
|
|
159
148
|
},
|
|
160
|
-
async
|
|
149
|
+
async publishExtensionPackage(session, orgId, inputData) {
|
|
161
150
|
return transport.requestJson({
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
151
|
+
body: inputData,
|
|
152
|
+
method: "POST",
|
|
153
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages`,
|
|
165
154
|
session
|
|
166
155
|
});
|
|
167
156
|
},
|
|
168
|
-
async
|
|
157
|
+
async publishExtensionPackageArchive(session, orgId, archive, inputData = {}) {
|
|
169
158
|
return transport.requestJson({
|
|
170
|
-
|
|
159
|
+
headers: { "content-type": "application/zip" },
|
|
171
160
|
method: "POST",
|
|
172
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
161
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages.zip`, inputData),
|
|
162
|
+
rawBody: archive,
|
|
173
163
|
session
|
|
174
164
|
});
|
|
175
165
|
},
|
|
176
|
-
async
|
|
166
|
+
async exportExtensionPackage(session, orgId, inputData) {
|
|
177
167
|
return transport.requestJson({
|
|
178
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
168
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages/export`, inputData),
|
|
179
169
|
session
|
|
180
170
|
});
|
|
181
171
|
},
|
|
182
|
-
async
|
|
183
|
-
return transport.
|
|
184
|
-
|
|
172
|
+
async exportExtensionPackageArchive(session, orgId, inputData) {
|
|
173
|
+
return transport.requestBytes({
|
|
174
|
+
method: "GET",
|
|
175
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/packages/export.zip`, inputData),
|
|
185
176
|
session
|
|
186
177
|
});
|
|
187
178
|
},
|
|
188
|
-
async
|
|
179
|
+
async installExtension(session, orgId, inputData) {
|
|
180
|
+
const { environment, ...body } = inputData;
|
|
189
181
|
return transport.requestJson({
|
|
190
|
-
|
|
182
|
+
body,
|
|
183
|
+
method: "POST",
|
|
184
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/installs`, { environment }),
|
|
191
185
|
session
|
|
192
186
|
});
|
|
193
187
|
},
|
|
194
|
-
async
|
|
188
|
+
async listBuiltInExtensions(session, orgId, inputData = {}) {
|
|
195
189
|
return transport.requestJson({
|
|
196
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
190
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/built-ins`, inputData),
|
|
197
191
|
session
|
|
198
192
|
});
|
|
199
193
|
},
|
|
200
|
-
async
|
|
194
|
+
async installBuiltInExtension(session, orgId, builtInSlug, inputData) {
|
|
195
|
+
const { environment, ...body } = inputData;
|
|
201
196
|
return transport.requestJson({
|
|
202
|
-
|
|
197
|
+
body,
|
|
198
|
+
method: "POST",
|
|
199
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/built-ins/${encodeURIComponent(builtInSlug)}/install`, { environment }),
|
|
203
200
|
session
|
|
204
201
|
});
|
|
205
202
|
},
|
|
206
|
-
async
|
|
203
|
+
async listExtensionInstalls(session, orgId, inputData = {}) {
|
|
207
204
|
return transport.requestJson({
|
|
208
|
-
|
|
209
|
-
method: "POST",
|
|
210
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/mcp`,
|
|
205
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions`, inputData),
|
|
211
206
|
session
|
|
212
207
|
});
|
|
213
208
|
},
|
|
214
|
-
async
|
|
209
|
+
async getExtensionInstall(session, orgId, installRef, inputData) {
|
|
215
210
|
return transport.requestJson({
|
|
216
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
211
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}`, inputData),
|
|
217
212
|
session
|
|
218
213
|
});
|
|
219
214
|
},
|
|
220
|
-
async
|
|
215
|
+
async getExtensionInstallDetail(session, orgId, installRef, inputData) {
|
|
221
216
|
return transport.requestJson({
|
|
222
|
-
|
|
223
|
-
method: "PATCH",
|
|
224
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/mcp/${encodeURIComponent(serverRef)}`,
|
|
217
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}/detail`, inputData),
|
|
225
218
|
session
|
|
226
219
|
});
|
|
227
220
|
},
|
|
228
|
-
async
|
|
221
|
+
async grantExtensionPermissions(session, orgId, installRef, inputData) {
|
|
222
|
+
const { environment, ...body } = inputData;
|
|
229
223
|
return transport.requestJson({
|
|
230
|
-
|
|
231
|
-
|
|
224
|
+
body,
|
|
225
|
+
method: "PATCH",
|
|
226
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}/grants`, { environment }),
|
|
232
227
|
session
|
|
233
228
|
});
|
|
234
229
|
},
|
|
235
|
-
async
|
|
230
|
+
async planExtensionInstallUpdate(session, orgId, installRef, inputData) {
|
|
231
|
+
const { environment, ...body } = inputData;
|
|
236
232
|
return transport.requestJson({
|
|
233
|
+
body,
|
|
237
234
|
method: "POST",
|
|
238
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
235
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}/update-plan`, { environment }),
|
|
239
236
|
session
|
|
240
237
|
});
|
|
241
238
|
},
|
|
242
|
-
async
|
|
239
|
+
async updateExtensionInstall(session, orgId, installRef, inputData) {
|
|
240
|
+
const { environment, ...body } = inputData;
|
|
243
241
|
return transport.requestJson({
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
body,
|
|
243
|
+
method: "PATCH",
|
|
244
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}`, { environment }),
|
|
246
245
|
session
|
|
247
246
|
});
|
|
248
247
|
},
|
|
249
|
-
async
|
|
248
|
+
async disableExtensionInstall(session, orgId, installRef, inputData) {
|
|
250
249
|
return transport.requestJson({
|
|
251
250
|
method: "POST",
|
|
252
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
251
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}/disable`, inputData),
|
|
253
252
|
session
|
|
254
253
|
});
|
|
255
254
|
},
|
|
256
|
-
async
|
|
255
|
+
async enableExtensionInstall(session, orgId, installRef, inputData) {
|
|
257
256
|
return transport.requestJson({
|
|
258
257
|
method: "POST",
|
|
259
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
258
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}/enable`, inputData),
|
|
260
259
|
session
|
|
261
260
|
});
|
|
262
261
|
},
|
|
263
|
-
async
|
|
262
|
+
async deleteExtensionInstall(session, orgId, installRef, inputData) {
|
|
264
263
|
return transport.requestJson({
|
|
265
|
-
|
|
264
|
+
method: "DELETE",
|
|
265
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/extensions/${encodeURIComponent(installRef)}`, inputData),
|
|
266
266
|
session
|
|
267
267
|
});
|
|
268
268
|
},
|
|
269
|
-
async
|
|
269
|
+
async listWorkflows(session, orgId, inputData) {
|
|
270
270
|
return transport.requestJson({
|
|
271
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
271
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes`, {
|
|
272
|
+
environment: inputData.environment,
|
|
273
|
+
releaseId: inputData.releaseId
|
|
274
|
+
}),
|
|
272
275
|
session
|
|
273
276
|
});
|
|
274
277
|
},
|
|
275
|
-
async
|
|
278
|
+
async getWorkflow(session, orgId, name, selector) {
|
|
276
279
|
return transport.requestJson({
|
|
277
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
280
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes/${encodeURIComponent(name)}`, selector),
|
|
278
281
|
session
|
|
279
282
|
});
|
|
280
283
|
},
|
|
281
|
-
async
|
|
284
|
+
async getWorkflowVersion(session, orgId, name, version, selector) {
|
|
282
285
|
return transport.requestJson({
|
|
283
|
-
|
|
284
|
-
method: "POST",
|
|
285
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/skills`,
|
|
286
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes/${encodeURIComponent(name)}/versions/${String(version)}`, selector),
|
|
286
287
|
session
|
|
287
288
|
});
|
|
288
289
|
},
|
|
289
|
-
async
|
|
290
|
+
async getWorkflowDependencies(session, orgId, name, version, selector) {
|
|
290
291
|
return transport.requestJson({
|
|
291
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
292
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/processes/${encodeURIComponent(name)}/versions/${String(version)}/dependencies`, selector),
|
|
292
293
|
session
|
|
293
294
|
});
|
|
294
295
|
},
|
|
295
|
-
async
|
|
296
|
+
async getWorkflowContext(session, orgId, selector) {
|
|
296
297
|
return transport.requestJson({
|
|
297
|
-
|
|
298
|
-
method: "PATCH",
|
|
299
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/skills/${encodeURIComponent(skillRef)}`,
|
|
298
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/workflows/context`, selector),
|
|
300
299
|
session
|
|
301
300
|
});
|
|
302
301
|
},
|
|
303
|
-
async
|
|
302
|
+
async startWorkflow(session, orgId, name, inputData) {
|
|
304
303
|
return transport.requestJson({
|
|
305
|
-
|
|
306
|
-
|
|
304
|
+
...(inputData ? { body: inputData } : {}),
|
|
305
|
+
method: "POST",
|
|
306
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/processes/${encodeURIComponent(name)}/start`,
|
|
307
307
|
session
|
|
308
308
|
});
|
|
309
309
|
},
|
|
310
|
-
async
|
|
310
|
+
async getOrganizationManagementContext(session, orgId, selector) {
|
|
311
311
|
return transport.requestJson({
|
|
312
|
-
|
|
313
|
-
method: "POST",
|
|
314
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/skills/${encodeURIComponent(skillRef)}/revisions`,
|
|
312
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/organization/management`, selector),
|
|
315
313
|
session
|
|
316
314
|
});
|
|
317
315
|
},
|
|
318
|
-
async
|
|
316
|
+
async getCapabilityEditor(session, orgId, name, selector) {
|
|
319
317
|
return transport.requestJson({
|
|
320
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
318
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/capabilities/editor/${encodeURIComponent(name)}`, selector),
|
|
321
319
|
session
|
|
322
320
|
});
|
|
323
321
|
},
|
|
324
|
-
async getOperationsEditor(session, orgId) {
|
|
322
|
+
async getOperationsEditor(session, orgId, selector) {
|
|
325
323
|
return transport.requestJson({
|
|
326
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/operations/editor`,
|
|
324
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/operations/editor`, selector),
|
|
327
325
|
session
|
|
328
326
|
});
|
|
329
327
|
},
|
|
@@ -345,6 +343,18 @@ export function createPlatformApiClient(input) {
|
|
|
345
343
|
session
|
|
346
344
|
});
|
|
347
345
|
},
|
|
346
|
+
async listAuditEvents(session, orgId, filters) {
|
|
347
|
+
return transport.requestJson({
|
|
348
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/audit/events`, filters),
|
|
349
|
+
session
|
|
350
|
+
});
|
|
351
|
+
},
|
|
352
|
+
async getAuditEvent(session, orgId, eventId) {
|
|
353
|
+
return transport.requestJson({
|
|
354
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/audit/events/${encodeURIComponent(eventId)}`,
|
|
355
|
+
session
|
|
356
|
+
});
|
|
357
|
+
},
|
|
348
358
|
async listRuns(session, orgId, filters) {
|
|
349
359
|
return transport.requestJson({
|
|
350
360
|
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/runs`, filters),
|
|
@@ -398,64 +408,111 @@ export function createPlatformApiClient(input) {
|
|
|
398
408
|
session
|
|
399
409
|
});
|
|
400
410
|
},
|
|
401
|
-
async
|
|
411
|
+
async listEnvironmentDeployments(session, orgId, filters = {}) {
|
|
402
412
|
return transport.requestJson({
|
|
403
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/deployments
|
|
413
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/environment-deployments`, filters),
|
|
404
414
|
session
|
|
405
415
|
});
|
|
406
416
|
},
|
|
407
|
-
async
|
|
417
|
+
async getEnvironmentDeployment(session, orgId, deploymentId, filters = {}) {
|
|
408
418
|
return transport.requestJson({
|
|
409
|
-
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
419
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/environment-deployments/${encodeURIComponent(deploymentId)}`, filters),
|
|
410
420
|
session
|
|
411
421
|
});
|
|
412
422
|
},
|
|
413
|
-
async
|
|
423
|
+
async listEnvironments(session, orgId) {
|
|
414
424
|
return transport.requestJson({
|
|
415
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
425
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments`,
|
|
416
426
|
session
|
|
417
427
|
});
|
|
418
428
|
},
|
|
419
|
-
async
|
|
429
|
+
async getEnvironment(session, orgId, environment) {
|
|
420
430
|
return transport.requestJson({
|
|
421
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
431
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments/${encodeURIComponent(environment)}`,
|
|
422
432
|
session
|
|
423
433
|
});
|
|
424
434
|
},
|
|
425
|
-
async
|
|
435
|
+
async createEnvironment(session, orgId, inputData) {
|
|
426
436
|
return transport.requestJson({
|
|
427
|
-
body:
|
|
437
|
+
body: inputData,
|
|
428
438
|
method: "POST",
|
|
429
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
439
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments`,
|
|
430
440
|
session
|
|
431
441
|
});
|
|
432
442
|
},
|
|
433
|
-
async
|
|
443
|
+
async renameEnvironment(session, orgId, environment, inputData) {
|
|
444
|
+
return transport.requestJson({
|
|
445
|
+
body: inputData,
|
|
446
|
+
method: "PATCH",
|
|
447
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments/${encodeURIComponent(environment)}`,
|
|
448
|
+
session
|
|
449
|
+
});
|
|
450
|
+
},
|
|
451
|
+
async archiveEnvironment(session, orgId, environment) {
|
|
434
452
|
return transport.requestJson({
|
|
435
453
|
method: "POST",
|
|
436
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
454
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments/${encodeURIComponent(environment)}/archive`,
|
|
437
455
|
session
|
|
438
456
|
});
|
|
439
457
|
},
|
|
440
|
-
async
|
|
458
|
+
async deployEnvironment(session, orgId, environment, inputData) {
|
|
441
459
|
return transport.requestJson({
|
|
460
|
+
body: inputData,
|
|
442
461
|
method: "POST",
|
|
443
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
462
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments/${encodeURIComponent(environment)}/deploy`,
|
|
444
463
|
session
|
|
445
464
|
});
|
|
446
465
|
},
|
|
447
|
-
async
|
|
466
|
+
async undeployEnvironment(session, orgId, environment, inputData = {}) {
|
|
448
467
|
return transport.requestJson({
|
|
468
|
+
body: inputData,
|
|
449
469
|
method: "POST",
|
|
450
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/
|
|
470
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/environments/${encodeURIComponent(environment)}/undeploy`,
|
|
451
471
|
session
|
|
452
472
|
});
|
|
453
473
|
},
|
|
454
|
-
async
|
|
474
|
+
async listReleases(session, orgId, filters) {
|
|
475
|
+
return transport.requestJson({
|
|
476
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/releases`, filters),
|
|
477
|
+
session
|
|
478
|
+
});
|
|
479
|
+
},
|
|
480
|
+
async getRelease(session, orgId, releaseId) {
|
|
455
481
|
return transport.requestJson({
|
|
456
|
-
|
|
482
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/releases/${encodeURIComponent(releaseId)}`,
|
|
483
|
+
session
|
|
484
|
+
});
|
|
485
|
+
},
|
|
486
|
+
async getReleaseSource(session, orgId, releaseId) {
|
|
487
|
+
return transport.requestJson({
|
|
488
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/releases/${encodeURIComponent(releaseId)}/source`,
|
|
489
|
+
session
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
async createRelease(session, orgId, inputData) {
|
|
493
|
+
return transport.requestJson({
|
|
494
|
+
body: inputData,
|
|
495
|
+
method: "POST",
|
|
496
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/releases`,
|
|
497
|
+
session
|
|
498
|
+
});
|
|
499
|
+
},
|
|
500
|
+
async createReleaseArchive(session, orgId, archive, inputData = {}) {
|
|
501
|
+
return transport.requestJson({
|
|
502
|
+
headers: { "content-type": "application/zip" },
|
|
457
503
|
method: "POST",
|
|
458
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/releases
|
|
504
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/releases.zip`, inputData),
|
|
505
|
+
rawBody: archive,
|
|
506
|
+
session
|
|
507
|
+
});
|
|
508
|
+
},
|
|
509
|
+
async validateRelease(session, orgId, inputData) {
|
|
510
|
+
const orgPath = `/api/v1/orgs/${encodeURIComponent(orgId)}`;
|
|
511
|
+
return transport.requestJson({
|
|
512
|
+
path: withQuery(`${orgPath}/releases/validate`, {
|
|
513
|
+
releaseId: inputData.releaseId,
|
|
514
|
+
...(inputData.environment ? { environment: inputData.environment } : {})
|
|
515
|
+
}),
|
|
459
516
|
session
|
|
460
517
|
});
|
|
461
518
|
},
|
|
@@ -528,6 +585,12 @@ export function createPlatformApiClient(input) {
|
|
|
528
585
|
session
|
|
529
586
|
});
|
|
530
587
|
},
|
|
588
|
+
async getAgentUsage(session, orgId, inputData = {}) {
|
|
589
|
+
return transport.requestJson({
|
|
590
|
+
path: withQuery(`/admin/v1/orgs/${encodeURIComponent(orgId)}/agent-usage`, inputData),
|
|
591
|
+
session
|
|
592
|
+
});
|
|
593
|
+
},
|
|
531
594
|
async listChatSessions(session, orgId) {
|
|
532
595
|
return transport.requestJson({
|
|
533
596
|
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions`,
|
|
@@ -547,44 +610,6 @@ export function createPlatformApiClient(input) {
|
|
|
547
610
|
session
|
|
548
611
|
});
|
|
549
612
|
},
|
|
550
|
-
async getChatChanges(session, orgId, sessionId) {
|
|
551
|
-
return transport.requestJson({
|
|
552
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/changes`,
|
|
553
|
-
session
|
|
554
|
-
});
|
|
555
|
-
},
|
|
556
|
-
async getChatValidation(session, orgId, sessionId) {
|
|
557
|
-
return transport.requestJson({
|
|
558
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/validation`,
|
|
559
|
-
session
|
|
560
|
-
});
|
|
561
|
-
},
|
|
562
|
-
async getChatDraft(session, orgId, sessionId) {
|
|
563
|
-
return transport.requestJson({
|
|
564
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/draft`,
|
|
565
|
-
session
|
|
566
|
-
});
|
|
567
|
-
},
|
|
568
|
-
async applyChatDraft(session, orgId, sessionId) {
|
|
569
|
-
return transport.requestJson({
|
|
570
|
-
method: "POST",
|
|
571
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/draft/apply`,
|
|
572
|
-
session
|
|
573
|
-
});
|
|
574
|
-
},
|
|
575
|
-
async refreshChatDraft(session, orgId, sessionId) {
|
|
576
|
-
return transport.requestJson({
|
|
577
|
-
method: "POST",
|
|
578
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/draft/refresh`,
|
|
579
|
-
session
|
|
580
|
-
});
|
|
581
|
-
},
|
|
582
|
-
async getChatWorkspaceState(session, orgId, sessionId) {
|
|
583
|
-
return transport.requestJson({
|
|
584
|
-
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/chat/sessions/${encodeURIComponent(sessionId)}/workspace-state`,
|
|
585
|
-
session
|
|
586
|
-
});
|
|
587
|
-
},
|
|
588
613
|
async listDeletedOrganizations(session) {
|
|
589
614
|
return transport.requestJson({
|
|
590
615
|
path: "/admin/v1/orgs/deleted",
|