@stack-spot/portal-network 0.1.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 (186) hide show
  1. package/.generate-api.failed.json +1 -0
  2. package/dist/api/account.d.ts +2368 -0
  3. package/dist/api/account.d.ts.map +1 -0
  4. package/dist/api/account.js +1521 -0
  5. package/dist/api/account.js.map +1 -0
  6. package/dist/api/ai.d.ts +1432 -0
  7. package/dist/api/ai.d.ts.map +1 -0
  8. package/dist/api/ai.js +1342 -0
  9. package/dist/api/ai.js.map +1 -0
  10. package/dist/api/apiRuntime.d.ts +922 -0
  11. package/dist/api/apiRuntime.d.ts.map +1 -0
  12. package/dist/api/apiRuntime.js +599 -0
  13. package/dist/api/apiRuntime.js.map +1 -0
  14. package/dist/api/cloudAccount.d.ts +473 -0
  15. package/dist/api/cloudAccount.d.ts.map +1 -0
  16. package/dist/api/cloudAccount.js +300 -0
  17. package/dist/api/cloudAccount.js.map +1 -0
  18. package/dist/api/cloudServices.d.ts +1233 -0
  19. package/dist/api/cloudServices.d.ts.map +1 -0
  20. package/dist/api/cloudServices.js +715 -0
  21. package/dist/api/cloudServices.js.map +1 -0
  22. package/dist/api/insights.d.ts +123 -0
  23. package/dist/api/insights.d.ts.map +1 -0
  24. package/dist/api/insights.js +112 -0
  25. package/dist/api/insights.js.map +1 -0
  26. package/dist/api/plugin.d.ts +368 -0
  27. package/dist/api/plugin.d.ts.map +1 -0
  28. package/dist/api/plugin.js +218 -0
  29. package/dist/api/plugin.js.map +1 -0
  30. package/dist/api/serviceCatalog.d.ts +737 -0
  31. package/dist/api/serviceCatalog.d.ts.map +1 -0
  32. package/dist/api/serviceCatalog.js +611 -0
  33. package/dist/api/serviceCatalog.js.map +1 -0
  34. package/dist/api/workflows.d.ts +366 -0
  35. package/dist/api/workflows.d.ts.map +1 -0
  36. package/dist/api/workflows.js +175 -0
  37. package/dist/api/workflows.js.map +1 -0
  38. package/dist/api/workspace.js +1476 -0
  39. package/dist/api/workspace.js.map +1 -0
  40. package/dist/api/workspaceManager.d.ts +1121 -0
  41. package/dist/api/workspaceManager.d.ts.map +1 -0
  42. package/dist/api/workspaceManager.js +357 -0
  43. package/dist/api/workspaceManager.js.map +1 -0
  44. package/dist/api/workspaceSearchEngine.d.ts +93 -0
  45. package/dist/api/workspaceSearchEngine.d.ts.map +1 -0
  46. package/dist/api/workspaceSearchEngine.js +55 -0
  47. package/dist/api/workspaceSearchEngine.js.map +1 -0
  48. package/dist/apis.json +129 -0
  49. package/dist/client/account.d.ts +46 -0
  50. package/dist/client/account.d.ts.map +1 -0
  51. package/dist/client/account.js +104 -0
  52. package/dist/client/account.js.map +1 -0
  53. package/dist/error/CanceledError.d.ts +5 -0
  54. package/dist/error/CanceledError.d.ts.map +1 -0
  55. package/dist/error/CanceledError.js +7 -0
  56. package/dist/error/CanceledError.js.map +1 -0
  57. package/dist/error/DefaultAPIError.d.ts +9 -0
  58. package/dist/error/DefaultAPIError.d.ts.map +1 -0
  59. package/dist/error/DefaultAPIError.js +58 -0
  60. package/dist/error/DefaultAPIError.js.map +1 -0
  61. package/dist/error/StackspotAPIError.d.ts +19 -0
  62. package/dist/error/StackspotAPIError.d.ts.map +1 -0
  63. package/dist/error/StackspotAPIError.js +39 -0
  64. package/dist/error/StackspotAPIError.js.map +1 -0
  65. package/dist/error/dictionary/account.d.ts +55 -0
  66. package/dist/error/dictionary/account.d.ts.map +1 -0
  67. package/dist/error/dictionary/account.js +55 -0
  68. package/dist/error/dictionary/account.js.map +1 -0
  69. package/dist/error/dictionary/action.d.ts +163 -0
  70. package/dist/error/dictionary/action.d.ts.map +1 -0
  71. package/dist/error/dictionary/action.js +163 -0
  72. package/dist/error/dictionary/action.js.map +1 -0
  73. package/dist/error/dictionary/base.d.ts +21 -0
  74. package/dist/error/dictionary/base.d.ts.map +1 -0
  75. package/dist/error/dictionary/base.js +21 -0
  76. package/dist/error/dictionary/base.js.map +1 -0
  77. package/dist/error/dictionary/cnt-fields.d.ts +13 -0
  78. package/dist/error/dictionary/cnt-fields.d.ts.map +1 -0
  79. package/dist/error/dictionary/cnt-fields.js +13 -0
  80. package/dist/error/dictionary/cnt-fields.js.map +1 -0
  81. package/dist/error/dictionary/cnt.d.ts +79 -0
  82. package/dist/error/dictionary/cnt.d.ts.map +1 -0
  83. package/dist/error/dictionary/cnt.js +79 -0
  84. package/dist/error/dictionary/cnt.js.map +1 -0
  85. package/dist/error/dictionary/rte.d.ts +23 -0
  86. package/dist/error/dictionary/rte.d.ts.map +1 -0
  87. package/dist/error/dictionary/rte.js +23 -0
  88. package/dist/error/dictionary/rte.js.map +1 -0
  89. package/dist/error/dictionary/rtm.d.ts +9 -0
  90. package/dist/error/dictionary/rtm.d.ts.map +1 -0
  91. package/dist/error/dictionary/rtm.js +9 -0
  92. package/dist/error/dictionary/rtm.js.map +1 -0
  93. package/dist/error/dictionary/workspace-fields.d.ts +9 -0
  94. package/dist/error/dictionary/workspace-fields.d.ts.map +1 -0
  95. package/dist/error/dictionary/workspace-fields.js +9 -0
  96. package/dist/error/dictionary/workspace-fields.js.map +1 -0
  97. package/dist/error/dictionary/workspace.d.ts +99 -0
  98. package/dist/error/dictionary/workspace.d.ts.map +1 -0
  99. package/dist/error/dictionary/workspace.js +99 -0
  100. package/dist/error/dictionary/workspace.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +6 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/network/AutoMutation.d.ts +10 -0
  106. package/dist/network/AutoMutation.d.ts.map +1 -0
  107. package/dist/network/AutoMutation.js +20 -0
  108. package/dist/network/AutoMutation.js.map +1 -0
  109. package/dist/network/AutoOperation.d.ts +19 -0
  110. package/dist/network/AutoOperation.d.ts.map +1 -0
  111. package/dist/network/AutoOperation.js +99 -0
  112. package/dist/network/AutoOperation.js.map +1 -0
  113. package/dist/network/AutoQuery.d.ts +19 -0
  114. package/dist/network/AutoQuery.d.ts.map +1 -0
  115. package/dist/network/AutoQuery.js +70 -0
  116. package/dist/network/AutoQuery.js.map +1 -0
  117. package/dist/network/ManualMutation.d.ts +11 -0
  118. package/dist/network/ManualMutation.d.ts.map +1 -0
  119. package/dist/network/ManualMutation.js +32 -0
  120. package/dist/network/ManualMutation.js.map +1 -0
  121. package/dist/network/ManualOperation.d.ts +13 -0
  122. package/dist/network/ManualOperation.d.ts.map +1 -0
  123. package/dist/network/ManualOperation.js +53 -0
  124. package/dist/network/ManualOperation.js.map +1 -0
  125. package/dist/network/ManualQuery.d.ts +20 -0
  126. package/dist/network/ManualQuery.d.ts.map +1 -0
  127. package/dist/network/ManualQuery.js +77 -0
  128. package/dist/network/ManualQuery.js.map +1 -0
  129. package/dist/network/NetworkClient.d.ts +20 -0
  130. package/dist/network/NetworkClient.d.ts.map +1 -0
  131. package/dist/network/NetworkClient.js +85 -0
  132. package/dist/network/NetworkClient.js.map +1 -0
  133. package/dist/network/ReactQueryNetworkClient.d.ts +16 -0
  134. package/dist/network/ReactQueryNetworkClient.d.ts.map +1 -0
  135. package/dist/network/ReactQueryNetworkClient.js +125 -0
  136. package/dist/network/ReactQueryNetworkClient.js.map +1 -0
  137. package/dist/network/react-query-client.d.ts +3 -0
  138. package/dist/network/react-query-client.d.ts.map +1 -0
  139. package/dist/network/react-query-client.js +3 -0
  140. package/dist/network/react-query-client.js.map +1 -0
  141. package/dist/network/types.d.ts +55 -0
  142. package/dist/network/types.d.ts.map +1 -0
  143. package/dist/network/types.js +2 -0
  144. package/dist/network/types.js.map +1 -0
  145. package/package.json +56 -0
  146. package/readme.md +1 -0
  147. package/scripts/generate-apis.ts +134 -0
  148. package/src/api/account.ts +4793 -0
  149. package/src/api/ai.ts +3121 -0
  150. package/src/api/apiRuntime.ts +2029 -0
  151. package/src/api/cloudAccount.ts +1133 -0
  152. package/src/api/cloudServices.ts +2872 -0
  153. package/src/api/insights.ts +264 -0
  154. package/src/api/plugin.ts +685 -0
  155. package/src/api/serviceCatalog.ts +2908 -0
  156. package/src/api/workflows.ts +709 -0
  157. package/src/api/workspace.ts +5178 -0
  158. package/src/api/workspaceManager.ts +1516 -0
  159. package/src/api/workspaceSearchEngine.ts +153 -0
  160. package/src/apis.json +129 -0
  161. package/src/client/account.ts +52 -0
  162. package/src/error/CanceledError.ts +7 -0
  163. package/src/error/DefaultAPIError.ts +51 -0
  164. package/src/error/StackspotAPIError.ts +31 -0
  165. package/src/error/dictionary/account.ts +56 -0
  166. package/src/error/dictionary/action.ts +206 -0
  167. package/src/error/dictionary/base.ts +22 -0
  168. package/src/error/dictionary/cnt-fields.ts +14 -0
  169. package/src/error/dictionary/cnt.ts +80 -0
  170. package/src/error/dictionary/rte.ts +24 -0
  171. package/src/error/dictionary/rtm.ts +10 -0
  172. package/src/error/dictionary/workspace-fields.ts +10 -0
  173. package/src/error/dictionary/workspace.ts +100 -0
  174. package/src/index.ts +5 -0
  175. package/src/network/AutoMutation.ts +25 -0
  176. package/src/network/AutoOperation.ts +88 -0
  177. package/src/network/AutoQuery.ts +80 -0
  178. package/src/network/ManualMutation.ts +41 -0
  179. package/src/network/ManualOperation.ts +55 -0
  180. package/src/network/ManualQuery.ts +93 -0
  181. package/src/network/NetworkClient.ts +93 -0
  182. package/src/network/ReactQueryNetworkClient.ts +154 -0
  183. package/src/network/react-query-client.ts +3 -0
  184. package/src/network/types.ts +82 -0
  185. package/tsconfig.build.json +4 -0
  186. package/tsconfig.json +10 -0
