vayu-ts 0.2.6 → 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/models/PlanDuration.d.ts +30 -0
- 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.js +230 -269
- package/dist/openapi-v2/apis/EntitlementsApi.js +98 -122
- package/dist/openapi-v2/apis/EventsApi.js +136 -165
- package/dist/openapi-v2/apis/InvoicesApi.js +214 -253
- package/dist/openapi-v2/apis/ProductsApi.js +182 -216
- 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.js +51 -11
- package/dist/openapi-v2/models/Pricing.d.ts +3 -0
- package/dist/openapi-v2/models/Pricing.js +1 -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/servers.js +2 -3
- package/dist/openapi-v2/types/ObservableAPI.js +50 -50
- 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/package.json +1 -1
|
@@ -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?
|
|
@@ -24,113 +15,101 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
24
15
|
* Create a new customer.
|
|
25
16
|
* @param aPICreateCustomerPayload - The details of the customer to create.
|
|
26
17
|
*/
|
|
27
|
-
createCustomer(aPICreateCustomerPayload, _options) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
return requestContext;
|
|
52
|
-
});
|
|
18
|
+
async createCustomer(aPICreateCustomerPayload, _options) {
|
|
19
|
+
let _config = _options || this.configuration;
|
|
20
|
+
// verify required parameter 'aPICreateCustomerPayload' is not null or undefined
|
|
21
|
+
if (aPICreateCustomerPayload === null || aPICreateCustomerPayload === undefined) {
|
|
22
|
+
throw new baseapi_1.RequiredError("CustomersApi", "createCustomer", "aPICreateCustomerPayload");
|
|
23
|
+
}
|
|
24
|
+
// Path Params
|
|
25
|
+
const localVarPath = '/customers';
|
|
26
|
+
// Make Request Context
|
|
27
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
28
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
29
|
+
// Body Params
|
|
30
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
31
|
+
"application/json"
|
|
32
|
+
]);
|
|
33
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
34
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPICreateCustomerPayload, "APICreateCustomerPayload", ""), contentType);
|
|
35
|
+
requestContext.setBody(serializedBody);
|
|
36
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
37
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
38
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
39
|
+
}
|
|
40
|
+
return requestContext;
|
|
53
41
|
}
|
|
54
42
|
/**
|
|
55
43
|
* Delete a customer by ID.
|
|
56
44
|
* @param id - The ID of the customer to delete.
|
|
57
45
|
*/
|
|
58
|
-
deleteCustomer(id, _options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
return requestContext;
|
|
77
|
-
});
|
|
46
|
+
async deleteCustomer(id, _options) {
|
|
47
|
+
let _config = _options || this.configuration;
|
|
48
|
+
// verify required parameter 'id' is not null or undefined
|
|
49
|
+
if (id === null || id === undefined) {
|
|
50
|
+
throw new baseapi_1.RequiredError("CustomersApi", "deleteCustomer", "id");
|
|
51
|
+
}
|
|
52
|
+
// Path Params
|
|
53
|
+
const localVarPath = '/customers/{id}'
|
|
54
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
55
|
+
// Make Request Context
|
|
56
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
57
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
58
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
59
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
60
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
61
|
+
}
|
|
62
|
+
return requestContext;
|
|
78
63
|
}
|
|
79
64
|
/**
|
|
80
65
|
* Get a single customer by ID.
|
|
81
66
|
* @param id - The ID of the customer to fetch.
|
|
82
67
|
*/
|
|
83
|
-
getCustomer(id, _options) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
return requestContext;
|
|
102
|
-
});
|
|
68
|
+
async getCustomer(id, _options) {
|
|
69
|
+
let _config = _options || this.configuration;
|
|
70
|
+
// verify required parameter 'id' is not null or undefined
|
|
71
|
+
if (id === null || id === undefined) {
|
|
72
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomer", "id");
|
|
73
|
+
}
|
|
74
|
+
// Path Params
|
|
75
|
+
const localVarPath = '/customers/{id}'
|
|
76
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
77
|
+
// Make Request Context
|
|
78
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
79
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
80
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
81
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
82
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
83
|
+
}
|
|
84
|
+
return requestContext;
|
|
103
85
|
}
|
|
104
86
|
/**
|
|
105
87
|
* Query customers based on filters and pagination.
|
|
106
88
|
* @param aPIQueryPayloadAPICustomer - The query filters and pagination options.
|
|
107
89
|
*/
|
|
108
|
-
queryCustomers(aPIQueryPayloadAPICustomer, _options) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
return requestContext;
|
|
133
|
-
});
|
|
90
|
+
async queryCustomers(aPIQueryPayloadAPICustomer, _options) {
|
|
91
|
+
let _config = _options || this.configuration;
|
|
92
|
+
// verify required parameter 'aPIQueryPayloadAPICustomer' is not null or undefined
|
|
93
|
+
if (aPIQueryPayloadAPICustomer === null || aPIQueryPayloadAPICustomer === undefined) {
|
|
94
|
+
throw new baseapi_1.RequiredError("CustomersApi", "queryCustomers", "aPIQueryPayloadAPICustomer");
|
|
95
|
+
}
|
|
96
|
+
// Path Params
|
|
97
|
+
const localVarPath = '/customers/query';
|
|
98
|
+
// Make Request Context
|
|
99
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
100
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
101
|
+
// Body Params
|
|
102
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
103
|
+
"application/json"
|
|
104
|
+
]);
|
|
105
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
106
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPICustomer, "APIQueryPayloadAPICustomer", ""), contentType);
|
|
107
|
+
requestContext.setBody(serializedBody);
|
|
108
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
109
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
110
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
111
|
+
}
|
|
112
|
+
return requestContext;
|
|
134
113
|
}
|
|
135
114
|
/**
|
|
136
115
|
* Revise a customer\'s product.
|
|
@@ -138,79 +117,73 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
138
117
|
* @param id - The ID of the customer to revise.
|
|
139
118
|
* @param productId - The ID of the product to revise.
|
|
140
119
|
*/
|
|
141
|
-
updateACustomersProduct(body, id, productId, _options) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
return requestContext;
|
|
176
|
-
});
|
|
120
|
+
async updateACustomersProduct(body, id, productId, _options) {
|
|
121
|
+
let _config = _options || this.configuration;
|
|
122
|
+
// verify required parameter 'body' is not null or undefined
|
|
123
|
+
if (body === null || body === undefined) {
|
|
124
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "body");
|
|
125
|
+
}
|
|
126
|
+
// verify required parameter 'id' is not null or undefined
|
|
127
|
+
if (id === null || id === undefined) {
|
|
128
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "id");
|
|
129
|
+
}
|
|
130
|
+
// verify required parameter 'productId' is not null or undefined
|
|
131
|
+
if (productId === null || productId === undefined) {
|
|
132
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "productId");
|
|
133
|
+
}
|
|
134
|
+
// Path Params
|
|
135
|
+
const localVarPath = '/customers/{id}/products/{productId}'
|
|
136
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
137
|
+
.replace('{' + 'productId' + '}', encodeURIComponent(String(productId)));
|
|
138
|
+
// Make Request Context
|
|
139
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
140
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
141
|
+
// Body Params
|
|
142
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
143
|
+
"application/json"
|
|
144
|
+
]);
|
|
145
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
146
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReviseEntitlementPayload", ""), contentType);
|
|
147
|
+
requestContext.setBody(serializedBody);
|
|
148
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
149
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
150
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
151
|
+
}
|
|
152
|
+
return requestContext;
|
|
177
153
|
}
|
|
178
154
|
/**
|
|
179
155
|
* Update an existing customer.
|
|
180
156
|
* @param aPIUpdateCustomerPayload - The updated details of the customer.
|
|
181
157
|
* @param id - The ID of the customer to update.
|
|
182
158
|
*/
|
|
183
|
-
updateCustomer(aPIUpdateCustomerPayload, id, _options) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
return requestContext;
|
|
213
|
-
});
|
|
159
|
+
async updateCustomer(aPIUpdateCustomerPayload, id, _options) {
|
|
160
|
+
let _config = _options || this.configuration;
|
|
161
|
+
// verify required parameter 'aPIUpdateCustomerPayload' is not null or undefined
|
|
162
|
+
if (aPIUpdateCustomerPayload === null || aPIUpdateCustomerPayload === undefined) {
|
|
163
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "aPIUpdateCustomerPayload");
|
|
164
|
+
}
|
|
165
|
+
// verify required parameter 'id' is not null or undefined
|
|
166
|
+
if (id === null || id === undefined) {
|
|
167
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "id");
|
|
168
|
+
}
|
|
169
|
+
// Path Params
|
|
170
|
+
const localVarPath = '/customers/{id}'
|
|
171
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
172
|
+
// Make Request Context
|
|
173
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
174
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
175
|
+
// Body Params
|
|
176
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
177
|
+
"application/json"
|
|
178
|
+
]);
|
|
179
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
180
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateCustomerPayload, "APIUpdateCustomerPayload", ""), contentType);
|
|
181
|
+
requestContext.setBody(serializedBody);
|
|
182
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
183
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
184
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
185
|
+
}
|
|
186
|
+
return requestContext;
|
|
214
187
|
}
|
|
215
188
|
}
|
|
216
189
|
exports.CustomersApiRequestFactory = CustomersApiRequestFactory;
|
|
@@ -222,23 +195,21 @@ class CustomersApiResponseProcessor {
|
|
|
222
195
|
* @params response Response returned by the server for a request to createCustomer
|
|
223
196
|
* @throws ApiException if the response code was not in [200, 299]
|
|
224
197
|
*/
|
|
225
|
-
createCustomerWithHttpInfo(response) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
241
|
-
});
|
|
198
|
+
async createCustomerWithHttpInfo(response) {
|
|
199
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
200
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
201
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
202
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
203
|
+
}
|
|
204
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
205
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
206
|
+
}
|
|
207
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
208
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
209
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
210
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
211
|
+
}
|
|
212
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
242
213
|
}
|
|
243
214
|
/**
|
|
244
215
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -247,19 +218,17 @@ class CustomersApiResponseProcessor {
|
|
|
247
218
|
* @params response Response returned by the server for a request to deleteCustomer
|
|
248
219
|
* @throws ApiException if the response code was not in [200, 299]
|
|
249
220
|
*/
|
|
250
|
-
deleteCustomerWithHttpInfo(response) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
262
|
-
});
|
|
221
|
+
async deleteCustomerWithHttpInfo(response) {
|
|
222
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
223
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
224
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
225
|
+
}
|
|
226
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
227
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
228
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
229
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
230
|
+
}
|
|
231
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
263
232
|
}
|
|
264
233
|
/**
|
|
265
234
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -268,23 +237,21 @@ class CustomersApiResponseProcessor {
|
|
|
268
237
|
* @params response Response returned by the server for a request to getCustomer
|
|
269
238
|
* @throws ApiException if the response code was not in [200, 299]
|
|
270
239
|
*/
|
|
271
|
-
getCustomerWithHttpInfo(response) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
287
|
-
});
|
|
240
|
+
async getCustomerWithHttpInfo(response) {
|
|
241
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
242
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
243
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
244
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
245
|
+
}
|
|
246
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
247
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
|
|
248
|
+
}
|
|
249
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
250
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
251
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
252
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
253
|
+
}
|
|
254
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
288
255
|
}
|
|
289
256
|
/**
|
|
290
257
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -293,23 +260,21 @@ class CustomersApiResponseProcessor {
|
|
|
293
260
|
* @params response Response returned by the server for a request to queryCustomers
|
|
294
261
|
* @throws ApiException if the response code was not in [200, 299]
|
|
295
262
|
*/
|
|
296
|
-
queryCustomersWithHttpInfo(response) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
312
|
-
});
|
|
263
|
+
async queryCustomersWithHttpInfo(response) {
|
|
264
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
265
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
266
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPICustomer", "");
|
|
267
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
268
|
+
}
|
|
269
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
270
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
|
|
271
|
+
}
|
|
272
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
273
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
274
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPICustomer", "");
|
|
275
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
276
|
+
}
|
|
277
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
313
278
|
}
|
|
314
279
|
/**
|
|
315
280
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -318,23 +283,21 @@ class CustomersApiResponseProcessor {
|
|
|
318
283
|
* @params response Response returned by the server for a request to updateACustomersProduct
|
|
319
284
|
* @throws ApiException if the response code was not in [200, 299]
|
|
320
285
|
*/
|
|
321
|
-
updateACustomersProductWithHttpInfo(response) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
337
|
-
});
|
|
286
|
+
async updateACustomersProductWithHttpInfo(response) {
|
|
287
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
288
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
289
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIEntitlement", "");
|
|
290
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
291
|
+
}
|
|
292
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
293
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
294
|
+
}
|
|
295
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
296
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
297
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIEntitlement", "");
|
|
298
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
299
|
+
}
|
|
300
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
338
301
|
}
|
|
339
302
|
/**
|
|
340
303
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -343,26 +306,24 @@ class CustomersApiResponseProcessor {
|
|
|
343
306
|
* @params response Response returned by the server for a request to updateCustomer
|
|
344
307
|
* @throws ApiException if the response code was not in [200, 299]
|
|
345
308
|
*/
|
|
346
|
-
updateCustomerWithHttpInfo(response) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
365
|
-
});
|
|
309
|
+
async updateCustomerWithHttpInfo(response) {
|
|
310
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
311
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
312
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
313
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
314
|
+
}
|
|
315
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
316
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
317
|
+
}
|
|
318
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
319
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
|
|
320
|
+
}
|
|
321
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
322
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
323
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
|
|
324
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
325
|
+
}
|
|
326
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
366
327
|
}
|
|
367
328
|
}
|
|
368
329
|
exports.CustomersApiResponseProcessor = CustomersApiResponseProcessor;
|