vayu-ts 0.2.15 → 0.3.7
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/dist/example/index.d.ts +1 -0
- package/dist/example/index.js +74 -0
- package/dist/openapi/apis/AuthApi.js +8 -4
- package/dist/openapi/apis/CatalogProductsApi.d.ts +89 -0
- package/dist/openapi/apis/CatalogProductsApi.js +377 -0
- package/dist/openapi/apis/CloudUsageSubmissionApi.d.ts +25 -0
- package/dist/openapi/apis/CloudUsageSubmissionApi.js +89 -0
- package/dist/openapi/apis/ContractsApi.d.ts +21 -3
- package/dist/openapi/apis/ContractsApi.js +119 -21
- package/dist/openapi/apis/CreditsApi.js +24 -12
- package/dist/openapi/apis/CustomFieldsApi.d.ts +89 -0
- package/dist/openapi/apis/CustomFieldsApi.js +377 -0
- package/dist/openapi/apis/CustomersApi.d.ts +63 -0
- package/dist/openapi/apis/CustomersApi.js +360 -38
- package/dist/openapi/apis/EventsApi.d.ts +132 -1
- package/dist/openapi/apis/EventsApi.js +660 -25
- package/dist/openapi/apis/InvoicesApi.d.ts +19 -3
- package/dist/openapi/apis/InvoicesApi.js +91 -12
- package/dist/openapi/apis/MeasurementsApi.js +36 -18
- package/dist/openapi/apis/MetersApi.js +38 -19
- package/dist/openapi/apis/PlansApi.d.ts +56 -0
- package/dist/openapi/apis/PlansApi.js +225 -0
- package/dist/openapi/apis/ProductConsumptionsApi.js +10 -5
- package/dist/openapi/apis/WebhooksApi.js +10 -5
- package/dist/openapi/http/http.d.ts +6 -18
- package/dist/openapi/http/http.js +25 -13
- package/dist/openapi/http/isomorphic-fetch.d.ts +1 -0
- package/dist/openapi/http/isomorphic-fetch.js +4 -7
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +5 -1
- package/dist/openapi/models/Address.d.ts +5 -5
- package/dist/openapi/models/BillingInterval.d.ts +18 -0
- package/dist/openapi/models/BillingInterval.js +22 -0
- package/dist/openapi/models/CloudUsageResult.d.ts +83 -0
- package/dist/openapi/models/CloudUsageResult.js +103 -0
- package/dist/openapi/models/ConflictErrorResponse.d.ts +42 -0
- package/dist/openapi/models/ConflictErrorResponse.js +52 -0
- package/dist/openapi/models/Contact.d.ts +3 -1
- package/dist/openapi/models/Contact.js +13 -1
- package/dist/openapi/models/ContractStatus.d.ts +23 -0
- package/dist/openapi/models/ContractStatus.js +27 -0
- package/dist/openapi/models/CreateCatalogProductRequest.d.ts +42 -0
- package/dist/openapi/models/CreateCatalogProductRequest.js +44 -0
- package/dist/openapi/models/CreateCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCatalogProductResponse.js +32 -0
- package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.d.ts +45 -0
- package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.js +62 -0
- package/dist/openapi/models/CreateContractRequest.d.ts +53 -5
- package/dist/openapi/models/CreateContractRequest.js +76 -4
- package/dist/openapi/models/CreateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/CreateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/CreateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.d.ts +74 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.js +108 -0
- package/dist/openapi/models/CreateCustomerRelationRequest.d.ts +38 -0
- package/dist/openapi/models/CreateCustomerRelationRequest.js +38 -0
- package/dist/openapi/models/CreateCustomerRelationResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomerRelationResponse.js +32 -0
- package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.d.ts +41 -0
- package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.js +56 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +70 -2
- package/dist/openapi/models/CreateCustomerRequest.js +112 -6
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +70 -2
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +112 -6
- package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -1
- package/dist/openapi/models/CreditLedgerEntry.js +8 -2
- package/dist/openapi/models/Currency.d.ts +24 -0
- package/dist/openapi/models/Currency.js +28 -0
- package/dist/openapi/models/CustomField.d.ts +65 -0
- package/dist/openapi/models/CustomField.js +78 -0
- package/dist/openapi/models/CustomFieldEntities.d.ts +20 -0
- package/dist/openapi/models/CustomFieldEntities.js +24 -0
- package/dist/openapi/models/CustomFieldValue.d.ts +33 -0
- package/dist/openapi/models/CustomFieldValue.js +44 -0
- package/dist/openapi/models/CustomFieldValueTypes.d.ts +20 -0
- package/dist/openapi/models/CustomFieldValueTypes.js +24 -0
- package/dist/openapi/models/CustomerCloudProviderSettings.d.ts +39 -0
- package/dist/openapi/models/CustomerCloudProviderSettings.js +51 -0
- package/dist/openapi/models/CustomerSource.d.ts +21 -0
- package/dist/openapi/models/CustomerSource.js +25 -0
- package/dist/openapi/models/DeleteCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCatalogProductResponse.js +32 -0
- package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.d.ts +46 -0
- package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.js +68 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +53 -5
- package/dist/openapi/models/DeleteContractResponseContract.js +76 -4
- package/dist/openapi/models/DeleteCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.js +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.d.ts +75 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.js +114 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +70 -2
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +112 -6
- package/dist/openapi/models/DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.d.ts +56 -0
- package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.js +80 -0
- package/dist/openapi/models/DeletePlanResponse.d.ts +32 -0
- package/dist/openapi/models/DeletePlanResponse.js +32 -0
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +42 -0
- package/dist/openapi/models/DeletePlanResponsePlan.js +68 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +1 -1
- package/dist/openapi/models/ExternalOverageStrategy.d.ts +20 -0
- package/dist/openapi/models/ExternalOverageStrategy.js +24 -0
- package/dist/openapi/models/GetCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/GetCatalogProductResponse.js +32 -0
- package/dist/openapi/models/GetContractByIntegrationIdResponse.d.ts +32 -0
- package/dist/openapi/models/GetContractByIntegrationIdResponse.js +32 -0
- package/dist/openapi/models/GetContractResponseContract.d.ts +53 -5
- package/dist/openapi/models/GetContractResponseContract.js +76 -4
- package/dist/openapi/models/GetCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomFieldResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByIntegrationIdResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerByIntegrationIdResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerByNameResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +123 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +183 -0
- package/dist/openapi/models/GetCustomerRelationResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerRelationResponse.js +32 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +14 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.js +30 -0
- package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.d.ts +39 -0
- package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.js +65 -0
- package/dist/openapi/models/GetPlanResponse.d.ts +32 -0
- package/dist/openapi/models/GetPlanResponse.js +32 -0
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +41 -0
- package/dist/openapi/models/GetPlanResponsePlan.js +62 -0
- package/dist/openapi/models/IntegrationEntity.d.ts +42 -0
- package/dist/openapi/models/IntegrationEntity.js +62 -0
- package/dist/openapi/models/IntegrationEntityTypes.d.ts +23 -0
- package/dist/openapi/models/IntegrationEntityTypes.js +27 -0
- package/dist/openapi/models/IntegrationProviders.d.ts +26 -0
- package/dist/openapi/models/IntegrationProviders.js +30 -0
- package/dist/openapi/models/IntegrationType.d.ts +26 -0
- package/dist/openapi/models/IntegrationType.js +30 -0
- package/dist/openapi/models/InternalServerErrorResponse.d.ts +42 -0
- package/dist/openapi/models/InternalServerErrorResponse.js +52 -0
- package/dist/openapi/models/InvoiceBillingStatus.d.ts +21 -0
- package/dist/openapi/models/InvoiceBillingStatus.js +25 -0
- package/dist/openapi/models/InvoicePaymentStatusResponse.d.ts +39 -0
- package/dist/openapi/models/InvoicePaymentStatusResponse.js +74 -0
- package/dist/openapi/models/ListCatalogProductsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCatalogProductsResponse.js +50 -0
- package/dist/openapi/models/ListCustomFieldsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCustomFieldsResponse.js +50 -0
- package/dist/openapi/models/ListPlansResponse.d.ts +35 -0
- package/dist/openapi/models/ListPlansResponse.js +50 -0
- package/dist/openapi/models/NotFoundErrorResponse.d.ts +42 -0
- package/dist/openapi/models/NotFoundErrorResponse.js +52 -0
- package/dist/openapi/models/NotificationEventType.d.ts +7 -1
- package/dist/openapi/models/NotificationEventType.js +6 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +112 -0
- package/dist/openapi/models/ObjectSerializer.js +367 -0
- package/dist/openapi/models/PartnerSubmissionDetail.d.ts +46 -0
- package/dist/openapi/models/PartnerSubmissionDetail.js +49 -0
- package/dist/openapi/models/PaymentInfo.d.ts +45 -0
- package/dist/openapi/models/PaymentInfo.js +89 -0
- package/dist/openapi/models/PaymentInfoDepositTo.d.ts +32 -0
- package/dist/openapi/models/PaymentInfoDepositTo.js +38 -0
- package/dist/openapi/models/PaymentTerm.d.ts +18 -0
- package/dist/openapi/models/PaymentTerm.js +22 -0
- package/dist/openapi/models/PlanBillingData.d.ts +41 -0
- package/dist/openapi/models/PlanBillingData.js +59 -0
- package/dist/openapi/models/PlanDuration.d.ts +30 -0
- package/dist/openapi/models/PlanDuration.js +25 -0
- package/dist/openapi/models/PlanStatus.d.ts +19 -0
- package/dist/openapi/models/PlanStatus.js +23 -0
- package/dist/openapi/models/ProductCloudProviderSettings.d.ts +39 -0
- package/dist/openapi/models/ProductCloudProviderSettings.js +51 -0
- package/dist/openapi/models/ProductGroup.d.ts +65 -0
- package/dist/openapi/models/ProductGroup.js +80 -0
- package/dist/openapi/models/ProductGroupCommitment.d.ts +53 -0
- package/dist/openapi/models/ProductGroupCommitment.js +64 -0
- package/dist/openapi/models/ProductGroupProductsInner.d.ts +68 -0
- package/dist/openapi/models/ProductGroupProductsInner.js +98 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +64 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.js +24 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +54 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +54 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.d.ts +32 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.js +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +54 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.d.ts +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.js +45 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.d.ts +46 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.js +78 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.d.ts +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.js +45 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.d.ts +35 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.js +56 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.js +60 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.d.ts +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.js +58 -0
- package/dist/openapi/models/ProductGroupProductsInnerScheduling.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerScheduling.js +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.js +48 -0
- package/dist/openapi/models/QueryEventsResponse.d.ts +3 -3
- package/dist/openapi/models/QueryEventsResponse.js +18 -0
- package/dist/openapi/models/RateLimitErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RateLimitErrorResponse.js +52 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.js +52 -0
- package/dist/openapi/models/SubmitCloudUsageRequest.d.ts +39 -0
- package/dist/openapi/models/SubmitCloudUsageRequest.js +38 -0
- package/dist/openapi/models/SyncStatus.d.ts +16 -0
- package/dist/openapi/models/SyncStatus.js +20 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.d.ts +42 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.js +52 -0
- package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
- package/dist/openapi/models/UnlimitedDuration.js +18 -0
- package/dist/openapi/models/UpdateCatalogProductRequest.d.ts +42 -0
- package/dist/openapi/models/UpdateCatalogProductRequest.js +44 -0
- package/dist/openapi/models/UpdateCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCatalogProductResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +70 -2
- package/dist/openapi/models/UpdateCustomerRequest.js +112 -6
- package/dist/openapi/models/UsageWindow.d.ts +41 -0
- package/dist/openapi/models/UsageWindow.js +41 -0
- package/dist/openapi/models/V2DeleteEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2DeleteEventResponse.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.js +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.js +32 -0
- package/dist/openapi/models/V2GetEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2GetEventResponse.js +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.d.ts +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.js +70 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.d.ts +39 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.js +62 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.js +44 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.d.ts +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.js +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.d.ts +43 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.js +54 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.d.ts +30 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.js +25 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.d.ts +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.d.ts +42 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.js +52 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.js +38 -0
- package/dist/openapi/models/V2QueryEventsResponse.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsResponse.js +50 -0
- package/dist/openapi/models/V2SendEventsRequest.d.ts +32 -0
- package/dist/openapi/models/V2SendEventsRequest.js +32 -0
- package/dist/openapi/models/V2SendEventsResponse.d.ts +40 -0
- package/dist/openapi/models/V2SendEventsResponse.js +38 -0
- package/dist/openapi/models/ValidationErrorResponse.d.ts +51 -0
- package/dist/openapi/models/ValidationErrorResponse.js +60 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.d.ts +38 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.js +38 -0
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +1 -0
- package/dist/openapi/models/WebhookSubscribeRequest.js +6 -0
- package/dist/openapi/models/all.d.ts +112 -0
- package/dist/openapi/models/all.js +112 -0
- package/dist/openapi/types/ObservableAPI.d.ts +447 -14
- package/dist/openapi/types/ObservableAPI.js +907 -29
- package/dist/openapi/types/PromiseAPI.d.ts +439 -14
- package/dist/openapi/types/PromiseAPI.js +600 -38
- package/dist/sdk/clients/CatalogProductsClient.d.ts +11 -0
- package/dist/sdk/clients/CatalogProductsClient.js +28 -0
- package/dist/sdk/clients/CloudUsageSubmissionClient.d.ts +6 -0
- package/dist/sdk/clients/CloudUsageSubmissionClient.js +14 -0
- package/dist/sdk/clients/ContractsClient.d.ts +2 -1
- package/dist/sdk/clients/ContractsClient.js +3 -0
- package/dist/sdk/clients/CreditsClient.d.ts +9 -0
- package/dist/sdk/clients/CreditsClient.js +22 -0
- package/dist/sdk/clients/CustomersClient.d.ts +5 -1
- package/dist/sdk/clients/CustomersClient.js +12 -0
- package/dist/sdk/clients/EventsClient.d.ts +2 -1
- package/dist/sdk/clients/EventsClient.js +4 -1
- package/dist/sdk/clients/InvoicesClient.d.ts +1 -0
- package/dist/sdk/clients/InvoicesClient.js +3 -0
- package/dist/sdk/clients/MeasurementsClient.d.ts +10 -0
- package/dist/sdk/clients/MeasurementsClient.js +25 -0
- package/dist/sdk/clients/WebhooksClient.d.ts +2 -0
- package/dist/sdk/clients/WebhooksClient.js +14 -0
- package/dist/sdk/clients/index.d.ts +4 -0
- package/dist/sdk/clients/index.js +4 -0
- package/dist/sdk/index.d.ts +6 -1
- package/dist/sdk/index.js +13 -0
- package/dist/sdk/services/authenticated-http-library.d.ts +11 -0
- package/dist/sdk/services/authenticated-http-library.js +29 -0
- package/dist/sdk/services/authenticator.d.ts +11 -0
- package/dist/sdk/services/authenticator.js +57 -0
- package/dist/sdk/services/configuration.service.d.ts +7 -6
- package/dist/sdk/services/configuration.service.js +12 -44
- package/dist/sdk/types/CatalogProducts.d.ts +1 -0
- package/dist/sdk/types/CatalogProducts.js +2 -0
- package/dist/sdk/types/CloudUsageSubmission.d.ts +1 -0
- package/dist/sdk/types/CloudUsageSubmission.js +2 -0
- package/dist/sdk/types/Contracts.d.ts +1 -1
- package/dist/sdk/types/Credits.d.ts +1 -0
- package/dist/sdk/types/Credits.js +2 -0
- package/dist/sdk/types/Customers.d.ts +1 -1
- package/dist/sdk/types/Events.d.ts +1 -1
- package/dist/sdk/types/Invoices.d.ts +1 -1
- package/dist/sdk/types/Measurements.d.ts +1 -0
- package/dist/sdk/types/Measurements.js +2 -0
- package/dist/sdk/types/index.d.ts +4 -0
- package/dist/sdk/types/index.js +4 -0
- package/dist/sdk-v2/services/configuration.service.js +16 -8
- package/package.json +3 -4
|
@@ -46,6 +46,41 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
46
46
|
}
|
|
47
47
|
return requestContext;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new Customer relation.
|
|
51
|
+
* Create Customer relation
|
|
52
|
+
* @param createCustomerRelationRequest
|
|
53
|
+
*/
|
|
54
|
+
async createCustomerRelation(createCustomerRelationRequest, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'createCustomerRelationRequest' is not null or undefined
|
|
57
|
+
if (createCustomerRelationRequest === null || createCustomerRelationRequest === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("CustomersApi", "createCustomerRelation", "createCustomerRelationRequest");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/customer-relations';
|
|
62
|
+
// Make Request Context
|
|
63
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
64
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
65
|
+
// Body Params
|
|
66
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
67
|
+
"application/json"
|
|
68
|
+
]);
|
|
69
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
70
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createCustomerRelationRequest, "CreateCustomerRelationRequest", ""), contentType);
|
|
71
|
+
requestContext.setBody(serializedBody);
|
|
72
|
+
let authMethod;
|
|
73
|
+
// Apply auth methods
|
|
74
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
75
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
76
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
|
+
}
|
|
78
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
|
+
}
|
|
82
|
+
return requestContext;
|
|
83
|
+
}
|
|
49
84
|
/**
|
|
50
85
|
* Delete a Customer by id.
|
|
51
86
|
* Delete Customer
|
|
@@ -133,6 +168,70 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
133
168
|
}
|
|
134
169
|
return requestContext;
|
|
135
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Use this endpoint to get a specific customer using its integration provider and identifier.
|
|
173
|
+
* Get customer by integration id
|
|
174
|
+
* @param integrationType
|
|
175
|
+
* @param integrationId
|
|
176
|
+
*/
|
|
177
|
+
async getCustomerByIntegrationId(integrationType, integrationId, _options) {
|
|
178
|
+
let _config = _options || this.configuration;
|
|
179
|
+
// verify required parameter 'integrationType' is not null or undefined
|
|
180
|
+
if (integrationType === null || integrationType === undefined) {
|
|
181
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByIntegrationId", "integrationType");
|
|
182
|
+
}
|
|
183
|
+
// verify required parameter 'integrationId' is not null or undefined
|
|
184
|
+
if (integrationId === null || integrationId === undefined) {
|
|
185
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByIntegrationId", "integrationId");
|
|
186
|
+
}
|
|
187
|
+
// Path Params
|
|
188
|
+
const localVarPath = '/customers/integration/{integrationType}/{integrationId}'
|
|
189
|
+
.replace('{' + 'integrationType' + '}', encodeURIComponent(String(integrationType)))
|
|
190
|
+
.replace('{' + 'integrationId' + '}', encodeURIComponent(String(integrationId)));
|
|
191
|
+
// Make Request Context
|
|
192
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
193
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
194
|
+
let authMethod;
|
|
195
|
+
// Apply auth methods
|
|
196
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
197
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
198
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
199
|
+
}
|
|
200
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
201
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
202
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
203
|
+
}
|
|
204
|
+
return requestContext;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Use this endpoint to get a specific customer using its name.
|
|
208
|
+
* Get customer by name
|
|
209
|
+
* @param name
|
|
210
|
+
*/
|
|
211
|
+
async getCustomerByName(name, _options) {
|
|
212
|
+
let _config = _options || this.configuration;
|
|
213
|
+
// verify required parameter 'name' is not null or undefined
|
|
214
|
+
if (name === null || name === undefined) {
|
|
215
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByName", "name");
|
|
216
|
+
}
|
|
217
|
+
// Path Params
|
|
218
|
+
const localVarPath = '/customers/name/{name}'
|
|
219
|
+
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
|
220
|
+
// Make Request Context
|
|
221
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
222
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
223
|
+
let authMethod;
|
|
224
|
+
// Apply auth methods
|
|
225
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
226
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
227
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
228
|
+
}
|
|
229
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
230
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
231
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
232
|
+
}
|
|
233
|
+
return requestContext;
|
|
234
|
+
}
|
|
136
235
|
/**
|
|
137
236
|
* Use this endpoint to get the products consumptions by the customer id.
|
|
138
237
|
* Get products consumptions by customer id
|
|
@@ -191,6 +290,35 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
191
290
|
}
|
|
192
291
|
return requestContext;
|
|
193
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Get a Customer relation by id.
|
|
295
|
+
* Get Customer relation
|
|
296
|
+
* @param customerRelationId
|
|
297
|
+
*/
|
|
298
|
+
async getCustomerRelation(customerRelationId, _options) {
|
|
299
|
+
let _config = _options || this.configuration;
|
|
300
|
+
// verify required parameter 'customerRelationId' is not null or undefined
|
|
301
|
+
if (customerRelationId === null || customerRelationId === undefined) {
|
|
302
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerRelation", "customerRelationId");
|
|
303
|
+
}
|
|
304
|
+
// Path Params
|
|
305
|
+
const localVarPath = '/customer-relations/{customerRelationId}'
|
|
306
|
+
.replace('{' + 'customerRelationId' + '}', encodeURIComponent(String(customerRelationId)));
|
|
307
|
+
// Make Request Context
|
|
308
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
309
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
310
|
+
let authMethod;
|
|
311
|
+
// Apply auth methods
|
|
312
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
313
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
314
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
315
|
+
}
|
|
316
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
317
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
318
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
319
|
+
}
|
|
320
|
+
return requestContext;
|
|
321
|
+
}
|
|
194
322
|
/**
|
|
195
323
|
* Get a list of Customers.
|
|
196
324
|
* List Customers
|
|
@@ -282,16 +410,20 @@ class CustomersApiResponseProcessor {
|
|
|
282
410
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
283
411
|
}
|
|
284
412
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
285
|
-
|
|
413
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
414
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
286
415
|
}
|
|
287
416
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
288
|
-
|
|
417
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
418
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
289
419
|
}
|
|
290
420
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
291
|
-
|
|
421
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
422
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
292
423
|
}
|
|
293
424
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
294
|
-
|
|
425
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
426
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
295
427
|
}
|
|
296
428
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
297
429
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -300,6 +432,42 @@ class CustomersApiResponseProcessor {
|
|
|
300
432
|
}
|
|
301
433
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
302
434
|
}
|
|
435
|
+
/**
|
|
436
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
437
|
+
* to the expected objects
|
|
438
|
+
*
|
|
439
|
+
* @params response Response returned by the server for a request to createCustomerRelation
|
|
440
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
441
|
+
*/
|
|
442
|
+
async createCustomerRelationWithHttpInfo(response) {
|
|
443
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
444
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
445
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerRelationResponse", "");
|
|
446
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
447
|
+
}
|
|
448
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
449
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
450
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
451
|
+
}
|
|
452
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
453
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
454
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
455
|
+
}
|
|
456
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
457
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
458
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
459
|
+
}
|
|
460
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
461
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
462
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
463
|
+
}
|
|
464
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
465
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
466
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerRelationResponse", "");
|
|
467
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
468
|
+
}
|
|
469
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
470
|
+
}
|
|
303
471
|
/**
|
|
304
472
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
305
473
|
* to the expected objects
|
|
@@ -314,19 +482,24 @@ class CustomersApiResponseProcessor {
|
|
|
314
482
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
315
483
|
}
|
|
316
484
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
317
|
-
|
|
485
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
486
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
318
487
|
}
|
|
319
488
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
320
|
-
|
|
489
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
490
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
321
491
|
}
|
|
322
492
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
323
|
-
|
|
493
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
494
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
324
495
|
}
|
|
325
496
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
326
|
-
|
|
497
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
498
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
327
499
|
}
|
|
328
500
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
329
|
-
|
|
501
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
502
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
330
503
|
}
|
|
331
504
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
332
505
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -349,19 +522,24 @@ class CustomersApiResponseProcessor {
|
|
|
349
522
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
350
523
|
}
|
|
351
524
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
352
|
-
|
|
525
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
526
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
353
527
|
}
|
|
354
528
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
355
|
-
|
|
529
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
530
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
356
531
|
}
|
|
357
532
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
358
|
-
|
|
533
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
534
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
359
535
|
}
|
|
360
536
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
361
|
-
|
|
537
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
538
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
362
539
|
}
|
|
363
540
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
364
|
-
|
|
541
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
542
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
365
543
|
}
|
|
366
544
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
367
545
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -384,19 +562,24 @@ class CustomersApiResponseProcessor {
|
|
|
384
562
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
385
563
|
}
|
|
386
564
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
387
|
-
|
|
565
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
566
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
388
567
|
}
|
|
389
568
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
390
|
-
|
|
569
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
570
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
391
571
|
}
|
|
392
572
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
393
|
-
|
|
573
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
574
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
394
575
|
}
|
|
395
576
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
396
|
-
|
|
577
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
578
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
397
579
|
}
|
|
398
580
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
399
|
-
|
|
581
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
582
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
400
583
|
}
|
|
401
584
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
402
585
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -405,6 +588,86 @@ class CustomersApiResponseProcessor {
|
|
|
405
588
|
}
|
|
406
589
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
407
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
593
|
+
* to the expected objects
|
|
594
|
+
*
|
|
595
|
+
* @params response Response returned by the server for a request to getCustomerByIntegrationId
|
|
596
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
597
|
+
*/
|
|
598
|
+
async getCustomerByIntegrationIdWithHttpInfo(response) {
|
|
599
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
600
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
601
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByIntegrationIdResponse", "");
|
|
602
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
603
|
+
}
|
|
604
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
605
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
606
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
607
|
+
}
|
|
608
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
609
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
610
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
611
|
+
}
|
|
612
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
613
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
614
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
615
|
+
}
|
|
616
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
617
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
618
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
619
|
+
}
|
|
620
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
621
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
622
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
623
|
+
}
|
|
624
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
625
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
626
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByIntegrationIdResponse", "");
|
|
627
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
628
|
+
}
|
|
629
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
633
|
+
* to the expected objects
|
|
634
|
+
*
|
|
635
|
+
* @params response Response returned by the server for a request to getCustomerByName
|
|
636
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
637
|
+
*/
|
|
638
|
+
async getCustomerByNameWithHttpInfo(response) {
|
|
639
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
640
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
641
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByNameResponse", "");
|
|
642
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
643
|
+
}
|
|
644
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
645
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
646
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
647
|
+
}
|
|
648
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
649
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
650
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
651
|
+
}
|
|
652
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
653
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
654
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
655
|
+
}
|
|
656
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
657
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
658
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
659
|
+
}
|
|
660
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
661
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
662
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
663
|
+
}
|
|
664
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
665
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
666
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByNameResponse", "");
|
|
667
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
668
|
+
}
|
|
669
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
670
|
+
}
|
|
408
671
|
/**
|
|
409
672
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
410
673
|
* to the expected objects
|
|
@@ -419,19 +682,24 @@ class CustomersApiResponseProcessor {
|
|
|
419
682
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
420
683
|
}
|
|
421
684
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
422
|
-
|
|
685
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
686
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
423
687
|
}
|
|
424
688
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
425
|
-
|
|
689
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
690
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
426
691
|
}
|
|
427
692
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
428
|
-
|
|
693
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
694
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
429
695
|
}
|
|
430
696
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
431
|
-
|
|
697
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
698
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
432
699
|
}
|
|
433
700
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
434
|
-
|
|
701
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
702
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
435
703
|
}
|
|
436
704
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
437
705
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -454,19 +722,24 @@ class CustomersApiResponseProcessor {
|
|
|
454
722
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
455
723
|
}
|
|
456
724
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
457
|
-
|
|
725
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
726
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
458
727
|
}
|
|
459
728
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
460
|
-
|
|
729
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
730
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
461
731
|
}
|
|
462
732
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
463
|
-
|
|
733
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
734
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
464
735
|
}
|
|
465
736
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
466
|
-
|
|
737
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
738
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
467
739
|
}
|
|
468
740
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
469
|
-
|
|
741
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
742
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
470
743
|
}
|
|
471
744
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
472
745
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -475,6 +748,46 @@ class CustomersApiResponseProcessor {
|
|
|
475
748
|
}
|
|
476
749
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
477
750
|
}
|
|
751
|
+
/**
|
|
752
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
753
|
+
* to the expected objects
|
|
754
|
+
*
|
|
755
|
+
* @params response Response returned by the server for a request to getCustomerRelation
|
|
756
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
757
|
+
*/
|
|
758
|
+
async getCustomerRelationWithHttpInfo(response) {
|
|
759
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
760
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
761
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerRelationResponse", "");
|
|
762
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
763
|
+
}
|
|
764
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
765
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
766
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
767
|
+
}
|
|
768
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
769
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
770
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
771
|
+
}
|
|
772
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
773
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
774
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
775
|
+
}
|
|
776
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
777
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
778
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
779
|
+
}
|
|
780
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
781
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
782
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
783
|
+
}
|
|
784
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
785
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
786
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerRelationResponse", "");
|
|
787
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
788
|
+
}
|
|
789
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
790
|
+
}
|
|
478
791
|
/**
|
|
479
792
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
480
793
|
* to the expected objects
|
|
@@ -489,16 +802,20 @@ class CustomersApiResponseProcessor {
|
|
|
489
802
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
490
803
|
}
|
|
491
804
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
492
|
-
|
|
805
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
806
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
493
807
|
}
|
|
494
808
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
495
|
-
|
|
809
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
810
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
496
811
|
}
|
|
497
812
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
498
|
-
|
|
813
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
814
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
499
815
|
}
|
|
500
816
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
501
|
-
|
|
817
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
818
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
502
819
|
}
|
|
503
820
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
504
821
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -521,19 +838,24 @@ class CustomersApiResponseProcessor {
|
|
|
521
838
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
522
839
|
}
|
|
523
840
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
524
|
-
|
|
841
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
842
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
525
843
|
}
|
|
526
844
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
527
|
-
|
|
845
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
846
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
528
847
|
}
|
|
529
848
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
530
|
-
|
|
849
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
850
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
531
851
|
}
|
|
532
852
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
533
|
-
|
|
853
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
854
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
534
855
|
}
|
|
535
856
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
536
|
-
|
|
857
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
858
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
537
859
|
}
|
|
538
860
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
539
861
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|