@stack-spot/portal-network 0.184.0 → 0.185.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 (142) hide show
  1. package/CHANGELOG.md +2444 -2412
  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 +63 -4
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +14 -1
  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.js +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/ai.d.ts.map +1 -1
  30. package/dist/client/ai.js +84 -14
  31. package/dist/client/ai.js.map +1 -1
  32. package/dist/client/code-shift.d.ts +30 -0
  33. package/dist/client/code-shift.d.ts.map +1 -1
  34. package/dist/client/code-shift.js +37 -1
  35. package/dist/client/code-shift.js.map +1 -1
  36. package/dist/client/types.d.ts +26 -6
  37. package/dist/client/types.d.ts.map +1 -1
  38. package/package.json +7 -7
  39. package/readme.md +1 -1
  40. package/scripts/generate-apis.ts +134 -134
  41. package/src/api/account.ts +8368 -8367
  42. package/src/api/agent-tools.ts +2172 -2169
  43. package/src/api/agent.ts +1085 -1083
  44. package/src/api/ai.ts +3388 -3388
  45. package/src/api/apiManagement.ts +570 -570
  46. package/src/api/apiRuntime.ts +2103 -2103
  47. package/src/api/cloudAccount.ts +1239 -1239
  48. package/src/api/cloudPlatform.ts +927 -927
  49. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  50. package/src/api/cloudRuntimes.ts +2043 -2043
  51. package/src/api/cloudServices.ts +1445 -1445
  52. package/src/api/codeShift.ts +3567 -3481
  53. package/src/api/content.ts +9785 -9785
  54. package/src/api/dataIntegration.ts +1657 -1657
  55. package/src/api/discover.ts +435 -435
  56. package/src/api/eventBus.ts +171 -171
  57. package/src/api/genAiInference.ts +603 -603
  58. package/src/api/insights.ts +310 -310
  59. package/src/api/notification.ts +336 -334
  60. package/src/api/secrets.ts +342 -342
  61. package/src/api/serviceCatalog.ts +2908 -2908
  62. package/src/api/workflows.ts +1669 -1669
  63. package/src/api/workspace-ai.ts +677 -677
  64. package/src/api/workspace.ts +5889 -5889
  65. package/src/api/workspaceManager.ts +2951 -2951
  66. package/src/api/workspaceSearchEngine.ts +153 -153
  67. package/src/api-addresses.ts +120 -120
  68. package/src/apis-itau.json +225 -225
  69. package/src/apis.json +225 -225
  70. package/src/client/account.ts +902 -902
  71. package/src/client/agent-tools.ts +210 -210
  72. package/src/client/agent.ts +81 -81
  73. package/src/client/ai.ts +469 -395
  74. package/src/client/api-management.ts +40 -40
  75. package/src/client/cloud-account.ts +70 -70
  76. package/src/client/cloud-platform-horizon.ts +113 -113
  77. package/src/client/cloud-platform.ts +163 -163
  78. package/src/client/cloud-runtimes.ts +129 -129
  79. package/src/client/cloud-services.ts +94 -94
  80. package/src/client/code-shift.ts +371 -349
  81. package/src/client/content.ts +538 -538
  82. package/src/client/data-integration.ts +191 -191
  83. package/src/client/discover.ts +89 -89
  84. package/src/client/event-bus.ts +84 -84
  85. package/src/client/gen-ai-inference.ts +65 -65
  86. package/src/client/insights.ts +28 -28
  87. package/src/client/notification.ts +32 -32
  88. package/src/client/runtime-manager.ts +76 -76
  89. package/src/client/secrets.ts +60 -60
  90. package/src/client/types.ts +398 -377
  91. package/src/client/workflow.ts +83 -83
  92. package/src/client/workspace-ai.ts +191 -191
  93. package/src/client/workspace-manager.ts +564 -564
  94. package/src/client/workspace-search.ts +39 -39
  95. package/src/client/workspace.ts +480 -480
  96. package/src/error/DefaultAPIError.ts +151 -151
  97. package/src/error/FileUploadError.ts +18 -18
  98. package/src/error/IgnoredErrorCodes.ts +3 -3
  99. package/src/error/StackspotAPIError.ts +101 -101
  100. package/src/error/StreamCanceledError.ts +10 -10
  101. package/src/error/StreamError.ts +7 -7
  102. package/src/error/StreamJsonError.ts +10 -10
  103. package/src/error/dictionary/account.ts +58 -58
  104. package/src/error/dictionary/action-details.ts +20 -20
  105. package/src/error/dictionary/action.ts +211 -211
  106. package/src/error/dictionary/agent-tools.ts +75 -75
  107. package/src/error/dictionary/ai-inference.ts +28 -28
  108. package/src/error/dictionary/base.ts +22 -22
  109. package/src/error/dictionary/cloud-platform.ts +82 -82
  110. package/src/error/dictionary/cnt-fields.ts +14 -14
  111. package/src/error/dictionary/cnt.ts +103 -103
  112. package/src/error/dictionary/code-shift.ts +12 -12
  113. package/src/error/dictionary/rte.ts +24 -24
  114. package/src/error/dictionary/rtm.ts +10 -10
  115. package/src/error/dictionary/secrets.ts +14 -14
  116. package/src/error/dictionary/workspace-ai.ts +10 -10
  117. package/src/error/dictionary/workspace-details.ts +15 -15
  118. package/src/error/dictionary/workspace-fields.ts +10 -10
  119. package/src/error/dictionary/workspace.ts +209 -209
  120. package/src/error/types.ts +21 -21
  121. package/src/index.ts +43 -43
  122. package/src/network/AutoInfiniteQuery.ts +115 -115
  123. package/src/network/AutoMutation.ts +27 -27
  124. package/src/network/AutoOperation.ts +73 -73
  125. package/src/network/AutoQuery.ts +75 -75
  126. package/src/network/ManualInfiniteQuery.ts +95 -95
  127. package/src/network/ManualMutation.ts +40 -40
  128. package/src/network/ManualOperation.ts +52 -52
  129. package/src/network/ManualQuery.ts +82 -82
  130. package/src/network/NetworkClient.ts +167 -167
  131. package/src/network/ReactQueryNetworkClient.ts +312 -312
  132. package/src/network/react-query-client.ts +14 -14
  133. package/src/network/types.ts +294 -294
  134. package/src/types.ts +1 -1
  135. package/src/utils/StreamedArray.tsx +146 -146
  136. package/src/utils/StreamedJson.tsx +166 -166
  137. package/src/utils/remove-authorization-param.ts +6 -6
  138. package/src/utils/string.ts +19 -19
  139. package/src/utils/use-extended-list.ts +80 -80
  140. package/src/utils/use-streamed-array.ts +17 -17
  141. package/tsconfig.build.json +4 -4
  142. package/tsconfig.json +10 -10
