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 monthly spending
7
+ */
8
+ export interface MonthlySpendingResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.MonthlySpendingData;
12
+ }
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Pagination metadata
5
+ */
6
+ export interface PaginationMeta {
7
+ /** Total number of items across all pages */
8
+ total_items: number;
9
+ /** Total number of pages */
10
+ total_pages: number;
11
+ /** Current page number (1-indexed) */
12
+ current_page: number;
13
+ /** Number of items per page */
14
+ page_size: number;
15
+ /** Whether there is a next page */
16
+ has_next: boolean;
17
+ /** Whether there is a previous page */
18
+ has_previous: boolean;
19
+ }
@@ -0,0 +1,23 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * A recommendation currently in processing status
5
+ */
6
+ export interface ProcessingRecommendationItem {
7
+ /** Unique business identifier */
8
+ recommendation_id: string;
9
+ /** Service name (e.g., EC2, EBS, RDS) */
10
+ service: string;
11
+ /** Environment (e.g., Production, Staging) */
12
+ environment?: (string | null) | undefined;
13
+ /** Monthly savings amount */
14
+ monthly_savings: number;
15
+ /** Annual savings amount */
16
+ annual_savings: number;
17
+ /** one-click, iac, one-click-plus-iac, manual */
18
+ implementation_method?: (string | null) | undefined;
19
+ /** Status (should be 'processing') */
20
+ status: string;
21
+ /** When the wizard was completed */
22
+ completed_at?: (string | null) | 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
+ * Data for processing recommendations list
7
+ */
8
+ export interface ProcessingRecommendationsData {
9
+ items: LevelFour.ProcessingRecommendationItem[];
10
+ /** Number of processing recommendations */
11
+ count: number;
12
+ }
@@ -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 processing recommendations endpoint
7
+ */
8
+ export interface ProcessingRecommendationsResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProcessingRecommendationsData;
12
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Provider-level savings summary
5
+ */
6
+ export interface Provider {
7
+ /** Provider identifier: aws, gcp, azure, k8s */
8
+ provider_id: string;
9
+ /** Display name: AWS, GCP, etc. */
10
+ provider_name: string;
11
+ /** Current monthly spending for this provider */
12
+ monthly_spending: number;
13
+ /** Total potential monthly savings */
14
+ potential_savings: number;
15
+ /** Savings as percentage of spending */
16
+ potential_savings_percentage: number;
17
+ }
@@ -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
+ * Provider-specific breakdown with pagination
7
+ */
8
+ export interface ProviderBreakdownData {
9
+ /** Sum of monthly_savings for all recommendations (not just current page) */
10
+ total_savings: number;
11
+ items: LevelFour.ProviderBreakdownItem[];
12
+ pagination: LevelFour.PaginationMeta;
13
+ }
@@ -0,0 +1,31 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Simplified breakdown item for provider-specific view
7
+ */
8
+ export interface ProviderBreakdownItem {
9
+ /** Unique identifier for the recommendation */
10
+ recommendation_id: string;
11
+ /** Service name (e.g., EC2, EBS, RDS) */
12
+ service: string;
13
+ /** Environment (e.g., Production, Staging) */
14
+ environment?: (string | null) | undefined;
15
+ /** Cloud account identifier */
16
+ account?: (string | null) | undefined;
17
+ /** Resource tag value */
18
+ tag?: (string | null) | undefined;
19
+ /** Monthly savings amount */
20
+ monthly_savings: number;
21
+ /** Savings as percentage of current spending */
22
+ savings_percentage: number;
23
+ /** Status: pending, processing, optimized, rejected, unavailable */
24
+ status: string;
25
+ /** Action details for this recommendation */
26
+ actions?: (LevelFour.RecommendationActions | null) | undefined;
27
+ /** When terms were accepted, null if not yet accepted */
28
+ terms_accepted_at?: (string | null) | undefined;
29
+ /** User who authored/approved the savings decision */
30
+ saving_accepted_by?: (string | null) | undefined;
31
+ }
@@ -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 provider-specific breakdown
7
+ */
8
+ export interface ProviderBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderBreakdownData;
12
+ }
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Filter options data for provider spending breakdown
5
+ */
6
+ export interface ProviderFilterOptionsData {
7
+ /** Provider identifier */
8
+ provider_id: string;
9
+ /** Distinct service names available for filtering */
10
+ services: string[];
11
+ /** Distinct regions available for filtering */
12
+ regions: string[];
13
+ /** Distinct account IDs available for filtering */
14
+ accounts: string[];
15
+ /** Distinct tag keys available for filtering */
16
+ tag_keys?: string[] | undefined;
17
+ /** Distinct tag values available for filtering */
18
+ tag_values?: string[] | 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 provider filter options
7
+ */
8
+ export interface ProviderFilterOptionsResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderFilterOptionsData;
12
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Provider-specific potential savings summary
5
+ */
6
+ export interface ProviderPotentialSavingsSummaryData {
7
+ /** Provider identifier */
8
+ provider_id: string;
9
+ /** Total potential monthly savings */
10
+ total_monthly_savings: number;
11
+ /** Total current monthly spending */
12
+ total_current_spending: number;
13
+ /** Number of pending recommendations */
14
+ total_recommendations: number;
15
+ /** Savings as percentage of current spending */
16
+ savings_percentage: number;
17
+ }
@@ -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 provider-specific potential savings summary
7
+ */
8
+ export interface ProviderPotentialSavingsSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderPotentialSavingsSummaryData;
12
+ }
@@ -0,0 +1,15 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Provider-specific recommendations summary with top recommendations
7
+ */
8
+ export interface ProviderRecommendationsSummaryData {
9
+ /** Provider identifier */
10
+ provider_id: string;
11
+ /** Provider display name */
12
+ provider_name: string;
13
+ /** Top 3 recommendations by savings */
14
+ top_recommendations: LevelFour.TopRecommendation[];
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 provider-specific recommendations summary
7
+ */
8
+ export interface ProviderRecommendationsSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderRecommendationsSummaryData;
12
+ }
@@ -0,0 +1,21 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Provider-specific Savings Audit summary for BigNumbers
5
+ */
6
+ export interface ProviderSavedSummaryData {
7
+ /** Provider identifier: aws, gcp, azure, k8s */
8
+ provider_id: string;
9
+ /** Display name: AWS, GCP, etc. */
10
+ provider_name: string;
11
+ /** Total monthly savings for this provider */
12
+ total_monthly_savings: number;
13
+ /** MoM change percentage */
14
+ total_monthly_savings_percentage?: (number | null) | undefined;
15
+ /** Total annual savings (monthly * 12) */
16
+ total_annual_savings: number;
17
+ /** Average ROI percentage */
18
+ average_roi: number;
19
+ /** Number of implemented savings */
20
+ total_items: number;
21
+ }
@@ -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 provider-specific saved summary
7
+ */
8
+ export interface ProviderSavedSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderSavedSummaryData;
12
+ }
@@ -0,0 +1,26 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Provider service breakdown data with pagination
7
+ */
8
+ export interface ProviderServiceBreakdownData {
9
+ /** Provider identifier */
10
+ provider_id: string;
11
+ /** Display name */
12
+ provider_name: string;
13
+ /** Period in YYYY-MM format (legacy, use start_date/end_date) */
14
+ period: string;
15
+ /** Start date in YYYY-MM-DD format */
16
+ start_date: string;
17
+ /** End date in YYYY-MM-DD format */
18
+ end_date: string;
19
+ /** Total cost for the period */
20
+ total_period_cost: number;
21
+ /** Service breakdown items */
22
+ items: LevelFour.ProviderServiceBreakdownItem[];
23
+ pagination: LevelFour.PaginationMeta;
24
+ /** Per-date totals aggregated across all items (all pages) */
25
+ totals_by_date?: (LevelFour.SpendingByDateItem[] | null) | undefined;
26
+ }
@@ -0,0 +1,29 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Service breakdown item for provider
7
+ */
8
+ export interface ProviderServiceBreakdownItem {
9
+ /** Service name (None if grouped by other fields) */
10
+ service?: (string | null) | undefined;
11
+ /** Environment */
12
+ environment?: (string | null) | undefined;
13
+ /** Cloud region */
14
+ region?: (string | null) | undefined;
15
+ /** Cloud account ID */
16
+ account_id?: (string | null) | undefined;
17
+ /** Tag key */
18
+ tag_key?: (string | null) | undefined;
19
+ /** Tag value */
20
+ tag_value?: (string | null) | undefined;
21
+ /** Current period cost */
22
+ cost: number;
23
+ /** Previous period cost */
24
+ previous_cost?: (number | null) | undefined;
25
+ /** Change from previous period */
26
+ change_percentage?: (number | null) | undefined;
27
+ /** Daily spending breakdown for this service */
28
+ spendings_by_date?: (LevelFour.SpendingByDateItem[] | null) | undefined;
29
+ }
@@ -0,0 +1,25 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Provider service breakdown raw data without pagination
7
+ */
8
+ export interface ProviderServiceBreakdownRawData {
9
+ /** Provider identifier */
10
+ provider_id: string;
11
+ /** Display name */
12
+ provider_name: string;
13
+ /** Period in YYYY-MM format */
14
+ period: string;
15
+ /** Start date in YYYY-MM-DD format */
16
+ start_date: string;
17
+ /** End date in YYYY-MM-DD format */
18
+ end_date: string;
19
+ /** Total cost for the period */
20
+ total_period_cost: number;
21
+ /** All service breakdown items (no pagination) */
22
+ items: LevelFour.ProviderServiceBreakdownItem[];
23
+ /** Total number of items */
24
+ total_items: number;
25
+ }
@@ -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 raw provider service breakdown (all records)
7
+ */
8
+ export interface ProviderServiceBreakdownRawResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderServiceBreakdownRawData;
12
+ }
@@ -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 provider service breakdown
7
+ */
8
+ export interface ProviderServiceBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderServiceBreakdownData;
12
+ }
@@ -0,0 +1,25 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Provider costs breakdown chart data for stacked bar visualization, grouped by service/account/region/tag
7
+ */
8
+ export interface ProviderServiceCostsBreakdownData {
9
+ /** Provider identifier: aws, gcp, azure, k8s */
10
+ provider_id: string;
11
+ /** Display name */
12
+ provider_name: string;
13
+ /** Granularity: 'daily' or 'monthly' */
14
+ granularity: string;
15
+ /** Start date in YYYY-MM-DD format */
16
+ start_date: string;
17
+ /** End date in YYYY-MM-DD format */
18
+ end_date: string;
19
+ /** Ordered list of group keys: ['RDS', 'EC2', 'other'] */
20
+ groups: string[];
21
+ /** Time series data points */
22
+ data_points: LevelFour.ProviderServiceCostsDataPoint[];
23
+ /** Total per group for the period */
24
+ totals: Record<string, number>;
25
+ }
@@ -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 provider service costs breakdown chart
7
+ */
8
+ export interface ProviderServiceCostsBreakdownResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderServiceCostsBreakdownData;
12
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Single data point for provider costs breakdown chart
5
+ */
6
+ export interface ProviderServiceCostsDataPoint {
7
+ /** Date in YYYY-MM-DD (daily) or YYYY-MM (monthly) format */
8
+ date: string;
9
+ /** Group costs: {'RDS': 185.30, 'EC2': 245.50, 'other': 128.65} */
10
+ groups: Record<string, number>;
11
+ /** Total cost for this date */
12
+ total: number;
13
+ }
@@ -0,0 +1,23 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Provider-level spending for dashboard summary
5
+ */
6
+ export interface ProviderSpending {
7
+ /** Provider identifier: aws, gcp, azure, k8s */
8
+ provider_id: string;
9
+ /** Display name: AWS, GCP, etc. */
10
+ provider_name: string;
11
+ /** Current month spending for this provider */
12
+ monthly_spending: number;
13
+ /** MoM change percentage */
14
+ monthly_spending_percentage?: (number | null) | undefined;
15
+ /** MoM change in dollar amount */
16
+ monthly_spending_change?: (number | null) | undefined;
17
+ /** Previous fully closed month total spending */
18
+ previous_month_spending?: (number | null) | undefined;
19
+ /** Total potential monthly savings */
20
+ potential_savings: number;
21
+ /** Savings as percentage of spending */
22
+ potential_savings_percentage: number;
23
+ }
@@ -0,0 +1,27 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Provider-specific spending summary
7
+ */
8
+ export interface ProviderSpendingSummaryData {
9
+ /** Provider identifier: aws, gcp, azure, k8s */
10
+ provider_id: string;
11
+ /** Display name */
12
+ provider_name: string;
13
+ /** Current month spending */
14
+ monthly_spending: number;
15
+ /** MoM change percentage */
16
+ monthly_spending_percentage?: (number | null) | undefined;
17
+ /** Projected full month costs based on daily run rate */
18
+ forecasted_monthly_costs: number;
19
+ /** Forecast vs previous month actual percentage */
20
+ forecasted_monthly_costs_percentage?: (number | null) | undefined;
21
+ /** Total potential savings for this provider */
22
+ potential_savings: number;
23
+ /** Savings as percentage of spending */
24
+ potential_savings_percentage: number;
25
+ /** Top 3 services by cost */
26
+ top_services: LevelFour.ProviderTopService[];
27
+ }
@@ -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 provider spending summary
7
+ */
8
+ export interface ProviderSpendingSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderSpendingSummaryData;
12
+ }
@@ -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
+ * Provider spending timeline data
7
+ */
8
+ export interface ProviderTimelineData {
9
+ /** Provider identifier */
10
+ provider_id: string;
11
+ /** Display name */
12
+ provider_name: string;
13
+ /** Granularity: 'daily' or 'monthly' */
14
+ granularity: string;
15
+ /** Start date in YYYY-MM-DD format */
16
+ start_date: string;
17
+ /** End date in YYYY-MM-DD format */
18
+ end_date: string;
19
+ /** Timeline data points */
20
+ data_points: LevelFour.DailySpendingDataPoint[];
21
+ /** Total cost for the period */
22
+ total: number;
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 provider spending timeline
7
+ */
8
+ export interface ProviderTimelineResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProviderTimelineData;
12
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Top service for provider summary
5
+ */
6
+ export interface ProviderTopService {
7
+ /** Service name */
8
+ service: string;
9
+ /** Current period cost */
10
+ cost: number;
11
+ /** Change from previous period */
12
+ change_percentage?: (number | null) | undefined;
13
+ }
@@ -0,0 +1,10 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ import type * as LevelFour from "../index.js";
4
+
5
+ /**
6
+ * Summary data for all providers
7
+ */
8
+ export interface ProvidersSummaryData {
9
+ providers: LevelFour.Provider[];
10
+ }
@@ -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 providers summary (carousel view)
7
+ */
8
+ export interface ProvidersSummaryResponse {
9
+ success?: boolean | undefined;
10
+ timestamp?: string | undefined;
11
+ data: LevelFour.ProvidersSummaryData;
12
+ }
@@ -0,0 +1,28 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+
3
+ /**
4
+ * Action structure with simple text fields.
5
+ *
6
+ * All fields support markdown formatting for rich text display.
7
+ * Frontend can use a markdown renderer (e.g., react-markdown) to display.
8
+ *
9
+ * Example markdown formatting:
10
+ * - **Bold text** for emphasis
11
+ * - `code snippets` for commands
12
+ * - Numbered/bulleted lists for steps
13
+ * - Code blocks with ```language syntax
14
+ */
15
+ export interface RecommendationActions {
16
+ /** Brief summary of the recommendation */
17
+ description?: (string | null) | undefined;
18
+ /** Detailed overview explaining the recommendation (supports markdown) */
19
+ overview?: (string | null) | undefined;
20
+ /** How to implement this recommendation (supports markdown) */
21
+ implementation_process?: (string | null) | undefined;
22
+ /** Technical execution details (supports markdown) */
23
+ execution_method?: (string | null) | undefined;
24
+ /** Important notes, risks, and safety information (supports markdown) */
25
+ key_takeaway?: (string | null) | undefined;
26
+ /** Impact on operations and any downtime requirements (supports markdown) */
27
+ operational_impact?: (string | null) | undefined;
28
+ }
@@ -0,0 +1,22 @@
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 details for a single recommendation (detail view)
7
+ */
8
+ export interface RecommendationDetail {
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
+ /** Status: pending, implemented, rejected */
20
+ status: string;
21
+ created_at?: (string | null) | undefined;
22
+ }