@stack-spot/portal-network 0.76.0 → 0.77.1
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 +14 -0
- package/dist/api/cloudPlatform.d.ts +47 -3
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +30 -2
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/api/cloudPlatformHorizon.d.ts +265 -61
- package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
- package/dist/api/cloudPlatformHorizon.js +96 -7
- package/dist/api/cloudPlatformHorizon.js.map +1 -1
- package/dist/client/cloud-platform-horizon.d.ts +26 -1
- package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
- package/dist/client/cloud-platform-horizon.js +37 -1
- package/dist/client/cloud-platform-horizon.js.map +1 -1
- package/dist/client/cloud-platform.d.ts +16 -0
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +19 -1
- package/dist/client/cloud-platform.js.map +1 -1
- package/package.json +1 -1
- package/src/api/cloudPlatform.ts +82 -4
- package/src/api/cloudPlatformHorizon.ts +646 -128
- package/src/client/cloud-platform-horizon.ts +17 -1
- package/src/client/cloud-platform.ts +13 -3
|
@@ -14,156 +14,613 @@ const oazapfts = Oazapfts.runtime(defaults);
|
|
|
14
14
|
export const servers = {
|
|
15
15
|
generatedServerUrl: "https://cloud-platform-horizon.dev.stackspot.com"
|
|
16
16
|
};
|
|
17
|
-
export type ManifestoResource = {
|
|
18
|
-
apiVersion: string;
|
|
19
|
-
kind: string;
|
|
20
|
-
metadata: {
|
|
21
|
-
[key: string]: object;
|
|
22
|
-
};
|
|
23
|
-
spec: {
|
|
24
|
-
[key: string]: object;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export type ValidationDetails = {
|
|
28
|
-
code: string;
|
|
29
|
-
field: string;
|
|
30
|
-
values: string[];
|
|
31
|
-
};
|
|
32
|
-
export type ErrorBody = {
|
|
33
|
-
code: string;
|
|
34
|
-
details: string;
|
|
35
|
-
status: number;
|
|
36
|
-
validationDetails: ValidationDetails[];
|
|
37
|
-
};
|
|
38
|
-
export type StatusType = number;
|
|
39
17
|
export type NameValuePair = {
|
|
40
18
|
name: string;
|
|
41
19
|
value: string;
|
|
42
20
|
};
|
|
43
|
-
export type
|
|
44
|
-
id
|
|
21
|
+
export type MetadataResource = {
|
|
22
|
+
id?: string;
|
|
45
23
|
name: string;
|
|
46
24
|
tags: NameValuePair[];
|
|
47
25
|
labels: NameValuePair[];
|
|
48
26
|
};
|
|
49
|
-
export type
|
|
27
|
+
export type RuntimeTenantResource = {
|
|
50
28
|
name: string;
|
|
51
29
|
id: string;
|
|
52
|
-
|
|
30
|
+
kubeVersion: string;
|
|
53
31
|
status: string;
|
|
54
32
|
tags: NameValuePair[];
|
|
55
33
|
labels: NameValuePair[];
|
|
56
34
|
};
|
|
57
|
-
export type
|
|
35
|
+
export type ControlPlaneStatusResource = {
|
|
58
36
|
health: string;
|
|
59
37
|
control: string;
|
|
60
38
|
};
|
|
61
|
-
export type
|
|
39
|
+
export type AddonResource = {
|
|
62
40
|
name: string;
|
|
63
41
|
};
|
|
64
|
-
export type
|
|
42
|
+
export type ControlPlaneResource = {
|
|
65
43
|
id: string;
|
|
66
44
|
version: string;
|
|
67
|
-
status:
|
|
68
|
-
addons:
|
|
45
|
+
status: ControlPlaneStatusResource;
|
|
46
|
+
addons: AddonResource[];
|
|
69
47
|
};
|
|
70
|
-
export type
|
|
71
|
-
runtimes:
|
|
72
|
-
|
|
48
|
+
export type TenantStatusResource = {
|
|
49
|
+
runtimes: RuntimeTenantResource[];
|
|
50
|
+
controlPlane: ControlPlaneResource[];
|
|
73
51
|
};
|
|
74
52
|
export type TenantResource = {
|
|
75
53
|
apiVersion: string;
|
|
76
54
|
kind: string;
|
|
77
|
-
metadata:
|
|
78
|
-
status:
|
|
55
|
+
metadata: MetadataResource;
|
|
56
|
+
status: TenantStatusResource;
|
|
57
|
+
};
|
|
58
|
+
export type ValidationDetail = {
|
|
59
|
+
code: string;
|
|
60
|
+
values: string[];
|
|
61
|
+
};
|
|
62
|
+
export type ErrorBody = {
|
|
63
|
+
code: string;
|
|
64
|
+
details: string;
|
|
65
|
+
status: string;
|
|
66
|
+
validationDetails?: ValidationDetail[];
|
|
67
|
+
};
|
|
68
|
+
export type FromRef = {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
export type IamRoles = {
|
|
72
|
+
clusterRole: string;
|
|
73
|
+
clusterNodeGroup: string;
|
|
74
|
+
clusterAdminRoles: string[];
|
|
75
|
+
crossplane: string;
|
|
76
|
+
argocd: string;
|
|
77
|
+
karpenter: string;
|
|
78
|
+
stackspotCloudPlatformAgent: string;
|
|
79
|
+
stackspotCloudPlatformManager: string;
|
|
80
|
+
stackspotCloudPlatformGateway: string;
|
|
81
|
+
};
|
|
82
|
+
export type CloudAccountConfiguration = {
|
|
83
|
+
fromRef?: FromRef;
|
|
84
|
+
cloudProvider?: string;
|
|
85
|
+
accountId?: string;
|
|
86
|
+
region?: string;
|
|
87
|
+
vpcId?: string;
|
|
88
|
+
subnetIds?: string[];
|
|
89
|
+
customAmi?: string;
|
|
90
|
+
iamRoles?: IamRoles;
|
|
91
|
+
};
|
|
92
|
+
export type Addon = {
|
|
93
|
+
name: string;
|
|
94
|
+
};
|
|
95
|
+
export type Kubernetes = {
|
|
96
|
+
publicAccess: boolean;
|
|
97
|
+
version: string;
|
|
98
|
+
publicCidrsAllowed: string[];
|
|
99
|
+
extraCidrsInbound: string[];
|
|
100
|
+
};
|
|
101
|
+
export type NodeGroup = {
|
|
102
|
+
volumeSize: number;
|
|
103
|
+
amiType: string;
|
|
104
|
+
capacityType: string;
|
|
105
|
+
desiredSize: number;
|
|
106
|
+
maxSize: number;
|
|
107
|
+
minSize: number;
|
|
108
|
+
};
|
|
109
|
+
export type StackspotCloudPlatform = {
|
|
110
|
+
createIamRoles: boolean;
|
|
111
|
+
};
|
|
112
|
+
export type ControlPlane = {
|
|
113
|
+
addons: Addon[];
|
|
114
|
+
instanceTypes: string[];
|
|
115
|
+
kubernetes: Kubernetes;
|
|
116
|
+
nodeGroup: NodeGroup;
|
|
117
|
+
stackspotCloudPlatform: StackspotCloudPlatform;
|
|
118
|
+
crossplaneNamespace: string;
|
|
119
|
+
};
|
|
120
|
+
export type TenantSpecResource = {
|
|
121
|
+
organizationId: string;
|
|
122
|
+
cloudAccountConfiguration: CloudAccountConfiguration;
|
|
123
|
+
controlPlane: ControlPlane;
|
|
124
|
+
};
|
|
125
|
+
export type TenantDefinitionResource = {
|
|
126
|
+
apiVersion: string;
|
|
127
|
+
kind: string;
|
|
128
|
+
metadata: MetadataResource;
|
|
129
|
+
spec: TenantSpecResource;
|
|
79
130
|
};
|
|
80
|
-
export type
|
|
131
|
+
export type ApplicationDeploymentStatusResource = {
|
|
81
132
|
name: string;
|
|
82
133
|
id: string;
|
|
83
|
-
|
|
134
|
+
appVersion: string;
|
|
84
135
|
status: string;
|
|
85
136
|
tags: NameValuePair[];
|
|
86
137
|
labels: NameValuePair[];
|
|
87
138
|
};
|
|
88
|
-
export type
|
|
139
|
+
export type KubeResource = {
|
|
89
140
|
status: string;
|
|
90
141
|
id: string;
|
|
91
142
|
version: string;
|
|
92
|
-
addons:
|
|
143
|
+
addons: AddonResource[];
|
|
93
144
|
};
|
|
94
|
-
export type
|
|
95
|
-
|
|
96
|
-
kube:
|
|
145
|
+
export type RuntimeStatusResource = {
|
|
146
|
+
applicationDeployments: ApplicationDeploymentStatusResource[];
|
|
147
|
+
kube: KubeResource;
|
|
97
148
|
};
|
|
98
149
|
export type RuntimeResource = {
|
|
99
150
|
apiVersion: string;
|
|
100
151
|
kind: string;
|
|
101
|
-
metadata:
|
|
102
|
-
status:
|
|
152
|
+
metadata: MetadataResource;
|
|
153
|
+
status: RuntimeStatusResource;
|
|
154
|
+
};
|
|
155
|
+
export type RuntimeSpecResource = {
|
|
156
|
+
tenantId: string;
|
|
157
|
+
/** Cloud account configuration. Either set fromRef to use a existing configuration or set each value to use a different one. */
|
|
158
|
+
cloudAccountConfiguration: CloudAccountConfiguration;
|
|
159
|
+
controlPlane: ControlPlane;
|
|
103
160
|
};
|
|
104
|
-
export type
|
|
161
|
+
export type RuntimeDefinitionResource = {
|
|
162
|
+
apiVersion: string;
|
|
163
|
+
kind: string;
|
|
164
|
+
metadata: MetadataResource;
|
|
165
|
+
spec: RuntimeSpecResource;
|
|
166
|
+
};
|
|
167
|
+
export type TenantControlPlaneResource = {
|
|
105
168
|
status: string;
|
|
106
169
|
version: string;
|
|
107
170
|
};
|
|
108
|
-
export type
|
|
171
|
+
export type TenantWithControlPlaneResource = {
|
|
109
172
|
name: string;
|
|
110
173
|
id: string;
|
|
111
|
-
|
|
174
|
+
controlPlane: TenantControlPlaneResource;
|
|
112
175
|
};
|
|
113
|
-
export type
|
|
176
|
+
export type ControlPlaneWithStatusResource = {
|
|
114
177
|
id: string;
|
|
115
178
|
version: string;
|
|
116
|
-
status:
|
|
179
|
+
status: ControlPlaneStatusResource;
|
|
117
180
|
};
|
|
118
|
-
export type
|
|
119
|
-
tenants:
|
|
120
|
-
|
|
181
|
+
export type OrganizationStatusResource = {
|
|
182
|
+
tenants: TenantWithControlPlaneResource[];
|
|
183
|
+
controlPlanes: ControlPlaneWithStatusResource[];
|
|
121
184
|
};
|
|
122
185
|
export type OrganizationResource = {
|
|
123
186
|
apiVersion: string;
|
|
124
187
|
kind: string;
|
|
125
|
-
metadata:
|
|
126
|
-
status:
|
|
188
|
+
metadata: MetadataResource;
|
|
189
|
+
status: OrganizationStatusResource;
|
|
190
|
+
};
|
|
191
|
+
export type OrganizationDefinitionResource = {
|
|
192
|
+
apiVersion: string;
|
|
193
|
+
kind: string;
|
|
194
|
+
metadata: MetadataResource;
|
|
195
|
+
};
|
|
196
|
+
export type Service = {
|
|
197
|
+
port: number;
|
|
198
|
+
"type": string;
|
|
199
|
+
};
|
|
200
|
+
export type Hpa = {
|
|
201
|
+
min: number;
|
|
202
|
+
max: number;
|
|
203
|
+
};
|
|
204
|
+
export type Resources = {
|
|
205
|
+
cpu: string;
|
|
206
|
+
memory: string;
|
|
207
|
+
volumeSize: string;
|
|
208
|
+
};
|
|
209
|
+
export type Env = {
|
|
210
|
+
name: string;
|
|
211
|
+
value: string;
|
|
212
|
+
};
|
|
213
|
+
export type SecretEnv = {
|
|
214
|
+
name: string;
|
|
215
|
+
secretName: string;
|
|
216
|
+
secretKey: string;
|
|
217
|
+
};
|
|
218
|
+
export type Probe = {
|
|
219
|
+
port: number;
|
|
220
|
+
path: string;
|
|
221
|
+
};
|
|
222
|
+
export type Health = {
|
|
223
|
+
readiness: Probe;
|
|
224
|
+
liveness: Probe;
|
|
225
|
+
startupProbe: Probe;
|
|
226
|
+
};
|
|
227
|
+
export type Container = {
|
|
228
|
+
port: number;
|
|
229
|
+
resources: Resources;
|
|
230
|
+
env?: Env[];
|
|
231
|
+
secretEnv?: SecretEnv[];
|
|
232
|
+
health: Health;
|
|
233
|
+
};
|
|
234
|
+
export type BlueprintValues = {
|
|
235
|
+
dockerImage: string;
|
|
236
|
+
dockerImageTag: string;
|
|
237
|
+
service: Service;
|
|
238
|
+
hpa: Hpa;
|
|
239
|
+
container: Container;
|
|
240
|
+
};
|
|
241
|
+
export type Spec = {
|
|
242
|
+
blueprint: string;
|
|
243
|
+
runtimeId: string;
|
|
244
|
+
blueprintValues: BlueprintValues;
|
|
245
|
+
};
|
|
246
|
+
export type ApplicationDeploymentResource = {
|
|
247
|
+
apiVersion: string;
|
|
248
|
+
kind: string;
|
|
249
|
+
metadata: MetadataResource;
|
|
250
|
+
spec: Spec;
|
|
251
|
+
};
|
|
252
|
+
export type ManifestResource = {
|
|
253
|
+
apiVersion: string;
|
|
254
|
+
kind: string;
|
|
255
|
+
metadata: {
|
|
256
|
+
[key: string]: object;
|
|
257
|
+
};
|
|
258
|
+
spec?: {
|
|
259
|
+
[key: string]: object;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
export type LogSpecResource = {
|
|
263
|
+
"type": string;
|
|
264
|
+
resourceId: string;
|
|
265
|
+
controlPlaneId: string;
|
|
266
|
+
name: string;
|
|
267
|
+
numberOfLines: number;
|
|
268
|
+
};
|
|
269
|
+
export type LogStatusResource = {
|
|
270
|
+
fetchLogsTimestamp?: string;
|
|
271
|
+
logs: string[];
|
|
272
|
+
};
|
|
273
|
+
export type LogResource = {
|
|
274
|
+
apiVersion: string;
|
|
275
|
+
metadata: MetadataResource;
|
|
276
|
+
spec: LogSpecResource;
|
|
277
|
+
status?: LogStatusResource;
|
|
278
|
+
kind: string;
|
|
127
279
|
};
|
|
128
280
|
/**
|
|
129
|
-
*
|
|
281
|
+
* Returns paginated tenants.
|
|
130
282
|
*/
|
|
131
|
-
export function
|
|
132
|
-
|
|
283
|
+
export function listTenants({ page, perPage }: {
|
|
284
|
+
page?: number;
|
|
285
|
+
perPage?: number;
|
|
286
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
287
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
288
|
+
status: 200;
|
|
289
|
+
data: TenantResource[];
|
|
290
|
+
} | {
|
|
291
|
+
status: 400;
|
|
292
|
+
data: ErrorBody;
|
|
293
|
+
} | {
|
|
294
|
+
status: 403;
|
|
295
|
+
data: ErrorBody;
|
|
296
|
+
} | {
|
|
297
|
+
status: 404;
|
|
298
|
+
data: ErrorBody;
|
|
299
|
+
} | {
|
|
300
|
+
status: 422;
|
|
301
|
+
data: {
|
|
302
|
+
code?: string;
|
|
303
|
+
details?: string;
|
|
304
|
+
status?: string;
|
|
305
|
+
validationDetails?: ValidationDetail[];
|
|
306
|
+
};
|
|
307
|
+
} | {
|
|
308
|
+
status: 500;
|
|
309
|
+
data: {
|
|
310
|
+
code?: string;
|
|
311
|
+
details?: string;
|
|
312
|
+
status?: string;
|
|
313
|
+
validationDetails?: ValidationDetail[];
|
|
314
|
+
};
|
|
315
|
+
}>(`/v1/tenants${QS.query(QS.explode({
|
|
316
|
+
page,
|
|
317
|
+
perPage
|
|
318
|
+
}))}`, {
|
|
319
|
+
...opts
|
|
320
|
+
}));
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Creates a new tenant.
|
|
324
|
+
*/
|
|
325
|
+
export function createTenant({ tenantDefinitionResource }: {
|
|
326
|
+
tenantDefinitionResource: TenantDefinitionResource;
|
|
327
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
328
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
329
|
+
status: 201;
|
|
330
|
+
} | {
|
|
331
|
+
status: 400;
|
|
332
|
+
data: ErrorBody;
|
|
333
|
+
} | {
|
|
334
|
+
status: 403;
|
|
335
|
+
data: ErrorBody;
|
|
336
|
+
} | {
|
|
337
|
+
status: 404;
|
|
338
|
+
data: ErrorBody;
|
|
339
|
+
} | {
|
|
340
|
+
status: 422;
|
|
341
|
+
data: {
|
|
342
|
+
code?: string;
|
|
343
|
+
details?: string;
|
|
344
|
+
status?: string;
|
|
345
|
+
validationDetails?: ValidationDetail[];
|
|
346
|
+
};
|
|
347
|
+
} | {
|
|
348
|
+
status: 500;
|
|
349
|
+
data: {
|
|
350
|
+
code?: string;
|
|
351
|
+
details?: string;
|
|
352
|
+
status?: string;
|
|
353
|
+
validationDetails?: ValidationDetail[];
|
|
354
|
+
};
|
|
355
|
+
}>("/v1/tenants", oazapfts.json({
|
|
356
|
+
...opts,
|
|
357
|
+
method: "POST",
|
|
358
|
+
body: tenantDefinitionResource
|
|
359
|
+
})));
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Returns paginated runtimes.
|
|
363
|
+
*/
|
|
364
|
+
export function listRuntimes({ page, perPage }: {
|
|
365
|
+
page?: number;
|
|
366
|
+
perPage?: number;
|
|
367
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
368
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
369
|
+
status: 200;
|
|
370
|
+
data: RuntimeResource[];
|
|
371
|
+
} | {
|
|
372
|
+
status: 400;
|
|
373
|
+
data: ErrorBody;
|
|
374
|
+
} | {
|
|
375
|
+
status: 403;
|
|
376
|
+
data: ErrorBody;
|
|
377
|
+
} | {
|
|
378
|
+
status: 404;
|
|
379
|
+
data: ErrorBody;
|
|
380
|
+
} | {
|
|
381
|
+
status: 422;
|
|
382
|
+
data: {
|
|
383
|
+
code?: string;
|
|
384
|
+
details?: string;
|
|
385
|
+
status?: string;
|
|
386
|
+
validationDetails?: ValidationDetail[];
|
|
387
|
+
};
|
|
388
|
+
} | {
|
|
389
|
+
status: 500;
|
|
390
|
+
data: {
|
|
391
|
+
code?: string;
|
|
392
|
+
details?: string;
|
|
393
|
+
status?: string;
|
|
394
|
+
validationDetails?: ValidationDetail[];
|
|
395
|
+
};
|
|
396
|
+
}>(`/v1/runtimes${QS.query(QS.explode({
|
|
397
|
+
page,
|
|
398
|
+
perPage
|
|
399
|
+
}))}`, {
|
|
400
|
+
...opts
|
|
401
|
+
}));
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Creates a new runtime.
|
|
405
|
+
*/
|
|
406
|
+
export function createRuntime({ runtimeDefinitionResource }: {
|
|
407
|
+
runtimeDefinitionResource: RuntimeDefinitionResource;
|
|
408
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
409
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
410
|
+
status: 201;
|
|
411
|
+
} | {
|
|
412
|
+
status: 400;
|
|
413
|
+
data: ErrorBody;
|
|
414
|
+
} | {
|
|
415
|
+
status: 403;
|
|
416
|
+
data: ErrorBody;
|
|
417
|
+
} | {
|
|
418
|
+
status: 404;
|
|
419
|
+
data: ErrorBody;
|
|
420
|
+
} | {
|
|
421
|
+
status: 422;
|
|
422
|
+
data: {
|
|
423
|
+
code?: string;
|
|
424
|
+
details?: string;
|
|
425
|
+
status?: string;
|
|
426
|
+
validationDetails?: ValidationDetail[];
|
|
427
|
+
};
|
|
428
|
+
} | {
|
|
429
|
+
status: 500;
|
|
430
|
+
data: {
|
|
431
|
+
code?: string;
|
|
432
|
+
details?: string;
|
|
433
|
+
status?: string;
|
|
434
|
+
validationDetails?: ValidationDetail[];
|
|
435
|
+
};
|
|
436
|
+
}>("/v1/runtimes", oazapfts.json({
|
|
437
|
+
...opts,
|
|
438
|
+
method: "POST",
|
|
439
|
+
body: runtimeDefinitionResource
|
|
440
|
+
})));
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Retrieves the organization details.
|
|
444
|
+
*/
|
|
445
|
+
export function getOrganization(opts?: Oazapfts.RequestOpts) {
|
|
446
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
447
|
+
status: 200;
|
|
448
|
+
data: OrganizationResource;
|
|
449
|
+
} | {
|
|
450
|
+
status: 400;
|
|
451
|
+
data: ErrorBody;
|
|
452
|
+
} | {
|
|
453
|
+
status: 403;
|
|
454
|
+
data: ErrorBody;
|
|
455
|
+
} | {
|
|
456
|
+
status: 404;
|
|
457
|
+
data: ErrorBody;
|
|
458
|
+
} | {
|
|
459
|
+
status: 422;
|
|
460
|
+
data: {
|
|
461
|
+
code?: string;
|
|
462
|
+
details?: string;
|
|
463
|
+
status?: string;
|
|
464
|
+
validationDetails?: ValidationDetail[];
|
|
465
|
+
};
|
|
466
|
+
} | {
|
|
467
|
+
status: 500;
|
|
468
|
+
data: {
|
|
469
|
+
code?: string;
|
|
470
|
+
details?: string;
|
|
471
|
+
status?: string;
|
|
472
|
+
validationDetails?: ValidationDetail[];
|
|
473
|
+
};
|
|
474
|
+
}>("/v1/organizations", {
|
|
475
|
+
...opts
|
|
476
|
+
}));
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Creates a new organization.
|
|
480
|
+
*/
|
|
481
|
+
export function createOrganization({ organizationDefinitionResource }: {
|
|
482
|
+
organizationDefinitionResource: OrganizationDefinitionResource;
|
|
483
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
484
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
485
|
+
status: 201;
|
|
486
|
+
} | {
|
|
487
|
+
status: 400;
|
|
488
|
+
data: ErrorBody;
|
|
489
|
+
} | {
|
|
490
|
+
status: 403;
|
|
491
|
+
data: ErrorBody;
|
|
492
|
+
} | {
|
|
493
|
+
status: 404;
|
|
494
|
+
data: ErrorBody;
|
|
495
|
+
} | {
|
|
496
|
+
status: 422;
|
|
497
|
+
data: {
|
|
498
|
+
code?: string;
|
|
499
|
+
details?: string;
|
|
500
|
+
status?: string;
|
|
501
|
+
validationDetails?: ValidationDetail[];
|
|
502
|
+
};
|
|
503
|
+
} | {
|
|
504
|
+
status: 500;
|
|
505
|
+
data: {
|
|
506
|
+
code?: string;
|
|
507
|
+
details?: string;
|
|
508
|
+
status?: string;
|
|
509
|
+
validationDetails?: ValidationDetail[];
|
|
510
|
+
};
|
|
511
|
+
}>("/v1/organizations", oazapfts.json({
|
|
512
|
+
...opts,
|
|
513
|
+
method: "POST",
|
|
514
|
+
body: organizationDefinitionResource
|
|
515
|
+
})));
|
|
516
|
+
}
|
|
517
|
+
export function listApplicationDeployments(opts?: Oazapfts.RequestOpts) {
|
|
518
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
519
|
+
status: 200;
|
|
520
|
+
data: ApplicationDeploymentResource[];
|
|
521
|
+
} | {
|
|
522
|
+
status: 400;
|
|
523
|
+
data: ErrorBody;
|
|
524
|
+
} | {
|
|
525
|
+
status: 404;
|
|
526
|
+
data: ErrorBody;
|
|
527
|
+
} | {
|
|
528
|
+
status: 422;
|
|
529
|
+
data: {
|
|
530
|
+
code?: string;
|
|
531
|
+
details?: string;
|
|
532
|
+
status?: string;
|
|
533
|
+
validationDetails?: ValidationDetail[];
|
|
534
|
+
};
|
|
535
|
+
} | {
|
|
536
|
+
status: 500;
|
|
537
|
+
data: {
|
|
538
|
+
code?: string;
|
|
539
|
+
details?: string;
|
|
540
|
+
status?: string;
|
|
541
|
+
validationDetails?: ValidationDetail[];
|
|
542
|
+
};
|
|
543
|
+
}>("/v1/applications/deployments", {
|
|
544
|
+
...opts
|
|
545
|
+
}));
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Apply manifesto resource yaml.
|
|
549
|
+
*/
|
|
550
|
+
export function deploy({ applicationDeploymentResource }: {
|
|
551
|
+
applicationDeploymentResource: ApplicationDeploymentResource;
|
|
552
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
553
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
554
|
+
status: 202;
|
|
555
|
+
data: ApplicationDeploymentResource;
|
|
556
|
+
} | {
|
|
557
|
+
status: 400;
|
|
558
|
+
data: ErrorBody;
|
|
559
|
+
} | {
|
|
560
|
+
status: 403;
|
|
561
|
+
data: ErrorBody;
|
|
562
|
+
} | {
|
|
563
|
+
status: 404;
|
|
564
|
+
data: ErrorBody;
|
|
565
|
+
} | {
|
|
566
|
+
status: 422;
|
|
567
|
+
data: {
|
|
568
|
+
code?: string;
|
|
569
|
+
details?: string;
|
|
570
|
+
status?: string;
|
|
571
|
+
validationDetails?: ValidationDetail[];
|
|
572
|
+
};
|
|
573
|
+
} | {
|
|
574
|
+
status: 500;
|
|
575
|
+
data: {
|
|
576
|
+
code?: string;
|
|
577
|
+
details?: string;
|
|
578
|
+
status?: string;
|
|
579
|
+
validationDetails?: ValidationDetail[];
|
|
580
|
+
};
|
|
581
|
+
}>("/v1/applications/deployments", oazapfts.json({
|
|
582
|
+
...opts,
|
|
583
|
+
method: "POST",
|
|
584
|
+
body: applicationDeploymentResource
|
|
585
|
+
})));
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Applies a manifest to the control plane.
|
|
589
|
+
*/
|
|
590
|
+
export function apply({ manifestResource }: {
|
|
591
|
+
manifestResource: ManifestResource;
|
|
133
592
|
}, opts?: Oazapfts.RequestOpts) {
|
|
134
593
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
135
594
|
status: 202;
|
|
595
|
+
} | {
|
|
596
|
+
status: 400;
|
|
597
|
+
data: ErrorBody;
|
|
136
598
|
} | {
|
|
137
599
|
status: 403;
|
|
138
600
|
data: ErrorBody;
|
|
601
|
+
} | {
|
|
602
|
+
status: 404;
|
|
603
|
+
data: ErrorBody;
|
|
139
604
|
} | {
|
|
140
605
|
status: 422;
|
|
141
606
|
data: {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
};
|
|
147
|
-
title?: string;
|
|
148
|
-
status?: StatusType;
|
|
149
|
-
detail?: string;
|
|
607
|
+
code?: string;
|
|
608
|
+
details?: string;
|
|
609
|
+
status?: string;
|
|
610
|
+
validationDetails?: ValidationDetail[];
|
|
150
611
|
};
|
|
151
612
|
} | {
|
|
152
613
|
status: 500;
|
|
153
614
|
data: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
title?: string;
|
|
160
|
-
status?: StatusType;
|
|
161
|
-
detail?: string;
|
|
615
|
+
code?: string;
|
|
616
|
+
details?: string;
|
|
617
|
+
status?: string;
|
|
618
|
+
validationDetails?: ValidationDetail[];
|
|
162
619
|
};
|
|
163
620
|
}>("/v1/admin/control-plane/apply", oazapfts.json({
|
|
164
621
|
...opts,
|
|
165
622
|
method: "POST",
|
|
166
|
-
body:
|
|
623
|
+
body: manifestResource
|
|
167
624
|
})));
|
|
168
625
|
}
|
|
169
626
|
/**
|
|
@@ -175,39 +632,37 @@ export function getTenant({ id }: {
|
|
|
175
632
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
176
633
|
status: 200;
|
|
177
634
|
data: TenantResource;
|
|
635
|
+
} | {
|
|
636
|
+
status: 400;
|
|
637
|
+
data: ErrorBody;
|
|
178
638
|
} | {
|
|
179
639
|
status: 403;
|
|
180
640
|
data: ErrorBody;
|
|
641
|
+
} | {
|
|
642
|
+
status: 404;
|
|
643
|
+
data: ErrorBody;
|
|
181
644
|
} | {
|
|
182
645
|
status: 422;
|
|
183
646
|
data: {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
};
|
|
189
|
-
title?: string;
|
|
190
|
-
status?: StatusType;
|
|
191
|
-
detail?: string;
|
|
647
|
+
code?: string;
|
|
648
|
+
details?: string;
|
|
649
|
+
status?: string;
|
|
650
|
+
validationDetails?: ValidationDetail[];
|
|
192
651
|
};
|
|
193
652
|
} | {
|
|
194
653
|
status: 500;
|
|
195
654
|
data: {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
};
|
|
201
|
-
title?: string;
|
|
202
|
-
status?: StatusType;
|
|
203
|
-
detail?: string;
|
|
655
|
+
code?: string;
|
|
656
|
+
details?: string;
|
|
657
|
+
status?: string;
|
|
658
|
+
validationDetails?: ValidationDetail[];
|
|
204
659
|
};
|
|
205
660
|
}>(`/v1/tenants/${encodeURIComponent(id)}`, {
|
|
206
661
|
...opts
|
|
207
662
|
}));
|
|
208
663
|
}
|
|
209
664
|
/**
|
|
210
|
-
*
|
|
665
|
+
* Retrieves the runtime details.
|
|
211
666
|
*/
|
|
212
667
|
export function getRuntime({ id }: {
|
|
213
668
|
id: string;
|
|
@@ -215,44 +670,48 @@ export function getRuntime({ id }: {
|
|
|
215
670
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
216
671
|
status: 200;
|
|
217
672
|
data: RuntimeResource;
|
|
673
|
+
} | {
|
|
674
|
+
status: 400;
|
|
675
|
+
data: ErrorBody;
|
|
218
676
|
} | {
|
|
219
677
|
status: 403;
|
|
220
678
|
data: ErrorBody;
|
|
679
|
+
} | {
|
|
680
|
+
status: 404;
|
|
681
|
+
data: ErrorBody;
|
|
221
682
|
} | {
|
|
222
683
|
status: 422;
|
|
223
684
|
data: {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
};
|
|
229
|
-
title?: string;
|
|
230
|
-
status?: StatusType;
|
|
231
|
-
detail?: string;
|
|
685
|
+
code?: string;
|
|
686
|
+
details?: string;
|
|
687
|
+
status?: string;
|
|
688
|
+
validationDetails?: ValidationDetail[];
|
|
232
689
|
};
|
|
233
690
|
} | {
|
|
234
691
|
status: 500;
|
|
235
692
|
data: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
};
|
|
241
|
-
title?: string;
|
|
242
|
-
status?: StatusType;
|
|
243
|
-
detail?: string;
|
|
693
|
+
code?: string;
|
|
694
|
+
details?: string;
|
|
695
|
+
status?: string;
|
|
696
|
+
validationDetails?: ValidationDetail[];
|
|
244
697
|
};
|
|
245
698
|
}>(`/v1/runtimes/${encodeURIComponent(id)}`, {
|
|
246
699
|
...opts
|
|
247
700
|
}));
|
|
248
701
|
}
|
|
249
702
|
/**
|
|
250
|
-
*
|
|
703
|
+
* Returns paginated organizations.
|
|
251
704
|
*/
|
|
252
|
-
export function
|
|
705
|
+
export function listOrganizations({ page, perPage }: {
|
|
706
|
+
page?: number;
|
|
707
|
+
perPage?: number;
|
|
708
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
253
709
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
254
710
|
status: 200;
|
|
255
|
-
data: OrganizationResource;
|
|
711
|
+
data: OrganizationResource[];
|
|
712
|
+
} | {
|
|
713
|
+
status: 400;
|
|
714
|
+
data: ErrorBody;
|
|
256
715
|
} | {
|
|
257
716
|
status: 403;
|
|
258
717
|
data: ErrorBody;
|
|
@@ -262,28 +721,87 @@ export function getOrganization(opts?: Oazapfts.RequestOpts) {
|
|
|
262
721
|
} | {
|
|
263
722
|
status: 422;
|
|
264
723
|
data: {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
};
|
|
270
|
-
title?: string;
|
|
271
|
-
status?: StatusType;
|
|
272
|
-
detail?: string;
|
|
724
|
+
code?: string;
|
|
725
|
+
details?: string;
|
|
726
|
+
status?: string;
|
|
727
|
+
validationDetails?: ValidationDetail[];
|
|
273
728
|
};
|
|
274
729
|
} | {
|
|
275
730
|
status: 500;
|
|
276
731
|
data: {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
};
|
|
282
|
-
title?: string;
|
|
283
|
-
status?: StatusType;
|
|
284
|
-
detail?: string;
|
|
732
|
+
code?: string;
|
|
733
|
+
details?: string;
|
|
734
|
+
status?: string;
|
|
735
|
+
validationDetails?: ValidationDetail[];
|
|
285
736
|
};
|
|
286
|
-
}>(
|
|
737
|
+
}>(`/v1/organizations/list${QS.query(QS.explode({
|
|
738
|
+
page,
|
|
739
|
+
perPage
|
|
740
|
+
}))}`, {
|
|
741
|
+
...opts
|
|
742
|
+
}));
|
|
743
|
+
}
|
|
744
|
+
export function findApplicationDeploymentById({ deploymentId }: {
|
|
745
|
+
deploymentId: string;
|
|
746
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
747
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
748
|
+
status: 200;
|
|
749
|
+
data: ApplicationDeploymentResource;
|
|
750
|
+
} | {
|
|
751
|
+
status: 400;
|
|
752
|
+
data: ErrorBody;
|
|
753
|
+
} | {
|
|
754
|
+
status: 404;
|
|
755
|
+
data: ErrorBody;
|
|
756
|
+
} | {
|
|
757
|
+
status: 422;
|
|
758
|
+
data: {
|
|
759
|
+
code?: string;
|
|
760
|
+
details?: string;
|
|
761
|
+
status?: string;
|
|
762
|
+
validationDetails?: ValidationDetail[];
|
|
763
|
+
};
|
|
764
|
+
} | {
|
|
765
|
+
status: 500;
|
|
766
|
+
data: {
|
|
767
|
+
code?: string;
|
|
768
|
+
details?: string;
|
|
769
|
+
status?: string;
|
|
770
|
+
validationDetails?: ValidationDetail[];
|
|
771
|
+
};
|
|
772
|
+
}>(`/v1/applications/deployments/${encodeURIComponent(deploymentId)}`, {
|
|
773
|
+
...opts
|
|
774
|
+
}));
|
|
775
|
+
}
|
|
776
|
+
export function getApplicationDeploymentLogs({ deploymentId }: {
|
|
777
|
+
deploymentId: string;
|
|
778
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
779
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
780
|
+
status: 200;
|
|
781
|
+
data: LogResource;
|
|
782
|
+
} | {
|
|
783
|
+
status: 400;
|
|
784
|
+
data: ErrorBody;
|
|
785
|
+
} | {
|
|
786
|
+
status: 404;
|
|
787
|
+
data: ErrorBody;
|
|
788
|
+
} | {
|
|
789
|
+
status: 422;
|
|
790
|
+
data: {
|
|
791
|
+
code?: string;
|
|
792
|
+
details?: string;
|
|
793
|
+
status?: string;
|
|
794
|
+
validationDetails?: ValidationDetail[];
|
|
795
|
+
};
|
|
796
|
+
} | {
|
|
797
|
+
status: 500;
|
|
798
|
+
data: {
|
|
799
|
+
code?: string;
|
|
800
|
+
details?: string;
|
|
801
|
+
status?: string;
|
|
802
|
+
validationDetails?: ValidationDetail[];
|
|
803
|
+
};
|
|
804
|
+
}>(`/v1/applications/deployments/${encodeURIComponent(deploymentId)}/logs`, {
|
|
287
805
|
...opts
|
|
288
806
|
}));
|
|
289
807
|
}
|