levelfour 1.0.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 (279) hide show
  1. package/.fernignore +9 -0
  2. package/BaseClient.ts +56 -0
  3. package/Client.ts +90 -0
  4. package/LevelFourClient.ts +50 -0
  5. package/api/errors/UnprocessableEntityError.ts +22 -0
  6. package/api/errors/index.ts +1 -0
  7. package/api/index.ts +3 -0
  8. package/api/resources/apiKeys/client/Client.ts +298 -0
  9. package/api/resources/apiKeys/client/index.ts +1 -0
  10. package/api/resources/apiKeys/client/requests/CreateApiKeyRequest.ts +23 -0
  11. package/api/resources/apiKeys/client/requests/ListApiKeysApiV1ApiKeysGetRequest.ts +11 -0
  12. package/api/resources/apiKeys/client/requests/RevokeApiKeyApiV1ApiKeysKeyIdDeleteRequest.ts +14 -0
  13. package/api/resources/apiKeys/client/requests/RotateApiKeyApiV1ApiKeysKeyIdRotatePostRequest.ts +14 -0
  14. package/api/resources/apiKeys/client/requests/index.ts +4 -0
  15. package/api/resources/apiKeys/exports.ts +4 -0
  16. package/api/resources/apiKeys/index.ts +1 -0
  17. package/api/resources/evaluation/client/Client.ts +71 -0
  18. package/api/resources/evaluation/client/index.ts +1 -0
  19. package/api/resources/evaluation/exports.ts +4 -0
  20. package/api/resources/evaluation/index.ts +1 -0
  21. package/api/resources/health/client/Client.ts +108 -0
  22. package/api/resources/health/client/index.ts +1 -0
  23. package/api/resources/health/exports.ts +4 -0
  24. package/api/resources/health/index.ts +1 -0
  25. package/api/resources/index.ts +24 -0
  26. package/api/resources/prAnalysis/client/Client.ts +100 -0
  27. package/api/resources/prAnalysis/client/index.ts +1 -0
  28. package/api/resources/prAnalysis/client/requests/AnalyzePrRequest.ts +30 -0
  29. package/api/resources/prAnalysis/client/requests/index.ts +1 -0
  30. package/api/resources/prAnalysis/exports.ts +4 -0
  31. package/api/resources/prAnalysis/index.ts +1 -0
  32. package/api/resources/prAnalysisActions/client/Client.ts +418 -0
  33. package/api/resources/prAnalysisActions/client/index.ts +1 -0
  34. package/api/resources/prAnalysisActions/client/requests/DismissSuggestionsApiV1PrAnalysisActionsDismissPostRequest.ts +21 -0
  35. package/api/resources/prAnalysisActions/client/requests/GetIgnoredResourcesApiV1PrAnalysisActionsIgnoreGetRequest.ts +15 -0
  36. package/api/resources/prAnalysisActions/client/requests/GetPrStatusApiV1PrAnalysisActionsStatusGetRequest.ts +15 -0
  37. package/api/resources/prAnalysisActions/client/requests/IgnoreRequest.ts +21 -0
  38. package/api/resources/prAnalysisActions/client/requests/SnoozeSuggestionsApiV1PrAnalysisActionsSnoozePostRequest.ts +21 -0
  39. package/api/resources/prAnalysisActions/client/requests/index.ts +5 -0
  40. package/api/resources/prAnalysisActions/exports.ts +4 -0
  41. package/api/resources/prAnalysisActions/index.ts +1 -0
  42. package/api/resources/prAnalysisInstallations/client/Client.ts +410 -0
  43. package/api/resources/prAnalysisInstallations/client/index.ts +1 -0
  44. package/api/resources/prAnalysisInstallations/client/requests/AddReposRequest.ts +17 -0
  45. package/api/resources/prAnalysisInstallations/client/requests/DeleteInstallationApiV1PrAnalysisInstallationsInstallationIdDeleteRequest.ts +15 -0
  46. package/api/resources/prAnalysisInstallations/client/requests/ListInstallationsApiV1PrAnalysisInstallationsGetRequest.ts +13 -0
  47. package/api/resources/prAnalysisInstallations/client/requests/RegisterInstallationRequest.ts +16 -0
  48. package/api/resources/prAnalysisInstallations/client/requests/RemoveReposRequest.ts +17 -0
  49. package/api/resources/prAnalysisInstallations/client/requests/index.ts +5 -0
  50. package/api/resources/prAnalysisInstallations/exports.ts +4 -0
  51. package/api/resources/prAnalysisInstallations/index.ts +1 -0
  52. package/api/resources/prAnalysisQuery/client/Client.ts +169 -0
  53. package/api/resources/prAnalysisQuery/client/index.ts +1 -0
  54. package/api/resources/prAnalysisQuery/client/requests/ExplainRequest.ts +17 -0
  55. package/api/resources/prAnalysisQuery/client/requests/WhatifRequest.ts +21 -0
  56. package/api/resources/prAnalysisQuery/client/requests/index.ts +2 -0
  57. package/api/resources/prAnalysisQuery/exports.ts +4 -0
  58. package/api/resources/prAnalysisQuery/index.ts +1 -0
  59. package/api/resources/providers/client/Client.ts +991 -0
  60. package/api/resources/providers/client/index.ts +1 -0
  61. package/api/resources/providers/client/requests/GetProviderFilterOptionsApiV1ProvidersProviderIdSpendingFilterOptionsGetRequest.ts +17 -0
  62. package/api/resources/providers/client/requests/GetProviderPotentialSavingsBreakdownApiV1ProvidersProviderIdPotentialSavingsBreakdownGetRequest.ts +19 -0
  63. package/api/resources/providers/client/requests/GetProviderPotentialSavingsSummaryApiV1ProvidersProviderIdPotentialSavingsSummaryGetRequest.ts +11 -0
  64. package/api/resources/providers/client/requests/GetProviderRecommendationFilterOptionsApiV1ProvidersProviderIdRecommendationsFilterOptionsGetRequest.ts +11 -0
  65. package/api/resources/providers/client/requests/GetProviderRecommendationsBreakdownApiV1ProvidersProviderIdRecommendationsGetRequest.ts +33 -0
  66. package/api/resources/providers/client/requests/GetProviderRecommendationsOverviewApiV1ProvidersProviderIdRecommendationsOverviewGetRequest.ts +11 -0
  67. package/api/resources/providers/client/requests/GetProviderRecommendationsSummaryApiV1ProvidersProviderIdRecommendationsSummaryGetRequest.ts +11 -0
  68. package/api/resources/providers/client/requests/GetProviderSavedSummaryApiV1ProvidersProviderIdSavingsSummaryGetRequest.ts +11 -0
  69. package/api/resources/providers/client/requests/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetRequest.ts +45 -0
  70. package/api/resources/providers/client/requests/GetProviderSpendingSummaryApiV1ProvidersProviderIdSpendingSummaryGetRequest.ts +11 -0
  71. package/api/resources/providers/client/requests/GetProviderSpendingTimelineApiV1ProvidersProviderIdSpendingTimelineGetRequest.ts +17 -0
  72. package/api/resources/providers/client/requests/GetSavedByProviderBreakdownApiV1ProvidersProviderIdSavingsBreakdownGetRequest.ts +31 -0
  73. package/api/resources/providers/client/requests/index.ts +12 -0
  74. package/api/resources/providers/exports.ts +4 -0
  75. package/api/resources/providers/index.ts +2 -0
  76. package/api/resources/providers/types/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetResponse.ts +8 -0
  77. package/api/resources/providers/types/index.ts +1 -0
  78. package/api/resources/recommendations/client/Client.ts +815 -0
  79. package/api/resources/recommendations/client/index.ts +1 -0
  80. package/api/resources/recommendations/client/requests/AcceptTermsApiV1RecommendationsRecommendationIdAcceptTermsPostRequest.ts +11 -0
  81. package/api/resources/recommendations/client/requests/CompleteWizardApiV1RecommendationsRecommendationIdCompletePostRequest.ts +11 -0
  82. package/api/resources/recommendations/client/requests/GetRecommendationDetailsApiV1RecommendationsRecommendationIdDetailsGetRequest.ts +11 -0
  83. package/api/resources/recommendations/client/requests/GetRecommendationForWizardApiV1RecommendationsRecommendationIdGetRequest.ts +11 -0
  84. package/api/resources/recommendations/client/requests/GetRecommendationsApiV1RecommendationsGetRequest.ts +16 -0
  85. package/api/resources/recommendations/client/requests/ImplementationMethodRequest.ts +14 -0
  86. package/api/resources/recommendations/client/requests/SavingsDecisionRequest.ts +18 -0
  87. package/api/resources/recommendations/client/requests/UpdateTagRequest.ts +13 -0
  88. package/api/resources/recommendations/client/requests/index.ts +8 -0
  89. package/api/resources/recommendations/exports.ts +4 -0
  90. package/api/resources/recommendations/index.ts +1 -0
  91. package/api/resources/savings/client/Client.ts +231 -0
  92. package/api/resources/savings/client/index.ts +1 -0
  93. package/api/resources/savings/client/requests/ExecutionRequestBody.ts +15 -0
  94. package/api/resources/savings/client/requests/GetSavedBreakdownApiV1SavingsBreakdownGetRequest.ts +30 -0
  95. package/api/resources/savings/client/requests/index.ts +2 -0
  96. package/api/resources/savings/exports.ts +4 -0
  97. package/api/resources/savings/index.ts +1 -0
  98. package/api/resources/spending/client/Client.ts +288 -0
  99. package/api/resources/spending/client/index.ts +1 -0
  100. package/api/resources/spending/client/requests/GetCostBreakdownApiV1SpendingBreakdownGetRequest.ts +30 -0
  101. package/api/resources/spending/client/requests/GetDailySpendingBreakdownApiV1SpendingDailyBreakdownGetRequest.ts +12 -0
  102. package/api/resources/spending/client/requests/index.ts +2 -0
  103. package/api/resources/spending/exports.ts +4 -0
  104. package/api/resources/spending/index.ts +2 -0
  105. package/api/resources/spending/types/GetCostBreakdownApiV1SpendingBreakdownGetResponse.ts +9 -0
  106. package/api/resources/spending/types/index.ts +1 -0
  107. package/api/resources/webhooks/client/Client.ts +232 -0
  108. package/api/resources/webhooks/client/index.ts +1 -0
  109. package/api/resources/webhooks/client/requests/DeleteEndpointApiV1WebhooksEndpointsEndpointIdDeleteRequest.ts +14 -0
  110. package/api/resources/webhooks/client/requests/ListEndpointsApiV1WebhooksEndpointsGetRequest.ts +11 -0
  111. package/api/resources/webhooks/client/requests/RegisterEndpointRequest.ts +18 -0
  112. package/api/resources/webhooks/client/requests/index.ts +3 -0
  113. package/api/resources/webhooks/exports.ts +4 -0
  114. package/api/resources/webhooks/index.ts +1 -0
  115. package/api/types/AcceptTermsData.ts +10 -0
  116. package/api/types/AcceptTermsResponse.ts +12 -0
  117. package/api/types/ActionRequest.ts +14 -0
  118. package/api/types/ApiKeyCreatedData.ts +13 -0
  119. package/api/types/ApiKeyData.ts +12 -0
  120. package/api/types/ComparisonItem.ts +10 -0
  121. package/api/types/CompleteWizardData.ts +12 -0
  122. package/api/types/CompleteWizardResponse.ts +12 -0
  123. package/api/types/CostBreakdownData.ts +14 -0
  124. package/api/types/CostBreakdownItem.ts +27 -0
  125. package/api/types/CostBreakdownRawData.ts +15 -0
  126. package/api/types/CostBreakdownRawResponse.ts +12 -0
  127. package/api/types/CostBreakdownResponse.ts +12 -0
  128. package/api/types/CostsBreakdownChartData.ts +19 -0
  129. package/api/types/CostsBreakdownChartResponse.ts +12 -0
  130. package/api/types/CostsBreakdownDataPoint.ts +17 -0
  131. package/api/types/CostsBreakdownGroupedChartData.ts +21 -0
  132. package/api/types/CostsBreakdownGroupedChartResponse.ts +12 -0
  133. package/api/types/CostsBreakdownGroupedDataPoint.ts +13 -0
  134. package/api/types/CostsBreakdownTotals.ts +15 -0
  135. package/api/types/CreateApiKeyResponse.ts +9 -0
  136. package/api/types/DailySpendingBreakdownData.ts +17 -0
  137. package/api/types/DailySpendingBreakdownResponse.ts +12 -0
  138. package/api/types/DailySpendingDataPoint.ts +11 -0
  139. package/api/types/DashboardSummaryData.ts +29 -0
  140. package/api/types/DashboardSummaryResponse.ts +12 -0
  141. package/api/types/DeleteEndpointData.ts +6 -0
  142. package/api/types/DeleteEndpointResponse.ts +9 -0
  143. package/api/types/EndpointData.ts +9 -0
  144. package/api/types/EvaluationStatusData.ts +27 -0
  145. package/api/types/EvaluationStatusResponse.ts +12 -0
  146. package/api/types/ExecutionLogCommand.ts +7 -0
  147. package/api/types/ExecutionLogEntry.ts +10 -0
  148. package/api/types/ExecutionStepSchema.ts +9 -0
  149. package/api/types/HttpValidationError.ts +7 -0
  150. package/api/types/ImplementationMethodData.ts +10 -0
  151. package/api/types/ImplementationMethodResponse.ts +12 -0
  152. package/api/types/ImplementationStep.ts +8 -0
  153. package/api/types/ListApiKeysData.ts +8 -0
  154. package/api/types/ListApiKeysResponse.ts +9 -0
  155. package/api/types/ListEndpointsResponse.ts +9 -0
  156. package/api/types/MetricDataPoint.ts +8 -0
  157. package/api/types/MetricSeries.ts +15 -0
  158. package/api/types/MetricSeriesEntry.ts +9 -0
  159. package/api/types/MonthlySpendingData.ts +11 -0
  160. package/api/types/MonthlySpendingDataPoint.ts +11 -0
  161. package/api/types/MonthlySpendingResponse.ts +12 -0
  162. package/api/types/PaginationMeta.ts +19 -0
  163. package/api/types/ProcessingRecommendationItem.ts +23 -0
  164. package/api/types/ProcessingRecommendationsData.ts +12 -0
  165. package/api/types/ProcessingRecommendationsResponse.ts +12 -0
  166. package/api/types/Provider.ts +17 -0
  167. package/api/types/ProviderBreakdownData.ts +13 -0
  168. package/api/types/ProviderBreakdownItem.ts +31 -0
  169. package/api/types/ProviderBreakdownResponse.ts +12 -0
  170. package/api/types/ProviderFilterOptionsData.ts +19 -0
  171. package/api/types/ProviderFilterOptionsResponse.ts +12 -0
  172. package/api/types/ProviderPotentialSavingsSummaryData.ts +17 -0
  173. package/api/types/ProviderPotentialSavingsSummaryResponse.ts +12 -0
  174. package/api/types/ProviderRecommendationsSummaryData.ts +15 -0
  175. package/api/types/ProviderRecommendationsSummaryResponse.ts +12 -0
  176. package/api/types/ProviderSavedSummaryData.ts +21 -0
  177. package/api/types/ProviderSavedSummaryResponse.ts +12 -0
  178. package/api/types/ProviderServiceBreakdownData.ts +26 -0
  179. package/api/types/ProviderServiceBreakdownItem.ts +29 -0
  180. package/api/types/ProviderServiceBreakdownRawData.ts +25 -0
  181. package/api/types/ProviderServiceBreakdownRawResponse.ts +12 -0
  182. package/api/types/ProviderServiceBreakdownResponse.ts +12 -0
  183. package/api/types/ProviderServiceCostsBreakdownData.ts +25 -0
  184. package/api/types/ProviderServiceCostsBreakdownResponse.ts +12 -0
  185. package/api/types/ProviderServiceCostsDataPoint.ts +13 -0
  186. package/api/types/ProviderSpending.ts +23 -0
  187. package/api/types/ProviderSpendingSummaryData.ts +27 -0
  188. package/api/types/ProviderSpendingSummaryResponse.ts +12 -0
  189. package/api/types/ProviderTimelineData.ts +23 -0
  190. package/api/types/ProviderTimelineResponse.ts +12 -0
  191. package/api/types/ProviderTopService.ts +13 -0
  192. package/api/types/ProvidersSummaryData.ts +10 -0
  193. package/api/types/ProvidersSummaryResponse.ts +12 -0
  194. package/api/types/RecommendationActions.ts +28 -0
  195. package/api/types/RecommendationDetail.ts +22 -0
  196. package/api/types/RecommendationDetailResponse.ts +12 -0
  197. package/api/types/RecommendationFilterOptionsData.ts +15 -0
  198. package/api/types/RecommendationFilterOptionsResponse.ts +12 -0
  199. package/api/types/RecommendationItem.ts +19 -0
  200. package/api/types/RecommendationWizardData.ts +83 -0
  201. package/api/types/RecommendationWizardResponse.ts +12 -0
  202. package/api/types/RecommendationsBreakdownData.ts +11 -0
  203. package/api/types/RecommendationsBreakdownResponse.ts +12 -0
  204. package/api/types/RecommendationsOverviewData.ts +19 -0
  205. package/api/types/RecommendationsOverviewResponse.ts +12 -0
  206. package/api/types/RegisterEndpointResponse.ts +9 -0
  207. package/api/types/ResourceChange.ts +14 -0
  208. package/api/types/ResourceSnapshot.ts +7 -0
  209. package/api/types/RevokeApiKeyData.ts +6 -0
  210. package/api/types/RevokeApiKeyResponse.ts +9 -0
  211. package/api/types/RiskAssessment.ts +11 -0
  212. package/api/types/RiskFactor.ts +8 -0
  213. package/api/types/SavedBreakdownData.ts +13 -0
  214. package/api/types/SavedBreakdownResponse.ts +12 -0
  215. package/api/types/SavedByProviderBreakdownData.ts +13 -0
  216. package/api/types/SavedByProviderBreakdownResponse.ts +12 -0
  217. package/api/types/SavedByProviderItem.ts +29 -0
  218. package/api/types/SavedItem.ts +20 -0
  219. package/api/types/SavedProviderSummary.ts +13 -0
  220. package/api/types/SavedSummaryData.ts +23 -0
  221. package/api/types/SavedSummaryResponse.ts +12 -0
  222. package/api/types/SavingsDecisionData.ts +13 -0
  223. package/api/types/SavingsDecisionResponse.ts +12 -0
  224. package/api/types/SpendingByDateItem.ts +13 -0
  225. package/api/types/TopRecommendation.ts +21 -0
  226. package/api/types/TriggerInfo.ts +8 -0
  227. package/api/types/UpdateTagData.ts +6 -0
  228. package/api/types/UpdateTagResponse.ts +9 -0
  229. package/api/types/ValidationError.ts +17 -0
  230. package/api/types/index.ts +115 -0
  231. package/core/exports.ts +1 -0
  232. package/core/fetcher/APIResponse.ts +23 -0
  233. package/core/fetcher/BinaryResponse.ts +34 -0
  234. package/core/fetcher/EndpointMetadata.ts +13 -0
  235. package/core/fetcher/EndpointSupplier.ts +14 -0
  236. package/core/fetcher/Fetcher.ts +398 -0
  237. package/core/fetcher/Headers.ts +93 -0
  238. package/core/fetcher/HttpResponsePromise.ts +116 -0
  239. package/core/fetcher/RawResponse.ts +61 -0
  240. package/core/fetcher/Supplier.ts +11 -0
  241. package/core/fetcher/createRequestUrl.ts +6 -0
  242. package/core/fetcher/getErrorResponseBody.ts +33 -0
  243. package/core/fetcher/getFetchFn.ts +3 -0
  244. package/core/fetcher/getHeader.ts +8 -0
  245. package/core/fetcher/getRequestBody.ts +20 -0
  246. package/core/fetcher/getResponseBody.ts +58 -0
  247. package/core/fetcher/index.ts +11 -0
  248. package/core/fetcher/makeRequest.ts +70 -0
  249. package/core/fetcher/requestWithRetries.ts +64 -0
  250. package/core/fetcher/signals.ts +26 -0
  251. package/core/headers.ts +33 -0
  252. package/core/index.ts +4 -0
  253. package/core/json.ts +27 -0
  254. package/core/logging/exports.ts +19 -0
  255. package/core/logging/index.ts +1 -0
  256. package/core/logging/logger.ts +203 -0
  257. package/core/runtime/index.ts +1 -0
  258. package/core/runtime/runtime.ts +134 -0
  259. package/core/url/encodePathParam.ts +18 -0
  260. package/core/url/index.ts +3 -0
  261. package/core/url/join.ts +79 -0
  262. package/core/url/qs.ts +74 -0
  263. package/errors/LevelFourError.ts +58 -0
  264. package/errors/LevelFourTimeoutError.ts +13 -0
  265. package/errors/handleNonStatusCodeError.ts +37 -0
  266. package/errors/index.ts +2 -0
  267. package/errors.ts +100 -0
  268. package/exports.ts +1 -0
  269. package/index.ts +22 -0
  270. package/jest.config.js +17 -0
  271. package/package.json +35 -0
  272. package/pagination.ts +54 -0
  273. package/telemetry.ts +64 -0
  274. package/tests/auth.test.ts +64 -0
  275. package/tests/errors.test.ts +92 -0
  276. package/tests/pagination.test.ts +72 -0
  277. package/tests/telemetry.test.ts +110 -0
  278. package/tsconfig.json +22 -0
  279. package/webhooks.ts +77 -0
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for recommendation detail
7
+ */
8
+ export interface RecommendationDetailResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.RecommendationDetail;
12
+ }
@@ -0,0 +1,15 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Filter options for provider recommendation breakdown
5
+ */
6
+ export interface RecommendationFilterOptionsData {
7
+ /** Distinct environment values */
8
+ environments?: string[] | undefined;
9
+ /** Distinct account values */
10
+ accounts?: string[] | undefined;
11
+ /** Distinct tag values */
12
+ tags?: string[] | undefined;
13
+ /** Distinct service values */
14
+ services?: string[] | undefined;
15
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for recommendation filter options
7
+ */
8
+ export interface RecommendationFilterOptionsResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.RecommendationFilterOptionsData;
12
+ }
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Detailed recommendation item (for list view)
7
+ */
8
+ export interface RecommendationItem {
9
+ /** Unique business identifier for the recommendation */
10
+ recommendation_id: string;
11
+ service: string;
12
+ environment?: (string | null) | undefined;
13
+ analysis_period?: (string | null) | undefined;
14
+ monthly_savings: number;
15
+ annual_savings: number;
16
+ current_spending: number;
17
+ savings_percentage: number;
18
+ actions?: (LevelFour.RecommendationActions | null) | undefined;
19
+ }
@@ -0,0 +1,83 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Full recommendation data for wizard flow
7
+ */
8
+ export interface RecommendationWizardData {
9
+ /** Unique business identifier */
10
+ recommendation_id: string;
11
+ service: string;
12
+ account?: (string | null) | undefined;
13
+ region?: (string | null) | undefined;
14
+ /** Current monthly spending */
15
+ monthly_spending: number;
16
+ /** Potential monthly savings */
17
+ monthly_savings: number;
18
+ /** Annual savings amount */
19
+ annual_savings: number;
20
+ /** Spending as percentage */
21
+ monthly_spending_percentage?: (number | null) | undefined;
22
+ /** Savings as percentage */
23
+ monthly_savings_percentage?: (number | null) | undefined;
24
+ /** Available implementation methods: Automated Savings, IaC, Manual Setup */
25
+ implementation_tags?: string[] | undefined;
26
+ terms_accepted_by?: (string | null) | undefined;
27
+ terms_accepted_at?: (string | null) | undefined;
28
+ /** pending, accepted, rejected */
29
+ saving_acceptance?: (string | null) | undefined;
30
+ saving_accepted_by?: (string | null) | undefined;
31
+ saving_accepted_at?: (string | null) | undefined;
32
+ /** operational, strategy, not_applicable, other */
33
+ rejection_reason?: (string | null) | undefined;
34
+ rejection_explanation?: (string | null) | undefined;
35
+ /** one-click, iac, one-click-plus-iac */
36
+ implementation_method?: (string | null) | undefined;
37
+ status?: string | undefined;
38
+ /** Markdown overview of the recommendation */
39
+ overview?: (string | null) | undefined;
40
+ key_takeaway?: (string | null) | undefined;
41
+ /** Markdown description of operational impact */
42
+ operational_impact?: (string | null) | undefined;
43
+ iam_role_arn?: (string | null) | undefined;
44
+ iam_policy?: (Record<string, unknown> | null) | undefined;
45
+ vcs_username?: (string | null) | undefined;
46
+ vcs_email?: (string | null) | undefined;
47
+ /** Markdown instructions for manual implementation */
48
+ manual_instructions?: (string | null) | undefined;
49
+ completed_at?: (string | null) | undefined;
50
+ /** Environment (e.g., Production, Staging) */
51
+ environment?: (string | null) | undefined;
52
+ /** Resource tag value */
53
+ tag?: (string | null) | undefined;
54
+ /** All resource tags */
55
+ tags?: string[] | undefined;
56
+ /** Direct link to resource in cloud console */
57
+ resource_console_url?: (string | null) | undefined;
58
+ /** Brief summary of the recommendation */
59
+ description?: (string | null) | undefined;
60
+ /** Before/after comparison rows */
61
+ comparison_data?: LevelFour.ComparisonItem[] | undefined;
62
+ /** Historical metric series for the resource */
63
+ metrics?: RecommendationWizardData.Metrics | undefined;
64
+ /** Risk level and factors */
65
+ risk_assessment?: (LevelFour.RiskAssessment | null) | undefined;
66
+ /** Ordered implementation steps */
67
+ implementation_steps?: LevelFour.ImplementationStep[] | undefined;
68
+ /** Execution pipeline steps for status flow */
69
+ execution_steps?: LevelFour.ExecutionStepSchema[] | undefined;
70
+ /** Execution log entries with commands */
71
+ execution_logs?: LevelFour.ExecutionLogEntry[] | undefined;
72
+ /** Who triggered the execution and when */
73
+ trigger_info?: (LevelFour.TriggerInfo | null) | undefined;
74
+ /** Overall implementation status label */
75
+ implementation_status?: (string | null) | undefined;
76
+ }
77
+
78
+ export namespace RecommendationWizardData {
79
+ /**
80
+ * Historical metric series for the resource
81
+ */
82
+ export type Metrics = LevelFour.MetricSeries[] | Record<string, unknown>;
83
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for wizard recommendation detail
7
+ */
8
+ export interface RecommendationWizardResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.RecommendationWizardData;
12
+ }
@@ -0,0 +1,11 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Recommendations breakdown data with pagination
7
+ */
8
+ export interface RecommendationsBreakdownData {
9
+ items: LevelFour.RecommendationItem[];
10
+ pagination: LevelFour.PaginationMeta;
11
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for recommendations breakdown
7
+ */
8
+ export interface RecommendationsBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.RecommendationsBreakdownData;
12
+ }
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Recommendations overview metrics for a provider
5
+ */
6
+ export interface RecommendationsOverviewData {
7
+ /** Total cost from last month's complete billing cycle (from aws_costs_daily) */
8
+ total_spend: number;
9
+ /** Savings opportunities identified and available to execute */
10
+ available_savings: number;
11
+ /** Savings opportunities pending required actions */
12
+ pending_savings: number;
13
+ /** Total savings implemented inception to date */
14
+ saved_itd: number;
15
+ /** Sum of all recommendations' monthly_savings */
16
+ potential_savings?: (number | null) | undefined;
17
+ /** Sum of allowed evaluation IDs' monthly_savings */
18
+ evaluation_available_savings?: (number | null) | undefined;
19
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for recommendations overview
7
+ */
8
+ export interface RecommendationsOverviewResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.RecommendationsOverviewData;
12
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ export interface RegisterEndpointResponse {
6
+ success?: boolean | undefined;
7
+ timestamp?: string | undefined;
8
+ data: LevelFour.EndpointData;
9
+ }
@@ -0,0 +1,14 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface ResourceChange {
4
+ /** Terraform resource type, e.g. aws_instance */
5
+ resource_type: string;
6
+ /** Terraform resource name, e.g. api_server */
7
+ resource_name: string;
8
+ /** One of: added, modified, removed */
9
+ change_type: string;
10
+ /** Source .tf filename */
11
+ file: string;
12
+ /** Changed attributes with old/new values */
13
+ attributes_changed?: Record<string, unknown> | undefined;
14
+ }
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface ResourceSnapshot {
4
+ resource_type: string;
5
+ resource_name: string;
6
+ attributes?: Record<string, unknown> | undefined;
7
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface RevokeApiKeyData {
4
+ id: string;
5
+ revoked: boolean;
6
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ export interface RevokeApiKeyResponse {
6
+ success?: boolean | undefined;
7
+ timestamp?: string | undefined;
8
+ data: LevelFour.RevokeApiKeyData;
9
+ }
@@ -0,0 +1,11 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ export interface RiskAssessment {
6
+ /** LOW, MODERATE, HIGH, CRITICAL */
7
+ level: string;
8
+ factors?: LevelFour.RiskFactor[] | undefined;
9
+ /** Documentation URLs used for the recommendation */
10
+ sources?: (string[] | null) | undefined;
11
+ }
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface RiskFactor {
4
+ /** Risk factor name */
5
+ factor: string;
6
+ /** Risk explanation */
7
+ detail: string;
8
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Saved breakdown data with pagination
7
+ */
8
+ export interface SavedBreakdownData {
9
+ /** Sum of monthly_savings across all filtered results */
10
+ total_savings: number;
11
+ items: LevelFour.SavedItem[];
12
+ pagination: LevelFour.PaginationMeta;
13
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for saved breakdown
7
+ */
8
+ export interface SavedBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.SavedBreakdownData;
12
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Saved by provider breakdown data with pagination
7
+ */
8
+ export interface SavedByProviderBreakdownData {
9
+ /** Sum of monthly_savings for this provider (filtered) */
10
+ total_savings: number;
11
+ items: LevelFour.SavedByProviderItem[];
12
+ pagination: LevelFour.PaginationMeta;
13
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for saved by provider breakdown
7
+ */
8
+ export interface SavedByProviderBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.SavedByProviderBreakdownData;
12
+ }
@@ -0,0 +1,29 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Item for Savings Audit breakdown by provider
5
+ */
6
+ export interface SavedByProviderItem {
7
+ /** Period in YYYY-MM format */
8
+ period: string;
9
+ /** Cloud account ID */
10
+ account_id?: (string | null) | undefined;
11
+ /** Environment: Production, Staging, etc. */
12
+ environment?: (string | null) | undefined;
13
+ /** Provider identifier: aws, gcp, azure, k8s */
14
+ provider: string;
15
+ /** Resource/service name - maps to Resource column in UI */
16
+ service: string;
17
+ /** Usage type description */
18
+ usage_type: string;
19
+ /** Usage quantity */
20
+ usage_quantity: number;
21
+ /** Usage unit */
22
+ usage_unit: string;
23
+ /** Pre-optimization cost */
24
+ cost: number;
25
+ /** Monthly savings amount */
26
+ savings: number;
27
+ /** User who approved - maps from approved_by */
28
+ author?: (string | null) | undefined;
29
+ }
@@ -0,0 +1,20 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Detailed saved item
5
+ */
6
+ export interface SavedItem {
7
+ period: string;
8
+ account_id?: (string | null) | undefined;
9
+ environment?: (string | null) | undefined;
10
+ service: string;
11
+ usage_type: string;
12
+ usage_quantity: number;
13
+ usage_unit: string;
14
+ approved_by?: (string | null) | undefined;
15
+ pre_optimization_cost: number;
16
+ post_optimization_cost: number;
17
+ monthly_savings: number;
18
+ annual_savings: number;
19
+ roi: number;
20
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Provider-level savings summary for Savings Audit
5
+ */
6
+ export interface SavedProviderSummary {
7
+ /** Provider identifier: aws, gcp, azure, k8s */
8
+ provider_id: string;
9
+ /** Display name: AWS, GCP, etc. */
10
+ provider: string;
11
+ /** Total monthly savings for this provider */
12
+ total_savings: number;
13
+ }
@@ -0,0 +1,23 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Savings Audit summary data - simplified for UI BigNumbers
7
+ */
8
+ export interface SavedSummaryData {
9
+ /** Total monthly savings from implemented recommendations */
10
+ total_monthly_savings: number;
11
+ /** MoM change percentage */
12
+ total_monthly_savings_percentage?: (number | null) | undefined;
13
+ /** Total annual savings */
14
+ total_annual_savings: number;
15
+ /** Payback period in months */
16
+ payback?: (number | null) | undefined;
17
+ /** Average ROI percentage */
18
+ average_roi: number;
19
+ /** Savings Audit total (annualized) */
20
+ total_savings: number;
21
+ /** Per-provider savings breakdown for filtering */
22
+ providers?: LevelFour.SavedProviderSummary[] | undefined;
23
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response for saved summary
7
+ */
8
+ export interface SavedSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.SavedSummaryData;
12
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Data returned after making a decision
5
+ */
6
+ export interface SavingsDecisionData {
7
+ recommendation_id: string;
8
+ saving_acceptance: string;
9
+ saving_accepted_by: string;
10
+ saving_accepted_at: string;
11
+ rejection_reason?: (string | null) | undefined;
12
+ rejection_explanation?: (string | null) | undefined;
13
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Response after making a decision
7
+ */
8
+ export interface SavingsDecisionResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.SavingsDecisionData;
12
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Daily spending data point
5
+ */
6
+ export interface SpendingByDateItem {
7
+ /** Date in YYYY-MM-DD format */
8
+ date: string;
9
+ /** Cost for this date */
10
+ value: number;
11
+ /** Change from previous day */
12
+ change_percentage?: (number | null) | undefined;
13
+ }
@@ -0,0 +1,21 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Top recommendation for a specific provider
5
+ */
6
+ export interface TopRecommendation {
7
+ /** Unique identifier for the recommendation */
8
+ recommendation_id: string;
9
+ /** Service name (e.g., EC2, Cloud SQL, Virtual Machines) */
10
+ service: string;
11
+ /** Monthly savings amount */
12
+ monthly_savings: number;
13
+ /** Annual savings amount */
14
+ annual_savings: number;
15
+ /** Current monthly spending for this resource */
16
+ current_monthly_spending: number;
17
+ /** Savings as percentage of current spending */
18
+ savings_percentage: number;
19
+ /** Display status: available, pending, processing, optimized, rejected, unavailable */
20
+ status: string;
21
+ }
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface TriggerInfo {
4
+ triggered_via: string;
5
+ triggered_by_email: string;
6
+ triggered_at?: (string | null) | undefined;
7
+ approved_by?: string[] | undefined;
8
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface UpdateTagData {
4
+ recommendation_id: string;
5
+ tag?: (string | null) | undefined;
6
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ export interface UpdateTagResponse {
6
+ success?: boolean | undefined;
7
+ timestamp?: string | undefined;
8
+ data: LevelFour.UpdateTagData;
9
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ export interface ValidationError {
4
+ loc: ValidationError.Loc.Item[];
5
+ msg: string;
6
+ type: string;
7
+ input?: unknown | undefined;
8
+ ctx?: Record<string, unknown> | undefined;
9
+ }
10
+
11
+ export namespace ValidationError {
12
+ export type Loc = Loc.Item[];
13
+
14
+ export namespace Loc {
15
+ export type Item = string | number;
16
+ }
17
+ }