vayu-ts 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/configuration.d.ts +8 -2
- package/dist/openapi/http/http.d.ts +7 -20
- package/dist/openapi/http/http.js +15 -25
- package/dist/openapi/index.d.ts +4 -3
- package/dist/openapi/index.js +4 -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 +138 -105
- package/dist/openapi/types/ObservableAPI.js +1185 -138
- package/dist/openapi/types/PromiseAPI.d.ts +136 -105
- package/dist/openapi/types/PromiseAPI.js +852 -108
- 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/configuration.d.ts +8 -2
- 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 +3 -2
- package/dist/openapi-v2/index.js +3 -1
- 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.d.ts +51 -51
- package/dist/openapi-v2/types/ObservableAPI.js +775 -75
- package/dist/openapi-v2/types/PromiseAPI.d.ts +51 -51
- package/dist/openapi-v2/types/PromiseAPI.js +551 -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.IntegrationsApiResponseProcessor = exports.IntegrationsApiRequestFactory = void 0;
|
|
13
4
|
// TODO: better import syntax?
|
|
@@ -25,76 +16,70 @@ class IntegrationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
25
16
|
* Export sales order to NetSuite
|
|
26
17
|
* @param netSuiteExportSalesOrderRequest
|
|
27
18
|
*/
|
|
28
|
-
exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _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 exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'netSuiteExportSalesOrderRequest' is not null or undefined
|
|
22
|
+
if (netSuiteExportSalesOrderRequest === null || netSuiteExportSalesOrderRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("IntegrationsApi", "exportNetSuiteSalesOrder", "netSuiteExportSalesOrderRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/integrations/netsuite/export-sales-order';
|
|
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(netSuiteExportSalesOrderRequest, "NetSuiteExportSalesOrderRequest", ""), 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 = _config?.authMethods?.default;
|
|
44
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
|
+
}
|
|
47
|
+
return requestContext;
|
|
60
48
|
}
|
|
61
49
|
/**
|
|
62
50
|
* This endpoint is used to sync invoices to NetSuite.
|
|
63
51
|
* Sync invoices to NetSuite
|
|
64
52
|
* @param netSuiteSyncInvoicesRequest
|
|
65
53
|
*/
|
|
66
|
-
netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
authMethod
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
return requestContext;
|
|
97
|
-
});
|
|
54
|
+
async netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'netSuiteSyncInvoicesRequest' is not null or undefined
|
|
57
|
+
if (netSuiteSyncInvoicesRequest === null || netSuiteSyncInvoicesRequest === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("IntegrationsApi", "netSuiteSyncInvoices", "netSuiteSyncInvoicesRequest");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/integrations/netsuite/sync-invoices';
|
|
62
|
+
// Make Request Context
|
|
63
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
64
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
65
|
+
// Body Params
|
|
66
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
67
|
+
"application/json"
|
|
68
|
+
]);
|
|
69
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
70
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(netSuiteSyncInvoicesRequest, "NetSuiteSyncInvoicesRequest", ""), contentType);
|
|
71
|
+
requestContext.setBody(serializedBody);
|
|
72
|
+
let authMethod;
|
|
73
|
+
// Apply auth methods
|
|
74
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
75
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
76
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
|
+
}
|
|
78
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
79
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
|
+
}
|
|
82
|
+
return requestContext;
|
|
98
83
|
}
|
|
99
84
|
}
|
|
100
85
|
exports.IntegrationsApiRequestFactory = IntegrationsApiRequestFactory;
|
|
@@ -106,31 +91,29 @@ class IntegrationsApiResponseProcessor {
|
|
|
106
91
|
* @params response Response returned by the server for a request to exportNetSuiteSalesOrder
|
|
107
92
|
* @throws ApiException if the response code was not in [200, 299]
|
|
108
93
|
*/
|
|
109
|
-
exportNetSuiteSalesOrderWithHttpInfo(response) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
133
|
-
});
|
|
94
|
+
async exportNetSuiteSalesOrderWithHttpInfo(response) {
|
|
95
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
96
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
97
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
98
|
+
}
|
|
99
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
100
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
101
|
+
}
|
|
102
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
103
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
104
|
+
}
|
|
105
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
106
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
107
|
+
}
|
|
108
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
109
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
110
|
+
}
|
|
111
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
112
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
113
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
114
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
115
|
+
}
|
|
116
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
134
117
|
}
|
|
135
118
|
/**
|
|
136
119
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -139,32 +122,30 @@ class IntegrationsApiResponseProcessor {
|
|
|
139
122
|
* @params response Response returned by the server for a request to netSuiteSyncInvoices
|
|
140
123
|
* @throws ApiException if the response code was not in [200, 299]
|
|
141
124
|
*/
|
|
142
|
-
netSuiteSyncInvoicesWithHttpInfo(response) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
167
|
-
});
|
|
125
|
+
async netSuiteSyncInvoicesWithHttpInfo(response) {
|
|
126
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
127
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
128
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
|
|
129
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
130
|
+
}
|
|
131
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
132
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
133
|
+
}
|
|
134
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
135
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
136
|
+
}
|
|
137
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
138
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
139
|
+
}
|
|
140
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
141
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
142
|
+
}
|
|
143
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
144
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
145
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
|
|
146
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
147
|
+
}
|
|
148
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
168
149
|
}
|
|
169
150
|
}
|
|
170
151
|
exports.IntegrationsApiResponseProcessor = IntegrationsApiResponseProcessor;
|
|
@@ -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.InvoicesApiResponseProcessor = exports.InvoicesApiRequestFactory = void 0;
|
|
13
4
|
// TODO: better import syntax?
|
|
@@ -25,32 +16,29 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
25
16
|
* Get Invoice
|
|
26
17
|
* @param invoiceId
|
|
27
18
|
*/
|
|
28
|
-
getInvoice(invoiceId, _options) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
authMethod
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
return requestContext;
|
|
53
|
-
});
|
|
19
|
+
async getInvoice(invoiceId, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'invoiceId' is not null or undefined
|
|
22
|
+
if (invoiceId === null || invoiceId === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "getInvoice", "invoiceId");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/invoices/{invoiceId}'
|
|
27
|
+
.replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId)));
|
|
28
|
+
// Make Request Context
|
|
29
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
30
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
31
|
+
let authMethod;
|
|
32
|
+
// Apply auth methods
|
|
33
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
34
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
35
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
|
+
}
|
|
37
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
38
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
|
+
}
|
|
41
|
+
return requestContext;
|
|
54
42
|
}
|
|
55
43
|
/**
|
|
56
44
|
* Get a list of Invoices.
|
|
@@ -58,35 +46,32 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
58
46
|
* @param limit
|
|
59
47
|
* @param cursor
|
|
60
48
|
*/
|
|
61
|
-
listInvoices(limit, cursor, _options) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
authMethod
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
return requestContext;
|
|
89
|
-
});
|
|
49
|
+
async listInvoices(limit, cursor, _options) {
|
|
50
|
+
let _config = _options || this.configuration;
|
|
51
|
+
// Path Params
|
|
52
|
+
const localVarPath = '/invoices';
|
|
53
|
+
// Make Request Context
|
|
54
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
55
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
56
|
+
// Query Params
|
|
57
|
+
if (limit !== undefined) {
|
|
58
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
59
|
+
}
|
|
60
|
+
// Query Params
|
|
61
|
+
if (cursor !== undefined) {
|
|
62
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
63
|
+
}
|
|
64
|
+
let authMethod;
|
|
65
|
+
// Apply auth methods
|
|
66
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
67
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
68
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
69
|
+
}
|
|
70
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
71
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
72
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
73
|
+
}
|
|
74
|
+
return requestContext;
|
|
90
75
|
}
|
|
91
76
|
}
|
|
92
77
|
exports.InvoicesApiRequestFactory = InvoicesApiRequestFactory;
|
|
@@ -98,35 +83,33 @@ class InvoicesApiResponseProcessor {
|
|
|
98
83
|
* @params response Response returned by the server for a request to getInvoice
|
|
99
84
|
* @throws ApiException if the response code was not in [200, 299]
|
|
100
85
|
*/
|
|
101
|
-
getInvoiceWithHttpInfo(response) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
129
|
-
});
|
|
86
|
+
async getInvoiceWithHttpInfo(response) {
|
|
87
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
88
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
89
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetInvoiceResponse", "");
|
|
90
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
91
|
+
}
|
|
92
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
93
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
94
|
+
}
|
|
95
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
96
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
97
|
+
}
|
|
98
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
99
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
100
|
+
}
|
|
101
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
102
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
103
|
+
}
|
|
104
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
105
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
106
|
+
}
|
|
107
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
108
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
109
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetInvoiceResponse", "");
|
|
110
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
111
|
+
}
|
|
112
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
130
113
|
}
|
|
131
114
|
/**
|
|
132
115
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -135,32 +118,30 @@ class InvoicesApiResponseProcessor {
|
|
|
135
118
|
* @params response Response returned by the server for a request to listInvoices
|
|
136
119
|
* @throws ApiException if the response code was not in [200, 299]
|
|
137
120
|
*/
|
|
138
|
-
listInvoicesWithHttpInfo(response) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
163
|
-
});
|
|
121
|
+
async listInvoicesWithHttpInfo(response) {
|
|
122
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
123
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
124
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListInvoicesResponse", "");
|
|
125
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
126
|
+
}
|
|
127
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
128
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
129
|
+
}
|
|
130
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
131
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
132
|
+
}
|
|
133
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
134
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
135
|
+
}
|
|
136
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
137
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
138
|
+
}
|
|
139
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
140
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
141
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListInvoicesResponse", "");
|
|
142
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
143
|
+
}
|
|
144
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
164
145
|
}
|
|
165
146
|
}
|
|
166
147
|
exports.InvoicesApiResponseProcessor = InvoicesApiResponseProcessor;
|