@stack-spot/portal-network 0.190.0 → 0.191.0-beta.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/dist/api/account.d.ts +4 -116
  3. package/dist/api/account.d.ts.map +1 -1
  4. package/dist/api/account.js +9 -95
  5. package/dist/api/account.js.map +1 -1
  6. package/dist/api/ai.d.ts +189 -86
  7. package/dist/api/ai.d.ts.map +1 -1
  8. package/dist/api/ai.js +238 -142
  9. package/dist/api/ai.js.map +1 -1
  10. package/dist/api/cloudPlatform.d.ts +364 -248
  11. package/dist/api/cloudPlatform.d.ts.map +1 -1
  12. package/dist/api/cloudPlatform.js +289 -109
  13. package/dist/api/cloudPlatform.js.map +1 -1
  14. package/dist/api/codeShift.d.ts +114 -42
  15. package/dist/api/codeShift.d.ts.map +1 -1
  16. package/dist/api/codeShift.js +51 -10
  17. package/dist/api/codeShift.js.map +1 -1
  18. package/dist/api/genAiInference.d.ts +22 -2
  19. package/dist/api/genAiInference.d.ts.map +1 -1
  20. package/dist/api/genAiInference.js +22 -3
  21. package/dist/api/genAiInference.js.map +1 -1
  22. package/dist/client/account.d.ts +33 -19
  23. package/dist/client/account.d.ts.map +1 -1
  24. package/dist/client/account.js +33 -15
  25. package/dist/client/account.js.map +1 -1
  26. package/dist/client/ai.d.ts +29 -0
  27. package/dist/client/ai.d.ts.map +1 -1
  28. package/dist/client/ai.js +121 -14
  29. package/dist/client/ai.js.map +1 -1
  30. package/dist/client/cloud-platform.d.ts +195 -43
  31. package/dist/client/cloud-platform.d.ts.map +1 -1
  32. package/dist/client/cloud-platform.js +159 -42
  33. package/dist/client/cloud-platform.js.map +1 -1
  34. package/dist/client/code-shift.d.ts +16 -3
  35. package/dist/client/code-shift.d.ts.map +1 -1
  36. package/dist/client/code-shift.js +10 -1
  37. package/dist/client/code-shift.js.map +1 -1
  38. package/dist/client/types.d.ts +26 -5
  39. package/dist/client/types.d.ts.map +1 -1
  40. package/package.json +3 -3
  41. package/readme.md +2 -1
  42. package/src/api/account.ts +21 -192
  43. package/src/api/agent-tools.ts +3 -0
  44. package/src/api/agent.ts +2 -0
  45. package/src/api/ai.ts +364 -157
  46. package/src/api/cloudPlatform.ts +698 -398
  47. package/src/api/codeShift.ts +194 -47
  48. package/src/api/genAiInference.ts +47 -4
  49. package/src/api/notification.ts +2 -0
  50. package/src/client/account.ts +36 -17
  51. package/src/client/ai.ts +126 -13
  52. package/src/client/cloud-platform.ts +92 -27
  53. package/src/client/code-shift.ts +6 -1
  54. package/src/client/types.ts +27 -5
@@ -14,31 +14,9 @@ const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
15
  generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
16
16
  };
