@stack-spot/portal-network 0.64.2 → 0.65.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.
@@ -40,34 +40,159 @@ export type CreateFoundationRequest = {
40
40
  cloudProvider: string;
41
41
  region: string;
42
42
  };
43
- export type CreateProjectRequest = {
44
- parentFolderId: string;
43
+ export type TransitGatewayDetails = {
45
44
  name: string;
45
+ };
46
+ export type TransitGatewayResponse = {
47
+ stackSpotAccountId: string;
48
+ foundationId: string;
49
+ projectId: string;
50
+ transitGatewayId: string;
51
+ details: TransitGatewayDetails;
52
+ status: "READY" | "PENDING" | "ERROR";
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ deletedAt?: string;
56
+ };
57
+ export type ListTransitGatewayResponse = {
58
+ stackSpotAccountId: string;
59
+ foundationId: string;
60
+ projectId?: string;
61
+ pendingResources: boolean;
62
+ content: TransitGatewayResponse[];
63
+ };
64
+ export type CreateTransitGatewayRequest = {
65
+ projectId: string;
66
+ };
67
+ export type TransitGatewayVpcAttachmentDetails = {
68
+ subnetIds: string[];
69
+ };
70
+ export type TransitGatewayVpcAttachmentResponse = {
71
+ stackSpotAccountId: string;
72
+ foundationId: string;
73
+ projectId: string;
74
+ transitGatewayId: string;
75
+ vpcId: string;
76
+ transitGatewayVpcAttachmentId: string;
77
+ details: TransitGatewayVpcAttachmentDetails;
78
+ status: "READY" | "PENDING" | "ERROR";
79
+ createdAt: string;
80
+ updatedAt: string;
81
+ deletedAt?: string;
82
+ };
83
+ export type ListTransitGatewayVpcAttachmentResponse = {
84
+ stackSpotAccountId: string;
85
+ foundationId: string;
86
+ projectId?: string;
87
+ transitGatewayId?: string;
88
+ vpcId?: string;
89
+ pendingResources: boolean;
90
+ content: TransitGatewayVpcAttachmentResponse[];
91
+ };
92
+ export type CreateTransitGatewayVpcAttachmentRequest = {
93
+ projectId: string;
94
+ transitGatewayId: string;
95
+ vpcId: string;
96
+ subnetIds: string[];
97
+ };
98
+ export type SubnetDetails = {
99
+ availabilityZone: string;
100
+ cidrBlock: string;
46
101
  description: string;
102
+ "type": "PUBLIC" | "PRIVATE";
103
+ name?: string;
104
+ };
105
+ export type SubnetResponse = {
106
+ stackSpotAccountId: string;
107
+ foundationId: string;
108
+ projectId: string;
109
+ networkId: string;
110
+ subnetId: string;
111
+ details: SubnetDetails;
112
+ status: "READY" | "PENDING" | "ERROR";
113
+ createdAt: string;
114
+ updatedAt: string;
115
+ deletedAt?: string;
116
+ };
117
+ export type ListSubnetResponse = {
118
+ stackSpotAccountId: string;
119
+ foundationId: string;
120
+ projectId?: string;
121
+ networkId?: string;
122
+ pendingResources: boolean;
123
+ content: SubnetResponse[];
47
124
  };
48
- export type Details = {
125
+ export type CreateSubnetRequest = {
126
+ projectId: string;
127
+ networkId: string;
128
+ availabilityZone: string;
129
+ cidrBlock: string;
130
+ "type": "PUBLIC" | "PRIVATE";
131
+ name: string;
132
+ };
133
+ export type ProjectDetails = {
49
134
  name: string;
50
135
  email: string;
51
- parentFolderId: string;
52
136
  };
53
137
  export type ProjectResponse = {
138
+ stackSpotAccountId: string;
139
+ foundationId: string;
140
+ parentFolderId: string;
141
+ projectId: string;
142
+ details: ProjectDetails;
143
+ status: "READY" | "PENDING" | "ERROR";
144
+ createdAt: string;
145
+ updatedAt: string;
146
+ deletedAt?: string;
147
+ };
148
+ export type ListProjectResponse = {
149
+ stackSpotAccountId: string;
150
+ foundationId: string;
151
+ parentFolderId?: string;
152
+ pendingResources: boolean;
153
+ content: ProjectResponse[];
154
+ };
155
+ export type CreateProjectRequest = {
156
+ parentFolderId: string;
157
+ name: string;
158
+ description: string;
159
+ };
160
+ export type NetworkDetails = {
161
+ cidrBlock?: string;
162
+ range?: number;
163
+ name?: string;
164
+ };
165
+ export type NetworkResponse = {
54
166
  stackSpotAccountId: string;
55
167
  foundationId: string;
56
168
  projectId: string;
57
- details: Details;
169
+ networkId: string;
170
+ details: NetworkDetails;
58
171
  status: "READY" | "PENDING" | "ERROR";
59
172
  createdAt: string;
60
173
  updatedAt: string;
61
174
  deletedAt?: string;
62
175
  };
176
+ export type ListNetworkResponse = {
177
+ stackSpotAccountId: string;
178
+ foundationId: string;
179
+ projectId?: string;
180
+ pendingResources: boolean;
181
+ content: NetworkResponse[];
182
+ };
183
+ export type CreateNetworkRequest = {
184
+ projectId: string;
185
+ containerLoad: boolean;
186
+ netmaskLength: number;
187
+ networkName: string;
188
+ };
63
189
  export type FolderContent = {
64
190
  "type": "FOLDER" | "PROJECT";
65
191
  id: string;
66
192
  name: string;
67
- status: string;
193
+ status: "READY" | "PENDING" | "ERROR";
68
194
  };
69
195
  export type FolderDetails = {
70
- parentFolderId?: string;
71
196
  name: string;
72
197
  pendingResources: boolean;
73
198
  content: FolderContent[];
@@ -75,6 +200,7 @@ export type FolderDetails = {
75
200
  export type FolderResponse = {
76
201
  stackSpotAccountId: string;
77
202
  foundationId: string;
203
+ parentFolderId: string;
78
204
  folderId: string;
79
205
  details: FolderDetails;
80
206
  status: "READY" | "PENDING" | "ERROR";
@@ -111,15 +237,16 @@ export type CreateDnsZoneRequest = {
111
237
  "type": "PUBLIC";
112
238
  };
113
239
  export type DnsRecordDetails = {
114
- dnsZoneId: string;
115
240
  recordName: string;
116
241
  records: string[];
117
242
  ttl: number;
118
- "type": string;
243
+ "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
244
+ dnsZoneName: string;
119
245
  };
120
246
  export type DnsRecordResponse = {
121
247
  stackSpotAccountId: string;
122
248
  foundationId: string;
249
+ dnsZoneId: string;
123
250
  dnsRecordId: string;
124
251
  details: DnsRecordDetails;
125
252
  status: "READY" | "PENDING" | "ERROR";
@@ -130,15 +257,18 @@ export type DnsRecordResponse = {
130
257
  export type ListDnsRecordResponse = {
131
258
  stackSpotAccountId: string;
132
259
  foundationId: string;
133
- dnsZoneId: string;
260
+ projectId?: string;
261
+ dnsZoneId?: string;
134
262
  pendingResources: boolean;
135
263
  content: DnsRecordResponse[];
136
264
  };
137
265
  export type CreateDnsRecordRequest = {
266
+ dnsZoneId: string;
267
+ projectId?: string;
138
268
  recordName: string;
139
269
  records: string[];
140
270
  ttl: number;
141
- "type": string;
271
+ "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
142
272
  };
143
273
  export type CidrDetails = {
144
274
  cidrNotation: string;
@@ -153,7 +283,7 @@ export type CidrResponse = {
153
283
  stackSpotAccountId: string;
154
284
  foundationId: string;
155
285
  cidrId: string;
156
- details?: CidrDetails;
286
+ details: CidrDetails;
157
287
  status: "READY" | "PENDING" | "ERROR";
158
288
  createdAt: string;
159
289
  updatedAt: string;
@@ -171,6 +301,7 @@ export type CreateCidrRequest = {
171
301
  };
172
302
  export type CertificateDetails = {
173
303
  name: string;
304
+ certificateStatus?: string;
174
305
  domainName?: string;
175
306
  notAfter?: string;
176
307
  notBefore?: string;
@@ -180,7 +311,7 @@ export type CertificateResponse = {
180
311
  stackSpotAccountId: string;
181
312
  foundationId: string;
182
313
  certificateId: string;
183
- details?: CertificateDetails;
314
+ details: CertificateDetails;
184
315
  status: "READY" | "PENDING" | "ERROR";
185
316
  createdAt: string;
186
317
  updatedAt: string;
@@ -213,180 +344,6 @@ export type ImportCertificateRequest = {
213
344
  certificatePrivateKey?: string;
214
345
  certificateChain?: string;
215
346
  };
216
- export type EnvVar = {
217
- key: string;
218
- value: string;
219
- };
220
- export type ReplicasConfigRequest = {
221
- /** Minimum number of replicas */
222
- min?: number;
223
- /** Maximum number of replicas */
224
- max?: number;
225
- cpu?: number;
226
- };
227
- export type CreateDeploymentRequest = {
228
- applicationId?: string;
229
- applicationName: string;
230
- action: "DEPLOY" | "STOP" | "START" | "RESTART" | "REDEPLOY";
231
- containerPort?: string;
232
- healthCheckPath?: string;
233
- envVars?: EnvVar[];
234
- imageUrl?: string;
235
- tag?: string;
236
- runtimeId?: string;
237
- mem?: number;
238
- cpu?: number;
239
- replicaNum?: ReplicasConfigRequest;
240
- };
241
- export type CreateDeploymentResponse = {
242
- deploymentId?: string;
243
- applicationURL?: string;
244
- action: "DEPLOY" | "STOP" | "START" | "RESTART" | "REDEPLOY";
245
- containerPort?: string;
246
- healthCheckPath?: string;
247
- envVars?: EnvVar[];
248
- imageUrl?: string;
249
- versionTag?: string;
250
- health?: "HEALTH" | "UNHEALTH";
251
- deploymentStatus?: "UP" | "STOPPED" | "DEPLOYING";
252
- runtimeId?: string;
253
- mem?: number;
254
- cpu?: number;
255
- replicaNum?: ReplicasConfigRequest;
256
- awsAccount?: string;
257
- idAwsAccount?: string;
258
- };
259
- export type CreateApplicationRequest = {
260
- /** The name of the application in kebab-case format. */
261
- name: string;
262
- /** The description of the application */
263
- description: "CONTAINER";
264
- /** The type of the application */
265
- "type": "CONTAINER" | "STATIC";
266
- creator: string;
267
- /** The creator of the application. */
268
- projectId: string;
269
- };
270
- export type ApplicationResponse = {
271
- name?: string;
272
- id?: string;
273
- description?: string;
274
- "type": "CONTAINER" | "STATIC";
275
- creator?: string;
276
- projectId?: string;
277
- url?: string;
278
- createdAt?: string;
279
- updatedAt?: string;
280
- };
281
- export type AddOn = {
282
- name: string;
283
- description: string;
284
- };
285
- export type RuntimeResponse = {
286
- id: string;
287
- name: string;
288
- description: string;
289
- "type": "CONTAINER" | "STATIC";
290
- projectId: string;
291
- tags: string[];
292
- env?: string;
293
- addons: AddOn[];
294
- };
295
- export type ListRuntimesResponse = {
296
- runtimes: RuntimeResponse[];
297
- totalCount: number;
298
- limit: number;
299
- offset: number;
300
- };
301
- export type GetRuntimeByApplicationIdResponse = {
302
- id?: string;
303
- name: string;
304
- description: string;
305
- "type": "CONTAINER" | "STATIC";
306
- projectId: string;
307
- tags: string[];
308
- env?: string;
309
- addons: AddOn[];
310
- };
311
- export type ListRuntimeByApplicationResponse = {
312
- runtimes: GetRuntimeByApplicationIdResponse[];
313
- totalCount: number;
314
- limit: number;
315
- offset: number;
316
- };
317
- export type RepositoryResponse = {
318
- repositoryName: string;
319
- repositoryUri: string;
320
- };
321
- export type ListRepositoryResponse = {
322
- repositories: RepositoryResponse[];
323
- totalCount: number;
324
- limit: number;
325
- offset: number;
326
- };
327
- export type ImageResponse = {
328
- imageUri: string;
329
- tags: string[];
330
- };
331
- export type DeploymentStatusResponse = {
332
- status: "UP" | "STOPPED" | "DEPLOYING";
333
- };
334
- export type DeploymentLogResponse = {
335
- logs: string;
336
- };
337
- export type DeploymentHealthResponse = {
338
- health: "HEALTHY" | "UNHEALTHY";
339
- };
340
- export type BasicDeploymentResponse = {
341
- deploymentId: string;
342
- runtimeId: string;
343
- runtimeName: string;
344
- createdAt: string;
345
- appName: string;
346
- creator: string;
347
- applicationId: string;
348
- };
349
- export type DeploymentResponse = {
350
- deploymentId?: string;
351
- applicationUrl?: string;
352
- action: "DEPLOY" | "STOP" | "START" | "RESTART" | "REDEPLOY";
353
- containerPort?: string;
354
- healthCheckPath?: string;
355
- envVars?: {
356
- [key: string]: string;
357
- };
358
- imageUrl?: string;
359
- versionTag?: string;
360
- health?: "HEALTHY" | "UNHEALTHY";
361
- deploymentStatus?: "UP" | "STOPPED" | "DEPLOYING";
362
- runtimeId?: string;
363
- mem?: number;
364
- cpu?: number;
365
- replicaNum?: ReplicasConfigRequest;
366
- awsAccount?: string;
367
- idAwsAccount?: string;
368
- };
369
- export type ApplicationHistoryResponse = {
370
- applicationId?: string;
371
- runtimeName: string;
372
- creator?: string;
373
- action: "CREATED" | "DEPLOYED" | "STOPPED";
374
- date: string;
375
- };
376
- export type ListApplicationHistoryResponse = {
377
- applicationId: string;
378
- applicationHistory: ApplicationHistoryResponse[];
379
- totalCount: number;
380
- limit: number;
381
- offset: number;
382
- };
383
- export type ListApplicationsResponse = {
384
- projectId: string;
385
- applications: ApplicationResponse[];
386
- totalCount: number;
387
- limit: number;
388
- offset: number;
389
- };
390
347
  export function listFoundations({ authorization }: {
391
348
  authorization: string;
392
349
  }, opts?: Oazapfts.RequestOpts) {
@@ -416,6 +373,131 @@ export function createFoundation({ authorization, createFoundationRequest }: {
416
373
  })
417
374
  })));
418
375
  }
376
+ export function listTransitGateway({ authorization, foundationId, projectId }: {
377
+ authorization: string;
378
+ foundationId: string;
379
+ projectId?: string;
380
+ }, opts?: Oazapfts.RequestOpts) {
381
+ return oazapfts.ok(oazapfts.fetchJson<{
382
+ status: 200;
383
+ data: ListTransitGatewayResponse;
384
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateways${QS.query(QS.explode({
385
+ projectId
386
+ }))}`, {
387
+ ...opts,
388
+ headers: oazapfts.mergeHeaders(opts?.headers, {
389
+ Authorization: authorization
390
+ })
391
+ }));
392
+ }
393
+ export function createTransitGateway({ authorization, foundationId, createTransitGatewayRequest }: {
394
+ authorization: string;
395
+ foundationId: string;
396
+ createTransitGatewayRequest: CreateTransitGatewayRequest;
397
+ }, opts?: Oazapfts.RequestOpts) {
398
+ return oazapfts.ok(oazapfts.fetchJson<{
399
+ status: 200;
400
+ data: TransitGatewayResponse;
401
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateways`, oazapfts.json({
402
+ ...opts,
403
+ method: "POST",
404
+ body: createTransitGatewayRequest,
405
+ headers: oazapfts.mergeHeaders(opts?.headers, {
406
+ Authorization: authorization
407
+ })
408
+ })));
409
+ }
410
+ export function listTransitGatewayVpcAttachment({ authorization, foundationId, projectId, vpcId, transitGatewayId }: {
411
+ authorization: string;
412
+ foundationId: string;
413
+ projectId?: string;
414
+ vpcId?: string;
415
+ transitGatewayId?: string;
416
+ }, opts?: Oazapfts.RequestOpts) {
417
+ return oazapfts.ok(oazapfts.fetchJson<{
418
+ status: 200;
419
+ data: ListTransitGatewayVpcAttachmentResponse;
420
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateway-vpc-attachments${QS.query(QS.explode({
421
+ projectId,
422
+ vpcId,
423
+ transitGatewayId
424
+ }))}`, {
425
+ ...opts,
426
+ headers: oazapfts.mergeHeaders(opts?.headers, {
427
+ Authorization: authorization
428
+ })
429
+ }));
430
+ }
431
+ export function createTransitGatewayVpcAttachment({ authorization, foundationId, createTransitGatewayVpcAttachmentRequest }: {
432
+ authorization: string;
433
+ foundationId: string;
434
+ createTransitGatewayVpcAttachmentRequest: CreateTransitGatewayVpcAttachmentRequest;
435
+ }, opts?: Oazapfts.RequestOpts) {
436
+ return oazapfts.ok(oazapfts.fetchJson<{
437
+ status: 200;
438
+ data: TransitGatewayVpcAttachmentResponse;
439
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateway-vpc-attachments`, oazapfts.json({
440
+ ...opts,
441
+ method: "POST",
442
+ body: createTransitGatewayVpcAttachmentRequest,
443
+ headers: oazapfts.mergeHeaders(opts?.headers, {
444
+ Authorization: authorization
445
+ })
446
+ })));
447
+ }
448
+ export function listSubnet({ authorization, foundationId, projectId, vpcId }: {
449
+ authorization: string;
450
+ foundationId: string;
451
+ projectId?: string;
452
+ vpcId?: string;
453
+ }, opts?: Oazapfts.RequestOpts) {
454
+ return oazapfts.ok(oazapfts.fetchJson<{
455
+ status: 200;
456
+ data: ListSubnetResponse;
457
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets${QS.query(QS.explode({
458
+ projectId,
459
+ vpcId
460
+ }))}`, {
461
+ ...opts,
462
+ headers: oazapfts.mergeHeaders(opts?.headers, {
463
+ Authorization: authorization
464
+ })
465
+ }));
466
+ }
467
+ export function createSubnet({ authorization, foundationId, createSubnetRequest }: {
468
+ authorization: string;
469
+ foundationId: string;
470
+ createSubnetRequest: CreateSubnetRequest;
471
+ }, opts?: Oazapfts.RequestOpts) {
472
+ return oazapfts.ok(oazapfts.fetchJson<{
473
+ status: 200;
474
+ data: SubnetResponse;
475
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets`, oazapfts.json({
476
+ ...opts,
477
+ method: "POST",
478
+ body: createSubnetRequest,
479
+ headers: oazapfts.mergeHeaders(opts?.headers, {
480
+ Authorization: authorization
481
+ })
482
+ })));
483
+ }
484
+ export function listProject({ authorization, foundationId, parentFolderId }: {
485
+ authorization: string;
486
+ foundationId: string;
487
+ parentFolderId?: string;
488
+ }, opts?: Oazapfts.RequestOpts) {
489
+ return oazapfts.ok(oazapfts.fetchJson<{
490
+ status: 200;
491
+ data: ListProjectResponse;
492
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects${QS.query(QS.explode({
493
+ parentFolderId
494
+ }))}`, {
495
+ ...opts,
496
+ headers: oazapfts.mergeHeaders(opts?.headers, {
497
+ Authorization: authorization
498
+ })
499
+ }));
500
+ }
419
501
  export function createProject({ authorization, foundationId, createProjectRequest }: {
420
502
  authorization: string;
421
503
  foundationId: string;
@@ -433,6 +515,40 @@ export function createProject({ authorization, foundationId, createProjectReques
433
515
  })
434
516
  })));
435
517
  }
518
+ export function listNetwork({ authorization, foundationId, projectId }: {
519
+ authorization: string;
520
+ foundationId: string;
521
+ projectId?: string;
522
+ }, opts?: Oazapfts.RequestOpts) {
523
+ return oazapfts.ok(oazapfts.fetchJson<{
524
+ status: 200;
525
+ data: ListNetworkResponse;
526
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks${QS.query(QS.explode({
527
+ projectId
528
+ }))}`, {
529
+ ...opts,
530
+ headers: oazapfts.mergeHeaders(opts?.headers, {
531
+ Authorization: authorization
532
+ })
533
+ }));
534
+ }
535
+ export function createNetwork({ authorization, foundationId, createNetworkRequest }: {
536
+ authorization: string;
537
+ foundationId: string;
538
+ createNetworkRequest: CreateNetworkRequest;
539
+ }, opts?: Oazapfts.RequestOpts) {
540
+ return oazapfts.ok(oazapfts.fetchJson<{
541
+ status: 200;
542
+ data: NetworkResponse;
543
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks`, oazapfts.json({
544
+ ...opts,
545
+ method: "POST",
546
+ body: createNetworkRequest,
547
+ headers: oazapfts.mergeHeaders(opts?.headers, {
548
+ Authorization: authorization
549
+ })
550
+ })));
551
+ }
436
552
  export function getFolder({ authorization, foundationId, folderId }: {
437
553
  authorization: string;
438
554
  foundationId: string;
@@ -498,31 +614,34 @@ export function createDnsZone({ authorization, foundationId, createDnsZoneReques
498
614
  })
499
615
  })));
500
616
  }
501
- export function listDnsRecord({ authorization, foundationId, dnsZoneId }: {
617
+ export function listDnsRecord({ authorization, foundationId, projectId, dnsZoneId }: {
502
618
  authorization: string;
503
619
  foundationId: string;
504
- dnsZoneId: string;
620
+ projectId?: string;
621
+ dnsZoneId?: string;
505
622
  }, opts?: Oazapfts.RequestOpts) {
506
623
  return oazapfts.ok(oazapfts.fetchJson<{
507
624
  status: 200;
508
625
  data: ListDnsRecordResponse;
509
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}/dns-records`, {
626
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records${QS.query(QS.explode({
627
+ projectId,
628
+ dnsZoneId
629
+ }))}`, {
510
630
  ...opts,
511
631
  headers: oazapfts.mergeHeaders(opts?.headers, {
512
632
  Authorization: authorization
513
633
  })
514
634
  }));
515
635
  }
516
- export function createDnsRecord({ authorization, foundationId, dnsZoneId, createDnsRecordRequest }: {
636
+ export function createDnsRecord({ authorization, foundationId, createDnsRecordRequest }: {
517
637
  authorization: string;
518
638
  foundationId: string;
519
- dnsZoneId: string;
520
639
  createDnsRecordRequest: CreateDnsRecordRequest;
521
640
  }, opts?: Oazapfts.RequestOpts) {
522
641
  return oazapfts.ok(oazapfts.fetchJson<{
523
642
  status: 200;
524
643
  data: DnsRecordResponse;
525
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}/dns-records`, oazapfts.json({
644
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records`, oazapfts.json({
526
645
  ...opts,
527
646
  method: "POST",
528
647
  body: createDnsRecordRequest,
@@ -593,125 +712,58 @@ export function createCertificate({ authorization, foundationId, body }: {
593
712
  })
594
713
  })));
595
714
  }
596
- export function createDeployment({ createDeploymentRequest }: {
597
- createDeploymentRequest: CreateDeploymentRequest;
598
- }, opts?: Oazapfts.RequestOpts) {
599
- return oazapfts.ok(oazapfts.fetchJson<{
600
- status: 200;
601
- data: CreateDeploymentResponse;
602
- }>("/v1/deployments", oazapfts.json({
603
- ...opts,
604
- method: "POST",
605
- body: createDeploymentRequest
606
- })));
607
- }
608
- export function createApplication({ createApplicationRequest }: {
609
- createApplicationRequest: CreateApplicationRequest;
715
+ export function getFoundation({ authorization, foundationId }: {
716
+ authorization: string;
717
+ foundationId: string;
610
718
  }, opts?: Oazapfts.RequestOpts) {
611
719
  return oazapfts.ok(oazapfts.fetchJson<{
612
720
  status: 200;
613
- data: ApplicationResponse;
614
- }>("/v1/applications", oazapfts.json({
721
+ data: FoundationResponse;
722
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
615
723
  ...opts,
616
- method: "POST",
617
- body: createApplicationRequest
618
- })));
619
- }
620
- export function getApplication({ applicationId }: {
621
- applicationId: string;
622
- }, opts?: Oazapfts.RequestOpts) {
623
- return oazapfts.ok(oazapfts.fetchJson<{
624
- status: 200;
625
- data: ApplicationResponse;
626
- }>(`/v1/applications/${encodeURIComponent(applicationId)}`, {
627
- ...opts
724
+ headers: oazapfts.mergeHeaders(opts?.headers, {
725
+ Authorization: authorization
726
+ })
628
727
  }));
629
728
  }
630
- export function updateApplication({ applicationId, createApplicationRequest }: {
631
- applicationId: string;
632
- createApplicationRequest: CreateApplicationRequest;
729
+ export function getTransitGateway({ authorization, foundationId }: {
730
+ authorization: string;
731
+ foundationId: string;
633
732
  }, opts?: Oazapfts.RequestOpts) {
634
733
  return oazapfts.ok(oazapfts.fetchJson<{
635
734
  status: 200;
636
- data: ApplicationResponse;
637
- }>(`/v1/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
735
+ data: TransitGatewayResponse;
736
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateways/${encodeURIComponent(transitGatewayId)}`, {
638
737
  ...opts,
639
- method: "PATCH",
640
- body: createApplicationRequest
641
- })));
642
- }
643
- export function getRuntimeById({ runtimeId }: {
644
- runtimeId: string;
645
- }, opts?: Oazapfts.RequestOpts) {
646
- return oazapfts.ok(oazapfts.fetchJson<{
647
- status: 200;
648
- data: RuntimeResponse;
649
- }>(`/v1/runtimes/${encodeURIComponent(runtimeId)}`, {
650
- ...opts
651
- }));
652
- }
653
- export function listRuntimes({ projectId, limit, offset }: {
654
- projectId: string;
655
- limit?: number;
656
- offset?: number;
657
- }, opts?: Oazapfts.RequestOpts) {
658
- return oazapfts.ok(oazapfts.fetchJson<{
659
- status: 200;
660
- data: ListRuntimesResponse;
661
- }>(`/v1/runtimes/projects/${encodeURIComponent(projectId)}${QS.query(QS.explode({
662
- limit,
663
- offset
664
- }))}`, {
665
- ...opts
666
- }));
667
- }
668
- export function getRuntimeByApplicationId({ applicationId, limit, offset }: {
669
- applicationId: string;
670
- limit?: number;
671
- offset?: number;
672
- }, opts?: Oazapfts.RequestOpts) {
673
- return oazapfts.ok(oazapfts.fetchJson<{
674
- status: 200;
675
- data: ListRuntimeByApplicationResponse;
676
- }>(`/v1/runtimes/application/${encodeURIComponent(applicationId)}${QS.query(QS.explode({
677
- limit,
678
- offset
679
- }))}`, {
680
- ...opts
681
- }));
682
- }
683
- export function listRepositories({ limit, offset }: {
684
- limit?: number;
685
- offset?: number;
686
- }, opts?: Oazapfts.RequestOpts) {
687
- return oazapfts.ok(oazapfts.fetchJson<{
688
- status: 200;
689
- data: ListRepositoryResponse;
690
- }>(`/v1/registries/repositories${QS.query(QS.explode({
691
- limit,
692
- offset
693
- }))}`, {
694
- ...opts
738
+ headers: oazapfts.mergeHeaders(opts?.headers, {
739
+ Authorization: authorization
740
+ })
695
741
  }));
696
742
  }
697
- export function getRepositoryImages({ repositoryId }: {
698
- repositoryId: string;
743
+ export function getTransitGatewayVpcAttachment({ authorization, foundationId, transitGatewayVpcAttachmentId }: {
744
+ authorization: string;
745
+ foundationId: string;
746
+ transitGatewayVpcAttachmentId: string;
699
747
  }, opts?: Oazapfts.RequestOpts) {
700
748
  return oazapfts.ok(oazapfts.fetchJson<{
701
749
  status: 200;
702
- data: ImageResponse[];
703
- }>(`/v1/registries/repositories/${encodeURIComponent(repositoryId)}/images`, {
704
- ...opts
750
+ data: TransitGatewayVpcAttachmentResponse;
751
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/transit-gateway-vpc-attachments/${encodeURIComponent(transitGatewayVpcAttachmentId)}`, {
752
+ ...opts,
753
+ headers: oazapfts.mergeHeaders(opts?.headers, {
754
+ Authorization: authorization
755
+ })
705
756
  }));
706
757
  }
707
- export function getFoundation({ authorization, foundationId }: {
758
+ export function getSubnet({ authorization, foundationId, subnetId }: {
708
759
  authorization: string;
709
760
  foundationId: string;
761
+ subnetId: string;
710
762
  }, opts?: Oazapfts.RequestOpts) {
711
763
  return oazapfts.ok(oazapfts.fetchJson<{
712
764
  status: 200;
713
- data: FoundationResponse;
714
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
765
+ data: SubnetResponse;
766
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets/${encodeURIComponent(subnetId)}`, {
715
767
  ...opts,
716
768
  headers: oazapfts.mergeHeaders(opts?.headers, {
717
769
  Authorization: authorization
@@ -733,9 +785,24 @@ export function getProject({ authorization, foundationId, projectId }: {
733
785
  })
734
786
  }));
735
787
  }
736
- export function getDnsZone({ foundationId, authorization, dnsZoneId }: {
788
+ export function getNetwork({ authorization, foundationId, networkId }: {
789
+ authorization: string;
737
790
  foundationId: string;
791
+ networkId: string;
792
+ }, opts?: Oazapfts.RequestOpts) {
793
+ return oazapfts.ok(oazapfts.fetchJson<{
794
+ status: 200;
795
+ data: NetworkResponse;
796
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}`, {
797
+ ...opts,
798
+ headers: oazapfts.mergeHeaders(opts?.headers, {
799
+ Authorization: authorization
800
+ })
801
+ }));
802
+ }
803
+ export function getDnsZone({ authorization, foundationId, dnsZoneId }: {
738
804
  authorization: string;
805
+ foundationId: string;
739
806
  dnsZoneId: string;
740
807
  }, opts?: Oazapfts.RequestOpts) {
741
808
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -756,7 +823,7 @@ export function getDnsZone1({ authorization, foundationId, dnsRecordId }: {
756
823
  return oazapfts.ok(oazapfts.fetchJson<{
757
824
  status: 200;
758
825
  data: DnsRecordResponse;
759
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
826
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
760
827
  ...opts,
761
828
  headers: oazapfts.mergeHeaders(opts?.headers, {
762
829
  Authorization: authorization
@@ -803,83 +870,3 @@ export function providers(opts?: Oazapfts.RequestOpts) {
803
870
  ...opts
804
871
  }));
805
872
  }
806
- export function getDeploymentStatus({ deploymentId }: {
807
- deploymentId: string;
808
- }, opts?: Oazapfts.RequestOpts) {
809
- return oazapfts.ok(oazapfts.fetchJson<{
810
- status: 200;
811
- data: DeploymentStatusResponse;
812
- }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/status`, {
813
- ...opts
814
- }));
815
- }
816
- export function getDeploymentLogs({ deploymentId }: {
817
- deploymentId: string;
818
- }, opts?: Oazapfts.RequestOpts) {
819
- return oazapfts.ok(oazapfts.fetchJson<{
820
- status: 200;
821
- data: DeploymentLogResponse;
822
- }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/logs`, {
823
- ...opts
824
- }));
825
- }
826
- export function getDeploymentHealth({ deploymentId }: {
827
- deploymentId: string;
828
- }, opts?: Oazapfts.RequestOpts) {
829
- return oazapfts.ok(oazapfts.fetchJson<{
830
- status: 200;
831
- data: DeploymentHealthResponse;
832
- }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/health`, {
833
- ...opts
834
- }));
835
- }
836
- export function listDeployments({ applicationId }: {
837
- applicationId: string;
838
- }, opts?: Oazapfts.RequestOpts) {
839
- return oazapfts.ok(oazapfts.fetchJson<{
840
- status: 200;
841
- data: BasicDeploymentResponse[];
842
- }>(`/v1/deployments/${encodeURIComponent(applicationId)}`, {
843
- ...opts
844
- }));
845
- }
846
- export function getDeployment({ deploymentId }: {
847
- deploymentId: string;
848
- }, opts?: Oazapfts.RequestOpts) {
849
- return oazapfts.ok(oazapfts.fetchJson<{
850
- status: 200;
851
- data: DeploymentResponse;
852
- }>(`/v1/deployments/details/${encodeURIComponent(deploymentId)}`, {
853
- ...opts
854
- }));
855
- }
856
- export function getApplicationHistory({ projectId, limit, offset }: {
857
- projectId: string;
858
- limit?: number;
859
- offset?: number;
860
- }, opts?: Oazapfts.RequestOpts) {
861
- return oazapfts.ok(oazapfts.fetchJson<{
862
- status: 200;
863
- data: ListApplicationHistoryResponse;
864
- }>(`/v1/applications/${encodeURIComponent(projectId)}/history${QS.query(QS.explode({
865
- limit,
866
- offset
867
- }))}`, {
868
- ...opts
869
- }));
870
- }
871
- export function listApplications({ projectId, limit, offset }: {
872
- projectId: string;
873
- limit?: number;
874
- offset?: number;
875
- }, opts?: Oazapfts.RequestOpts) {
876
- return oazapfts.ok(oazapfts.fetchJson<{
877
- status: 200;
878
- data: ListApplicationsResponse;
879
- }>(`/v1/applications/project/${encodeURIComponent(projectId)}${QS.query(QS.explode({
880
- limit,
881
- offset
882
- }))}`, {
883
- ...opts
884
- }));
885
- }