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
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpResponsePromise = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private constructor(promise: Promise<WithRawResponse<T>>) {
|
|
7
|
+
class HttpResponsePromise extends Promise {
|
|
8
|
+
innerPromise;
|
|
9
|
+
unwrappedPromise;
|
|
10
|
+
constructor(promise) {
|
|
11
11
|
// Initialize with a no-op to avoid premature parsing
|
|
12
12
|
super((resolve) => {
|
|
13
|
-
resolve(undefined
|
|
13
|
+
resolve(undefined);
|
|
14
14
|
});
|
|
15
15
|
this.innerPromise = promise;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
/**
|
|
19
18
|
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
20
19
|
*
|
|
@@ -22,95 +21,74 @@ export class HttpResponsePromise<T> extends Promise<T> {
|
|
|
22
21
|
* @param args - Arguments to pass to the function.
|
|
23
22
|
* @returns An `HttpResponsePromise` instance.
|
|
24
23
|
*/
|
|
25
|
-
|
|
26
|
-
fn
|
|
27
|
-
...args: Parameters<F>
|
|
28
|
-
): HttpResponsePromise<T> {
|
|
29
|
-
return new HttpResponsePromise<T>(fn(...args));
|
|
24
|
+
static fromFunction(fn, ...args) {
|
|
25
|
+
return new HttpResponsePromise(fn(...args));
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
/**
|
|
33
28
|
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
34
29
|
*
|
|
35
30
|
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
36
31
|
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
37
32
|
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
>(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T> {
|
|
42
|
-
return (...args: Parameters<F>): HttpResponsePromise<T> => {
|
|
43
|
-
return HttpResponsePromise.fromPromise<T>(fn(...args));
|
|
33
|
+
static interceptFunction(fn) {
|
|
34
|
+
return (...args) => {
|
|
35
|
+
return HttpResponsePromise.fromPromise(fn(...args));
|
|
44
36
|
};
|
|
45
37
|
}
|
|
46
|
-
|
|
47
38
|
/**
|
|
48
39
|
* Creates an `HttpResponsePromise` from an existing promise.
|
|
49
40
|
*
|
|
50
41
|
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
51
42
|
* @returns An `HttpResponsePromise` instance.
|
|
52
43
|
*/
|
|
53
|
-
|
|
54
|
-
return new HttpResponsePromise
|
|
44
|
+
static fromPromise(promise) {
|
|
45
|
+
return new HttpResponsePromise(promise);
|
|
55
46
|
}
|
|
56
|
-
|
|
57
47
|
/**
|
|
58
48
|
* Creates an `HttpResponsePromise` from an executor function.
|
|
59
49
|
*
|
|
60
50
|
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
61
51
|
* @returns An `HttpResponsePromise` instance.
|
|
62
52
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const promise = new Promise<WithRawResponse<T>>(executor);
|
|
67
|
-
return new HttpResponsePromise<T>(promise);
|
|
53
|
+
static fromExecutor(executor) {
|
|
54
|
+
const promise = new Promise(executor);
|
|
55
|
+
return new HttpResponsePromise(promise);
|
|
68
56
|
}
|
|
69
|
-
|
|
70
57
|
/**
|
|
71
58
|
* Creates an `HttpResponsePromise` from a resolved result.
|
|
72
59
|
*
|
|
73
60
|
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
74
61
|
* @returns An `HttpResponsePromise` instance.
|
|
75
62
|
*/
|
|
76
|
-
|
|
63
|
+
static fromResult(result) {
|
|
77
64
|
const promise = Promise.resolve(result);
|
|
78
|
-
return new HttpResponsePromise
|
|
65
|
+
return new HttpResponsePromise(promise);
|
|
79
66
|
}
|
|
80
|
-
|
|
81
|
-
private unwrap(): Promise<T> {
|
|
67
|
+
unwrap() {
|
|
82
68
|
if (!this.unwrappedPromise) {
|
|
83
69
|
this.unwrappedPromise = this.innerPromise.then(({ data }) => data);
|
|
84
70
|
}
|
|
85
71
|
return this.unwrappedPromise;
|
|
86
72
|
}
|
|
87
|
-
|
|
88
73
|
/** @inheritdoc */
|
|
89
|
-
|
|
90
|
-
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
|
91
|
-
onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,
|
|
92
|
-
): Promise<TResult1 | TResult2> {
|
|
74
|
+
then(onfulfilled, onrejected) {
|
|
93
75
|
return this.unwrap().then(onfulfilled, onrejected);
|
|
94
76
|
}
|
|
95
|
-
|
|
96
77
|
/** @inheritdoc */
|
|
97
|
-
|
|
98
|
-
onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,
|
|
99
|
-
): Promise<T | TResult> {
|
|
78
|
+
catch(onrejected) {
|
|
100
79
|
return this.unwrap().catch(onrejected);
|
|
101
80
|
}
|
|
102
|
-
|
|
103
81
|
/** @inheritdoc */
|
|
104
|
-
|
|
82
|
+
finally(onfinally) {
|
|
105
83
|
return this.unwrap().finally(onfinally);
|
|
106
84
|
}
|
|
107
|
-
|
|
108
85
|
/**
|
|
109
86
|
* Retrieves the data and raw response.
|
|
110
87
|
*
|
|
111
88
|
* @returns A promise resolving to a `WithRawResponse` object.
|
|
112
89
|
*/
|
|
113
|
-
|
|
90
|
+
async withRawResponse() {
|
|
114
91
|
return await this.innerPromise;
|
|
115
92
|
}
|
|
116
93
|
}
|
|
94
|
+
exports.HttpResponsePromise = HttpResponsePromise;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raw response from the fetch call excluding the body.
|
|
3
|
+
*/
|
|
4
|
+
export type RawResponse = Omit<{
|
|
5
|
+
[K in keyof Response as Response[K] extends Function ? never : K]: Response[K];
|
|
6
|
+
}, "ok" | "body" | "bodyUsed">;
|
|
7
|
+
/**
|
|
8
|
+
* A raw response indicating that the request was aborted.
|
|
9
|
+
*/
|
|
10
|
+
export declare const abortRawResponse: RawResponse;
|
|
11
|
+
/**
|
|
12
|
+
* A raw response indicating an unknown error.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unknownRawResponse: RawResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
17
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
18
|
+
*
|
|
19
|
+
* @param response - The `RawResponse` object to convert.
|
|
20
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toRawResponse(response: Response): RawResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a `RawResponse` from a standard `Response` object.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithRawResponse<T> {
|
|
27
|
+
readonly data: T;
|
|
28
|
+
readonly rawResponse: RawResponse;
|
|
29
|
+
}
|
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type RawResponse = Omit<
|
|
7
|
-
{
|
|
8
|
-
[K in keyof Response as Response[K] extends Function ? never : K]: Response[K]; // strips out functions
|
|
9
|
-
},
|
|
10
|
-
"ok" | "body" | "bodyUsed"
|
|
11
|
-
>; // strips out body and bodyUsed
|
|
12
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unknownRawResponse = exports.abortRawResponse = void 0;
|
|
4
|
+
exports.toRawResponse = toRawResponse;
|
|
5
|
+
const Headers_js_1 = require("./Headers.js");
|
|
13
6
|
/**
|
|
14
7
|
* A raw response indicating that the request was aborted.
|
|
15
8
|
*/
|
|
16
|
-
|
|
17
|
-
headers: new Headers(),
|
|
9
|
+
exports.abortRawResponse = {
|
|
10
|
+
headers: new Headers_js_1.Headers(),
|
|
18
11
|
redirected: false,
|
|
19
12
|
status: 499,
|
|
20
13
|
statusText: "Client Closed Request",
|
|
21
14
|
type: "error",
|
|
22
15
|
url: "",
|
|
23
|
-
}
|
|
24
|
-
|
|
16
|
+
};
|
|
25
17
|
/**
|
|
26
18
|
* A raw response indicating an unknown error.
|
|
27
19
|
*/
|
|
28
|
-
|
|
29
|
-
headers: new Headers(),
|
|
20
|
+
exports.unknownRawResponse = {
|
|
21
|
+
headers: new Headers_js_1.Headers(),
|
|
30
22
|
redirected: false,
|
|
31
23
|
status: 0,
|
|
32
24
|
statusText: "Unknown Error",
|
|
33
25
|
type: "error",
|
|
34
26
|
url: "",
|
|
35
|
-
}
|
|
36
|
-
|
|
27
|
+
};
|
|
37
28
|
/**
|
|
38
29
|
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
39
30
|
* excluding the `body` and `bodyUsed` fields.
|
|
@@ -41,7 +32,7 @@ export const unknownRawResponse: RawResponse = {
|
|
|
41
32
|
* @param response - The `RawResponse` object to convert.
|
|
42
33
|
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
43
34
|
*/
|
|
44
|
-
|
|
35
|
+
function toRawResponse(response) {
|
|
45
36
|
return {
|
|
46
37
|
headers: response.headers,
|
|
47
38
|
redirected: response.redirected,
|
|
@@ -51,11 +42,3 @@ export function toRawResponse(response: Response): RawResponse {
|
|
|
51
42
|
url: response.url,
|
|
52
43
|
};
|
|
53
44
|
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Creates a `RawResponse` from a standard `Response` object.
|
|
57
|
-
*/
|
|
58
|
-
export interface WithRawResponse<T> {
|
|
59
|
-
readonly data: T;
|
|
60
|
-
readonly rawResponse: RawResponse;
|
|
61
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Supplier = void 0;
|
|
4
|
+
exports.Supplier = {
|
|
5
|
+
get: async (supplier) => {
|
|
6
|
+
if (typeof supplier === "function") {
|
|
7
|
+
return supplier();
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return supplier;
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, unknown>): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRequestUrl = createRequestUrl;
|
|
4
|
+
const qs_js_1 = require("../url/qs.js");
|
|
5
|
+
function createRequestUrl(baseUrl, queryParameters) {
|
|
6
|
+
const queryString = (0, qs_js_1.toQueryString)(queryParameters, { arrayFormat: "repeat" });
|
|
7
|
+
return queryString ? `${baseUrl}?${queryString}` : baseUrl;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorResponseBody(response: Response): Promise<unknown>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getErrorResponseBody = getErrorResponseBody;
|
|
4
|
+
const json_js_1 = require("../json.js");
|
|
5
|
+
const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
6
|
+
async function getErrorResponseBody(response) {
|
|
5
7
|
let contentType = response.headers.get("Content-Type")?.toLowerCase();
|
|
6
8
|
if (contentType == null || contentType.length === 0) {
|
|
7
|
-
return getResponseBody(response);
|
|
9
|
+
return (0, getResponseBody_js_1.getResponseBody)(response);
|
|
8
10
|
}
|
|
9
|
-
|
|
10
11
|
if (contentType.indexOf(";") !== -1) {
|
|
11
12
|
contentType = contentType.split(";")[0]?.trim() ?? "";
|
|
12
13
|
}
|
|
@@ -18,14 +19,13 @@ export async function getErrorResponseBody(response: Response): Promise<unknown>
|
|
|
18
19
|
case "application/vnd.api+json":
|
|
19
20
|
case "text/json": {
|
|
20
21
|
const text = await response.text();
|
|
21
|
-
return text.length > 0 ? fromJson(text) : undefined;
|
|
22
|
+
return text.length > 0 ? (0, json_js_1.fromJson)(text) : undefined;
|
|
22
23
|
}
|
|
23
24
|
default:
|
|
24
25
|
if (contentType.startsWith("application/vnd.") && contentType.endsWith("+json")) {
|
|
25
26
|
const text = await response.text();
|
|
26
|
-
return text.length > 0 ? fromJson(text) : undefined;
|
|
27
|
+
return text.length > 0 ? (0, json_js_1.fromJson)(text) : undefined;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
29
|
// Fallback to plain text if content type is not recognized
|
|
30
30
|
// Even if no body is present, the response will be an empty string
|
|
31
31
|
return await response.text();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFetchFn(): Promise<typeof fetch>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHeader = getHeader;
|
|
4
|
+
function getHeader(headers, header) {
|
|
2
5
|
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
3
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
4
7
|
return headerValue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRequestBody = getRequestBody;
|
|
4
|
+
const json_js_1 = require("../json.js");
|
|
5
|
+
const qs_js_1 = require("../url/qs.js");
|
|
6
|
+
async function getRequestBody({ body, type }) {
|
|
7
|
+
if (type === "form") {
|
|
8
|
+
return (0, qs_js_1.toQueryString)(body, { arrayFormat: "repeat", encode: true });
|
|
9
|
+
}
|
|
10
|
+
if (type.includes("json")) {
|
|
11
|
+
return (0, json_js_1.toJson)(body);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return body;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getResponseBody(response: Response, responseType?: string): Promise<unknown>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getResponseBody = getResponseBody;
|
|
4
|
+
const json_js_1 = require("../json.js");
|
|
5
|
+
const BinaryResponse_js_1 = require("./BinaryResponse.js");
|
|
6
|
+
async function getResponseBody(response, responseType) {
|
|
5
7
|
switch (responseType) {
|
|
6
8
|
case "binary-response":
|
|
7
|
-
return getBinaryResponse(response);
|
|
9
|
+
return (0, BinaryResponse_js_1.getBinaryResponse)(response);
|
|
8
10
|
case "blob":
|
|
9
11
|
return await response.blob();
|
|
10
12
|
case "arrayBuffer":
|
|
@@ -30,20 +32,18 @@ export async function getResponseBody(response: Response, responseType?: string)
|
|
|
30
32
|
},
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
|
|
34
35
|
return response.body;
|
|
35
|
-
|
|
36
36
|
case "text":
|
|
37
37
|
return await response.text();
|
|
38
38
|
}
|
|
39
|
-
|
|
40
39
|
// if responseType is "json" or not specified, try to parse as JSON
|
|
41
40
|
const text = await response.text();
|
|
42
41
|
if (text.length > 0) {
|
|
43
42
|
try {
|
|
44
|
-
const responseBody = fromJson(text);
|
|
43
|
+
const responseBody = (0, json_js_1.fromJson)(text);
|
|
45
44
|
return responseBody;
|
|
46
|
-
}
|
|
45
|
+
}
|
|
46
|
+
catch (_err) {
|
|
47
47
|
return {
|
|
48
48
|
ok: false,
|
|
49
49
|
error: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.HttpResponsePromise = exports.getHeader = exports.fetcher = exports.EndpointSupplier = void 0;
|
|
4
|
+
var EndpointSupplier_js_1 = require("./EndpointSupplier.js");
|
|
5
|
+
Object.defineProperty(exports, "EndpointSupplier", { enumerable: true, get: function () { return EndpointSupplier_js_1.EndpointSupplier; } });
|
|
6
|
+
var Fetcher_js_1 = require("./Fetcher.js");
|
|
7
|
+
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_js_1.fetcher; } });
|
|
8
|
+
var getHeader_js_1 = require("./getHeader.js");
|
|
9
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_js_1.getHeader; } });
|
|
10
|
+
var HttpResponsePromise_js_1 = require("./HttpResponsePromise.js");
|
|
11
|
+
Object.defineProperty(exports, "HttpResponsePromise", { enumerable: true, get: function () { return HttpResponsePromise_js_1.HttpResponsePromise; } });
|
|
12
|
+
var RawResponse_js_1 = require("./RawResponse.js");
|
|
13
|
+
Object.defineProperty(exports, "abortRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.abortRawResponse; } });
|
|
14
|
+
Object.defineProperty(exports, "toRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.toRawResponse; } });
|
|
15
|
+
Object.defineProperty(exports, "unknownRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.unknownRawResponse; } });
|
|
16
|
+
var Supplier_js_1 = require("./Supplier.js");
|
|
17
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_js_1.Supplier; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isCacheNoStoreSupported(): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resetCacheNoStoreSupported(): void;
|
|
6
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half", disableCache?: boolean) => Promise<Response>;
|
|
@@ -1,56 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeRequest = void 0;
|
|
4
|
+
exports.isCacheNoStoreSupported = isCacheNoStoreSupported;
|
|
5
|
+
exports.resetCacheNoStoreSupported = resetCacheNoStoreSupported;
|
|
6
|
+
const signals_js_1 = require("./signals.js");
|
|
3
7
|
/**
|
|
4
8
|
* Cached result of checking whether the current runtime supports
|
|
5
9
|
* the `cache` option in `Request`. Some runtimes (e.g. Cloudflare Workers)
|
|
6
10
|
* throw a TypeError when this option is used.
|
|
7
11
|
*/
|
|
8
|
-
let _cacheNoStoreSupported
|
|
9
|
-
|
|
12
|
+
let _cacheNoStoreSupported;
|
|
13
|
+
function isCacheNoStoreSupported() {
|
|
10
14
|
if (_cacheNoStoreSupported != null) {
|
|
11
15
|
return _cacheNoStoreSupported;
|
|
12
16
|
}
|
|
13
17
|
try {
|
|
14
18
|
new Request("http://localhost", { cache: "no-store" });
|
|
15
19
|
_cacheNoStoreSupported = true;
|
|
16
|
-
}
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
17
22
|
_cacheNoStoreSupported = false;
|
|
18
23
|
}
|
|
19
24
|
return _cacheNoStoreSupported;
|
|
20
25
|
}
|
|
21
|
-
|
|
22
26
|
/**
|
|
23
27
|
* Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
|
|
24
28
|
*/
|
|
25
|
-
|
|
29
|
+
function resetCacheNoStoreSupported() {
|
|
26
30
|
_cacheNoStoreSupported = undefined;
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
url: string,
|
|
32
|
-
method: string,
|
|
33
|
-
headers: Headers | Record<string, string>,
|
|
34
|
-
requestBody: BodyInit | undefined,
|
|
35
|
-
timeoutMs?: number,
|
|
36
|
-
abortSignal?: AbortSignal,
|
|
37
|
-
withCredentials?: boolean,
|
|
38
|
-
duplex?: "half",
|
|
39
|
-
disableCache?: boolean,
|
|
40
|
-
): Promise<Response> => {
|
|
41
|
-
const signals: AbortSignal[] = [];
|
|
42
|
-
|
|
43
|
-
let timeoutAbortId: ReturnType<typeof setTimeout> | undefined;
|
|
32
|
+
const makeRequest = async (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex, disableCache) => {
|
|
33
|
+
const signals = [];
|
|
34
|
+
let timeoutAbortId;
|
|
44
35
|
if (timeoutMs != null) {
|
|
45
|
-
const { signal, abortId } = getTimeoutSignal(timeoutMs);
|
|
36
|
+
const { signal, abortId } = (0, signals_js_1.getTimeoutSignal)(timeoutMs);
|
|
46
37
|
timeoutAbortId = abortId;
|
|
47
38
|
signals.push(signal);
|
|
48
39
|
}
|
|
49
|
-
|
|
50
40
|
if (abortSignal != null) {
|
|
51
41
|
signals.push(abortSignal);
|
|
52
42
|
}
|
|
53
|
-
const newSignals = anySignal(signals);
|
|
43
|
+
const newSignals = (0, signals_js_1.anySignal)(signals);
|
|
54
44
|
const response = await fetchFn(url, {
|
|
55
45
|
method: method,
|
|
56
46
|
headers,
|
|
@@ -59,12 +49,11 @@ export const makeRequest = async (
|
|
|
59
49
|
credentials: withCredentials ? "include" : undefined,
|
|
60
50
|
// @ts-ignore
|
|
61
51
|
duplex,
|
|
62
|
-
...(disableCache && isCacheNoStoreSupported() ? { cache: "no-store"
|
|
52
|
+
...(disableCache && isCacheNoStoreSupported() ? { cache: "no-store" } : {}),
|
|
63
53
|
});
|
|
64
|
-
|
|
65
54
|
if (timeoutAbortId != null) {
|
|
66
55
|
clearTimeout(timeoutAbortId);
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
return response;
|
|
70
58
|
};
|
|
59
|
+
exports.makeRequest = makeRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestWithRetries(requestFn: () => Promise<Response>, maxRetries?: number): Promise<Response>;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.requestWithRetries = requestWithRetries;
|
|
1
4
|
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
2
5
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
3
6
|
const DEFAULT_MAX_RETRIES = 2;
|
|
4
7
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
5
|
-
|
|
6
|
-
function addPositiveJitter(delay: number): number {
|
|
8
|
+
function addPositiveJitter(delay) {
|
|
7
9
|
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
8
10
|
return delay * jitterMultiplier;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
function addSymmetricJitter(delay: number): number {
|
|
12
|
+
function addSymmetricJitter(delay) {
|
|
12
13
|
const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;
|
|
13
14
|
return delay * jitterMultiplier;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
function getRetryDelayFromHeaders(response: Response, retryAttempt: number): number {
|
|
16
|
+
function getRetryDelayFromHeaders(response, retryAttempt) {
|
|
17
17
|
const retryAfter = response.headers.get("Retry-After");
|
|
18
18
|
if (retryAfter) {
|
|
19
19
|
const retryAfterSeconds = parseInt(retryAfter, 10);
|
|
20
20
|
if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
|
|
21
21
|
return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
|
|
22
22
|
}
|
|
23
|
-
|
|
24
23
|
const retryAfterDate = new Date(retryAfter);
|
|
25
24
|
if (!Number.isNaN(retryAfterDate.getTime())) {
|
|
26
25
|
const delay = retryAfterDate.getTime() - Date.now();
|
|
@@ -29,7 +28,6 @@ function getRetryDelayFromHeaders(response: Response, retryAttempt: number): num
|
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
const rateLimitReset = response.headers.get("X-RateLimit-Reset");
|
|
34
32
|
if (rateLimitReset) {
|
|
35
33
|
const resetTime = parseInt(rateLimitReset, 10);
|
|
@@ -40,25 +38,19 @@ function getRetryDelayFromHeaders(response: Response, retryAttempt: number): num
|
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
|
|
44
41
|
return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * 2 ** retryAttempt, MAX_RETRY_DELAY));
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
requestFn: () => Promise<Response>,
|
|
49
|
-
maxRetries: number = DEFAULT_MAX_RETRIES,
|
|
50
|
-
): Promise<Response> {
|
|
51
|
-
let response: Response = await requestFn();
|
|
52
|
-
|
|
43
|
+
async function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
44
|
+
let response = await requestFn();
|
|
53
45
|
for (let i = 0; i < maxRetries; ++i) {
|
|
54
46
|
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
55
47
|
const delay = getRetryDelayFromHeaders(response, i);
|
|
56
|
-
|
|
57
48
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
58
49
|
response = await requestFn();
|
|
59
|
-
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
60
52
|
break;
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
|
-
return response
|
|
55
|
+
return response;
|
|
64
56
|
}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
4
|
+
exports.anySignal = anySignal;
|
|
1
5
|
const TIMEOUT = "timeout";
|
|
2
|
-
|
|
3
|
-
export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: ReturnType<typeof setTimeout> } {
|
|
6
|
+
function getTimeoutSignal(timeoutMs) {
|
|
4
7
|
const controller = new AbortController();
|
|
5
8
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
6
9
|
return { signal: controller.signal, abortId };
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args) as AbortSignal[];
|
|
11
|
-
|
|
11
|
+
function anySignal(...args) {
|
|
12
|
+
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
12
13
|
const controller = new AbortController();
|
|
13
|
-
|
|
14
14
|
for (const signal of signals) {
|
|
15
15
|
if (signal.aborted) {
|
|
16
|
-
controller.abort(
|
|
16
|
+
controller.abort(signal?.reason);
|
|
17
17
|
break;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), {
|
|
19
|
+
signal.addEventListener("abort", () => controller.abort(signal?.reason), {
|
|
21
20
|
signal: controller.signal,
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return controller.signal;
|
|
26
24
|
}
|