17
- export type FoundationDetails = {
18
- name: string;
19
- description: string;
20
- cloudProvider: string;
21
- region: string;
22
- };
23
- export type FoundationResponse = {
24
- stackSpotAccountId: string;
25
- foundationId: string;
26
- details: FoundationDetails;
27
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
28
- createdAt: string;
29
- updatedAt: string;
30
- deletedAt?: string;
31
- };
32
- export type ListFoundationResponse = {
33
- stackSpotAccountId: string;
34
- pendingResources: boolean;
35
- content: FoundationResponse[];
36
- };
37
- export type CreateFoundationRequest = {
38
- name: string;
39
- description: string;
40
- cloudProvider: string;
41
- region: string;
17
+ export type Tag = {
18
+ key: string;
19
+ value: string;
42
20
  };
43
21
  export type TunnelStatus = {
44
22
  tunnel1?: string;
@@ -54,44 +32,12 @@ export type VpnResponse = {
54
32
  foundationId: string;
55
33
  vpnId: string;
56
34
  details: VpnDetails;
35
+ tags: Tag[];
57
36
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
58
37
  createdAt: string;
59
38
  updatedAt: string;
60
39
  deletedAt?: string;
61
40
  };
62
- export type ListVpnResponse = {
63
- stackSpotAccountId: string;
64
- foundationId: string;
65
- pendingResources: boolean;
66
- content: VpnResponse[];
67
- };
68
- export type CreateVpnRequest = {
69
- peerCustomerGatewayIp: string;
70
- destinationCidrBlock: string;
71
- };
72
- export type TenantDetails = {
73
- name: string;
74
- };
75
- export type TenantResponse = {
76
- stackSpotAccountId: string;
77
- foundationId: string;
78
- tenantId: string;
79
- details: TenantDetails;
80
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
81
- createdAt: string;
82
- updatedAt: string;
83
- deletedAt?: string;
84
- };
85
- export type ListTenantResponse = {
86
- stackSpotAccountId: string;
87
- foundationId: string;
88
- pendingResources: boolean;
89
- content: TenantResponse[];
90
- };
91
- export type CreateTenantRequest = {
92
- tenantName: string;
93
- publicCidrs: string[];
94
- };
95
41
  export type ProjectDetails = {
96
42
  name: string;
97
43
  folderName: string;
@@ -103,23 +49,12 @@ export type ProjectResponse = {
103
49
  parentFolderId: string;
104
50
  projectId: string;
105
51
  details: ProjectDetails;
52
+ tags: Tag[];
106
53
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
107
54
  createdAt: string;
108
55
  updatedAt: string;
109
56
  deletedAt?: string;
110
57
  };
111
- export type ListProjectResponse = {
112
- stackSpotAccountId: string;
113
- foundationId: string;
114
- parentFolderId?: string;
115
- pendingResources: boolean;
116
- content: ProjectResponse[];
117
- };
118
- export type CreateProjectRequest = {
119
- parentFolderId: string;
120
- name: string;
121
- description: string;
122
- };
123
58
  export type NetworkSubnetDetails = {
124
59
  az?: string;
125
60
  cidr?: string;
@@ -138,152 +73,250 @@ export type NetworkResponse = {
138
73
  projectId: string;
139
74
  networkId: string;
140
75
  details: NetworkDetails;
76
+ tags: Tag[];
141
77
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
142
78
  createdAt: string;
143
79
  updatedAt: string;
144
80
  deletedAt?: string;
145
81
  };
146
- export type ListNetworkResponse = {
147
- stackSpotAccountId: string;
148
- foundationId: string;
149
- projectId?: string;
150
- pendingResources: boolean;
151
- content: NetworkResponse[];
152
- };
153
- export type CreateNetworkRequest = {
154
- projectId: string;
155
- prefixLength: number;
156
- networkName?: string;
157
- networkType: "WORKLOAD";
82
+ export type FolderContent = {
83
+ "type": "FOLDER" | "PROJECT";
84
+ id: string;
85
+ name: string;
86
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
158
87
  };
159
- export type NetworkConnectionDetails = {
160
- accepted?: boolean;
161
- requesterNetwork: NetworkResponse;
162
- accepterNetwork: NetworkResponse;
88
+ export type FolderDetails = {
89
+ name: string;
90
+ pendingResources: boolean;
91
+ content: FolderContent[];
163
92
  };
164
- export type NetworkConnectionResponse = {
93
+ export type FolderResponse = {
165
94
  stackSpotAccountId: string;
166
95
  foundationId: string;
167
- accepterNetworkId: string;
168
- accepterProjectId: string;
169
- requesterNetworkId: string;
170
- requesterProjectId: string;
171
- networkConnectionId: string;
172
- details: NetworkConnectionDetails;
96
+ parentFolderId: string;
97
+ folderId: string;
98
+ details: FolderDetails;
99
+ tags: Tag[];
173
100
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
174
101
  createdAt: string;
175
102
  updatedAt: string;
176
103
  deletedAt?: string;
177
104
  };
178
- export type ListNetworkConnectionResponse = {
105
+ export type DnsZoneDetails = {
106
+ domain: string;
107
+ dnsZoneType: string;
108
+ };
109
+ export type DnsZoneResponse = {
179
110
  stackSpotAccountId: string;
180
111
  foundationId: string;
181
- accepterNetworkId?: string;
182
- accepterProjectId?: string;
183
- requesterNetworkId?: string;
184
- requesterProjectId?: string;
185
- pendingResources: boolean;
186
- content: NetworkConnectionResponse[];
187
- };
188
- export type CreateNetworkConnectionRequest = {
189
- accepterNetworkId: string;
190
- requesterNetworkId: string;
112
+ dnsZoneId: string;
113
+ details: DnsZoneDetails;
114
+ tags: Tag[];
115
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
116
+ createdAt: string;
117
+ updatedAt: string;
118
+ deletedAt?: string;
191
119
  };
192
- export type InboundDetails = {
120
+ export type DnsRecordDetails = {
193
121
  recordName: string;
122
+ records: string[];
123
+ ttl: number;
124
+ "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
125
+ dnsZoneName: string;
194
126
  };
195
- export type InboundResponse = {
127
+ export type DnsRecordResponse = {
196
128
  stackSpotAccountId: string;
197
129
  foundationId: string;
198
- projectId: string;
199
- inboundId: string;
200
- details: InboundDetails;
130
+ dnsZoneId: string;
131
+ dnsRecordId: string;
132
+ details: DnsRecordDetails;
133
+ tags: Tag[];
201
134
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
202
135
  createdAt: string;
203
136
  updatedAt: string;
204
137
  deletedAt?: string;
205
138
  };
206
- export type ListInboundResponse = {
139
+ export type CidrDetails = {
140
+ cidrNotation: string;
141
+ networkAddress: string;
142
+ netmask: string;
143
+ broadcastAddress: string;
144
+ lowAddress: string;
145
+ highAddress: string;
146
+ addressCount: number;
147
+ };
148
+ export type CidrResponse = {
207
149
  stackSpotAccountId: string;
208
150
  foundationId: string;
209
- pendingResources: boolean;
210
- content: InboundResponse[];
151
+ cidrId: string;
152
+ details: CidrDetails;
153
+ tags: Tag[];
154
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
155
+ createdAt: string;
156
+ updatedAt: string;
157
+ deletedAt?: string;
211
158
  };
212
- export type CreateInboundRequest = {
213
- projectId: string;
214
- certificateId: string;
215
- domain: string;
216
- applicationLoadBalancer: string;
159
+ export type CertificateDomainValidation = {
160
+ domainName?: string;
161
+ recordName?: string;
162
+ recordType?: string;
163
+ recordValue?: string;
217
164
  };
218
- export type FolderContent = {
219
- "type": "FOLDER" | "PROJECT";
220
- id: string;
165
+ export type CertificateDetails = {
221
166
  name: string;
167
+ forInbound: "TRUE" | "FALSE";
168
+ certificateStatus?: string;
169
+ domainName?: string;
170
+ domainValidation?: CertificateDomainValidation[];
171
+ notAfter?: string;
172
+ notBefore?: string;
173
+ "type"?: string;
174
+ validationMethod?: string;
175
+ };
176
+ export type CertificateResponse = {
177
+ stackSpotAccountId: string;
178
+ foundationId: string;
179
+ certificateId: string;
180
+ details: CertificateDetails;
222
181
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
182
+ tags: Tag[];
183
+ createdAt: string;
184
+ updatedAt: string;
185
+ deletedAt?: string;
223
186
  };
224
- export type FolderDetails = {
187
+ export type FoundationDetails = {
225
188
  name: string;
226
- pendingResources: boolean;
227
- content: FolderContent[];
189
+ description: string;
190
+ cloudProvider: string;
191
+ region: string;
228
192
  };
229
- export type FolderResponse = {
193
+ export type FoundationResponse = {
230
194
  stackSpotAccountId: string;
231
195
  foundationId: string;
232
- parentFolderId: string;
233
- folderId: string;
234
- details: FolderDetails;
196
+ details: FoundationDetails;
197
+ tags: Tag[];
235
198
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
236
199
  createdAt: string;
237
200
  updatedAt: string;
238
201
  deletedAt?: string;
239
202
  };
240
- export type CreateFolderRequest = {
241
- parentFolderId: string;
203
+ export type ListFoundationResponse = {
204
+ stackSpotAccountId: string;
205
+ pendingResources: boolean;
206
+ content: FoundationResponse[];
207
+ };
208
+ export type CreateFoundationRequest = {
242
209
  name: string;
210
+ description: string;
211
+ cloudProvider: string;
212
+ region: string;
243
213
  };
244
- export type DnsZoneDetails = {
245
- domain: string;
246
- dnsZoneType: string;
214
+ export type ListVpnResponse = {
215
+ stackSpotAccountId: string;
216
+ foundationId: string;
217
+ pendingResources: boolean;
218
+ content: VpnResponse[];
247
219
  };
248
- export type DnsZoneResponse = {
220
+ export type CreateVpnRequest = {
221
+ peerCustomerGatewayIp: string;
222
+ destinationCidrBlock: string;
223
+ tags?: Tag[];
224
+ };
225
+ export type TenantDetails = {
226
+ name: string;
227
+ };
228
+ export type TenantResponse = {
249
229
  stackSpotAccountId: string;
250
230
  foundationId: string;
251
- dnsZoneId: string;
252
- details: DnsZoneDetails;
231
+ tenantId: string;
232
+ details: TenantDetails;
253
233
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
254
234
  createdAt: string;
255
235
  updatedAt: string;
256
236
  deletedAt?: string;
257
237
  };
258
- export type ListDnsZoneResponse = {
238
+ export type ListTenantResponse = {
259
239
  stackSpotAccountId: string;
260
240
  foundationId: string;
261
241
  pendingResources: boolean;
262
- content: DnsZoneResponse[];
242
+ content: TenantResponse[];
263
243
  };
264
- export type CreateDnsZoneRequest = {
265
- domain: string;
266
- "type": "PUBLIC" | "PRIVATE";
267
- projectId?: string;
244
+ export type CreateTenantRequest = {
245
+ name: string;
246
+ publicCidrs: string[];
268
247
  };
269
- export type DnsRecordDetails = {
270
- recordName: string;
271
- records: string[];
272
- ttl: number;
273
- "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
274
- dnsZoneName: string;
248
+ export type RuntimeDetails = {
249
+ name: string;
275
250
  };
276
- export type DnsRecordResponse = {
251
+ export type RuntimeResponse = {
277
252
  stackSpotAccountId: string;
278
253
  foundationId: string;
279
- dnsZoneId: string;
280
- dnsRecordId: string;
281
- details: DnsRecordDetails;
254
+ tenantId: string;
255
+ runtimeId: string;
256
+ details: RuntimeDetails;
282
257
  status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
283
258
  createdAt: string;
284
259
  updatedAt: string;
285
260
  deletedAt?: string;
286
261
  };
262
+ export type ListRuntimeResponse = {
263
+ stackSpotAccountId: string;
264
+ foundationId: string;
265
+ projectId?: string;
266
+ tenantId?: string;
267
+ pendingResources: boolean;
268
+ content: RuntimeResponse[];
269
+ };
270
+ export type CreateRuntimeRequest = {
271
+ projectId: string;
272
+ name: string;
273
+ publicCidrs: string[];
274
+ clusterAdminRoles: string[];
275
+ };
276
+ export type ListProjectResponse = {
277
+ stackSpotAccountId: string;
278
+ foundationId: string;
279
+ parentFolderId?: string;
280
+ pendingResources: boolean;
281
+ content: ProjectResponse[];
282
+ };
283
+ export type CreateProjectRequest = {
284
+ parentFolderId: string;
285
+ name: string;
286
+ description: string;
287
+ tags?: Tag[];
288
+ };
289
+ export type ListNetworkResponse = {
290
+ stackSpotAccountId: string;
291
+ foundationId: string;
292
+ projectId?: string;
293
+ pendingResources: boolean;
294
+ content: NetworkResponse[];
295
+ };
296
+ export type CreateNetworkRequest = {
297
+ projectId: string;
298
+ prefixLength: number;
299
+ networkName?: string;
300
+ networkType: "WORKLOAD";
301
+ tags?: Tag[];
302
+ };
303
+ export type CreateFolderRequest = {
304
+ parentFolderId: string;
305
+ name: string;
306
+ tags?: Tag[];
307
+ };
308
+ export type ListDnsZoneResponse = {
309
+ stackSpotAccountId: string;
310
+ foundationId: string;
311
+ pendingResources: boolean;
312
+ content: DnsZoneResponse[];
313
+ };
314
+ export type CreateDnsZoneRequest = {
315
+ domain: string;
316
+ "type": "PUBLIC" | "PRIVATE";
317
+ projectId?: string;
318
+ tags?: Tag[];
319
+ };
287
320
  export type ListDnsRecordResponse = {
288
321
  stackSpotAccountId: string;
289
322
  foundationId: string;
@@ -300,125 +333,263 @@ export type CreateDnsRecordRequest = {
300
333
  ttl: number;
301
334
  "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
302
335
  };
303
- export type CidrDetails = {
304
- cidrNotation: string;
305
- networkAddress: string;
306
- netmask: string;
307
- broadcastAddress: string;
308
- lowAddress: string;
309
- highAddress: string;
310
- addressCount: number;
336
+ export type ListCidrResponse = {
337
+ stackSpotAccountId: string;
338
+ foundationId: string;
339
+ pendingResources: boolean;
340
+ content: CidrResponse[];
311
341
  };
312
- export type CidrResponse = {
342
+ export type CreateCidrRequest = {
343
+ address: string;
344
+ prefix: number;
345
+ tags?: Tag[];
346
+ };
347
+ export type ListCertificateResponse = {
313
348
  stackSpotAccountId: string;
314
349
  foundationId: string;
350
+ pendingResources: boolean;
351
+ content: CertificateResponse[];
352
+ };
353
+ export type CreateCertificateRequestBase = {
354
+ tags?: Tag[];
355
+ certificateName: string;
356
+ forInbound: "TRUE" | "FALSE";
357
+ "type": string;
358
+ };
359
+ export type CreatePublicCertificateRequest = {
360
+ "type": "CreatePublicCertificateRequest";
361
+ } & CreateCertificateRequestBase & {
362
+ domainName?: string;
363
+ };
364
+ export type ImportCertificateRequest = {
365
+ "type": "ImportCertificateRequest";
366
+ } & CreateCertificateRequestBase & {
367
+ certificateBody?: string;
368
+ certificatePrivateKey?: string;
369
+ certificateChain?: string;
370
+ };
371
+ export type Configuration = {
372
+ ikev1: string;
373
+ ikev2: string;
374
+ };
375
+ export type VpnConfigurationResponse = {
376
+ vpnId: string;
377
+ foundationId: string;
378
+ configuration: Configuration;
379
+ };
380
+ export function putVpnTags({ authorization, xAccountId, foundationId, vpnId, body }: {
381
+ authorization: string;
382
+ xAccountId?: string;
383
+ foundationId: string;
384
+ vpnId: string;
385
+ body: Tag[];
386
+ }, opts?: Oazapfts.RequestOpts) {
387
+ return oazapfts.ok(oazapfts.fetchJson<{
388
+ status: 202;
389
+ data: VpnResponse;
390
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}/tags`, oazapfts.json({
391
+ ...opts,
392
+ method: "PUT",
393
+ body,
394
+ headers: oazapfts.mergeHeaders(opts?.headers, {
395
+ Authorization: authorization,
396
+ "x-account-id": xAccountId
397
+ })
398
+ })));
399
+ }
400
+ export function putProjectTags({ authorization, xAccountId, foundationId, projectId, body }: {
401
+ authorization: string;
402
+ xAccountId?: string;
403
+ foundationId: string;
404
+ projectId: string;
405
+ body: Tag[];
406
+ }, opts?: Oazapfts.RequestOpts) {
407
+ return oazapfts.ok(oazapfts.fetchJson<{
408
+ status: 202;
409
+ data: ProjectResponse;
410
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects/${encodeURIComponent(projectId)}/tags`, oazapfts.json({
411
+ ...opts,
412
+ method: "PUT",
413
+ body,
414
+ headers: oazapfts.mergeHeaders(opts?.headers, {
415
+ Authorization: authorization,
416
+ "x-account-id": xAccountId
417
+ })
418
+ })));
419
+ }
420
+ export function putNetworkTags({ authorization, xAccountId, foundationId, networkId, body }: {
421
+ authorization: string;
422
+ xAccountId?: string;
423
+ foundationId: string;
424
+ networkId: string;
425
+ body: Tag[];
426
+ }, opts?: Oazapfts.RequestOpts) {
427
+ return oazapfts.ok(oazapfts.fetchJson<{
428
+ status: 202;
429
+ data: NetworkResponse;
430
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}/tags`, oazapfts.json({
431
+ ...opts,
432
+ method: "PUT",
433
+ body,
434
+ headers: oazapfts.mergeHeaders(opts?.headers, {
435
+ Authorization: authorization,
436
+ "x-account-id": xAccountId
437
+ })
438
+ })));
439
+ }
440
+ export function getFolderTags({ authorization, xAccountId, foundationId, folderId }: {
441
+ authorization: string;
442
+ xAccountId?: string;
443
+ foundationId: string;
444
+ folderId: string;
445
+ }, opts?: Oazapfts.RequestOpts) {
446
+ return oazapfts.ok(oazapfts.fetchJson<{
447
+ status: 202;
448
+ data: Tag[];
449
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders/${encodeURIComponent(folderId)}/tags`, {
450
+ ...opts,
451
+ headers: oazapfts.mergeHeaders(opts?.headers, {
452
+ Authorization: authorization,
453
+ "x-account-id": xAccountId
454
+ })
455
+ }));
456
+ }
457
+ export function putFolderTags({ authorization, xAccountId, foundationId, folderId, body }: {
458
+ authorization: string;
459
+ xAccountId?: string;
460
+ foundationId: string;
461
+ folderId: string;
462
+ body: Tag[];
463
+ }, opts?: Oazapfts.RequestOpts) {
464
+ return oazapfts.ok(oazapfts.fetchJson<{
465
+ status: 202;
466
+ data: FolderResponse;
467
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders/${encodeURIComponent(folderId)}/tags`, oazapfts.json({
468
+ ...opts,
469
+ method: "PUT",
470
+ body,
471
+ headers: oazapfts.mergeHeaders(opts?.headers, {
472
+ Authorization: authorization,
473
+ "x-account-id": xAccountId
474
+ })
475
+ })));
476
+ }
477
+ export function putDnsZoneTags({ authorization, xAccountId, foundationId, dnsZoneId, body }: {
478
+ authorization: string;
479
+ xAccountId?: string;
480
+ foundationId: string;
481
+ dnsZoneId: string;
482
+ body: Tag[];
483
+ }, opts?: Oazapfts.RequestOpts) {
484
+ return oazapfts.ok(oazapfts.fetchJson<{
485
+ status: 202;
486
+ data: DnsZoneResponse;
487
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}/tags`, oazapfts.json({
488
+ ...opts,
489
+ method: "PUT",
490
+ body,
491
+ headers: oazapfts.mergeHeaders(opts?.headers, {
492
+ Authorization: authorization,
493
+ "x-account-id": xAccountId
494
+ })
495
+ })));
496
+ }
497
+ export function putDnsRecordRecords({ authorization, xAccountId, foundationId, dnsRecordId, body }: {
498
+ authorization: string;
499
+ xAccountId?: string;
500
+ foundationId: string;
501
+ dnsRecordId: string;
502
+ body: string[];
503
+ }, opts?: Oazapfts.RequestOpts) {
504
+ return oazapfts.ok(oazapfts.fetchJson<{
505
+ status: 200;
506
+ data: DnsRecordResponse;
507
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}/records`, oazapfts.json({
508
+ ...opts,
509
+ method: "PUT",
510
+ body,
511
+ headers: oazapfts.mergeHeaders(opts?.headers, {
512
+ Authorization: authorization,
513
+ "x-account-id": xAccountId
514
+ })
515
+ })));
516
+ }
517
+ export function putCidrTags({ authorization, xAccountId, foundationId, cidrId, body }: {
518
+ authorization: string;
519
+ xAccountId?: string;
520
+ foundationId: string;
315
521
  cidrId: string;
316
- details: CidrDetails;
317
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
318
- createdAt: string;
319
- updatedAt: string;
320
- deletedAt?: string;
321
- };
322
- export type ListCidrResponse = {
323
- stackSpotAccountId: string;
324
- foundationId: string;
325
- pendingResources: boolean;
326
- content: CidrResponse[];
327
- };
328
- export type CreateCidrRequest = {
329
- address: string;
330
- prefix: number;
331
- };
332
- export type CertificateDomainValidation = {
333
- domainName?: string;
334
- recordName?: string;
335
- recordType?: string;
336
- recordValue?: string;
337
- };
338
- export type CertificateDetails = {
339
- name: string;
340
- forInbound: "TRUE" | "FALSE";
341
- certificateStatus?: string;
342
- domainName?: string;
343
- domainValidation?: CertificateDomainValidation[];
344
- notAfter?: string;
345
- notBefore?: string;
346
- "type"?: string;
347
- validationMethod?: string;
348
- };
349
- export type CertificateResponse = {
350
- stackSpotAccountId: string;
522
+ body: Tag[];
523
+ }, opts?: Oazapfts.RequestOpts) {
524
+ return oazapfts.ok(oazapfts.fetchJson<{
525
+ status: 202;
526
+ data: CidrResponse;
527
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs/${encodeURIComponent(cidrId)}/tags`, oazapfts.json({
528
+ ...opts,
529
+ method: "PUT",
530
+ body,
531
+ headers: oazapfts.mergeHeaders(opts?.headers, {
532
+ Authorization: authorization,
533
+ "x-account-id": xAccountId
534
+ })
535
+ })));
536
+ }
537
+ export function putCertificateTags({ authorization, xAccountId, foundationId, certificateId, body }: {
538
+ authorization: string;
539
+ xAccountId?: string;
351
540
  foundationId: string;
352
541
  certificateId: string;
353
- details: CertificateDetails;
354
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
355
- createdAt: string;
356
- updatedAt: string;
357
- deletedAt?: string;
358
- };
359
- export type ListCertificateResponse = {
360
- stackSpotAccountId: string;
361
- foundationId: string;
362
- pendingResources: boolean;
363
- content: CertificateResponse[];
364
- };
365
- export type CreateCertificateRequestBase = {
366
- certificateName: string;
367
- forInbound: "TRUE" | "FALSE";
368
- "type": string;
369
- };
370
- export type CreatePublicCertificateRequest = {
371
- "type": "CreatePublicCertificateRequest";
372
- } & CreateCertificateRequestBase & {
373
- domainName?: string;
374
- };
375
- export type ImportCertificateRequest = {
376
- "type": "ImportCertificateRequest";
377
- } & CreateCertificateRequestBase & {
378
- certificateBody?: string;
379
- certificatePrivateKey?: string;
380
- certificateChain?: string;
381
- };
382
- export type Configuration = {
383
- ikev1: string;
384
- ikev2: string;
385
- };
386
- export type VpnConfigurationResponse = {
387
- vpnId: string;
388
- foundationId: string;
389
- configuration: Configuration;
390
- };
391
- export function listFoundations({ authorization }: {
542
+ body: Tag[];
543
+ }, opts?: Oazapfts.RequestOpts) {
544
+ return oazapfts.ok(oazapfts.fetchJson<{
545
+ status: 202;
546
+ data: CertificateResponse;
547
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}/tags`, oazapfts.json({
548
+ ...opts,
549
+ method: "PUT",
550
+ body,
551
+ headers: oazapfts.mergeHeaders(opts?.headers, {
552
+ Authorization: authorization,
553
+ "x-account-id": xAccountId
554
+ })
555
+ })));
556
+ }
557
+ export function listFoundations({ authorization, xAccountId }: {
392
558
  authorization: string;
559
+ xAccountId?: string;
393
560
  }, opts?: Oazapfts.RequestOpts) {
394
561
  return oazapfts.ok(oazapfts.fetchJson<{
395
- status: 200;
562
+ status: 202;
396
563
  data: ListFoundationResponse;
397
564
  }>("/v1/foundations", {
398
565
  ...opts,
399
566
  headers: oazapfts.mergeHeaders(opts?.headers, {
400
- Authorization: authorization
567
+ Authorization: authorization,
568
+ "x-account-id": xAccountId
401
569
  })
402
570
  }));
403
571
  }
404
- export function createFoundation({ authorization, createFoundationRequest }: {
572
+ export function createFoundation({ authorization, xAccountId, createFoundationRequest }: {
405
573
  authorization: string;
574
+ xAccountId?: string;
406
575
  createFoundationRequest: CreateFoundationRequest;
407
576
  }, opts?: Oazapfts.RequestOpts) {
408
577
  return oazapfts.ok(oazapfts.fetchJson<{
409
- status: 200;
578
+ status: 202;
410
579
  data: FoundationResponse;
411
580
  }>("/v1/foundations", oazapfts.json({
412
581
  ...opts,
413
582
  method: "POST",
414
583
  body: createFoundationRequest,
415
584
  headers: oazapfts.mergeHeaders(opts?.headers, {
416
- Authorization: authorization
585
+ Authorization: authorization,
586
+ "x-account-id": xAccountId
417
587
  })
418
588
  })));
419
589
  }
420
- export function listVpns({ authorization, foundationId }: {
590
+ export function listVpns({ authorization, xAccountId, foundationId }: {
421
591
  authorization: string;
592
+ xAccountId?: string;
422
593
  foundationId: string;
423
594
  }, opts?: Oazapfts.RequestOpts) {
424
595
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -427,29 +598,33 @@ export function listVpns({ authorization, foundationId }: {
427
598
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, {
428
599
  ...opts,
429
600
  headers: oazapfts.mergeHeaders(opts?.headers, {
430
- Authorization: authorization
601
+ Authorization: authorization,
602
+ "x-account-id": xAccountId
431
603
  })
432
604
  }));
433
605
  }
434
- export function createVpn({ authorization, foundationId, createVpnRequest }: {
606
+ export function createVpn({ authorization, xAccountId, foundationId, createVpnRequest }: {
435
607
  authorization: string;
608
+ xAccountId?: string;
436
609
  foundationId: string;
437
610
  createVpnRequest: CreateVpnRequest;
438
611
  }, opts?: Oazapfts.RequestOpts) {
439
612
  return oazapfts.ok(oazapfts.fetchJson<{
440
- status: 200;
613
+ status: 202;
441
614
  data: VpnResponse;
442
615
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, oazapfts.json({
443
616
  ...opts,
444
617
  method: "POST",
445
618
  body: createVpnRequest,
446
619
  headers: oazapfts.mergeHeaders(opts?.headers, {
447
- Authorization: authorization
620
+ Authorization: authorization,
621
+ "x-account-id": xAccountId
448
622
  })
449
623
  })));
450
624
  }
451
- export function listTenant({ authorization, foundationId }: {
625
+ export function listTenant({ authorization, xAccountId, foundationId }: {
452
626
  authorization: string;
627
+ xAccountId?: string;
453
628
  foundationId: string;
454
629
  }, opts?: Oazapfts.RequestOpts) {
455
630
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -458,12 +633,14 @@ export function listTenant({ authorization, foundationId }: {
458
633
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/tenants`, {
459
634
  ...opts,
460
635
  headers: oazapfts.mergeHeaders(opts?.headers, {
461
- Authorization: authorization
636
+ Authorization: authorization,
637
+ "x-account-id": xAccountId
462
638
  })
463
639
  }));
464
640
  }
465
- export function createTenant({ authorization, foundationId, createTenantRequest }: {
641
+ export function createTenant({ authorization, xAccountId, foundationId, createTenantRequest }: {
466
642
  authorization: string;
643
+ xAccountId?: string;
467
644
  foundationId: string;
468
645
  createTenantRequest: CreateTenantRequest;
469
646
  }, opts?: Oazapfts.RequestOpts) {
@@ -475,151 +652,130 @@ export function createTenant({ authorization, foundationId, createTenantRequest
475
652
  method: "POST",
476
653
  body: createTenantRequest,
477
654
  headers: oazapfts.mergeHeaders(opts?.headers, {
478
- Authorization: authorization
479
- })
480
- })));
481
- }
482
- export function listProject({ authorization, foundationId, parentFolderId }: {
483
- authorization: string;
484
- foundationId: string;
485
- parentFolderId?: string;
486
- }, opts?: Oazapfts.RequestOpts) {
487
- return oazapfts.ok(oazapfts.fetchJson<{
488
- status: 200;
489
- data: ListProjectResponse;
490
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects${QS.query(QS.explode({
491
- parentFolderId
492
- }))}`, {
493
- ...opts,
494
- headers: oazapfts.mergeHeaders(opts?.headers, {
495
- Authorization: authorization
496
- })
497
- }));
498
- }
499
- export function createProject({ authorization, foundationId, createProjectRequest }: {
500
- authorization: string;
501
- foundationId: string;
502
- createProjectRequest: CreateProjectRequest;
503
- }, opts?: Oazapfts.RequestOpts) {
504
- return oazapfts.ok(oazapfts.fetchJson<{
505
- status: 200;
506
- data: ProjectResponse;
507
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects`, oazapfts.json({
508
- ...opts,
509
- method: "POST",
510
- body: createProjectRequest,
511
- headers: oazapfts.mergeHeaders(opts?.headers, {
512
- Authorization: authorization
655
+ Authorization: authorization,
656
+ "x-account-id": xAccountId
513
657
  })
514
658
  })));
515
659
  }
516
- export function listNetwork({ authorization, foundationId, projectId }: {
660
+ export function listRuntime({ authorization, xAccountId, foundationId, tenantId, projectId }: {
517
661
  authorization: string;
662
+ xAccountId?: string;
518
663
  foundationId: string;
664
+ tenantId?: string;
519
665
  projectId?: string;
520
666
  }, opts?: Oazapfts.RequestOpts) {
521
667
  return oazapfts.ok(oazapfts.fetchJson<{
522
668
  status: 200;
523
- data: ListNetworkResponse;
524
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks${QS.query(QS.explode({
669
+ data: ListRuntimeResponse;
670
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/runtimes${QS.query(QS.explode({
671
+ tenantId,
525
672
  projectId
526
673
  }))}`, {
527
674
  ...opts,
528
675
  headers: oazapfts.mergeHeaders(opts?.headers, {
529
- Authorization: authorization
676
+ Authorization: authorization,
677
+ "x-account-id": xAccountId
530
678
  })
531
679
  }));
532
680
  }
533
- export function createNetwork({ authorization, foundationId, createNetworkRequest }: {
681
+ export function createRuntime({ authorization, xAccountId, foundationId, createRuntimeRequest }: {
534
682
  authorization: string;
683
+ xAccountId?: string;
535
684
  foundationId: string;
536
- createNetworkRequest: CreateNetworkRequest;
685
+ createRuntimeRequest: CreateRuntimeRequest;
537
686
  }, opts?: Oazapfts.RequestOpts) {
538
687
  return oazapfts.ok(oazapfts.fetchJson<{
539
- status: 200;
540
- data: NetworkResponse;
541
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks`, oazapfts.json({
688
+ status: 202;
689
+ data: RuntimeResponse;
690
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/runtimes`, oazapfts.json({
542
691
  ...opts,
543
692
  method: "POST",
544
- body: createNetworkRequest,
693
+ body: createRuntimeRequest,
545
694
  headers: oazapfts.mergeHeaders(opts?.headers, {
546
- Authorization: authorization
695
+ Authorization: authorization,
696
+ "x-account-id": xAccountId
547
697
  })
548
698
  })));
549
699
  }
550
- export function listNetworkConnection({ authorization, foundationId, accepterNetworkId, accepterProjectId, requesterNetworkId, requesterProjectId }: {
700
+ export function listProject({ authorization, xAccountId, foundationId, parentFolderId }: {
551
701
  authorization: string;
702
+ xAccountId?: string;
552
703
  foundationId: string;
553
- accepterNetworkId?: string;
554
- accepterProjectId?: string;
555
- requesterNetworkId?: string;
556
- requesterProjectId?: string;
704
+ parentFolderId?: string;
557
705
  }, opts?: Oazapfts.RequestOpts) {
558
706
  return oazapfts.ok(oazapfts.fetchJson<{
559
707
  status: 200;
560
- data: ListNetworkConnectionResponse;
561
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections${QS.query(QS.explode({
562
- accepterNetworkId,
563
- accepterProjectId,
564
- requesterNetworkId,
565
- requesterProjectId
708
+ data: ListProjectResponse;
709
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects${QS.query(QS.explode({
710
+ parentFolderId
566
711
  }))}`, {
567
712
  ...opts,
568
713
  headers: oazapfts.mergeHeaders(opts?.headers, {
569
- Authorization: authorization
714
+ Authorization: authorization,
715
+ "x-account-id": xAccountId
570
716
  })
571
717
  }));
572
718
  }
573
- export function createNetworkConnection({ authorization, foundationId, createNetworkConnectionRequest }: {
719
+ export function createProject({ authorization, xAccountId, foundationId, createProjectRequest }: {
574
720
  authorization: string;
721
+ xAccountId?: string;
575
722
  foundationId: string;
576
- createNetworkConnectionRequest: CreateNetworkConnectionRequest;
723
+ createProjectRequest: CreateProjectRequest;
577
724
  }, opts?: Oazapfts.RequestOpts) {
578
725
  return oazapfts.ok(oazapfts.fetchJson<{
579
- status: 200;
580
- data: NetworkConnectionResponse;
581
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections`, oazapfts.json({
726
+ status: 202;
727
+ data: ProjectResponse;
728
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects`, oazapfts.json({
582
729
  ...opts,
583
730
  method: "POST",
584
- body: createNetworkConnectionRequest,
731
+ body: createProjectRequest,
585
732
  headers: oazapfts.mergeHeaders(opts?.headers, {
586
- Authorization: authorization
733
+ Authorization: authorization,
734
+ "x-account-id": xAccountId
587
735
  })
588
736
  })));
589
737
  }
590
- export function listInbound({ authorization, foundationId }: {
738
+ export function listNetwork({ authorization, xAccountId, foundationId, projectId }: {
591
739
  authorization: string;
740
+ xAccountId?: string;
592
741
  foundationId: string;
742
+ projectId?: string;
593
743
  }, opts?: Oazapfts.RequestOpts) {
594
744
  return oazapfts.ok(oazapfts.fetchJson<{
595
745
  status: 200;
596
- data: ListInboundResponse;
597
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, {
746
+ data: ListNetworkResponse;
747
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks${QS.query(QS.explode({
748
+ projectId
749
+ }))}`, {
598
750
  ...opts,
599
751
  headers: oazapfts.mergeHeaders(opts?.headers, {
600
- Authorization: authorization
752
+ Authorization: authorization,
753
+ "x-account-id": xAccountId
601
754
  })
602
755
  }));
603
756
  }
604
- export function createInbound({ authorization, foundationId, createInboundRequest }: {
757
+ export function createNetwork({ authorization, xAccountId, foundationId, createNetworkRequest }: {
605
758
  authorization: string;
759
+ xAccountId?: string;
606
760
  foundationId: string;
607
- createInboundRequest: CreateInboundRequest;
761
+ createNetworkRequest: CreateNetworkRequest;
608
762
  }, opts?: Oazapfts.RequestOpts) {
609
763
  return oazapfts.ok(oazapfts.fetchJson<{
610
- status: 200;
611
- data: InboundResponse;
612
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, oazapfts.json({
764
+ status: 202;
765
+ data: NetworkResponse;
766
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks`, oazapfts.json({
613
767
  ...opts,
614
768
  method: "POST",
615
- body: createInboundRequest,
769
+ body: createNetworkRequest,
616
770
  headers: oazapfts.mergeHeaders(opts?.headers, {
617
- Authorization: authorization
771
+ Authorization: authorization,
772
+ "x-account-id": xAccountId
618
773
  })
619
774
  })));
620
775
  }
621
- export function getFolder({ authorization, foundationId, folderId }: {
776
+ export function getFolder({ authorization, xAccountId, foundationId, folderId }: {
622
777
  authorization: string;
778
+ xAccountId?: string;
623
779
  foundationId: string;
624
780
  folderId: string;
625
781
  }, opts?: Oazapfts.RequestOpts) {
@@ -631,32 +787,36 @@ export function getFolder({ authorization, foundationId, folderId }: {
631
787
  }))}`, {
632
788
  ...opts,
633
789
  headers: oazapfts.mergeHeaders(opts?.headers, {
634
- Authorization: authorization
790
+ Authorization: authorization,
791
+ "x-account-id": xAccountId
635
792
  })
636
793
  }));
637
794
  }
638
- export function createFolder({ authorization, foundationId, createFolderRequest }: {
795
+ export function createFolder({ authorization, xAccountId, foundationId, createFolderRequest }: {
639
796
  authorization: string;
797
+ xAccountId?: string;
640
798
  foundationId: string;
641
799
  createFolderRequest: CreateFolderRequest;
642
800
  }, opts?: Oazapfts.RequestOpts) {
643
801
  return oazapfts.ok(oazapfts.fetchJson<{
644
- status: 200;
802
+ status: 202;
645
803
  data: FolderResponse;
646
804
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders`, oazapfts.json({
647
805
  ...opts,
648
806
  method: "POST",
649
807
  body: createFolderRequest,
650
808
  headers: oazapfts.mergeHeaders(opts?.headers, {
651
- Authorization: authorization
809
+ Authorization: authorization,
810
+ "x-account-id": xAccountId
652
811
  })
653
812
  })));
654
813
  }
655
- export function listDnsZone({ authorization, foundationId, projectId, privacy }: {
814
+ export function listDnsZone({ authorization, xAccountId, foundationId, projectId, privacy }: {
656
815
  authorization: string;
816
+ xAccountId?: string;
657
817
  foundationId: string;
658
818
  projectId?: string;
659
- privacy?: string;
819
+ privacy?: "PUBLIC" | "PRIVATE";
660
820
  }, opts?: Oazapfts.RequestOpts) {
661
821
  return oazapfts.ok(oazapfts.fetchJson<{
662
822
  status: 200;
@@ -667,29 +827,33 @@ export function listDnsZone({ authorization, foundationId, projectId, privacy }:
667
827
  }))}`, {
668
828
  ...opts,
669
829
  headers: oazapfts.mergeHeaders(opts?.headers, {
670
- Authorization: authorization
830
+ Authorization: authorization,
831
+ "x-account-id": xAccountId
671
832
  })
672
833
  }));
673
834
  }
674
- export function createDnsZone({ authorization, foundationId, createDnsZoneRequest }: {
835
+ export function createDnsZone({ authorization, xAccountId, foundationId, createDnsZoneRequest }: {
675
836
  authorization: string;
837
+ xAccountId?: string;
676
838
  foundationId: string;
677
839
  createDnsZoneRequest: CreateDnsZoneRequest;
678
840
  }, opts?: Oazapfts.RequestOpts) {
679
841
  return oazapfts.ok(oazapfts.fetchJson<{
680
- status: 200;
842
+ status: 202;
681
843
  data: DnsZoneResponse;
682
844
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, oazapfts.json({
683
845
  ...opts,
684
846
  method: "POST",
685
847
  body: createDnsZoneRequest,
686
848
  headers: oazapfts.mergeHeaders(opts?.headers, {
687
- Authorization: authorization
849
+ Authorization: authorization,
850
+ "x-account-id": xAccountId
688
851
  })
689
852
  })));
690
853
  }
691
- export function listDnsRecord({ authorization, foundationId, projectId, dnsZoneId }: {
854
+ export function listDnsRecord({ authorization, xAccountId, foundationId, projectId, dnsZoneId }: {
692
855
  authorization: string;
856
+ xAccountId?: string;
693
857
  foundationId: string;
694
858
  projectId?: string;
695
859
  dnsZoneId?: string;
@@ -703,29 +867,33 @@ export function listDnsRecord({ authorization, foundationId, projectId, dnsZoneI
703
867
  }))}`, {
704
868
  ...opts,
705
869
  headers: oazapfts.mergeHeaders(opts?.headers, {
706
- Authorization: authorization
870
+ Authorization: authorization,
871
+ "x-account-id": xAccountId
707
872
  })
708
873
  }));
709
874
  }
710
- export function createDnsRecord({ authorization, foundationId, createDnsRecordRequest }: {
875
+ export function createDnsRecord({ authorization, xAccountId, foundationId, createDnsRecordRequest }: {
711
876
  authorization: string;
877
+ xAccountId?: string;
712
878
  foundationId: string;
713
879
  createDnsRecordRequest: CreateDnsRecordRequest;
714
880
  }, opts?: Oazapfts.RequestOpts) {
715
881
  return oazapfts.ok(oazapfts.fetchJson<{
716
- status: 200;
882
+ status: 202;
717
883
  data: DnsRecordResponse;
718
884
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records`, oazapfts.json({
719
885
  ...opts,
720
886
  method: "POST",
721
887
  body: createDnsRecordRequest,
722
888
  headers: oazapfts.mergeHeaders(opts?.headers, {
723
- Authorization: authorization
889
+ Authorization: authorization,
890
+ "x-account-id": xAccountId
724
891
  })
725
892
  })));
726
893
  }
727
- export function listCidr({ authorization, foundationId }: {
894
+ export function listCidr({ authorization, xAccountId, foundationId }: {
728
895
  authorization: string;
896
+ xAccountId?: string;
729
897
  foundationId: string;
730
898
  }, opts?: Oazapfts.RequestOpts) {
731
899
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -734,29 +902,33 @@ export function listCidr({ authorization, foundationId }: {
734
902
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, {
735
903
  ...opts,
736
904
  headers: oazapfts.mergeHeaders(opts?.headers, {
737
- Authorization: authorization
905
+ Authorization: authorization,
906
+ "x-account-id": xAccountId
738
907
  })
739
908
  }));
740
909
  }
741
- export function createCidr({ authorization, foundationId, createCidrRequest }: {
910
+ export function createCidr({ authorization, xAccountId, foundationId, createCidrRequest }: {
742
911
  authorization: string;
912
+ xAccountId?: string;
743
913
  foundationId: string;
744
914
  createCidrRequest: CreateCidrRequest;
745
915
  }, opts?: Oazapfts.RequestOpts) {
746
916
  return oazapfts.ok(oazapfts.fetchJson<{
747
- status: 200;
917
+ status: 202;
748
918
  data: CidrResponse;
749
919
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, oazapfts.json({
750
920
  ...opts,
751
921
  method: "POST",
752
922
  body: createCidrRequest,
753
923
  headers: oazapfts.mergeHeaders(opts?.headers, {
754
- Authorization: authorization
924
+ Authorization: authorization,
925
+ "x-account-id": xAccountId
755
926
  })
756
927
  })));
757
928
  }
758
- export function listCertificates({ authorization, foundationId, forInbound }: {
929
+ export function listCertificates({ authorization, xAccountId, foundationId, forInbound }: {
759
930
  authorization: string;
931
+ xAccountId?: string;
760
932
  foundationId: string;
761
933
  forInbound?: "TRUE" | "FALSE";
762
934
  }, opts?: Oazapfts.RequestOpts) {
@@ -768,74 +940,81 @@ export function listCertificates({ authorization, foundationId, forInbound }: {
768
940
  }))}`, {
769
941
  ...opts,
770
942
  headers: oazapfts.mergeHeaders(opts?.headers, {
771
- Authorization: authorization
943
+ Authorization: authorization,
944
+ "x-account-id": xAccountId
772
945
  })
773
946
  }));
774
947
  }
775
- export function createCertificate({ authorization, foundationId, body }: {
948
+ export function createCertificate({ authorization, xAccountId, foundationId, body }: {
776
949
  authorization: string;
950
+ xAccountId?: string;
777
951
  foundationId: string;
778
952
  body: CreatePublicCertificateRequest | ImportCertificateRequest;
779
953
  }, opts?: Oazapfts.RequestOpts) {
780
954
  return oazapfts.ok(oazapfts.fetchJson<{
781
- status: 200;
955
+ status: 202;
782
956
  data: CertificateResponse;
783
957
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates`, oazapfts.json({
784
958
  ...opts,
785
959
  method: "POST",
786
960
  body,
787
961
  headers: oazapfts.mergeHeaders(opts?.headers, {
788
- Authorization: authorization
962
+ Authorization: authorization,
963
+ "x-account-id": xAccountId
789
964
  })
790
965
  })));
791
966
  }
792
- export function acceptNetworkConnection({ authorization, foundationId, networkConnectionId }: {
967
+ export function getFoundation({ authorization, xAccountId, foundationId }: {
793
968
  authorization: string;
969
+ xAccountId?: string;
794
970
  foundationId: string;
795
- networkConnectionId: string;
796
971
  }, opts?: Oazapfts.RequestOpts) {
797
972
  return oazapfts.ok(oazapfts.fetchJson<{
798
- status: 200;
799
- data: NetworkConnectionResponse;
800
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}/accept`, {
973
+ status: 202;
974
+ data: FoundationResponse;
975
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
801
976
  ...opts,
802
- method: "PATCH",
803
977
  headers: oazapfts.mergeHeaders(opts?.headers, {
804
- Authorization: authorization
978
+ Authorization: authorization,
979
+ "x-account-id": xAccountId
805
980
  })
806
981
  }));
807
982
  }
808
- export function getFoundation({ authorization, foundationId }: {
983
+ export function getVpn({ authorization, xAccountId, foundationId, vpnId }: {
809
984
  authorization: string;
985
+ xAccountId?: string;
810
986
  foundationId: string;
987
+ vpnId: string;
811
988
  }, opts?: Oazapfts.RequestOpts) {
812
989
  return oazapfts.ok(oazapfts.fetchJson<{
813
990
  status: 200;
814
- data: FoundationResponse;
815
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
991
+ data: VpnResponse;
992
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}`, {
816
993
  ...opts,
817
994
  headers: oazapfts.mergeHeaders(opts?.headers, {
818
- Authorization: authorization
995
+ Authorization: authorization,
996
+ "x-account-id": xAccountId
819
997
  })
820
998
  }));
821
999
  }
822
- export function getVpn({ authorization, foundationId, vpnId }: {
1000
+ export function deleteVpn({ authorization, xAccountId, foundationId, vpnId }: {
823
1001
  authorization: string;
1002
+ xAccountId?: string;
824
1003
  foundationId: string;
825
1004
  vpnId: string;
826
1005
  }, opts?: Oazapfts.RequestOpts) {
827
- return oazapfts.ok(oazapfts.fetchJson<{
828
- status: 200;
829
- data: VpnResponse;
830
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}`, {
1006
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}`, {
831
1007
  ...opts,
1008
+ method: "DELETE",
832
1009
  headers: oazapfts.mergeHeaders(opts?.headers, {
833
- Authorization: authorization
1010
+ Authorization: authorization,
1011
+ "x-account-id": xAccountId
834
1012
  })
835
1013
  }));
836
1014
  }
837
- export function getVpnConfiguration({ authorization, foundationId, vpnId }: {
1015
+ export function getVpnConfiguration({ authorization, xAccountId, foundationId, vpnId }: {
838
1016
  authorization: string;
1017
+ xAccountId?: string;
839
1018
  foundationId: string;
840
1019
  vpnId: string;
841
1020
  }, opts?: Oazapfts.RequestOpts) {
@@ -845,12 +1024,14 @@ export function getVpnConfiguration({ authorization, foundationId, vpnId }: {
845
1024
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}/configuration`, {
846
1025
  ...opts,
847
1026
  headers: oazapfts.mergeHeaders(opts?.headers, {
848
- Authorization: authorization
1027
+ Authorization: authorization,
1028
+ "x-account-id": xAccountId
849
1029
  })
850
1030
  }));
851
1031
  }
852
- export function getProject({ authorization, foundationId, tenantId }: {
1032
+ export function getTenant({ authorization, xAccountId, foundationId, tenantId }: {
853
1033
  authorization: string;
1034
+ xAccountId?: string;
854
1035
  foundationId: string;
855
1036
  tenantId: string;
856
1037
  }, opts?: Oazapfts.RequestOpts) {
@@ -860,12 +1041,31 @@ export function getProject({ authorization, foundationId, tenantId }: {
860
1041
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/tenants/${encodeURIComponent(tenantId)}`, {
861
1042
  ...opts,
862
1043
  headers: oazapfts.mergeHeaders(opts?.headers, {
863
- Authorization: authorization
1044
+ Authorization: authorization,
1045
+ "x-account-id": xAccountId
1046
+ })
1047
+ }));
1048
+ }
1049
+ export function getRuntime({ authorization, xAccountId, foundationId, runtimeId }: {
1050
+ authorization: string;
1051
+ xAccountId?: string;
1052
+ foundationId: string;
1053
+ runtimeId: string;
1054
+ }, opts?: Oazapfts.RequestOpts) {
1055
+ return oazapfts.ok(oazapfts.fetchJson<{
1056
+ status: 200;
1057
+ data: RuntimeResponse;
1058
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/runtimes/${encodeURIComponent(runtimeId)}`, {
1059
+ ...opts,
1060
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1061
+ Authorization: authorization,
1062
+ "x-account-id": xAccountId
864
1063
  })
865
1064
  }));
866
1065
  }
867
- export function getProject1({ authorization, foundationId, projectId }: {
1066
+ export function getProject({ authorization, xAccountId, foundationId, projectId }: {
868
1067
  authorization: string;
1068
+ xAccountId?: string;
869
1069
  foundationId: string;
870
1070
  projectId: string;
871
1071
  }, opts?: Oazapfts.RequestOpts) {
@@ -875,12 +1075,29 @@ export function getProject1({ authorization, foundationId, projectId }: {
875
1075
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects/${encodeURIComponent(projectId)}`, {
876
1076
  ...opts,
877
1077
  headers: oazapfts.mergeHeaders(opts?.headers, {
878
- Authorization: authorization
1078
+ Authorization: authorization,
1079
+ "x-account-id": xAccountId
879
1080
  })
880
1081
  }));
881
1082
  }
882
- export function getNetwork({ authorization, foundationId, networkId }: {
1083
+ export function deleteProject({ authorization, xAccountId, foundationId, projectId }: {
883
1084
  authorization: string;
1085
+ xAccountId?: string;
1086
+ foundationId: string;
1087
+ projectId: string;
1088
+ }, opts?: Oazapfts.RequestOpts) {
1089
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/projects/${encodeURIComponent(projectId)}`, {
1090
+ ...opts,
1091
+ method: "DELETE",
1092
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1093
+ Authorization: authorization,
1094
+ "x-account-id": xAccountId
1095
+ })
1096
+ }));
1097
+ }
1098
+ export function getNetwork({ authorization, xAccountId, foundationId, networkId }: {
1099
+ authorization: string;
1100
+ xAccountId?: string;
884
1101
  foundationId: string;
885
1102
  networkId: string;
886
1103
  }, opts?: Oazapfts.RequestOpts) {
@@ -890,57 +1107,61 @@ export function getNetwork({ authorization, foundationId, networkId }: {
890
1107
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}`, {
891
1108
  ...opts,
892
1109
  headers: oazapfts.mergeHeaders(opts?.headers, {
893
- Authorization: authorization
1110
+ Authorization: authorization,
1111
+ "x-account-id": xAccountId
894
1112
  })
895
1113
  }));
896
1114
  }
897
- export function getNetworkConnection({ authorization, foundationId, networkConnectionId }: {
1115
+ export function deleteNetwork({ authorization, xAccountId, foundationId, networkId }: {
898
1116
  authorization: string;
1117
+ xAccountId?: string;
899
1118
  foundationId: string;
900
- networkConnectionId: string;
1119
+ networkId: string;
901
1120
  }, opts?: Oazapfts.RequestOpts) {
902
- return oazapfts.ok(oazapfts.fetchJson<{
903
- status: 200;
904
- data: NetworkConnectionResponse;
905
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}`, {
1121
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}`, {
906
1122
  ...opts,
1123
+ method: "DELETE",
907
1124
  headers: oazapfts.mergeHeaders(opts?.headers, {
908
- Authorization: authorization
1125
+ Authorization: authorization,
1126
+ "x-account-id": xAccountId
909
1127
  })
910
1128
  }));
911
1129
  }
912
- export function getInbound({ authorization, foundationId, inboundId }: {
1130
+ export function getDnsZone({ authorization, xAccountId, foundationId, dnsZoneId }: {
913
1131
  authorization: string;
1132
+ xAccountId?: string;
914
1133
  foundationId: string;
915
- inboundId: string;
1134
+ dnsZoneId: string;
916
1135
  }, opts?: Oazapfts.RequestOpts) {
917
1136
  return oazapfts.ok(oazapfts.fetchJson<{
918
1137
  status: 200;
919
- data: InboundResponse;
920
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds/${encodeURIComponent(inboundId)}`, {
1138
+ data: DnsZoneResponse;
1139
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
921
1140
  ...opts,
922
1141
  headers: oazapfts.mergeHeaders(opts?.headers, {
923
- Authorization: authorization
1142
+ Authorization: authorization,
1143
+ "x-account-id": xAccountId
924
1144
  })
925
1145
  }));
926
1146
  }
927
- export function getDnsZone({ authorization, foundationId, dnsZoneId }: {
1147
+ export function deleteDnsZone({ authorization, xAccountId, foundationId, dnsZoneId }: {
928
1148
  authorization: string;
1149
+ xAccountId?: string;
929
1150
  foundationId: string;
930
1151
  dnsZoneId: string;
931
1152
  }, opts?: Oazapfts.RequestOpts) {
932
- return oazapfts.ok(oazapfts.fetchJson<{
933
- status: 200;
934
- data: DnsZoneResponse;
935
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
1153
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
936
1154
  ...opts,
1155
+ method: "DELETE",
937
1156
  headers: oazapfts.mergeHeaders(opts?.headers, {
938
- Authorization: authorization
1157
+ Authorization: authorization,
1158
+ "x-account-id": xAccountId
939
1159
  })
940
1160
  }));
941
1161
  }
942
- export function getDnsZone1({ authorization, foundationId, dnsRecordId }: {
1162
+ export function getDnsRecord({ authorization, xAccountId, foundationId, dnsRecordId }: {
943
1163
  authorization: string;
1164
+ xAccountId?: string;
944
1165
  foundationId: string;
945
1166
  dnsRecordId: string;
946
1167
  }, opts?: Oazapfts.RequestOpts) {
@@ -950,12 +1171,29 @@ export function getDnsZone1({ authorization, foundationId, dnsRecordId }: {
950
1171
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
951
1172
  ...opts,
952
1173
  headers: oazapfts.mergeHeaders(opts?.headers, {
953
- Authorization: authorization
1174
+ Authorization: authorization,
1175
+ "x-account-id": xAccountId
1176
+ })
1177
+ }));
1178
+ }
1179
+ export function deleteDnsRecord({ authorization, xAccountId, foundationId, dnsRecordId }: {
1180
+ authorization: string;
1181
+ xAccountId?: string;
1182
+ foundationId: string;
1183
+ dnsRecordId: string;
1184
+ }, opts?: Oazapfts.RequestOpts) {
1185
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
1186
+ ...opts,
1187
+ method: "DELETE",
1188
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1189
+ Authorization: authorization,
1190
+ "x-account-id": xAccountId
954
1191
  })
955
1192
  }));
956
1193
  }
957
- export function getCidr({ authorization, foundationId, cidrId }: {
1194
+ export function getCidr({ authorization, xAccountId, foundationId, cidrId }: {
958
1195
  authorization: string;
1196
+ xAccountId?: string;
959
1197
  foundationId: string;
960
1198
  cidrId: string;
961
1199
  }, opts?: Oazapfts.RequestOpts) {
@@ -965,12 +1203,29 @@ export function getCidr({ authorization, foundationId, cidrId }: {
965
1203
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs/${encodeURIComponent(cidrId)}`, {
966
1204
  ...opts,
967
1205
  headers: oazapfts.mergeHeaders(opts?.headers, {
968
- Authorization: authorization
1206
+ Authorization: authorization,
1207
+ "x-account-id": xAccountId
1208
+ })
1209
+ }));
1210
+ }
1211
+ export function deleteCidr({ authorization, xAccountId, foundationId, cidrId }: {
1212
+ authorization: string;
1213
+ xAccountId?: string;
1214
+ foundationId: string;
1215
+ cidrId: string;
1216
+ }, opts?: Oazapfts.RequestOpts) {
1217
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs/${encodeURIComponent(cidrId)}`, {
1218
+ ...opts,
1219
+ method: "DELETE",
1220
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1221
+ Authorization: authorization,
1222
+ "x-account-id": xAccountId
969
1223
  })
970
1224
  }));
971
1225
  }
972
- export function getCertificate({ authorization, foundationId, certificateId }: {
1226
+ export function getCertificate({ authorization, xAccountId, foundationId, certificateId }: {
973
1227
  authorization: string;
1228
+ xAccountId?: string;
974
1229
  foundationId: string;
975
1230
  certificateId: string;
976
1231
  }, opts?: Oazapfts.RequestOpts) {
@@ -980,10 +1235,40 @@ export function getCertificate({ authorization, foundationId, certificateId }: {
980
1235
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}`, {
981
1236
  ...opts,
982
1237
  headers: oazapfts.mergeHeaders(opts?.headers, {
983
- Authorization: authorization
1238
+ Authorization: authorization,
1239
+ "x-account-id": xAccountId
1240
+ })
1241
+ }));
1242
+ }
1243
+ export function deleteCertificate({ authorization, xAccountId, foundationId, certificateId }: {
1244
+ authorization: string;
1245
+ xAccountId?: string;
1246
+ foundationId: string;
1247
+ certificateId: string;
1248
+ }, opts?: Oazapfts.RequestOpts) {
1249
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}`, {
1250
+ ...opts,
1251
+ method: "DELETE",
1252
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1253
+ Authorization: authorization,
1254
+ "x-account-id": xAccountId
984
1255
  })
985
1256
  }));
986
1257
  }
1258
+ export function getProvisionAvailability({ cloudProvider }: {
1259
+ cloudProvider: string;
1260
+ }, opts?: Oazapfts.RequestOpts) {
1261
+ return oazapfts.ok(oazapfts.fetchJson<{
1262
+ status: 200;
1263
+ data: {
1264
+ [key: string]: boolean;
1265
+ };
1266
+ }>(`/v1/foundations/provision-avaliability${QS.query(QS.explode({
1267
+ cloudProvider
1268
+ }))}`, {
1269
+ ...opts
1270
+ }));
1271
+ }
987
1272
  export function providers(opts?: Oazapfts.RequestOpts) {
988
1273
  return oazapfts.ok(oazapfts.fetchJson<{
989
1274
  status: 200;
@@ -994,3 +1279,18 @@ export function providers(opts?: Oazapfts.RequestOpts) {
994
1279
  ...opts
995
1280
  }));
996
1281
  }
1282
+ export function deleteFolder({ authorization, xAccountId, foundationId, folderId }: {
1283
+ authorization: string;
1284
+ xAccountId?: string;
1285
+ foundationId: string;
1286
+ folderId: string;
1287
+ }, opts?: Oazapfts.RequestOpts) {
1288
+ return oazapfts.ok(oazapfts.fetchText(`/v1/foundations/${encodeURIComponent(foundationId)}/folders/${encodeURIComponent(folderId)}`, {
1289
+ ...opts,
1290
+ method: "DELETE",
1291
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1292
+ Authorization: authorization,
1293
+ "x-account-id": xAccountId
1294
+ })
1295
+ }));
1296
+ }