@stack-spot/portal-network 0.184.0-beta.1 → 0.184.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/CHANGELOG.md +2412 -2431
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +4 -76
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +1 -14
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.d.ts +16 -10
  28. package/dist/api/workspaceManager.d.ts.map +1 -1
  29. package/dist/api/workspaceManager.js +11 -1
  30. package/dist/api/workspaceManager.js.map +1 -1
  31. package/dist/api/workspaceSearchEngine.js +1 -1
  32. package/dist/client/ai.d.ts.map +1 -1
  33. package/dist/client/ai.js +14 -84
  34. package/dist/client/ai.js.map +1 -1
  35. package/dist/client/code-shift.d.ts +0 -30
  36. package/dist/client/code-shift.d.ts.map +1 -1
  37. package/dist/client/code-shift.js +1 -37
  38. package/dist/client/code-shift.js.map +1 -1
  39. package/dist/client/types.d.ts +6 -26
  40. package/dist/client/types.d.ts.map +1 -1
  41. package/dist/client/workspace-manager.d.ts +6 -0
  42. package/dist/client/workspace-manager.d.ts.map +1 -1
  43. package/dist/client/workspace-manager.js +10 -1
  44. package/dist/client/workspace-manager.js.map +1 -1
  45. package/package.json +1 -1
  46. package/readme.md +1 -1
  47. package/scripts/generate-apis.ts +134 -134
  48. package/src/api/account.ts +8367 -8368
  49. package/src/api/agent-tools.ts +2169 -2172
  50. package/src/api/agent.ts +1083 -1085
  51. package/src/api/ai.ts +3388 -3388
  52. package/src/api/apiManagement.ts +570 -570
  53. package/src/api/apiRuntime.ts +2103 -2103
  54. package/src/api/cloudAccount.ts +1239 -1239
  55. package/src/api/cloudPlatform.ts +927 -927
  56. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  57. package/src/api/cloudRuntimes.ts +2043 -2043
  58. package/src/api/cloudServices.ts +1445 -1445
  59. package/src/api/codeShift.ts +3481 -3580
  60. package/src/api/content.ts +9785 -9785
  61. package/src/api/dataIntegration.ts +1657 -1657
  62. package/src/api/discover.ts +435 -435
  63. package/src/api/eventBus.ts +171 -171
  64. package/src/api/genAiInference.ts +603 -603
  65. package/src/api/insights.ts +310 -310
  66. package/src/api/notification.ts +334 -336
  67. package/src/api/secrets.ts +342 -342
  68. package/src/api/serviceCatalog.ts +2908 -2908
  69. package/src/api/workflows.ts +1669 -1669
  70. package/src/api/workspace-ai.ts +677 -677
  71. package/src/api/workspace.ts +5889 -5889
  72. package/src/api/workspaceManager.ts +2951 -2936
  73. package/src/api/workspaceSearchEngine.ts +153 -153
  74. package/src/api-addresses.ts +120 -120
  75. package/src/apis-itau.json +225 -225
  76. package/src/apis.json +225 -225
  77. package/src/client/account.ts +902 -902
  78. package/src/client/agent-tools.ts +210 -210
  79. package/src/client/agent.ts +81 -81
  80. package/src/client/ai.ts +395 -469
  81. package/src/client/api-management.ts +40 -40
  82. package/src/client/cloud-account.ts +70 -70
  83. package/src/client/cloud-platform-horizon.ts +113 -113
  84. package/src/client/cloud-platform.ts +163 -163
  85. package/src/client/cloud-runtimes.ts +129 -129
  86. package/src/client/cloud-services.ts +94 -94
  87. package/src/client/code-shift.ts +349 -371
  88. package/src/client/content.ts +538 -538
  89. package/src/client/data-integration.ts +191 -191
  90. package/src/client/discover.ts +89 -89
  91. package/src/client/event-bus.ts +84 -84
  92. package/src/client/gen-ai-inference.ts +65 -65
  93. package/src/client/insights.ts +28 -28
  94. package/src/client/notification.ts +32 -32
  95. package/src/client/runtime-manager.ts +76 -76
  96. package/src/client/secrets.ts +60 -60
  97. package/src/client/types.ts +377 -398
  98. package/src/client/workflow.ts +83 -83
  99. package/src/client/workspace-ai.ts +191 -191
  100. package/src/client/workspace-manager.ts +564 -560
  101. package/src/client/workspace-search.ts +39 -39
  102. package/src/client/workspace.ts +480 -480
  103. package/src/error/DefaultAPIError.ts +151 -151
  104. package/src/error/FileUploadError.ts +18 -18
  105. package/src/error/IgnoredErrorCodes.ts +3 -3
  106. package/src/error/StackspotAPIError.ts +101 -101
  107. package/src/error/StreamCanceledError.ts +10 -10
  108. package/src/error/StreamError.ts +7 -7
  109. package/src/error/StreamJsonError.ts +10 -10
  110. package/src/error/dictionary/account.ts +58 -58
  111. package/src/error/dictionary/action-details.ts +20 -20
  112. package/src/error/dictionary/action.ts +211 -211
  113. package/src/error/dictionary/agent-tools.ts +75 -75
  114. package/src/error/dictionary/ai-inference.ts +28 -28
  115. package/src/error/dictionary/base.ts +22 -22
  116. package/src/error/dictionary/cloud-platform.ts +82 -82
  117. package/src/error/dictionary/cnt-fields.ts +14 -14
  118. package/src/error/dictionary/cnt.ts +103 -103
  119. package/src/error/dictionary/code-shift.ts +12 -12
  120. package/src/error/dictionary/rte.ts +24 -24
  121. package/src/error/dictionary/rtm.ts +10 -10
  122. package/src/error/dictionary/secrets.ts +14 -14
  123. package/src/error/dictionary/workspace-ai.ts +10 -10
  124. package/src/error/dictionary/workspace-details.ts +15 -15
  125. package/src/error/dictionary/workspace-fields.ts +10 -10
  126. package/src/error/dictionary/workspace.ts +209 -209
  127. package/src/error/types.ts +21 -21
  128. package/src/index.ts +43 -43
  129. package/src/network/AutoInfiniteQuery.ts +115 -115
  130. package/src/network/AutoMutation.ts +27 -27
  131. package/src/network/AutoOperation.ts +73 -73
  132. package/src/network/AutoQuery.ts +75 -75
  133. package/src/network/ManualInfiniteQuery.ts +95 -95
  134. package/src/network/ManualMutation.ts +40 -40
  135. package/src/network/ManualOperation.ts +52 -52
  136. package/src/network/ManualQuery.ts +82 -82
  137. package/src/network/NetworkClient.ts +167 -167
  138. package/src/network/ReactQueryNetworkClient.ts +312 -312
  139. package/src/network/react-query-client.ts +14 -14
  140. package/src/network/types.ts +294 -294
  141. package/src/types.ts +1 -1
  142. package/src/utils/StreamedArray.tsx +146 -146
  143. package/src/utils/StreamedJson.tsx +166 -166
  144. package/src/utils/remove-authorization-param.ts +6 -6
  145. package/src/utils/string.ts +19 -19
  146. package/src/utils/use-extended-list.ts +80 -80
  147. package/src/utils/use-streamed-array.ts +17 -17
  148. package/tsconfig.build.json +4 -4
  149. package/tsconfig.json +10 -10
  150. package/logs/simple-failure/01JBER7AWKACEC3Y1NF7M6PHFF/job_id_1.log +0 -3
  151. package/logs/simple-suspend/01JBEMQG94ADPT99MSZ7EJKGXZ/job_id_1.log +0 -5
