levelfour 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{BaseClient.ts → dist/BaseClient.d.ts} +1 -25
- package/dist/BaseClient.js +51 -0
- package/dist/Client.d.ts +47 -0
- package/dist/Client.js +72 -0
- package/dist/LevelFourClient.d.ts +12 -0
- package/dist/LevelFourClient.js +36 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/api/errors/index.js +17 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/apiKeys/client/Client.d.ts +68 -0
- package/{api/resources/apiKeys/client/Client.ts → dist/api/resources/apiKeys/client/Client.js} +79 -137
- package/dist/api/resources/apiKeys/client/index.js +17 -0
- package/{api/resources/apiKeys/client/requests/CreateApiKeyRequest.ts → dist/api/resources/apiKeys/client/requests/CreateApiKeyRequest.d.ts} +6 -9
- package/dist/api/resources/apiKeys/client/requests/CreateApiKeyRequest.js +11 -0
- package/{api/resources/apiKeys/client/requests/ListApiKeysApiV1ApiKeysGetRequest.ts → dist/api/resources/apiKeys/client/requests/ListApiKeysApiV1ApiKeysGetRequest.d.ts} +0 -2
- package/dist/api/resources/apiKeys/client/requests/ListApiKeysApiV1ApiKeysGetRequest.js +3 -0
- package/{api/resources/apiKeys/client/requests/RevokeApiKeyApiV1ApiKeysKeyIdDeleteRequest.ts → dist/api/resources/apiKeys/client/requests/RevokeApiKeyApiV1ApiKeysKeyIdDeleteRequest.d.ts} +0 -2
- package/dist/api/resources/apiKeys/client/requests/RevokeApiKeyApiV1ApiKeysKeyIdDeleteRequest.js +3 -0
- package/{api/resources/apiKeys/client/requests/RotateApiKeyApiV1ApiKeysKeyIdRotatePostRequest.ts → dist/api/resources/apiKeys/client/requests/RotateApiKeyApiV1ApiKeysKeyIdRotatePostRequest.d.ts} +0 -2
- package/dist/api/resources/apiKeys/client/requests/RotateApiKeyApiV1ApiKeysKeyIdRotatePostRequest.js +3 -0
- package/dist/api/resources/apiKeys/client/requests/index.js +5 -0
- package/{api/resources/apiKeys/exports.ts → dist/api/resources/apiKeys/exports.d.ts} +0 -2
- package/dist/api/resources/apiKeys/exports.js +21 -0
- package/dist/api/resources/apiKeys/index.js +17 -0
- package/dist/api/resources/evaluation/client/Client.d.ts +23 -0
- package/dist/api/resources/evaluation/client/Client.js +86 -0
- package/dist/api/resources/evaluation/client/index.js +2 -0
- package/{api/resources/evaluation/exports.ts → dist/api/resources/evaluation/exports.d.ts} +0 -2
- package/dist/api/resources/evaluation/exports.js +21 -0
- package/dist/api/resources/evaluation/index.js +17 -0
- package/dist/api/resources/health/client/Client.d.ts +32 -0
- package/dist/api/resources/health/client/Client.js +123 -0
- package/dist/api/resources/health/client/index.js +2 -0
- package/{api/resources/health/exports.ts → dist/api/resources/health/exports.d.ts} +0 -2
- package/dist/api/resources/health/exports.js +21 -0
- package/dist/api/resources/health/index.js +17 -0
- package/dist/api/resources/index.js +63 -0
- package/dist/api/resources/prAnalysis/client/Client.d.ts +34 -0
- package/dist/api/resources/prAnalysis/client/Client.js +107 -0
- package/dist/api/resources/prAnalysis/client/index.js +17 -0
- package/{api/resources/prAnalysis/client/requests/AnalyzePrRequest.ts → dist/api/resources/prAnalysis/client/requests/AnalyzePrRequest.d.ts} +0 -3
- package/dist/api/resources/prAnalysis/client/requests/AnalyzePrRequest.js +3 -0
- package/dist/api/resources/prAnalysis/client/requests/index.js +2 -0
- package/{api/resources/prAnalysis/exports.ts → dist/api/resources/prAnalysis/exports.d.ts} +0 -2
- package/dist/api/resources/prAnalysis/exports.js +21 -0
- package/dist/api/resources/prAnalysis/index.js +17 -0
- package/dist/api/resources/prAnalysisActions/client/Client.d.ts +101 -0
- package/{api/resources/prAnalysisActions/client/Client.ts → dist/api/resources/prAnalysisActions/client/Client.js} +84 -182
- package/dist/api/resources/prAnalysisActions/client/index.js +17 -0
- package/{api/resources/prAnalysisActions/client/requests/DismissSuggestionsApiV1PrAnalysisActionsDismissPostRequest.ts → dist/api/resources/prAnalysisActions/client/requests/DismissSuggestionsApiV1PrAnalysisActionsDismissPostRequest.d.ts} +0 -3
- package/dist/api/resources/prAnalysisActions/client/requests/DismissSuggestionsApiV1PrAnalysisActionsDismissPostRequest.js +3 -0
- package/{api/resources/prAnalysisActions/client/requests/GetIgnoredResourcesApiV1PrAnalysisActionsIgnoreGetRequest.ts → dist/api/resources/prAnalysisActions/client/requests/GetIgnoredResourcesApiV1PrAnalysisActionsIgnoreGetRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisActions/client/requests/GetIgnoredResourcesApiV1PrAnalysisActionsIgnoreGetRequest.js +3 -0
- package/{api/resources/prAnalysisActions/client/requests/GetPrStatusApiV1PrAnalysisActionsStatusGetRequest.ts → dist/api/resources/prAnalysisActions/client/requests/GetPrStatusApiV1PrAnalysisActionsStatusGetRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisActions/client/requests/GetPrStatusApiV1PrAnalysisActionsStatusGetRequest.js +3 -0
- package/{api/resources/prAnalysisActions/client/requests/IgnoreRequest.ts → dist/api/resources/prAnalysisActions/client/requests/IgnoreRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisActions/client/requests/IgnoreRequest.js +3 -0
- package/{api/resources/prAnalysisActions/client/requests/SnoozeSuggestionsApiV1PrAnalysisActionsSnoozePostRequest.ts → dist/api/resources/prAnalysisActions/client/requests/SnoozeSuggestionsApiV1PrAnalysisActionsSnoozePostRequest.d.ts} +0 -3
- package/dist/api/resources/prAnalysisActions/client/requests/SnoozeSuggestionsApiV1PrAnalysisActionsSnoozePostRequest.js +3 -0
- package/dist/api/resources/prAnalysisActions/client/requests/index.js +2 -0
- package/{api/resources/prAnalysisActions/exports.ts → dist/api/resources/prAnalysisActions/exports.d.ts} +0 -2
- package/dist/api/resources/prAnalysisActions/exports.js +21 -0
- package/dist/api/resources/prAnalysisActions/index.js +17 -0
- package/dist/api/resources/prAnalysisInstallations/client/Client.d.ts +89 -0
- package/{api/resources/prAnalysisInstallations/client/Client.ts → dist/api/resources/prAnalysisInstallations/client/Client.js} +86 -184
- package/dist/api/resources/prAnalysisInstallations/client/index.js +17 -0
- package/{api/resources/prAnalysisInstallations/client/requests/AddReposRequest.ts → dist/api/resources/prAnalysisInstallations/client/requests/AddReposRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/client/requests/AddReposRequest.js +3 -0
- package/{api/resources/prAnalysisInstallations/client/requests/DeleteInstallationApiV1PrAnalysisInstallationsInstallationIdDeleteRequest.ts → dist/api/resources/prAnalysisInstallations/client/requests/DeleteInstallationApiV1PrAnalysisInstallationsInstallationIdDeleteRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/client/requests/DeleteInstallationApiV1PrAnalysisInstallationsInstallationIdDeleteRequest.js +3 -0
- package/{api/resources/prAnalysisInstallations/client/requests/ListInstallationsApiV1PrAnalysisInstallationsGetRequest.ts → dist/api/resources/prAnalysisInstallations/client/requests/ListInstallationsApiV1PrAnalysisInstallationsGetRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/client/requests/ListInstallationsApiV1PrAnalysisInstallationsGetRequest.js +3 -0
- package/{api/resources/prAnalysisInstallations/client/requests/RegisterInstallationRequest.ts → dist/api/resources/prAnalysisInstallations/client/requests/RegisterInstallationRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/client/requests/RegisterInstallationRequest.js +3 -0
- package/{api/resources/prAnalysisInstallations/client/requests/RemoveReposRequest.ts → dist/api/resources/prAnalysisInstallations/client/requests/RemoveReposRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/client/requests/RemoveReposRequest.js +3 -0
- package/dist/api/resources/prAnalysisInstallations/client/requests/index.js +2 -0
- package/{api/resources/prAnalysisInstallations/exports.ts → dist/api/resources/prAnalysisInstallations/exports.d.ts} +0 -2
- package/dist/api/resources/prAnalysisInstallations/exports.js +21 -0
- package/dist/api/resources/prAnalysisInstallations/index.js +17 -0
- package/dist/api/resources/prAnalysisQuery/client/Client.d.ts +47 -0
- package/{api/resources/prAnalysisQuery/client/Client.ts → dist/api/resources/prAnalysisQuery/client/Client.js} +61 -74
- package/dist/api/resources/prAnalysisQuery/client/index.js +17 -0
- package/{api/resources/prAnalysisQuery/client/requests/ExplainRequest.ts → dist/api/resources/prAnalysisQuery/client/requests/ExplainRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisQuery/client/requests/ExplainRequest.js +3 -0
- package/{api/resources/prAnalysisQuery/client/requests/WhatifRequest.ts → dist/api/resources/prAnalysisQuery/client/requests/WhatifRequest.d.ts} +0 -2
- package/dist/api/resources/prAnalysisQuery/client/requests/WhatifRequest.js +3 -0
- package/dist/api/resources/prAnalysisQuery/client/requests/index.js +2 -0
- package/{api/resources/prAnalysisQuery/exports.ts → dist/api/resources/prAnalysisQuery/exports.d.ts} +0 -2
- package/dist/api/resources/prAnalysisQuery/exports.js +21 -0
- package/dist/api/resources/prAnalysisQuery/index.js +17 -0
- package/dist/api/resources/providers/client/Client.d.ts +193 -0
- package/{api/resources/providers/client/Client.ts → dist/api/resources/providers/client/Client.js} +172 -449
- package/dist/api/resources/providers/client/index.js +17 -0
- package/{api/resources/providers/client/requests/GetProviderFilterOptionsApiV1ProvidersProviderIdSpendingFilterOptionsGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderFilterOptionsApiV1ProvidersProviderIdSpendingFilterOptionsGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderFilterOptionsApiV1ProvidersProviderIdSpendingFilterOptionsGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderPotentialSavingsBreakdownApiV1ProvidersProviderIdPotentialSavingsBreakdownGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderPotentialSavingsBreakdownApiV1ProvidersProviderIdPotentialSavingsBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderPotentialSavingsBreakdownApiV1ProvidersProviderIdPotentialSavingsBreakdownGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderPotentialSavingsSummaryApiV1ProvidersProviderIdPotentialSavingsSummaryGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderPotentialSavingsSummaryApiV1ProvidersProviderIdPotentialSavingsSummaryGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderPotentialSavingsSummaryApiV1ProvidersProviderIdPotentialSavingsSummaryGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderRecommendationFilterOptionsApiV1ProvidersProviderIdRecommendationsFilterOptionsGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderRecommendationFilterOptionsApiV1ProvidersProviderIdRecommendationsFilterOptionsGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderRecommendationFilterOptionsApiV1ProvidersProviderIdRecommendationsFilterOptionsGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderRecommendationsBreakdownApiV1ProvidersProviderIdRecommendationsGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderRecommendationsBreakdownApiV1ProvidersProviderIdRecommendationsGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderRecommendationsBreakdownApiV1ProvidersProviderIdRecommendationsGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderRecommendationsOverviewApiV1ProvidersProviderIdRecommendationsOverviewGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderRecommendationsOverviewApiV1ProvidersProviderIdRecommendationsOverviewGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderRecommendationsOverviewApiV1ProvidersProviderIdRecommendationsOverviewGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderRecommendationsSummaryApiV1ProvidersProviderIdRecommendationsSummaryGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderRecommendationsSummaryApiV1ProvidersProviderIdRecommendationsSummaryGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderRecommendationsSummaryApiV1ProvidersProviderIdRecommendationsSummaryGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderSavedSummaryApiV1ProvidersProviderIdSavingsSummaryGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderSavedSummaryApiV1ProvidersProviderIdSavingsSummaryGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderSavedSummaryApiV1ProvidersProviderIdSavingsSummaryGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderSpendingSummaryApiV1ProvidersProviderIdSpendingSummaryGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderSpendingSummaryApiV1ProvidersProviderIdSpendingSummaryGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderSpendingSummaryApiV1ProvidersProviderIdSpendingSummaryGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetProviderSpendingTimelineApiV1ProvidersProviderIdSpendingTimelineGetRequest.ts → dist/api/resources/providers/client/requests/GetProviderSpendingTimelineApiV1ProvidersProviderIdSpendingTimelineGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetProviderSpendingTimelineApiV1ProvidersProviderIdSpendingTimelineGetRequest.js +3 -0
- package/{api/resources/providers/client/requests/GetSavedByProviderBreakdownApiV1ProvidersProviderIdSavingsBreakdownGetRequest.ts → dist/api/resources/providers/client/requests/GetSavedByProviderBreakdownApiV1ProvidersProviderIdSavingsBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/providers/client/requests/GetSavedByProviderBreakdownApiV1ProvidersProviderIdSavingsBreakdownGetRequest.js +3 -0
- package/dist/api/resources/providers/client/requests/index.js +2 -0
- package/{api/resources/providers/exports.ts → dist/api/resources/providers/exports.d.ts} +0 -2
- package/dist/api/resources/providers/exports.js +21 -0
- package/dist/api/resources/providers/index.js +18 -0
- package/dist/api/resources/providers/types/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetResponse.d.ts +2 -0
- package/dist/api/resources/providers/types/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetResponse.js +3 -0
- package/dist/api/resources/providers/types/index.js +17 -0
- package/dist/api/resources/recommendations/client/Client.d.ts +173 -0
- package/{api/resources/recommendations/client/Client.ts → dist/api/resources/recommendations/client/Client.js} +140 -340
- package/dist/api/resources/recommendations/client/index.js +17 -0
- package/{api/resources/recommendations/client/requests/AcceptTermsApiV1RecommendationsRecommendationIdAcceptTermsPostRequest.ts → dist/api/resources/recommendations/client/requests/AcceptTermsApiV1RecommendationsRecommendationIdAcceptTermsPostRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/AcceptTermsApiV1RecommendationsRecommendationIdAcceptTermsPostRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/CompleteWizardApiV1RecommendationsRecommendationIdCompletePostRequest.ts → dist/api/resources/recommendations/client/requests/CompleteWizardApiV1RecommendationsRecommendationIdCompletePostRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/CompleteWizardApiV1RecommendationsRecommendationIdCompletePostRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/GetRecommendationDetailsApiV1RecommendationsRecommendationIdDetailsGetRequest.ts → dist/api/resources/recommendations/client/requests/GetRecommendationDetailsApiV1RecommendationsRecommendationIdDetailsGetRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/GetRecommendationDetailsApiV1RecommendationsRecommendationIdDetailsGetRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/GetRecommendationForWizardApiV1RecommendationsRecommendationIdGetRequest.ts → dist/api/resources/recommendations/client/requests/GetRecommendationForWizardApiV1RecommendationsRecommendationIdGetRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/GetRecommendationForWizardApiV1RecommendationsRecommendationIdGetRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/GetRecommendationsApiV1RecommendationsGetRequest.ts → dist/api/resources/recommendations/client/requests/GetRecommendationsApiV1RecommendationsGetRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/GetRecommendationsApiV1RecommendationsGetRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/ImplementationMethodRequest.ts → dist/api/resources/recommendations/client/requests/ImplementationMethodRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/ImplementationMethodRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/SavingsDecisionRequest.ts → dist/api/resources/recommendations/client/requests/SavingsDecisionRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/SavingsDecisionRequest.js +3 -0
- package/{api/resources/recommendations/client/requests/UpdateTagRequest.ts → dist/api/resources/recommendations/client/requests/UpdateTagRequest.d.ts} +0 -2
- package/dist/api/resources/recommendations/client/requests/UpdateTagRequest.js +3 -0
- package/dist/api/resources/recommendations/client/requests/index.js +2 -0
- package/{api/resources/recommendations/exports.ts → dist/api/resources/recommendations/exports.d.ts} +0 -2
- package/dist/api/resources/recommendations/exports.js +21 -0
- package/dist/api/resources/recommendations/index.js +17 -0
- package/dist/api/resources/savings/client/Client.d.ts +52 -0
- package/{api/resources/savings/client/Client.ts → dist/api/resources/savings/client/Client.js} +75 -108
- package/dist/api/resources/savings/client/index.js +17 -0
- package/{api/resources/savings/client/requests/ExecutionRequestBody.ts → dist/api/resources/savings/client/requests/ExecutionRequestBody.d.ts} +0 -2
- package/dist/api/resources/savings/client/requests/ExecutionRequestBody.js +3 -0
- package/{api/resources/savings/client/requests/GetSavedBreakdownApiV1SavingsBreakdownGetRequest.ts → dist/api/resources/savings/client/requests/GetSavedBreakdownApiV1SavingsBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/savings/client/requests/GetSavedBreakdownApiV1SavingsBreakdownGetRequest.js +3 -0
- package/dist/api/resources/savings/client/requests/index.js +2 -0
- package/{api/resources/savings/exports.ts → dist/api/resources/savings/exports.d.ts} +0 -2
- package/dist/api/resources/savings/exports.js +21 -0
- package/dist/api/resources/savings/index.js +17 -0
- package/dist/api/resources/spending/client/Client.d.ts +59 -0
- package/{api/resources/spending/client/Client.ts → dist/api/resources/spending/client/Client.js} +80 -129
- package/dist/api/resources/spending/client/index.js +17 -0
- package/{api/resources/spending/client/requests/GetCostBreakdownApiV1SpendingBreakdownGetRequest.ts → dist/api/resources/spending/client/requests/GetCostBreakdownApiV1SpendingBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/spending/client/requests/GetCostBreakdownApiV1SpendingBreakdownGetRequest.js +3 -0
- package/{api/resources/spending/client/requests/GetDailySpendingBreakdownApiV1SpendingDailyBreakdownGetRequest.ts → dist/api/resources/spending/client/requests/GetDailySpendingBreakdownApiV1SpendingDailyBreakdownGetRequest.d.ts} +0 -2
- package/dist/api/resources/spending/client/requests/GetDailySpendingBreakdownApiV1SpendingDailyBreakdownGetRequest.js +3 -0
- package/dist/api/resources/spending/client/requests/index.js +2 -0
- package/{api/resources/spending/exports.ts → dist/api/resources/spending/exports.d.ts} +0 -2
- package/dist/api/resources/spending/exports.js +21 -0
- package/dist/api/resources/spending/index.js +18 -0
- package/dist/api/resources/spending/types/GetCostBreakdownApiV1SpendingBreakdownGetResponse.d.ts +2 -0
- package/dist/api/resources/spending/types/GetCostBreakdownApiV1SpendingBreakdownGetResponse.js +3 -0
- package/dist/api/resources/spending/types/index.js +17 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +55 -0
- package/{api/resources/webhooks/client/Client.ts → dist/api/resources/webhooks/client/Client.js} +71 -109
- package/dist/api/resources/webhooks/client/index.js +17 -0
- package/{api/resources/webhooks/client/requests/DeleteEndpointApiV1WebhooksEndpointsEndpointIdDeleteRequest.ts → dist/api/resources/webhooks/client/requests/DeleteEndpointApiV1WebhooksEndpointsEndpointIdDeleteRequest.d.ts} +0 -2
- package/dist/api/resources/webhooks/client/requests/DeleteEndpointApiV1WebhooksEndpointsEndpointIdDeleteRequest.js +3 -0
- package/{api/resources/webhooks/client/requests/ListEndpointsApiV1WebhooksEndpointsGetRequest.ts → dist/api/resources/webhooks/client/requests/ListEndpointsApiV1WebhooksEndpointsGetRequest.d.ts} +0 -2
- package/dist/api/resources/webhooks/client/requests/ListEndpointsApiV1WebhooksEndpointsGetRequest.js +3 -0
- package/{api/resources/webhooks/client/requests/RegisterEndpointRequest.ts → dist/api/resources/webhooks/client/requests/RegisterEndpointRequest.d.ts} +0 -2
- package/dist/api/resources/webhooks/client/requests/RegisterEndpointRequest.js +3 -0
- package/dist/api/resources/webhooks/client/requests/index.js +2 -0
- package/{api/resources/webhooks/exports.ts → dist/api/resources/webhooks/exports.d.ts} +0 -2
- package/dist/api/resources/webhooks/exports.js +21 -0
- package/dist/api/resources/webhooks/index.js +17 -0
- package/{api/types/AcceptTermsData.ts → dist/api/types/AcceptTermsData.d.ts} +0 -2
- package/dist/api/types/AcceptTermsData.js +3 -0
- package/{api/types/AcceptTermsResponse.ts → dist/api/types/AcceptTermsResponse.d.ts} +0 -3
- package/dist/api/types/AcceptTermsResponse.js +3 -0
- package/{api/types/ActionRequest.ts → dist/api/types/ActionRequest.d.ts} +0 -2
- package/dist/api/types/ActionRequest.js +3 -0
- package/{api/types/ApiKeyCreatedData.ts → dist/api/types/ApiKeyCreatedData.d.ts} +0 -2
- package/dist/api/types/ApiKeyCreatedData.js +3 -0
- package/{api/types/ApiKeyData.ts → dist/api/types/ApiKeyData.d.ts} +0 -2
- package/dist/api/types/ApiKeyData.js +3 -0
- package/{api/types/ComparisonItem.ts → dist/api/types/ComparisonItem.d.ts} +0 -2
- package/dist/api/types/ComparisonItem.js +3 -0
- package/{api/types/CompleteWizardData.ts → dist/api/types/CompleteWizardData.d.ts} +0 -2
- package/dist/api/types/CompleteWizardData.js +3 -0
- package/{api/types/CompleteWizardResponse.ts → dist/api/types/CompleteWizardResponse.d.ts} +0 -3
- package/dist/api/types/CompleteWizardResponse.js +3 -0
- package/{api/types/CostBreakdownData.ts → dist/api/types/CostBreakdownData.d.ts} +0 -3
- package/dist/api/types/CostBreakdownData.js +3 -0
- package/{api/types/CostBreakdownItem.ts → dist/api/types/CostBreakdownItem.d.ts} +0 -2
- package/dist/api/types/CostBreakdownItem.js +3 -0
- package/{api/types/CostBreakdownRawData.ts → dist/api/types/CostBreakdownRawData.d.ts} +0 -3
- package/dist/api/types/CostBreakdownRawData.js +3 -0
- package/{api/types/CostBreakdownRawResponse.ts → dist/api/types/CostBreakdownRawResponse.d.ts} +0 -3
- package/dist/api/types/CostBreakdownRawResponse.js +3 -0
- package/{api/types/CostBreakdownResponse.ts → dist/api/types/CostBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/CostBreakdownResponse.js +3 -0
- package/{api/types/CostsBreakdownChartData.ts → dist/api/types/CostsBreakdownChartData.d.ts} +0 -3
- package/dist/api/types/CostsBreakdownChartData.js +3 -0
- package/{api/types/CostsBreakdownChartResponse.ts → dist/api/types/CostsBreakdownChartResponse.d.ts} +0 -3
- package/dist/api/types/CostsBreakdownChartResponse.js +3 -0
- package/{api/types/CostsBreakdownDataPoint.ts → dist/api/types/CostsBreakdownDataPoint.d.ts} +0 -2
- package/dist/api/types/CostsBreakdownDataPoint.js +3 -0
- package/{api/types/CostsBreakdownGroupedChartData.ts → dist/api/types/CostsBreakdownGroupedChartData.d.ts} +0 -3
- package/dist/api/types/CostsBreakdownGroupedChartData.js +3 -0
- package/{api/types/CostsBreakdownGroupedChartResponse.ts → dist/api/types/CostsBreakdownGroupedChartResponse.d.ts} +0 -3
- package/dist/api/types/CostsBreakdownGroupedChartResponse.js +3 -0
- package/{api/types/CostsBreakdownGroupedDataPoint.ts → dist/api/types/CostsBreakdownGroupedDataPoint.d.ts} +0 -2
- package/dist/api/types/CostsBreakdownGroupedDataPoint.js +3 -0
- package/{api/types/CostsBreakdownTotals.ts → dist/api/types/CostsBreakdownTotals.d.ts} +0 -2
- package/dist/api/types/CostsBreakdownTotals.js +3 -0
- package/{api/types/CreateApiKeyResponse.ts → dist/api/types/CreateApiKeyResponse.d.ts} +0 -3
- package/dist/api/types/CreateApiKeyResponse.js +3 -0
- package/{api/types/DailySpendingBreakdownData.ts → dist/api/types/DailySpendingBreakdownData.d.ts} +0 -3
- package/dist/api/types/DailySpendingBreakdownData.js +3 -0
- package/{api/types/DailySpendingBreakdownResponse.ts → dist/api/types/DailySpendingBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/DailySpendingBreakdownResponse.js +3 -0
- package/{api/types/DailySpendingDataPoint.ts → dist/api/types/DailySpendingDataPoint.d.ts} +0 -2
- package/dist/api/types/DailySpendingDataPoint.js +3 -0
- package/{api/types/DashboardSummaryData.ts → dist/api/types/DashboardSummaryData.d.ts} +0 -3
- package/dist/api/types/DashboardSummaryData.js +3 -0
- package/{api/types/DashboardSummaryResponse.ts → dist/api/types/DashboardSummaryResponse.d.ts} +0 -3
- package/dist/api/types/DashboardSummaryResponse.js +3 -0
- package/{api/types/DeleteEndpointData.ts → dist/api/types/DeleteEndpointData.d.ts} +0 -2
- package/dist/api/types/DeleteEndpointData.js +3 -0
- package/{api/types/DeleteEndpointResponse.ts → dist/api/types/DeleteEndpointResponse.d.ts} +0 -3
- package/dist/api/types/DeleteEndpointResponse.js +3 -0
- package/{api/types/EndpointData.ts → dist/api/types/EndpointData.d.ts} +0 -2
- package/dist/api/types/EndpointData.js +3 -0
- package/{api/types/EvaluationStatusData.ts → dist/api/types/EvaluationStatusData.d.ts} +0 -2
- package/dist/api/types/EvaluationStatusData.js +3 -0
- package/{api/types/EvaluationStatusResponse.ts → dist/api/types/EvaluationStatusResponse.d.ts} +0 -3
- package/dist/api/types/EvaluationStatusResponse.js +3 -0
- package/{api/types/ExecutionLogCommand.ts → dist/api/types/ExecutionLogCommand.d.ts} +0 -2
- package/dist/api/types/ExecutionLogCommand.js +3 -0
- package/{api/types/ExecutionLogEntry.ts → dist/api/types/ExecutionLogEntry.d.ts} +0 -3
- package/dist/api/types/ExecutionLogEntry.js +3 -0
- package/{api/types/ExecutionStepSchema.ts → dist/api/types/ExecutionStepSchema.d.ts} +0 -2
- package/dist/api/types/ExecutionStepSchema.js +3 -0
- package/{api/types/HttpValidationError.ts → dist/api/types/HttpValidationError.d.ts} +0 -3
- package/dist/api/types/HttpValidationError.js +3 -0
- package/{api/types/ImplementationMethodData.ts → dist/api/types/ImplementationMethodData.d.ts} +0 -2
- package/dist/api/types/ImplementationMethodData.js +3 -0
- package/{api/types/ImplementationMethodResponse.ts → dist/api/types/ImplementationMethodResponse.d.ts} +0 -3
- package/dist/api/types/ImplementationMethodResponse.js +3 -0
- package/{api/types/ImplementationStep.ts → dist/api/types/ImplementationStep.d.ts} +0 -2
- package/dist/api/types/ImplementationStep.js +3 -0
- package/{api/types/ListApiKeysData.ts → dist/api/types/ListApiKeysData.d.ts} +0 -3
- package/dist/api/types/ListApiKeysData.js +3 -0
- package/{api/types/ListApiKeysResponse.ts → dist/api/types/ListApiKeysResponse.d.ts} +0 -3
- package/dist/api/types/ListApiKeysResponse.js +3 -0
- package/{api/types/ListEndpointsResponse.ts → dist/api/types/ListEndpointsResponse.d.ts} +0 -3
- package/dist/api/types/ListEndpointsResponse.js +3 -0
- package/{api/types/MetricDataPoint.ts → dist/api/types/MetricDataPoint.d.ts} +0 -2
- package/dist/api/types/MetricDataPoint.js +3 -0
- package/{api/types/MetricSeries.ts → dist/api/types/MetricSeries.d.ts} +0 -3
- package/dist/api/types/MetricSeries.js +3 -0
- package/{api/types/MetricSeriesEntry.ts → dist/api/types/MetricSeriesEntry.d.ts} +0 -3
- package/dist/api/types/MetricSeriesEntry.js +3 -0
- package/{api/types/MonthlySpendingData.ts → dist/api/types/MonthlySpendingData.d.ts} +0 -3
- package/dist/api/types/MonthlySpendingData.js +3 -0
- package/{api/types/MonthlySpendingDataPoint.ts → dist/api/types/MonthlySpendingDataPoint.d.ts} +0 -2
- package/dist/api/types/MonthlySpendingDataPoint.js +3 -0
- package/{api/types/MonthlySpendingResponse.ts → dist/api/types/MonthlySpendingResponse.d.ts} +0 -3
- package/dist/api/types/MonthlySpendingResponse.js +3 -0
- package/{api/types/PaginationMeta.ts → dist/api/types/PaginationMeta.d.ts} +0 -2
- package/dist/api/types/PaginationMeta.js +3 -0
- package/{api/types/ProcessingRecommendationItem.ts → dist/api/types/ProcessingRecommendationItem.d.ts} +0 -2
- package/dist/api/types/ProcessingRecommendationItem.js +3 -0
- package/{api/types/ProcessingRecommendationsData.ts → dist/api/types/ProcessingRecommendationsData.d.ts} +0 -3
- package/dist/api/types/ProcessingRecommendationsData.js +3 -0
- package/{api/types/ProcessingRecommendationsResponse.ts → dist/api/types/ProcessingRecommendationsResponse.d.ts} +0 -3
- package/dist/api/types/ProcessingRecommendationsResponse.js +3 -0
- package/{api/types/Provider.ts → dist/api/types/Provider.d.ts} +0 -2
- package/dist/api/types/Provider.js +3 -0
- package/{api/types/ProviderBreakdownData.ts → dist/api/types/ProviderBreakdownData.d.ts} +0 -3
- package/dist/api/types/ProviderBreakdownData.js +3 -0
- package/{api/types/ProviderBreakdownItem.ts → dist/api/types/ProviderBreakdownItem.d.ts} +0 -3
- package/dist/api/types/ProviderBreakdownItem.js +3 -0
- package/{api/types/ProviderBreakdownResponse.ts → dist/api/types/ProviderBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/ProviderBreakdownResponse.js +3 -0
- package/{api/types/ProviderFilterOptionsData.ts → dist/api/types/ProviderFilterOptionsData.d.ts} +0 -2
- package/dist/api/types/ProviderFilterOptionsData.js +3 -0
- package/{api/types/ProviderFilterOptionsResponse.ts → dist/api/types/ProviderFilterOptionsResponse.d.ts} +0 -3
- package/dist/api/types/ProviderFilterOptionsResponse.js +3 -0
- package/{api/types/ProviderPotentialSavingsSummaryData.ts → dist/api/types/ProviderPotentialSavingsSummaryData.d.ts} +0 -2
- package/dist/api/types/ProviderPotentialSavingsSummaryData.js +3 -0
- package/{api/types/ProviderPotentialSavingsSummaryResponse.ts → dist/api/types/ProviderPotentialSavingsSummaryResponse.d.ts} +0 -3
- package/dist/api/types/ProviderPotentialSavingsSummaryResponse.js +3 -0
- package/{api/types/ProviderRecommendationsSummaryData.ts → dist/api/types/ProviderRecommendationsSummaryData.d.ts} +0 -3
- package/dist/api/types/ProviderRecommendationsSummaryData.js +3 -0
- package/{api/types/ProviderRecommendationsSummaryResponse.ts → dist/api/types/ProviderRecommendationsSummaryResponse.d.ts} +0 -3
- package/dist/api/types/ProviderRecommendationsSummaryResponse.js +3 -0
- package/{api/types/ProviderSavedSummaryData.ts → dist/api/types/ProviderSavedSummaryData.d.ts} +0 -2
- package/dist/api/types/ProviderSavedSummaryData.js +3 -0
- package/{api/types/ProviderSavedSummaryResponse.ts → dist/api/types/ProviderSavedSummaryResponse.d.ts} +0 -3
- package/dist/api/types/ProviderSavedSummaryResponse.js +3 -0
- package/{api/types/ProviderServiceBreakdownData.ts → dist/api/types/ProviderServiceBreakdownData.d.ts} +0 -3
- package/dist/api/types/ProviderServiceBreakdownData.js +3 -0
- package/{api/types/ProviderServiceBreakdownItem.ts → dist/api/types/ProviderServiceBreakdownItem.d.ts} +0 -3
- package/dist/api/types/ProviderServiceBreakdownItem.js +3 -0
- package/{api/types/ProviderServiceBreakdownRawData.ts → dist/api/types/ProviderServiceBreakdownRawData.d.ts} +0 -3
- package/dist/api/types/ProviderServiceBreakdownRawData.js +3 -0
- package/{api/types/ProviderServiceBreakdownRawResponse.ts → dist/api/types/ProviderServiceBreakdownRawResponse.d.ts} +0 -3
- package/dist/api/types/ProviderServiceBreakdownRawResponse.js +3 -0
- package/{api/types/ProviderServiceBreakdownResponse.ts → dist/api/types/ProviderServiceBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/ProviderServiceBreakdownResponse.js +3 -0
- package/{api/types/ProviderServiceCostsBreakdownData.ts → dist/api/types/ProviderServiceCostsBreakdownData.d.ts} +0 -3
- package/dist/api/types/ProviderServiceCostsBreakdownData.js +3 -0
- package/{api/types/ProviderServiceCostsBreakdownResponse.ts → dist/api/types/ProviderServiceCostsBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/ProviderServiceCostsBreakdownResponse.js +3 -0
- package/{api/types/ProviderServiceCostsDataPoint.ts → dist/api/types/ProviderServiceCostsDataPoint.d.ts} +0 -2
- package/dist/api/types/ProviderServiceCostsDataPoint.js +3 -0
- package/{api/types/ProviderSpending.ts → dist/api/types/ProviderSpending.d.ts} +0 -2
- package/dist/api/types/ProviderSpending.js +3 -0
- package/{api/types/ProviderSpendingSummaryData.ts → dist/api/types/ProviderSpendingSummaryData.d.ts} +0 -3
- package/dist/api/types/ProviderSpendingSummaryData.js +3 -0
- package/{api/types/ProviderSpendingSummaryResponse.ts → dist/api/types/ProviderSpendingSummaryResponse.d.ts} +0 -3
- package/dist/api/types/ProviderSpendingSummaryResponse.js +3 -0
- package/{api/types/ProviderTimelineData.ts → dist/api/types/ProviderTimelineData.d.ts} +0 -3
- package/dist/api/types/ProviderTimelineData.js +3 -0
- package/{api/types/ProviderTimelineResponse.ts → dist/api/types/ProviderTimelineResponse.d.ts} +0 -3
- package/dist/api/types/ProviderTimelineResponse.js +3 -0
- package/{api/types/ProviderTopService.ts → dist/api/types/ProviderTopService.d.ts} +0 -2
- package/dist/api/types/ProviderTopService.js +3 -0
- package/{api/types/ProvidersSummaryData.ts → dist/api/types/ProvidersSummaryData.d.ts} +0 -3
- package/dist/api/types/ProvidersSummaryData.js +3 -0
- package/{api/types/ProvidersSummaryResponse.ts → dist/api/types/ProvidersSummaryResponse.d.ts} +0 -3
- package/dist/api/types/ProvidersSummaryResponse.js +3 -0
- package/{api/types/RecommendationActions.ts → dist/api/types/RecommendationActions.d.ts} +0 -2
- package/dist/api/types/RecommendationActions.js +3 -0
- package/{api/types/RecommendationDetail.ts → dist/api/types/RecommendationDetail.d.ts} +0 -3
- package/dist/api/types/RecommendationDetail.js +3 -0
- package/{api/types/RecommendationDetailResponse.ts → dist/api/types/RecommendationDetailResponse.d.ts} +0 -3
- package/dist/api/types/RecommendationDetailResponse.js +3 -0
- package/{api/types/RecommendationFilterOptionsData.ts → dist/api/types/RecommendationFilterOptionsData.d.ts} +0 -2
- package/dist/api/types/RecommendationFilterOptionsData.js +3 -0
- package/{api/types/RecommendationFilterOptionsResponse.ts → dist/api/types/RecommendationFilterOptionsResponse.d.ts} +0 -3
- package/dist/api/types/RecommendationFilterOptionsResponse.js +3 -0
- package/{api/types/RecommendationItem.ts → dist/api/types/RecommendationItem.d.ts} +0 -3
- package/dist/api/types/RecommendationItem.js +3 -0
- package/{api/types/RecommendationWizardData.ts → dist/api/types/RecommendationWizardData.d.ts} +2 -6
- package/dist/api/types/RecommendationWizardData.js +3 -0
- package/{api/types/RecommendationWizardResponse.ts → dist/api/types/RecommendationWizardResponse.d.ts} +0 -3
- package/dist/api/types/RecommendationWizardResponse.js +3 -0
- package/{api/types/RecommendationsBreakdownData.ts → dist/api/types/RecommendationsBreakdownData.d.ts} +0 -3
- package/dist/api/types/RecommendationsBreakdownData.js +3 -0
- package/{api/types/RecommendationsBreakdownResponse.ts → dist/api/types/RecommendationsBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/RecommendationsBreakdownResponse.js +3 -0
- package/{api/types/RecommendationsOverviewData.ts → dist/api/types/RecommendationsOverviewData.d.ts} +0 -2
- package/dist/api/types/RecommendationsOverviewData.js +3 -0
- package/{api/types/RecommendationsOverviewResponse.ts → dist/api/types/RecommendationsOverviewResponse.d.ts} +0 -3
- package/dist/api/types/RecommendationsOverviewResponse.js +3 -0
- package/{api/types/RegisterEndpointResponse.ts → dist/api/types/RegisterEndpointResponse.d.ts} +0 -3
- package/dist/api/types/RegisterEndpointResponse.js +3 -0
- package/{api/types/ResourceChange.ts → dist/api/types/ResourceChange.d.ts} +0 -2
- package/dist/api/types/ResourceChange.js +3 -0
- package/{api/types/ResourceSnapshot.ts → dist/api/types/ResourceSnapshot.d.ts} +0 -2
- package/dist/api/types/ResourceSnapshot.js +3 -0
- package/{api/types/RevokeApiKeyData.ts → dist/api/types/RevokeApiKeyData.d.ts} +0 -2
- package/dist/api/types/RevokeApiKeyData.js +3 -0
- package/{api/types/RevokeApiKeyResponse.ts → dist/api/types/RevokeApiKeyResponse.d.ts} +0 -3
- package/dist/api/types/RevokeApiKeyResponse.js +3 -0
- package/{api/types/RiskAssessment.ts → dist/api/types/RiskAssessment.d.ts} +0 -3
- package/dist/api/types/RiskAssessment.js +3 -0
- package/{api/types/RiskFactor.ts → dist/api/types/RiskFactor.d.ts} +0 -2
- package/dist/api/types/RiskFactor.js +3 -0
- package/{api/types/SavedBreakdownData.ts → dist/api/types/SavedBreakdownData.d.ts} +0 -3
- package/dist/api/types/SavedBreakdownData.js +3 -0
- package/{api/types/SavedBreakdownResponse.ts → dist/api/types/SavedBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/SavedBreakdownResponse.js +3 -0
- package/{api/types/SavedByProviderBreakdownData.ts → dist/api/types/SavedByProviderBreakdownData.d.ts} +0 -3
- package/dist/api/types/SavedByProviderBreakdownData.js +3 -0
- package/{api/types/SavedByProviderBreakdownResponse.ts → dist/api/types/SavedByProviderBreakdownResponse.d.ts} +0 -3
- package/dist/api/types/SavedByProviderBreakdownResponse.js +3 -0
- package/{api/types/SavedByProviderItem.ts → dist/api/types/SavedByProviderItem.d.ts} +0 -2
- package/dist/api/types/SavedByProviderItem.js +3 -0
- package/{api/types/SavedItem.ts → dist/api/types/SavedItem.d.ts} +0 -2
- package/dist/api/types/SavedItem.js +3 -0
- package/{api/types/SavedProviderSummary.ts → dist/api/types/SavedProviderSummary.d.ts} +0 -2
- package/dist/api/types/SavedProviderSummary.js +3 -0
- package/{api/types/SavedSummaryData.ts → dist/api/types/SavedSummaryData.d.ts} +0 -3
- package/dist/api/types/SavedSummaryData.js +3 -0
- package/{api/types/SavedSummaryResponse.ts → dist/api/types/SavedSummaryResponse.d.ts} +0 -3
- package/dist/api/types/SavedSummaryResponse.js +3 -0
- package/{api/types/SavingsDecisionData.ts → dist/api/types/SavingsDecisionData.d.ts} +0 -2
- package/dist/api/types/SavingsDecisionData.js +3 -0
- package/{api/types/SavingsDecisionResponse.ts → dist/api/types/SavingsDecisionResponse.d.ts} +0 -3
- package/dist/api/types/SavingsDecisionResponse.js +3 -0
- package/{api/types/SpendingByDateItem.ts → dist/api/types/SpendingByDateItem.d.ts} +0 -2
- package/dist/api/types/SpendingByDateItem.js +3 -0
- package/{api/types/TopRecommendation.ts → dist/api/types/TopRecommendation.d.ts} +0 -2
- package/dist/api/types/TopRecommendation.js +3 -0
- package/{api/types/TriggerInfo.ts → dist/api/types/TriggerInfo.d.ts} +0 -2
- package/dist/api/types/TriggerInfo.js +3 -0
- package/{api/types/UpdateTagData.ts → dist/api/types/UpdateTagData.d.ts} +0 -2
- package/dist/api/types/UpdateTagData.js +3 -0
- package/{api/types/UpdateTagResponse.ts → dist/api/types/UpdateTagResponse.d.ts} +0 -3
- package/dist/api/types/UpdateTagResponse.js +3 -0
- package/dist/api/types/ValidationError.d.ts +13 -0
- package/dist/api/types/ValidationError.js +3 -0
- package/dist/api/types/index.js +131 -0
- package/dist/core/exports.js +17 -0
- package/{core/fetcher/APIResponse.ts → dist/core/fetcher/APIResponse.d.ts} +0 -3
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/{core/fetcher/BinaryResponse.ts → dist/core/fetcher/BinaryResponse.d.ts} +1 -16
- package/dist/core/fetcher/BinaryResponse.js +17 -0
- package/dist/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +13 -0
- package/dist/core/fetcher/Fetcher.d.ts +48 -0
- package/{core/fetcher/Fetcher.ts → dist/core/fetcher/Fetcher.js} +72 -165
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/{core/fetcher/Headers.ts → dist/core/fetcher/Headers.js} +29 -37
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/{core/fetcher/HttpResponsePromise.ts → dist/core/fetcher/HttpResponsePromise.js} +26 -48
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/{core/fetcher/RawResponse.ts → dist/core/fetcher/RawResponse.js} +12 -29
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +13 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +8 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/{core/fetcher/getErrorResponseBody.ts → dist/core/fetcher/getErrorResponseBody.js} +9 -9
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +6 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/{core/fetcher/getHeader.ts → dist/core/fetcher/getHeader.js} +4 -1
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +16 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/{core/fetcher/getResponseBody.ts → dist/core/fetcher/getResponseBody.js} +10 -10
- package/dist/core/fetcher/index.js +17 -0
- package/dist/core/fetcher/makeRequest.d.ts +6 -0
- package/{core/fetcher/makeRequest.ts → dist/core/fetcher/makeRequest.js} +18 -29
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/{core/fetcher/requestWithRetries.ts → dist/core/fetcher/requestWithRetries.js} +11 -19
- package/dist/core/fetcher/signals.d.ts +5 -0
- package/{core/fetcher/signals.ts → dist/core/fetcher/signals.js} +9 -11
- package/dist/core/headers.d.ts +2 -0
- package/{core/headers.ts → dist/core/headers.js} +10 -12
- package/dist/core/index.js +43 -0
- package/dist/core/json.d.ts +15 -0
- package/{core/json.ts → dist/core/json.js} +7 -10
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +45 -0
- package/dist/core/logging/index.js +17 -0
- package/{core/logging/logger.ts → dist/core/logging/logger.d.ts} +26 -103
- package/dist/core/logging/logger.js +146 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/{core/runtime/runtime.ts → dist/core/runtime/runtime.js} +7 -38
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/{core/url/encodePathParam.ts → dist/core/url/encodePathParam.js} +5 -2
- package/dist/core/url/index.js +9 -0
- package/dist/core/url/join.d.ts +1 -0
- package/{core/url/join.ts → dist/core/url/join.js} +16 -27
- package/dist/core/url/qs.d.ts +6 -0
- package/{core/url/qs.ts → dist/core/url/qs.js} +19 -26
- package/dist/errors/LevelFourError.d.ts +12 -0
- package/dist/errors/LevelFourError.js +35 -0
- package/dist/errors/LevelFourTimeoutError.d.ts +3 -0
- package/{errors/LevelFourTimeoutError.ts → dist/errors/LevelFourTimeoutError.js} +6 -4
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +65 -0
- package/dist/errors/index.js +7 -0
- package/dist/errors.d.ts +29 -0
- package/dist/errors.js +98 -0
- package/dist/exports.js +17 -0
- package/{index.ts → dist/index.d.ts} +1 -11
- package/dist/index.js +65 -0
- package/dist/pagination.d.ts +23 -0
- package/dist/pagination.js +38 -0
- package/dist/telemetry.d.ts +2 -0
- package/dist/telemetry.js +50 -0
- package/dist/webhooks.d.ts +10 -0
- package/{webhooks.ts → dist/webhooks.js} +16 -32
- package/package.json +9 -4
- package/.fernignore +0 -9
- package/Client.ts +0 -90
- package/LevelFourClient.ts +0 -50
- package/api/errors/UnprocessableEntityError.ts +0 -22
- package/api/resources/evaluation/client/Client.ts +0 -71
- package/api/resources/health/client/Client.ts +0 -108
- package/api/resources/prAnalysis/client/Client.ts +0 -100
- package/api/resources/providers/types/GetProviderServiceBreakdownApiV1ProvidersProviderIdSpendingBreakdownGetResponse.ts +0 -8
- package/api/resources/spending/types/GetCostBreakdownApiV1SpendingBreakdownGetResponse.ts +0 -9
- package/api/types/ValidationError.ts +0 -17
- package/core/fetcher/EndpointSupplier.ts +0 -14
- package/core/fetcher/Supplier.ts +0 -11
- package/core/fetcher/createRequestUrl.ts +0 -6
- package/core/fetcher/getFetchFn.ts +0 -3
- package/core/fetcher/getRequestBody.ts +0 -20
- package/core/logging/exports.ts +0 -19
- package/errors/LevelFourError.ts +0 -58
- package/errors/handleNonStatusCodeError.ts +0 -37
- package/errors.ts +0 -100
- package/jest.config.js +0 -17
- package/pagination.ts +0 -54
- package/telemetry.ts +0 -64
- package/tests/auth.test.ts +0 -64
- package/tests/errors.test.ts +0 -92
- package/tests/pagination.test.ts +0 -72
- package/tests/telemetry.test.ts +0 -110
- package/tsconfig.json +0 -22
- /package/{api/errors/index.ts → dist/api/errors/index.d.ts} +0 -0
- /package/{api/index.ts → dist/api/index.d.ts} +0 -0
- /package/{api/resources/apiKeys/client/index.ts → dist/api/resources/apiKeys/client/index.d.ts} +0 -0
- /package/{api/resources/apiKeys/client/requests/index.ts → dist/api/resources/apiKeys/client/requests/index.d.ts} +0 -0
- /package/{api/resources/apiKeys/index.ts → dist/api/resources/apiKeys/index.d.ts} +0 -0
- /package/{api/resources/evaluation/client/index.ts → dist/api/resources/evaluation/client/index.d.ts} +0 -0
- /package/{api/resources/evaluation/index.ts → dist/api/resources/evaluation/index.d.ts} +0 -0
- /package/{api/resources/health/client/index.ts → dist/api/resources/health/client/index.d.ts} +0 -0
- /package/{api/resources/health/index.ts → dist/api/resources/health/index.d.ts} +0 -0
- /package/{api/resources/index.ts → dist/api/resources/index.d.ts} +0 -0
- /package/{api/resources/prAnalysis/client/index.ts → dist/api/resources/prAnalysis/client/index.d.ts} +0 -0
- /package/{api/resources/prAnalysis/client/requests/index.ts → dist/api/resources/prAnalysis/client/requests/index.d.ts} +0 -0
- /package/{api/resources/prAnalysis/index.ts → dist/api/resources/prAnalysis/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisActions/client/index.ts → dist/api/resources/prAnalysisActions/client/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisActions/client/requests/index.ts → dist/api/resources/prAnalysisActions/client/requests/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisActions/index.ts → dist/api/resources/prAnalysisActions/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisInstallations/client/index.ts → dist/api/resources/prAnalysisInstallations/client/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisInstallations/client/requests/index.ts → dist/api/resources/prAnalysisInstallations/client/requests/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisInstallations/index.ts → dist/api/resources/prAnalysisInstallations/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisQuery/client/index.ts → dist/api/resources/prAnalysisQuery/client/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisQuery/client/requests/index.ts → dist/api/resources/prAnalysisQuery/client/requests/index.d.ts} +0 -0
- /package/{api/resources/prAnalysisQuery/index.ts → dist/api/resources/prAnalysisQuery/index.d.ts} +0 -0
- /package/{api/resources/providers/client/index.ts → dist/api/resources/providers/client/index.d.ts} +0 -0
- /package/{api/resources/providers/client/requests/index.ts → dist/api/resources/providers/client/requests/index.d.ts} +0 -0
- /package/{api/resources/providers/index.ts → dist/api/resources/providers/index.d.ts} +0 -0
- /package/{api/resources/providers/types/index.ts → dist/api/resources/providers/types/index.d.ts} +0 -0
- /package/{api/resources/recommendations/client/index.ts → dist/api/resources/recommendations/client/index.d.ts} +0 -0
- /package/{api/resources/recommendations/client/requests/index.ts → dist/api/resources/recommendations/client/requests/index.d.ts} +0 -0
- /package/{api/resources/recommendations/index.ts → dist/api/resources/recommendations/index.d.ts} +0 -0
- /package/{api/resources/savings/client/index.ts → dist/api/resources/savings/client/index.d.ts} +0 -0
- /package/{api/resources/savings/client/requests/index.ts → dist/api/resources/savings/client/requests/index.d.ts} +0 -0
- /package/{api/resources/savings/index.ts → dist/api/resources/savings/index.d.ts} +0 -0
- /package/{api/resources/spending/client/index.ts → dist/api/resources/spending/client/index.d.ts} +0 -0
- /package/{api/resources/spending/client/requests/index.ts → dist/api/resources/spending/client/requests/index.d.ts} +0 -0
- /package/{api/resources/spending/index.ts → dist/api/resources/spending/index.d.ts} +0 -0
- /package/{api/resources/spending/types/index.ts → dist/api/resources/spending/types/index.d.ts} +0 -0
- /package/{api/resources/webhooks/client/index.ts → dist/api/resources/webhooks/client/index.d.ts} +0 -0
- /package/{api/resources/webhooks/client/requests/index.ts → dist/api/resources/webhooks/client/requests/index.d.ts} +0 -0
- /package/{api/resources/webhooks/index.ts → dist/api/resources/webhooks/index.d.ts} +0 -0
- /package/{api/types/index.ts → dist/api/types/index.d.ts} +0 -0
- /package/{core/exports.ts → dist/core/exports.d.ts} +0 -0
- /package/{core/fetcher/EndpointMetadata.ts → dist/core/fetcher/EndpointMetadata.d.ts} +0 -0
- /package/{core/fetcher/index.ts → dist/core/fetcher/index.d.ts} +0 -0
- /package/{core/index.ts → dist/core/index.d.ts} +0 -0
- /package/{core/logging/index.ts → dist/core/logging/index.d.ts} +0 -0
- /package/{core/runtime/index.ts → dist/core/runtime/index.d.ts} +0 -0
- /package/{core/url/index.ts → dist/core/url/index.d.ts} +0 -0
- /package/{errors/index.ts → dist/errors/index.d.ts} +0 -0
- /package/{exports.ts → dist/exports.d.ts} +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.createTracedFetch = exports.WebhookVerificationError = exports.WebhookVerifier = exports.PageIterator = exports.mapError = exports.InternalServerError = exports.ValidationError = exports.RateLimitError = exports.ConflictError = exports.BadRequestError = exports.NotFoundError = exports.AuthorizationError = exports.AuthenticationError = exports.LevelFourTimeoutError = exports.LevelFourError = exports.BaseLevelFourClient = exports.LevelFourClient = exports.LevelFour = void 0;
|
|
40
|
+
exports.LevelFour = __importStar(require("./api/index.js"));
|
|
41
|
+
var LevelFourClient_js_1 = require("./LevelFourClient.js");
|
|
42
|
+
Object.defineProperty(exports, "LevelFourClient", { enumerable: true, get: function () { return LevelFourClient_js_1.LevelFourClient; } });
|
|
43
|
+
var Client_js_1 = require("./Client.js");
|
|
44
|
+
Object.defineProperty(exports, "BaseLevelFourClient", { enumerable: true, get: function () { return Client_js_1.LevelFourClient; } });
|
|
45
|
+
var index_js_1 = require("./errors/index.js");
|
|
46
|
+
Object.defineProperty(exports, "LevelFourError", { enumerable: true, get: function () { return index_js_1.LevelFourError; } });
|
|
47
|
+
Object.defineProperty(exports, "LevelFourTimeoutError", { enumerable: true, get: function () { return index_js_1.LevelFourTimeoutError; } });
|
|
48
|
+
var errors_js_1 = require("./errors.js");
|
|
49
|
+
Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return errors_js_1.AuthenticationError; } });
|
|
50
|
+
Object.defineProperty(exports, "AuthorizationError", { enumerable: true, get: function () { return errors_js_1.AuthorizationError; } });
|
|
51
|
+
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return errors_js_1.NotFoundError; } });
|
|
52
|
+
Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return errors_js_1.BadRequestError; } });
|
|
53
|
+
Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return errors_js_1.ConflictError; } });
|
|
54
|
+
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_js_1.RateLimitError; } });
|
|
55
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return errors_js_1.ValidationError; } });
|
|
56
|
+
Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return errors_js_1.InternalServerError; } });
|
|
57
|
+
Object.defineProperty(exports, "mapError", { enumerable: true, get: function () { return errors_js_1.mapError; } });
|
|
58
|
+
var pagination_js_1 = require("./pagination.js");
|
|
59
|
+
Object.defineProperty(exports, "PageIterator", { enumerable: true, get: function () { return pagination_js_1.PageIterator; } });
|
|
60
|
+
var webhooks_js_1 = require("./webhooks.js");
|
|
61
|
+
Object.defineProperty(exports, "WebhookVerifier", { enumerable: true, get: function () { return webhooks_js_1.WebhookVerifier; } });
|
|
62
|
+
Object.defineProperty(exports, "WebhookVerificationError", { enumerable: true, get: function () { return webhooks_js_1.WebhookVerificationError; } });
|
|
63
|
+
var telemetry_js_1 = require("./telemetry.js");
|
|
64
|
+
Object.defineProperty(exports, "createTracedFetch", { enumerable: true, get: function () { return telemetry_js_1.createTracedFetch; } });
|
|
65
|
+
__exportStar(require("./exports.js"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface PaginatedResponse<T> {
|
|
2
|
+
data: {
|
|
3
|
+
items: T[];
|
|
4
|
+
pagination: {
|
|
5
|
+
total_items: number;
|
|
6
|
+
total_pages: number;
|
|
7
|
+
current_page: number;
|
|
8
|
+
page_size: number;
|
|
9
|
+
has_next: boolean;
|
|
10
|
+
has_previous: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export type FetchPage<T> = (page: number, pageSize: number) => Promise<PaginatedResponse<T>>;
|
|
15
|
+
export declare class PageIterator<T> {
|
|
16
|
+
private readonly fetchPage;
|
|
17
|
+
private readonly pageSize;
|
|
18
|
+
private currentPage;
|
|
19
|
+
private done;
|
|
20
|
+
constructor(fetchPage: FetchPage<T>, pageSize?: number);
|
|
21
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
|
|
22
|
+
toArray(): Promise<T[]>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageIterator = void 0;
|
|
4
|
+
class PageIterator {
|
|
5
|
+
fetchPage;
|
|
6
|
+
pageSize;
|
|
7
|
+
currentPage;
|
|
8
|
+
done;
|
|
9
|
+
constructor(fetchPage, pageSize = 20) {
|
|
10
|
+
this.fetchPage = fetchPage;
|
|
11
|
+
this.pageSize = pageSize;
|
|
12
|
+
this.currentPage = 1;
|
|
13
|
+
this.done = false;
|
|
14
|
+
}
|
|
15
|
+
async *[Symbol.asyncIterator]() {
|
|
16
|
+
while (!this.done) {
|
|
17
|
+
const response = await this.fetchPage(this.currentPage, this.pageSize);
|
|
18
|
+
const items = response.data.items;
|
|
19
|
+
for (const item of items) {
|
|
20
|
+
yield item;
|
|
21
|
+
}
|
|
22
|
+
if (!response.data.pagination.has_next) {
|
|
23
|
+
this.done = true;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.currentPage++;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async toArray() {
|
|
31
|
+
const results = [];
|
|
32
|
+
for await (const item of this) {
|
|
33
|
+
results.push(item);
|
|
34
|
+
}
|
|
35
|
+
return results;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.PageIterator = PageIterator;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTracedFetch = createTracedFetch;
|
|
4
|
+
exports._resetTracer = _resetTracer;
|
|
5
|
+
let _tracer;
|
|
6
|
+
function getTracer() {
|
|
7
|
+
if (_tracer !== undefined) {
|
|
8
|
+
return _tracer;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const otel = require("@opentelemetry/api");
|
|
12
|
+
_tracer = otel.trace.getTracer("levelfour-sdk");
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
_tracer = null;
|
|
16
|
+
}
|
|
17
|
+
return _tracer;
|
|
18
|
+
}
|
|
19
|
+
function createTracedFetch(fetchFn) {
|
|
20
|
+
if (!fetchFn) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const tracer = getTracer();
|
|
24
|
+
if (!tracer) {
|
|
25
|
+
return fetchFn;
|
|
26
|
+
}
|
|
27
|
+
return function tracedFetch(input, init) {
|
|
28
|
+
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
29
|
+
const method = init?.method ?? "GET";
|
|
30
|
+
return tracer.startActiveSpan(`levelfour.http ${method}`, (span) => {
|
|
31
|
+
span.setAttribute("http.method", method);
|
|
32
|
+
span.setAttribute("http.url", url);
|
|
33
|
+
return fetchFn(input, init).then((response) => {
|
|
34
|
+
span.setAttribute("http.status_code", response.status);
|
|
35
|
+
span.setAttribute("levelfour.success", response.status < 400);
|
|
36
|
+
span.end();
|
|
37
|
+
return response;
|
|
38
|
+
}, (error) => {
|
|
39
|
+
span.setAttribute("levelfour.success", false);
|
|
40
|
+
span.setAttribute("levelfour.error.type", error?.constructor?.name ?? "Error");
|
|
41
|
+
span.recordException(error);
|
|
42
|
+
span.end();
|
|
43
|
+
throw error;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function _resetTracer() {
|
|
49
|
+
_tracer = undefined;
|
|
50
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class WebhookVerificationError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class WebhookVerifier {
|
|
5
|
+
private readonly secret;
|
|
6
|
+
constructor(secret: string);
|
|
7
|
+
verify(payload: string | Buffer, headers: Record<string, string | undefined>, options?: {
|
|
8
|
+
toleranceSeconds?: number;
|
|
9
|
+
}): unknown;
|
|
10
|
+
}
|
|
@@ -1,77 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookVerifier = exports.WebhookVerificationError = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
class WebhookVerificationError extends Error {
|
|
6
|
+
constructor(message) {
|
|
5
7
|
super(message);
|
|
6
8
|
this.name = "WebhookVerificationError";
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
constructor(secret: string) {
|
|
11
|
+
exports.WebhookVerificationError = WebhookVerificationError;
|
|
12
|
+
class WebhookVerifier {
|
|
13
|
+
secret;
|
|
14
|
+
constructor(secret) {
|
|
14
15
|
if (secret.startsWith("whsec_")) {
|
|
15
16
|
secret = secret.slice(6);
|
|
16
17
|
}
|
|
17
18
|
this.secret = Buffer.from(secret, "base64");
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
verify(
|
|
21
|
-
payload: string | Buffer,
|
|
22
|
-
headers: Record<string, string | undefined>,
|
|
23
|
-
options: { toleranceSeconds?: number } = {},
|
|
24
|
-
): unknown {
|
|
20
|
+
verify(payload, headers, options = {}) {
|
|
25
21
|
const tolerance = options.toleranceSeconds ?? 300;
|
|
26
|
-
|
|
27
22
|
const msgId = headers["webhook-id"] ?? headers["svix-id"];
|
|
28
23
|
const msgTimestamp = headers["webhook-timestamp"] ?? headers["svix-timestamp"];
|
|
29
24
|
const msgSignature = headers["webhook-signature"] ?? headers["svix-signature"];
|
|
30
|
-
|
|
31
25
|
if (!msgId || !msgTimestamp || !msgSignature) {
|
|
32
26
|
throw new WebhookVerificationError("Missing required webhook headers");
|
|
33
27
|
}
|
|
34
|
-
|
|
35
28
|
const ts = parseInt(msgTimestamp, 10);
|
|
36
29
|
if (isNaN(ts)) {
|
|
37
30
|
throw new WebhookVerificationError("Invalid timestamp");
|
|
38
31
|
}
|
|
39
|
-
|
|
40
32
|
const now = Math.floor(Date.now() / 1000);
|
|
41
33
|
if (Math.abs(now - ts) > tolerance) {
|
|
42
34
|
throw new WebhookVerificationError("Timestamp too old or too new");
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
const payloadBytes = typeof payload === "string" ? Buffer.from(payload, "utf-8") : payload;
|
|
46
37
|
const toSign = Buffer.concat([
|
|
47
38
|
Buffer.from(`${msgId}.${msgTimestamp}.`),
|
|
48
39
|
payloadBytes,
|
|
49
40
|
]);
|
|
50
|
-
|
|
51
|
-
const expected = createHmac("sha256", this.secret).update(toSign).digest("base64");
|
|
52
|
-
|
|
41
|
+
const expected = (0, node_crypto_1.createHmac)("sha256", this.secret).update(toSign).digest("base64");
|
|
53
42
|
let passed = false;
|
|
54
43
|
for (const sig of msgSignature.split(" ")) {
|
|
55
44
|
const sigValue = sig.includes(",") ? sig.split(",")[1] : sig;
|
|
56
45
|
try {
|
|
57
|
-
if (
|
|
58
|
-
timingSafeEqual(
|
|
59
|
-
Buffer.from(expected),
|
|
60
|
-
Buffer.from(sigValue ?? ""),
|
|
61
|
-
)
|
|
62
|
-
) {
|
|
46
|
+
if ((0, node_crypto_1.timingSafeEqual)(Buffer.from(expected), Buffer.from(sigValue ?? ""))) {
|
|
63
47
|
passed = true;
|
|
64
48
|
break;
|
|
65
49
|
}
|
|
66
|
-
}
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
67
52
|
continue;
|
|
68
53
|
}
|
|
69
54
|
}
|
|
70
|
-
|
|
71
55
|
if (!passed) {
|
|
72
56
|
throw new WebhookVerificationError("Invalid signature");
|
|
73
57
|
}
|
|
74
|
-
|
|
75
58
|
return JSON.parse(payloadBytes.toString("utf-8"));
|
|
76
59
|
}
|
|
77
60
|
}
|
|
61
|
+
exports.WebhookVerifier = WebhookVerifier;
|
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "levelfour",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.js"
|
|
11
12
|
}
|
|
12
13
|
},
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "tsc",
|
|
15
|
-
"test": "jest"
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
16
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
17
22
|
"devDependencies": {
|
|
18
23
|
"@types/jest": "^30.0.0",
|
|
19
24
|
"@types/node": "^25.3.5",
|
package/.fernignore
DELETED
package/Client.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
4
|
-
import { EvaluationClient } from "./api/resources/evaluation/client/Client.js";
|
|
5
|
-
import { HealthClient } from "./api/resources/health/client/Client.js";
|
|
6
|
-
import { PrAnalysisClient } from "./api/resources/prAnalysis/client/Client.js";
|
|
7
|
-
import { PrAnalysisActionsClient } from "./api/resources/prAnalysisActions/client/Client.js";
|
|
8
|
-
import { PrAnalysisInstallationsClient } from "./api/resources/prAnalysisInstallations/client/Client.js";
|
|
9
|
-
import { PrAnalysisQueryClient } from "./api/resources/prAnalysisQuery/client/Client.js";
|
|
10
|
-
import { ProvidersClient } from "./api/resources/providers/client/Client.js";
|
|
11
|
-
import { RecommendationsClient } from "./api/resources/recommendations/client/Client.js";
|
|
12
|
-
import { SavingsClient } from "./api/resources/savings/client/Client.js";
|
|
13
|
-
import { SpendingClient } from "./api/resources/spending/client/Client.js";
|
|
14
|
-
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
15
|
-
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
16
|
-
import { type NormalizedClientOptions, normalizeClientOptions } from "./BaseClient.js";
|
|
17
|
-
|
|
18
|
-
export declare namespace LevelFourClient {
|
|
19
|
-
export type Options = BaseClientOptions;
|
|
20
|
-
|
|
21
|
-
export interface RequestOptions extends BaseRequestOptions {}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class LevelFourClient {
|
|
25
|
-
protected readonly _options: NormalizedClientOptions<LevelFourClient.Options>;
|
|
26
|
-
protected _apiKeys: ApiKeysClient | undefined;
|
|
27
|
-
protected _webhooks: WebhooksClient | undefined;
|
|
28
|
-
protected _recommendations: RecommendationsClient | undefined;
|
|
29
|
-
protected _savings: SavingsClient | undefined;
|
|
30
|
-
protected _spending: SpendingClient | undefined;
|
|
31
|
-
protected _providers: ProvidersClient | undefined;
|
|
32
|
-
protected _evaluation: EvaluationClient | undefined;
|
|
33
|
-
protected _prAnalysis: PrAnalysisClient | undefined;
|
|
34
|
-
protected _prAnalysisInstallations: PrAnalysisInstallationsClient | undefined;
|
|
35
|
-
protected _prAnalysisActions: PrAnalysisActionsClient | undefined;
|
|
36
|
-
protected _prAnalysisQuery: PrAnalysisQueryClient | undefined;
|
|
37
|
-
protected _health: HealthClient | undefined;
|
|
38
|
-
|
|
39
|
-
constructor(options: LevelFourClient.Options) {
|
|
40
|
-
this._options = normalizeClientOptions(options);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
public get apiKeys(): ApiKeysClient {
|
|
44
|
-
return (this._apiKeys ??= new ApiKeysClient(this._options));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
public get webhooks(): WebhooksClient {
|
|
48
|
-
return (this._webhooks ??= new WebhooksClient(this._options));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public get recommendations(): RecommendationsClient {
|
|
52
|
-
return (this._recommendations ??= new RecommendationsClient(this._options));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public get savings(): SavingsClient {
|
|
56
|
-
return (this._savings ??= new SavingsClient(this._options));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
public get spending(): SpendingClient {
|
|
60
|
-
return (this._spending ??= new SpendingClient(this._options));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public get providers(): ProvidersClient {
|
|
64
|
-
return (this._providers ??= new ProvidersClient(this._options));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
public get evaluation(): EvaluationClient {
|
|
68
|
-
return (this._evaluation ??= new EvaluationClient(this._options));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
public get prAnalysis(): PrAnalysisClient {
|
|
72
|
-
return (this._prAnalysis ??= new PrAnalysisClient(this._options));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
public get prAnalysisInstallations(): PrAnalysisInstallationsClient {
|
|
76
|
-
return (this._prAnalysisInstallations ??= new PrAnalysisInstallationsClient(this._options));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
public get prAnalysisActions(): PrAnalysisActionsClient {
|
|
80
|
-
return (this._prAnalysisActions ??= new PrAnalysisActionsClient(this._options));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
public get prAnalysisQuery(): PrAnalysisQueryClient {
|
|
84
|
-
return (this._prAnalysisQuery ??= new PrAnalysisQueryClient(this._options));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
public get health(): HealthClient {
|
|
88
|
-
return (this._health ??= new HealthClient(this._options));
|
|
89
|
-
}
|
|
90
|
-
}
|
package/LevelFourClient.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { LevelFourClient as BaseLevelFourClient } from "./Client.js";
|
|
2
|
-
import { AuthenticationError } from "./errors.js";
|
|
3
|
-
import { createTracedFetch } from "./telemetry.js";
|
|
4
|
-
|
|
5
|
-
const VALID_PREFIXES = ["l4_live_", "l4_test_"] as const;
|
|
6
|
-
const DEFAULT_BASE_URL = "https://api.levelfour.ai";
|
|
7
|
-
|
|
8
|
-
function resolveApiKey(apiKey?: string): string {
|
|
9
|
-
const key = apiKey ?? (typeof process !== "undefined" ? process.env.LEVELFOUR_API_KEY : undefined);
|
|
10
|
-
if (!key) {
|
|
11
|
-
throw new AuthenticationError(
|
|
12
|
-
"No API key provided. Set LEVELFOUR_API_KEY environment variable or pass apiKey to the constructor.",
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
if (!VALID_PREFIXES.some((prefix) => key.startsWith(prefix))) {
|
|
16
|
-
throw new AuthenticationError(
|
|
17
|
-
`Invalid API key format. Key must start with one of: ${VALID_PREFIXES.join(", ")}`,
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
return key;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface LevelFourClientOptions {
|
|
24
|
-
apiKey?: string;
|
|
25
|
-
baseUrl?: string;
|
|
26
|
-
timeoutInSeconds?: number;
|
|
27
|
-
maxRetries?: number;
|
|
28
|
-
fetch?: typeof fetch;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class LevelFourClient extends BaseLevelFourClient {
|
|
32
|
-
private readonly _apiKey: string;
|
|
33
|
-
|
|
34
|
-
constructor(options: LevelFourClientOptions = {}) {
|
|
35
|
-
const resolvedKey = resolveApiKey(options.apiKey);
|
|
36
|
-
const baseUrl = options.baseUrl ?? DEFAULT_BASE_URL;
|
|
37
|
-
|
|
38
|
-
super({
|
|
39
|
-
environment: baseUrl,
|
|
40
|
-
headers: {
|
|
41
|
-
Authorization: `Bearer ${resolvedKey}`,
|
|
42
|
-
},
|
|
43
|
-
timeoutInSeconds: options.timeoutInSeconds ?? 30,
|
|
44
|
-
maxRetries: options.maxRetries ?? 2,
|
|
45
|
-
fetch: createTracedFetch(options.fetch),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
this._apiKey = resolvedKey;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import type * as core from "../../core/index.js";
|
|
4
|
-
import * as errors from "../../errors/index.js";
|
|
5
|
-
import type * as LevelFour from "../index.js";
|
|
6
|
-
|
|
7
|
-
export class UnprocessableEntityError extends errors.LevelFourError {
|
|
8
|
-
constructor(body: LevelFour.HttpValidationError, rawResponse?: core.RawResponse) {
|
|
9
|
-
super({
|
|
10
|
-
message: "UnprocessableEntityError",
|
|
11
|
-
statusCode: 422,
|
|
12
|
-
body: body,
|
|
13
|
-
rawResponse: rawResponse,
|
|
14
|
-
});
|
|
15
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
16
|
-
if (Error.captureStackTrace) {
|
|
17
|
-
Error.captureStackTrace(this, this.constructor);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
this.name = this.constructor.name;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
4
|
-
import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../BaseClient.js";
|
|
5
|
-
import { mergeHeaders } from "../../../../core/headers.js";
|
|
6
|
-
import * as core from "../../../../core/index.js";
|
|
7
|
-
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
|
|
8
|
-
import * as errors from "../../../../errors/index.js";
|
|
9
|
-
import type * as LevelFour from "../../../index.js";
|
|
10
|
-
|
|
11
|
-
export declare namespace EvaluationClient {
|
|
12
|
-
export type Options = BaseClientOptions;
|
|
13
|
-
|
|
14
|
-
export interface RequestOptions extends BaseRequestOptions {}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class EvaluationClient {
|
|
18
|
-
protected readonly _options: NormalizedClientOptions<EvaluationClient.Options>;
|
|
19
|
-
|
|
20
|
-
constructor(options: EvaluationClient.Options) {
|
|
21
|
-
this._options = normalizeClientOptions(options);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Returns the current evaluation period status for the authenticated tenant
|
|
26
|
-
*
|
|
27
|
-
* @param {EvaluationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* await client.evaluation.getEvaluationStatus()
|
|
31
|
-
*/
|
|
32
|
-
public getEvaluationStatus(
|
|
33
|
-
requestOptions?: EvaluationClient.RequestOptions,
|
|
34
|
-
): core.HttpResponsePromise<LevelFour.EvaluationStatusResponse> {
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__getEvaluationStatus(requestOptions));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
private async __getEvaluationStatus(
|
|
39
|
-
requestOptions?: EvaluationClient.RequestOptions,
|
|
40
|
-
): Promise<core.WithRawResponse<LevelFour.EvaluationStatusResponse>> {
|
|
41
|
-
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(this._options?.headers, requestOptions?.headers);
|
|
42
|
-
const _response = await core.fetcher({
|
|
43
|
-
url: core.url.join(
|
|
44
|
-
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
45
|
-
(await core.Supplier.get(this._options.environment)),
|
|
46
|
-
"api/v1/evaluation/status",
|
|
47
|
-
),
|
|
48
|
-
method: "GET",
|
|
49
|
-
headers: _headers,
|
|
50
|
-
queryParameters: requestOptions?.queryParams,
|
|
51
|
-
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
52
|
-
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
53
|
-
abortSignal: requestOptions?.abortSignal,
|
|
54
|
-
fetchFn: this._options?.fetch,
|
|
55
|
-
logging: this._options.logging,
|
|
56
|
-
});
|
|
57
|
-
if (_response.ok) {
|
|
58
|
-
return { data: _response.body as LevelFour.EvaluationStatusResponse, rawResponse: _response.rawResponse };
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (_response.error.reason === "status-code") {
|
|
62
|
-
throw new errors.LevelFourError({
|
|
63
|
-
statusCode: _response.error.statusCode,
|
|
64
|
-
body: _response.error.body,
|
|
65
|
-
rawResponse: _response.rawResponse,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/v1/evaluation/status");
|
|
70
|
-
}
|
|
71
|
-
}
|