vayu-ts 0.2.5 → 0.2.7-test
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/openapi/apis/AuthApi.js +47 -61
- package/dist/openapi/apis/ContractsApi.js +203 -232
- package/dist/openapi/apis/CreditsApi.js +162 -186
- package/dist/openapi/apis/CustomersApi.d.ts +15 -0
- package/dist/openapi/apis/CustomersApi.js +378 -353
- package/dist/openapi/apis/EventsApi.js +282 -316
- package/dist/openapi/apis/IntegrationsApi.js +105 -124
- package/dist/openapi/apis/InvoicesApi.js +100 -119
- package/dist/openapi/apis/MetersApi.js +211 -240
- package/dist/openapi/apis/PlansApi.js +150 -174
- package/dist/openapi/apis/ProductConsumptionsApi.d.ts +25 -0
- package/dist/openapi/apis/ProductConsumptionsApi.js +82 -0
- package/dist/openapi/apis/ReportsApi.js +100 -119
- package/dist/openapi/apis/WebhooksApi.js +55 -69
- package/dist/openapi/auth/auth.d.ts +1 -0
- package/dist/openapi/auth/auth.js +2 -13
- package/dist/openapi/http/http.d.ts +7 -20
- package/dist/openapi/http/http.js +15 -25
- package/dist/openapi/index.d.ts +3 -3
- package/dist/openapi/index.js +2 -1
- package/dist/openapi/models/Address.d.ts +3 -0
- package/dist/openapi/models/Address.js +1 -0
- package/dist/openapi/models/AggregationMethod.d.ts +3 -0
- package/dist/openapi/models/AggregationMethod.js +1 -0
- package/dist/openapi/models/Condition.d.ts +3 -0
- package/dist/openapi/models/Condition.js +1 -0
- package/dist/openapi/models/Contact.d.ts +4 -1
- package/dist/openapi/models/Contact.js +3 -2
- package/dist/openapi/models/ContractStatus.d.ts +1 -0
- package/dist/openapi/models/ContractStatus.js +1 -0
- package/dist/openapi/models/CreateContractRequest.d.ts +3 -0
- package/dist/openapi/models/CreateContractRequest.js +1 -0
- package/dist/openapi/models/CreateContractResponse.d.ts +3 -0
- package/dist/openapi/models/CreateContractResponse.js +1 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +3 -0
- package/dist/openapi/models/CreateCustomerRequest.js +1 -0
- package/dist/openapi/models/CreateCustomerResponse.d.ts +3 -0
- package/dist/openapi/models/CreateCustomerResponse.js +1 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +3 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +1 -0
- package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -0
- package/dist/openapi/models/CreditLedgerEntry.js +1 -0
- package/dist/openapi/models/Criterion.d.ts +3 -0
- package/dist/openapi/models/Criterion.js +1 -0
- package/dist/openapi/models/CriterionOperator.d.ts +3 -1
- package/dist/openapi/models/CriterionOperator.js +2 -0
- package/dist/openapi/models/DeductCreditsRequest.d.ts +3 -0
- package/dist/openapi/models/DeductCreditsRequest.js +1 -0
- package/dist/openapi/models/DeleteContractResponse.d.ts +3 -0
- package/dist/openapi/models/DeleteContractResponse.js +1 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +3 -0
- package/dist/openapi/models/DeleteContractResponseContract.js +1 -0
- package/dist/openapi/models/DeleteCustomerResponse.d.ts +3 -0
- package/dist/openapi/models/DeleteCustomerResponse.js +1 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +3 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +1 -0
- package/dist/openapi/models/DeleteEventResponse.d.ts +3 -0
- package/dist/openapi/models/DeleteEventResponse.js +1 -0
- package/dist/openapi/models/DeleteEventResponseEvent.d.ts +3 -0
- package/dist/openapi/models/DeleteEventResponseEvent.js +1 -0
- package/dist/openapi/models/DeleteMeterResponse.d.ts +3 -0
- package/dist/openapi/models/DeleteMeterResponse.js +1 -0
- package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +3 -0
- package/dist/openapi/models/DeleteMeterResponseMeter.js +1 -0
- package/dist/openapi/models/DeletePlanResponse.d.ts +3 -0
- package/dist/openapi/models/DeletePlanResponse.js +1 -0
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +3 -0
- package/dist/openapi/models/DeletePlanResponsePlan.js +1 -0
- package/dist/openapi/models/Event.d.ts +3 -0
- package/dist/openapi/models/Event.js +1 -0
- package/dist/openapi/models/EventsDryRunRequest.d.ts +3 -0
- package/dist/openapi/models/EventsDryRunRequest.js +1 -0
- package/dist/openapi/models/EventsDryRunResponse.d.ts +3 -0
- package/dist/openapi/models/EventsDryRunResponse.js +1 -0
- package/dist/openapi/models/EventsDryRunResponseObject.d.ts +3 -0
- package/dist/openapi/models/EventsDryRunResponseObject.js +1 -0
- package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +3 -0
- package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +1 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +3 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +1 -0
- package/dist/openapi/models/Filter.d.ts +3 -0
- package/dist/openapi/models/Filter.js +1 -0
- package/dist/openapi/models/FullDayPeriod.d.ts +3 -0
- package/dist/openapi/models/FullDayPeriod.js +1 -0
- package/dist/openapi/models/GetCommitmentReportResponse.d.ts +5 -0
- package/dist/openapi/models/GetCommitmentReportResponse.js +13 -0
- package/dist/openapi/models/GetContractResponse.d.ts +3 -0
- package/dist/openapi/models/GetContractResponse.js +1 -0
- package/dist/openapi/models/GetContractResponseContract.d.ts +3 -0
- package/dist/openapi/models/GetContractResponseContract.js +1 -0
- package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.js +32 -0
- package/dist/openapi/models/GetCustomerResponse.d.ts +3 -0
- package/dist/openapi/models/GetCustomerResponse.js +1 -0
- package/dist/openapi/models/GetEventResponse.d.ts +3 -0
- package/dist/openapi/models/GetEventResponse.js +1 -0
- package/dist/openapi/models/GetEventResponseEvent.d.ts +3 -0
- package/dist/openapi/models/GetEventResponseEvent.js +1 -0
- package/dist/openapi/models/GetInvoiceResponse.d.ts +3 -0
- package/dist/openapi/models/GetInvoiceResponse.js +1 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +3 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.js +1 -0
- package/dist/openapi/models/GetMeterResponse.d.ts +3 -0
- package/dist/openapi/models/GetMeterResponse.js +1 -0
- package/dist/openapi/models/GetMeterResponseMeter.d.ts +3 -0
- package/dist/openapi/models/GetMeterResponseMeter.js +1 -0
- package/dist/openapi/models/GetPlanResponse.d.ts +3 -0
- package/dist/openapi/models/GetPlanResponse.js +1 -0
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +3 -0
- package/dist/openapi/models/GetPlanResponsePlan.js +1 -0
- package/dist/openapi/models/GetProductConsumptionResponse.d.ts +32 -0
- package/dist/openapi/models/GetProductConsumptionResponse.js +32 -0
- package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.d.ts +59 -0
- package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.js +74 -0
- package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +5 -0
- package/dist/openapi/models/GetProductsUsageReportResponse.js +13 -0
- package/dist/openapi/models/GrantCreditsRequest.d.ts +3 -0
- package/dist/openapi/models/GrantCreditsRequest.js +1 -0
- package/dist/openapi/models/InvalidEvent.d.ts +3 -0
- package/dist/openapi/models/InvalidEvent.js +1 -0
- package/dist/openapi/models/LineItem.d.ts +3 -0
- package/dist/openapi/models/LineItem.js +1 -0
- package/dist/openapi/models/LineItemRevenueBreakdown.d.ts +3 -0
- package/dist/openapi/models/LineItemRevenueBreakdown.js +1 -0
- package/dist/openapi/models/ListContractsResponse.d.ts +3 -0
- package/dist/openapi/models/ListContractsResponse.js +1 -0
- package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +3 -0
- package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +1 -0
- package/dist/openapi/models/ListCustomersResponse.d.ts +3 -0
- package/dist/openapi/models/ListCustomersResponse.js +1 -0
- package/dist/openapi/models/ListInvoicesResponse.d.ts +3 -0
- package/dist/openapi/models/ListInvoicesResponse.js +1 -0
- package/dist/openapi/models/ListMetersResponse.d.ts +3 -0
- package/dist/openapi/models/ListMetersResponse.js +1 -0
- package/dist/openapi/models/ListPlansResponse.d.ts +3 -0
- package/dist/openapi/models/ListPlansResponse.js +1 -0
- package/dist/openapi/models/LoginRequest.d.ts +3 -0
- package/dist/openapi/models/LoginRequest.js +1 -0
- package/dist/openapi/models/LoginResponse.d.ts +3 -0
- package/dist/openapi/models/LoginResponse.js +1 -0
- package/dist/openapi/models/Meter.d.ts +3 -0
- package/dist/openapi/models/Meter.js +1 -0
- package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +3 -0
- package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +1 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +3 -0
- package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +1 -0
- package/dist/openapi/models/NotificationEventType.d.ts +2 -1
- package/dist/openapi/models/NotificationEventType.js +1 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +6 -0
- package/dist/openapi/models/ObjectSerializer.js +68 -11
- package/dist/openapi/models/PlanBillingData.d.ts +5 -1
- package/dist/openapi/models/PlanBillingData.js +2 -1
- package/dist/{openapi-v2/models/UpdateEventPayload.d.ts → openapi/models/PlanDuration.d.ts} +7 -10
- package/dist/openapi/models/PlanDuration.js +25 -0
- package/dist/openapi/models/ProductConsumption.d.ts +59 -0
- package/dist/openapi/models/ProductConsumption.js +74 -0
- package/dist/openapi/models/QueryEventsResponse.d.ts +3 -0
- package/dist/openapi/models/QueryEventsResponse.js +1 -0
- package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +3 -0
- package/dist/openapi/models/QueryEventsResponseEventsInner.js +1 -0
- package/dist/openapi/models/SendEventsRequest.d.ts +3 -0
- package/dist/openapi/models/SendEventsRequest.js +1 -0
- package/dist/openapi/models/SendEventsResponse.d.ts +3 -0
- package/dist/openapi/models/SendEventsResponse.js +1 -0
- package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
- package/dist/openapi/models/UnlimitedDuration.js +18 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +3 -0
- package/dist/openapi/models/UpdateCustomerRequest.js +1 -0
- package/dist/openapi/models/UpdateCustomerResponse.d.ts +3 -0
- package/dist/openapi/models/UpdateCustomerResponse.js +1 -0
- package/dist/openapi/models/UpdateMeterRequest.d.ts +3 -0
- package/dist/openapi/models/UpdateMeterRequest.js +1 -0
- package/dist/openapi/models/UpdateMeterResponse.d.ts +3 -0
- package/dist/openapi/models/UpdateMeterResponse.js +1 -0
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +3 -0
- package/dist/openapi/models/WebhookSubscribeRequest.js +1 -0
- package/dist/openapi/models/all.d.ts +6 -0
- package/dist/openapi/models/all.js +6 -0
- package/dist/openapi/servers.js +2 -3
- package/dist/openapi/types/ObservableAPI.d.ts +71 -38
- package/dist/openapi/types/ObservableAPI.js +172 -105
- package/dist/openapi/types/PromiseAPI.d.ts +69 -38
- package/dist/openapi/types/PromiseAPI.js +85 -42
- package/dist/openapi-v2/apis/AuthenticationApi.js +35 -49
- package/dist/openapi-v2/apis/CustomersApi.d.ts +15 -9
- package/dist/openapi-v2/apis/CustomersApi.js +245 -278
- package/dist/openapi-v2/apis/EntitlementsApi.d.ts +6 -3
- package/dist/openapi-v2/apis/EntitlementsApi.js +104 -125
- package/dist/openapi-v2/apis/EventsApi.d.ts +8 -4
- package/dist/openapi-v2/apis/EventsApi.js +144 -169
- package/dist/openapi-v2/apis/InvoicesApi.d.ts +13 -7
- package/dist/openapi-v2/apis/InvoicesApi.js +227 -260
- package/dist/openapi-v2/apis/ProductsApi.d.ts +11 -6
- package/dist/openapi-v2/apis/ProductsApi.js +193 -222
- package/dist/openapi-v2/auth/auth.d.ts +1 -0
- package/dist/openapi-v2/http/http.d.ts +7 -20
- package/dist/openapi-v2/http/http.js +15 -25
- package/dist/openapi-v2/index.d.ts +2 -2
- package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +3 -0
- package/dist/openapi-v2/models/APICreateCustomerPayload.js +1 -0
- package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +3 -0
- package/dist/openapi-v2/models/APICreateInvoicePayload.js +1 -0
- package/dist/openapi-v2/models/APICreateProductPayload.d.ts +3 -0
- package/dist/openapi-v2/models/APICreateProductPayload.js +1 -0
- package/dist/openapi-v2/models/APICustomer.d.ts +3 -0
- package/dist/openapi-v2/models/APICustomer.js +1 -0
- package/dist/openapi-v2/models/APIEntitlement.d.ts +3 -0
- package/dist/openapi-v2/models/APIEntitlement.js +1 -0
- package/dist/openapi-v2/models/APIEvent.d.ts +3 -0
- package/dist/openapi-v2/models/APIEvent.js +1 -0
- package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +3 -0
- package/dist/openapi-v2/models/APIIngestEventPayload.js +1 -0
- package/dist/openapi-v2/models/APIInvoice.d.ts +3 -0
- package/dist/openapi-v2/models/APIInvoice.js +1 -0
- package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +3 -0
- package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +1 -0
- package/dist/openapi-v2/models/APIProduct.d.ts +3 -0
- package/dist/openapi-v2/models/APIProduct.js +1 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +3 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +1 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +3 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +1 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +3 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +1 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +3 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +1 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +3 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +1 -0
- package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +3 -0
- package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +1 -0
- package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +3 -0
- package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +1 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +3 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.js +1 -0
- package/dist/openapi-v2/models/Aggregation.d.ts +3 -0
- package/dist/openapi-v2/models/Aggregation.js +1 -0
- package/dist/openapi-v2/models/Condition.d.ts +3 -0
- package/dist/openapi-v2/models/Condition.js +1 -0
- package/dist/openapi-v2/models/Criterion.d.ts +3 -0
- package/dist/openapi-v2/models/Criterion.js +1 -0
- package/dist/openapi-v2/models/CriterionValue.d.ts +3 -0
- package/dist/openapi-v2/models/CriterionValue.js +1 -0
- package/dist/openapi-v2/models/EntitlementRevision.d.ts +3 -0
- package/dist/openapi-v2/models/EntitlementRevision.js +1 -0
- package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +3 -0
- package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +1 -0
- package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +3 -0
- package/dist/openapi-v2/models/InvoiceProductBreakdown.js +1 -0
- package/dist/openapi-v2/models/Login200Response.d.ts +3 -0
- package/dist/openapi-v2/models/Login200Response.js +1 -0
- package/dist/openapi-v2/models/LoginRequest.d.ts +3 -0
- package/dist/openapi-v2/models/LoginRequest.js +1 -0
- package/dist/openapi-v2/models/ObjectSerializer.d.ts +1 -2
- package/dist/openapi-v2/models/ObjectSerializer.js +53 -17
- package/dist/openapi-v2/models/Pricing.d.ts +5 -0
- package/dist/openapi-v2/models/Pricing.js +7 -0
- package/dist/openapi-v2/models/PricingCadence.d.ts +18 -0
- package/dist/openapi-v2/models/PricingCadence.js +22 -0
- package/dist/openapi-v2/models/PricingTiersInner.d.ts +3 -0
- package/dist/openapi-v2/models/PricingTiersInner.js +1 -0
- package/dist/openapi-v2/models/ProductBreakdown.d.ts +3 -0
- package/dist/openapi-v2/models/ProductBreakdown.js +1 -0
- package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +3 -0
- package/dist/openapi-v2/models/QueryResultAPICustomer.js +1 -0
- package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +3 -0
- package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +1 -0
- package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +3 -0
- package/dist/openapi-v2/models/QueryResultAPIEvent.js +1 -0
- package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +3 -0
- package/dist/openapi-v2/models/QueryResultAPIInvoice.js +1 -0
- package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +3 -0
- package/dist/openapi-v2/models/QueryResultAPIProduct.js +1 -0
- package/dist/openapi-v2/models/ReviseEntitlementPayload.d.ts +3 -0
- package/dist/openapi-v2/models/ReviseEntitlementPayload.js +1 -0
- package/dist/openapi-v2/models/all.d.ts +1 -2
- package/dist/openapi-v2/models/all.js +1 -2
- package/dist/openapi-v2/servers.js +2 -3
- package/dist/openapi-v2/types/ObservableAPI.d.ts +106 -58
- package/dist/openapi-v2/types/ObservableAPI.js +156 -108
- package/dist/openapi-v2/types/PromiseAPI.d.ts +106 -58
- package/dist/openapi-v2/types/PromiseAPI.js +106 -58
- package/dist/sdk/clients/ContractsClient.js +10 -27
- package/dist/sdk/clients/CustomersClient.js +14 -35
- package/dist/sdk/clients/EventsClient.js +13 -32
- package/dist/sdk/clients/InvoicesClient.js +6 -19
- package/dist/sdk/clients/MetersClient.js +10 -27
- package/dist/sdk/clients/PlansClient.js +8 -23
- package/dist/sdk/clients/ProductsConsumptionsClient.d.ts +5 -0
- package/dist/sdk/clients/ProductsConsumptionsClient.js +14 -0
- package/dist/sdk/clients/WebhooksClient.js +2 -13
- package/dist/sdk/clients/index.d.ts +1 -0
- package/dist/sdk/clients/index.js +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +5 -13
- package/dist/sdk/services/configuration.service.js +21 -33
- package/dist/sdk-v2/clients/CustomersClient.js +12 -33
- package/dist/sdk-v2/clients/EntitlementsClient.js +6 -21
- package/dist/sdk-v2/clients/EventsClient.js +8 -25
- package/dist/sdk-v2/clients/InvoicesClient.js +12 -33
- package/dist/sdk-v2/clients/ProductsClient.js +10 -29
- package/dist/sdk-v2/index.js +2 -13
- package/dist/sdk-v2/services/configuration.service.js +22 -34
- package/dist/sdk-v2/types/index.d.ts +1 -1
- package/dist/sdk-v2/types/index.js +2 -1
- package/package.json +1 -1
- package/dist/openapi-v2/models/Event.d.ts +0 -54
- package/dist/openapi-v2/models/Event.js +0 -85
- package/dist/openapi-v2/models/UpdateEventPayload.js +0 -31
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CustomersApiResponseProcessor = exports.CustomersApiRequestFactory = void 0;
|
|
13
4
|
// TODO: better import syntax?
|
|
@@ -25,134 +16,151 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
25
16
|
* Create Customer
|
|
26
17
|
* @param createCustomerRequest
|
|
27
18
|
*/
|
|
28
|
-
createCustomer(createCustomerRequest, _options) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
authMethod
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
return requestContext;
|
|
59
|
-
});
|
|
19
|
+
async createCustomer(createCustomerRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'createCustomerRequest' is not null or undefined
|
|
22
|
+
if (createCustomerRequest === null || createCustomerRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("CustomersApi", "createCustomer", "createCustomerRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/customers';
|
|
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(createCustomerRequest, "CreateCustomerRequest", ""), 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;
|
|
60
48
|
}
|
|
61
49
|
/**
|
|
62
50
|
* Delete a Customer by id.
|
|
63
51
|
* Delete Customer
|
|
64
52
|
* @param customerId
|
|
65
53
|
*/
|
|
66
|
-
deleteCustomer(customerId, _options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
authMethod
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
return requestContext;
|
|
91
|
-
});
|
|
54
|
+
async deleteCustomer(customerId, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
57
|
+
if (customerId === null || customerId === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("CustomersApi", "deleteCustomer", "customerId");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/customers/{customerId}'
|
|
62
|
+
.replace('{' + 'customerId' + '}', encodeURIComponent(String(customerId)));
|
|
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;
|
|
92
77
|
}
|
|
93
78
|
/**
|
|
94
79
|
* Get a Customer by id.
|
|
95
80
|
* Get Customer
|
|
96
81
|
* @param customerId
|
|
97
82
|
*/
|
|
98
|
-
getCustomer(customerId, _options) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
authMethod
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
return requestContext;
|
|
123
|
-
});
|
|
83
|
+
async getCustomer(customerId, _options) {
|
|
84
|
+
let _config = _options || this.configuration;
|
|
85
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
86
|
+
if (customerId === null || customerId === undefined) {
|
|
87
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomer", "customerId");
|
|
88
|
+
}
|
|
89
|
+
// Path Params
|
|
90
|
+
const localVarPath = '/customers/{customerId}'
|
|
91
|
+
.replace('{' + 'customerId' + '}', encodeURIComponent(String(customerId)));
|
|
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;
|
|
124
106
|
}
|
|
125
107
|
/**
|
|
126
108
|
* Use this endpoint to get a specific customer using its external Id.
|
|
127
109
|
* Get customer by externalId
|
|
128
110
|
* @param externalId
|
|
129
111
|
*/
|
|
130
|
-
getCustomerByExternalId(externalId, _options) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
authMethod
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
112
|
+
async getCustomerByExternalId(externalId, _options) {
|
|
113
|
+
let _config = _options || this.configuration;
|
|
114
|
+
// verify required parameter 'externalId' is not null or undefined
|
|
115
|
+
if (externalId === null || externalId === undefined) {
|
|
116
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByExternalId", "externalId");
|
|
117
|
+
}
|
|
118
|
+
// Path Params
|
|
119
|
+
const localVarPath = '/customers/externalId/{externalId}'
|
|
120
|
+
.replace('{' + 'externalId' + '}', encodeURIComponent(String(externalId)));
|
|
121
|
+
// Make Request Context
|
|
122
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
123
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
124
|
+
let authMethod;
|
|
125
|
+
// Apply auth methods
|
|
126
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
127
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
128
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
129
|
+
}
|
|
130
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
131
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
132
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
return requestContext;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Use this endpoint to get the products consumptions by the customer id.
|
|
138
|
+
* Get products consumptions by customer id
|
|
139
|
+
* @param customerId
|
|
140
|
+
*/
|
|
141
|
+
async getCustomerProductsConsumptions(customerId, _options) {
|
|
142
|
+
let _config = _options || this.configuration;
|
|
143
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
144
|
+
if (customerId === null || customerId === undefined) {
|
|
145
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerProductsConsumptions", "customerId");
|
|
146
|
+
}
|
|
147
|
+
// Path Params
|
|
148
|
+
const localVarPath = '/customers/products-consumptions/{customerId}'
|
|
149
|
+
.replace('{' + 'customerId' + '}', encodeURIComponent(String(customerId)));
|
|
150
|
+
// Make Request Context
|
|
151
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
152
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
153
|
+
let authMethod;
|
|
154
|
+
// Apply auth methods
|
|
155
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
156
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
157
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
158
|
+
}
|
|
159
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
160
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
161
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
162
|
+
}
|
|
163
|
+
return requestContext;
|
|
156
164
|
}
|
|
157
165
|
/**
|
|
158
166
|
* Get a list of Customers.
|
|
@@ -160,35 +168,32 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
160
168
|
* @param limit
|
|
161
169
|
* @param cursor
|
|
162
170
|
*/
|
|
163
|
-
listCustomers(limit, cursor, _options) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
authMethod
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
return requestContext;
|
|
191
|
-
});
|
|
171
|
+
async listCustomers(limit, cursor, _options) {
|
|
172
|
+
let _config = _options || this.configuration;
|
|
173
|
+
// Path Params
|
|
174
|
+
const localVarPath = '/customers';
|
|
175
|
+
// Make Request Context
|
|
176
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
177
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
178
|
+
// Query Params
|
|
179
|
+
if (limit !== undefined) {
|
|
180
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
181
|
+
}
|
|
182
|
+
// Query Params
|
|
183
|
+
if (cursor !== undefined) {
|
|
184
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
185
|
+
}
|
|
186
|
+
let authMethod;
|
|
187
|
+
// Apply auth methods
|
|
188
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
189
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
190
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
191
|
+
}
|
|
192
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
193
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
194
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
195
|
+
}
|
|
196
|
+
return requestContext;
|
|
192
197
|
}
|
|
193
198
|
/**
|
|
194
199
|
* Update a Customer by id.
|
|
@@ -196,43 +201,40 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
196
201
|
* @param updateCustomerRequest
|
|
197
202
|
* @param customerId
|
|
198
203
|
*/
|
|
199
|
-
updateCustomer(updateCustomerRequest, customerId, _options) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
authMethod
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
return requestContext;
|
|
235
|
-
});
|
|
204
|
+
async updateCustomer(updateCustomerRequest, customerId, _options) {
|
|
205
|
+
let _config = _options || this.configuration;
|
|
206
|
+
// verify required parameter 'updateCustomerRequest' is not null or undefined
|
|
207
|
+
if (updateCustomerRequest === null || updateCustomerRequest === undefined) {
|
|
208
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "updateCustomerRequest");
|
|
209
|
+
}
|
|
210
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
211
|
+
if (customerId === null || customerId === undefined) {
|
|
212
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "customerId");
|
|
213
|
+
}
|
|
214
|
+
// Path Params
|
|
215
|
+
const localVarPath = '/customers/{customerId}'
|
|
216
|
+
.replace('{' + 'customerId' + '}', encodeURIComponent(String(customerId)));
|
|
217
|
+
// Make Request Context
|
|
218
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
219
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
220
|
+
// Body Params
|
|
221
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
222
|
+
"application/json"
|
|
223
|
+
]);
|
|
224
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
225
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateCustomerRequest, "UpdateCustomerRequest", ""), contentType);
|
|
226
|
+
requestContext.setBody(serializedBody);
|
|
227
|
+
let authMethod;
|
|
228
|
+
// Apply auth methods
|
|
229
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
230
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
231
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
232
|
+
}
|
|
233
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
234
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
235
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
236
|
+
}
|
|
237
|
+
return requestContext;
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
exports.CustomersApiRequestFactory = CustomersApiRequestFactory;
|
|
@@ -244,32 +246,30 @@ class CustomersApiResponseProcessor {
|
|
|
244
246
|
* @params response Response returned by the server for a request to createCustomer
|
|
245
247
|
* @throws ApiException if the response code was not in [200, 299]
|
|
246
248
|
*/
|
|
247
|
-
createCustomerWithHttpInfo(response) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
272
|
-
});
|
|
249
|
+
async createCustomerWithHttpInfo(response) {
|
|
250
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
251
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
252
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerResponse", "");
|
|
253
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
254
|
+
}
|
|
255
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
256
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
257
|
+
}
|
|
258
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
259
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
260
|
+
}
|
|
261
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
262
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
263
|
+
}
|
|
264
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
265
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
266
|
+
}
|
|
267
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
268
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
269
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerResponse", "");
|
|
270
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
271
|
+
}
|
|
272
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
275
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -278,35 +278,33 @@ class CustomersApiResponseProcessor {
|
|
|
278
278
|
* @params response Response returned by the server for a request to deleteCustomer
|
|
279
279
|
* @throws ApiException if the response code was not in [200, 299]
|
|
280
280
|
*/
|
|
281
|
-
deleteCustomerWithHttpInfo(response) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
309
|
-
});
|
|
281
|
+
async deleteCustomerWithHttpInfo(response) {
|
|
282
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
283
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
284
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomerResponse", "");
|
|
285
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
286
|
+
}
|
|
287
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
288
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
289
|
+
}
|
|
290
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
291
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
292
|
+
}
|
|
293
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
294
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
295
|
+
}
|
|
296
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
297
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
298
|
+
}
|
|
299
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
300
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
301
|
+
}
|
|
302
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
303
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
304
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomerResponse", "");
|
|
305
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
306
|
+
}
|
|
307
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
310
308
|
}
|
|
311
309
|
/**
|
|
312
310
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -315,35 +313,33 @@ class CustomersApiResponseProcessor {
|
|
|
315
313
|
* @params response Response returned by the server for a request to getCustomer
|
|
316
314
|
* @throws ApiException if the response code was not in [200, 299]
|
|
317
315
|
*/
|
|
318
|
-
getCustomerWithHttpInfo(response) {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
346
|
-
});
|
|
316
|
+
async getCustomerWithHttpInfo(response) {
|
|
317
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
318
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
319
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerResponse", "");
|
|
320
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
321
|
+
}
|
|
322
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
323
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
324
|
+
}
|
|
325
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
326
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
327
|
+
}
|
|
328
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
329
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
330
|
+
}
|
|
331
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
332
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
333
|
+
}
|
|
334
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
335
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
336
|
+
}
|
|
337
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
338
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
339
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerResponse", "");
|
|
340
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
341
|
+
}
|
|
342
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
347
343
|
}
|
|
348
344
|
/**
|
|
349
345
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -352,35 +348,68 @@ class CustomersApiResponseProcessor {
|
|
|
352
348
|
* @params response Response returned by the server for a request to getCustomerByExternalId
|
|
353
349
|
* @throws ApiException if the response code was not in [200, 299]
|
|
354
350
|
*/
|
|
355
|
-
getCustomerByExternalIdWithHttpInfo(response) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
351
|
+
async getCustomerByExternalIdWithHttpInfo(response) {
|
|
352
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
353
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
354
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerResponse", "");
|
|
355
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
356
|
+
}
|
|
357
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
358
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
359
|
+
}
|
|
360
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
361
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
362
|
+
}
|
|
363
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
364
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
365
|
+
}
|
|
366
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
367
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
368
|
+
}
|
|
369
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
370
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
371
|
+
}
|
|
372
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
373
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
374
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerResponse", "");
|
|
375
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
376
|
+
}
|
|
377
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
381
|
+
* to the expected objects
|
|
382
|
+
*
|
|
383
|
+
* @params response Response returned by the server for a request to getCustomerProductsConsumptions
|
|
384
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
385
|
+
*/
|
|
386
|
+
async getCustomerProductsConsumptionsWithHttpInfo(response) {
|
|
387
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
388
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
389
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerProductsConsumptionsResponse", "");
|
|
390
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
391
|
+
}
|
|
392
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
393
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
394
|
+
}
|
|
395
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
396
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
397
|
+
}
|
|
398
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
399
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
400
|
+
}
|
|
401
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
402
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
403
|
+
}
|
|
404
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
405
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
406
|
+
}
|
|
407
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
408
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
409
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerProductsConsumptionsResponse", "");
|
|
410
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
411
|
+
}
|
|
412
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
384
413
|
}
|
|
385
414
|
/**
|
|
386
415
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -389,32 +418,30 @@ class CustomersApiResponseProcessor {
|
|
|
389
418
|
* @params response Response returned by the server for a request to listCustomers
|
|
390
419
|
* @throws ApiException if the response code was not in [200, 299]
|
|
391
420
|
*/
|
|
392
|
-
listCustomersWithHttpInfo(response) {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
417
|
-
});
|
|
421
|
+
async listCustomersWithHttpInfo(response) {
|
|
422
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
423
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
424
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomersResponse", "");
|
|
425
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
426
|
+
}
|
|
427
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
428
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
429
|
+
}
|
|
430
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
431
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
432
|
+
}
|
|
433
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
434
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
435
|
+
}
|
|
436
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
437
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
438
|
+
}
|
|
439
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
440
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
441
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomersResponse", "");
|
|
442
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
443
|
+
}
|
|
444
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
418
445
|
}
|
|
419
446
|
/**
|
|
420
447
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -423,35 +450,33 @@ class CustomersApiResponseProcessor {
|
|
|
423
450
|
* @params response Response returned by the server for a request to updateCustomer
|
|
424
451
|
* @throws ApiException if the response code was not in [200, 299]
|
|
425
452
|
*/
|
|
426
|
-
updateCustomerWithHttpInfo(response) {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
454
|
-
});
|
|
453
|
+
async updateCustomerWithHttpInfo(response) {
|
|
454
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
455
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
456
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomerResponse", "");
|
|
457
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
458
|
+
}
|
|
459
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
460
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
461
|
+
}
|
|
462
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
463
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
464
|
+
}
|
|
465
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
466
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
467
|
+
}
|
|
468
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
469
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
470
|
+
}
|
|
471
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
472
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
473
|
+
}
|
|
474
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
475
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
476
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomerResponse", "");
|
|
477
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
478
|
+
}
|
|
479
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
455
480
|
}
|
|
456
481
|
}
|
|
457
482
|
exports.CustomersApiResponseProcessor = CustomersApiResponseProcessor;
|