@kora-platform/cli 0.7.0-rc1 → 0.8.0-rc2
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 +250 -93
- package/dist/api-client.js +187 -163
- package/dist/api-types.d.ts +280 -162
- 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 +172 -1
- 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 +116 -29
- package/dist/command-builders.d.ts +1 -0
- package/dist/command-builders.js +1 -0
- package/dist/command-groups.js +10 -12
- package/dist/command-registry.js +548 -243
- package/dist/commands.js +652 -602
- package/dist/environment-context.d.ts +9 -0
- package/dist/environment-context.js +32 -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 +33 -0
- package/dist/files.js +247 -12
- package/dist/format.d.ts +5 -0
- package/dist/format.js +78 -1
- package/dist/runner.js +14 -5
- package/dist/schema-registry-data.d.ts +272 -569
- package/dist/schema-registry-data.js +307 -700
- package/dist/session.d.ts +1 -0
- package/dist/transport.d.ts +10 -0
- package/dist/transport.js +22 -0
- 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/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-types.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export type CliRecord = Record<string, unknown>;
|
|
2
|
+
export type WorkspaceCommandDiagnostic = CliRecord & {
|
|
3
|
+
code: string;
|
|
4
|
+
gate: "importBlocking" | "importWarnings" | "releaseReadiness" | "releaseBlocking" | "releaseWarnings" | "runtimeBlocking" | "runtimeWarnings";
|
|
5
|
+
message: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
severity: "error" | "warning";
|
|
8
|
+
};
|
|
2
9
|
export type RoleName = "admin" | "member" | "owner" | "viewer";
|
|
3
10
|
export interface ApiKeyRecord extends CliRecord {
|
|
4
11
|
expiresAt?: string | null;
|
|
@@ -35,16 +42,102 @@ export interface DeletedOrganizationSummary extends CliRecord {
|
|
|
35
42
|
}
|
|
36
43
|
export interface OrgSettingsRecord extends CliRecord {
|
|
37
44
|
}
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
export interface WorkflowNodeTestResult extends CliRecord {
|
|
46
|
+
nodeId: string;
|
|
47
|
+
nodeKind?: string;
|
|
48
|
+
operationName: string;
|
|
49
|
+
status: "failed" | "invalid" | "passed";
|
|
50
|
+
testId: string;
|
|
51
|
+
workflowName: string;
|
|
41
52
|
}
|
|
42
53
|
export interface RuntimeVariableRecord extends CliRecord {
|
|
54
|
+
environmentKey?: string;
|
|
43
55
|
name: string;
|
|
44
56
|
value: string;
|
|
45
57
|
}
|
|
46
58
|
export interface OrgSecretRecord extends CliRecord {
|
|
59
|
+
environmentKey?: string;
|
|
60
|
+
name: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ExtensionPackageFileInput extends CliRecord {
|
|
63
|
+
contentBase64: string;
|
|
64
|
+
path: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ExtensionPermissions extends CliRecord {
|
|
67
|
+
callbacks?: boolean;
|
|
68
|
+
cloud?: boolean;
|
|
69
|
+
egress?: string[];
|
|
70
|
+
schedules?: boolean;
|
|
71
|
+
secrets?: boolean;
|
|
72
|
+
storage?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface ExtensionInstallRecord extends CliRecord {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
environmentKey?: string;
|
|
77
|
+
grantedPermissions: ExtensionPermissions;
|
|
78
|
+
id: string;
|
|
79
|
+
packageId: string;
|
|
80
|
+
packageRevisionId: string;
|
|
81
|
+
slug: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ExtensionPackageRecord extends CliRecord {
|
|
84
|
+
id: string;
|
|
47
85
|
name: string;
|
|
86
|
+
orgId: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ExtensionPackageRevisionRecord extends CliRecord {
|
|
89
|
+
fileCount: number;
|
|
90
|
+
id: string;
|
|
91
|
+
packageId: string;
|
|
92
|
+
revisionHash: string;
|
|
93
|
+
totalBytes: number;
|
|
94
|
+
version: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ExtensionPackageValidationDiagnostic extends CliRecord {
|
|
97
|
+
code: string;
|
|
98
|
+
message: string;
|
|
99
|
+
path?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ExtensionPackageValidationResult extends CliRecord {
|
|
102
|
+
diagnostics: ExtensionPackageValidationDiagnostic[];
|
|
103
|
+
fileCount: number;
|
|
104
|
+
ok: boolean;
|
|
105
|
+
revisionHash?: string;
|
|
106
|
+
totalBytes: number;
|
|
107
|
+
}
|
|
108
|
+
export interface ExtensionPackageExportEnvelope extends CliRecord {
|
|
109
|
+
files: ExtensionPackageFileInput[];
|
|
110
|
+
metadata: CliRecord & {
|
|
111
|
+
installId?: string;
|
|
112
|
+
installSlug?: string;
|
|
113
|
+
installUpdatedAt?: string;
|
|
114
|
+
packageRevisionId: string;
|
|
115
|
+
revisionHash: string;
|
|
116
|
+
source: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface BuiltInExtensionRecord extends CliRecord {
|
|
120
|
+
availability: "available" | "unavailable";
|
|
121
|
+
defaultGrantedPermissions: ExtensionPermissions;
|
|
122
|
+
description: string;
|
|
123
|
+
installedSlug: string | null;
|
|
124
|
+
packageName: string;
|
|
125
|
+
requiresCloud: boolean;
|
|
126
|
+
slug: string;
|
|
127
|
+
source: string;
|
|
128
|
+
title: string;
|
|
129
|
+
unavailableReason: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface ExtensionInstallDetailRecord extends CliRecord {
|
|
132
|
+
install: ExtensionInstallRecord;
|
|
133
|
+
package: ExtensionPackageRecord;
|
|
134
|
+
registrations: CliRecord | null;
|
|
135
|
+
revision: ExtensionPackageRevisionRecord;
|
|
136
|
+
}
|
|
137
|
+
export interface ExtensionInstallUpdatePlan extends CliRecord {
|
|
138
|
+
diagnostics: WorkspaceCommandDiagnostic[];
|
|
139
|
+
mutated: boolean;
|
|
140
|
+
updateAllowed: boolean;
|
|
48
141
|
}
|
|
49
142
|
export interface ProcessDefinitionSummary extends CliRecord {
|
|
50
143
|
}
|
|
@@ -81,121 +174,148 @@ export interface AuthoringOrganizationManagementContext extends CliRecord {
|
|
|
81
174
|
}
|
|
82
175
|
export interface CapabilityEditorRecord extends CliRecord {
|
|
83
176
|
}
|
|
84
|
-
export interface ConnectorsEditorRecord extends CliRecord {
|
|
85
|
-
connectors: Array<CliRecord & {
|
|
86
|
-
name: string;
|
|
87
|
-
}>;
|
|
88
|
-
}
|
|
89
|
-
export interface McpServersEditorRecord extends CliRecord {
|
|
90
|
-
servers: Array<CliRecord & {
|
|
91
|
-
name: string;
|
|
92
|
-
}>;
|
|
93
|
-
}
|
|
94
177
|
export interface OperationsEditorRecord extends CliRecord {
|
|
95
178
|
operations: Array<CliRecord & {
|
|
96
179
|
name: string;
|
|
97
180
|
}>;
|
|
98
181
|
}
|
|
99
|
-
export
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
182
|
+
export type AuditOutcome = "denied" | "failed" | "succeeded";
|
|
183
|
+
export type AuditEventSource = "auth" | "platform";
|
|
184
|
+
export interface AuditEventRecord extends CliRecord {
|
|
185
|
+
action: string;
|
|
186
|
+
actorId: string;
|
|
187
|
+
actorType: string;
|
|
188
|
+
category: string;
|
|
189
|
+
correlationId: string | null;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
deploymentId: string | null;
|
|
192
|
+
id: string;
|
|
193
|
+
metadata: CliRecord;
|
|
194
|
+
occurredAt: string;
|
|
195
|
+
orgId: string | null;
|
|
196
|
+
outcome: AuditOutcome;
|
|
197
|
+
releaseId: string | null;
|
|
198
|
+
requestId: string | null;
|
|
199
|
+
resourceId: string | null;
|
|
200
|
+
resourceName: string | null;
|
|
201
|
+
resourceType: string | null;
|
|
202
|
+
runId: string | null;
|
|
203
|
+
schemaVersion: number;
|
|
204
|
+
source: AuditEventSource;
|
|
205
|
+
sourceEventId: string | null;
|
|
206
|
+
workflowId: string | null;
|
|
207
|
+
}
|
|
208
|
+
export interface AuditEventListResult extends CliRecord {
|
|
209
|
+
events: AuditEventRecord[];
|
|
210
|
+
limit: number;
|
|
110
211
|
}
|
|
111
|
-
export interface
|
|
112
|
-
|
|
212
|
+
export interface ReleaseSummaryRecord extends CliRecord {
|
|
213
|
+
id: string;
|
|
113
214
|
}
|
|
114
|
-
export interface
|
|
215
|
+
export interface CreateReleaseResult extends CliRecord {
|
|
216
|
+
release: ReleaseSummaryRecord;
|
|
115
217
|
}
|
|
116
|
-
export interface
|
|
218
|
+
export interface ReleaseSourceFileRecord extends CliRecord {
|
|
219
|
+
content: string;
|
|
220
|
+
path: string;
|
|
117
221
|
}
|
|
118
|
-
export interface
|
|
222
|
+
export interface ReleaseSourceSnapshotRecord extends CliRecord {
|
|
223
|
+
assets: ReleaseSourceFileRecord[];
|
|
224
|
+
files: ReleaseSourceFileRecord[];
|
|
225
|
+
ingestionHistory: CliRecord[];
|
|
119
226
|
}
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
status?: string;
|
|
127
|
-
url?: string;
|
|
227
|
+
export interface ReleaseValidationDiagnostic extends CliRecord {
|
|
228
|
+
code: string;
|
|
229
|
+
gate: "releaseBlocking" | "releaseWarnings";
|
|
230
|
+
message: string;
|
|
231
|
+
path: string;
|
|
232
|
+
severity: string;
|
|
128
233
|
}
|
|
129
|
-
export interface
|
|
130
|
-
|
|
234
|
+
export interface ReleaseValidationResult extends CliRecord {
|
|
235
|
+
diagnostics: ReleaseValidationDiagnostic[];
|
|
236
|
+
releaseId: string;
|
|
237
|
+
releaseReady: boolean;
|
|
131
238
|
}
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
lastErrorMessage?: string | null;
|
|
136
|
-
slug: string;
|
|
137
|
-
};
|
|
239
|
+
export type RuntimeControlActivityFocusType = "run" | "task" | "workflow";
|
|
240
|
+
export interface RuntimeControlActivityReadResult extends CliRecord {
|
|
241
|
+
events: CliRecord[];
|
|
138
242
|
}
|
|
139
|
-
export
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
243
|
+
export type AgentUsageSourceStatus = "event_only" | "trace_joined";
|
|
244
|
+
export interface AgentUsageSummary extends CliRecord {
|
|
245
|
+
agentExecutionCount: number;
|
|
246
|
+
from: string;
|
|
247
|
+
orgId: string;
|
|
248
|
+
sourceEventOnlyCount: number;
|
|
249
|
+
to: string;
|
|
250
|
+
tokensIn: number;
|
|
251
|
+
tokensOut: number;
|
|
252
|
+
toolCallCount: number;
|
|
253
|
+
usdMicros: number;
|
|
254
|
+
}
|
|
255
|
+
export interface AgentUsageWorkflowSummary extends CliRecord {
|
|
256
|
+
agentExecutionCount: number;
|
|
257
|
+
model: string | null;
|
|
258
|
+
processName: string;
|
|
259
|
+
provider: string | null;
|
|
260
|
+
tokensIn: number;
|
|
261
|
+
tokensOut: number;
|
|
262
|
+
toolCallCount: number;
|
|
263
|
+
usdMicros: number;
|
|
264
|
+
}
|
|
265
|
+
export interface AgentToolUsageSummary extends CliRecord {
|
|
266
|
+
callCount: number;
|
|
267
|
+
failureCount: number;
|
|
268
|
+
successCount: number;
|
|
269
|
+
toolName: string;
|
|
270
|
+
}
|
|
271
|
+
export interface AgentUsageRecentEvent extends CliRecord {
|
|
272
|
+
eventId: string;
|
|
273
|
+
model: string | null;
|
|
274
|
+
occurredAt: string;
|
|
275
|
+
processName: string;
|
|
276
|
+
provider: string | null;
|
|
277
|
+
runId: string;
|
|
278
|
+
sourceStatus: AgentUsageSourceStatus;
|
|
279
|
+
status: string;
|
|
280
|
+
tokensIn: number;
|
|
281
|
+
tokensOut: number;
|
|
282
|
+
toolCallCount: number;
|
|
283
|
+
usdMicros: number;
|
|
146
284
|
}
|
|
147
|
-
export interface
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
285
|
+
export interface AgentUsageReport extends CliRecord {
|
|
286
|
+
recentEvents: AgentUsageRecentEvent[];
|
|
287
|
+
summary: AgentUsageSummary;
|
|
288
|
+
tools: AgentToolUsageSummary[];
|
|
289
|
+
workflows: AgentUsageWorkflowSummary[];
|
|
151
290
|
}
|
|
152
|
-
export interface
|
|
153
|
-
authorizationUrl: string;
|
|
154
|
-
sessionId: string;
|
|
291
|
+
export interface RuntimeControlDeploymentRecord extends CliRecord {
|
|
155
292
|
}
|
|
156
|
-
export interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
293
|
+
export interface EnvironmentRecord extends CliRecord {
|
|
294
|
+
currentDeploymentId?: string | null;
|
|
295
|
+
id: string;
|
|
296
|
+
isProductionTarget?: boolean;
|
|
297
|
+
key: string;
|
|
298
|
+
name: string;
|
|
161
299
|
status: string;
|
|
162
300
|
}
|
|
163
|
-
export interface
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
slug?: string;
|
|
171
|
-
timeoutMs?: number;
|
|
172
|
-
transport?: string;
|
|
173
|
-
url?: string;
|
|
174
|
-
}
|
|
175
|
-
export interface UpdateOrgMcpServerInput extends CliRecord {
|
|
176
|
-
authMode?: OrgMcpServerAuthMode;
|
|
177
|
-
displayName?: string;
|
|
178
|
-
timeoutMs?: number;
|
|
179
|
-
transport?: string;
|
|
180
|
-
url?: string;
|
|
181
|
-
}
|
|
182
|
-
export interface ReleaseSummaryRecord extends CliRecord {
|
|
301
|
+
export interface EnvironmentDeploymentRecord extends CliRecord {
|
|
302
|
+
appliedAt?: string | null;
|
|
303
|
+
createdAt?: string;
|
|
304
|
+
coreDeploymentId?: string | null;
|
|
305
|
+
environmentId?: string;
|
|
306
|
+
environmentKey: string;
|
|
307
|
+
error?: CliRecord | null;
|
|
183
308
|
id: string;
|
|
309
|
+
isLive: boolean;
|
|
310
|
+
previousDeploymentId?: string | null;
|
|
311
|
+
releaseId: string;
|
|
312
|
+
status: string;
|
|
313
|
+
updatedAt?: string;
|
|
184
314
|
}
|
|
185
|
-
export interface
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
export interface PublishReleaseResult extends CliRecord {
|
|
190
|
-
release: ReleaseSummaryRecord;
|
|
191
|
-
}
|
|
192
|
-
export interface RetryReleasePublicationResult extends CliRecord {
|
|
193
|
-
}
|
|
194
|
-
export type RuntimeControlActivityFocusType = "run" | "task" | "workflow";
|
|
195
|
-
export interface RuntimeControlActivityReadResult extends CliRecord {
|
|
196
|
-
events: CliRecord[];
|
|
197
|
-
}
|
|
198
|
-
export interface RuntimeControlDeploymentRecord extends CliRecord {
|
|
315
|
+
export interface EnvironmentDetailRecord extends CliRecord {
|
|
316
|
+
environment: EnvironmentRecord;
|
|
317
|
+
latestDeployment: EnvironmentDeploymentRecord | null;
|
|
318
|
+
liveDeployment: EnvironmentDeploymentRecord | null;
|
|
199
319
|
}
|
|
200
320
|
export interface RuntimeControlOverviewRecord extends CliRecord {
|
|
201
321
|
}
|
|
@@ -221,75 +341,73 @@ export interface CompleteRuntimeTaskResult extends CliRecord {
|
|
|
221
341
|
}
|
|
222
342
|
export interface AbortRuntimeRunResult extends CliRecord {
|
|
223
343
|
}
|
|
344
|
+
export type RuntimeArtifactProducerType = "review_upload" | "upload" | "workflow_capture" | "workflow_node_test_capture";
|
|
345
|
+
export type RuntimeArtifactAssociationKind = "origin" | "usage";
|
|
346
|
+
export type RuntimeArtifactAssociationRole = "input" | "output" | "review";
|
|
347
|
+
export type RuntimeArtifactLifecycleStatus = "active" | "archived" | "purged";
|
|
348
|
+
export type RuntimeArtifactLifecycleFilter = RuntimeArtifactLifecycleStatus | "all";
|
|
349
|
+
export type RuntimeArtifactByteDeletionStatus = "deleted" | "pending" | "retained";
|
|
224
350
|
export interface RuntimeArtifactRecord extends CliRecord {
|
|
225
|
-
|
|
226
|
-
|
|
351
|
+
archivedAt?: string;
|
|
352
|
+
artifactId: string;
|
|
353
|
+
byteDeletionStatus: RuntimeArtifactByteDeletionStatus;
|
|
354
|
+
bytesDeletedAt?: string;
|
|
355
|
+
createdAt: string;
|
|
356
|
+
deploymentId?: string;
|
|
357
|
+
encryptionKeyId?: string;
|
|
358
|
+
encryptionMode?: string;
|
|
359
|
+
expiresAt?: string;
|
|
360
|
+
fieldKey?: string;
|
|
361
|
+
fieldPath?: string;
|
|
362
|
+
folderEntryCount?: number;
|
|
363
|
+
folderTotalBytes?: number;
|
|
364
|
+
kind: "file" | "folder";
|
|
365
|
+
lifecycleStatus: RuntimeArtifactLifecycleStatus;
|
|
366
|
+
mediaType?: string;
|
|
367
|
+
name: string;
|
|
368
|
+
nodeId?: string;
|
|
369
|
+
producerType: RuntimeArtifactProducerType;
|
|
370
|
+
purgedAt?: string;
|
|
371
|
+
scanStatus: "blocked" | "clean" | "failed" | "not_scanned" | "pending";
|
|
372
|
+
sha256: string;
|
|
373
|
+
sizeBytes: number;
|
|
374
|
+
workflowId?: string;
|
|
375
|
+
workflowName?: string;
|
|
376
|
+
workflowNodeTestId?: string;
|
|
377
|
+
workflowRunId?: string;
|
|
378
|
+
}
|
|
379
|
+
export interface RuntimeArtifactAssociationRecord extends CliRecord {
|
|
380
|
+
artifactId: string;
|
|
381
|
+
associatedAt: string;
|
|
382
|
+
associationKind: RuntimeArtifactAssociationKind;
|
|
383
|
+
deploymentId?: string;
|
|
384
|
+
fieldKey?: string;
|
|
385
|
+
fieldPath?: string;
|
|
386
|
+
nodeId?: string;
|
|
387
|
+
reviewTaskId?: string;
|
|
388
|
+
role: RuntimeArtifactAssociationRole;
|
|
389
|
+
workflowId?: string;
|
|
390
|
+
workflowName?: string;
|
|
391
|
+
workflowNodeTestId?: string;
|
|
392
|
+
workflowRunId?: string;
|
|
393
|
+
}
|
|
394
|
+
export interface RuntimeArtifactAssociationSummary extends CliRecord {
|
|
395
|
+
inputUsageCount: number;
|
|
396
|
+
outputOriginCount: number;
|
|
397
|
+
reviewUsageCount: number;
|
|
398
|
+
}
|
|
399
|
+
export interface RuntimeArtifactInventoryRecord extends CliRecord {
|
|
400
|
+
artifact: RuntimeArtifactRecord;
|
|
401
|
+
associationSummary: RuntimeArtifactAssociationSummary;
|
|
402
|
+
originAssociation: RuntimeArtifactAssociationRecord | null;
|
|
403
|
+
}
|
|
404
|
+
export interface RuntimeArtifactDetailRecord extends CliRecord {
|
|
405
|
+
artifact: RuntimeArtifactRecord;
|
|
406
|
+
associations: RuntimeArtifactAssociationRecord[];
|
|
227
407
|
}
|
|
228
408
|
export interface ChatHealth extends CliRecord {
|
|
229
409
|
}
|
|
230
|
-
export interface ChatSessionChangesRecord extends CliRecord {
|
|
231
|
-
}
|
|
232
|
-
export interface ChatSessionDraftApplyRecord extends CliRecord {
|
|
233
|
-
}
|
|
234
|
-
export interface ChatSessionDraftRefreshRecord extends CliRecord {
|
|
235
|
-
}
|
|
236
|
-
export interface ChatSessionDraftRecord extends CliRecord {
|
|
237
|
-
}
|
|
238
410
|
export interface ChatSessionRecord extends CliRecord {
|
|
239
411
|
}
|
|
240
412
|
export interface ChatSessionSummary extends CliRecord {
|
|
241
413
|
}
|
|
242
|
-
export interface ChatSessionValidationRecord extends CliRecord {
|
|
243
|
-
}
|
|
244
|
-
export interface ChatSessionWorkspaceStateRecord extends CliRecord {
|
|
245
|
-
}
|
|
246
|
-
export type ManagedIntegrationJsonValue = ManagedIntegrationJsonObject | ManagedIntegrationJsonValue[] | boolean | null | number | string;
|
|
247
|
-
export interface ManagedIntegrationJsonObject {
|
|
248
|
-
[key: string]: ManagedIntegrationJsonValue;
|
|
249
|
-
}
|
|
250
|
-
export interface ManagedIntegrationActionInput extends CliRecord {
|
|
251
|
-
connectionRef?: string;
|
|
252
|
-
input?: ManagedIntegrationJsonObject;
|
|
253
|
-
}
|
|
254
|
-
export interface ManagedIntegrationActionDescriptor extends CliRecord {
|
|
255
|
-
cliSafe: boolean;
|
|
256
|
-
id: string;
|
|
257
|
-
label?: string;
|
|
258
|
-
}
|
|
259
|
-
export interface ManagedIntegrationSummary extends CliRecord {
|
|
260
|
-
id: string;
|
|
261
|
-
}
|
|
262
|
-
export interface ManagedIntegrationDiagnostic extends CliRecord {
|
|
263
|
-
id: string;
|
|
264
|
-
}
|
|
265
|
-
export interface ManagedIntegrationConnectionSummary extends CliRecord {
|
|
266
|
-
connectionRef: string;
|
|
267
|
-
}
|
|
268
|
-
export interface ManagedIntegrationPromptGuidance extends CliRecord {
|
|
269
|
-
}
|
|
270
|
-
export type ManagedIntegrationHostEffect = {
|
|
271
|
-
kind: "connection_ready";
|
|
272
|
-
connectionRef: string;
|
|
273
|
-
displayName: string;
|
|
274
|
-
} | {
|
|
275
|
-
kind: "open_external_url";
|
|
276
|
-
label?: string;
|
|
277
|
-
url: string;
|
|
278
|
-
} | {
|
|
279
|
-
kind: "refresh_state";
|
|
280
|
-
reason?: string;
|
|
281
|
-
} | {
|
|
282
|
-
kind: "schedule_poll";
|
|
283
|
-
intervalMs: number;
|
|
284
|
-
reason?: string;
|
|
285
|
-
} | {
|
|
286
|
-
kind: "terminal_failure";
|
|
287
|
-
message: string;
|
|
288
|
-
} | {
|
|
289
|
-
kind: "user_message";
|
|
290
|
-
message: string;
|
|
291
|
-
};
|
|
292
|
-
export interface ManagedIntegrationActionResult extends CliRecord {
|
|
293
|
-
actionId: string;
|
|
294
|
-
effects: ManagedIntegrationHostEffect[];
|
|
295
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeArtifactRecord } from "./api-types.js";
|
|
1
|
+
import type { RuntimeArtifactDetailRecord, RuntimeArtifactLifecycleFilter, RuntimeArtifactInventoryRecord, RuntimeArtifactRecord } from "./api-types.js";
|
|
2
2
|
import type { CliSessionState, createPlatformTransport } from "./transport.js";
|
|
3
3
|
type PlatformTransport = ReturnType<typeof createPlatformTransport>;
|
|
4
4
|
type DownloadArtifactOptions = {
|
|
@@ -9,6 +9,20 @@ type DownloadArtifactOptions = {
|
|
|
9
9
|
maxBytes?: number;
|
|
10
10
|
validateHeaders?: (headers: Headers) => void;
|
|
11
11
|
};
|
|
12
|
+
type ListArtifactsFilters = {
|
|
13
|
+
associationKind?: string;
|
|
14
|
+
associationRole?: string;
|
|
15
|
+
createdAfter?: string;
|
|
16
|
+
createdBefore?: string;
|
|
17
|
+
lifecycleStatus?: RuntimeArtifactLifecycleFilter;
|
|
18
|
+
limit?: number;
|
|
19
|
+
mediaType?: string;
|
|
20
|
+
nodeId?: string;
|
|
21
|
+
producerType?: string;
|
|
22
|
+
runId?: string;
|
|
23
|
+
workflowNodeTestId?: string;
|
|
24
|
+
workflowId?: string;
|
|
25
|
+
};
|
|
12
26
|
export declare function createArtifactApiClient(transport: PlatformTransport): {
|
|
13
27
|
uploadArtifact(session: CliSessionState, orgId: string, inputData: {
|
|
14
28
|
body: Uint8Array;
|
|
@@ -23,11 +37,24 @@ export declare function createArtifactApiClient(transport: PlatformTransport): {
|
|
|
23
37
|
}): Promise<{
|
|
24
38
|
artifacts: RuntimeArtifactRecord[];
|
|
25
39
|
}>;
|
|
40
|
+
listArtifacts(session: CliSessionState, orgId: string, filters: ListArtifactsFilters): Promise<{
|
|
41
|
+
artifacts: RuntimeArtifactInventoryRecord[];
|
|
42
|
+
}>;
|
|
43
|
+
getArtifactDetail(session: CliSessionState, orgId: string, artifactId: string): Promise<RuntimeArtifactDetailRecord>;
|
|
26
44
|
downloadArtifact(session: CliSessionState, orgId: string, artifactId: string, options?: DownloadArtifactOptions): Promise<{
|
|
27
45
|
body: Uint8Array<ArrayBufferLike>;
|
|
28
46
|
contentType: string;
|
|
29
47
|
fileName: string | null;
|
|
30
48
|
sizeBytes: number;
|
|
31
49
|
}>;
|
|
50
|
+
archiveArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
51
|
+
artifact: RuntimeArtifactRecord;
|
|
52
|
+
}>;
|
|
53
|
+
restoreArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
54
|
+
artifact: RuntimeArtifactRecord;
|
|
55
|
+
}>;
|
|
56
|
+
purgeArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
57
|
+
artifact: RuntimeArtifactRecord;
|
|
58
|
+
}>;
|
|
32
59
|
};
|
|
33
60
|
export {};
|
|
@@ -20,6 +20,18 @@ export function createArtifactApiClient(transport) {
|
|
|
20
20
|
session
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
|
+
async listArtifacts(session, orgId, filters) {
|
|
24
|
+
return transport.requestJson({
|
|
25
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts`, filters),
|
|
26
|
+
session
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
async getArtifactDetail(session, orgId, artifactId) {
|
|
30
|
+
return transport.requestJson({
|
|
31
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}`,
|
|
32
|
+
session
|
|
33
|
+
});
|
|
34
|
+
},
|
|
23
35
|
async downloadArtifact(session, orgId, artifactId, options = {}) {
|
|
24
36
|
const response = await transport.requestBytes({
|
|
25
37
|
...(options.createMaxBytesError ? { createMaxBytesError: options.createMaxBytesError } : {}),
|
|
@@ -34,6 +46,27 @@ export function createArtifactApiClient(transport) {
|
|
|
34
46
|
fileName: readContentDispositionFileName(response.headers.get("content-disposition")),
|
|
35
47
|
sizeBytes: response.body.byteLength
|
|
36
48
|
};
|
|
49
|
+
},
|
|
50
|
+
async archiveArtifact(session, orgId, artifactId) {
|
|
51
|
+
return transport.requestJson({
|
|
52
|
+
method: "POST",
|
|
53
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/archive`,
|
|
54
|
+
session
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
async restoreArtifact(session, orgId, artifactId) {
|
|
58
|
+
return transport.requestJson({
|
|
59
|
+
method: "POST",
|
|
60
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/restore`,
|
|
61
|
+
session
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
async purgeArtifact(session, orgId, artifactId) {
|
|
65
|
+
return transport.requestJson({
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/purge`,
|
|
68
|
+
session
|
|
69
|
+
});
|
|
37
70
|
}
|
|
38
71
|
};
|
|
39
72
|
}
|
|
@@ -10,6 +10,11 @@ type ResolveOrgScope = (parsed: ParsedCommand, context: CommandExecutionContext,
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare function executeArtifactUpload(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
12
12
|
export declare function executeArtifactList(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
13
|
+
export declare function executeArtifactInventory(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
14
|
+
export declare function executeArtifactInspect(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
13
15
|
export declare function executeArtifactDownload(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
14
16
|
export declare function executeArtifactRead(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
17
|
+
export declare function executeArtifactArchive(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
18
|
+
export declare function executeArtifactRestore(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
19
|
+
export declare function executeArtifactPurge(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
15
20
|
export {};
|