@stack-spot/portal-network 0.32.0 → 0.34.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/CHANGELOG.md +15 -0
- package/dist/api/cloudPlatform.d.ts +241 -0
- package/dist/api/cloudPlatform.d.ts.map +1 -0
- package/dist/api/cloudPlatform.js +136 -0
- package/dist/api/cloudPlatform.js.map +1 -0
- package/dist/api/workflows.d.ts +59 -17
- package/dist/api/workflows.d.ts.map +1 -1
- package/dist/api/workflows.js +35 -0
- package/dist/api/workflows.js.map +1 -1
- package/dist/apis.json +8 -0
- package/dist/client/cloud-platform.d.ts +96 -0
- package/dist/client/cloud-platform.d.ts.map +1 -0
- package/dist/client/cloud-platform.js +132 -0
- package/dist/client/cloud-platform.js.map +1 -0
- package/dist/client/workflow.d.ts +16 -0
- package/dist/client/workflow.d.ts.map +1 -1
- package/dist/client/workflow.js +19 -1
- package/dist/client/workflow.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/network/react-query-client.d.ts.map +1 -1
- package/dist/network/react-query-client.js +1 -1
- package/dist/network/react-query-client.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/src/api/cloudPlatform.ts +386 -0
- package/src/api/workflows.ts +142 -17
- package/src/apis.json +8 -0
- package/src/client/cloud-platform.ts +86 -0
- package/src/client/workflow.ts +15 -1
- package/src/index.ts +1 -0
- package/src/network/react-query-client.ts +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI definition
|
|
3
|
+
* v0
|
|
4
|
+
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
+
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
+
*/
|
|
7
|
+
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
+
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
+
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
|
+
headers: {},
|
|
11
|
+
baseUrl: "https://cloud-cloud-platform-api.dev.stackspot.com",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {
|
|
15
|
+
generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
|
|
16
|
+
};
|
|
17
|
+
export type ReplicasConfigRequest = {
|
|
18
|
+
/** Minimum number of replicas */
|
|
19
|
+
min?: number;
|
|
20
|
+
/** Maximum number of replicas */
|
|
21
|
+
max: number;
|
|
22
|
+
cpu: number;
|
|
23
|
+
};
|
|
24
|
+
export type CreateDeploymentRequest = {
|
|
25
|
+
applicationId?: string;
|
|
26
|
+
deploymentId?: string;
|
|
27
|
+
action: "DEPLOY" | "STOP" | "START" | "RESTART" | "REDEPLOY";
|
|
28
|
+
containerPort?: string;
|
|
29
|
+
healthCheckPath?: string;
|
|
30
|
+
envVars?: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
}[];
|
|
33
|
+
imageUrl?: string;
|
|
34
|
+
runtimeId?: string;
|
|
35
|
+
runtimeTags?: string[];
|
|
36
|
+
runtimeEnv?: string;
|
|
37
|
+
mem?: number;
|
|
38
|
+
cpu?: number;
|
|
39
|
+
replicaNum?: ReplicasConfigRequest;
|
|
40
|
+
};
|
|
41
|
+
export type DeploymentResponse = {
|
|
42
|
+
deploymentId: string;
|
|
43
|
+
applicationUrl?: string;
|
|
44
|
+
action: "DEPLOY" | "STOP" | "START" | "RESTART" | "REDEPLOY";
|
|
45
|
+
containerPort?: string;
|
|
46
|
+
healthCheckPath?: string;
|
|
47
|
+
envVars?: {
|
|
48
|
+
[key: string]: string;
|
|
49
|
+
}[];
|
|
50
|
+
imageUrl?: string;
|
|
51
|
+
versionTag?: string;
|
|
52
|
+
health?: "HEALTH" | "UNHEALTH";
|
|
53
|
+
deploymentStatus?: "UP" | "STOPPED" | "DEPLOYING";
|
|
54
|
+
runtimeId?: string;
|
|
55
|
+
runtimeName?: string;
|
|
56
|
+
runtimeTags?: string[];
|
|
57
|
+
runtimeEnv?: string;
|
|
58
|
+
mem?: number;
|
|
59
|
+
cpu?: number;
|
|
60
|
+
replicaNum?: ReplicasConfigRequest;
|
|
61
|
+
awsAccount?: string;
|
|
62
|
+
idAwsAccount?: string;
|
|
63
|
+
};
|
|
64
|
+
export type CreateApplicationRequest = {
|
|
65
|
+
/** The name of the application in kebab-case format. */
|
|
66
|
+
name: string;
|
|
67
|
+
/** The description of the application */
|
|
68
|
+
description: "CONTAINER";
|
|
69
|
+
/** The type of the application */
|
|
70
|
+
applicationType: "CONTAINER" | "STATIC";
|
|
71
|
+
/** The creator of the application. */
|
|
72
|
+
projectId: string;
|
|
73
|
+
};
|
|
74
|
+
export type ApplicationResponse = {
|
|
75
|
+
name: string;
|
|
76
|
+
id: string;
|
|
77
|
+
description: string;
|
|
78
|
+
"type": "CONTAINER" | "STATIC";
|
|
79
|
+
creator: string;
|
|
80
|
+
projectId: string;
|
|
81
|
+
url?: string;
|
|
82
|
+
createdAt?: string;
|
|
83
|
+
updatedAt?: string;
|
|
84
|
+
};
|
|
85
|
+
export type AddOn = {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
export type RuntimeResponse = {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
description: string;
|
|
93
|
+
"type": "CONTAINER" | "STATIC";
|
|
94
|
+
projectId: string;
|
|
95
|
+
tags: string[];
|
|
96
|
+
env: string;
|
|
97
|
+
addons: AddOn[];
|
|
98
|
+
};
|
|
99
|
+
export type ListRuntimesResponse = {
|
|
100
|
+
runtimes: RuntimeResponse[];
|
|
101
|
+
totalCount: number;
|
|
102
|
+
limit: number;
|
|
103
|
+
offset: number;
|
|
104
|
+
};
|
|
105
|
+
export type GetRuntimeByApplicationIdResponse = {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
"type": "CONTAINER" | "STATIC";
|
|
110
|
+
projectId: string;
|
|
111
|
+
tags: string[];
|
|
112
|
+
addons: AddOn[];
|
|
113
|
+
};
|
|
114
|
+
export type ListRuntimeByApplicationResponse = {
|
|
115
|
+
runtimes: GetRuntimeByApplicationIdResponse[];
|
|
116
|
+
totalCount: number;
|
|
117
|
+
limit: number;
|
|
118
|
+
offset: number;
|
|
119
|
+
};
|
|
120
|
+
export type GetRegistryByIdResponse = {
|
|
121
|
+
registryId?: string;
|
|
122
|
+
imageUri: string;
|
|
123
|
+
};
|
|
124
|
+
export type RepositoryResponse = {
|
|
125
|
+
repositoryName: string;
|
|
126
|
+
repositoryUri: string;
|
|
127
|
+
};
|
|
128
|
+
export type ListRepositoryResponse = {
|
|
129
|
+
repositories: RepositoryResponse[];
|
|
130
|
+
totalCount: number;
|
|
131
|
+
limit: number;
|
|
132
|
+
offset: number;
|
|
133
|
+
};
|
|
134
|
+
export type GetRepositoryImagesResponse = {
|
|
135
|
+
imagesUri: string[];
|
|
136
|
+
};
|
|
137
|
+
export type DeploymentStatusResponse = {
|
|
138
|
+
status: "UP" | "STOPPED" | "DEPLOYING";
|
|
139
|
+
};
|
|
140
|
+
export type DeploymentLogResponse = {
|
|
141
|
+
logs: string;
|
|
142
|
+
};
|
|
143
|
+
export type DeploymentHealthResponse = {
|
|
144
|
+
health: "HEALTHY" | "UNHEALTHY";
|
|
145
|
+
};
|
|
146
|
+
export type BasicDeploymentResponse = {
|
|
147
|
+
deploymentId: string;
|
|
148
|
+
runtimeName: string;
|
|
149
|
+
deploymentStatus?: "UP" | "STOPPED" | "DEPLOYING";
|
|
150
|
+
runtimeEnv: string;
|
|
151
|
+
};
|
|
152
|
+
export type ApplicationHistoryResponse = {
|
|
153
|
+
applicationId: string;
|
|
154
|
+
runtimeName: string;
|
|
155
|
+
creator: string;
|
|
156
|
+
action: "CREATED" | "DEPLOYED" | "STOPPED";
|
|
157
|
+
date: string;
|
|
158
|
+
};
|
|
159
|
+
export type ListApplicationHistoryResponse = {
|
|
160
|
+
applicationId: string;
|
|
161
|
+
applicationHistory: ApplicationHistoryResponse[];
|
|
162
|
+
totalCount: number;
|
|
163
|
+
limit: number;
|
|
164
|
+
offset: number;
|
|
165
|
+
};
|
|
166
|
+
export type ListApplicationsResponse = {
|
|
167
|
+
projectId: string;
|
|
168
|
+
applications: ApplicationResponse[];
|
|
169
|
+
totalCount: number;
|
|
170
|
+
limit: number;
|
|
171
|
+
offset: number;
|
|
172
|
+
};
|
|
173
|
+
export function createDeployment({ createDeploymentRequest }: {
|
|
174
|
+
createDeploymentRequest: CreateDeploymentRequest;
|
|
175
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
176
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
177
|
+
status: 200;
|
|
178
|
+
data: DeploymentResponse;
|
|
179
|
+
}>("/v1/deployments", oazapfts.json({
|
|
180
|
+
...opts,
|
|
181
|
+
method: "POST",
|
|
182
|
+
body: createDeploymentRequest
|
|
183
|
+
})));
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Create an application.
|
|
187
|
+
*/
|
|
188
|
+
export function createApplication({ createApplicationRequest }: {
|
|
189
|
+
createApplicationRequest: CreateApplicationRequest;
|
|
190
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
191
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
192
|
+
status: 200;
|
|
193
|
+
data: ApplicationResponse;
|
|
194
|
+
}>("/v1/applications", oazapfts.json({
|
|
195
|
+
...opts,
|
|
196
|
+
method: "POST",
|
|
197
|
+
body: createApplicationRequest
|
|
198
|
+
})));
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get an application.
|
|
202
|
+
*/
|
|
203
|
+
export function getApplication({ applicationId }: {
|
|
204
|
+
applicationId: string;
|
|
205
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
206
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
207
|
+
status: 200;
|
|
208
|
+
data: ApplicationResponse;
|
|
209
|
+
}>(`/v1/applications/${encodeURIComponent(applicationId)}`, {
|
|
210
|
+
...opts
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Update an application.
|
|
215
|
+
*/
|
|
216
|
+
export function updateApplication({ createApplicationRequest }: {
|
|
217
|
+
createApplicationRequest: CreateApplicationRequest;
|
|
218
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
219
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
220
|
+
status: 200;
|
|
221
|
+
data: ApplicationResponse;
|
|
222
|
+
}>(`/v1/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
|
|
223
|
+
...opts,
|
|
224
|
+
method: "PATCH",
|
|
225
|
+
body: createApplicationRequest
|
|
226
|
+
})));
|
|
227
|
+
}
|
|
228
|
+
export function listRuntimes({ limit, offset }: {
|
|
229
|
+
limit?: number;
|
|
230
|
+
offset?: number;
|
|
231
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
232
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
233
|
+
status: 200;
|
|
234
|
+
data: ListRuntimesResponse;
|
|
235
|
+
}>(`/v1/runtimes${QS.query(QS.explode({
|
|
236
|
+
limit,
|
|
237
|
+
offset
|
|
238
|
+
}))}`, {
|
|
239
|
+
...opts
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
242
|
+
export function getRuntimeById({ runtimeId }: {
|
|
243
|
+
runtimeId: string;
|
|
244
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
245
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
246
|
+
status: 200;
|
|
247
|
+
data: RuntimeResponse;
|
|
248
|
+
}>(`/v1/runtimes/${encodeURIComponent(runtimeId)}`, {
|
|
249
|
+
...opts
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
export function getRuntimeByApplicationId({ applicationId, limit, offset }: {
|
|
253
|
+
applicationId: string;
|
|
254
|
+
limit?: number;
|
|
255
|
+
offset?: number;
|
|
256
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
257
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
258
|
+
status: 200;
|
|
259
|
+
data: ListRuntimeByApplicationResponse;
|
|
260
|
+
}>(`/v1/runtimes/application/${encodeURIComponent(applicationId)}${QS.query(QS.explode({
|
|
261
|
+
limit,
|
|
262
|
+
offset
|
|
263
|
+
}))}`, {
|
|
264
|
+
...opts
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
267
|
+
export function getRegistryById({ registryId }: {
|
|
268
|
+
registryId: string;
|
|
269
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
270
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
271
|
+
status: 200;
|
|
272
|
+
data: GetRegistryByIdResponse;
|
|
273
|
+
}>(`/v1/registries/${encodeURIComponent(registryId)}`, {
|
|
274
|
+
...opts
|
|
275
|
+
}));
|
|
276
|
+
}
|
|
277
|
+
export function listRepositories({ registryId, limit, offset }: {
|
|
278
|
+
registryId: string;
|
|
279
|
+
limit?: number;
|
|
280
|
+
offset?: number;
|
|
281
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
282
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
283
|
+
status: 200;
|
|
284
|
+
data: ListRepositoryResponse;
|
|
285
|
+
}>(`/v1/registries/${encodeURIComponent(registryId)}/repositories${QS.query(QS.explode({
|
|
286
|
+
limit,
|
|
287
|
+
offset
|
|
288
|
+
}))}`, {
|
|
289
|
+
...opts
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
export function getRepositoryImages({ repositoryId }: {
|
|
293
|
+
repositoryId: string;
|
|
294
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
295
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
296
|
+
status: 200;
|
|
297
|
+
data: GetRepositoryImagesResponse;
|
|
298
|
+
}>(`/v1/registries/repositories/${encodeURIComponent(repositoryId)}/images`, {
|
|
299
|
+
...opts
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
export function getDeploymentStatus({ deploymentId }: {
|
|
303
|
+
deploymentId: string;
|
|
304
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
305
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
306
|
+
status: 200;
|
|
307
|
+
data: DeploymentStatusResponse;
|
|
308
|
+
}>(`/v1/deployments/${encodeURIComponent(deploymentId)}/status`, {
|
|
309
|
+
...opts
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
312
|
+
export function getDeploymentLogs({ deploymentId }: {
|
|
313
|
+
deploymentId: string;
|
|
314
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
315
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
316
|
+
status: 200;
|
|
317
|
+
data: DeploymentLogResponse;
|
|
318
|
+
}>(`/v1/deployments/${encodeURIComponent(deploymentId)}/logs`, {
|
|
319
|
+
...opts
|
|
320
|
+
}));
|
|
321
|
+
}
|
|
322
|
+
export function getDeploymentHealth({ deploymentId }: {
|
|
323
|
+
deploymentId: string;
|
|
324
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
325
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
326
|
+
status: 200;
|
|
327
|
+
data: DeploymentHealthResponse;
|
|
328
|
+
}>(`/v1/deployments/${encodeURIComponent(deploymentId)}/health`, {
|
|
329
|
+
...opts
|
|
330
|
+
}));
|
|
331
|
+
}
|
|
332
|
+
export function listDeployments({ applicationId }: {
|
|
333
|
+
applicationId: string;
|
|
334
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
335
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
336
|
+
status: 200;
|
|
337
|
+
data: BasicDeploymentResponse[];
|
|
338
|
+
}>(`/v1/deployments/${encodeURIComponent(applicationId)}`, {
|
|
339
|
+
...opts
|
|
340
|
+
}));
|
|
341
|
+
}
|
|
342
|
+
export function getDeployment({ deploymentId }: {
|
|
343
|
+
deploymentId: string;
|
|
344
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
345
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
346
|
+
status: 200;
|
|
347
|
+
data: DeploymentResponse;
|
|
348
|
+
}>(`/v1/deployments/details/${encodeURIComponent(deploymentId)}`, {
|
|
349
|
+
...opts
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
352
|
+
export function getApplicationHistory({ applicationId, limit, offset }: {
|
|
353
|
+
applicationId: string;
|
|
354
|
+
limit?: number;
|
|
355
|
+
offset?: number;
|
|
356
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
357
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
358
|
+
status: 200;
|
|
359
|
+
data: ListApplicationHistoryResponse;
|
|
360
|
+
}>(`/v1/applications/${encodeURIComponent(applicationId)}/history${QS.query(QS.explode({
|
|
361
|
+
limit,
|
|
362
|
+
offset
|
|
363
|
+
}))}`, {
|
|
364
|
+
...opts
|
|
365
|
+
}));
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* List applications.
|
|
369
|
+
*/
|
|
370
|
+
export function listApplications({ projectId, limit, offset, name }: {
|
|
371
|
+
projectId: string;
|
|
372
|
+
limit?: number;
|
|
373
|
+
offset?: number;
|
|
374
|
+
name?: string;
|
|
375
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
376
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
377
|
+
status: 200;
|
|
378
|
+
data: ListApplicationsResponse;
|
|
379
|
+
}>(`/v1/applications/project/${encodeURIComponent(projectId)}${QS.query(QS.explode({
|
|
380
|
+
limit,
|
|
381
|
+
offset,
|
|
382
|
+
name
|
|
383
|
+
}))}`, {
|
|
384
|
+
...opts
|
|
385
|
+
}));
|
|
386
|
+
}
|
package/src/api/workflows.ts
CHANGED
|
@@ -276,8 +276,14 @@ export type WorkspaceRequest = {
|
|
|
276
276
|
id: string;
|
|
277
277
|
slug: string;
|
|
278
278
|
};
|
|
279
|
+
export type ScmIntegrationRequest = {
|
|
280
|
+
repository_url: string;
|
|
281
|
+
provider: Provider;
|
|
282
|
+
workflow_name?: string;
|
|
283
|
+
};
|
|
279
284
|
export type CreateWorkflowExecutionRequest = {
|
|
280
285
|
workspace: WorkspaceRequest;
|
|
286
|
+
integration: ScmIntegrationRequest;
|
|
281
287
|
};
|
|
282
288
|
export type WorkflowExecutionStatus = "pending" | "in_progress" | "completed" | "suspended";
|
|
283
289
|
export type WorkflowExecutionConclusion = "error" | "success" | "skipped" | "canceled";
|
|
@@ -286,28 +292,19 @@ export type WorkflowExecutionResponse = {
|
|
|
286
292
|
status: WorkflowExecutionStatus;
|
|
287
293
|
conclusion: WorkflowExecutionConclusion | null;
|
|
288
294
|
};
|
|
289
|
-
export type WorkflowType = "starter" | "deploy" | "rollback" | "destroy";
|
|
295
|
+
export type WorkflowType = "starter" | "create" | "deploy" | "rollback" | "destroy";
|
|
290
296
|
export type StepWorkflowRequest = {
|
|
291
297
|
"type": "workflow";
|
|
292
298
|
name: string;
|
|
293
|
-
inputs: {
|
|
294
|
-
[key: string]: any | null;
|
|
295
|
-
};
|
|
296
299
|
jobs: JobRequest[];
|
|
297
300
|
};
|
|
298
301
|
export type StepActionRequest = {
|
|
299
302
|
"type": "action";
|
|
300
303
|
name: string;
|
|
301
|
-
inputs: {
|
|
302
|
-
[key: string]: any | null;
|
|
303
|
-
};
|
|
304
304
|
};
|
|
305
305
|
export type StepPluginRequest = {
|
|
306
306
|
"type": "plugin";
|
|
307
307
|
name: string;
|
|
308
|
-
inputs: {
|
|
309
|
-
[key: string]: any | null;
|
|
310
|
-
};
|
|
311
308
|
};
|
|
312
309
|
export type StepSuspendRequest = {
|
|
313
310
|
"type": "suspend";
|
|
@@ -347,9 +344,10 @@ export type PutWorkflowExecutionWorkflowStepRequest = {
|
|
|
347
344
|
reference: string;
|
|
348
345
|
status: WorkflowExecutionStatus;
|
|
349
346
|
conclusion?: WorkflowExecutionConclusion | null;
|
|
350
|
-
|
|
351
|
-
|
|
347
|
+
startedAt?: string | null;
|
|
348
|
+
completedAt?: string | null;
|
|
352
349
|
log?: string | null;
|
|
350
|
+
cliState?: object;
|
|
353
351
|
};
|
|
354
352
|
export type JobResponse2 = {
|
|
355
353
|
label: string;
|
|
@@ -378,34 +376,34 @@ export type GetWorkflowExecutionJobGraphResponse = {
|
|
|
378
376
|
workflow?: WorkflowResponse2 | null;
|
|
379
377
|
completedAt?: string | null;
|
|
380
378
|
};
|
|
381
|
-
export type
|
|
379
|
+
export type StepWorkflowResponse = {
|
|
382
380
|
"type"?: "workflow";
|
|
383
381
|
name: string;
|
|
384
382
|
inputs: {
|
|
385
383
|
[key: string]: any | null;
|
|
386
384
|
};
|
|
387
385
|
};
|
|
388
|
-
export type
|
|
386
|
+
export type StepActionResponse = {
|
|
389
387
|
"type"?: "action";
|
|
390
388
|
name: string;
|
|
391
389
|
inputs: {
|
|
392
390
|
[key: string]: any | null;
|
|
393
391
|
};
|
|
394
392
|
};
|
|
395
|
-
export type
|
|
393
|
+
export type StepPluginResponse = {
|
|
396
394
|
"type"?: "plugin";
|
|
397
395
|
name: string;
|
|
398
396
|
inputs: {
|
|
399
397
|
[key: string]: any | null;
|
|
400
398
|
};
|
|
401
399
|
};
|
|
402
|
-
export type
|
|
400
|
+
export type StepSuspendResponse = {};
|
|
403
401
|
export type StepResponse2 = {
|
|
404
402
|
label: string;
|
|
405
403
|
status: WorkflowExecutionStatus;
|
|
406
404
|
conclusion: WorkflowExecutionConclusion | null;
|
|
407
405
|
log?: string | null;
|
|
408
|
-
"type":
|
|
406
|
+
"type": StepWorkflowResponse | StepActionResponse | StepPluginResponse | StepSuspendResponse;
|
|
409
407
|
startedAt?: string | null;
|
|
410
408
|
completedAt?: string | null;
|
|
411
409
|
};
|
|
@@ -417,6 +415,27 @@ export type WorkflowJobDetailResponse = {
|
|
|
417
415
|
startedAt?: string | null;
|
|
418
416
|
completedAt?: string | null;
|
|
419
417
|
};
|
|
418
|
+
export type StepResponse3 = {
|
|
419
|
+
id: string;
|
|
420
|
+
cliState: object;
|
|
421
|
+
status: WorkflowExecutionStatus;
|
|
422
|
+
conclusion: WorkflowExecutionConclusion | null;
|
|
423
|
+
jobs: JobResponse3[];
|
|
424
|
+
};
|
|
425
|
+
export type JobResponse3 = {
|
|
426
|
+
id: string;
|
|
427
|
+
status: WorkflowExecutionStatus;
|
|
428
|
+
conclusion: WorkflowExecutionConclusion | null;
|
|
429
|
+
steps: StepResponse3[];
|
|
430
|
+
};
|
|
431
|
+
export type WorkflowResponse3 = {
|
|
432
|
+
jobs: JobResponse3[];
|
|
433
|
+
};
|
|
434
|
+
export type GetWorkflowExecutionCliStateResponse = {
|
|
435
|
+
workflow: WorkflowResponse3;
|
|
436
|
+
status: WorkflowExecutionStatus;
|
|
437
|
+
conclusion: WorkflowExecutionConclusion | null;
|
|
438
|
+
};
|
|
420
439
|
/**
|
|
421
440
|
* Run Action Service
|
|
422
441
|
*/
|
|
@@ -1034,3 +1053,109 @@ export function v1GetWorkflowExecutionJobDetailServiceV1ExecutionsExecutionIdJob
|
|
|
1034
1053
|
})
|
|
1035
1054
|
}));
|
|
1036
1055
|
}
|
|
1056
|
+
/**
|
|
1057
|
+
* V1 Accept Workflow Execution Job Suspended Service
|
|
1058
|
+
*/
|
|
1059
|
+
export function v1AcceptWorkflowExecutionJobSuspendedServiceV1ExecutionsExecutionIdJobsJobIdAcceptPost({ executionId, jobId, authorization }: {
|
|
1060
|
+
executionId: string;
|
|
1061
|
+
jobId: string;
|
|
1062
|
+
authorization: string;
|
|
1063
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1064
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1065
|
+
status: 200;
|
|
1066
|
+
data: GetWorkflowExecutionJobGraphResponse;
|
|
1067
|
+
} | {
|
|
1068
|
+
status: 400;
|
|
1069
|
+
data: HttpErrorResponse;
|
|
1070
|
+
} | {
|
|
1071
|
+
status: 401;
|
|
1072
|
+
data: HttpErrorResponse;
|
|
1073
|
+
} | {
|
|
1074
|
+
status: 404;
|
|
1075
|
+
data: HttpErrorResponse;
|
|
1076
|
+
} | {
|
|
1077
|
+
status: 422;
|
|
1078
|
+
} | {
|
|
1079
|
+
status: 500;
|
|
1080
|
+
data: HttpErrorResponse;
|
|
1081
|
+
} | {
|
|
1082
|
+
status: 503;
|
|
1083
|
+
data: HttpErrorResponse;
|
|
1084
|
+
}>(`/v1/executions/${encodeURIComponent(executionId)}/jobs/${encodeURIComponent(jobId)}/accept`, {
|
|
1085
|
+
...opts,
|
|
1086
|
+
method: "POST",
|
|
1087
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1088
|
+
authorization
|
|
1089
|
+
})
|
|
1090
|
+
}));
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* V1 Refuse Workflow Execution Job Suspended Service
|
|
1094
|
+
*/
|
|
1095
|
+
export function v1RefuseWorkflowExecutionJobSuspendedServiceV1ExecutionsExecutionIdJobsJobIdRefusePost({ executionId, jobId, authorization }: {
|
|
1096
|
+
executionId: string;
|
|
1097
|
+
jobId: string;
|
|
1098
|
+
authorization: string;
|
|
1099
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1100
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1101
|
+
status: 200;
|
|
1102
|
+
data: GetWorkflowExecutionJobGraphResponse;
|
|
1103
|
+
} | {
|
|
1104
|
+
status: 400;
|
|
1105
|
+
data: HttpErrorResponse;
|
|
1106
|
+
} | {
|
|
1107
|
+
status: 401;
|
|
1108
|
+
data: HttpErrorResponse;
|
|
1109
|
+
} | {
|
|
1110
|
+
status: 404;
|
|
1111
|
+
data: HttpErrorResponse;
|
|
1112
|
+
} | {
|
|
1113
|
+
status: 422;
|
|
1114
|
+
} | {
|
|
1115
|
+
status: 500;
|
|
1116
|
+
data: HttpErrorResponse;
|
|
1117
|
+
} | {
|
|
1118
|
+
status: 503;
|
|
1119
|
+
data: HttpErrorResponse;
|
|
1120
|
+
}>(`/v1/executions/${encodeURIComponent(executionId)}/jobs/${encodeURIComponent(jobId)}/refuse`, {
|
|
1121
|
+
...opts,
|
|
1122
|
+
method: "POST",
|
|
1123
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1124
|
+
authorization
|
|
1125
|
+
})
|
|
1126
|
+
}));
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* V1 Get Workflow Execution Cli State Service
|
|
1130
|
+
*/
|
|
1131
|
+
export function v1GetWorkflowExecutionCliStateServiceV1ExecutionsExecutionIdStateGet({ executionId, authorization }: {
|
|
1132
|
+
executionId: string;
|
|
1133
|
+
authorization: string;
|
|
1134
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1135
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1136
|
+
status: 200;
|
|
1137
|
+
data: GetWorkflowExecutionCliStateResponse;
|
|
1138
|
+
} | {
|
|
1139
|
+
status: 400;
|
|
1140
|
+
data: HttpErrorResponse;
|
|
1141
|
+
} | {
|
|
1142
|
+
status: 401;
|
|
1143
|
+
data: HttpErrorResponse;
|
|
1144
|
+
} | {
|
|
1145
|
+
status: 404;
|
|
1146
|
+
data: HttpErrorResponse;
|
|
1147
|
+
} | {
|
|
1148
|
+
status: 422;
|
|
1149
|
+
} | {
|
|
1150
|
+
status: 500;
|
|
1151
|
+
data: HttpErrorResponse;
|
|
1152
|
+
} | {
|
|
1153
|
+
status: 503;
|
|
1154
|
+
data: HttpErrorResponse;
|
|
1155
|
+
}>(`/v1/executions/${encodeURIComponent(executionId)}/state`, {
|
|
1156
|
+
...opts,
|
|
1157
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1158
|
+
authorization
|
|
1159
|
+
})
|
|
1160
|
+
}));
|
|
1161
|
+
}
|
package/src/apis.json
CHANGED
|
@@ -141,5 +141,13 @@
|
|
|
141
141
|
"prd": "https://account-notification-engine.stackspot.com"
|
|
142
142
|
},
|
|
143
143
|
"docs": "/v3/api-docs"
|
|
144
|
+
},
|
|
145
|
+
"cloudPlatform": {
|
|
146
|
+
"url": {
|
|
147
|
+
"dev": "https://cloud-cloud-platform-api.dev.stackspot.com",
|
|
148
|
+
"stg": "https://cloud-cloud-platform-api.stg.stackspot.com",
|
|
149
|
+
"prd": "https://cloud-cloud-platform-api.stackspot.com"
|
|
150
|
+
},
|
|
151
|
+
"docs": "/v3/api-docs"
|
|
144
152
|
}
|
|
145
153
|
}
|