@@ -0,0 +1,2872 @@
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-services-cloud-services-api.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://cloud-services-cloud-services-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
+ ipSource?: string;
24
+ isServiceToken: boolean;
25
+ };
26
+ export type JwtTokenWrite = {
27
+ authenticationHeader?: string;
28
+ rawToken: string;
29
+ email: string;
30
+ name: string;
31
+ stackSpotAccountId: string;
32
+ stackSpotAccountSlug: string;
33
+ ipSource?: string;
34
+ isServiceToken: boolean;
35
+ };
36
+ export type Attachment = {
37
+ id: string;
38
+ filename: string;
39
+ resourceUrl: string;
40
+ contentType: string;
41
+ };
42
+ export type CaseComment = {
43
+ /** Name of the author of the comment. */
44
+ authorName: string;
45
+ /** Email of the author of the comment. */
46
+ authorEmail: string;
47
+ /** URL to the author's avatar. */
48
+ authorPhotoURL?: string;
49
+ /** The comment text. */
50
+ text: string;
51
+ createdAt: string;
52
+ attachments: Attachment[];
53
+ };
54
+ export type Case = {
55
+ /** Unique identifier for the case. */
56
+ id: string;
57
+ /** The case type. */
58
+ "type": "AccountAndBilling" | "Technical";
59
+ /** The case status. An user may cancel a ticket if the status is 'open'. */
60
+ status: string;
61
+ /** The StackSpot service related to the case. */
62
+ service: string;
63
+ category: string;
64
+ severity: string;
65
+ /** The case subject. */
66
+ subject?: string;
67
+ /** The list of comments in the case. */
68
+ comment: CaseComment[];
69
+ createdAt: string;
70
+ };
71
+ export type ValidationDetails = {
72
+ code: string;
73
+ field?: string;
74
+ details?: string;
75
+ values?: string[];
76
+ };
77
+ export type CreateCaseComment = {
78
+ /** The comment's text */
79
+ text: string;
80
+ attachmentIds: string[];
81
+ };
82
+ export type CaseUpdate = {
83
+ /** Case severity */
84
+ severity?: string;
85
+ comment?: CreateCaseComment;
86
+ /** Update the case status. The user may only update the status if the case is 'open'. */
87
+ status?: string;
88
+ };
89
+ export type SavingPlanComment = {
90
+ /** Name of the author of the comment. */
91
+ authorName: string;
92
+ /** Email of the author of the comment. */
93
+ authorEmail: string;
94
+ /** URL to the author's avatar. */
95
+ authorPhotoURL?: string;
96
+ /** The comment text. */
97
+ text: string;
98
+ createdAt: string;
99
+ };
100
+ export type SavingPlan = {
101
+ /** Unique identifier for the saving plan. */
102
+ id: number;
103
+ /** The saving plan status. */
104
+ status: string;
105
+ /** The saving plan type. */
106
+ savingPlanType: "SavingPlan" | "ReservedInstances";
107
+ /** The list of comments in the saving plan. */
108
+ comment: SavingPlanComment[];
109
+ };
110
+ export type CreateSavingPlanComment = {
111
+ /** The comment's text */
112
+ text: string;
113
+ };
114
+ export type SavingPlanUpdate = {
115
+ comment?: CreateSavingPlanComment;
116
+ /** Update saving plan status. */
117
+ status?: string;
118
+ };
119
+ export type GuardrailUpdate = {
120
+ /** The ID of GuardRail that will be updated */
121
+ id: string;
122
+ /** The GuardRail title */
123
+ title?: string;
124
+ /** A description explaining what GuardRail do */
125
+ description?: string;
126
+ /** Indicates if GuardRail is active to users use it */
127
+ active?: boolean;
128
+ /** Indicates if GuardRail is configurable for user */
129
+ configurable?: boolean;
130
+ /** Type of implementation */
131
+ implementation?: "RECOMENDATION" | "MANDATORY";
132
+ /** Type of action taken by GuardRail */
133
+ action?: "REMEDIATION" | "NOTIFICATION" | "NOT_IMPLEMENTED";
134
+ /** The type of GuardRail. [SCP, GUARDRAIL] */
135
+ "type"?: "SCP" | "GUARDRAIL";
136
+ };
137
+ export type GuardrailRequest = {
138
+ /** The baseline id that GuardRail belongs */
139
+ baselineId: string;
140
+ /** The GuardRail title */
141
+ title: string;
142
+ /** A description explaining what GuardRail do */
143
+ description: string;
144
+ /** Indicates if GuardRail is active to users use it */
145
+ active: boolean;
146
+ /** Indicates if GuardRail is configurable for user */
147
+ configurable: boolean;
148
+ /** Type of implementation */
149
+ implementation: "RECOMENDATION" | "MANDATORY";
150
+ /** Type of action taken by GuardRail */
151
+ action: "REMEDIATION" | "NOTIFICATION" | "NOT_IMPLEMENTED";
152
+ /** The type of GuardRail. [SCP, GUARDRAIL] */
153
+ "type": "SCP" | "GUARDRAIL";
154
+ };
155
+ export type GuardrailDetails = {
156
+ /** The guardrail ID */
157
+ id: string;
158
+ };
159
+ export type BaselineUpdate = {
160
+ /** The baseline title */
161
+ title: string;
162
+ /** The date when that Baseline was published */
163
+ publishedAt?: string;
164
+ /** Status of the baseline, if it's published or a draft */
165
+ status?: string;
166
+ };
167
+ export type BillingAccountSummaryResponse = {
168
+ /** ULID identifier for each billing account. */
169
+ id: string;
170
+ /** Slug identifier for each billing account. */
171
+ name: string;
172
+ /** StackSpot's ULID identifier for each client. */
173
+ stackSpotAccountId: string;
174
+ };
175
+ export type BillingAccountRequest = {
176
+ /** Slug identifier for each billing account. */
177
+ name: string;
178
+ /** StackSpot's ULID identifier for each client. */
179
+ stackSpotAccountId: string;
180
+ /** The AWS S3 bucket name used for CUR (Cost and Usage Report). */
181
+ awsCurBucketName: string;
182
+ /** The AWS region where the CUR bucket is located. */
183
+ awsCurBucketRegion: string;
184
+ /** The name of the AWS CUR report. */
185
+ awsCurReportName: string;
186
+ /** The prefix used in the AWS CUR bucket for reports. */
187
+ awsCurPrefix: string;
188
+ /** The AWS IAM Role ARN with permissions to access CUR data. */
189
+ awsRoleArn: string;
190
+ /** The AWS Secret Manager secret ARN containing the External ID. */
191
+ awsSecretIdArn: string;
192
+ };
193
+ export type BillingAccountDetailsResponse = {
194
+ /** ULID identifier for each billing account. */
195
+ id: string;
196
+ /** Slug identifier for each billing account. */
197
+ name: string;
198
+ /** StackSpot's ULID identifier for each client. */
199
+ stackSpotAccountId: string;
200
+ /** The AWS S3 bucket name used for CUR (Cost and Usage Report). */
201
+ awsCurBucketName: string;
202
+ /** The AWS region where the CUR bucket is located. */
203
+ awsCurBucketRegion: string;
204
+ /** The name of the AWS CUR report. */
205
+ awsCurReportName: string;
206
+ /** The prefix used in the AWS CUR bucket for reports. */
207
+ awsCurPrefix: string;
208
+ /** The AWS IAM Role ARN with permissions to access CUR data. */
209
+ awsRoleArn: string;
210
+ /** The AWS Secret Manager secret ARN containing the External ID. */
211
+ awsSecretIdArn?: string;
212
+ /** Timestamp of when the billing account was marked as deleted. */
213
+ deletedAt?: string;
214
+ /** Timestamp of when the billing account was created. */
215
+ createdAt: string;
216
+ /** Timestamp of the last update to the billing account. */
217
+ updatedAt: string;
218
+ };
219
+ export type Ulid = {
220
+ value: string;
221
+ };
222
+ export type Filter = {
223
+ /** A categorical attribute for context or categorization in billing data. */
224
+ "type": "REGION" | "SERVICE_NAME" | "SUB_ACCOUNT_ID" | "TAG_KEY" | "TAG_VALUE";
225
+ /** Defines the exact value the filter will look for within the specified type. */
226
+ value: string;
227
+ };
228
+ export type ChargePeriod = {
229
+ /** Represents the end date of the charge period. */
230
+ end: string;
231
+ /** Represents the end date of the charge period. */
232
+ start: string;
233
+ };
234
+ export type AllocationCostRequest = {
235
+ stackSpotAccountId: Ulid;
236
+ /** StackSpot-assigned ULID identifiers for a billing account. */
237
+ billingAccountId: Ulid[];
238
+ /** StackSpot-assigned ULID identifiers for a billing account. */
239
+ filter: Filter[];
240
+ /** Defines the row's time-based granularity. */
241
+ granularity: "PERIOD" | "MONTH";
242
+ /** A categorical attribute that provides context or categorization to billing data. */
243
+ dimension: "SERVICE_NAME" | "TAG" | "USAGE_UNIT";
244
+ chargePeriod: ChargePeriod;
245
+ };
246
+ export type ServiceNameResponse = GetCostAndUsageData & {
247
+ chargePeriod?: ChargePeriod;
248
+ /** Represents an offering that can be purchased from a cloud provider. */
249
+ serviceName?: string;
250
+ /** Effective cost post discounts and amortizations. */
251
+ effectiveCost?: number;
252
+ };
253
+ export type TagResponse = GetCostAndUsageData & {
254
+ chargePeriod?: ChargePeriod;
255
+ /** Tag key: Identifies a grouping attribute or category for resources or constructs. */
256
+ tagKey?: string;
257
+ /** Tag value: Specifies the group or category detail that the resource or construct belongs to. */
258
+ tagValue?: string;
259
+ /** Effective cost post discounts and amortizations. */
260
+ effectiveCost?: number;
261
+ };
262
+ export type UsageUnitResponse = GetCostAndUsageData & {
263
+ chargePeriod?: ChargePeriod;
264
+ /** Represents an offering that can be purchased from a cloud provider. */
265
+ serviceName?: string;
266
+ /** Represents the volume of a given resource or service used or purchased based on the Usage Unit. */
267
+ usageQuantity?: number;
268
+ /** Defines the unit of measurement for the resource or service. */
269
+ usageUnit?: string;
270
+ /** Effective cost post discounts and amortizations. */
271
+ effectiveCost?: number;
272
+ };
273
+ export type GetCostAndUsageData = ({
274
+ "type": "ServiceNameResponse";
275
+ } & ServiceNameResponse) | ({
276
+ "type": "TagResponse";
277
+ } & TagResponse) | ({
278
+ "type": "UsageUnitResponse";
279
+ } & UsageUnitResponse);
280
+ export type AllocationCostResponse = {
281
+ /** Unique identifier for the task, used for tracking and retrieval. */
282
+ id: string;
283
+ /** Current status of the task, indicating its lifecycle phase. */
284
+ status: "PROCESSING" | "SUCCESS" | "ERROR";
285
+ /** Contains processed data, available when status is SUCCESS. */
286
+ data: GetCostAndUsageData[];
287
+ /** Optional details on processing status, providing task insights or error explanations. */
288
+ message: string;
289
+ };
290
+ export type ProblemDetail = {
291
+ "type"?: string;
292
+ title?: string;
293
+ status?: number;
294
+ detail?: string;
295
+ instance?: string;
296
+ properties?: {
297
+ [key: string]: object;
298
+ };
299
+ };
300
+ export type CaseSummary = {
301
+ /** Unique case identifier. */
302
+ id: number;
303
+ /** The case status. */
304
+ status: string;
305
+ /** The case severity. */
306
+ severity: string;
307
+ /** The case subject. */
308
+ subject: string;
309
+ createdAt: string;
310
+ /** The requester email. */
311
+ requesterEmail: string;
312
+ };
313
+ export type ListCasesResponse = {
314
+ data: CaseSummary[];
315
+ nextPage?: string;
316
+ prevPage?: string;
317
+ count: number;
318
+ visibility: "AccountLevel" | "UserLevel";
319
+ };
320
+ export type CaseRequest = {
321
+ /** The case type */
322
+ "type": "AccountAndBilling" | "Technical";
323
+ /** StackSpot managed service name that is related to the case */
324
+ service: string;
325
+ /** Case category */
326
+ category: string;
327
+ /** Case severity */
328
+ severity: string;
329
+ comment: CreateCaseComment;
330
+ };
331
+ export type AttachmentUpload = {
332
+ upload: Blob;
333
+ filename: string;
334
+ contentType: string;
335
+ };
336
+ export type SavingPlanSummary = {
337
+ /** Unique identifier for the saving plan. */
338
+ id: number;
339
+ /** The saving plan status. */
340
+ status: string;
341
+ /** The saving plan type. */
342
+ savingPlanType: "SavingPlan" | "ReservedInstances";
343
+ };
344
+ export type PaginatedResourceSavingPlanSummary = {
345
+ data: SavingPlanSummary[];
346
+ nextPage?: number;
347
+ prevPage?: number;
348
+ count: number;
349
+ };
350
+ export type SavingPlanRequest = {
351
+ /** The saving plan type. */
352
+ savingPlanType: "SavingPlan" | "ReservedInstances";
353
+ };
354
+ export type RegisterOfferRequest = {
355
+ stackspotAccountId: string;
356
+ cloudOffer: "Reseller" | "Managed" | "FullyManaged";
357
+ };
358
+ export type CloudAccountResponse = {
359
+ /** Cloud Account ID */
360
+ id: string;
361
+ /** Workspace name */
362
+ workspaceName: string;
363
+ /** Environment name */
364
+ environmentName: string;
365
+ /** Cloud Provider */
366
+ provider: "AWS" | "Azure";
367
+ /** Cloud Account connection status */
368
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
369
+ /** Cloud Account type */
370
+ "type": "CustomCloud" | "CloudServices";
371
+ /** Number Of Ips */
372
+ numberOfIps?: number;
373
+ /** Network Type */
374
+ networkType?: number;
375
+ };
376
+ export type PaginatedResourceCloudAccountResponse = {
377
+ data: CloudAccountResponse[];
378
+ nextPage?: number;
379
+ prevPage?: number;
380
+ totalPages: number;
381
+ };
382
+ export type CloudAccountCredential = object;
383
+ export type ConnectAccountRequest = {
384
+ /** Environment ID */
385
+ environmentId: string;
386
+ /** Workspace ID */
387
+ workspaceId: string;
388
+ /** Cloud Provider */
389
+ provider: "AWS" | "Azure";
390
+ credential?: CloudAccountCredential;
391
+ /** IAM Role. Will be deprecated in future releases. */
392
+ iamRole?: string;
393
+ };
394
+ export type CloudAccountDetails = {
395
+ /** Cloud Account ID */
396
+ id?: string;
397
+ /** Workspace ID */
398
+ workspaceId: string;
399
+ /** Workspace name */
400
+ workspaceName: string;
401
+ /** Environment ID */
402
+ environmentId: string;
403
+ /** Environment name */
404
+ environmentName: string;
405
+ /** Environment description */
406
+ environmentDescription: string;
407
+ /** Cloud Provider */
408
+ provider?: "AWS" | "Azure";
409
+ /** Cloud Provider Account ID */
410
+ providerAccountId?: string;
411
+ /** Cloud Account connection status */
412
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
413
+ /** Cloud Account type */
414
+ "type"?: "CustomCloud" | "CloudServices";
415
+ /** When not-null, it's the ID for a support case requesting the disconnection of this account */
416
+ activeDisconnectSupportCaseId?: string;
417
+ };
418
+ export type ManagedAccountProvisionRequest = {
419
+ workspaceId: Ulid;
420
+ /**
421
+ Network template ID to be setup in the provisioned accounts. See /cloud-account/managed-account/template for more info.
422
+ */
423
+ networkTypeId: number;
424
+ /**
425
+ Number of IPs to be allocated in the provisioned accounts. See /cloud-account/managed-account/template for more info.
426
+ */
427
+ numberOfIps: number;
428
+ };
429
+ export type DisconnectSupportCaseManagedAccountRequest = {
430
+ supportCaseId: number;
431
+ };
432
+ export type DisconnectSupportCaseManagedAccountResponse = {
433
+ cloudAccountId: Ulid;
434
+ stackspotAccountId: Ulid;
435
+ supportCaseId: number;
436
+ };
437
+ export type StackspotAccountTower = {
438
+ id: string;
439
+ stackspotAccountId: string;
440
+ towerId: string;
441
+ };
442
+ export type StackspotAccountTowerRequest = {
443
+ stackspotAccountId: string;
444
+ towerId: string;
445
+ };
446
+ export type CommonCreatedResponse = {
447
+ /** The created object ID */
448
+ id: string;
449
+ };
450
+ export type CreateContractRequest = {
451
+ stackSpotAccountId: Ulid;
452
+ factor: number;
453
+ startDate: string;
454
+ };
455
+ export type Contract = {
456
+ id: string;
457
+ stackSpotAccountId: string;
458
+ factor: number;
459
+ startDate: string;
460
+ };
461
+ export type LinkResourceTypeToStackspotAccountRequest = {
462
+ stackspotAccountId: Ulid;
463
+ serviceIds: Ulid[];
464
+ };
465
+ export type UpdateManagedInfoRequest = {
466
+ cloudAccountId: Ulid;
467
+ stackspotAccountId: Ulid;
468
+ /**
469
+ Sets the AWS region for the account.
470
+ */
471
+ region?: string;
472
+ /**
473
+ Sets the foundation name for the account.
474
+ */
475
+ foundationName?: string;
476
+ /**
477
+ Sets the environment name for the account.
478
+ */
479
+ environmentName?: string;
480
+ };
481
+ export type UpdatedCloudAccountResponse = {
482
+ cloudAccountId: Ulid;
483
+ stackspotAccountId: Ulid;
484
+ workspaceId: Ulid;
485
+ environmentId: Ulid;
486
+ cloudType: "CustomCloud" | "CloudServices";
487
+ cloudStatus: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
488
+ /**
489
+ The region associated with the Cloud Account. This fields only exists for AWS accounts of CloudServices type.
490
+ */
491
+ providerRegion?: string;
492
+ /**
493
+ The account's name inside the Foundation's organization. This fields only exists for AWS accounts of CloudServices type.
494
+ */
495
+ foundationName: string;
496
+ };
497
+ export type DisconnectCloudAccountRequest = {
498
+ cloudAccountId: Ulid;
499
+ stackspotAccountId: Ulid;
500
+ };
501
+ export type BaselineResponse = {
502
+ /** The ID of baseline that will be updated */
503
+ id: string;
504
+ /** The baseline title */
505
+ title: string;
506
+ /** The date when that Baseline was published */
507
+ publishedAt?: string;
508
+ /** Status of the baseline, if it's published or a draft */
509
+ status?: string;
510
+ };
511
+ export type BaselineRequest = {
512
+ /** The baseline title */
513
+ title: string;
514
+ /** The date when that Baseline was published */
515
+ publishedAt?: string;
516
+ /** Status of the baseline, if it's published or a draft */
517
+ status?: string;
518
+ };
519
+ export type BaselineDetails = {
520
+ /** The baseline ID */
521
+ id: string;
522
+ };
523
+ export type SupportFormFieldOption = {
524
+ name: string;
525
+ value: string;
526
+ };
527
+ export type SupportFormFieldData = {
528
+ service: SupportFormFieldOption[];
529
+ category: SupportFormFieldOption[];
530
+ };
531
+ export type SupportFormFieldResponse = {
532
+ accountAndBilling: SupportFormFieldData;
533
+ technical: SupportFormFieldData;
534
+ severity: SupportFormFieldOption[];
535
+ };
536
+ export type AttachmentBase64 = {
537
+ filename: string;
538
+ base64: string;
539
+ contentType: string;
540
+ };
541
+ export type HealthComponent = {
542
+ description?: string;
543
+ status?: string;
544
+ };
545
+ export type GuardrailStatusResponse = {
546
+ /** The baseline id that GuardRail belongs */
547
+ baselineId: string;
548
+ /** The guardrail id */
549
+ guardrailId: string;
550
+ /** The GuardRail title */
551
+ title: string;
552
+ /** A description explaining what GuardRail do */
553
+ description: string;
554
+ /** Indicates if GuardRail is configurable for user */
555
+ configurable: boolean;
556
+ /** Implementation type of Guardrail */
557
+ implementation: "RECOMENDATION" | "MANDATORY";
558
+ /** Action taken by the Guardrail */
559
+ action: "REMEDIATION" | "NOTIFICATION" | "NOT_IMPLEMENTED";
560
+ /** Indicates if GuardRail is enabled */
561
+ enabled: boolean;
562
+ };
563
+ export type GroupedGuardrailResponse = {
564
+ /** The baseline id that GuardRail belongs */
565
+ baselineId: string;
566
+ /** The baseline title that GuardRail belongs */
567
+ baselineTitle: string;
568
+ /** All GuardRails attached to a Baseline */
569
+ guardrails: GuardrailStatusResponse[];
570
+ };
571
+ export type DailyCostSummary = {
572
+ date: string;
573
+ cost: number;
574
+ };
575
+ export type CostByWorkspace = {
576
+ /** Title of the workspace. */
577
+ workspaceName: string;
578
+ /** Cost associated with the workspace. */
579
+ cost: number;
580
+ };
581
+ export type CostOverview = {
582
+ /** Costs from the current month. */
583
+ currentMonth: number;
584
+ /** Costs from the last month. */
585
+ lastMonth: number;
586
+ /** Costs from the past three months. */
587
+ lastThreeMonths: number;
588
+ currentMonthAverage: number;
589
+ currentMonthDaily: DailyCostSummary[];
590
+ costByWorkspace: CostByWorkspace[];
591
+ };
592
+ export type AllocationCost = {
593
+ name: string;
594
+ costValue: number;
595
+ };
596
+ export type PaginatedResponseAllocationCost = {
597
+ data: AllocationCost[];
598
+ nextPage?: string;
599
+ prevPage?: string;
600
+ count: number;
601
+ };
602
+ export type AllocationCostDetails = {
603
+ serviceName: string;
604
+ stackSpotUsageType: string;
605
+ quantity: number;
606
+ costValue: number;
607
+ };
608
+ export type PaginatedResponseAllocationCostDetails = {
609
+ data: AllocationCostDetails[];
610
+ nextPage?: string;
611
+ prevPage?: string;
612
+ count: number;
613
+ };
614
+ export type ManagedResource = {
615
+ /** Unique identifier. */
616
+ id: string;
617
+ /** The resource name. */
618
+ name: string;
619
+ cloudAccountId: string;
620
+ cloudProviderRegion: string;
621
+ /** The environment type. */
622
+ environmentName: string;
623
+ /** Created at. */
624
+ createdAt?: string;
625
+ /** The resource status. */
626
+ status?: "Up" | "Down" | "Starting" | "Unknown";
627
+ };
628
+ export type ManagedResourceList = {
629
+ data: ManagedResource[];
630
+ pageToken?: string;
631
+ };
632
+ export type ServiceResource = {
633
+ id: Ulid;
634
+ /** The service resource name */
635
+ name: string;
636
+ };
637
+ export type ManagedService = {
638
+ /** Unique identifier. */
639
+ id: string;
640
+ /** The service name. */
641
+ name: string;
642
+ /** List of resources. */
643
+ resources: ServiceResource[];
644
+ };
645
+ export type CloudOfferResponse = {
646
+ stackspotAccountId: string;
647
+ offer: "Reseller" | "Managed" | "FullyManaged";
648
+ };
649
+ export type CloudServicesAccountStatus = {
650
+ /** Cloud Account ID */
651
+ id: string;
652
+ /** Environment name */
653
+ environmentName: string;
654
+ /** Environment ID */
655
+ environmentId: string;
656
+ /** Status of the account in the workflow */
657
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
658
+ provider: "AWS" | "Azure";
659
+ /** Error code if the workflow for creating the account failed */
660
+ errorCode?: string;
661
+ };
662
+ export type Workflow = {
663
+ status: "UNDER_CHANGE" | "AVAILABLE" | "ERROR";
664
+ accounts: CloudServicesAccountStatus[];
665
+ supportCaseId?: string;
666
+ };
667
+ export type CloudAccountWithCredentialResponse = {
668
+ /** Cloud Account ID */
669
+ id: string;
670
+ /** Workspace ID */
671
+ workspaceId: string;
672
+ /** Environment ID */
673
+ environmentId: string;
674
+ /** Cloud Provider */
675
+ provider: "AWS" | "Azure";
676
+ /** Cloud Account type */
677
+ "type": "CustomCloud" | "CloudServices";
678
+ /** Role */
679
+ role: string;
680
+ /** Cloud Account connection status */
681
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
682
+ /** Cloud Account credential identifier for Secret Manager */
683
+ credentialSecretIdentifier?: string;
684
+ };
685
+ export type ManagedAccountTemplateResponse = {
686
+ id: number;
687
+ name: string;
688
+ minCountIps: number;
689
+ maxCountIps: number;
690
+ availableIpRange?: number[];
691
+ };
692
+ export type ManagedAccountRegionResponse = {
693
+ id: number;
694
+ name: string;
695
+ };
696
+ export type Alert = {
697
+ /** Auto id of the alert. */
698
+ id: string;
699
+ /** Describe the pillar of the alert. It can be security, reliability or cost optimization. */
700
+ pillar: "SECURITY" | "COST_OPTIMIZATION" | "RELIABILITY";
701
+ /** Describe the environment of the alert. It can be production, staging or development. */
702
+ environment: string;
703
+ /** Workspace of the alert. */
704
+ workspace: string;
705
+ /** Describe the severity of the alert. It can be mandatory, high, medium or low. */
706
+ severity: "LOW" | "MEDIUM" | "HIGH" | "MANDATORY";
707
+ /** Describe the title of the alert. */
708
+ title: string;
709
+ /** Description of the alert. */
710
+ description: string;
711
+ /** Short description about what can be done in order to resolve the issue. */
712
+ remediationText: string;
713
+ /** Url that contains a detailed documentation to resolve the issue. */
714
+ remediationUrl: string;
715
+ /** Policy of the issue that created the alert. */
716
+ awsPolicy: string;
717
+ /** Id of the alert in AWS. */
718
+ sourceAlertId: string;
719
+ /** Id of the resource. */
720
+ resourceId?: string;
721
+ /** Status of the alert. It can be pending, completed or not applicable. */
722
+ status: "PENDING" | "NOT_APPLICABLE" | "COMPLETED";
723
+ };
724
+ export type PaginatedResponseAlert = {
725
+ data: Alert[];
726
+ nextPage?: string;
727
+ prevPage?: string;
728
+ count: number;
729
+ };
730
+ export type ServiceSummary = {
731
+ id: string;
732
+ name: string;
733
+ };
734
+ export type AdminCloudAccountDetails = {
735
+ /** Cloud Account ID */
736
+ id: string;
737
+ /** Stackspot Account ID */
738
+ stackspotAccountId: string;
739
+ /** Workspace ID */
740
+ workspaceId: string;
741
+ /** Environment ID */
742
+ environmentId: string;
743
+ /** Environment Name (only available in CloudServices accounts ) */
744
+ environmentName?: string;
745
+ /** Cloud Provider that Cloud Account represents */
746
+ provider: "AWS" | "Azure";
747
+ /** Type of the Cloud Account (Custom Cloud or Cloud Services) */
748
+ "type": "CustomCloud" | "CloudServices";
749
+ region?: string;
750
+ /** AWS Role that can be used for connecting in account */
751
+ role?: string;
752
+ /** Status of this Cloud Account. Connected indicates it's ready to use, others status are self explained */
753
+ status: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
754
+ /** The ID this account have in Cloud Provider */
755
+ cloudProviderAccountId?: string;
756
+ /** The name given in Cloud Provider for this account (only available in CloudServices accounts) */
757
+ cloudProviderAccountName?: string;
758
+ /** Linked Account ID */
759
+ linkedAccountId?: string;
760
+ /** This Cloud Account credentials secret manager */
761
+ credentialSecretIdentifier?: string;
762
+ /** ID of the Control Tower that Cloud Account is connected */
763
+ controlTowerId?: string;
764
+ };
765
+ export type PaginatedResponseAdminCloudAccountDetails = {
766
+ data: AdminCloudAccountDetails[];
767
+ nextPage?: string;
768
+ prevPage?: string;
769
+ count: number;
770
+ };
771
+ export type DeleteCloudAccountResponse = {
772
+ cloudAccountId: Ulid;
773
+ /** The type of the cloud account */
774
+ cloudType: "CustomCloud" | "CloudServices";
775
+ /** If the type is 'CloudServices', the delete operation opens a support case in order to delete the account */
776
+ supportCaseId?: string;
777
+ };
778
+ /**
779
+ * Get a single case
780
+ */
781
+ export function getCase({ jwtToken, id, pageNum, pageSize }: {
782
+ jwtToken: JwtToken;
783
+ id: number;
784
+ pageNum?: number;
785
+ pageSize?: number;
786
+ }, opts?: Oazapfts.RequestOpts) {
787
+ return oazapfts.ok(oazapfts.fetchJson<{
788
+ status: 200;
789
+ data: Case;
790
+ } | {
791
+ status: 422;
792
+ data: {
793
+ code: string;
794
+ status: number;
795
+ details: string;
796
+ validationDetails?: ValidationDetails[];
797
+ };
798
+ } | {
799
+ status: 500;
800
+ data: {
801
+ code: string;
802
+ status: number;
803
+ details: string;
804
+ validationDetails?: ValidationDetails[];
805
+ };
806
+ }>(`/support/cases/${encodeURIComponent(id)}${QS.query(QS.explode({
807
+ jwtToken,
808
+ pageNum,
809
+ pageSize
810
+ }))}`, {
811
+ ...opts
812
+ }));
813
+ }
814
+ /**
815
+ * Update a case
816
+ */
817
+ export function updateCase({ jwtToken, id, caseUpdate }: {
818
+ jwtToken: JwtToken;
819
+ id: number;
820
+ caseUpdate: CaseUpdate;
821
+ }, opts?: Oazapfts.RequestOpts) {
822
+ return oazapfts.ok(oazapfts.fetchJson<{
823
+ status: 200;
824
+ data: Case;
825
+ } | {
826
+ status: 422;
827
+ data: {
828
+ code: string;
829
+ status: number;
830
+ details: string;
831
+ validationDetails?: ValidationDetails[];
832
+ };
833
+ } | {
834
+ status: 500;
835
+ data: {
836
+ code: string;
837
+ status: number;
838
+ details: string;
839
+ validationDetails?: ValidationDetails[];
840
+ };
841
+ }>(`/support/cases/${encodeURIComponent(id)}${QS.query(QS.explode({
842
+ jwtToken
843
+ }))}`, oazapfts.json({
844
+ ...opts,
845
+ method: "PUT",
846
+ body: caseUpdate
847
+ })));
848
+ }
849
+ /**
850
+ * Get a single saving plan
851
+ */
852
+ export function getSavingPlan({ id }: {
853
+ id: number;
854
+ }, opts?: Oazapfts.RequestOpts) {
855
+ return oazapfts.ok(oazapfts.fetchJson<{
856
+ status: 200;
857
+ data: SavingPlan;
858
+ } | {
859
+ status: 422;
860
+ data: {
861
+ code: string;
862
+ status: number;
863
+ details: string;
864
+ validationDetails?: ValidationDetails[];
865
+ };
866
+ } | {
867
+ status: 500;
868
+ data: {
869
+ code: string;
870
+ status: number;
871
+ details: string;
872
+ validationDetails?: ValidationDetails[];
873
+ };
874
+ }>(`/saving-plan/${encodeURIComponent(id)}${QS.query(QS.explode({
875
+ id
876
+ }))}`, {
877
+ ...opts
878
+ }));
879
+ }
880
+ /**
881
+ * Update saving plan
882
+ */
883
+ export function updateSavingPlan({ id, savingPlanUpdate }: {
884
+ id: number;
885
+ savingPlanUpdate: SavingPlanUpdate;
886
+ }, opts?: Oazapfts.RequestOpts) {
887
+ return oazapfts.ok(oazapfts.fetchJson<{
888
+ status: 200;
889
+ data: SavingPlan;
890
+ } | {
891
+ status: 422;
892
+ data: {
893
+ code: string;
894
+ status: number;
895
+ details: string;
896
+ validationDetails?: ValidationDetails[];
897
+ };
898
+ } | {
899
+ status: 500;
900
+ data: {
901
+ code: string;
902
+ status: number;
903
+ details: string;
904
+ validationDetails?: ValidationDetails[];
905
+ };
906
+ }>(`/saving-plan/${encodeURIComponent(id)}${QS.query(QS.explode({
907
+ id
908
+ }))}`, oazapfts.json({
909
+ ...opts,
910
+ method: "PUT",
911
+ body: savingPlanUpdate
912
+ })));
913
+ }
914
+ /**
915
+ * Update a GuardRail
916
+ */
917
+ export function updateGuardrail({ jwtToken, guardrailUpdate }: {
918
+ jwtToken: JwtToken;
919
+ guardrailUpdate: GuardrailUpdate;
920
+ }, opts?: Oazapfts.RequestOpts) {
921
+ return oazapfts.ok(oazapfts.fetchJson<{
922
+ status: 200;
923
+ } | {
924
+ status: 422;
925
+ data: {
926
+ code: string;
927
+ status: number;
928
+ details: string;
929
+ validationDetails?: ValidationDetails[];
930
+ };
931
+ } | {
932
+ status: 500;
933
+ data: {
934
+ code: string;
935
+ status: number;
936
+ details: string;
937
+ validationDetails?: ValidationDetails[];
938
+ };
939
+ }>(`/admin/guardrail${QS.query(QS.explode({
940
+ jwtToken
941
+ }))}`, oazapfts.json({
942
+ ...opts,
943
+ method: "PUT",
944
+ body: guardrailUpdate
945
+ })));
946
+ }
947
+ /**
948
+ * Create a GuardRail
949
+ */
950
+ export function createGuardrail({ jwtToken, guardrailRequest }: {
951
+ jwtToken: JwtToken;
952
+ guardrailRequest: GuardrailRequest;
953
+ }, opts?: Oazapfts.RequestOpts) {
954
+ return oazapfts.ok(oazapfts.fetchJson<{
955
+ status: 201;
956
+ data: GuardrailDetails;
957
+ } | {
958
+ status: 422;
959
+ data: {
960
+ code: string;
961
+ status: number;
962
+ details: string;
963
+ validationDetails?: ValidationDetails[];
964
+ };
965
+ } | {
966
+ status: 500;
967
+ data: {
968
+ code: string;
969
+ status: number;
970
+ details: string;
971
+ validationDetails?: ValidationDetails[];
972
+ };
973
+ }>(`/admin/guardrail${QS.query(QS.explode({
974
+ jwtToken
975
+ }))}`, oazapfts.json({
976
+ ...opts,
977
+ method: "POST",
978
+ body: guardrailRequest
979
+ })));
980
+ }
981
+ /**
982
+ * Update a baseline
983
+ */
984
+ export function updateBaseline({ baselineId, baselineUpdate }: {
985
+ baselineId: string;
986
+ baselineUpdate: BaselineUpdate;
987
+ }, opts?: Oazapfts.RequestOpts) {
988
+ return oazapfts.ok(oazapfts.fetchJson<{
989
+ status: 200;
990
+ } | {
991
+ status: 422;
992
+ data: {
993
+ code: string;
994
+ status: number;
995
+ details: string;
996
+ validationDetails?: ValidationDetails[];
997
+ };
998
+ } | {
999
+ status: 500;
1000
+ data: {
1001
+ code: string;
1002
+ status: number;
1003
+ details: string;
1004
+ validationDetails?: ValidationDetails[];
1005
+ };
1006
+ }>(`/admin/baseline/${encodeURIComponent(baselineId)}`, oazapfts.json({
1007
+ ...opts,
1008
+ method: "PUT",
1009
+ body: baselineUpdate
1010
+ })));
1011
+ }
1012
+ /**
1013
+ * Retrieves billing account summaries
1014
+ */
1015
+ export function listBillingAccounts({ jwtToken, stackSpotAccountId, showDeleted }: {
1016
+ jwtToken: JwtToken;
1017
+ stackSpotAccountId: string;
1018
+ showDeleted?: boolean;
1019
+ }, opts?: Oazapfts.RequestOpts) {
1020
+ return oazapfts.ok(oazapfts.fetchJson<{
1021
+ status: 200;
1022
+ data: BillingAccountSummaryResponse;
1023
+ } | {
1024
+ status: 401;
1025
+ } | {
1026
+ status: 422;
1027
+ data: {
1028
+ code: string;
1029
+ status: number;
1030
+ details: string;
1031
+ validationDetails?: ValidationDetails[];
1032
+ };
1033
+ } | {
1034
+ status: 500;
1035
+ data: {
1036
+ code: string;
1037
+ status: number;
1038
+ details: string;
1039
+ validationDetails?: ValidationDetails[];
1040
+ };
1041
+ }>(`/v2/finops/billing-accounts${QS.query(QS.explode({
1042
+ jwtToken,
1043
+ stackSpotAccountId,
1044
+ showDeleted
1045
+ }))}`, {
1046
+ ...opts
1047
+ }));
1048
+ }
1049
+ /**
1050
+ * Create new billing account
1051
+ */
1052
+ export function createBillingAccount({ jwtToken, billingAccountRequest }: {
1053
+ jwtToken: JwtToken;
1054
+ billingAccountRequest: BillingAccountRequest;
1055
+ }, opts?: Oazapfts.RequestOpts) {
1056
+ return oazapfts.ok(oazapfts.fetchJson<{
1057
+ status: 200;
1058
+ data: BillingAccountDetailsResponse;
1059
+ } | {
1060
+ status: 401;
1061
+ } | {
1062
+ status: 422;
1063
+ data: {
1064
+ code: string;
1065
+ status: number;
1066
+ details: string;
1067
+ validationDetails?: ValidationDetails[];
1068
+ };
1069
+ } | {
1070
+ status: 500;
1071
+ data: {
1072
+ code: string;
1073
+ status: number;
1074
+ details: string;
1075
+ validationDetails?: ValidationDetails[];
1076
+ };
1077
+ }>(`/v2/finops/billing-accounts${QS.query(QS.explode({
1078
+ jwtToken
1079
+ }))}`, oazapfts.json({
1080
+ ...opts,
1081
+ method: "POST",
1082
+ body: billingAccountRequest
1083
+ })));
1084
+ }
1085
+ /**
1086
+ * Retrieves cost and usage metrics for your account.
1087
+ */
1088
+ export function processAllocationCostRequest({ jwtToken, allocationCostRequest }: {
1089
+ jwtToken: JwtToken;
1090
+ allocationCostRequest: AllocationCostRequest;
1091
+ }, opts?: Oazapfts.RequestOpts) {
1092
+ return oazapfts.ok(oazapfts.fetchJson<{
1093
+ status: 200;
1094
+ data: AllocationCostResponse;
1095
+ } | {
1096
+ status: 202;
1097
+ data: AllocationCostResponse;
1098
+ } | {
1099
+ status: 400;
1100
+ data: ProblemDetail;
1101
+ } | {
1102
+ status: 422;
1103
+ data: {
1104
+ code: string;
1105
+ status: number;
1106
+ details: string;
1107
+ validationDetails?: ValidationDetails[];
1108
+ };
1109
+ } | {
1110
+ status: 500;
1111
+ data: {
1112
+ code: string;
1113
+ status: number;
1114
+ details: string;
1115
+ validationDetails?: ValidationDetails[];
1116
+ };
1117
+ }>(`/v2/finops/allocation-cost${QS.query(QS.explode({
1118
+ jwtToken
1119
+ }))}`, oazapfts.json({
1120
+ ...opts,
1121
+ method: "POST",
1122
+ body: allocationCostRequest
1123
+ })));
1124
+ }
1125
+ /**
1126
+ * List support cases
1127
+ */
1128
+ export function listCases({ jwtToken, sortBy, sortOrder, search, page, pageSize, visibility }: {
1129
+ jwtToken: JwtToken;
1130
+ sortBy?: string;
1131
+ sortOrder?: string;
1132
+ search?: string;
1133
+ page?: number;
1134
+ pageSize?: number;
1135
+ visibility?: "AccountLevel" | "UserLevel";
1136
+ }, opts?: Oazapfts.RequestOpts) {
1137
+ return oazapfts.ok(oazapfts.fetchJson<{
1138
+ status: 200;
1139
+ data: ListCasesResponse;
1140
+ } | {
1141
+ status: 422;
1142
+ data: {
1143
+ code: string;
1144
+ status: number;
1145
+ details: string;
1146
+ validationDetails?: ValidationDetails[];
1147
+ };
1148
+ } | {
1149
+ status: 500;
1150
+ data: {
1151
+ code: string;
1152
+ status: number;
1153
+ details: string;
1154
+ validationDetails?: ValidationDetails[];
1155
+ };
1156
+ }>(`/support/cases${QS.query(QS.explode({
1157
+ jwtToken,
1158
+ sortBy,
1159
+ sortOrder,
1160
+ search,
1161
+ page,
1162
+ pageSize,
1163
+ visibility
1164
+ }))}`, {
1165
+ ...opts
1166
+ }));
1167
+ }
1168
+ /**
1169
+ * Create a support case
1170
+ */
1171
+ export function createCase({ jwtToken, caseRequest }: {
1172
+ jwtToken: JwtToken;
1173
+ caseRequest: CaseRequest;
1174
+ }, opts?: Oazapfts.RequestOpts) {
1175
+ return oazapfts.ok(oazapfts.fetchJson<{
1176
+ status: 201;
1177
+ data: Case;
1178
+ } | {
1179
+ status: 422;
1180
+ data: {
1181
+ code: string;
1182
+ status: number;
1183
+ details: string;
1184
+ validationDetails?: ValidationDetails[];
1185
+ };
1186
+ } | {
1187
+ status: 500;
1188
+ data: {
1189
+ code: string;
1190
+ status: number;
1191
+ details: string;
1192
+ validationDetails?: ValidationDetails[];
1193
+ };
1194
+ }>(`/support/cases${QS.query(QS.explode({
1195
+ jwtToken
1196
+ }))}`, oazapfts.json({
1197
+ ...opts,
1198
+ method: "POST",
1199
+ body: caseRequest
1200
+ })));
1201
+ }
1202
+ /**
1203
+ * Upload an attachment
1204
+ */
1205
+ export function uploadAttachment({ jwtToken, attachmentUpload }: {
1206
+ jwtToken: JwtToken;
1207
+ attachmentUpload?: AttachmentUpload;
1208
+ }, opts?: Oazapfts.RequestOpts) {
1209
+ return oazapfts.ok(oazapfts.fetchJson<{
1210
+ status: 201;
1211
+ data: Attachment;
1212
+ } | {
1213
+ status: 422;
1214
+ data: {
1215
+ code: string;
1216
+ status: number;
1217
+ details: string;
1218
+ validationDetails?: ValidationDetails[];
1219
+ };
1220
+ } | {
1221
+ status: 500;
1222
+ data: {
1223
+ code: string;
1224
+ status: number;
1225
+ details: string;
1226
+ validationDetails?: ValidationDetails[];
1227
+ };
1228
+ }>(`/support/attachment${QS.query(QS.explode({
1229
+ jwtToken
1230
+ }))}`, oazapfts.json({
1231
+ ...opts,
1232
+ method: "POST",
1233
+ body: attachmentUpload
1234
+ })));
1235
+ }
1236
+ /**
1237
+ * Get list of saving plans
1238
+ */
1239
+ export function getListOfSavingPlans({ sortBy, sortOrder, filter, page, pageSize }: {
1240
+ sortBy?: string;
1241
+ sortOrder?: string;
1242
+ filter?: string;
1243
+ page?: number;
1244
+ pageSize?: number;
1245
+ }, opts?: Oazapfts.RequestOpts) {
1246
+ return oazapfts.ok(oazapfts.fetchJson<{
1247
+ status: 200;
1248
+ data: PaginatedResourceSavingPlanSummary;
1249
+ } | {
1250
+ status: 422;
1251
+ data: {
1252
+ code: string;
1253
+ status: number;
1254
+ details: string;
1255
+ validationDetails?: ValidationDetails[];
1256
+ };
1257
+ } | {
1258
+ status: 500;
1259
+ data: {
1260
+ code: string;
1261
+ status: number;
1262
+ details: string;
1263
+ validationDetails?: ValidationDetails[];
1264
+ };
1265
+ }>(`/saving-plan${QS.query(QS.explode({
1266
+ sortBy,
1267
+ sortOrder,
1268
+ filter,
1269
+ page,
1270
+ pageSize
1271
+ }))}`, {
1272
+ ...opts
1273
+ }));
1274
+ }
1275
+ /**
1276
+ * Create saving plan
1277
+ */
1278
+ export function createSavingPlanByBudgetSaveType({ savingPlanRequest }: {
1279
+ savingPlanRequest: SavingPlanRequest;
1280
+ }, opts?: Oazapfts.RequestOpts) {
1281
+ return oazapfts.ok(oazapfts.fetchJson<{
1282
+ status: 201;
1283
+ data: SavingPlan;
1284
+ } | {
1285
+ status: 422;
1286
+ data: {
1287
+ code: string;
1288
+ status: number;
1289
+ details: string;
1290
+ validationDetails?: ValidationDetails[];
1291
+ };
1292
+ } | {
1293
+ status: 500;
1294
+ data: {
1295
+ code: string;
1296
+ status: number;
1297
+ details: string;
1298
+ validationDetails?: ValidationDetails[];
1299
+ };
1300
+ }>("/saving-plan", oazapfts.json({
1301
+ ...opts,
1302
+ method: "POST",
1303
+ body: savingPlanRequest
1304
+ })));
1305
+ }
1306
+ /**
1307
+ * Enable a GuardRail in any level
1308
+ */
1309
+ export function enableGuardrail({ jwtToken, account, workspace, env, enable, guardrailId }: {
1310
+ jwtToken: JwtToken;
1311
+ account: string;
1312
+ workspace?: string;
1313
+ env?: string;
1314
+ enable: boolean;
1315
+ guardrailId: string;
1316
+ }, opts?: Oazapfts.RequestOpts) {
1317
+ return oazapfts.ok(oazapfts.fetchJson<{
1318
+ status: 200;
1319
+ } | {
1320
+ status: 422;
1321
+ data: {
1322
+ code: string;
1323
+ status: number;
1324
+ details: string;
1325
+ validationDetails?: ValidationDetails[];
1326
+ };
1327
+ } | {
1328
+ status: 500;
1329
+ data: {
1330
+ code: string;
1331
+ status: number;
1332
+ details: string;
1333
+ validationDetails?: ValidationDetails[];
1334
+ };
1335
+ }>(`/guardrail/${encodeURIComponent(guardrailId)}${QS.query(QS.explode({
1336
+ jwtToken,
1337
+ account,
1338
+ workspace,
1339
+ env,
1340
+ enable
1341
+ }))}`, {
1342
+ ...opts,
1343
+ method: "POST"
1344
+ }));
1345
+ }
1346
+ /**
1347
+ * Register a cloud offer for a Stackspot Account.
1348
+ */
1349
+ export function registerOffer({ registerOfferRequest }: {
1350
+ registerOfferRequest: RegisterOfferRequest;
1351
+ }, opts?: Oazapfts.RequestOpts) {
1352
+ return oazapfts.ok(oazapfts.fetchJson<{
1353
+ status: 201;
1354
+ 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";
1355
+ } | {
1356
+ status: 422;
1357
+ data: {
1358
+ code: string;
1359
+ status: number;
1360
+ details: string;
1361
+ validationDetails?: ValidationDetails[];
1362
+ };
1363
+ } | {
1364
+ status: 500;
1365
+ data: {
1366
+ code: string;
1367
+ status: number;
1368
+ details: string;
1369
+ validationDetails?: ValidationDetails[];
1370
+ };
1371
+ }>("/cloud-offer", oazapfts.json({
1372
+ ...opts,
1373
+ method: "POST",
1374
+ body: registerOfferRequest
1375
+ })));
1376
+ }
1377
+ /**
1378
+ * List all cloud accounts created for all workspaces
1379
+ */
1380
+ export function listCloudAccounts({ jwtToken, sortBy, sortOrder, filter, page, pageSize, $type, environment, status }: {
1381
+ jwtToken: JwtToken;
1382
+ sortBy?: string;
1383
+ sortOrder?: string;
1384
+ filter?: string;
1385
+ page?: number;
1386
+ pageSize?: number;
1387
+ $type?: "CustomCloud" | "CloudServices";
1388
+ environment?: string;
1389
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
1390
+ }, opts?: Oazapfts.RequestOpts) {
1391
+ return oazapfts.ok(oazapfts.fetchJson<{
1392
+ status: 200;
1393
+ data: PaginatedResourceCloudAccountResponse;
1394
+ } | {
1395
+ status: 422;
1396
+ data: {
1397
+ code: string;
1398
+ status: number;
1399
+ details: string;
1400
+ validationDetails?: ValidationDetails[];
1401
+ };
1402
+ } | {
1403
+ status: 500;
1404
+ data: {
1405
+ code: string;
1406
+ status: number;
1407
+ details: string;
1408
+ validationDetails?: ValidationDetails[];
1409
+ };
1410
+ }>(`/cloud-account${QS.query(QS.explode({
1411
+ jwtToken,
1412
+ sortBy,
1413
+ sortOrder,
1414
+ filter,
1415
+ page,
1416
+ pageSize,
1417
+ "type": $type,
1418
+ environment,
1419
+ status
1420
+ }))}`, {
1421
+ ...opts
1422
+ }));
1423
+ }
1424
+ /**
1425
+ * Connect a cloud account
1426
+ */
1427
+ export function createCloudAccount({ jwtToken, connectAccountRequest }: {
1428
+ jwtToken: JwtToken;
1429
+ connectAccountRequest: ConnectAccountRequest;
1430
+ }, opts?: Oazapfts.RequestOpts) {
1431
+ return oazapfts.ok(oazapfts.fetchJson<{
1432
+ status: 201;
1433
+ data: CloudAccountDetails;
1434
+ } | {
1435
+ status: 422;
1436
+ data: {
1437
+ code: string;
1438
+ status: number;
1439
+ details: string;
1440
+ validationDetails?: ValidationDetails[];
1441
+ };
1442
+ } | {
1443
+ status: 500;
1444
+ data: {
1445
+ code: string;
1446
+ status: number;
1447
+ details: string;
1448
+ validationDetails?: ValidationDetails[];
1449
+ };
1450
+ }>(`/cloud-account${QS.query(QS.explode({
1451
+ jwtToken
1452
+ }))}`, oazapfts.json({
1453
+ ...opts,
1454
+ method: "POST",
1455
+ body: connectAccountRequest
1456
+ })));
1457
+ }
1458
+ /**
1459
+ * Provision managed accounts in a workspace
1460
+ */
1461
+ export function provisionManagedAccountsForWorkspace({ jwtToken, managedAccountProvisionRequest }: {
1462
+ jwtToken: JwtToken;
1463
+ managedAccountProvisionRequest: ManagedAccountProvisionRequest;
1464
+ }, opts?: Oazapfts.RequestOpts) {
1465
+ return oazapfts.ok(oazapfts.fetchJson<{
1466
+ status: 201;
1467
+ 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";
1468
+ } | {
1469
+ status: 422;
1470
+ data: {
1471
+ code: string;
1472
+ status: number;
1473
+ details: string;
1474
+ validationDetails?: ValidationDetails[];
1475
+ };
1476
+ } | {
1477
+ status: 500;
1478
+ data: {
1479
+ code: string;
1480
+ status: number;
1481
+ details: string;
1482
+ validationDetails?: ValidationDetails[];
1483
+ };
1484
+ }>(`/cloud-account/managed-account${QS.query(QS.explode({
1485
+ jwtToken
1486
+ }))}`, oazapfts.json({
1487
+ ...opts,
1488
+ method: "POST",
1489
+ body: managedAccountProvisionRequest
1490
+ })));
1491
+ }
1492
+ /**
1493
+ * Disconnect a Managed Account that was requested to disconnect via support case
1494
+ */
1495
+ export function disconnectCloudAccountRequestedForDisconnect({ disconnectSupportCaseManagedAccountRequest }: {
1496
+ disconnectSupportCaseManagedAccountRequest: DisconnectSupportCaseManagedAccountRequest;
1497
+ }, opts?: Oazapfts.RequestOpts) {
1498
+ return oazapfts.ok(oazapfts.fetchJson<{
1499
+ status: 200;
1500
+ data: DisconnectSupportCaseManagedAccountResponse[];
1501
+ } | {
1502
+ status: 422;
1503
+ data: {
1504
+ code: string;
1505
+ status: number;
1506
+ details: string;
1507
+ validationDetails?: ValidationDetails[];
1508
+ };
1509
+ } | {
1510
+ status: 500;
1511
+ data: {
1512
+ code: string;
1513
+ status: number;
1514
+ details: string;
1515
+ validationDetails?: ValidationDetails[];
1516
+ };
1517
+ }>("/admin/managed-cloud/support-case/disconnect", oazapfts.json({
1518
+ ...opts,
1519
+ method: "POST",
1520
+ body: disconnectSupportCaseManagedAccountRequest
1521
+ })));
1522
+ }
1523
+ /**
1524
+ * Get all relation between stackspot accounts and control towers
1525
+ */
1526
+ export function getAllAccountTower({ stackspotAccountId }: {
1527
+ stackspotAccountId?: string;
1528
+ }, opts?: Oazapfts.RequestOpts) {
1529
+ return oazapfts.ok(oazapfts.fetchJson<{
1530
+ status: 200;
1531
+ data: StackspotAccountTower[];
1532
+ } | {
1533
+ status: 422;
1534
+ data: {
1535
+ code: string;
1536
+ status: number;
1537
+ details: string;
1538
+ validationDetails?: ValidationDetails[];
1539
+ };
1540
+ } | {
1541
+ status: 500;
1542
+ data: {
1543
+ code: string;
1544
+ status: number;
1545
+ details: string;
1546
+ validationDetails?: ValidationDetails[];
1547
+ };
1548
+ }>(`/admin/managed-cloud/control-tower${QS.query(QS.explode({
1549
+ stackspotAccountId
1550
+ }))}`, {
1551
+ ...opts
1552
+ }));
1553
+ }
1554
+ /**
1555
+ * Add a Control Tower ID to a Stackspot Account that will be used in creation of a Managed Cloud Account
1556
+ */
1557
+ export function createAccountTower({ stackspotAccountTowerRequest }: {
1558
+ stackspotAccountTowerRequest: StackspotAccountTowerRequest;
1559
+ }, opts?: Oazapfts.RequestOpts) {
1560
+ return oazapfts.ok(oazapfts.fetchJson<{
1561
+ status: 201;
1562
+ data: CommonCreatedResponse;
1563
+ } | {
1564
+ status: 422;
1565
+ data: {
1566
+ code: string;
1567
+ status: number;
1568
+ details: string;
1569
+ validationDetails?: ValidationDetails[];
1570
+ };
1571
+ } | {
1572
+ status: 500;
1573
+ data: {
1574
+ code: string;
1575
+ status: number;
1576
+ details: string;
1577
+ validationDetails?: ValidationDetails[];
1578
+ };
1579
+ }>("/admin/managed-cloud/control-tower", oazapfts.json({
1580
+ ...opts,
1581
+ method: "POST",
1582
+ body: stackspotAccountTowerRequest
1583
+ })));
1584
+ }
1585
+ export function createNewContract({ createContractRequest }: {
1586
+ createContractRequest: CreateContractRequest;
1587
+ }, opts?: Oazapfts.RequestOpts) {
1588
+ return oazapfts.ok(oazapfts.fetchJson<{
1589
+ status: 201;
1590
+ data: Contract;
1591
+ } | {
1592
+ status: 422;
1593
+ data: {
1594
+ code: string;
1595
+ status: number;
1596
+ details: string;
1597
+ validationDetails?: ValidationDetails[];
1598
+ };
1599
+ } | {
1600
+ status: 500;
1601
+ data: {
1602
+ code: string;
1603
+ status: number;
1604
+ details: string;
1605
+ validationDetails?: ValidationDetails[];
1606
+ };
1607
+ }>("/admin/finops/contract", oazapfts.json({
1608
+ ...opts,
1609
+ method: "POST",
1610
+ body: createContractRequest
1611
+ })));
1612
+ }
1613
+ /**
1614
+ * Links services to a Stackspot account, allowing users from that account to see resources in CRE
1615
+ */
1616
+ export function linkResourceTypesToStackspotAccount({ linkResourceTypeToStackspotAccountRequest }: {
1617
+ linkResourceTypeToStackspotAccountRequest: LinkResourceTypeToStackspotAccountRequest;
1618
+ }, opts?: Oazapfts.RequestOpts) {
1619
+ return oazapfts.ok(oazapfts.fetchJson<{
1620
+ status: 200;
1621
+ 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";
1622
+ } | {
1623
+ status: 422;
1624
+ data: {
1625
+ code: string;
1626
+ status: number;
1627
+ details: string;
1628
+ validationDetails?: ValidationDetails[];
1629
+ };
1630
+ } | {
1631
+ status: 500;
1632
+ data: {
1633
+ code: string;
1634
+ status: number;
1635
+ details: string;
1636
+ validationDetails?: ValidationDetails[];
1637
+ };
1638
+ }>("/admin/cloud-resource/link-service-to-stackspot-account", oazapfts.json({
1639
+ ...opts,
1640
+ method: "POST",
1641
+ body: linkResourceTypeToStackspotAccountRequest
1642
+ })));
1643
+ }
1644
+ /**
1645
+ *
1646
+ * Updates Managed Account related information. If the account is of CustomCloud type, it changes to CloudServices
1647
+ * (managed account type).
1648
+ *
1649
+ */
1650
+ export function updateManagedInfo({ updateManagedInfoRequest }: {
1651
+ updateManagedInfoRequest: UpdateManagedInfoRequest;
1652
+ }, opts?: Oazapfts.RequestOpts) {
1653
+ return oazapfts.ok(oazapfts.fetchJson<{
1654
+ status: 200;
1655
+ data: UpdatedCloudAccountResponse;
1656
+ } | {
1657
+ status: 422;
1658
+ data: {
1659
+ code: string;
1660
+ status: number;
1661
+ details: string;
1662
+ validationDetails?: ValidationDetails[];
1663
+ };
1664
+ } | {
1665
+ status: 500;
1666
+ data: {
1667
+ code: string;
1668
+ status: number;
1669
+ details: string;
1670
+ validationDetails?: ValidationDetails[];
1671
+ };
1672
+ }>("/admin/cloud-account/update-managed-account", oazapfts.json({
1673
+ ...opts,
1674
+ method: "POST",
1675
+ body: updateManagedInfoRequest
1676
+ })));
1677
+ }
1678
+ /**
1679
+ * Disconnect a Cloud Account
1680
+ */
1681
+ export function disconnectCloudAccountById({ disconnectCloudAccountRequest }: {
1682
+ disconnectCloudAccountRequest: DisconnectCloudAccountRequest;
1683
+ }, opts?: Oazapfts.RequestOpts) {
1684
+ return oazapfts.ok(oazapfts.fetchJson<{
1685
+ status: 200;
1686
+ data: UpdatedCloudAccountResponse;
1687
+ } | {
1688
+ status: 422;
1689
+ data: {
1690
+ code: string;
1691
+ status: number;
1692
+ details: string;
1693
+ validationDetails?: ValidationDetails[];
1694
+ };
1695
+ } | {
1696
+ status: 500;
1697
+ data: {
1698
+ code: string;
1699
+ status: number;
1700
+ details: string;
1701
+ validationDetails?: ValidationDetails[];
1702
+ };
1703
+ }>("/admin/cloud-account/disconnect", oazapfts.json({
1704
+ ...opts,
1705
+ method: "POST",
1706
+ body: disconnectCloudAccountRequest
1707
+ })));
1708
+ }
1709
+ /**
1710
+ * Return all baseline registered
1711
+ */
1712
+ export function getBaselines(opts?: Oazapfts.RequestOpts) {
1713
+ return oazapfts.ok(oazapfts.fetchJson<{
1714
+ status: 200;
1715
+ data: BaselineResponse[];
1716
+ } | {
1717
+ status: 422;
1718
+ data: {
1719
+ code: string;
1720
+ status: number;
1721
+ details: string;
1722
+ validationDetails?: ValidationDetails[];
1723
+ };
1724
+ } | {
1725
+ status: 500;
1726
+ data: {
1727
+ code: string;
1728
+ status: number;
1729
+ details: string;
1730
+ validationDetails?: ValidationDetails[];
1731
+ };
1732
+ }>("/admin/baseline", {
1733
+ ...opts
1734
+ }));
1735
+ }
1736
+ /**
1737
+ * Create a baseline
1738
+ */
1739
+ export function createBaseline({ baselineRequest }: {
1740
+ baselineRequest: BaselineRequest;
1741
+ }, opts?: Oazapfts.RequestOpts) {
1742
+ return oazapfts.ok(oazapfts.fetchJson<{
1743
+ status: 201;
1744
+ data: BaselineDetails;
1745
+ } | {
1746
+ status: 422;
1747
+ data: {
1748
+ code: string;
1749
+ status: number;
1750
+ details: string;
1751
+ validationDetails?: ValidationDetails[];
1752
+ };
1753
+ } | {
1754
+ status: 500;
1755
+ data: {
1756
+ code: string;
1757
+ status: number;
1758
+ details: string;
1759
+ validationDetails?: ValidationDetails[];
1760
+ };
1761
+ }>("/admin/baseline", oazapfts.json({
1762
+ ...opts,
1763
+ method: "POST",
1764
+ body: baselineRequest
1765
+ })));
1766
+ }
1767
+ /**
1768
+ * Retrieves details from a billing account
1769
+ */
1770
+ export function getBillingAccountById({ jwtToken, stackSpotAccountId, billingAccountId }: {
1771
+ jwtToken: JwtToken;
1772
+ stackSpotAccountId: string;
1773
+ billingAccountId: string;
1774
+ }, opts?: Oazapfts.RequestOpts) {
1775
+ return oazapfts.ok(oazapfts.fetchJson<{
1776
+ status: 200;
1777
+ data: BillingAccountDetailsResponse;
1778
+ } | {
1779
+ status: 401;
1780
+ } | {
1781
+ status: 404;
1782
+ } | {
1783
+ status: 422;
1784
+ data: {
1785
+ code: string;
1786
+ status: number;
1787
+ details: string;
1788
+ validationDetails?: ValidationDetails[];
1789
+ };
1790
+ } | {
1791
+ status: 500;
1792
+ data: {
1793
+ code: string;
1794
+ status: number;
1795
+ details: string;
1796
+ validationDetails?: ValidationDetails[];
1797
+ };
1798
+ }>(`/v2/finops/billing-accounts/${encodeURIComponent(billingAccountId)}${QS.query(QS.explode({
1799
+ jwtToken,
1800
+ stackSpotAccountId
1801
+ }))}`, {
1802
+ ...opts
1803
+ }));
1804
+ }
1805
+ /**
1806
+ * Delete a billing account
1807
+ */
1808
+ export function deleteBillingAccountById({ jwtToken, stackSpotAccountId, billingAccountId }: {
1809
+ jwtToken: JwtToken;
1810
+ stackSpotAccountId: string;
1811
+ billingAccountId: string;
1812
+ }, opts?: Oazapfts.RequestOpts) {
1813
+ return oazapfts.ok(oazapfts.fetchJson<{
1814
+ status: 200;
1815
+ data: BillingAccountDetailsResponse;
1816
+ } | {
1817
+ status: 401;
1818
+ } | {
1819
+ status: 404;
1820
+ } | {
1821
+ status: 422;
1822
+ data: {
1823
+ code: string;
1824
+ status: number;
1825
+ details: string;
1826
+ validationDetails?: ValidationDetails[];
1827
+ };
1828
+ } | {
1829
+ status: 500;
1830
+ data: {
1831
+ code: string;
1832
+ status: number;
1833
+ details: string;
1834
+ validationDetails?: ValidationDetails[];
1835
+ };
1836
+ }>(`/v2/finops/billing-accounts/${encodeURIComponent(billingAccountId)}${QS.query(QS.explode({
1837
+ jwtToken,
1838
+ stackSpotAccountId
1839
+ }))}`, {
1840
+ ...opts,
1841
+ method: "DELETE"
1842
+ }));
1843
+ }
1844
+ /**
1845
+ * Get form fields and information
1846
+ */
1847
+ export function getFormField(opts?: Oazapfts.RequestOpts) {
1848
+ return oazapfts.ok(oazapfts.fetchJson<{
1849
+ status: 200;
1850
+ data: SupportFormFieldResponse;
1851
+ } | {
1852
+ status: 422;
1853
+ data: {
1854
+ code: string;
1855
+ status: number;
1856
+ details: string;
1857
+ validationDetails?: ValidationDetails[];
1858
+ };
1859
+ } | {
1860
+ status: 500;
1861
+ data: {
1862
+ code: string;
1863
+ status: number;
1864
+ details: string;
1865
+ validationDetails?: ValidationDetails[];
1866
+ };
1867
+ }>("/support/form/fields", {
1868
+ ...opts
1869
+ }));
1870
+ }
1871
+ /**
1872
+ * Get an attachment file
1873
+ */
1874
+ export function getAttachment({ jwtToken, id }: {
1875
+ jwtToken: JwtToken;
1876
+ id: string;
1877
+ }, opts?: Oazapfts.RequestOpts) {
1878
+ return oazapfts.ok(oazapfts.fetchJson<{
1879
+ status: 200;
1880
+ data: AttachmentBase64;
1881
+ } | {
1882
+ status: 422;
1883
+ data: {
1884
+ code: string;
1885
+ status: number;
1886
+ details: string;
1887
+ validationDetails?: ValidationDetails[];
1888
+ };
1889
+ } | {
1890
+ status: 500;
1891
+ data: {
1892
+ code: string;
1893
+ status: number;
1894
+ details: string;
1895
+ validationDetails?: ValidationDetails[];
1896
+ };
1897
+ }>(`/support/attachment/${encodeURIComponent(id)}${QS.query(QS.explode({
1898
+ jwtToken
1899
+ }))}`, {
1900
+ ...opts
1901
+ }));
1902
+ }
1903
+ export function healthz(opts?: Oazapfts.RequestOpts) {
1904
+ return oazapfts.ok(oazapfts.fetchJson<{
1905
+ status: 200;
1906
+ data: HealthComponent;
1907
+ } | {
1908
+ status: 422;
1909
+ data: {
1910
+ code: string;
1911
+ status: number;
1912
+ details: string;
1913
+ validationDetails?: ValidationDetails[];
1914
+ };
1915
+ } | {
1916
+ status: 500;
1917
+ data: {
1918
+ code: string;
1919
+ status: number;
1920
+ details: string;
1921
+ validationDetails?: ValidationDetails[];
1922
+ };
1923
+ }>("/healthz", {
1924
+ ...opts
1925
+ }));
1926
+ }
1927
+ /**
1928
+ * Get all GuardRails
1929
+ */
1930
+ export function getGuardrails({ jwtToken, account, workspace, env }: {
1931
+ jwtToken: JwtToken;
1932
+ account: string;
1933
+ workspace?: string;
1934
+ env?: string;
1935
+ }, opts?: Oazapfts.RequestOpts) {
1936
+ return oazapfts.ok(oazapfts.fetchJson<{
1937
+ status: 200;
1938
+ data: GroupedGuardrailResponse[];
1939
+ } | {
1940
+ status: 422;
1941
+ data: {
1942
+ code: string;
1943
+ status: number;
1944
+ details: string;
1945
+ validationDetails?: ValidationDetails[];
1946
+ };
1947
+ } | {
1948
+ status: 500;
1949
+ data: {
1950
+ code: string;
1951
+ status: number;
1952
+ details: string;
1953
+ validationDetails?: ValidationDetails[];
1954
+ };
1955
+ }>(`/guardrail${QS.query(QS.explode({
1956
+ jwtToken,
1957
+ account,
1958
+ workspace,
1959
+ env
1960
+ }))}`, {
1961
+ ...opts
1962
+ }));
1963
+ }
1964
+ /**
1965
+ * Get overview of costs, with current month, last month and three last month
1966
+ */
1967
+ export function getCostOverview({ jwtToken, sortBy, sortOrder }: {
1968
+ jwtToken: JwtToken;
1969
+ sortBy?: string;
1970
+ sortOrder?: string;
1971
+ }, opts?: Oazapfts.RequestOpts) {
1972
+ return oazapfts.ok(oazapfts.fetchJson<{
1973
+ status: 200;
1974
+ data: CostOverview;
1975
+ } | {
1976
+ status: 422;
1977
+ data: {
1978
+ code: string;
1979
+ status: number;
1980
+ details: string;
1981
+ validationDetails?: ValidationDetails[];
1982
+ };
1983
+ } | {
1984
+ status: 500;
1985
+ data: {
1986
+ code: string;
1987
+ status: number;
1988
+ details: string;
1989
+ validationDetails?: ValidationDetails[];
1990
+ };
1991
+ }>(`/finops/reports${QS.query(QS.explode({
1992
+ jwtToken,
1993
+ sortBy,
1994
+ sortOrder
1995
+ }))}`, {
1996
+ ...opts
1997
+ }));
1998
+ }
1999
+ export function downloadCsvFiles({ jwtToken, year, month }: {
2000
+ jwtToken: JwtToken;
2001
+ year: number;
2002
+ month: number;
2003
+ }, opts?: Oazapfts.RequestOpts) {
2004
+ return oazapfts.ok(oazapfts.fetchJson<{
2005
+ status: 200;
2006
+ data: AttachmentBase64;
2007
+ } | {
2008
+ status: 422;
2009
+ data: {
2010
+ code: string;
2011
+ status: number;
2012
+ details: string;
2013
+ validationDetails?: ValidationDetails[];
2014
+ };
2015
+ } | {
2016
+ status: 500;
2017
+ data: {
2018
+ code: string;
2019
+ status: number;
2020
+ details: string;
2021
+ validationDetails?: ValidationDetails[];
2022
+ };
2023
+ }>(`/finops/reports/download${QS.query(QS.explode({
2024
+ jwtToken,
2025
+ year,
2026
+ month
2027
+ }))}`, {
2028
+ ...opts
2029
+ }));
2030
+ }
2031
+ /**
2032
+ * List all tags.
2033
+ */
2034
+ export function getAllTags({ stackspotAccountId }: {
2035
+ stackspotAccountId: string;
2036
+ }, opts?: Oazapfts.RequestOpts) {
2037
+ return oazapfts.ok(oazapfts.fetchJson<{
2038
+ status: 200;
2039
+ data: string[];
2040
+ } | {
2041
+ status: 422;
2042
+ data: {
2043
+ code: string;
2044
+ status: number;
2045
+ details: string;
2046
+ validationDetails?: ValidationDetails[];
2047
+ };
2048
+ } | {
2049
+ status: 500;
2050
+ data: {
2051
+ code: string;
2052
+ status: number;
2053
+ details: string;
2054
+ validationDetails?: ValidationDetails[];
2055
+ };
2056
+ }>(`/finops/allocation-cost-list-tags${QS.query(QS.explode({
2057
+ stackspotAccountId
2058
+ }))}`, {
2059
+ ...opts
2060
+ }));
2061
+ }
2062
+ /**
2063
+ * lists all subTags of a given tag with their respective costs.
2064
+ */
2065
+ export function getAllocationCostTagValues({ jwtToken, masterAccount, tag, startDate, endDate, sort, page, pageSize }: {
2066
+ jwtToken: JwtToken;
2067
+ masterAccount: string;
2068
+ tag: string;
2069
+ startDate: string;
2070
+ endDate: string;
2071
+ sort?: ("NAME_ASC" | "NAME_DESC" | "COST_VALUE_ASC" | "COST_VALUE_DESC")[];
2072
+ page?: number;
2073
+ pageSize?: number;
2074
+ }, opts?: Oazapfts.RequestOpts) {
2075
+ return oazapfts.ok(oazapfts.fetchJson<{
2076
+ status: 200;
2077
+ data: PaginatedResponseAllocationCost;
2078
+ } | {
2079
+ status: 422;
2080
+ data: {
2081
+ code: string;
2082
+ status: number;
2083
+ details: string;
2084
+ validationDetails?: ValidationDetails[];
2085
+ };
2086
+ } | {
2087
+ status: 500;
2088
+ data: {
2089
+ code: string;
2090
+ status: number;
2091
+ details: string;
2092
+ validationDetails?: ValidationDetails[];
2093
+ };
2094
+ }>(`/finops/allocation-cost-list-tag-values${QS.query(QS.explode({
2095
+ jwtToken,
2096
+ masterAccount,
2097
+ tag,
2098
+ startDate,
2099
+ endDate,
2100
+ sort,
2101
+ page,
2102
+ pageSize
2103
+ }))}`, {
2104
+ ...opts
2105
+ }));
2106
+ }
2107
+ /**
2108
+ * List all services of a subtag. Each service contains name and cost value.
2109
+ */
2110
+ export function getAllocationCostServices({ jwtToken, masterAccount, tag, tagValueName, startDate, endDate, sort, page, pageSize }: {
2111
+ jwtToken: JwtToken;
2112
+ masterAccount: string;
2113
+ tag: string;
2114
+ tagValueName: string;
2115
+ startDate: string;
2116
+ endDate: string;
2117
+ sort?: ("NAME_ASC" | "NAME_DESC" | "COST_VALUE_ASC" | "COST_VALUE_DESC")[];
2118
+ page?: number;
2119
+ pageSize?: number;
2120
+ }, opts?: Oazapfts.RequestOpts) {
2121
+ return oazapfts.ok(oazapfts.fetchJson<{
2122
+ status: 200;
2123
+ data: PaginatedResponseAllocationCost;
2124
+ } | {
2125
+ status: 422;
2126
+ data: {
2127
+ code: string;
2128
+ status: number;
2129
+ details: string;
2130
+ validationDetails?: ValidationDetails[];
2131
+ };
2132
+ } | {
2133
+ status: 500;
2134
+ data: {
2135
+ code: string;
2136
+ status: number;
2137
+ details: string;
2138
+ validationDetails?: ValidationDetails[];
2139
+ };
2140
+ }>(`/finops/allocation-cost-list-services${QS.query(QS.explode({
2141
+ jwtToken,
2142
+ masterAccount,
2143
+ tag,
2144
+ tagValueName,
2145
+ startDate,
2146
+ endDate,
2147
+ sort,
2148
+ page,
2149
+ pageSize
2150
+ }))}`, {
2151
+ ...opts
2152
+ }));
2153
+ }
2154
+ /**
2155
+ * list service details
2156
+ */
2157
+ export function getAllocationCostServiceDetails({ jwtToken, masterAccount, tag, tagValueName, serviceName, startDate, endDate, $type, filter, page, pageSize, sort }: {
2158
+ jwtToken: JwtToken;
2159
+ masterAccount: string;
2160
+ tag: string;
2161
+ tagValueName: string;
2162
+ serviceName: string;
2163
+ startDate: string;
2164
+ endDate: string;
2165
+ $type: string;
2166
+ filter?: string[];
2167
+ page?: number;
2168
+ pageSize?: number;
2169
+ sort?: ("NAME_ASC" | "NAME_DESC" | "COST_VALUE_ASC" | "COST_VALUE_DESC")[];
2170
+ }, opts?: Oazapfts.RequestOpts) {
2171
+ return oazapfts.ok(oazapfts.fetchJson<{
2172
+ status: 200;
2173
+ data: PaginatedResponseAllocationCostDetails;
2174
+ } | {
2175
+ status: 422;
2176
+ data: {
2177
+ code: string;
2178
+ status: number;
2179
+ details: string;
2180
+ validationDetails?: ValidationDetails[];
2181
+ };
2182
+ } | {
2183
+ status: 500;
2184
+ data: {
2185
+ code: string;
2186
+ status: number;
2187
+ details: string;
2188
+ validationDetails?: ValidationDetails[];
2189
+ };
2190
+ }>(`/finops/allocation-cost-list-service-details${QS.query(QS.explode({
2191
+ jwtToken,
2192
+ masterAccount,
2193
+ tag,
2194
+ tagValueName,
2195
+ serviceName,
2196
+ startDate,
2197
+ endDate,
2198
+ "type": $type,
2199
+ filter,
2200
+ page,
2201
+ pageSize,
2202
+ sort
2203
+ }))}`, {
2204
+ ...opts
2205
+ }));
2206
+ }
2207
+ /**
2208
+ * list all master accounts
2209
+ */
2210
+ export function getAllMasterAccount({ stackspotAccountId }: {
2211
+ stackspotAccountId: string;
2212
+ }, opts?: Oazapfts.RequestOpts) {
2213
+ return oazapfts.ok(oazapfts.fetchJson<{
2214
+ status: 200;
2215
+ data: string[];
2216
+ } | {
2217
+ status: 422;
2218
+ data: {
2219
+ code: string;
2220
+ status: number;
2221
+ details: string;
2222
+ validationDetails?: ValidationDetails[];
2223
+ };
2224
+ } | {
2225
+ status: 500;
2226
+ data: {
2227
+ code: string;
2228
+ status: number;
2229
+ details: string;
2230
+ validationDetails?: ValidationDetails[];
2231
+ };
2232
+ }>(`/finops/allocation-cost-list-master-accounts${QS.query(QS.explode({
2233
+ stackspotAccountId
2234
+ }))}`, {
2235
+ ...opts
2236
+ }));
2237
+ }
2238
+ /**
2239
+ * list filters related to the type
2240
+ */
2241
+ export function getAllocationCostFilters({ jwtToken, $type }: {
2242
+ jwtToken: JwtToken;
2243
+ $type: "SUB_ACCOUNT_ID" | "REGION";
2244
+ }, opts?: Oazapfts.RequestOpts) {
2245
+ return oazapfts.ok(oazapfts.fetchJson<{
2246
+ status: 200;
2247
+ data: string[];
2248
+ } | {
2249
+ status: 422;
2250
+ data: {
2251
+ code: string;
2252
+ status: number;
2253
+ details: string;
2254
+ validationDetails?: ValidationDetails[];
2255
+ };
2256
+ } | {
2257
+ status: 500;
2258
+ data: {
2259
+ code: string;
2260
+ status: number;
2261
+ details: string;
2262
+ validationDetails?: ValidationDetails[];
2263
+ };
2264
+ }>(`/finops/allocation-cost-filters${QS.query(QS.explode({
2265
+ jwtToken,
2266
+ "type": $type
2267
+ }))}`, {
2268
+ ...opts
2269
+ }));
2270
+ }
2271
+ /**
2272
+ * returns the detailed csv with the masterAccount CUR information
2273
+ */
2274
+ export function getAllocationCostCsv({ jwtToken, stackspotAccountId, masterAccount, startDate, endDate }: {
2275
+ jwtToken: JwtToken;
2276
+ stackspotAccountId: string;
2277
+ masterAccount: string;
2278
+ startDate: string;
2279
+ endDate: string;
2280
+ }, opts?: Oazapfts.RequestOpts) {
2281
+ return oazapfts.ok(oazapfts.fetchJson<{
2282
+ status: 200;
2283
+ data: AttachmentBase64;
2284
+ } | {
2285
+ status: 422;
2286
+ data: {
2287
+ code: string;
2288
+ status: number;
2289
+ details: string;
2290
+ validationDetails?: ValidationDetails[];
2291
+ };
2292
+ } | {
2293
+ status: 500;
2294
+ data: {
2295
+ code: string;
2296
+ status: number;
2297
+ details: string;
2298
+ validationDetails?: ValidationDetails[];
2299
+ };
2300
+ }>(`/finops/allocation-cost-csv${QS.query(QS.explode({
2301
+ jwtToken,
2302
+ stackspotAccountId,
2303
+ masterAccount,
2304
+ startDate,
2305
+ endDate
2306
+ }))}`, {
2307
+ ...opts
2308
+ }));
2309
+ }
2310
+ /**
2311
+ * List Instances of a particular Service Resource running in a Workspace
2312
+ */
2313
+ export function listInstances({ jwtToken, workspaceId, resourceId, pageToken, search }: {
2314
+ jwtToken: JwtToken;
2315
+ workspaceId: string;
2316
+ resourceId: string;
2317
+ pageToken?: string;
2318
+ search?: string;
2319
+ }, opts?: Oazapfts.RequestOpts) {
2320
+ return oazapfts.ok(oazapfts.fetchJson<{
2321
+ status: 200;
2322
+ data: ManagedResourceList;
2323
+ } | {
2324
+ status: 422;
2325
+ data: {
2326
+ code: string;
2327
+ status: number;
2328
+ details: string;
2329
+ validationDetails?: ValidationDetails[];
2330
+ };
2331
+ } | {
2332
+ status: 500;
2333
+ data: {
2334
+ code: string;
2335
+ status: number;
2336
+ details: string;
2337
+ validationDetails?: ValidationDetails[];
2338
+ };
2339
+ }>(`/cloud-resource/workspace/${encodeURIComponent(workspaceId)}/resource/${encodeURIComponent(resourceId)}/instance${QS.query(QS.explode({
2340
+ jwtToken,
2341
+ pageToken,
2342
+ search
2343
+ }))}`, {
2344
+ ...opts
2345
+ }));
2346
+ }
2347
+ /**
2348
+ * List Managed Services
2349
+ */
2350
+ export function listServices({ jwtToken }: {
2351
+ jwtToken: JwtToken;
2352
+ }, opts?: Oazapfts.RequestOpts) {
2353
+ return oazapfts.ok(oazapfts.fetchJson<{
2354
+ status: 200;
2355
+ data: ManagedService[];
2356
+ } | {
2357
+ status: 422;
2358
+ data: {
2359
+ code: string;
2360
+ status: number;
2361
+ details: string;
2362
+ validationDetails?: ValidationDetails[];
2363
+ };
2364
+ } | {
2365
+ status: 500;
2366
+ data: {
2367
+ code: string;
2368
+ status: number;
2369
+ details: string;
2370
+ validationDetails?: ValidationDetails[];
2371
+ };
2372
+ }>(`/cloud-resource/service${QS.query(QS.explode({
2373
+ jwtToken
2374
+ }))}`, {
2375
+ ...opts
2376
+ }));
2377
+ }
2378
+ /**
2379
+ * A detailed description of a particular Instance
2380
+ */
2381
+ export function getInstanceDetails({ jwtToken, cloudAccountId, resourceId, instanceId }: {
2382
+ jwtToken: JwtToken;
2383
+ cloudAccountId: string;
2384
+ resourceId: string;
2385
+ instanceId: string;
2386
+ }, opts?: Oazapfts.RequestOpts) {
2387
+ return oazapfts.ok(oazapfts.fetchJson<{
2388
+ status: 200;
2389
+ data: object;
2390
+ } | {
2391
+ status: 422;
2392
+ data: {
2393
+ code: string;
2394
+ status: number;
2395
+ details: string;
2396
+ validationDetails?: ValidationDetails[];
2397
+ };
2398
+ } | {
2399
+ status: 500;
2400
+ data: {
2401
+ code: string;
2402
+ status: number;
2403
+ details: string;
2404
+ validationDetails?: ValidationDetails[];
2405
+ };
2406
+ }>(`/cloud-resource/cloud-account/${encodeURIComponent(cloudAccountId)}/resource/${encodeURIComponent(resourceId)}/instance/${encodeURIComponent(instanceId)}${QS.query(QS.explode({
2407
+ jwtToken
2408
+ }))}`, {
2409
+ ...opts
2410
+ }));
2411
+ }
2412
+ /**
2413
+ * Get the cloud offer of a Stackspot Account.
2414
+ */
2415
+ export function getOfferOfAccount({ id }: {
2416
+ id: string;
2417
+ }, opts?: Oazapfts.RequestOpts) {
2418
+ return oazapfts.ok(oazapfts.fetchJson<{
2419
+ status: 200;
2420
+ data: CloudOfferResponse;
2421
+ } | {
2422
+ status: 422;
2423
+ data: {
2424
+ code: string;
2425
+ status: number;
2426
+ details: string;
2427
+ validationDetails?: ValidationDetails[];
2428
+ };
2429
+ } | {
2430
+ status: 500;
2431
+ data: {
2432
+ code: string;
2433
+ status: number;
2434
+ details: string;
2435
+ validationDetails?: ValidationDetails[];
2436
+ };
2437
+ }>(`/cloud-offer/account/${encodeURIComponent(id)}`, {
2438
+ ...opts
2439
+ }));
2440
+ }
2441
+ /**
2442
+ * Get the external-id for the given Cloud Account ID.
2443
+ */
2444
+ export function getCloudAccountExternalId({ cloudAccountId }: {
2445
+ cloudAccountId: string;
2446
+ }, opts?: Oazapfts.RequestOpts) {
2447
+ return oazapfts.ok(oazapfts.fetchJson<{
2448
+ status: 200;
2449
+ data: string;
2450
+ } | {
2451
+ status: 422;
2452
+ data: {
2453
+ code: string;
2454
+ status: number;
2455
+ details: string;
2456
+ validationDetails?: ValidationDetails[];
2457
+ };
2458
+ } | {
2459
+ status: 500;
2460
+ data: {
2461
+ code: string;
2462
+ status: number;
2463
+ details: string;
2464
+ validationDetails?: ValidationDetails[];
2465
+ };
2466
+ }>(`/cloud-account/${encodeURIComponent(cloudAccountId)}/external-id`, {
2467
+ ...opts
2468
+ }));
2469
+ }
2470
+ /**
2471
+ * Get the cloud account workflow of a workspace environment
2472
+ */
2473
+ export function getProvisionWorkflowInWorkspace({ jwtToken, workspaceId }: {
2474
+ jwtToken: JwtToken;
2475
+ workspaceId: string;
2476
+ }, opts?: Oazapfts.RequestOpts) {
2477
+ return oazapfts.ok(oazapfts.fetchJson<{
2478
+ status: 200;
2479
+ data: Workflow;
2480
+ } | {
2481
+ status: 422;
2482
+ data: {
2483
+ code: string;
2484
+ status: number;
2485
+ details: string;
2486
+ validationDetails?: ValidationDetails[];
2487
+ };
2488
+ } | {
2489
+ status: 500;
2490
+ data: {
2491
+ code: string;
2492
+ status: number;
2493
+ details: string;
2494
+ validationDetails?: ValidationDetails[];
2495
+ };
2496
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/workflow${QS.query(QS.explode({
2497
+ jwtToken
2498
+ }))}`, {
2499
+ ...opts
2500
+ }));
2501
+ }
2502
+ /**
2503
+ * Get a cloud account connected to a workspace environment
2504
+ */
2505
+ export function getCloudAccountByEnvironment({ accountId, workspaceId, environmentId }: {
2506
+ accountId: string;
2507
+ workspaceId: string;
2508
+ environmentId: string;
2509
+ }, opts?: Oazapfts.RequestOpts) {
2510
+ return oazapfts.ok(oazapfts.fetchJson<{
2511
+ status: 200;
2512
+ data: CloudAccountWithCredentialResponse;
2513
+ } | {
2514
+ status: 422;
2515
+ data: {
2516
+ code: string;
2517
+ status: number;
2518
+ details: string;
2519
+ validationDetails?: ValidationDetails[];
2520
+ };
2521
+ } | {
2522
+ status: 500;
2523
+ data: {
2524
+ code: string;
2525
+ status: number;
2526
+ details: string;
2527
+ validationDetails?: ValidationDetails[];
2528
+ };
2529
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}/environment/${encodeURIComponent(environmentId)}`, {
2530
+ ...opts,
2531
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2532
+ accountId
2533
+ })
2534
+ }));
2535
+ }
2536
+ /**
2537
+ * Get a list of cloud accounts connected to a workspace
2538
+ */
2539
+ export function getCloudAccountByWorkspace({ jwtToken, accountId, id }: {
2540
+ jwtToken: JwtToken;
2541
+ accountId?: string;
2542
+ id: string;
2543
+ }, opts?: Oazapfts.RequestOpts) {
2544
+ return oazapfts.ok(oazapfts.fetchJson<{
2545
+ status: 200;
2546
+ data: CloudAccountDetails[];
2547
+ } | {
2548
+ status: 422;
2549
+ data: {
2550
+ code: string;
2551
+ status: number;
2552
+ details: string;
2553
+ validationDetails?: ValidationDetails[];
2554
+ };
2555
+ } | {
2556
+ status: 500;
2557
+ data: {
2558
+ code: string;
2559
+ status: number;
2560
+ details: string;
2561
+ validationDetails?: ValidationDetails[];
2562
+ };
2563
+ }>(`/cloud-account/workspace/${encodeURIComponent(id)}${QS.query(QS.explode({
2564
+ jwtToken
2565
+ }))}`, {
2566
+ ...opts,
2567
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2568
+ accountId
2569
+ })
2570
+ }));
2571
+ }
2572
+ /**
2573
+ * Get all available templates for Managed Cloud
2574
+ */
2575
+ export function getManagedCloudTemplate(opts?: Oazapfts.RequestOpts) {
2576
+ return oazapfts.ok(oazapfts.fetchJson<{
2577
+ status: 200;
2578
+ data: ManagedAccountTemplateResponse[];
2579
+ } | {
2580
+ status: 422;
2581
+ data: {
2582
+ code: string;
2583
+ status: number;
2584
+ details: string;
2585
+ validationDetails?: ValidationDetails[];
2586
+ };
2587
+ } | {
2588
+ status: 500;
2589
+ data: {
2590
+ code: string;
2591
+ status: number;
2592
+ details: string;
2593
+ validationDetails?: ValidationDetails[];
2594
+ };
2595
+ }>("/cloud-account/managed-account/template", {
2596
+ ...opts
2597
+ }));
2598
+ }
2599
+ /**
2600
+ * Get all available regions for Managed Cloud
2601
+ */
2602
+ export function getManagedCloudRegion(opts?: Oazapfts.RequestOpts) {
2603
+ return oazapfts.ok(oazapfts.fetchJson<{
2604
+ status: 200;
2605
+ data: ManagedAccountRegionResponse[];
2606
+ } | {
2607
+ status: 422;
2608
+ data: {
2609
+ code: string;
2610
+ status: number;
2611
+ details: string;
2612
+ validationDetails?: ValidationDetails[];
2613
+ };
2614
+ } | {
2615
+ status: 500;
2616
+ data: {
2617
+ code: string;
2618
+ status: number;
2619
+ details: string;
2620
+ validationDetails?: ValidationDetails[];
2621
+ };
2622
+ }>("/cloud-account/managed-account/region", {
2623
+ ...opts
2624
+ }));
2625
+ }
2626
+ /**
2627
+ * Get pages alerts from workspace and environment. That alerts can be filtered
2628
+ */
2629
+ export function getAlerts({ jwtToken, workspace, env, pillar, severity, status, search, sort, page, pageSize }: {
2630
+ jwtToken: JwtToken;
2631
+ workspace: string;
2632
+ env: string;
2633
+ pillar?: "SECURITY" | "COST_OPTIMIZATION" | "RELIABILITY";
2634
+ severity?: "LOW" | "MEDIUM" | "HIGH" | "MANDATORY";
2635
+ status?: "PENDING" | "NOT_APPLICABLE" | "COMPLETED";
2636
+ search?: string;
2637
+ sort?: ("STATUS_ASC" | "STATUS_DESC" | "POLICIES_ASC" | "POLICIES_DESC" | "PILLAR_ASC" | "PILLAR_DESC" | "SEVERITY_ASC" | "SEVERITY_DESC")[];
2638
+ page?: number;
2639
+ pageSize?: number;
2640
+ }, opts?: Oazapfts.RequestOpts) {
2641
+ return oazapfts.ok(oazapfts.fetchJson<{
2642
+ status: 200;
2643
+ data: PaginatedResponseAlert;
2644
+ } | {
2645
+ status: 422;
2646
+ data: {
2647
+ code: string;
2648
+ status: number;
2649
+ details: string;
2650
+ validationDetails?: ValidationDetails[];
2651
+ };
2652
+ } | {
2653
+ status: 500;
2654
+ data: {
2655
+ code: string;
2656
+ status: number;
2657
+ details: string;
2658
+ validationDetails?: ValidationDetails[];
2659
+ };
2660
+ }>(`/alerts${QS.query(QS.explode({
2661
+ jwtToken,
2662
+ workspace,
2663
+ env,
2664
+ pillar,
2665
+ severity,
2666
+ status,
2667
+ search,
2668
+ sort,
2669
+ page,
2670
+ pageSize
2671
+ }))}`, {
2672
+ ...opts
2673
+ }));
2674
+ }
2675
+ export function downloadDataByAccountId({ stackspotAccountId, year, month }: {
2676
+ stackspotAccountId: string;
2677
+ year: number;
2678
+ month: number;
2679
+ }, opts?: Oazapfts.RequestOpts) {
2680
+ return oazapfts.ok(oazapfts.fetchJson<{
2681
+ status: 200;
2682
+ data: AttachmentBase64;
2683
+ } | {
2684
+ status: 422;
2685
+ data: {
2686
+ code: string;
2687
+ status: number;
2688
+ details: string;
2689
+ validationDetails?: ValidationDetails[];
2690
+ };
2691
+ } | {
2692
+ status: 500;
2693
+ data: {
2694
+ code: string;
2695
+ status: number;
2696
+ details: string;
2697
+ validationDetails?: ValidationDetails[];
2698
+ };
2699
+ }>(`/admin/finops/reports/download${QS.query(QS.explode({
2700
+ stackspot_account_id: stackspotAccountId,
2701
+ year,
2702
+ month
2703
+ }))}`, {
2704
+ ...opts
2705
+ }));
2706
+ }
2707
+ /**
2708
+ * List available services
2709
+ */
2710
+ export function listServices1(opts?: Oazapfts.RequestOpts) {
2711
+ return oazapfts.ok(oazapfts.fetchJson<{
2712
+ status: 200;
2713
+ data: ServiceSummary[];
2714
+ } | {
2715
+ status: 422;
2716
+ data: {
2717
+ code: string;
2718
+ status: number;
2719
+ details: string;
2720
+ validationDetails?: ValidationDetails[];
2721
+ };
2722
+ } | {
2723
+ status: 500;
2724
+ data: {
2725
+ code: string;
2726
+ status: number;
2727
+ details: string;
2728
+ validationDetails?: ValidationDetails[];
2729
+ };
2730
+ }>("/admin/cloud-resource/service", {
2731
+ ...opts
2732
+ }));
2733
+ }
2734
+ /**
2735
+ * Get Cloud Account data with details
2736
+ */
2737
+ export function getCloudAccount({ stackspotAccountId, workspaceId, environmentId, provider, $type, status }: {
2738
+ stackspotAccountId?: string;
2739
+ workspaceId?: string;
2740
+ environmentId?: string;
2741
+ provider?: "AWS" | "Azure";
2742
+ $type?: "CustomCloud" | "CloudServices";
2743
+ status?: "Connecting" | "Connected" | "Disconnected" | "Failed" | "Unknown";
2744
+ }, opts?: Oazapfts.RequestOpts) {
2745
+ return oazapfts.ok(oazapfts.fetchJson<{
2746
+ status: 200;
2747
+ data: PaginatedResponseAdminCloudAccountDetails;
2748
+ } | {
2749
+ status: 422;
2750
+ data: {
2751
+ code: string;
2752
+ status: number;
2753
+ details: string;
2754
+ validationDetails?: ValidationDetails[];
2755
+ };
2756
+ } | {
2757
+ status: 500;
2758
+ data: {
2759
+ code: string;
2760
+ status: number;
2761
+ details: string;
2762
+ validationDetails?: ValidationDetails[];
2763
+ };
2764
+ }>(`/admin/cloud-account${QS.query(QS.explode({
2765
+ stackspotAccountId,
2766
+ workspaceId,
2767
+ environmentId,
2768
+ provider,
2769
+ "type": $type,
2770
+ status
2771
+ }))}`, {
2772
+ ...opts
2773
+ }));
2774
+ }
2775
+ /**
2776
+ * Delete a cloud account.
2777
+ */
2778
+ export function deleteCloudAccountFromEnvironment({ jwtToken, id }: {
2779
+ jwtToken: JwtToken;
2780
+ id: string;
2781
+ }, opts?: Oazapfts.RequestOpts) {
2782
+ return oazapfts.ok(oazapfts.fetchJson<{
2783
+ status: 200;
2784
+ data: DeleteCloudAccountResponse;
2785
+ } | {
2786
+ status: 422;
2787
+ data: {
2788
+ code: string;
2789
+ status: number;
2790
+ details: string;
2791
+ validationDetails?: ValidationDetails[];
2792
+ };
2793
+ } | {
2794
+ status: 500;
2795
+ data: {
2796
+ code: string;
2797
+ status: number;
2798
+ details: string;
2799
+ validationDetails?: ValidationDetails[];
2800
+ };
2801
+ }>(`/cloud-account/${encodeURIComponent(id)}${QS.query(QS.explode({
2802
+ jwtToken
2803
+ }))}`, {
2804
+ ...opts,
2805
+ method: "DELETE"
2806
+ }));
2807
+ }
2808
+ /**
2809
+ *
2810
+ * Delete all accounts in a workspace.
2811
+ *
2812
+ */
2813
+ export function deleteManagedAccountsFromWorkspace({ jwtToken, workspaceId }: {
2814
+ jwtToken: JwtToken;
2815
+ workspaceId: string;
2816
+ }, opts?: Oazapfts.RequestOpts) {
2817
+ return oazapfts.ok(oazapfts.fetchJson<{
2818
+ status: 200;
2819
+ data: DeleteCloudAccountResponse;
2820
+ } | {
2821
+ status: 422;
2822
+ data: {
2823
+ code: string;
2824
+ status: number;
2825
+ details: string;
2826
+ validationDetails?: ValidationDetails[];
2827
+ };
2828
+ } | {
2829
+ status: 500;
2830
+ data: {
2831
+ code: string;
2832
+ status: number;
2833
+ details: string;
2834
+ validationDetails?: ValidationDetails[];
2835
+ };
2836
+ }>(`/cloud-account/workspace/${encodeURIComponent(workspaceId)}${QS.query(QS.explode({
2837
+ jwtToken
2838
+ }))}`, {
2839
+ ...opts,
2840
+ method: "DELETE"
2841
+ }));
2842
+ }
2843
+ /**
2844
+ * Delete a relation between control tower and stackspot account
2845
+ */
2846
+ export function deleteAccountTower({ id }: {
2847
+ id: string;
2848
+ }, opts?: Oazapfts.RequestOpts) {
2849
+ return oazapfts.ok(oazapfts.fetchJson<{
2850
+ status: 200;
2851
+ 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";
2852
+ } | {
2853
+ status: 422;
2854
+ data: {
2855
+ code: string;
2856
+ status: number;
2857
+ details: string;
2858
+ validationDetails?: ValidationDetails[];
2859
+ };
2860
+ } | {
2861
+ status: 500;
2862
+ data: {
2863
+ code: string;
2864
+ status: number;
2865
+ details: string;
2866
+ validationDetails?: ValidationDetails[];
2867
+ };
2868
+ }>(`/admin/managed-cloud/control-tower/${encodeURIComponent(id)}`, {
2869
+ ...opts,
2870
+ method: "DELETE"
2871
+ }));
2872
+ }