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
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomFieldsApiResponseProcessor = exports.CustomFieldsApiRequestFactory = void 0;
|
|
4
|
+
// TODO: better import syntax?
|
|
5
|
+
const baseapi_1 = require("./baseapi");
|
|
6
|
+
const http_1 = require("../http/http");
|
|
7
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
8
|
+
const exception_1 = require("./exception");
|
|
9
|
+
const util_1 = require("../util");
|
|
10
|
+
/**
|
|
11
|
+
* no description
|
|
12
|
+
*/
|
|
13
|
+
class CustomFieldsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Create a new Custom field.
|
|
16
|
+
* Create Custom field
|
|
17
|
+
* @param createCustomFieldRequest
|
|
18
|
+
*/
|
|
19
|
+
async createCustomField(createCustomFieldRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'createCustomFieldRequest' is not null or undefined
|
|
22
|
+
if (createCustomFieldRequest === null || createCustomFieldRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "createCustomField", "createCustomFieldRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/customFields';
|
|
27
|
+
// Make Request Context
|
|
28
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
29
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
30
|
+
// Body Params
|
|
31
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
32
|
+
"application/json"
|
|
33
|
+
]);
|
|
34
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createCustomFieldRequest, "CreateCustomFieldRequest", ""), contentType);
|
|
36
|
+
requestContext.setBody(serializedBody);
|
|
37
|
+
let authMethod;
|
|
38
|
+
// Apply auth methods
|
|
39
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
40
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
41
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
|
+
}
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
|
+
}
|
|
47
|
+
return requestContext;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Delete a Custom field by id.
|
|
51
|
+
* Delete Custom field
|
|
52
|
+
* @param customFieldId
|
|
53
|
+
*/
|
|
54
|
+
async deleteCustomField(customFieldId, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
57
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "deleteCustomField", "customFieldId");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
62
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
63
|
+
// Make Request Context
|
|
64
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
65
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
66
|
+
let authMethod;
|
|
67
|
+
// Apply auth methods
|
|
68
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
69
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
70
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
71
|
+
}
|
|
72
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
73
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
74
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
75
|
+
}
|
|
76
|
+
return requestContext;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get a Custom field by id.
|
|
80
|
+
* Get Custom field
|
|
81
|
+
* @param customFieldId
|
|
82
|
+
*/
|
|
83
|
+
async getCustomField(customFieldId, _options) {
|
|
84
|
+
let _config = _options || this.configuration;
|
|
85
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
86
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
87
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "getCustomField", "customFieldId");
|
|
88
|
+
}
|
|
89
|
+
// Path Params
|
|
90
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
91
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
92
|
+
// Make Request Context
|
|
93
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
94
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
95
|
+
let authMethod;
|
|
96
|
+
// Apply auth methods
|
|
97
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
98
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
99
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
100
|
+
}
|
|
101
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
102
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
103
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
104
|
+
}
|
|
105
|
+
return requestContext;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get a list of Custom fields.
|
|
109
|
+
* List Custom fields
|
|
110
|
+
* @param limit
|
|
111
|
+
* @param cursor
|
|
112
|
+
*/
|
|
113
|
+
async listCustomFields(limit, cursor, _options) {
|
|
114
|
+
let _config = _options || this.configuration;
|
|
115
|
+
// Path Params
|
|
116
|
+
const localVarPath = '/customFields';
|
|
117
|
+
// Make Request Context
|
|
118
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
119
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
120
|
+
// Query Params
|
|
121
|
+
if (limit !== undefined) {
|
|
122
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
123
|
+
}
|
|
124
|
+
// Query Params
|
|
125
|
+
if (cursor !== undefined) {
|
|
126
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
127
|
+
}
|
|
128
|
+
let authMethod;
|
|
129
|
+
// Apply auth methods
|
|
130
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
131
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
132
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
135
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
136
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
137
|
+
}
|
|
138
|
+
return requestContext;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Update a Custom field by id.
|
|
142
|
+
* Update Custom field
|
|
143
|
+
* @param updateCustomFieldRequest
|
|
144
|
+
* @param customFieldId
|
|
145
|
+
*/
|
|
146
|
+
async updateCustomField(updateCustomFieldRequest, customFieldId, _options) {
|
|
147
|
+
let _config = _options || this.configuration;
|
|
148
|
+
// verify required parameter 'updateCustomFieldRequest' is not null or undefined
|
|
149
|
+
if (updateCustomFieldRequest === null || updateCustomFieldRequest === undefined) {
|
|
150
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "updateCustomField", "updateCustomFieldRequest");
|
|
151
|
+
}
|
|
152
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
153
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
154
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "updateCustomField", "customFieldId");
|
|
155
|
+
}
|
|
156
|
+
// Path Params
|
|
157
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
158
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
159
|
+
// Make Request Context
|
|
160
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
161
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
162
|
+
// Body Params
|
|
163
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
164
|
+
"application/json"
|
|
165
|
+
]);
|
|
166
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
167
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateCustomFieldRequest, "UpdateCustomFieldRequest", ""), contentType);
|
|
168
|
+
requestContext.setBody(serializedBody);
|
|
169
|
+
let authMethod;
|
|
170
|
+
// Apply auth methods
|
|
171
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
172
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
173
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
174
|
+
}
|
|
175
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
176
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
177
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
178
|
+
}
|
|
179
|
+
return requestContext;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.CustomFieldsApiRequestFactory = CustomFieldsApiRequestFactory;
|
|
183
|
+
class CustomFieldsApiResponseProcessor {
|
|
184
|
+
/**
|
|
185
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
186
|
+
* to the expected objects
|
|
187
|
+
*
|
|
188
|
+
* @params response Response returned by the server for a request to createCustomField
|
|
189
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
190
|
+
*/
|
|
191
|
+
async createCustomFieldWithHttpInfo(response) {
|
|
192
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
193
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
194
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomFieldResponse", "");
|
|
195
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
196
|
+
}
|
|
197
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
199
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
200
|
+
}
|
|
201
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
203
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
204
|
+
}
|
|
205
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
207
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
208
|
+
}
|
|
209
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
211
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
212
|
+
}
|
|
213
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
214
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
215
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomFieldResponse", "");
|
|
216
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
217
|
+
}
|
|
218
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
222
|
+
* to the expected objects
|
|
223
|
+
*
|
|
224
|
+
* @params response Response returned by the server for a request to deleteCustomField
|
|
225
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
226
|
+
*/
|
|
227
|
+
async deleteCustomFieldWithHttpInfo(response) {
|
|
228
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
229
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
230
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomFieldResponse", "");
|
|
231
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
232
|
+
}
|
|
233
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
234
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
235
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
236
|
+
}
|
|
237
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
238
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
239
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
240
|
+
}
|
|
241
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
242
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
243
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
244
|
+
}
|
|
245
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
246
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
247
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
248
|
+
}
|
|
249
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
250
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
251
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
252
|
+
}
|
|
253
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
254
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
255
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomFieldResponse", "");
|
|
256
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
257
|
+
}
|
|
258
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
262
|
+
* to the expected objects
|
|
263
|
+
*
|
|
264
|
+
* @params response Response returned by the server for a request to getCustomField
|
|
265
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
266
|
+
*/
|
|
267
|
+
async getCustomFieldWithHttpInfo(response) {
|
|
268
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
269
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
270
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomFieldResponse", "");
|
|
271
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
272
|
+
}
|
|
273
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
274
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
275
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
276
|
+
}
|
|
277
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
278
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
279
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
280
|
+
}
|
|
281
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
282
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
283
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
284
|
+
}
|
|
285
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
286
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
287
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
288
|
+
}
|
|
289
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
290
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
291
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
292
|
+
}
|
|
293
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
294
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
295
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomFieldResponse", "");
|
|
296
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
297
|
+
}
|
|
298
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
302
|
+
* to the expected objects
|
|
303
|
+
*
|
|
304
|
+
* @params response Response returned by the server for a request to listCustomFields
|
|
305
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
306
|
+
*/
|
|
307
|
+
async listCustomFieldsWithHttpInfo(response) {
|
|
308
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
309
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
310
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomFieldsResponse", "");
|
|
311
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
312
|
+
}
|
|
313
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
314
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
316
|
+
}
|
|
317
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
318
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
319
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
320
|
+
}
|
|
321
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
322
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
323
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
324
|
+
}
|
|
325
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
326
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
327
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
328
|
+
}
|
|
329
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
330
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
331
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomFieldsResponse", "");
|
|
332
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
333
|
+
}
|
|
334
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
338
|
+
* to the expected objects
|
|
339
|
+
*
|
|
340
|
+
* @params response Response returned by the server for a request to updateCustomField
|
|
341
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
342
|
+
*/
|
|
343
|
+
async updateCustomFieldWithHttpInfo(response) {
|
|
344
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
345
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
346
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomFieldResponse", "");
|
|
347
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
348
|
+
}
|
|
349
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
350
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
351
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
352
|
+
}
|
|
353
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
354
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
355
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
356
|
+
}
|
|
357
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
358
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
359
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
360
|
+
}
|
|
361
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
362
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
363
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
364
|
+
}
|
|
365
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
366
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
367
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
368
|
+
}
|
|
369
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
370
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
371
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomFieldResponse", "");
|
|
372
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
373
|
+
}
|
|
374
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
exports.CustomFieldsApiResponseProcessor = CustomFieldsApiResponseProcessor;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
+
import { CreateCustomerRelationRequest } from '../models/CreateCustomerRelationRequest';
|
|
5
|
+
import { CreateCustomerRelationResponse } from '../models/CreateCustomerRelationResponse';
|
|
4
6
|
import { CreateCustomerRequest } from '../models/CreateCustomerRequest';
|
|
5
7
|
import { CreateCustomerResponse } from '../models/CreateCustomerResponse';
|
|
6
8
|
import { DeleteCustomerResponse } from '../models/DeleteCustomerResponse';
|
|
9
|
+
import { GetCustomerByIntegrationIdResponse } from '../models/GetCustomerByIntegrationIdResponse';
|
|
10
|
+
import { GetCustomerByNameResponse } from '../models/GetCustomerByNameResponse';
|
|
7
11
|
import { GetCustomerProductsConsumptionsByAliasResponse } from '../models/GetCustomerProductsConsumptionsByAliasResponse';
|
|
8
12
|
import { GetCustomerProductsConsumptionsResponse } from '../models/GetCustomerProductsConsumptionsResponse';
|
|
13
|
+
import { GetCustomerRelationResponse } from '../models/GetCustomerRelationResponse';
|
|
9
14
|
import { GetCustomerResponse } from '../models/GetCustomerResponse';
|
|
15
|
+
import { IntegrationType } from '../models/IntegrationType';
|
|
10
16
|
import { ListCustomersResponse } from '../models/ListCustomersResponse';
|
|
11
17
|
import { UpdateCustomerRequest } from '../models/UpdateCustomerRequest';
|
|
12
18
|
import { UpdateCustomerResponse } from '../models/UpdateCustomerResponse';
|
|
@@ -20,6 +26,12 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
20
26
|
* @param createCustomerRequest
|
|
21
27
|
*/
|
|
22
28
|
createCustomer(createCustomerRequest: CreateCustomerRequest, _options?: Configuration): Promise<RequestContext>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new Customer relation.
|
|
31
|
+
* Create Customer relation
|
|
32
|
+
* @param createCustomerRelationRequest
|
|
33
|
+
*/
|
|
34
|
+
createCustomerRelation(createCustomerRelationRequest: CreateCustomerRelationRequest, _options?: Configuration): Promise<RequestContext>;
|
|
23
35
|
/**
|
|
24
36
|
* Delete a Customer by id.
|
|
25
37
|
* Delete Customer
|
|
@@ -38,6 +50,19 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
38
50
|
* @param externalId
|
|
39
51
|
*/
|
|
40
52
|
getCustomerByExternalId(externalId: string, _options?: Configuration): Promise<RequestContext>;
|
|
53
|
+
/**
|
|
54
|
+
* Use this endpoint to get a specific customer using its integration provider and identifier.
|
|
55
|
+
* Get customer by integration id
|
|
56
|
+
* @param integrationType
|
|
57
|
+
* @param integrationId
|
|
58
|
+
*/
|
|
59
|
+
getCustomerByIntegrationId(integrationType: IntegrationType, integrationId: string, _options?: Configuration): Promise<RequestContext>;
|
|
60
|
+
/**
|
|
61
|
+
* Use this endpoint to get a specific customer using its name.
|
|
62
|
+
* Get customer by name
|
|
63
|
+
* @param name
|
|
64
|
+
*/
|
|
65
|
+
getCustomerByName(name: string, _options?: Configuration): Promise<RequestContext>;
|
|
41
66
|
/**
|
|
42
67
|
* Use this endpoint to get the products consumptions by the customer id.
|
|
43
68
|
* Get products consumptions by customer id
|
|
@@ -50,6 +75,12 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
50
75
|
* @param alias
|
|
51
76
|
*/
|
|
52
77
|
getCustomerProductsConsumptionsByAlias(alias: string, _options?: Configuration): Promise<RequestContext>;
|
|
78
|
+
/**
|
|
79
|
+
* Get a Customer relation by id.
|
|
80
|
+
* Get Customer relation
|
|
81
|
+
* @param customerRelationId
|
|
82
|
+
*/
|
|
83
|
+
getCustomerRelation(customerRelationId: string, _options?: Configuration): Promise<RequestContext>;
|
|
53
84
|
/**
|
|
54
85
|
* Get a list of Customers.
|
|
55
86
|
* List Customers
|
|
@@ -74,6 +105,14 @@ export declare class CustomersApiResponseProcessor {
|
|
|
74
105
|
* @throws ApiException if the response code was not in [200, 299]
|
|
75
106
|
*/
|
|
76
107
|
createCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomerResponse>>;
|
|
108
|
+
/**
|
|
109
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
110
|
+
* to the expected objects
|
|
111
|
+
*
|
|
112
|
+
* @params response Response returned by the server for a request to createCustomerRelation
|
|
113
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
114
|
+
*/
|
|
115
|
+
createCustomerRelationWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomerRelationResponse>>;
|
|
77
116
|
/**
|
|
78
117
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
79
118
|
* to the expected objects
|
|
@@ -98,6 +137,22 @@ export declare class CustomersApiResponseProcessor {
|
|
|
98
137
|
* @throws ApiException if the response code was not in [200, 299]
|
|
99
138
|
*/
|
|
100
139
|
getCustomerByExternalIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
142
|
+
* to the expected objects
|
|
143
|
+
*
|
|
144
|
+
* @params response Response returned by the server for a request to getCustomerByIntegrationId
|
|
145
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
146
|
+
*/
|
|
147
|
+
getCustomerByIntegrationIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerByIntegrationIdResponse>>;
|
|
148
|
+
/**
|
|
149
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
150
|
+
* to the expected objects
|
|
151
|
+
*
|
|
152
|
+
* @params response Response returned by the server for a request to getCustomerByName
|
|
153
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
154
|
+
*/
|
|
155
|
+
getCustomerByNameWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerByNameResponse>>;
|
|
101
156
|
/**
|
|
102
157
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
103
158
|
* to the expected objects
|
|
@@ -114,6 +169,14 @@ export declare class CustomersApiResponseProcessor {
|
|
|
114
169
|
* @throws ApiException if the response code was not in [200, 299]
|
|
115
170
|
*/
|
|
116
171
|
getCustomerProductsConsumptionsByAliasWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerProductsConsumptionsByAliasResponse>>;
|
|
172
|
+
/**
|
|
173
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
174
|
+
* to the expected objects
|
|
175
|
+
*
|
|
176
|
+
* @params response Response returned by the server for a request to getCustomerRelation
|
|
177
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
178
|
+
*/
|
|
179
|
+
getCustomerRelationWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerRelationResponse>>;
|
|
117
180
|
/**
|
|
118
181
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
119
182
|
* to the expected objects
|