@@ -1,927 +1,927 @@
1
- /**
2
- * OpenAPI definition
3
- * v0
4
- * DO NOT MODIFY - This file has been generated using oazapfts.
5
- * See https://www.npmjs.com/package/oazapfts
6
- */
7
- import * as Oazapfts from "@oazapfts/runtime";
8
- import * as QS from "@oazapfts/runtime/query";
9
- export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
- headers: {},
11
- baseUrl: "https://cloud-cloud-platform-api.dev.stackspot.com",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {
15
- generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
16
- };
17
- export type 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;
42
- };
43
- export type TunnelStatus = {
44
- tunnel1?: string;
45
- tunnel2?: string;
46
- };
47
- export type VpnDetails = {
48
- peerCustomerGatewayIp: string;
49
- destinationCidrBlock: string;
50
- tunnelStatus: TunnelStatus;
51
- };
52
- export type VpnResponse = {
53
- stackSpotAccountId: string;
54
- foundationId: string;
55
- vpnId: string;
56
- details: VpnDetails;
57
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
58
- createdAt: string;
59
- updatedAt: string;
60
- deletedAt?: string;
61
- };
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 ProjectDetails = {
73
- name: string;
74
- folderName: string;
75
- providerAccountId?: string;
76
- };
77
- export type ProjectResponse = {
78
- stackSpotAccountId: string;
79
- foundationId: string;
80
- parentFolderId: string;
81
- projectId: string;
82
- details: ProjectDetails;
83
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
84
- createdAt: string;
85
- updatedAt: string;
86
- deletedAt?: string;
87
- };
88
- export type ListProjectResponse = {
89
- stackSpotAccountId: string;
90
- foundationId: string;
91
- parentFolderId?: string;
92
- pendingResources: boolean;
93
- content: ProjectResponse[];
94
- };
95
- export type CreateProjectRequest = {
96
- parentFolderId: string;
97
- name: string;
98
- description: string;
99
- };
100
- export type NetworkSubnetDetails = {
101
- az?: string;
102
- cidr?: string;
103
- id?: string;
104
- "type": "NAT" | "PRIVATE" | "PUBLIC";
105
- };
106
- export type NetworkDetails = {
107
- cidrs?: string[];
108
- name: string;
109
- "type": "WORKLOAD";
110
- subnets: NetworkSubnetDetails[];
111
- };
112
- export type NetworkResponse = {
113
- stackSpotAccountId: string;
114
- foundationId: string;
115
- projectId: string;
116
- networkId: string;
117
- details: NetworkDetails;
118
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
119
- createdAt: string;
120
- updatedAt: string;
121
- deletedAt?: string;
122
- };
123
- export type ListNetworkResponse = {
124
- stackSpotAccountId: string;
125
- foundationId: string;
126
- projectId?: string;
127
- pendingResources: boolean;
128
- content: NetworkResponse[];
129
- };
130
- export type CreateNetworkRequest = {
131
- projectId: string;
132
- prefixLength: number;
133
- networkName?: string;
134
- networkType: "WORKLOAD";
135
- };
136
- export type NetworkConnectionDetails = {
137
- accepted?: boolean;
138
- requesterNetwork: NetworkResponse;
139
- accepterNetwork: NetworkResponse;
140
- };
141
- export type NetworkConnectionResponse = {
142
- stackSpotAccountId: string;
143
- foundationId: string;
144
- accepterNetworkId: string;
145
- accepterProjectId: string;
146
- requesterNetworkId: string;
147
- requesterProjectId: string;
148
- networkConnectionId: string;
149
- details: NetworkConnectionDetails;
150
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
151
- createdAt: string;
152
- updatedAt: string;
153
- deletedAt?: string;
154
- };
155
- export type ListNetworkConnectionResponse = {
156
- stackSpotAccountId: string;
157
- foundationId: string;
158
- accepterNetworkId?: string;
159
- accepterProjectId?: string;
160
- requesterNetworkId?: string;
161
- requesterProjectId?: string;
162
- pendingResources: boolean;
163
- content: NetworkConnectionResponse[];
164
- };
165
- export type CreateNetworkConnectionRequest = {
166
- accepterNetworkId: string;
167
- requesterNetworkId: string;
168
- };
169
- export type InboundDetails = {
170
- recordName: string;
171
- };
172
- export type InboundResponse = {
173
- stackSpotAccountId: string;
174
- foundationId: string;
175
- projectId: string;
176
- inboundId: string;
177
- details: InboundDetails;
178
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
179
- createdAt: string;
180
- updatedAt: string;
181
- deletedAt?: string;
182
- };
183
- export type ListInboundResponse = {
184
- stackSpotAccountId: string;
185
- foundationId: string;
186
- pendingResources: boolean;
187
- content: InboundResponse[];
188
- };
189
- export type CreateInboundRequest = {
190
- projectId: string;
191
- certificateId: string;
192
- domain: string;
193
- applicationLoadBalancer: string;
194
- };
195
- export type FolderContent = {
196
- "type": "FOLDER" | "PROJECT";
197
- id: string;
198
- name: string;
199
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
200
- };
201
- export type FolderDetails = {
202
- name: string;
203
- pendingResources: boolean;
204
- content: FolderContent[];
205
- };
206
- export type FolderResponse = {
207
- stackSpotAccountId: string;
208
- foundationId: string;
209
- parentFolderId: string;
210
- folderId: string;
211
- details: FolderDetails;
212
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
213
- createdAt: string;
214
- updatedAt: string;
215
- deletedAt?: string;
216
- };
217
- export type CreateFolderRequest = {
218
- parentFolderId: string;
219
- name: string;
220
- };
221
- export type DnsZoneDetails = {
222
- domain: string;
223
- dnsZoneType: string;
224
- };
225
- export type DnsZoneResponse = {
226
- stackSpotAccountId: string;
227
- foundationId: string;
228
- dnsZoneId: string;
229
- details: DnsZoneDetails;
230
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
231
- createdAt: string;
232
- updatedAt: string;
233
- deletedAt?: string;
234
- };
235
- export type ListDnsZoneResponse = {
236
- stackSpotAccountId: string;
237
- foundationId: string;
238
- pendingResources: boolean;
239
- content: DnsZoneResponse[];
240
- };
241
- export type CreateDnsZoneRequest = {
242
- domain: string;
243
- "type": "PUBLIC" | "PRIVATE";
244
- projectId?: string;
245
- };
246
- export type DnsRecordDetails = {
247
- recordName: string;
248
- records: string[];
249
- ttl: number;
250
- "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
251
- dnsZoneName: string;
252
- };
253
- export type DnsRecordResponse = {
254
- stackSpotAccountId: string;
255
- foundationId: string;
256
- dnsZoneId: string;
257
- dnsRecordId: string;
258
- details: DnsRecordDetails;
259
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
260
- createdAt: string;
261
- updatedAt: string;
262
- deletedAt?: string;
263
- };
264
- export type ListDnsRecordResponse = {
265
- stackSpotAccountId: string;
266
- foundationId: string;
267
- projectId?: string;
268
- dnsZoneId?: string;
269
- pendingResources: boolean;
270
- content: DnsRecordResponse[];
271
- };
272
- export type CreateDnsRecordRequest = {
273
- dnsZoneId: string;
274
- projectId?: string;
275
- recordName: string;
276
- records: string[];
277
- ttl: number;
278
- "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
279
- };
280
- export type CidrDetails = {
281
- cidrNotation: string;
282
- networkAddress: string;
283
- netmask: string;
284
- broadcastAddress: string;
285
- lowAddress: string;
286
- highAddress: string;
287
- addressCount: number;
288
- };
289
- export type CidrResponse = {
290
- stackSpotAccountId: string;
291
- foundationId: string;
292
- cidrId: string;
293
- details: CidrDetails;
294
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
295
- createdAt: string;
296
- updatedAt: string;
297
- deletedAt?: string;
298
- };
299
- export type ListCidrResponse = {
300
- stackSpotAccountId: string;
301
- foundationId: string;
302
- pendingResources: boolean;
303
- content: CidrResponse[];
304
- };
305
- export type CreateCidrRequest = {
306
- address: string;
307
- prefix: number;
308
- };
309
- export type CertificateDomainValidation = {
310
- domainName?: string;
311
- recordName?: string;
312
- recordType?: string;
313
- recordValue?: string;
314
- };
315
- export type CertificateDetails = {
316
- name: string;
317
- forInbound: "TRUE" | "FALSE";
318
- certificateStatus?: string;
319
- domainName?: string;
320
- domainValidation?: CertificateDomainValidation[];
321
- notAfter?: string;
322
- notBefore?: string;
323
- "type"?: string;
324
- validationMethod?: string;
325
- };
326
- export type CertificateResponse = {
327
- stackSpotAccountId: string;
328
- foundationId: string;
329
- certificateId: string;
330
- details: CertificateDetails;
331
- status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
332
- createdAt: string;
333
- updatedAt: string;
334
- deletedAt?: string;
335
- };
336
- export type ListCertificateResponse = {
337
- stackSpotAccountId: string;
338
- foundationId: string;
339
- pendingResources: boolean;
340
- content: CertificateResponse[];
341
- };
342
- export type CreateCertificateRequestBase = {
343
- certificateName: string;
344
- forInbound: "TRUE" | "FALSE";
345
- "type": string;
346
- };
347
- export type CreatePublicCertificateRequest = {
348
- "type": "CreatePublicCertificateRequest";
349
- } & CreateCertificateRequestBase & {
350
- domainName?: string;
351
- };
352
- export type ImportCertificateRequest = {
353
- "type": "ImportCertificateRequest";
354
- } & CreateCertificateRequestBase & {
355
- certificateBody?: string;
356
- certificatePrivateKey?: string;
357
- certificateChain?: string;
358
- };
359
- export type Configuration = {
360
- ikev1: string;
361
- ikev2: string;
362
- };
363
- export type VpnConfigurationResponse = {
364
- vpnId: string;
365
- foundationId: string;
366
- configuration: Configuration;
367
- };
368
- export function listFoundations({ authorization }: {
369
- authorization: string;
370
- }, opts?: Oazapfts.RequestOpts) {
371
- return oazapfts.ok(oazapfts.fetchJson<{
372
- status: 200;
373
- data: ListFoundationResponse;
374
- }>("/v1/foundations", {
375
- ...opts,
376
- headers: oazapfts.mergeHeaders(opts?.headers, {
377
- Authorization: authorization
378
- })
379
- }));
380
- }
381
- export function createFoundation({ authorization, createFoundationRequest }: {
382
- authorization: string;
383
- createFoundationRequest: CreateFoundationRequest;
384
- }, opts?: Oazapfts.RequestOpts) {
385
- return oazapfts.ok(oazapfts.fetchJson<{
386
- status: 200;
387
- data: FoundationResponse;
388
- }>("/v1/foundations", oazapfts.json({
389
- ...opts,
390
- method: "POST",
391
- body: createFoundationRequest,
392
- headers: oazapfts.mergeHeaders(opts?.headers, {
393
- Authorization: authorization
394
- })
395
- })));
396
- }
397
- export function listVpns({ authorization, foundationId }: {
398
- authorization: string;
399
- foundationId: string;
400
- }, opts?: Oazapfts.RequestOpts) {
401
- return oazapfts.ok(oazapfts.fetchJson<{
402
- status: 200;
403
- data: ListVpnResponse;
404
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, {
405
- ...opts,
406
- headers: oazapfts.mergeHeaders(opts?.headers, {
407
- Authorization: authorization
408
- })
409
- }));
410
- }
411
- export function createVpn({ authorization, foundationId, createVpnRequest }: {
412
- authorization: string;
413
- foundationId: string;
414
- createVpnRequest: CreateVpnRequest;
415
- }, opts?: Oazapfts.RequestOpts) {
416
- return oazapfts.ok(oazapfts.fetchJson<{
417
- status: 200;
418
- data: VpnResponse;
419
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, oazapfts.json({
420
- ...opts,
421
- method: "POST",
422
- body: createVpnRequest,
423
- headers: oazapfts.mergeHeaders(opts?.headers, {
424
- Authorization: authorization
425
- })
426
- })));
427
- }
428
- export function listProject({ authorization, foundationId, parentFolderId }: {
429
- authorization: string;
430
- foundationId: string;
431
- parentFolderId?: string;
432
- }, opts?: Oazapfts.RequestOpts) {
433
- return oazapfts.ok(oazapfts.fetchJson<{
434
- status: 200;
435
- data: ListProjectResponse;
436
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects${QS.query(QS.explode({
437
- parentFolderId
438
- }))}`, {
439
- ...opts,
440
- headers: oazapfts.mergeHeaders(opts?.headers, {
441
- Authorization: authorization
442
- })
443
- }));
444
- }
445
- export function createProject({ authorization, foundationId, createProjectRequest }: {
446
- authorization: string;
447
- foundationId: string;
448
- createProjectRequest: CreateProjectRequest;
449
- }, opts?: Oazapfts.RequestOpts) {
450
- return oazapfts.ok(oazapfts.fetchJson<{
451
- status: 200;
452
- data: ProjectResponse;
453
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects`, oazapfts.json({
454
- ...opts,
455
- method: "POST",
456
- body: createProjectRequest,
457
- headers: oazapfts.mergeHeaders(opts?.headers, {
458
- Authorization: authorization
459
- })
460
- })));
461
- }
462
- export function listNetwork({ authorization, foundationId, projectId }: {
463
- authorization: string;
464
- foundationId: string;
465
- projectId?: string;
466
- }, opts?: Oazapfts.RequestOpts) {
467
- return oazapfts.ok(oazapfts.fetchJson<{
468
- status: 200;
469
- data: ListNetworkResponse;
470
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks${QS.query(QS.explode({
471
- projectId
472
- }))}`, {
473
- ...opts,
474
- headers: oazapfts.mergeHeaders(opts?.headers, {
475
- Authorization: authorization
476
- })
477
- }));
478
- }
479
- export function createNetwork({ authorization, foundationId, createNetworkRequest }: {
480
- authorization: string;
481
- foundationId: string;
482
- createNetworkRequest: CreateNetworkRequest;
483
- }, opts?: Oazapfts.RequestOpts) {
484
- return oazapfts.ok(oazapfts.fetchJson<{
485
- status: 200;
486
- data: NetworkResponse;
487
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks`, oazapfts.json({
488
- ...opts,
489
- method: "POST",
490
- body: createNetworkRequest,
491
- headers: oazapfts.mergeHeaders(opts?.headers, {
492
- Authorization: authorization
493
- })
494
- })));
495
- }
496
- export function listNetworkConnection({ authorization, foundationId, accepterNetworkId, accepterProjectId, requesterNetworkId, requesterProjectId }: {
497
- authorization: string;
498
- foundationId: string;
499
- accepterNetworkId?: string;
500
- accepterProjectId?: string;
501
- requesterNetworkId?: string;
502
- requesterProjectId?: string;
503
- }, opts?: Oazapfts.RequestOpts) {
504
- return oazapfts.ok(oazapfts.fetchJson<{
505
- status: 200;
506
- data: ListNetworkConnectionResponse;
507
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections${QS.query(QS.explode({
508
- accepterNetworkId,
509
- accepterProjectId,
510
- requesterNetworkId,
511
- requesterProjectId
512
- }))}`, {
513
- ...opts,
514
- headers: oazapfts.mergeHeaders(opts?.headers, {
515
- Authorization: authorization
516
- })
517
- }));
518
- }
519
- export function createNetworkConnection({ authorization, foundationId, createNetworkConnectionRequest }: {
520
- authorization: string;
521
- foundationId: string;
522
- createNetworkConnectionRequest: CreateNetworkConnectionRequest;
523
- }, opts?: Oazapfts.RequestOpts) {
524
- return oazapfts.ok(oazapfts.fetchJson<{
525
- status: 200;
526
- data: NetworkConnectionResponse;
527
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections`, oazapfts.json({
528
- ...opts,
529
- method: "POST",
530
- body: createNetworkConnectionRequest,
531
- headers: oazapfts.mergeHeaders(opts?.headers, {
532
- Authorization: authorization
533
- })
534
- })));
535
- }
536
- export function listInbound({ authorization, foundationId }: {
537
- authorization: string;
538
- foundationId: string;
539
- }, opts?: Oazapfts.RequestOpts) {
540
- return oazapfts.ok(oazapfts.fetchJson<{
541
- status: 200;
542
- data: ListInboundResponse;
543
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, {
544
- ...opts,
545
- headers: oazapfts.mergeHeaders(opts?.headers, {
546
- Authorization: authorization
547
- })
548
- }));
549
- }
550
- export function createInbound({ authorization, foundationId, createInboundRequest }: {
551
- authorization: string;
552
- foundationId: string;
553
- createInboundRequest: CreateInboundRequest;
554
- }, opts?: Oazapfts.RequestOpts) {
555
- return oazapfts.ok(oazapfts.fetchJson<{
556
- status: 200;
557
- data: InboundResponse;
558
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, oazapfts.json({
559
- ...opts,
560
- method: "POST",
561
- body: createInboundRequest,
562
- headers: oazapfts.mergeHeaders(opts?.headers, {
563
- Authorization: authorization
564
- })
565
- })));
566
- }
567
- export function getFolder({ authorization, foundationId, folderId }: {
568
- authorization: string;
569
- foundationId: string;
570
- folderId: string;
571
- }, opts?: Oazapfts.RequestOpts) {
572
- return oazapfts.ok(oazapfts.fetchJson<{
573
- status: 200;
574
- data: FolderResponse;
575
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders${QS.query(QS.explode({
576
- folderId
577
- }))}`, {
578
- ...opts,
579
- headers: oazapfts.mergeHeaders(opts?.headers, {
580
- Authorization: authorization
581
- })
582
- }));
583
- }
584
- export function createFolder({ authorization, foundationId, createFolderRequest }: {
585
- authorization: string;
586
- foundationId: string;
587
- createFolderRequest: CreateFolderRequest;
588
- }, opts?: Oazapfts.RequestOpts) {
589
- return oazapfts.ok(oazapfts.fetchJson<{
590
- status: 200;
591
- data: FolderResponse;
592
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders`, oazapfts.json({
593
- ...opts,
594
- method: "POST",
595
- body: createFolderRequest,
596
- headers: oazapfts.mergeHeaders(opts?.headers, {
597
- Authorization: authorization
598
- })
599
- })));
600
- }
601
- export function listDnsZone({ authorization, foundationId, projectId, privacy }: {
602
- authorization: string;
603
- foundationId: string;
604
- projectId?: string;
605
- privacy?: string;
606
- }, opts?: Oazapfts.RequestOpts) {
607
- return oazapfts.ok(oazapfts.fetchJson<{
608
- status: 200;
609
- data: ListDnsZoneResponse;
610
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones${QS.query(QS.explode({
611
- projectId,
612
- privacy
613
- }))}`, {
614
- ...opts,
615
- headers: oazapfts.mergeHeaders(opts?.headers, {
616
- Authorization: authorization
617
- })
618
- }));
619
- }
620
- export function createDnsZone({ authorization, foundationId, createDnsZoneRequest }: {
621
- authorization: string;
622
- foundationId: string;
623
- createDnsZoneRequest: CreateDnsZoneRequest;
624
- }, opts?: Oazapfts.RequestOpts) {
625
- return oazapfts.ok(oazapfts.fetchJson<{
626
- status: 200;
627
- data: DnsZoneResponse;
628
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, oazapfts.json({
629
- ...opts,
630
- method: "POST",
631
- body: createDnsZoneRequest,
632
- headers: oazapfts.mergeHeaders(opts?.headers, {
633
- Authorization: authorization
634
- })
635
- })));
636
- }
637
- export function listDnsRecord({ authorization, foundationId, projectId, dnsZoneId }: {
638
- authorization: string;
639
- foundationId: string;
640
- projectId?: string;
641
- dnsZoneId?: string;
642
- }, opts?: Oazapfts.RequestOpts) {
643
- return oazapfts.ok(oazapfts.fetchJson<{
644
- status: 200;
645
- data: ListDnsRecordResponse;
646
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records${QS.query(QS.explode({
647
- projectId,
648
- dnsZoneId
649
- }))}`, {
650
- ...opts,
651
- headers: oazapfts.mergeHeaders(opts?.headers, {
652
- Authorization: authorization
653
- })
654
- }));
655
- }
656
- export function createDnsRecord({ authorization, foundationId, createDnsRecordRequest }: {
657
- authorization: string;
658
- foundationId: string;
659
- createDnsRecordRequest: CreateDnsRecordRequest;
660
- }, opts?: Oazapfts.RequestOpts) {
661
- return oazapfts.ok(oazapfts.fetchJson<{
662
- status: 200;
663
- data: DnsRecordResponse;
664
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records`, oazapfts.json({
665
- ...opts,
666
- method: "POST",
667
- body: createDnsRecordRequest,
668
- headers: oazapfts.mergeHeaders(opts?.headers, {
669
- Authorization: authorization
670
- })
671
- })));
672
- }
673
- export function listCidr({ authorization, foundationId }: {
674
- authorization: string;
675
- foundationId: string;
676
- }, opts?: Oazapfts.RequestOpts) {
677
- return oazapfts.ok(oazapfts.fetchJson<{
678
- status: 200;
679
- data: ListCidrResponse;
680
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, {
681
- ...opts,
682
- headers: oazapfts.mergeHeaders(opts?.headers, {
683
- Authorization: authorization
684
- })
685
- }));
686
- }
687
- export function createCidr({ authorization, foundationId, createCidrRequest }: {
688
- authorization: string;
689
- foundationId: string;
690
- createCidrRequest: CreateCidrRequest;
691
- }, opts?: Oazapfts.RequestOpts) {
692
- return oazapfts.ok(oazapfts.fetchJson<{
693
- status: 200;
694
- data: CidrResponse;
695
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, oazapfts.json({
696
- ...opts,
697
- method: "POST",
698
- body: createCidrRequest,
699
- headers: oazapfts.mergeHeaders(opts?.headers, {
700
- Authorization: authorization
701
- })
702
- })));
703
- }
704
- export function listCertificates({ authorization, foundationId, forInbound }: {
705
- authorization: string;
706
- foundationId: string;
707
- forInbound?: "TRUE" | "FALSE";
708
- }, opts?: Oazapfts.RequestOpts) {
709
- return oazapfts.ok(oazapfts.fetchJson<{
710
- status: 200;
711
- data: ListCertificateResponse;
712
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates${QS.query(QS.explode({
713
- forInbound
714
- }))}`, {
715
- ...opts,
716
- headers: oazapfts.mergeHeaders(opts?.headers, {
717
- Authorization: authorization
718
- })
719
- }));
720
- }
721
- export function createCertificate({ authorization, foundationId, body }: {
722
- authorization: string;
723
- foundationId: string;
724
- body: CreatePublicCertificateRequest | ImportCertificateRequest;
725
- }, opts?: Oazapfts.RequestOpts) {
726
- return oazapfts.ok(oazapfts.fetchJson<{
727
- status: 200;
728
- data: CertificateResponse;
729
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates`, oazapfts.json({
730
- ...opts,
731
- method: "POST",
732
- body,
733
- headers: oazapfts.mergeHeaders(opts?.headers, {
734
- Authorization: authorization
735
- })
736
- })));
737
- }
738
- export function acceptNetworkConnection({ authorization, foundationId, networkConnectionId }: {
739
- authorization: string;
740
- foundationId: string;
741
- networkConnectionId: string;
742
- }, opts?: Oazapfts.RequestOpts) {
743
- return oazapfts.ok(oazapfts.fetchJson<{
744
- status: 200;
745
- data: NetworkConnectionResponse;
746
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}/accept`, {
747
- ...opts,
748
- method: "PATCH",
749
- headers: oazapfts.mergeHeaders(opts?.headers, {
750
- Authorization: authorization
751
- })
752
- }));
753
- }
754
- export function getFoundation({ authorization, foundationId }: {
755
- authorization: string;
756
- foundationId: string;
757
- }, opts?: Oazapfts.RequestOpts) {
758
- return oazapfts.ok(oazapfts.fetchJson<{
759
- status: 200;
760
- data: FoundationResponse;
761
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
762
- ...opts,
763
- headers: oazapfts.mergeHeaders(opts?.headers, {
764
- Authorization: authorization
765
- })
766
- }));
767
- }
768
- export function getVpn({ authorization, foundationId, vpnId }: {
769
- authorization: string;
770
- foundationId: string;
771
- vpnId: string;
772
- }, opts?: Oazapfts.RequestOpts) {
773
- return oazapfts.ok(oazapfts.fetchJson<{
774
- status: 200;
775
- data: VpnResponse;
776
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}`, {
777
- ...opts,
778
- headers: oazapfts.mergeHeaders(opts?.headers, {
779
- Authorization: authorization
780
- })
781
- }));
782
- }
783
- export function getVpnConfiguration({ authorization, foundationId, vpnId }: {
784
- authorization: string;
785
- foundationId: string;
786
- vpnId: string;
787
- }, opts?: Oazapfts.RequestOpts) {
788
- return oazapfts.ok(oazapfts.fetchJson<{
789
- status: 200;
790
- data: VpnConfigurationResponse;
791
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}/configuration`, {
792
- ...opts,
793
- headers: oazapfts.mergeHeaders(opts?.headers, {
794
- Authorization: authorization
795
- })
796
- }));
797
- }
798
- export function getProject({ authorization, foundationId, projectId }: {
799
- authorization: string;
800
- foundationId: string;
801
- projectId: string;
802
- }, opts?: Oazapfts.RequestOpts) {
803
- return oazapfts.ok(oazapfts.fetchJson<{
804
- status: 200;
805
- data: ProjectResponse;
806
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects/${encodeURIComponent(projectId)}`, {
807
- ...opts,
808
- headers: oazapfts.mergeHeaders(opts?.headers, {
809
- Authorization: authorization
810
- })
811
- }));
812
- }
813
- export function getNetwork({ authorization, foundationId, networkId }: {
814
- authorization: string;
815
- foundationId: string;
816
- networkId: string;
817
- }, opts?: Oazapfts.RequestOpts) {
818
- return oazapfts.ok(oazapfts.fetchJson<{
819
- status: 200;
820
- data: NetworkResponse;
821
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}`, {
822
- ...opts,
823
- headers: oazapfts.mergeHeaders(opts?.headers, {
824
- Authorization: authorization
825
- })
826
- }));
827
- }
828
- export function getNetworkConnection({ authorization, foundationId, networkConnectionId }: {
829
- authorization: string;
830
- foundationId: string;
831
- networkConnectionId: string;
832
- }, opts?: Oazapfts.RequestOpts) {
833
- return oazapfts.ok(oazapfts.fetchJson<{
834
- status: 200;
835
- data: NetworkConnectionResponse;
836
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}`, {
837
- ...opts,
838
- headers: oazapfts.mergeHeaders(opts?.headers, {
839
- Authorization: authorization
840
- })
841
- }));
842
- }
843
- export function getInbound({ authorization, foundationId, inboundId }: {
844
- authorization: string;
845
- foundationId: string;
846
- inboundId: string;
847
- }, opts?: Oazapfts.RequestOpts) {
848
- return oazapfts.ok(oazapfts.fetchJson<{
849
- status: 200;
850
- data: InboundResponse;
851
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds/${encodeURIComponent(inboundId)}`, {
852
- ...opts,
853
- headers: oazapfts.mergeHeaders(opts?.headers, {
854
- Authorization: authorization
855
- })
856
- }));
857
- }
858
- export function getDnsZone({ authorization, foundationId, dnsZoneId }: {
859
- authorization: string;
860
- foundationId: string;
861
- dnsZoneId: string;
862
- }, opts?: Oazapfts.RequestOpts) {
863
- return oazapfts.ok(oazapfts.fetchJson<{
864
- status: 200;
865
- data: DnsZoneResponse;
866
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
867
- ...opts,
868
- headers: oazapfts.mergeHeaders(opts?.headers, {
869
- Authorization: authorization
870
- })
871
- }));
872
- }
873
- export function getDnsZone1({ authorization, foundationId, dnsRecordId }: {
874
- authorization: string;
875
- foundationId: string;
876
- dnsRecordId: string;
877
- }, opts?: Oazapfts.RequestOpts) {
878
- return oazapfts.ok(oazapfts.fetchJson<{
879
- status: 200;
880
- data: DnsRecordResponse;
881
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
882
- ...opts,
883
- headers: oazapfts.mergeHeaders(opts?.headers, {
884
- Authorization: authorization
885
- })
886
- }));
887
- }
888
- export function getCidr({ authorization, foundationId, cidrId }: {
889
- authorization: string;
890
- foundationId: string;
891
- cidrId: string;
892
- }, opts?: Oazapfts.RequestOpts) {
893
- return oazapfts.ok(oazapfts.fetchJson<{
894
- status: 200;
895
- data: CidrResponse;
896
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs/${encodeURIComponent(cidrId)}`, {
897
- ...opts,
898
- headers: oazapfts.mergeHeaders(opts?.headers, {
899
- Authorization: authorization
900
- })
901
- }));
902
- }
903
- export function getCertificate({ authorization, foundationId, certificateId }: {
904
- authorization: string;
905
- foundationId: string;
906
- certificateId: string;
907
- }, opts?: Oazapfts.RequestOpts) {
908
- return oazapfts.ok(oazapfts.fetchJson<{
909
- status: 200;
910
- data: CertificateResponse;
911
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}`, {
912
- ...opts,
913
- headers: oazapfts.mergeHeaders(opts?.headers, {
914
- Authorization: authorization
915
- })
916
- }));
917
- }
918
- export function providers(opts?: Oazapfts.RequestOpts) {
919
- return oazapfts.ok(oazapfts.fetchJson<{
920
- status: 200;
921
- data: {
922
- [key: string]: any;
923
- }[];
924
- }>("/v1/foundations/providers", {
925
- ...opts
926
- }));
927
- }
1
+ /**
2
+ * OpenAPI definition
3
+ * v0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://cloud-cloud-platform-api.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
16
+ };
17
+ export type 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;
42
+ };
43
+ export type TunnelStatus = {
44
+ tunnel1?: string;
45
+ tunnel2?: string;
46
+ };
47
+ export type VpnDetails = {
48
+ peerCustomerGatewayIp: string;
49
+ destinationCidrBlock: string;
50
+ tunnelStatus: TunnelStatus;
51
+ };
52
+ export type VpnResponse = {
53
+ stackSpotAccountId: string;
54
+ foundationId: string;
55
+ vpnId: string;
56
+ details: VpnDetails;
57
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ deletedAt?: string;
61
+ };
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 ProjectDetails = {
73
+ name: string;
74
+ folderName: string;
75
+ providerAccountId?: string;
76
+ };
77
+ export type ProjectResponse = {
78
+ stackSpotAccountId: string;
79
+ foundationId: string;
80
+ parentFolderId: string;
81
+ projectId: string;
82
+ details: ProjectDetails;
83
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
84
+ createdAt: string;
85
+ updatedAt: string;
86
+ deletedAt?: string;
87
+ };
88
+ export type ListProjectResponse = {
89
+ stackSpotAccountId: string;
90
+ foundationId: string;
91
+ parentFolderId?: string;
92
+ pendingResources: boolean;
93
+ content: ProjectResponse[];
94
+ };
95
+ export type CreateProjectRequest = {
96
+ parentFolderId: string;
97
+ name: string;
98
+ description: string;
99
+ };
100
+ export type NetworkSubnetDetails = {
101
+ az?: string;
102
+ cidr?: string;
103
+ id?: string;
104
+ "type": "NAT" | "PRIVATE" | "PUBLIC";
105
+ };
106
+ export type NetworkDetails = {
107
+ cidrs?: string[];
108
+ name: string;
109
+ "type": "WORKLOAD";
110
+ subnets: NetworkSubnetDetails[];
111
+ };
112
+ export type NetworkResponse = {
113
+ stackSpotAccountId: string;
114
+ foundationId: string;
115
+ projectId: string;
116
+ networkId: string;
117
+ details: NetworkDetails;
118
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ deletedAt?: string;
122
+ };
123
+ export type ListNetworkResponse = {
124
+ stackSpotAccountId: string;
125
+ foundationId: string;
126
+ projectId?: string;
127
+ pendingResources: boolean;
128
+ content: NetworkResponse[];
129
+ };
130
+ export type CreateNetworkRequest = {
131
+ projectId: string;
132
+ prefixLength: number;
133
+ networkName?: string;
134
+ networkType: "WORKLOAD";
135
+ };
136
+ export type NetworkConnectionDetails = {
137
+ accepted?: boolean;
138
+ requesterNetwork: NetworkResponse;
139
+ accepterNetwork: NetworkResponse;
140
+ };
141
+ export type NetworkConnectionResponse = {
142
+ stackSpotAccountId: string;
143
+ foundationId: string;
144
+ accepterNetworkId: string;
145
+ accepterProjectId: string;
146
+ requesterNetworkId: string;
147
+ requesterProjectId: string;
148
+ networkConnectionId: string;
149
+ details: NetworkConnectionDetails;
150
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
151
+ createdAt: string;
152
+ updatedAt: string;
153
+ deletedAt?: string;
154
+ };
155
+ export type ListNetworkConnectionResponse = {
156
+ stackSpotAccountId: string;
157
+ foundationId: string;
158
+ accepterNetworkId?: string;
159
+ accepterProjectId?: string;
160
+ requesterNetworkId?: string;
161
+ requesterProjectId?: string;
162
+ pendingResources: boolean;
163
+ content: NetworkConnectionResponse[];
164
+ };
165
+ export type CreateNetworkConnectionRequest = {
166
+ accepterNetworkId: string;
167
+ requesterNetworkId: string;
168
+ };
169
+ export type InboundDetails = {
170
+ recordName: string;
171
+ };
172
+ export type InboundResponse = {
173
+ stackSpotAccountId: string;
174
+ foundationId: string;
175
+ projectId: string;
176
+ inboundId: string;
177
+ details: InboundDetails;
178
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
179
+ createdAt: string;
180
+ updatedAt: string;
181
+ deletedAt?: string;
182
+ };
183
+ export type ListInboundResponse = {
184
+ stackSpotAccountId: string;
185
+ foundationId: string;
186
+ pendingResources: boolean;
187
+ content: InboundResponse[];
188
+ };
189
+ export type CreateInboundRequest = {
190
+ projectId: string;
191
+ certificateId: string;
192
+ domain: string;
193
+ applicationLoadBalancer: string;
194
+ };
195
+ export type FolderContent = {
196
+ "type": "FOLDER" | "PROJECT";
197
+ id: string;
198
+ name: string;
199
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
200
+ };
201
+ export type FolderDetails = {
202
+ name: string;
203
+ pendingResources: boolean;
204
+ content: FolderContent[];
205
+ };
206
+ export type FolderResponse = {
207
+ stackSpotAccountId: string;
208
+ foundationId: string;
209
+ parentFolderId: string;
210
+ folderId: string;
211
+ details: FolderDetails;
212
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
213
+ createdAt: string;
214
+ updatedAt: string;
215
+ deletedAt?: string;
216
+ };
217
+ export type CreateFolderRequest = {
218
+ parentFolderId: string;
219
+ name: string;
220
+ };
221
+ export type DnsZoneDetails = {
222
+ domain: string;
223
+ dnsZoneType: string;
224
+ };
225
+ export type DnsZoneResponse = {
226
+ stackSpotAccountId: string;
227
+ foundationId: string;
228
+ dnsZoneId: string;
229
+ details: DnsZoneDetails;
230
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
231
+ createdAt: string;
232
+ updatedAt: string;
233
+ deletedAt?: string;
234
+ };
235
+ export type ListDnsZoneResponse = {
236
+ stackSpotAccountId: string;
237
+ foundationId: string;
238
+ pendingResources: boolean;
239
+ content: DnsZoneResponse[];
240
+ };
241
+ export type CreateDnsZoneRequest = {
242
+ domain: string;
243
+ "type": "PUBLIC" | "PRIVATE";
244
+ projectId?: string;
245
+ };
246
+ export type DnsRecordDetails = {
247
+ recordName: string;
248
+ records: string[];
249
+ ttl: number;
250
+ "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
251
+ dnsZoneName: string;
252
+ };
253
+ export type DnsRecordResponse = {
254
+ stackSpotAccountId: string;
255
+ foundationId: string;
256
+ dnsZoneId: string;
257
+ dnsRecordId: string;
258
+ details: DnsRecordDetails;
259
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
260
+ createdAt: string;
261
+ updatedAt: string;
262
+ deletedAt?: string;
263
+ };
264
+ export type ListDnsRecordResponse = {
265
+ stackSpotAccountId: string;
266
+ foundationId: string;
267
+ projectId?: string;
268
+ dnsZoneId?: string;
269
+ pendingResources: boolean;
270
+ content: DnsRecordResponse[];
271
+ };
272
+ export type CreateDnsRecordRequest = {
273
+ dnsZoneId: string;
274
+ projectId?: string;
275
+ recordName: string;
276
+ records: string[];
277
+ ttl: number;
278
+ "type": "A" | "AAAA" | "CAA" | "CNAME" | "MX" | "PTR" | "SOA" | "SRV" | "TXT";
279
+ };
280
+ export type CidrDetails = {
281
+ cidrNotation: string;
282
+ networkAddress: string;
283
+ netmask: string;
284
+ broadcastAddress: string;
285
+ lowAddress: string;
286
+ highAddress: string;
287
+ addressCount: number;
288
+ };
289
+ export type CidrResponse = {
290
+ stackSpotAccountId: string;
291
+ foundationId: string;
292
+ cidrId: string;
293
+ details: CidrDetails;
294
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
295
+ createdAt: string;
296
+ updatedAt: string;
297
+ deletedAt?: string;
298
+ };
299
+ export type ListCidrResponse = {
300
+ stackSpotAccountId: string;
301
+ foundationId: string;
302
+ pendingResources: boolean;
303
+ content: CidrResponse[];
304
+ };
305
+ export type CreateCidrRequest = {
306
+ address: string;
307
+ prefix: number;
308
+ };
309
+ export type CertificateDomainValidation = {
310
+ domainName?: string;
311
+ recordName?: string;
312
+ recordType?: string;
313
+ recordValue?: string;
314
+ };
315
+ export type CertificateDetails = {
316
+ name: string;
317
+ forInbound: "TRUE" | "FALSE";
318
+ certificateStatus?: string;
319
+ domainName?: string;
320
+ domainValidation?: CertificateDomainValidation[];
321
+ notAfter?: string;
322
+ notBefore?: string;
323
+ "type"?: string;
324
+ validationMethod?: string;
325
+ };
326
+ export type CertificateResponse = {
327
+ stackSpotAccountId: string;
328
+ foundationId: string;
329
+ certificateId: string;
330
+ details: CertificateDetails;
331
+ status: "READY" | "PENDING" | "PENDING_APPROVAL" | "ERROR";
332
+ createdAt: string;
333
+ updatedAt: string;
334
+ deletedAt?: string;
335
+ };
336
+ export type ListCertificateResponse = {
337
+ stackSpotAccountId: string;
338
+ foundationId: string;
339
+ pendingResources: boolean;
340
+ content: CertificateResponse[];
341
+ };
342
+ export type CreateCertificateRequestBase = {
343
+ certificateName: string;
344
+ forInbound: "TRUE" | "FALSE";
345
+ "type": string;
346
+ };
347
+ export type CreatePublicCertificateRequest = {
348
+ "type": "CreatePublicCertificateRequest";
349
+ } & CreateCertificateRequestBase & {
350
+ domainName?: string;
351
+ };
352
+ export type ImportCertificateRequest = {
353
+ "type": "ImportCertificateRequest";
354
+ } & CreateCertificateRequestBase & {
355
+ certificateBody?: string;
356
+ certificatePrivateKey?: string;
357
+ certificateChain?: string;
358
+ };
359
+ export type Configuration = {
360
+ ikev1: string;
361
+ ikev2: string;
362
+ };
363
+ export type VpnConfigurationResponse = {
364
+ vpnId: string;
365
+ foundationId: string;
366
+ configuration: Configuration;
367
+ };
368
+ export function listFoundations({ authorization }: {
369
+ authorization: string;
370
+ }, opts?: Oazapfts.RequestOpts) {
371
+ return oazapfts.ok(oazapfts.fetchJson<{
372
+ status: 200;
373
+ data: ListFoundationResponse;
374
+ }>("/v1/foundations", {
375
+ ...opts,
376
+ headers: oazapfts.mergeHeaders(opts?.headers, {
377
+ Authorization: authorization
378
+ })
379
+ }));
380
+ }
381
+ export function createFoundation({ authorization, createFoundationRequest }: {
382
+ authorization: string;
383
+ createFoundationRequest: CreateFoundationRequest;
384
+ }, opts?: Oazapfts.RequestOpts) {
385
+ return oazapfts.ok(oazapfts.fetchJson<{
386
+ status: 200;
387
+ data: FoundationResponse;
388
+ }>("/v1/foundations", oazapfts.json({
389
+ ...opts,
390
+ method: "POST",
391
+ body: createFoundationRequest,
392
+ headers: oazapfts.mergeHeaders(opts?.headers, {
393
+ Authorization: authorization
394
+ })
395
+ })));
396
+ }
397
+ export function listVpns({ authorization, foundationId }: {
398
+ authorization: string;
399
+ foundationId: string;
400
+ }, opts?: Oazapfts.RequestOpts) {
401
+ return oazapfts.ok(oazapfts.fetchJson<{
402
+ status: 200;
403
+ data: ListVpnResponse;
404
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, {
405
+ ...opts,
406
+ headers: oazapfts.mergeHeaders(opts?.headers, {
407
+ Authorization: authorization
408
+ })
409
+ }));
410
+ }
411
+ export function createVpn({ authorization, foundationId, createVpnRequest }: {
412
+ authorization: string;
413
+ foundationId: string;
414
+ createVpnRequest: CreateVpnRequest;
415
+ }, opts?: Oazapfts.RequestOpts) {
416
+ return oazapfts.ok(oazapfts.fetchJson<{
417
+ status: 200;
418
+ data: VpnResponse;
419
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns`, oazapfts.json({
420
+ ...opts,
421
+ method: "POST",
422
+ body: createVpnRequest,
423
+ headers: oazapfts.mergeHeaders(opts?.headers, {
424
+ Authorization: authorization
425
+ })
426
+ })));
427
+ }
428
+ export function listProject({ authorization, foundationId, parentFolderId }: {
429
+ authorization: string;
430
+ foundationId: string;
431
+ parentFolderId?: string;
432
+ }, opts?: Oazapfts.RequestOpts) {
433
+ return oazapfts.ok(oazapfts.fetchJson<{
434
+ status: 200;
435
+ data: ListProjectResponse;
436
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects${QS.query(QS.explode({
437
+ parentFolderId
438
+ }))}`, {
439
+ ...opts,
440
+ headers: oazapfts.mergeHeaders(opts?.headers, {
441
+ Authorization: authorization
442
+ })
443
+ }));
444
+ }
445
+ export function createProject({ authorization, foundationId, createProjectRequest }: {
446
+ authorization: string;
447
+ foundationId: string;
448
+ createProjectRequest: CreateProjectRequest;
449
+ }, opts?: Oazapfts.RequestOpts) {
450
+ return oazapfts.ok(oazapfts.fetchJson<{
451
+ status: 200;
452
+ data: ProjectResponse;
453
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects`, oazapfts.json({
454
+ ...opts,
455
+ method: "POST",
456
+ body: createProjectRequest,
457
+ headers: oazapfts.mergeHeaders(opts?.headers, {
458
+ Authorization: authorization
459
+ })
460
+ })));
461
+ }
462
+ export function listNetwork({ authorization, foundationId, projectId }: {
463
+ authorization: string;
464
+ foundationId: string;
465
+ projectId?: string;
466
+ }, opts?: Oazapfts.RequestOpts) {
467
+ return oazapfts.ok(oazapfts.fetchJson<{
468
+ status: 200;
469
+ data: ListNetworkResponse;
470
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks${QS.query(QS.explode({
471
+ projectId
472
+ }))}`, {
473
+ ...opts,
474
+ headers: oazapfts.mergeHeaders(opts?.headers, {
475
+ Authorization: authorization
476
+ })
477
+ }));
478
+ }
479
+ export function createNetwork({ authorization, foundationId, createNetworkRequest }: {
480
+ authorization: string;
481
+ foundationId: string;
482
+ createNetworkRequest: CreateNetworkRequest;
483
+ }, opts?: Oazapfts.RequestOpts) {
484
+ return oazapfts.ok(oazapfts.fetchJson<{
485
+ status: 200;
486
+ data: NetworkResponse;
487
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks`, oazapfts.json({
488
+ ...opts,
489
+ method: "POST",
490
+ body: createNetworkRequest,
491
+ headers: oazapfts.mergeHeaders(opts?.headers, {
492
+ Authorization: authorization
493
+ })
494
+ })));
495
+ }
496
+ export function listNetworkConnection({ authorization, foundationId, accepterNetworkId, accepterProjectId, requesterNetworkId, requesterProjectId }: {
497
+ authorization: string;
498
+ foundationId: string;
499
+ accepterNetworkId?: string;
500
+ accepterProjectId?: string;
501
+ requesterNetworkId?: string;
502
+ requesterProjectId?: string;
503
+ }, opts?: Oazapfts.RequestOpts) {
504
+ return oazapfts.ok(oazapfts.fetchJson<{
505
+ status: 200;
506
+ data: ListNetworkConnectionResponse;
507
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections${QS.query(QS.explode({
508
+ accepterNetworkId,
509
+ accepterProjectId,
510
+ requesterNetworkId,
511
+ requesterProjectId
512
+ }))}`, {
513
+ ...opts,
514
+ headers: oazapfts.mergeHeaders(opts?.headers, {
515
+ Authorization: authorization
516
+ })
517
+ }));
518
+ }
519
+ export function createNetworkConnection({ authorization, foundationId, createNetworkConnectionRequest }: {
520
+ authorization: string;
521
+ foundationId: string;
522
+ createNetworkConnectionRequest: CreateNetworkConnectionRequest;
523
+ }, opts?: Oazapfts.RequestOpts) {
524
+ return oazapfts.ok(oazapfts.fetchJson<{
525
+ status: 200;
526
+ data: NetworkConnectionResponse;
527
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections`, oazapfts.json({
528
+ ...opts,
529
+ method: "POST",
530
+ body: createNetworkConnectionRequest,
531
+ headers: oazapfts.mergeHeaders(opts?.headers, {
532
+ Authorization: authorization
533
+ })
534
+ })));
535
+ }
536
+ export function listInbound({ authorization, foundationId }: {
537
+ authorization: string;
538
+ foundationId: string;
539
+ }, opts?: Oazapfts.RequestOpts) {
540
+ return oazapfts.ok(oazapfts.fetchJson<{
541
+ status: 200;
542
+ data: ListInboundResponse;
543
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, {
544
+ ...opts,
545
+ headers: oazapfts.mergeHeaders(opts?.headers, {
546
+ Authorization: authorization
547
+ })
548
+ }));
549
+ }
550
+ export function createInbound({ authorization, foundationId, createInboundRequest }: {
551
+ authorization: string;
552
+ foundationId: string;
553
+ createInboundRequest: CreateInboundRequest;
554
+ }, opts?: Oazapfts.RequestOpts) {
555
+ return oazapfts.ok(oazapfts.fetchJson<{
556
+ status: 200;
557
+ data: InboundResponse;
558
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds`, oazapfts.json({
559
+ ...opts,
560
+ method: "POST",
561
+ body: createInboundRequest,
562
+ headers: oazapfts.mergeHeaders(opts?.headers, {
563
+ Authorization: authorization
564
+ })
565
+ })));
566
+ }
567
+ export function getFolder({ authorization, foundationId, folderId }: {
568
+ authorization: string;
569
+ foundationId: string;
570
+ folderId: string;
571
+ }, opts?: Oazapfts.RequestOpts) {
572
+ return oazapfts.ok(oazapfts.fetchJson<{
573
+ status: 200;
574
+ data: FolderResponse;
575
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders${QS.query(QS.explode({
576
+ folderId
577
+ }))}`, {
578
+ ...opts,
579
+ headers: oazapfts.mergeHeaders(opts?.headers, {
580
+ Authorization: authorization
581
+ })
582
+ }));
583
+ }
584
+ export function createFolder({ authorization, foundationId, createFolderRequest }: {
585
+ authorization: string;
586
+ foundationId: string;
587
+ createFolderRequest: CreateFolderRequest;
588
+ }, opts?: Oazapfts.RequestOpts) {
589
+ return oazapfts.ok(oazapfts.fetchJson<{
590
+ status: 200;
591
+ data: FolderResponse;
592
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders`, oazapfts.json({
593
+ ...opts,
594
+ method: "POST",
595
+ body: createFolderRequest,
596
+ headers: oazapfts.mergeHeaders(opts?.headers, {
597
+ Authorization: authorization
598
+ })
599
+ })));
600
+ }
601
+ export function listDnsZone({ authorization, foundationId, projectId, privacy }: {
602
+ authorization: string;
603
+ foundationId: string;
604
+ projectId?: string;
605
+ privacy?: string;
606
+ }, opts?: Oazapfts.RequestOpts) {
607
+ return oazapfts.ok(oazapfts.fetchJson<{
608
+ status: 200;
609
+ data: ListDnsZoneResponse;
610
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones${QS.query(QS.explode({
611
+ projectId,
612
+ privacy
613
+ }))}`, {
614
+ ...opts,
615
+ headers: oazapfts.mergeHeaders(opts?.headers, {
616
+ Authorization: authorization
617
+ })
618
+ }));
619
+ }
620
+ export function createDnsZone({ authorization, foundationId, createDnsZoneRequest }: {
621
+ authorization: string;
622
+ foundationId: string;
623
+ createDnsZoneRequest: CreateDnsZoneRequest;
624
+ }, opts?: Oazapfts.RequestOpts) {
625
+ return oazapfts.ok(oazapfts.fetchJson<{
626
+ status: 200;
627
+ data: DnsZoneResponse;
628
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, oazapfts.json({
629
+ ...opts,
630
+ method: "POST",
631
+ body: createDnsZoneRequest,
632
+ headers: oazapfts.mergeHeaders(opts?.headers, {
633
+ Authorization: authorization
634
+ })
635
+ })));
636
+ }
637
+ export function listDnsRecord({ authorization, foundationId, projectId, dnsZoneId }: {
638
+ authorization: string;
639
+ foundationId: string;
640
+ projectId?: string;
641
+ dnsZoneId?: string;
642
+ }, opts?: Oazapfts.RequestOpts) {
643
+ return oazapfts.ok(oazapfts.fetchJson<{
644
+ status: 200;
645
+ data: ListDnsRecordResponse;
646
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records${QS.query(QS.explode({
647
+ projectId,
648
+ dnsZoneId
649
+ }))}`, {
650
+ ...opts,
651
+ headers: oazapfts.mergeHeaders(opts?.headers, {
652
+ Authorization: authorization
653
+ })
654
+ }));
655
+ }
656
+ export function createDnsRecord({ authorization, foundationId, createDnsRecordRequest }: {
657
+ authorization: string;
658
+ foundationId: string;
659
+ createDnsRecordRequest: CreateDnsRecordRequest;
660
+ }, opts?: Oazapfts.RequestOpts) {
661
+ return oazapfts.ok(oazapfts.fetchJson<{
662
+ status: 200;
663
+ data: DnsRecordResponse;
664
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records`, oazapfts.json({
665
+ ...opts,
666
+ method: "POST",
667
+ body: createDnsRecordRequest,
668
+ headers: oazapfts.mergeHeaders(opts?.headers, {
669
+ Authorization: authorization
670
+ })
671
+ })));
672
+ }
673
+ export function listCidr({ authorization, foundationId }: {
674
+ authorization: string;
675
+ foundationId: string;
676
+ }, opts?: Oazapfts.RequestOpts) {
677
+ return oazapfts.ok(oazapfts.fetchJson<{
678
+ status: 200;
679
+ data: ListCidrResponse;
680
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, {
681
+ ...opts,
682
+ headers: oazapfts.mergeHeaders(opts?.headers, {
683
+ Authorization: authorization
684
+ })
685
+ }));
686
+ }
687
+ export function createCidr({ authorization, foundationId, createCidrRequest }: {
688
+ authorization: string;
689
+ foundationId: string;
690
+ createCidrRequest: CreateCidrRequest;
691
+ }, opts?: Oazapfts.RequestOpts) {
692
+ return oazapfts.ok(oazapfts.fetchJson<{
693
+ status: 200;
694
+ data: CidrResponse;
695
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs`, oazapfts.json({
696
+ ...opts,
697
+ method: "POST",
698
+ body: createCidrRequest,
699
+ headers: oazapfts.mergeHeaders(opts?.headers, {
700
+ Authorization: authorization
701
+ })
702
+ })));
703
+ }
704
+ export function listCertificates({ authorization, foundationId, forInbound }: {
705
+ authorization: string;
706
+ foundationId: string;
707
+ forInbound?: "TRUE" | "FALSE";
708
+ }, opts?: Oazapfts.RequestOpts) {
709
+ return oazapfts.ok(oazapfts.fetchJson<{
710
+ status: 200;
711
+ data: ListCertificateResponse;
712
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates${QS.query(QS.explode({
713
+ forInbound
714
+ }))}`, {
715
+ ...opts,
716
+ headers: oazapfts.mergeHeaders(opts?.headers, {
717
+ Authorization: authorization
718
+ })
719
+ }));
720
+ }
721
+ export function createCertificate({ authorization, foundationId, body }: {
722
+ authorization: string;
723
+ foundationId: string;
724
+ body: CreatePublicCertificateRequest | ImportCertificateRequest;
725
+ }, opts?: Oazapfts.RequestOpts) {
726
+ return oazapfts.ok(oazapfts.fetchJson<{
727
+ status: 200;
728
+ data: CertificateResponse;
729
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates`, oazapfts.json({
730
+ ...opts,
731
+ method: "POST",
732
+ body,
733
+ headers: oazapfts.mergeHeaders(opts?.headers, {
734
+ Authorization: authorization
735
+ })
736
+ })));
737
+ }
738
+ export function acceptNetworkConnection({ authorization, foundationId, networkConnectionId }: {
739
+ authorization: string;
740
+ foundationId: string;
741
+ networkConnectionId: string;
742
+ }, opts?: Oazapfts.RequestOpts) {
743
+ return oazapfts.ok(oazapfts.fetchJson<{
744
+ status: 200;
745
+ data: NetworkConnectionResponse;
746
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}/accept`, {
747
+ ...opts,
748
+ method: "PATCH",
749
+ headers: oazapfts.mergeHeaders(opts?.headers, {
750
+ Authorization: authorization
751
+ })
752
+ }));
753
+ }
754
+ export function getFoundation({ authorization, foundationId }: {
755
+ authorization: string;
756
+ foundationId: string;
757
+ }, opts?: Oazapfts.RequestOpts) {
758
+ return oazapfts.ok(oazapfts.fetchJson<{
759
+ status: 200;
760
+ data: FoundationResponse;
761
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
762
+ ...opts,
763
+ headers: oazapfts.mergeHeaders(opts?.headers, {
764
+ Authorization: authorization
765
+ })
766
+ }));
767
+ }
768
+ export function getVpn({ authorization, foundationId, vpnId }: {
769
+ authorization: string;
770
+ foundationId: string;
771
+ vpnId: string;
772
+ }, opts?: Oazapfts.RequestOpts) {
773
+ return oazapfts.ok(oazapfts.fetchJson<{
774
+ status: 200;
775
+ data: VpnResponse;
776
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}`, {
777
+ ...opts,
778
+ headers: oazapfts.mergeHeaders(opts?.headers, {
779
+ Authorization: authorization
780
+ })
781
+ }));
782
+ }
783
+ export function getVpnConfiguration({ authorization, foundationId, vpnId }: {
784
+ authorization: string;
785
+ foundationId: string;
786
+ vpnId: string;
787
+ }, opts?: Oazapfts.RequestOpts) {
788
+ return oazapfts.ok(oazapfts.fetchJson<{
789
+ status: 200;
790
+ data: VpnConfigurationResponse;
791
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/vpns/${encodeURIComponent(vpnId)}/configuration`, {
792
+ ...opts,
793
+ headers: oazapfts.mergeHeaders(opts?.headers, {
794
+ Authorization: authorization
795
+ })
796
+ }));
797
+ }
798
+ export function getProject({ authorization, foundationId, projectId }: {
799
+ authorization: string;
800
+ foundationId: string;
801
+ projectId: string;
802
+ }, opts?: Oazapfts.RequestOpts) {
803
+ return oazapfts.ok(oazapfts.fetchJson<{
804
+ status: 200;
805
+ data: ProjectResponse;
806
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/projects/${encodeURIComponent(projectId)}`, {
807
+ ...opts,
808
+ headers: oazapfts.mergeHeaders(opts?.headers, {
809
+ Authorization: authorization
810
+ })
811
+ }));
812
+ }
813
+ export function getNetwork({ authorization, foundationId, networkId }: {
814
+ authorization: string;
815
+ foundationId: string;
816
+ networkId: string;
817
+ }, opts?: Oazapfts.RequestOpts) {
818
+ return oazapfts.ok(oazapfts.fetchJson<{
819
+ status: 200;
820
+ data: NetworkResponse;
821
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/networks/${encodeURIComponent(networkId)}`, {
822
+ ...opts,
823
+ headers: oazapfts.mergeHeaders(opts?.headers, {
824
+ Authorization: authorization
825
+ })
826
+ }));
827
+ }
828
+ export function getNetworkConnection({ authorization, foundationId, networkConnectionId }: {
829
+ authorization: string;
830
+ foundationId: string;
831
+ networkConnectionId: string;
832
+ }, opts?: Oazapfts.RequestOpts) {
833
+ return oazapfts.ok(oazapfts.fetchJson<{
834
+ status: 200;
835
+ data: NetworkConnectionResponse;
836
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/network-connections/${encodeURIComponent(networkConnectionId)}`, {
837
+ ...opts,
838
+ headers: oazapfts.mergeHeaders(opts?.headers, {
839
+ Authorization: authorization
840
+ })
841
+ }));
842
+ }
843
+ export function getInbound({ authorization, foundationId, inboundId }: {
844
+ authorization: string;
845
+ foundationId: string;
846
+ inboundId: string;
847
+ }, opts?: Oazapfts.RequestOpts) {
848
+ return oazapfts.ok(oazapfts.fetchJson<{
849
+ status: 200;
850
+ data: InboundResponse;
851
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/inbounds/${encodeURIComponent(inboundId)}`, {
852
+ ...opts,
853
+ headers: oazapfts.mergeHeaders(opts?.headers, {
854
+ Authorization: authorization
855
+ })
856
+ }));
857
+ }
858
+ export function getDnsZone({ authorization, foundationId, dnsZoneId }: {
859
+ authorization: string;
860
+ foundationId: string;
861
+ dnsZoneId: string;
862
+ }, opts?: Oazapfts.RequestOpts) {
863
+ return oazapfts.ok(oazapfts.fetchJson<{
864
+ status: 200;
865
+ data: DnsZoneResponse;
866
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
867
+ ...opts,
868
+ headers: oazapfts.mergeHeaders(opts?.headers, {
869
+ Authorization: authorization
870
+ })
871
+ }));
872
+ }
873
+ export function getDnsZone1({ authorization, foundationId, dnsRecordId }: {
874
+ authorization: string;
875
+ foundationId: string;
876
+ dnsRecordId: string;
877
+ }, opts?: Oazapfts.RequestOpts) {
878
+ return oazapfts.ok(oazapfts.fetchJson<{
879
+ status: 200;
880
+ data: DnsRecordResponse;
881
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-records/${encodeURIComponent(dnsRecordId)}`, {
882
+ ...opts,
883
+ headers: oazapfts.mergeHeaders(opts?.headers, {
884
+ Authorization: authorization
885
+ })
886
+ }));
887
+ }
888
+ export function getCidr({ authorization, foundationId, cidrId }: {
889
+ authorization: string;
890
+ foundationId: string;
891
+ cidrId: string;
892
+ }, opts?: Oazapfts.RequestOpts) {
893
+ return oazapfts.ok(oazapfts.fetchJson<{
894
+ status: 200;
895
+ data: CidrResponse;
896
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidrs/${encodeURIComponent(cidrId)}`, {
897
+ ...opts,
898
+ headers: oazapfts.mergeHeaders(opts?.headers, {
899
+ Authorization: authorization
900
+ })
901
+ }));
902
+ }
903
+ export function getCertificate({ authorization, foundationId, certificateId }: {
904
+ authorization: string;
905
+ foundationId: string;
906
+ certificateId: string;
907
+ }, opts?: Oazapfts.RequestOpts) {
908
+ return oazapfts.ok(oazapfts.fetchJson<{
909
+ status: 200;
910
+ data: CertificateResponse;
911
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}`, {
912
+ ...opts,
913
+ headers: oazapfts.mergeHeaders(opts?.headers, {
914
+ Authorization: authorization
915
+ })
916
+ }));
917
+ }
918
+ export function providers(opts?: Oazapfts.RequestOpts) {
919
+ return oazapfts.ok(oazapfts.fetchJson<{
920
+ status: 200;
921
+ data: {
922
+ [key: string]: any;
923
+ }[];
924
+ }>("/v1/foundations/providers", {
925
+ ...opts
926
+ }));
927
+ }