@@ -1,1239 +1,1239 @@
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://account-account-external-connections-api.dev.stackspot.com",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {
15
- generatedServerUrl: "https://account-account-external-connections-api.dev.stackspot.com"
16
- };
17
- export type JwtToken = {
18
- rawToken: string;
19
- email: string;
20
- name: string;
21
- stackSpotAccountId: string;
22
- stackSpotAccountSlug: string;
23
- isServiceToken: boolean;
24
- };
25
- export type JwtTokenWrite = {
26
- authenticationHeader?: string;
27
- rawToken: string;
28
- email: string;
29
- name: string;
30
- stackSpotAccountId: string;
31
- stackSpotAccountSlug: string;
32
- isServiceToken: boolean;
33
- };
34
- export type CloudAccountCredential = object;
35
- export type ConnectAccountRequestV2 = {
36
- /** Environment ID */
37
- environmentId: string;
38
- /** Workspace ID */
39
- workspaceId: string;
40
- /** Cloud Provider */
41
- provider: "AWS" | "Azure";
42
- credential?: CloudAccountCredential;
43
- };
44
- export type CloudAccountDetails = {
45
- /** Cloud Account ID */
46
- id?: string;
47
- /** Workspace ID */
48
- workspaceId: string;
49
- /** Workspace name */
50
- workspaceName: string;
51
- /** Environment ID */
52
- environmentId: string;
53
- /** Environment name */
54
- environmentName: string;
55
- /** Environment description */
56
- environmentDescription: string;
57
- /** Cloud Provider */
58
- provider?: "AWS" | "Azure";
59
- /** Cloud Provider Account ID */
60
- providerAccountId?: string;
61
- /** Cloud Account connection status */
62
- status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
63
- /** Cloud Account type */
64
- "type"?: "CustomCloud" | "CloudServices";
65
- /** When not-null, it's the ID for a support case requesting the disconnection of this account */
66
- activeDisconnectSupportCaseId?: string;
67
- };
68
- export type ValidationDetails = {
69
- code: string;
70
- field?: string;
71
- details?: string;
72
- values?: string[];
73
- };
74
- export type RegisterOfferRequest = {
75
- stackspotAccountId: string;
76
- cloudOffer: "Reseller" | "Managed" | "FullyManaged";
77
- };
78
- export type CloudAccountResponse = {
79
- /** Cloud Account ID */
80
- id: string;
81
- /** Workspace name */
82
- workspaceName: string;
83
- /** Environment name */
84
- environmentName: string;
85
- /** Cloud Provider */
86
- provider: "AWS" | "Azure";
87
- /** Cloud Account connection status */
88
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
89
- /** Cloud Account type */
90
- "type": "CustomCloud" | "CloudServices";
91
- /** Number Of Ips */
92
- numberOfIps?: number;
93
- /** Network Type */
94
- networkType?: number;
95
- };
96
- export type PaginatedResourceCloudAccountResponse = {
97
- data: CloudAccountResponse[];
98
- nextPage?: number;
99
- prevPage?: number;
100
- totalPages: number;
101
- };
102
- export type ConnectAccountRequest = {
103
- /** Environment ID */
104
- environmentId: string;
105
- /** Workspace ID */
106
- workspaceId: string;
107
- /** Cloud Provider */
108
- provider: "AWS" | "Azure";
109
- credential?: CloudAccountCredential;
110
- /** IAM Role. Will be deprecated in future releases. */
111
- iamRole?: string;
112
- };
113
- export type Ulid = {
114
- value: string;
115
- };
116
- export type ManagedAccountProvisionRequest = {
117
- workspaceId: Ulid;
118
- /**
119
- Network template ID to be setup in the provisioned accounts. See /cloud-account/managed-account/template for more info.
120
- */
121
- networkTypeId: number;
122
- /**
123
- Number of IPs to be allocated in the provisioned accounts. See /cloud-account/managed-account/template for more info.
124
- */
125
- numberOfIps: number;
126
- };
127
- export type DisconnectSupportCaseManagedAccountRequest = {
128
- supportCaseId: number;
129
- };
130
- export type DisconnectSupportCaseManagedAccountResponse = {
131
- cloudAccountId: Ulid;
132
- stackspotAccountId: Ulid;
133
- supportCaseId: number;
134
- };
135
- export type StackspotAccountTower = {
136
- id: string;
137
- stackspotAccountId: string;
138
- towerId: string;
139
- };
140
- export type StackspotAccountTowerRequest = {
141
- stackspotAccountId: string;
142
- towerId: string;
143
- };
144
- export type CommonCreatedResponse = {
145
- /** The created object ID */
146
- id: string;
147
- };
148
- export type UpdateManagedInfoRequest = {
149
- cloudAccountId: Ulid;
150
- stackspotAccountId: Ulid;
151
- /**
152
- Sets the AWS region for the account.
153
- */
154
- region?: string;
155
- /**
156
- Sets the foundation name for the account.
157
- */
158
- foundationName?: string;
159
- /**
160
- Sets the environment name for the account.
161
- */
162
- environmentName?: string;
163
- };
164
- export type UpdatedCloudAccountResponse = {
165
- cloudAccountId: Ulid;
166
- stackspotAccountId: Ulid;
167
- workspaceId: Ulid;
168
- environmentId: Ulid;
169
- cloudType: "CustomCloud" | "CloudServices";
170
- cloudStatus: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
171
- /**
172
- The region associated with the Cloud Account. This fields only exists for AWS accounts of CloudServices type.
173
- */
174
- providerRegion?: string;
175
- /**
176
- The account's name inside the Foundation's organization. This fields only exists for AWS accounts of CloudServices type.
177
- */
178
- foundationName: string;
179
- };
180
- export type DisconnectCloudAccountRequest = {
181
- cloudAccountId: Ulid;
182
- stackspotAccountId: Ulid;
183
- };
184
- export type CloudAccountDetailsWithCredentialV2 = {
185
- /** Cloud Account ID */
186
- id: string;
187
- /** Workspace ID */
188
- workspaceId: string;
189
- /** Environment ID */
190
- environmentId: string;
191
- /** Cloud Provider */
192
- provider: "AWS" | "Azure";
193
- /** Cloud Account type */
194
- "type": "CustomCloud" | "CloudServices";
195
- /** Cloud Account connection status */
196
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
197
- /** Cloud Account credential identifier for Secret Manager */
198
- credentialSecretIdentifier?: string;
199
- };
200
- export type AdminCloudAccountDetailsV2 = {
201
- /** Cloud Account ID */
202
- id: string;
203
- /** Stackspot Account ID */
204
- stackspotAccountId: string;
205
- /** Workspace ID */
206
- workspaceId: string;
207
- /** Environment ID */
208
- environmentId: string;
209
- /** Environment Name (only available in CloudServices accounts ) */
210
- environmentName?: string;
211
- /** Cloud Provider that Cloud Account represents */
212
- provider: "AWS" | "Azure";
213
- /** Type of the Cloud Account (Custom Cloud or Cloud Services) */
214
- "type": "CustomCloud" | "CloudServices";
215
- /** Status of this Cloud Account. Connected indicates it's ready to use, others status are self explained */
216
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
217
- /** The ID this account have in Cloud Provider */
218
- cloudProviderAccountId?: string;
219
- /** The name given in Cloud Provider for this account (only available in CloudServices accounts) */
220
- cloudProviderAccountName?: string;
221
- /** Linked Account ID */
222
- linkedAccountId?: string;
223
- /** This Cloud Account credentials secret manager */
224
- credentialSecretIdentifier?: string;
225
- /** ID of the Control Tower that Cloud Account is connected */
226
- controlTowerId?: string;
227
- /** Region of the Cloud Account provider */
228
- region?: string;
229
- };
230
- export type PaginatedResponseAdminCloudAccountDetailsV2 = {
231
- data: AdminCloudAccountDetailsV2[];
232
- nextPage?: string;
233
- prevPage?: string;
234
- count: number;
235
- };
236
- export type HealthComponent = {
237
- description?: string;
238
- status?: string;
239
- };
240
- export type CloudOfferResponse = {
241
- stackspotAccountId: string;
242
- offer: "Reseller" | "Managed" | "FullyManaged";
243
- };
244
- export type CloudServicesAccountStatus = {
245
- /** Cloud Account ID */
246
- id: string;
247
- /** Environment name */
248
- environmentName: string;
249
- /** Environment ID */
250
- environmentId: string;
251
- /** Status of the account in the workflow */
252
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
253
- provider: "AWS" | "Azure";
254
- /** Error code if the workflow for creating the account failed */
255
- errorCode?: string;
256
- };
257
- export type Workflow = {
258
- status: "UNDER_CHANGE" | "AVAILABLE" | "ERROR";
259
- accounts: CloudServicesAccountStatus[];
260
- supportCaseId?: string;
261
- };
262
- export type CloudAccountDetailsWithCredential = {
263
- /** Cloud Account ID */
264
- id: string;
265
- /** Workspace ID */
266
- workspaceId: string;
267
- /** Environment ID */
268
- environmentId: string;
269
- /** Cloud Provider */
270
- provider: "AWS" | "Azure";
271
- /** Cloud Account type */
272
- "type": "CustomCloud" | "CloudServices";
273
- /** Role */
274
- role: string;
275
- /** Cloud Account connection status */
276
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
277
- /** Cloud Account credential identifier for Secret Manager */
278
- credentialSecretIdentifier?: string;
279
- };
280
- export type ManagedAccountTemplateResponse = {
281
- id: number;
282
- name: string;
283
- minCountIps: number;
284
- maxCountIps: number;
285
- availableIpRange?: number[];
286
- };
287
- export type ManagedAccountRegionResponse = {
288
- id: number;
289
- name: string;
290
- };
291
- export type AdminCloudAccountDetails = {
292
- /** Cloud Account ID */
293
- id: string;
294
- /** Stackspot Account ID */
295
- stackspotAccountId: string;
296
- /** Workspace ID */
297
- workspaceId: string;
298
- /** Environment ID */
299
- environmentId: string;
300
- /** Environment Name (only available in CloudServices accounts ) */
301
- environmentName?: string;
302
- /** Cloud Provider that Cloud Account represents */
303
- provider: "AWS" | "Azure";
304
- /** Type of the Cloud Account (Custom Cloud or Cloud Services) */
305
- "type": "CustomCloud" | "CloudServices";
306
- /** AWS Role that can be used for connecting in account */
307
- role?: string;
308
- /** Status of this Cloud Account. Connected indicates it's ready to use, others status are self explained */
309
- status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
310
- /** The ID this account have in Cloud Provider */
311
- cloudProviderAccountId?: string;
312
- /** The name given in Cloud Provider for this account (only available in CloudServices accounts) */
313
- cloudProviderAccountName?: string;
314
- /** Linked Account ID */
315
- linkedAccountId?: string;
316
- /** This Cloud Account credentials secret manager */
317
- credentialSecretIdentifier?: string;
318
- /** ID of the Control Tower that Cloud Account is connected */
319
- controlTowerId?: string;
320
- /** Region of the Cloud Account provider */
321
- region?: string;
322
- };
323
- export type PaginatedResponseAdminCloudAccountDetails = {
324
- data: AdminCloudAccountDetails[];
325
- nextPage?: string;
326
- prevPage?: string;
327
- count: number;
328
- };
329
- export type DeleteCloudAccountResponse = {
330
- cloudAccountId: Ulid;
331
- /** The type of the cloud account */
332
- cloudType: "CustomCloud" | "CloudServices";
333
- /** If the type is 'CloudServices', the delete operation opens a support case in order to delete the account */
334
- supportCaseId?: string;
335
- };
336
- /**
337
- * Connect a cloud account
338
- */
339
- export function createCloudAccount({ jwtToken, stackspotCustomerIp, connectAccountRequestV2 }: {
340
- jwtToken: JwtToken;
341
- stackspotCustomerIp?: string;
342
- connectAccountRequestV2: ConnectAccountRequestV2;
343
- }, opts?: Oazapfts.RequestOpts) {
344
- return oazapfts.ok(oazapfts.fetchJson<{
345
- status: 201;
346
- data: CloudAccountDetails;
347
- } | {
348
- status: 422;
349
- data: {
350
- code: string;
351
- status: number;
352
- details: string;
353
- validationDetails?: ValidationDetails[];
354
- };
355
- } | {
356
- status: 500;
357
- data: {
358
- code: string;
359
- status: number;
360
- details: string;
361
- validationDetails?: ValidationDetails[];
362
- };
363
- }>(`/v2/cloud-account${QS.query(QS.explode({
364
- jwtToken
365
- }))}`, oazapfts.json({
366
- ...opts,
367
- method: "POST",
368
- body: connectAccountRequestV2,
369
- headers: oazapfts.mergeHeaders(opts?.headers, {
370
- "stackspot-customer-ip": stackspotCustomerIp
371
- })
372
- })));
373
- }
374
- /**
375
- * Register a cloud offer for a Stackspot Account.
376
- */
377
- export function registerOffer({ registerOfferRequest }: {
378
- registerOfferRequest: RegisterOfferRequest;
379
- }, opts?: Oazapfts.RequestOpts) {
380
- return oazapfts.ok(oazapfts.fetchJson<{
381
- status: 201;
382
- data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
383
- } | {
384
- status: 422;
385
- data: {
386
- code: string;
387
- status: number;
388
- details: string;
389
- validationDetails?: ValidationDetails[];
390
- };
391
- } | {
392
- status: 500;
393
- data: {
394
- code: string;
395
- status: number;
396
- details: string;
397
- validationDetails?: ValidationDetails[];
398
- };
399
- }>("/cloud-offer", oazapfts.json({
400
- ...opts,
401
- method: "POST",
402
- body: registerOfferRequest
403
- })));
404
- }
405
- /**
406
- * List all cloud accounts created for all workspaces
407
- */
408
- export function listCloudAccounts({ jwtToken, sortBy, sortOrder, filter, page, pageSize, $type, environment, status }: {
409
- jwtToken: JwtToken;
410
- sortBy?: string;
411
- sortOrder?: string;
412
- filter?: string;
413
- page?: number;
414
- pageSize?: number;
415
- $type?: "CustomCloud" | "CloudServices";
416
- environment?: string;
417
- status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
418
- }, opts?: Oazapfts.RequestOpts) {
419
- return oazapfts.ok(oazapfts.fetchJson<{
420
- status: 200;
421
- data: PaginatedResourceCloudAccountResponse;
422
- } | {
423
- status: 422;
424
- data: {
425
- code: string;
426
- status: number;
427
- details: string;
428
- validationDetails?: ValidationDetails[];
429
- };
430
- } | {
431
- status: 500;
432
- data: {
433
- code: string;
434
- status: number;
435
- details: string;
436
- validationDetails?: ValidationDetails[];
437
- };
438
- }>(`/cloud-account${QS.query(QS.explode({
439
- jwtToken,
440
- sortBy,
441
- sortOrder,
442
- filter,
443
- page,
444
- pageSize,
445
- "type": $type,
446
- environment,
447
- status
448
- }))}`, {
449
- ...opts
450
- }));
451
- }
452
- /**
453
- * Connect a cloud account
454
- */
455
- export function createCloudAccount1({ jwtToken, stackspotCustomerIp, connectAccountRequest }: {
456
- jwtToken: JwtToken;
457
- stackspotCustomerIp?: string;
458
- connectAccountRequest: ConnectAccountRequest;
459
- }, opts?: Oazapfts.RequestOpts) {
460
- return oazapfts.ok(oazapfts.fetchJson<{
461
- status: 201;
462
- data: CloudAccountDetails;
463
- } | {
464
- status: 422;
465
- data: {
466
- code: string;
467
- status: number;
468
- details: string;
469
- validationDetails?: ValidationDetails[];
470
- };
471
- } | {
472
- status: 500;
473
- data: {
474
- code: string;
475
- status: number;
476
- details: string;
477
- validationDetails?: ValidationDetails[];
478
- };
479
- }>(`/cloud-account${QS.query(QS.explode({
480
- jwtToken
481
- }))}`, oazapfts.json({
482
- ...opts,
483
- method: "POST",
484
- body: connectAccountRequest,
485
- headers: oazapfts.mergeHeaders(opts?.headers, {
486
- "stackspot-customer-ip": stackspotCustomerIp
487
- })
488
- })));
489
- }
490
- /**
491
- * Provision managed accounts in a workspace
492
- */
493
- export function provisionManagedAccountsForWorkspace({ jwtToken, stackspotCustomerIp, managedAccountProvisionRequest }: {
494
- jwtToken: JwtToken;
495
- stackspotCustomerIp?: string;
496
- managedAccountProvisionRequest: ManagedAccountProvisionRequest;
497
- }, opts?: Oazapfts.RequestOpts) {
498
- return oazapfts.ok(oazapfts.fetchJson<{
499
- status: 201;
500
- data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
501
- } | {
502
- status: 422;
503
- data: {
504
- code: string;
505
- status: number;
506
- details: string;
507
- validationDetails?: ValidationDetails[];
508
- };
509
- } | {
510
- status: 500;
511
- data: {
512
- code: string;
513
- status: number;
514
- details: string;
515
- validationDetails?: ValidationDetails[];
516
- };
517
- }>(`/cloud-account/managed-account${QS.query(QS.explode({
518
- jwtToken
519
- }))}`, oazapfts.json({
520
- ...opts,
521
- method: "POST",
522
- body: managedAccountProvisionRequest,
523
- headers: oazapfts.mergeHeaders(opts?.headers, {
524
- "stackspot-customer-ip": stackspotCustomerIp
525
- })
526
- })));
527
- }
528
- /**
529
- * Disconnect a Managed Account that was requested to disconnect via support case
530
- */
531
- export function disconnectCloudAccountRequestedForDisconnect({ disconnectSupportCaseManagedAccountRequest }: {
532
- disconnectSupportCaseManagedAccountRequest: DisconnectSupportCaseManagedAccountRequest;
533
- }, opts?: Oazapfts.RequestOpts) {
534
- return oazapfts.ok(oazapfts.fetchJson<{
535
- status: 200;
536
- data: DisconnectSupportCaseManagedAccountResponse[];
537
- } | {
538
- status: 422;
539
- data: {
540
- code: string;
541
- status: number;
542
- details: string;
543
- validationDetails?: ValidationDetails[];
544
- };
545
- } | {
546
- status: 500;
547
- data: {
548
- code: string;
549
- status: number;
550
- details: string;
551
- validationDetails?: ValidationDetails[];
552
- };
553
- }>("/admin/managed-cloud/support-case/disconnect", oazapfts.json({
554
- ...opts,
555
- method: "POST",
556
- body: disconnectSupportCaseManagedAccountRequest
557
- })));
558
- }
559
- /**
560
- * Get all relation between stackspot accounts and control towers
561
- */
562
- export function getAllAccountTower({ stackspotAccountId }: {
563
- stackspotAccountId?: string;
564
- }, opts?: Oazapfts.RequestOpts) {
565
- return oazapfts.ok(oazapfts.fetchJson<{
566
- status: 200;
567
- data: StackspotAccountTower[];
568
- } | {
569
- status: 422;
570
- data: {
571
- code: string;
572
- status: number;
573
- details: string;
574
- validationDetails?: ValidationDetails[];
575
- };
576
- } | {
577
- status: 500;
578
- data: {
579
- code: string;
580
- status: number;
581
- details: string;
582
- validationDetails?: ValidationDetails[];
583
- };
584
- }>(`/admin/managed-cloud/control-tower${QS.query(QS.explode({
585
- stackspotAccountId
586
- }))}`, {
587
- ...opts
588
- }));
589
- }
590
- /**
591
- * Add a Control Tower ID to a Stackspot Account that will be used in creation of a Managed Cloud Account
592
- */
593
- export function createAccountTower({ stackspotAccountTowerRequest }: {
594
- stackspotAccountTowerRequest: StackspotAccountTowerRequest;
595
- }, opts?: Oazapfts.RequestOpts) {
596
- return oazapfts.ok(oazapfts.fetchJson<{
597
- status: 201;
598
- data: CommonCreatedResponse;
599
- } | {
600
- status: 422;
601
- data: {
602
- code: string;
603
- status: number;
604
- details: string;
605
- validationDetails?: ValidationDetails[];
606
- };
607
- } | {
608
- status: 500;
609
- data: {
610
- code: string;
611
- status: number;
612
- details: string;
613
- validationDetails?: ValidationDetails[];
614
- };
615
- }>("/admin/managed-cloud/control-tower", oazapfts.json({
616
- ...opts,
617
- method: "POST",
618
- body: stackspotAccountTowerRequest
619
- })));
620
- }
621
- /**
622
- *
623
- * Updates Managed Account related information. If the account is of CustomCloud type, it changes to CloudServices
624
- * (managed account type).
625
- *
626
- */
627
- export function updateManagedInfo({ updateManagedInfoRequest }: {
628
- updateManagedInfoRequest: UpdateManagedInfoRequest;
629
- }, opts?: Oazapfts.RequestOpts) {
630
- return oazapfts.ok(oazapfts.fetchJson<{
631
- status: 200;
632
- data: UpdatedCloudAccountResponse;
633
- } | {
634
- status: 422;
635
- data: {
636
- code: string;
637
- status: number;
638
- details: string;
639
- validationDetails?: ValidationDetails[];
640
- };
641
- } | {
642
- status: 500;
643
- data: {
644
- code: string;
645
- status: number;
646
- details: string;
647
- validationDetails?: ValidationDetails[];
648
- };
649
- }>("/admin/cloud-account/update-managed-account", oazapfts.json({
650
- ...opts,
651
- method: "POST",
652
- body: updateManagedInfoRequest
653
- })));
654
- }
655
- /**
656
- * Disconnect a Cloud Account
657
- */
658
- export function disconnectCloudAccountById({ disconnectCloudAccountRequest }: {
659
- disconnectCloudAccountRequest: DisconnectCloudAccountRequest;
660
- }, opts?: Oazapfts.RequestOpts) {
661
- return oazapfts.ok(oazapfts.fetchJson<{
662
- status: 200;
663
- data: UpdatedCloudAccountResponse;
664
- } | {
665
- status: 422;
666
- data: {
667
- code: string;
668
- status: number;
669
- details: string;
670
- validationDetails?: ValidationDetails[];
671
- };
672
- } | {
673
- status: 500;
674
- data: {
675
- code: string;
676
- status: number;
677
- details: string;
678
- validationDetails?: ValidationDetails[];
679
- };
680
- }>("/admin/cloud-account/disconnect", oazapfts.json({
681
- ...opts,
682
- method: "POST",
683
- body: disconnectCloudAccountRequest
684
- })));
685
- }
686
- /**
687
- * Get a cloud account connected to a workspace environment
688
- */
689
- export function getCloudAccountByEnvironment({ accountId, workspaceId, environmentId }: {
690
- accountId: string;
691
- workspaceId: string;
692
- environmentId: string;
693
- }, opts?: Oazapfts.RequestOpts) {
694
- return oazapfts.ok(oazapfts.fetchJson<{
695
- status: 200;
696
- data: CloudAccountDetailsWithCredentialV2;
697
- } | {
698
- status: 422;
699
- data: {
700
- code: string;
701
- status: number;
702
- details: string;
703
- validationDetails?: ValidationDetails[];
704
- };
705
- } | {
706
- status: 500;
707
- data: {
708
- code: string;
709
- status: number;
710
- details: string;
711
- validationDetails?: ValidationDetails[];
712
- };
713
- }>(`/v2/cloud-account/workspace/${encodeURIComponent(workspaceId)}/environment/${encodeURIComponent(environmentId)}`, {
714
- ...opts,
715
- headers: oazapfts.mergeHeaders(opts?.headers, {
716
- accountId
717
- })
718
- }));
719
- }
720
- /**
721
- * Get a list of cloud accounts connected to a workspace
722
- */
723
- export function getCloudAccountByWorkspace({ jwtToken, accountId, id }: {
724
- jwtToken: JwtToken;
725
- accountId?: string;
726
- id: string;
727
- }, opts?: Oazapfts.RequestOpts) {
728
- return oazapfts.ok(oazapfts.fetchJson<{
729
- status: 200;
730
- data: CloudAccountDetails[];
731
- } | {
732
- status: 422;
733
- data: {
734
- code: string;
735
- status: number;
736
- details: string;
737
- validationDetails?: ValidationDetails[];
738
- };
739
- } | {
740
- status: 500;
741
- data: {
742
- code: string;
743
- status: number;
744
- details: string;
745
- validationDetails?: ValidationDetails[];
746
- };
747
- }>(`/v2/cloud-account/workspace/${encodeURIComponent(id)}${QS.query(QS.explode({
748
- jwtToken
749
- }))}`, {
750
- ...opts,
751
- headers: oazapfts.mergeHeaders(opts?.headers, {
752
- accountId
753
- })
754
- }));
755
- }
756
- /**
757
- * Get Cloud Account data with details
758
- */
759
- export function getCloudAccount({ stackspotAccountId, workspaceId, environmentId, provider, $type, status }: {
760
- stackspotAccountId?: string;
761
- workspaceId?: string;
762
- environmentId?: string;
763
- provider?: "AWS" | "Azure";
764
- $type?: "CustomCloud" | "CloudServices";
765
- status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
766
- }, opts?: Oazapfts.RequestOpts) {
767
- return oazapfts.ok(oazapfts.fetchJson<{
768
- status: 200;
769
- data: PaginatedResponseAdminCloudAccountDetailsV2;
770
- } | {
771
- status: 422;
772
- data: {
773
- code: string;
774
- status: number;
775
- details: string;
776
- validationDetails?: ValidationDetails[];
777
- };
778
- } | {
779
- status: 500;
780
- data: {
781
- code: string;
782
- status: number;
783
- details: string;
784
- validationDetails?: ValidationDetails[];
785
- };
786
- }>(`/v2/admin/cloud-account${QS.query(QS.explode({
787
- stackspotAccountId,
788
- workspaceId,
789
- environmentId,
790
- provider,
791
- "type": $type,
792
- status
793
- }))}`, {
794
- ...opts
795
- }));
796
- }
797
- /**
798
- * Get Cloud Account by ID
799
- */
800
- export function getCloudAccountById({ cloudAccountId }: {
801
- cloudAccountId: string;
802
- }, opts?: Oazapfts.RequestOpts) {
803
- return oazapfts.ok(oazapfts.fetchJson<{
804
- status: 200;
805
- data: AdminCloudAccountDetailsV2;
806
- } | {
807
- status: 422;
808
- data: {
809
- code: string;
810
- status: number;
811
- details: string;
812
- validationDetails?: ValidationDetails[];
813
- };
814
- } | {
815
- status: 500;
816
- data: {
817
- code: string;
818
- status: number;
819
- details: string;
820
- validationDetails?: ValidationDetails[];
821
- };
822
- }>(`/v2/admin/cloud-account/${encodeURIComponent(cloudAccountId)}`, {
823
- ...opts
824
- }));
825
- }
826
- export function healthz(opts?: Oazapfts.RequestOpts) {
827
- return oazapfts.ok(oazapfts.fetchJson<{
828
- status: 200;
829
- data: HealthComponent;
830
- } | {
831
- status: 422;
832
- data: {
833
- code: string;
834
- status: number;
835
- details: string;
836
- validationDetails?: ValidationDetails[];
837
- };
838
- } | {
839
- status: 500;
840
- data: {
841
- code: string;
842
- status: number;
843
- details: string;
844
- validationDetails?: ValidationDetails[];
845
- };
846
- }>("/healthz", {
847
- ...opts
848
- }));
849
- }
850
- /**
851
- * Get the cloud offer of a Stackspot Account.
852
- */
853
- export function getOfferOfAccount({ id }: {
854
- id: string;
855
- }, opts?: Oazapfts.RequestOpts) {
856
- return oazapfts.ok(oazapfts.fetchJson<{
857
- status: 200;
858
- data: CloudOfferResponse;
859
- } | {
860
- status: 422;
861
- data: {
862
- code: string;
863
- status: number;
864
- details: string;
865
- validationDetails?: ValidationDetails[];
866
- };
867
- } | {
868
- status: 500;
869
- data: {
870
- code: string;
871
- status: number;
872
- details: string;
873
- validationDetails?: ValidationDetails[];
874
- };
875
- }>(`/cloud-offer/account/${encodeURIComponent(id)}`, {
876
- ...opts
877
- }));
878
- }
879
- /**
880
- * Get the external-id for the given Cloud Account ID.
881
- */
882
- export function getCloudAccountExternalId({ cloudAccountId }: {
883
- cloudAccountId: string;
884
- }, opts?: Oazapfts.RequestOpts) {
885
- return oazapfts.ok(oazapfts.fetchJson<{
886
- status: 200;
887
- data: string;
888
- } | {
889
- status: 422;
890
- data: {
891
- code: string;
892
- status: number;
893
- details: string;
894
- validationDetails?: ValidationDetails[];
895
- };
896
- } | {
897
- status: 500;
898
- data: {
899
- code: string;
900
- status: number;
901
- details: string;
902
- validationDetails?: ValidationDetails[];
903
- };
904
- }>(`/cloud-account/${encodeURIComponent(cloudAccountId)}/external-id`, {
905
- ...opts
906
- }));
907
- }
908
- /**
909
- * Get the cloud account workflow of a workspace environment
910
- */
911
- export function getProvisionWorkflowInWorkspace({ jwtToken, workspaceId }: {
912
- jwtToken: JwtToken;
913
- workspaceId: string;
914
- }, opts?: Oazapfts.RequestOpts) {
915
- return oazapfts.ok(oazapfts.fetchJson<{
916
- status: 200;
917
- data: Workflow;
918
- } | {
919
- status: 422;
920
- data: {
921
- code: string;
922
- status: number;
923
- details: string;
924
- validationDetails?: ValidationDetails[];
925
- };
926
- } | {
927
- status: 500;
928
- data: {
929
- code: string;
930
- status: number;
931
- details: string;
932
- validationDetails?: ValidationDetails[];
933
- };
934
- }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/workflow${QS.query(QS.explode({
935
- jwtToken
936
- }))}`, {
937
- ...opts
938
- }));
939
- }
940
- /**
941
- * Get a cloud account connected to a workspace environment
942
- */
943
- export function getCloudAccountByEnvironment1({ accountId, workspaceId, environmentId }: {
944
- accountId: string;
945
- workspaceId: string;
946
- environmentId: string;
947
- }, opts?: Oazapfts.RequestOpts) {
948
- return oazapfts.ok(oazapfts.fetchJson<{
949
- status: 200;
950
- data: CloudAccountDetailsWithCredential;
951
- } | {
952
- status: 422;
953
- data: {
954
- code: string;
955
- status: number;
956
- details: string;
957
- validationDetails?: ValidationDetails[];
958
- };
959
- } | {
960
- status: 500;
961
- data: {
962
- code: string;
963
- status: number;
964
- details: string;
965
- validationDetails?: ValidationDetails[];
966
- };
967
- }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/environment/${encodeURIComponent(environmentId)}`, {
968
- ...opts,
969
- headers: oazapfts.mergeHeaders(opts?.headers, {
970
- accountId
971
- })
972
- }));
973
- }
974
- /**
975
- * Get a list of cloud accounts connected to a workspace
976
- */
977
- export function getCloudAccountByWorkspace1({ jwtToken, accountId, id }: {
978
- jwtToken: JwtToken;
979
- accountId?: string;
980
- id: string;
981
- }, opts?: Oazapfts.RequestOpts) {
982
- return oazapfts.ok(oazapfts.fetchJson<{
983
- status: 200;
984
- data: CloudAccountDetails[];
985
- } | {
986
- status: 422;
987
- data: {
988
- code: string;
989
- status: number;
990
- details: string;
991
- validationDetails?: ValidationDetails[];
992
- };
993
- } | {
994
- status: 500;
995
- data: {
996
- code: string;
997
- status: number;
998
- details: string;
999
- validationDetails?: ValidationDetails[];
1000
- };
1001
- }>(`/cloud-account/workspace/${encodeURIComponent(id)}${QS.query(QS.explode({
1002
- jwtToken
1003
- }))}`, {
1004
- ...opts,
1005
- headers: oazapfts.mergeHeaders(opts?.headers, {
1006
- accountId
1007
- })
1008
- }));
1009
- }
1010
- /**
1011
- * Get all available templates for Managed Cloud
1012
- */
1013
- export function getManagedCloudTemplate(opts?: Oazapfts.RequestOpts) {
1014
- return oazapfts.ok(oazapfts.fetchJson<{
1015
- status: 200;
1016
- data: ManagedAccountTemplateResponse[];
1017
- } | {
1018
- status: 422;
1019
- data: {
1020
- code: string;
1021
- status: number;
1022
- details: string;
1023
- validationDetails?: ValidationDetails[];
1024
- };
1025
- } | {
1026
- status: 500;
1027
- data: {
1028
- code: string;
1029
- status: number;
1030
- details: string;
1031
- validationDetails?: ValidationDetails[];
1032
- };
1033
- }>("/cloud-account/managed-account/template", {
1034
- ...opts
1035
- }));
1036
- }
1037
- /**
1038
- * Get all available regions for Managed Cloud
1039
- */
1040
- export function getManagedCloudRegion(opts?: Oazapfts.RequestOpts) {
1041
- return oazapfts.ok(oazapfts.fetchJson<{
1042
- status: 200;
1043
- data: ManagedAccountRegionResponse[];
1044
- } | {
1045
- status: 422;
1046
- data: {
1047
- code: string;
1048
- status: number;
1049
- details: string;
1050
- validationDetails?: ValidationDetails[];
1051
- };
1052
- } | {
1053
- status: 500;
1054
- data: {
1055
- code: string;
1056
- status: number;
1057
- details: string;
1058
- validationDetails?: ValidationDetails[];
1059
- };
1060
- }>("/cloud-account/managed-account/region", {
1061
- ...opts
1062
- }));
1063
- }
1064
- /**
1065
- * Get Cloud Account data with details
1066
- */
1067
- export function getCloudAccount1({ stackspotAccountId, workspaceId, environmentId, provider, $type, status }: {
1068
- stackspotAccountId?: string;
1069
- workspaceId?: string;
1070
- environmentId?: string;
1071
- provider?: "AWS" | "Azure";
1072
- $type?: "CustomCloud" | "CloudServices";
1073
- status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
1074
- }, opts?: Oazapfts.RequestOpts) {
1075
- return oazapfts.ok(oazapfts.fetchJson<{
1076
- status: 200;
1077
- data: PaginatedResponseAdminCloudAccountDetails;
1078
- } | {
1079
- status: 422;
1080
- data: {
1081
- code: string;
1082
- status: number;
1083
- details: string;
1084
- validationDetails?: ValidationDetails[];
1085
- };
1086
- } | {
1087
- status: 500;
1088
- data: {
1089
- code: string;
1090
- status: number;
1091
- details: string;
1092
- validationDetails?: ValidationDetails[];
1093
- };
1094
- }>(`/admin/cloud-account${QS.query(QS.explode({
1095
- stackspotAccountId,
1096
- workspaceId,
1097
- environmentId,
1098
- provider,
1099
- "type": $type,
1100
- status
1101
- }))}`, {
1102
- ...opts
1103
- }));
1104
- }
1105
- /**
1106
- * Get Cloud Account by ID
1107
- */
1108
- export function getCloudAccountById1({ cloudAccountId }: {
1109
- cloudAccountId: string;
1110
- }, opts?: Oazapfts.RequestOpts) {
1111
- return oazapfts.ok(oazapfts.fetchJson<{
1112
- status: 200;
1113
- data: AdminCloudAccountDetails;
1114
- } | {
1115
- status: 422;
1116
- data: {
1117
- code: string;
1118
- status: number;
1119
- details: string;
1120
- validationDetails?: ValidationDetails[];
1121
- };
1122
- } | {
1123
- status: 500;
1124
- data: {
1125
- code: string;
1126
- status: number;
1127
- details: string;
1128
- validationDetails?: ValidationDetails[];
1129
- };
1130
- }>(`/admin/cloud-account/${encodeURIComponent(cloudAccountId)}`, {
1131
- ...opts
1132
- }));
1133
- }
1134
- /**
1135
- * Delete a cloud account.
1136
- */
1137
- export function deleteCloudAccountFromEnvironment({ jwtToken, stackspotCustomerIp, id }: {
1138
- jwtToken: JwtToken;
1139
- stackspotCustomerIp?: string;
1140
- id: string;
1141
- }, opts?: Oazapfts.RequestOpts) {
1142
- return oazapfts.ok(oazapfts.fetchJson<{
1143
- status: 200;
1144
- data: DeleteCloudAccountResponse;
1145
- } | {
1146
- status: 422;
1147
- data: {
1148
- code: string;
1149
- status: number;
1150
- details: string;
1151
- validationDetails?: ValidationDetails[];
1152
- };
1153
- } | {
1154
- status: 500;
1155
- data: {
1156
- code: string;
1157
- status: number;
1158
- details: string;
1159
- validationDetails?: ValidationDetails[];
1160
- };
1161
- }>(`/cloud-account/${encodeURIComponent(id)}${QS.query(QS.explode({
1162
- jwtToken
1163
- }))}`, {
1164
- ...opts,
1165
- method: "DELETE",
1166
- headers: oazapfts.mergeHeaders(opts?.headers, {
1167
- "stackspot-customer-ip": stackspotCustomerIp
1168
- })
1169
- }));
1170
- }
1171
- /**
1172
- *
1173
- * Delete all accounts in a workspace.
1174
- *
1175
- */
1176
- export function deleteManagedAccountsFromWorkspace({ jwtToken, stackspotCustomerIp, workspaceId }: {
1177
- jwtToken: JwtToken;
1178
- stackspotCustomerIp?: string;
1179
- workspaceId: string;
1180
- }, opts?: Oazapfts.RequestOpts) {
1181
- return oazapfts.ok(oazapfts.fetchJson<{
1182
- status: 200;
1183
- data: DeleteCloudAccountResponse;
1184
- } | {
1185
- status: 422;
1186
- data: {
1187
- code: string;
1188
- status: number;
1189
- details: string;
1190
- validationDetails?: ValidationDetails[];
1191
- };
1192
- } | {
1193
- status: 500;
1194
- data: {
1195
- code: string;
1196
- status: number;
1197
- details: string;
1198
- validationDetails?: ValidationDetails[];
1199
- };
1200
- }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}${QS.query(QS.explode({
1201
- jwtToken
1202
- }))}`, {
1203
- ...opts,
1204
- method: "DELETE",
1205
- headers: oazapfts.mergeHeaders(opts?.headers, {
1206
- "stackspot-customer-ip": stackspotCustomerIp
1207
- })
1208
- }));
1209
- }
1210
- /**
1211
- * Delete a relation between control tower and stackspot account
1212
- */
1213
- export function deleteAccountTower({ id }: {
1214
- id: string;
1215
- }, opts?: Oazapfts.RequestOpts) {
1216
- return oazapfts.ok(oazapfts.fetchJson<{
1217
- status: 200;
1218
- data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
1219
- } | {
1220
- status: 422;
1221
- data: {
1222
- code: string;
1223
- status: number;
1224
- details: string;
1225
- validationDetails?: ValidationDetails[];
1226
- };
1227
- } | {
1228
- status: 500;
1229
- data: {
1230
- code: string;
1231
- status: number;
1232
- details: string;
1233
- validationDetails?: ValidationDetails[];
1234
- };
1235
- }>(`/admin/managed-cloud/control-tower/${encodeURIComponent(id)}`, {
1236
- ...opts,
1237
- method: "DELETE"
1238
- }));
1239
- }
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://account-account-external-connections-api.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://account-account-external-connections-api.dev.stackspot.com"
16
+ };
17
+ export type JwtToken = {
18
+ rawToken: string;
19
+ email: string;
20
+ name: string;
21
+ stackSpotAccountId: string;
22
+ stackSpotAccountSlug: string;
23
+ isServiceToken: boolean;
24
+ };
25
+ export type JwtTokenWrite = {
26
+ authenticationHeader?: string;
27
+ rawToken: string;
28
+ email: string;
29
+ name: string;
30
+ stackSpotAccountId: string;
31
+ stackSpotAccountSlug: string;
32
+ isServiceToken: boolean;
33
+ };
34
+ export type CloudAccountCredential = object;
35
+ export type ConnectAccountRequestV2 = {
36
+ /** Environment ID */
37
+ environmentId: string;
38
+ /** Workspace ID */
39
+ workspaceId: string;
40
+ /** Cloud Provider */
41
+ provider: "AWS" | "Azure";
42
+ credential?: CloudAccountCredential;
43
+ };
44
+ export type CloudAccountDetails = {
45
+ /** Cloud Account ID */
46
+ id?: string;
47
+ /** Workspace ID */
48
+ workspaceId: string;
49
+ /** Workspace name */
50
+ workspaceName: string;
51
+ /** Environment ID */
52
+ environmentId: string;
53
+ /** Environment name */
54
+ environmentName: string;
55
+ /** Environment description */
56
+ environmentDescription: string;
57
+ /** Cloud Provider */
58
+ provider?: "AWS" | "Azure";
59
+ /** Cloud Provider Account ID */
60
+ providerAccountId?: string;
61
+ /** Cloud Account connection status */
62
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
63
+ /** Cloud Account type */
64
+ "type"?: "CustomCloud" | "CloudServices";
65
+ /** When not-null, it's the ID for a support case requesting the disconnection of this account */
66
+ activeDisconnectSupportCaseId?: string;
67
+ };
68
+ export type ValidationDetails = {
69
+ code: string;
70
+ field?: string;
71
+ details?: string;
72
+ values?: string[];
73
+ };
74
+ export type RegisterOfferRequest = {
75
+ stackspotAccountId: string;
76
+ cloudOffer: "Reseller" | "Managed" | "FullyManaged";
77
+ };
78
+ export type CloudAccountResponse = {
79
+ /** Cloud Account ID */
80
+ id: string;
81
+ /** Workspace name */
82
+ workspaceName: string;
83
+ /** Environment name */
84
+ environmentName: string;
85
+ /** Cloud Provider */
86
+ provider: "AWS" | "Azure";
87
+ /** Cloud Account connection status */
88
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
89
+ /** Cloud Account type */
90
+ "type": "CustomCloud" | "CloudServices";
91
+ /** Number Of Ips */
92
+ numberOfIps?: number;
93
+ /** Network Type */
94
+ networkType?: number;
95
+ };
96
+ export type PaginatedResourceCloudAccountResponse = {
97
+ data: CloudAccountResponse[];
98
+ nextPage?: number;
99
+ prevPage?: number;
100
+ totalPages: number;
101
+ };
102
+ export type ConnectAccountRequest = {
103
+ /** Environment ID */
104
+ environmentId: string;
105
+ /** Workspace ID */
106
+ workspaceId: string;
107
+ /** Cloud Provider */
108
+ provider: "AWS" | "Azure";
109
+ credential?: CloudAccountCredential;
110
+ /** IAM Role. Will be deprecated in future releases. */
111
+ iamRole?: string;
112
+ };
113
+ export type Ulid = {
114
+ value: string;
115
+ };
116
+ export type ManagedAccountProvisionRequest = {
117
+ workspaceId: Ulid;
118
+ /**
119
+ Network template ID to be setup in the provisioned accounts. See /cloud-account/managed-account/template for more info.
120
+ */
121
+ networkTypeId: number;
122
+ /**
123
+ Number of IPs to be allocated in the provisioned accounts. See /cloud-account/managed-account/template for more info.
124
+ */
125
+ numberOfIps: number;
126
+ };
127
+ export type DisconnectSupportCaseManagedAccountRequest = {
128
+ supportCaseId: number;
129
+ };
130
+ export type DisconnectSupportCaseManagedAccountResponse = {
131
+ cloudAccountId: Ulid;
132
+ stackspotAccountId: Ulid;
133
+ supportCaseId: number;
134
+ };
135
+ export type StackspotAccountTower = {
136
+ id: string;
137
+ stackspotAccountId: string;
138
+ towerId: string;
139
+ };
140
+ export type StackspotAccountTowerRequest = {
141
+ stackspotAccountId: string;
142
+ towerId: string;
143
+ };
144
+ export type CommonCreatedResponse = {
145
+ /** The created object ID */
146
+ id: string;
147
+ };
148
+ export type UpdateManagedInfoRequest = {
149
+ cloudAccountId: Ulid;
150
+ stackspotAccountId: Ulid;
151
+ /**
152
+ Sets the AWS region for the account.
153
+ */
154
+ region?: string;
155
+ /**
156
+ Sets the foundation name for the account.
157
+ */
158
+ foundationName?: string;
159
+ /**
160
+ Sets the environment name for the account.
161
+ */
162
+ environmentName?: string;
163
+ };
164
+ export type UpdatedCloudAccountResponse = {
165
+ cloudAccountId: Ulid;
166
+ stackspotAccountId: Ulid;
167
+ workspaceId: Ulid;
168
+ environmentId: Ulid;
169
+ cloudType: "CustomCloud" | "CloudServices";
170
+ cloudStatus: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
171
+ /**
172
+ The region associated with the Cloud Account. This fields only exists for AWS accounts of CloudServices type.
173
+ */
174
+ providerRegion?: string;
175
+ /**
176
+ The account's name inside the Foundation's organization. This fields only exists for AWS accounts of CloudServices type.
177
+ */
178
+ foundationName: string;
179
+ };
180
+ export type DisconnectCloudAccountRequest = {
181
+ cloudAccountId: Ulid;
182
+ stackspotAccountId: Ulid;
183
+ };
184
+ export type CloudAccountDetailsWithCredentialV2 = {
185
+ /** Cloud Account ID */
186
+ id: string;
187
+ /** Workspace ID */
188
+ workspaceId: string;
189
+ /** Environment ID */
190
+ environmentId: string;
191
+ /** Cloud Provider */
192
+ provider: "AWS" | "Azure";
193
+ /** Cloud Account type */
194
+ "type": "CustomCloud" | "CloudServices";
195
+ /** Cloud Account connection status */
196
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
197
+ /** Cloud Account credential identifier for Secret Manager */
198
+ credentialSecretIdentifier?: string;
199
+ };
200
+ export type AdminCloudAccountDetailsV2 = {
201
+ /** Cloud Account ID */
202
+ id: string;
203
+ /** Stackspot Account ID */
204
+ stackspotAccountId: string;
205
+ /** Workspace ID */
206
+ workspaceId: string;
207
+ /** Environment ID */
208
+ environmentId: string;
209
+ /** Environment Name (only available in CloudServices accounts ) */
210
+ environmentName?: string;
211
+ /** Cloud Provider that Cloud Account represents */
212
+ provider: "AWS" | "Azure";
213
+ /** Type of the Cloud Account (Custom Cloud or Cloud Services) */
214
+ "type": "CustomCloud" | "CloudServices";
215
+ /** Status of this Cloud Account. Connected indicates it's ready to use, others status are self explained */
216
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
217
+ /** The ID this account have in Cloud Provider */
218
+ cloudProviderAccountId?: string;
219
+ /** The name given in Cloud Provider for this account (only available in CloudServices accounts) */
220
+ cloudProviderAccountName?: string;
221
+ /** Linked Account ID */
222
+ linkedAccountId?: string;
223
+ /** This Cloud Account credentials secret manager */
224
+ credentialSecretIdentifier?: string;
225
+ /** ID of the Control Tower that Cloud Account is connected */
226
+ controlTowerId?: string;
227
+ /** Region of the Cloud Account provider */
228
+ region?: string;
229
+ };
230
+ export type PaginatedResponseAdminCloudAccountDetailsV2 = {
231
+ data: AdminCloudAccountDetailsV2[];
232
+ nextPage?: string;
233
+ prevPage?: string;
234
+ count: number;
235
+ };
236
+ export type HealthComponent = {
237
+ description?: string;
238
+ status?: string;
239
+ };
240
+ export type CloudOfferResponse = {
241
+ stackspotAccountId: string;
242
+ offer: "Reseller" | "Managed" | "FullyManaged";
243
+ };
244
+ export type CloudServicesAccountStatus = {
245
+ /** Cloud Account ID */
246
+ id: string;
247
+ /** Environment name */
248
+ environmentName: string;
249
+ /** Environment ID */
250
+ environmentId: string;
251
+ /** Status of the account in the workflow */
252
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
253
+ provider: "AWS" | "Azure";
254
+ /** Error code if the workflow for creating the account failed */
255
+ errorCode?: string;
256
+ };
257
+ export type Workflow = {
258
+ status: "UNDER_CHANGE" | "AVAILABLE" | "ERROR";
259
+ accounts: CloudServicesAccountStatus[];
260
+ supportCaseId?: string;
261
+ };
262
+ export type CloudAccountDetailsWithCredential = {
263
+ /** Cloud Account ID */
264
+ id: string;
265
+ /** Workspace ID */
266
+ workspaceId: string;
267
+ /** Environment ID */
268
+ environmentId: string;
269
+ /** Cloud Provider */
270
+ provider: "AWS" | "Azure";
271
+ /** Cloud Account type */
272
+ "type": "CustomCloud" | "CloudServices";
273
+ /** Role */
274
+ role: string;
275
+ /** Cloud Account connection status */
276
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
277
+ /** Cloud Account credential identifier for Secret Manager */
278
+ credentialSecretIdentifier?: string;
279
+ };
280
+ export type ManagedAccountTemplateResponse = {
281
+ id: number;
282
+ name: string;
283
+ minCountIps: number;
284
+ maxCountIps: number;
285
+ availableIpRange?: number[];
286
+ };
287
+ export type ManagedAccountRegionResponse = {
288
+ id: number;
289
+ name: string;
290
+ };
291
+ export type AdminCloudAccountDetails = {
292
+ /** Cloud Account ID */
293
+ id: string;
294
+ /** Stackspot Account ID */
295
+ stackspotAccountId: string;
296
+ /** Workspace ID */
297
+ workspaceId: string;
298
+ /** Environment ID */
299
+ environmentId: string;
300
+ /** Environment Name (only available in CloudServices accounts ) */
301
+ environmentName?: string;
302
+ /** Cloud Provider that Cloud Account represents */
303
+ provider: "AWS" | "Azure";
304
+ /** Type of the Cloud Account (Custom Cloud or Cloud Services) */
305
+ "type": "CustomCloud" | "CloudServices";
306
+ /** AWS Role that can be used for connecting in account */
307
+ role?: string;
308
+ /** Status of this Cloud Account. Connected indicates it's ready to use, others status are self explained */
309
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
310
+ /** The ID this account have in Cloud Provider */
311
+ cloudProviderAccountId?: string;
312
+ /** The name given in Cloud Provider for this account (only available in CloudServices accounts) */
313
+ cloudProviderAccountName?: string;
314
+ /** Linked Account ID */
315
+ linkedAccountId?: string;
316
+ /** This Cloud Account credentials secret manager */
317
+ credentialSecretIdentifier?: string;
318
+ /** ID of the Control Tower that Cloud Account is connected */
319
+ controlTowerId?: string;
320
+ /** Region of the Cloud Account provider */
321
+ region?: string;
322
+ };
323
+ export type PaginatedResponseAdminCloudAccountDetails = {
324
+ data: AdminCloudAccountDetails[];
325
+ nextPage?: string;
326
+ prevPage?: string;
327
+ count: number;
328
+ };
329
+ export type DeleteCloudAccountResponse = {
330
+ cloudAccountId: Ulid;
331
+ /** The type of the cloud account */
332
+ cloudType: "CustomCloud" | "CloudServices";
333
+ /** If the type is 'CloudServices', the delete operation opens a support case in order to delete the account */
334
+ supportCaseId?: string;
335
+ };
336
+ /**
337
+ * Connect a cloud account
338
+ */
339
+ export function createCloudAccount({ jwtToken, stackspotCustomerIp, connectAccountRequestV2 }: {
340
+ jwtToken: JwtToken;
341
+ stackspotCustomerIp?: string;
342
+ connectAccountRequestV2: ConnectAccountRequestV2;
343
+ }, opts?: Oazapfts.RequestOpts) {
344
+ return oazapfts.ok(oazapfts.fetchJson<{
345
+ status: 201;
346
+ data: CloudAccountDetails;
347
+ } | {
348
+ status: 422;
349
+ data: {
350
+ code: string;
351
+ status: number;
352
+ details: string;
353
+ validationDetails?: ValidationDetails[];
354
+ };
355
+ } | {
356
+ status: 500;
357
+ data: {
358
+ code: string;
359
+ status: number;
360
+ details: string;
361
+ validationDetails?: ValidationDetails[];
362
+ };
363
+ }>(`/v2/cloud-account${QS.query(QS.explode({
364
+ jwtToken
365
+ }))}`, oazapfts.json({
366
+ ...opts,
367
+ method: "POST",
368
+ body: connectAccountRequestV2,
369
+ headers: oazapfts.mergeHeaders(opts?.headers, {
370
+ "stackspot-customer-ip": stackspotCustomerIp
371
+ })
372
+ })));
373
+ }
374
+ /**
375
+ * Register a cloud offer for a Stackspot Account.
376
+ */
377
+ export function registerOffer({ registerOfferRequest }: {
378
+ registerOfferRequest: RegisterOfferRequest;
379
+ }, opts?: Oazapfts.RequestOpts) {
380
+ return oazapfts.ok(oazapfts.fetchJson<{
381
+ status: 201;
382
+ data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
383
+ } | {
384
+ status: 422;
385
+ data: {
386
+ code: string;
387
+ status: number;
388
+ details: string;
389
+ validationDetails?: ValidationDetails[];
390
+ };
391
+ } | {
392
+ status: 500;
393
+ data: {
394
+ code: string;
395
+ status: number;
396
+ details: string;
397
+ validationDetails?: ValidationDetails[];
398
+ };
399
+ }>("/cloud-offer", oazapfts.json({
400
+ ...opts,
401
+ method: "POST",
402
+ body: registerOfferRequest
403
+ })));
404
+ }
405
+ /**
406
+ * List all cloud accounts created for all workspaces
407
+ */
408
+ export function listCloudAccounts({ jwtToken, sortBy, sortOrder, filter, page, pageSize, $type, environment, status }: {
409
+ jwtToken: JwtToken;
410
+ sortBy?: string;
411
+ sortOrder?: string;
412
+ filter?: string;
413
+ page?: number;
414
+ pageSize?: number;
415
+ $type?: "CustomCloud" | "CloudServices";
416
+ environment?: string;
417
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
418
+ }, opts?: Oazapfts.RequestOpts) {
419
+ return oazapfts.ok(oazapfts.fetchJson<{
420
+ status: 200;
421
+ data: PaginatedResourceCloudAccountResponse;
422
+ } | {
423
+ status: 422;
424
+ data: {
425
+ code: string;
426
+ status: number;
427
+ details: string;
428
+ validationDetails?: ValidationDetails[];
429
+ };
430
+ } | {
431
+ status: 500;
432
+ data: {
433
+ code: string;
434
+ status: number;
435
+ details: string;
436
+ validationDetails?: ValidationDetails[];
437
+ };
438
+ }>(`/cloud-account${QS.query(QS.explode({
439
+ jwtToken,
440
+ sortBy,
441
+ sortOrder,
442
+ filter,
443
+ page,
444
+ pageSize,
445
+ "type": $type,
446
+ environment,
447
+ status
448
+ }))}`, {
449
+ ...opts
450
+ }));
451
+ }
452
+ /**
453
+ * Connect a cloud account
454
+ */
455
+ export function createCloudAccount1({ jwtToken, stackspotCustomerIp, connectAccountRequest }: {
456
+ jwtToken: JwtToken;
457
+ stackspotCustomerIp?: string;
458
+ connectAccountRequest: ConnectAccountRequest;
459
+ }, opts?: Oazapfts.RequestOpts) {
460
+ return oazapfts.ok(oazapfts.fetchJson<{
461
+ status: 201;
462
+ data: CloudAccountDetails;
463
+ } | {
464
+ status: 422;
465
+ data: {
466
+ code: string;
467
+ status: number;
468
+ details: string;
469
+ validationDetails?: ValidationDetails[];
470
+ };
471
+ } | {
472
+ status: 500;
473
+ data: {
474
+ code: string;
475
+ status: number;
476
+ details: string;
477
+ validationDetails?: ValidationDetails[];
478
+ };
479
+ }>(`/cloud-account${QS.query(QS.explode({
480
+ jwtToken
481
+ }))}`, oazapfts.json({
482
+ ...opts,
483
+ method: "POST",
484
+ body: connectAccountRequest,
485
+ headers: oazapfts.mergeHeaders(opts?.headers, {
486
+ "stackspot-customer-ip": stackspotCustomerIp
487
+ })
488
+ })));
489
+ }
490
+ /**
491
+ * Provision managed accounts in a workspace
492
+ */
493
+ export function provisionManagedAccountsForWorkspace({ jwtToken, stackspotCustomerIp, managedAccountProvisionRequest }: {
494
+ jwtToken: JwtToken;
495
+ stackspotCustomerIp?: string;
496
+ managedAccountProvisionRequest: ManagedAccountProvisionRequest;
497
+ }, opts?: Oazapfts.RequestOpts) {
498
+ return oazapfts.ok(oazapfts.fetchJson<{
499
+ status: 201;
500
+ data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
501
+ } | {
502
+ status: 422;
503
+ data: {
504
+ code: string;
505
+ status: number;
506
+ details: string;
507
+ validationDetails?: ValidationDetails[];
508
+ };
509
+ } | {
510
+ status: 500;
511
+ data: {
512
+ code: string;
513
+ status: number;
514
+ details: string;
515
+ validationDetails?: ValidationDetails[];
516
+ };
517
+ }>(`/cloud-account/managed-account${QS.query(QS.explode({
518
+ jwtToken
519
+ }))}`, oazapfts.json({
520
+ ...opts,
521
+ method: "POST",
522
+ body: managedAccountProvisionRequest,
523
+ headers: oazapfts.mergeHeaders(opts?.headers, {
524
+ "stackspot-customer-ip": stackspotCustomerIp
525
+ })
526
+ })));
527
+ }
528
+ /**
529
+ * Disconnect a Managed Account that was requested to disconnect via support case
530
+ */
531
+ export function disconnectCloudAccountRequestedForDisconnect({ disconnectSupportCaseManagedAccountRequest }: {
532
+ disconnectSupportCaseManagedAccountRequest: DisconnectSupportCaseManagedAccountRequest;
533
+ }, opts?: Oazapfts.RequestOpts) {
534
+ return oazapfts.ok(oazapfts.fetchJson<{
535
+ status: 200;
536
+ data: DisconnectSupportCaseManagedAccountResponse[];
537
+ } | {
538
+ status: 422;
539
+ data: {
540
+ code: string;
541
+ status: number;
542
+ details: string;
543
+ validationDetails?: ValidationDetails[];
544
+ };
545
+ } | {
546
+ status: 500;
547
+ data: {
548
+ code: string;
549
+ status: number;
550
+ details: string;
551
+ validationDetails?: ValidationDetails[];
552
+ };
553
+ }>("/admin/managed-cloud/support-case/disconnect", oazapfts.json({
554
+ ...opts,
555
+ method: "POST",
556
+ body: disconnectSupportCaseManagedAccountRequest
557
+ })));
558
+ }
559
+ /**
560
+ * Get all relation between stackspot accounts and control towers
561
+ */
562
+ export function getAllAccountTower({ stackspotAccountId }: {
563
+ stackspotAccountId?: string;
564
+ }, opts?: Oazapfts.RequestOpts) {
565
+ return oazapfts.ok(oazapfts.fetchJson<{
566
+ status: 200;
567
+ data: StackspotAccountTower[];
568
+ } | {
569
+ status: 422;
570
+ data: {
571
+ code: string;
572
+ status: number;
573
+ details: string;
574
+ validationDetails?: ValidationDetails[];
575
+ };
576
+ } | {
577
+ status: 500;
578
+ data: {
579
+ code: string;
580
+ status: number;
581
+ details: string;
582
+ validationDetails?: ValidationDetails[];
583
+ };
584
+ }>(`/admin/managed-cloud/control-tower${QS.query(QS.explode({
585
+ stackspotAccountId
586
+ }))}`, {
587
+ ...opts
588
+ }));
589
+ }
590
+ /**
591
+ * Add a Control Tower ID to a Stackspot Account that will be used in creation of a Managed Cloud Account
592
+ */
593
+ export function createAccountTower({ stackspotAccountTowerRequest }: {
594
+ stackspotAccountTowerRequest: StackspotAccountTowerRequest;
595
+ }, opts?: Oazapfts.RequestOpts) {
596
+ return oazapfts.ok(oazapfts.fetchJson<{
597
+ status: 201;
598
+ data: CommonCreatedResponse;
599
+ } | {
600
+ status: 422;
601
+ data: {
602
+ code: string;
603
+ status: number;
604
+ details: string;
605
+ validationDetails?: ValidationDetails[];
606
+ };
607
+ } | {
608
+ status: 500;
609
+ data: {
610
+ code: string;
611
+ status: number;
612
+ details: string;
613
+ validationDetails?: ValidationDetails[];
614
+ };
615
+ }>("/admin/managed-cloud/control-tower", oazapfts.json({
616
+ ...opts,
617
+ method: "POST",
618
+ body: stackspotAccountTowerRequest
619
+ })));
620
+ }
621
+ /**
622
+ *
623
+ * Updates Managed Account related information. If the account is of CustomCloud type, it changes to CloudServices
624
+ * (managed account type).
625
+ *
626
+ */
627
+ export function updateManagedInfo({ updateManagedInfoRequest }: {
628
+ updateManagedInfoRequest: UpdateManagedInfoRequest;
629
+ }, opts?: Oazapfts.RequestOpts) {
630
+ return oazapfts.ok(oazapfts.fetchJson<{
631
+ status: 200;
632
+ data: UpdatedCloudAccountResponse;
633
+ } | {
634
+ status: 422;
635
+ data: {
636
+ code: string;
637
+ status: number;
638
+ details: string;
639
+ validationDetails?: ValidationDetails[];
640
+ };
641
+ } | {
642
+ status: 500;
643
+ data: {
644
+ code: string;
645
+ status: number;
646
+ details: string;
647
+ validationDetails?: ValidationDetails[];
648
+ };
649
+ }>("/admin/cloud-account/update-managed-account", oazapfts.json({
650
+ ...opts,
651
+ method: "POST",
652
+ body: updateManagedInfoRequest
653
+ })));
654
+ }
655
+ /**
656
+ * Disconnect a Cloud Account
657
+ */
658
+ export function disconnectCloudAccountById({ disconnectCloudAccountRequest }: {
659
+ disconnectCloudAccountRequest: DisconnectCloudAccountRequest;
660
+ }, opts?: Oazapfts.RequestOpts) {
661
+ return oazapfts.ok(oazapfts.fetchJson<{
662
+ status: 200;
663
+ data: UpdatedCloudAccountResponse;
664
+ } | {
665
+ status: 422;
666
+ data: {
667
+ code: string;
668
+ status: number;
669
+ details: string;
670
+ validationDetails?: ValidationDetails[];
671
+ };
672
+ } | {
673
+ status: 500;
674
+ data: {
675
+ code: string;
676
+ status: number;
677
+ details: string;
678
+ validationDetails?: ValidationDetails[];
679
+ };
680
+ }>("/admin/cloud-account/disconnect", oazapfts.json({
681
+ ...opts,
682
+ method: "POST",
683
+ body: disconnectCloudAccountRequest
684
+ })));
685
+ }
686
+ /**
687
+ * Get a cloud account connected to a workspace environment
688
+ */
689
+ export function getCloudAccountByEnvironment({ accountId, workspaceId, environmentId }: {
690
+ accountId: string;
691
+ workspaceId: string;
692
+ environmentId: string;
693
+ }, opts?: Oazapfts.RequestOpts) {
694
+ return oazapfts.ok(oazapfts.fetchJson<{
695
+ status: 200;
696
+ data: CloudAccountDetailsWithCredentialV2;
697
+ } | {
698
+ status: 422;
699
+ data: {
700
+ code: string;
701
+ status: number;
702
+ details: string;
703
+ validationDetails?: ValidationDetails[];
704
+ };
705
+ } | {
706
+ status: 500;
707
+ data: {
708
+ code: string;
709
+ status: number;
710
+ details: string;
711
+ validationDetails?: ValidationDetails[];
712
+ };
713
+ }>(`/v2/cloud-account/workspace/${encodeURIComponent(workspaceId)}/environment/${encodeURIComponent(environmentId)}`, {
714
+ ...opts,
715
+ headers: oazapfts.mergeHeaders(opts?.headers, {
716
+ accountId
717
+ })
718
+ }));
719
+ }
720
+ /**
721
+ * Get a list of cloud accounts connected to a workspace
722
+ */
723
+ export function getCloudAccountByWorkspace({ jwtToken, accountId, id }: {
724
+ jwtToken: JwtToken;
725
+ accountId?: string;
726
+ id: string;
727
+ }, opts?: Oazapfts.RequestOpts) {
728
+ return oazapfts.ok(oazapfts.fetchJson<{
729
+ status: 200;
730
+ data: CloudAccountDetails[];
731
+ } | {
732
+ status: 422;
733
+ data: {
734
+ code: string;
735
+ status: number;
736
+ details: string;
737
+ validationDetails?: ValidationDetails[];
738
+ };
739
+ } | {
740
+ status: 500;
741
+ data: {
742
+ code: string;
743
+ status: number;
744
+ details: string;
745
+ validationDetails?: ValidationDetails[];
746
+ };
747
+ }>(`/v2/cloud-account/workspace/${encodeURIComponent(id)}${QS.query(QS.explode({
748
+ jwtToken
749
+ }))}`, {
750
+ ...opts,
751
+ headers: oazapfts.mergeHeaders(opts?.headers, {
752
+ accountId
753
+ })
754
+ }));
755
+ }
756
+ /**
757
+ * Get Cloud Account data with details
758
+ */
759
+ export function getCloudAccount({ stackspotAccountId, workspaceId, environmentId, provider, $type, status }: {
760
+ stackspotAccountId?: string;
761
+ workspaceId?: string;
762
+ environmentId?: string;
763
+ provider?: "AWS" | "Azure";
764
+ $type?: "CustomCloud" | "CloudServices";
765
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
766
+ }, opts?: Oazapfts.RequestOpts) {
767
+ return oazapfts.ok(oazapfts.fetchJson<{
768
+ status: 200;
769
+ data: PaginatedResponseAdminCloudAccountDetailsV2;
770
+ } | {
771
+ status: 422;
772
+ data: {
773
+ code: string;
774
+ status: number;
775
+ details: string;
776
+ validationDetails?: ValidationDetails[];
777
+ };
778
+ } | {
779
+ status: 500;
780
+ data: {
781
+ code: string;
782
+ status: number;
783
+ details: string;
784
+ validationDetails?: ValidationDetails[];
785
+ };
786
+ }>(`/v2/admin/cloud-account${QS.query(QS.explode({
787
+ stackspotAccountId,
788
+ workspaceId,
789
+ environmentId,
790
+ provider,
791
+ "type": $type,
792
+ status
793
+ }))}`, {
794
+ ...opts
795
+ }));
796
+ }
797
+ /**
798
+ * Get Cloud Account by ID
799
+ */
800
+ export function getCloudAccountById({ cloudAccountId }: {
801
+ cloudAccountId: string;
802
+ }, opts?: Oazapfts.RequestOpts) {
803
+ return oazapfts.ok(oazapfts.fetchJson<{
804
+ status: 200;
805
+ data: AdminCloudAccountDetailsV2;
806
+ } | {
807
+ status: 422;
808
+ data: {
809
+ code: string;
810
+ status: number;
811
+ details: string;
812
+ validationDetails?: ValidationDetails[];
813
+ };
814
+ } | {
815
+ status: 500;
816
+ data: {
817
+ code: string;
818
+ status: number;
819
+ details: string;
820
+ validationDetails?: ValidationDetails[];
821
+ };
822
+ }>(`/v2/admin/cloud-account/${encodeURIComponent(cloudAccountId)}`, {
823
+ ...opts
824
+ }));
825
+ }
826
+ export function healthz(opts?: Oazapfts.RequestOpts) {
827
+ return oazapfts.ok(oazapfts.fetchJson<{
828
+ status: 200;
829
+ data: HealthComponent;
830
+ } | {
831
+ status: 422;
832
+ data: {
833
+ code: string;
834
+ status: number;
835
+ details: string;
836
+ validationDetails?: ValidationDetails[];
837
+ };
838
+ } | {
839
+ status: 500;
840
+ data: {
841
+ code: string;
842
+ status: number;
843
+ details: string;
844
+ validationDetails?: ValidationDetails[];
845
+ };
846
+ }>("/healthz", {
847
+ ...opts
848
+ }));
849
+ }
850
+ /**
851
+ * Get the cloud offer of a Stackspot Account.
852
+ */
853
+ export function getOfferOfAccount({ id }: {
854
+ id: string;
855
+ }, opts?: Oazapfts.RequestOpts) {
856
+ return oazapfts.ok(oazapfts.fetchJson<{
857
+ status: 200;
858
+ data: CloudOfferResponse;
859
+ } | {
860
+ status: 422;
861
+ data: {
862
+ code: string;
863
+ status: number;
864
+ details: string;
865
+ validationDetails?: ValidationDetails[];
866
+ };
867
+ } | {
868
+ status: 500;
869
+ data: {
870
+ code: string;
871
+ status: number;
872
+ details: string;
873
+ validationDetails?: ValidationDetails[];
874
+ };
875
+ }>(`/cloud-offer/account/${encodeURIComponent(id)}`, {
876
+ ...opts
877
+ }));
878
+ }
879
+ /**
880
+ * Get the external-id for the given Cloud Account ID.
881
+ */
882
+ export function getCloudAccountExternalId({ cloudAccountId }: {
883
+ cloudAccountId: string;
884
+ }, opts?: Oazapfts.RequestOpts) {
885
+ return oazapfts.ok(oazapfts.fetchJson<{
886
+ status: 200;
887
+ data: string;
888
+ } | {
889
+ status: 422;
890
+ data: {
891
+ code: string;
892
+ status: number;
893
+ details: string;
894
+ validationDetails?: ValidationDetails[];
895
+ };
896
+ } | {
897
+ status: 500;
898
+ data: {
899
+ code: string;
900
+ status: number;
901
+ details: string;
902
+ validationDetails?: ValidationDetails[];
903
+ };
904
+ }>(`/cloud-account/${encodeURIComponent(cloudAccountId)}/external-id`, {
905
+ ...opts
906
+ }));
907
+ }
908
+ /**
909
+ * Get the cloud account workflow of a workspace environment
910
+ */
911
+ export function getProvisionWorkflowInWorkspace({ jwtToken, workspaceId }: {
912
+ jwtToken: JwtToken;
913
+ workspaceId: string;
914
+ }, opts?: Oazapfts.RequestOpts) {
915
+ return oazapfts.ok(oazapfts.fetchJson<{
916
+ status: 200;
917
+ data: Workflow;
918
+ } | {
919
+ status: 422;
920
+ data: {
921
+ code: string;
922
+ status: number;
923
+ details: string;
924
+ validationDetails?: ValidationDetails[];
925
+ };
926
+ } | {
927
+ status: 500;
928
+ data: {
929
+ code: string;
930
+ status: number;
931
+ details: string;
932
+ validationDetails?: ValidationDetails[];
933
+ };
934
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/workflow${QS.query(QS.explode({
935
+ jwtToken
936
+ }))}`, {
937
+ ...opts
938
+ }));
939
+ }
940
+ /**
941
+ * Get a cloud account connected to a workspace environment
942
+ */
943
+ export function getCloudAccountByEnvironment1({ accountId, workspaceId, environmentId }: {
944
+ accountId: string;
945
+ workspaceId: string;
946
+ environmentId: string;
947
+ }, opts?: Oazapfts.RequestOpts) {
948
+ return oazapfts.ok(oazapfts.fetchJson<{
949
+ status: 200;
950
+ data: CloudAccountDetailsWithCredential;
951
+ } | {
952
+ status: 422;
953
+ data: {
954
+ code: string;
955
+ status: number;
956
+ details: string;
957
+ validationDetails?: ValidationDetails[];
958
+ };
959
+ } | {
960
+ status: 500;
961
+ data: {
962
+ code: string;
963
+ status: number;
964
+ details: string;
965
+ validationDetails?: ValidationDetails[];
966
+ };
967
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/environment/${encodeURIComponent(environmentId)}`, {
968
+ ...opts,
969
+ headers: oazapfts.mergeHeaders(opts?.headers, {
970
+ accountId
971
+ })
972
+ }));
973
+ }
974
+ /**
975
+ * Get a list of cloud accounts connected to a workspace
976
+ */
977
+ export function getCloudAccountByWorkspace1({ jwtToken, accountId, id }: {
978
+ jwtToken: JwtToken;
979
+ accountId?: string;
980
+ id: string;
981
+ }, opts?: Oazapfts.RequestOpts) {
982
+ return oazapfts.ok(oazapfts.fetchJson<{
983
+ status: 200;
984
+ data: CloudAccountDetails[];
985
+ } | {
986
+ status: 422;
987
+ data: {
988
+ code: string;
989
+ status: number;
990
+ details: string;
991
+ validationDetails?: ValidationDetails[];
992
+ };
993
+ } | {
994
+ status: 500;
995
+ data: {
996
+ code: string;
997
+ status: number;
998
+ details: string;
999
+ validationDetails?: ValidationDetails[];
1000
+ };
1001
+ }>(`/cloud-account/workspace/${encodeURIComponent(id)}${QS.query(QS.explode({
1002
+ jwtToken
1003
+ }))}`, {
1004
+ ...opts,
1005
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1006
+ accountId
1007
+ })
1008
+ }));
1009
+ }
1010
+ /**
1011
+ * Get all available templates for Managed Cloud
1012
+ */
1013
+ export function getManagedCloudTemplate(opts?: Oazapfts.RequestOpts) {
1014
+ return oazapfts.ok(oazapfts.fetchJson<{
1015
+ status: 200;
1016
+ data: ManagedAccountTemplateResponse[];
1017
+ } | {
1018
+ status: 422;
1019
+ data: {
1020
+ code: string;
1021
+ status: number;
1022
+ details: string;
1023
+ validationDetails?: ValidationDetails[];
1024
+ };
1025
+ } | {
1026
+ status: 500;
1027
+ data: {
1028
+ code: string;
1029
+ status: number;
1030
+ details: string;
1031
+ validationDetails?: ValidationDetails[];
1032
+ };
1033
+ }>("/cloud-account/managed-account/template", {
1034
+ ...opts
1035
+ }));
1036
+ }
1037
+ /**
1038
+ * Get all available regions for Managed Cloud
1039
+ */
1040
+ export function getManagedCloudRegion(opts?: Oazapfts.RequestOpts) {
1041
+ return oazapfts.ok(oazapfts.fetchJson<{
1042
+ status: 200;
1043
+ data: ManagedAccountRegionResponse[];
1044
+ } | {
1045
+ status: 422;
1046
+ data: {
1047
+ code: string;
1048
+ status: number;
1049
+ details: string;
1050
+ validationDetails?: ValidationDetails[];
1051
+ };
1052
+ } | {
1053
+ status: 500;
1054
+ data: {
1055
+ code: string;
1056
+ status: number;
1057
+ details: string;
1058
+ validationDetails?: ValidationDetails[];
1059
+ };
1060
+ }>("/cloud-account/managed-account/region", {
1061
+ ...opts
1062
+ }));
1063
+ }
1064
+ /**
1065
+ * Get Cloud Account data with details
1066
+ */
1067
+ export function getCloudAccount1({ stackspotAccountId, workspaceId, environmentId, provider, $type, status }: {
1068
+ stackspotAccountId?: string;
1069
+ workspaceId?: string;
1070
+ environmentId?: string;
1071
+ provider?: "AWS" | "Azure";
1072
+ $type?: "CustomCloud" | "CloudServices";
1073
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
1074
+ }, opts?: Oazapfts.RequestOpts) {
1075
+ return oazapfts.ok(oazapfts.fetchJson<{
1076
+ status: 200;
1077
+ data: PaginatedResponseAdminCloudAccountDetails;
1078
+ } | {
1079
+ status: 422;
1080
+ data: {
1081
+ code: string;
1082
+ status: number;
1083
+ details: string;
1084
+ validationDetails?: ValidationDetails[];
1085
+ };
1086
+ } | {
1087
+ status: 500;
1088
+ data: {
1089
+ code: string;
1090
+ status: number;
1091
+ details: string;
1092
+ validationDetails?: ValidationDetails[];
1093
+ };
1094
+ }>(`/admin/cloud-account${QS.query(QS.explode({
1095
+ stackspotAccountId,
1096
+ workspaceId,
1097
+ environmentId,
1098
+ provider,
1099
+ "type": $type,
1100
+ status
1101
+ }))}`, {
1102
+ ...opts
1103
+ }));
1104
+ }
1105
+ /**
1106
+ * Get Cloud Account by ID
1107
+ */
1108
+ export function getCloudAccountById1({ cloudAccountId }: {
1109
+ cloudAccountId: string;
1110
+ }, opts?: Oazapfts.RequestOpts) {
1111
+ return oazapfts.ok(oazapfts.fetchJson<{
1112
+ status: 200;
1113
+ data: AdminCloudAccountDetails;
1114
+ } | {
1115
+ status: 422;
1116
+ data: {
1117
+ code: string;
1118
+ status: number;
1119
+ details: string;
1120
+ validationDetails?: ValidationDetails[];
1121
+ };
1122
+ } | {
1123
+ status: 500;
1124
+ data: {
1125
+ code: string;
1126
+ status: number;
1127
+ details: string;
1128
+ validationDetails?: ValidationDetails[];
1129
+ };
1130
+ }>(`/admin/cloud-account/${encodeURIComponent(cloudAccountId)}`, {
1131
+ ...opts
1132
+ }));
1133
+ }
1134
+ /**
1135
+ * Delete a cloud account.
1136
+ */
1137
+ export function deleteCloudAccountFromEnvironment({ jwtToken, stackspotCustomerIp, id }: {
1138
+ jwtToken: JwtToken;
1139
+ stackspotCustomerIp?: string;
1140
+ id: string;
1141
+ }, opts?: Oazapfts.RequestOpts) {
1142
+ return oazapfts.ok(oazapfts.fetchJson<{
1143
+ status: 200;
1144
+ data: DeleteCloudAccountResponse;
1145
+ } | {
1146
+ status: 422;
1147
+ data: {
1148
+ code: string;
1149
+ status: number;
1150
+ details: string;
1151
+ validationDetails?: ValidationDetails[];
1152
+ };
1153
+ } | {
1154
+ status: 500;
1155
+ data: {
1156
+ code: string;
1157
+ status: number;
1158
+ details: string;
1159
+ validationDetails?: ValidationDetails[];
1160
+ };
1161
+ }>(`/cloud-account/${encodeURIComponent(id)}${QS.query(QS.explode({
1162
+ jwtToken
1163
+ }))}`, {
1164
+ ...opts,
1165
+ method: "DELETE",
1166
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1167
+ "stackspot-customer-ip": stackspotCustomerIp
1168
+ })
1169
+ }));
1170
+ }
1171
+ /**
1172
+ *
1173
+ * Delete all accounts in a workspace.
1174
+ *
1175
+ */
1176
+ export function deleteManagedAccountsFromWorkspace({ jwtToken, stackspotCustomerIp, workspaceId }: {
1177
+ jwtToken: JwtToken;
1178
+ stackspotCustomerIp?: string;
1179
+ workspaceId: string;
1180
+ }, opts?: Oazapfts.RequestOpts) {
1181
+ return oazapfts.ok(oazapfts.fetchJson<{
1182
+ status: 200;
1183
+ data: DeleteCloudAccountResponse;
1184
+ } | {
1185
+ status: 422;
1186
+ data: {
1187
+ code: string;
1188
+ status: number;
1189
+ details: string;
1190
+ validationDetails?: ValidationDetails[];
1191
+ };
1192
+ } | {
1193
+ status: 500;
1194
+ data: {
1195
+ code: string;
1196
+ status: number;
1197
+ details: string;
1198
+ validationDetails?: ValidationDetails[];
1199
+ };
1200
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}${QS.query(QS.explode({
1201
+ jwtToken
1202
+ }))}`, {
1203
+ ...opts,
1204
+ method: "DELETE",
1205
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1206
+ "stackspot-customer-ip": stackspotCustomerIp
1207
+ })
1208
+ }));
1209
+ }
1210
+ /**
1211
+ * Delete a relation between control tower and stackspot account
1212
+ */
1213
+ export function deleteAccountTower({ id }: {
1214
+ id: string;
1215
+ }, opts?: Oazapfts.RequestOpts) {
1216
+ return oazapfts.ok(oazapfts.fetchJson<{
1217
+ status: 200;
1218
+ data: "100 CONTINUE" | "101 SWITCHING_PROTOCOLS" | "102 PROCESSING" | "103 EARLY_HINTS" | "103 CHECKPOINT" | "200 OK" | "201 CREATED" | "202 ACCEPTED" | "203 NON_AUTHORITATIVE_INFORMATION" | "204 NO_CONTENT" | "205 RESET_CONTENT" | "206 PARTIAL_CONTENT" | "207 MULTI_STATUS" | "208 ALREADY_REPORTED" | "226 IM_USED" | "300 MULTIPLE_CHOICES" | "301 MOVED_PERMANENTLY" | "302 FOUND" | "302 MOVED_TEMPORARILY" | "303 SEE_OTHER" | "304 NOT_MODIFIED" | "305 USE_PROXY" | "307 TEMPORARY_REDIRECT" | "308 PERMANENT_REDIRECT" | "400 BAD_REQUEST" | "401 UNAUTHORIZED" | "402 PAYMENT_REQUIRED" | "403 FORBIDDEN" | "404 NOT_FOUND" | "405 METHOD_NOT_ALLOWED" | "406 NOT_ACCEPTABLE" | "407 PROXY_AUTHENTICATION_REQUIRED" | "408 REQUEST_TIMEOUT" | "409 CONFLICT" | "410 GONE" | "411 LENGTH_REQUIRED" | "412 PRECONDITION_FAILED" | "413 PAYLOAD_TOO_LARGE" | "413 REQUEST_ENTITY_TOO_LARGE" | "414 URI_TOO_LONG" | "414 REQUEST_URI_TOO_LONG" | "415 UNSUPPORTED_MEDIA_TYPE" | "416 REQUESTED_RANGE_NOT_SATISFIABLE" | "417 EXPECTATION_FAILED" | "418 I_AM_A_TEAPOT" | "419 INSUFFICIENT_SPACE_ON_RESOURCE" | "420 METHOD_FAILURE" | "421 DESTINATION_LOCKED" | "422 UNPROCESSABLE_ENTITY" | "423 LOCKED" | "424 FAILED_DEPENDENCY" | "425 TOO_EARLY" | "426 UPGRADE_REQUIRED" | "428 PRECONDITION_REQUIRED" | "429 TOO_MANY_REQUESTS" | "431 REQUEST_HEADER_FIELDS_TOO_LARGE" | "451 UNAVAILABLE_FOR_LEGAL_REASONS" | "500 INTERNAL_SERVER_ERROR" | "501 NOT_IMPLEMENTED" | "502 BAD_GATEWAY" | "503 SERVICE_UNAVAILABLE" | "504 GATEWAY_TIMEOUT" | "505 HTTP_VERSION_NOT_SUPPORTED" | "506 VARIANT_ALSO_NEGOTIATES" | "507 INSUFFICIENT_STORAGE" | "508 LOOP_DETECTED" | "509 BANDWIDTH_LIMIT_EXCEEDED" | "510 NOT_EXTENDED" | "511 NETWORK_AUTHENTICATION_REQUIRED";
1219
+ } | {
1220
+ status: 422;
1221
+ data: {
1222
+ code: string;
1223
+ status: number;
1224
+ details: string;
1225
+ validationDetails?: ValidationDetails[];
1226
+ };
1227
+ } | {
1228
+ status: 500;
1229
+ data: {
1230
+ code: string;
1231
+ status: number;
1232
+ details: string;
1233
+ validationDetails?: ValidationDetails[];
1234
+ };
1235
+ }>(`/admin/managed-cloud/control-tower/${encodeURIComponent(id)}`, {
1236
+ ...opts,
1237
+ method: "DELETE"
1238
+ }));
1239
+ }