vayu-ts 0.2.5 → 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-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 +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.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/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.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 +157 -109
- package/dist/openapi-v2/types/ObservableAPI.js +881 -133
- package/dist/openapi-v2/types/PromiseAPI.d.ts +157 -109
- package/dist/openapi-v2/types/PromiseAPI.js +657 -108
- 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
|
@@ -11,24 +11,29 @@ import { QueryResultAPIProduct } from '../models/QueryResultAPIProduct';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class ProductsApiRequestFactory extends BaseAPIRequestFactory {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Create a new product.
|
|
15
|
+
* @param aPICreateProductPayload - The details of the product to create.
|
|
15
16
|
*/
|
|
16
17
|
createProduct(aPICreateProductPayload: APICreateProductPayload, _options?: Configuration): Promise<RequestContext>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Delete a product by ID.
|
|
20
|
+
* @param id - The ID of the product to delete.
|
|
19
21
|
*/
|
|
20
22
|
deleteProduct(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
24
|
+
* Get a single product by ID.
|
|
25
|
+
* @param id - The ID of the product to fetch.
|
|
23
26
|
*/
|
|
24
27
|
getProduct(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
25
28
|
/**
|
|
26
|
-
*
|
|
29
|
+
* Query products based on filters and pagination.
|
|
30
|
+
* @param aPIQueryPayloadAPIProduct - The query filters and pagination details.
|
|
27
31
|
*/
|
|
28
32
|
queryProducts(aPIQueryPayloadAPIProduct: APIQueryPayloadAPIProduct, _options?: Configuration): Promise<RequestContext>;
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param
|
|
34
|
+
* Update an existing product.
|
|
35
|
+
* @param aPIUpdateProductPayload - The updated details of the product.
|
|
36
|
+
* @param id - The ID of the product to update.
|
|
32
37
|
*/
|
|
33
38
|
updateProduct(aPIUpdateProductPayload: APIUpdateProductPayload, id: string, _options?: Configuration): Promise<RequestContext>;
|
|
34
39
|
}
|
|
@@ -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.ProductsApiResponseProcessor = exports.ProductsApiRequestFactory = void 0;
|
|
13
4
|
// TODO: better import syntax?
|
|
@@ -21,148 +12,138 @@ const util_1 = require("../util");
|
|
|
21
12
|
*/
|
|
22
13
|
class ProductsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
23
14
|
/**
|
|
24
|
-
*
|
|
15
|
+
* Create a new product.
|
|
16
|
+
* @param aPICreateProductPayload - The details of the product to create.
|
|
25
17
|
*/
|
|
26
|
-
createProduct(aPICreateProductPayload, _options) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
return requestContext;
|
|
51
|
-
});
|
|
18
|
+
async createProduct(aPICreateProductPayload, _options) {
|
|
19
|
+
let _config = _options || this.configuration;
|
|
20
|
+
// verify required parameter 'aPICreateProductPayload' is not null or undefined
|
|
21
|
+
if (aPICreateProductPayload === null || aPICreateProductPayload === undefined) {
|
|
22
|
+
throw new baseapi_1.RequiredError("ProductsApi", "createProduct", "aPICreateProductPayload");
|
|
23
|
+
}
|
|
24
|
+
// Path Params
|
|
25
|
+
const localVarPath = '/products';
|
|
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(aPICreateProductPayload, "APICreateProductPayload", ""), contentType);
|
|
35
|
+
requestContext.setBody(serializedBody);
|
|
36
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
37
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
38
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
39
|
+
}
|
|
40
|
+
return requestContext;
|
|
52
41
|
}
|
|
53
42
|
/**
|
|
54
|
-
*
|
|
43
|
+
* Delete a product by ID.
|
|
44
|
+
* @param id - The ID of the product to delete.
|
|
55
45
|
*/
|
|
56
|
-
deleteProduct(id, _options) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return requestContext;
|
|
75
|
-
});
|
|
46
|
+
async deleteProduct(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("ProductsApi", "deleteProduct", "id");
|
|
51
|
+
}
|
|
52
|
+
// Path Params
|
|
53
|
+
const localVarPath = '/products/{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 = _config?.authMethods?.default;
|
|
59
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
60
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
61
|
+
}
|
|
62
|
+
return requestContext;
|
|
76
63
|
}
|
|
77
64
|
/**
|
|
78
|
-
*
|
|
65
|
+
* Get a single product by ID.
|
|
66
|
+
* @param id - The ID of the product to fetch.
|
|
79
67
|
*/
|
|
80
|
-
getProduct(id, _options) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
return requestContext;
|
|
99
|
-
});
|
|
68
|
+
async getProduct(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("ProductsApi", "getProduct", "id");
|
|
73
|
+
}
|
|
74
|
+
// Path Params
|
|
75
|
+
const localVarPath = '/products/{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 = _config?.authMethods?.default;
|
|
81
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
82
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
83
|
+
}
|
|
84
|
+
return requestContext;
|
|
100
85
|
}
|
|
101
86
|
/**
|
|
102
|
-
*
|
|
87
|
+
* Query products based on filters and pagination.
|
|
88
|
+
* @param aPIQueryPayloadAPIProduct - The query filters and pagination details.
|
|
103
89
|
*/
|
|
104
|
-
queryProducts(aPIQueryPayloadAPIProduct, _options) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
return requestContext;
|
|
129
|
-
});
|
|
90
|
+
async queryProducts(aPIQueryPayloadAPIProduct, _options) {
|
|
91
|
+
let _config = _options || this.configuration;
|
|
92
|
+
// verify required parameter 'aPIQueryPayloadAPIProduct' is not null or undefined
|
|
93
|
+
if (aPIQueryPayloadAPIProduct === null || aPIQueryPayloadAPIProduct === undefined) {
|
|
94
|
+
throw new baseapi_1.RequiredError("ProductsApi", "queryProducts", "aPIQueryPayloadAPIProduct");
|
|
95
|
+
}
|
|
96
|
+
// Path Params
|
|
97
|
+
const localVarPath = '/products/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(aPIQueryPayloadAPIProduct, "APIQueryPayloadAPIProduct", ""), contentType);
|
|
107
|
+
requestContext.setBody(serializedBody);
|
|
108
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
109
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
110
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
111
|
+
}
|
|
112
|
+
return requestContext;
|
|
130
113
|
}
|
|
131
114
|
/**
|
|
132
|
-
*
|
|
133
|
-
* @param
|
|
115
|
+
* Update an existing product.
|
|
116
|
+
* @param aPIUpdateProductPayload - The updated details of the product.
|
|
117
|
+
* @param id - The ID of the product to update.
|
|
134
118
|
*/
|
|
135
|
-
updateProduct(aPIUpdateProductPayload, id, _options) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
return requestContext;
|
|
165
|
-
});
|
|
119
|
+
async updateProduct(aPIUpdateProductPayload, id, _options) {
|
|
120
|
+
let _config = _options || this.configuration;
|
|
121
|
+
// verify required parameter 'aPIUpdateProductPayload' is not null or undefined
|
|
122
|
+
if (aPIUpdateProductPayload === null || aPIUpdateProductPayload === undefined) {
|
|
123
|
+
throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "aPIUpdateProductPayload");
|
|
124
|
+
}
|
|
125
|
+
// verify required parameter 'id' is not null or undefined
|
|
126
|
+
if (id === null || id === undefined) {
|
|
127
|
+
throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "id");
|
|
128
|
+
}
|
|
129
|
+
// Path Params
|
|
130
|
+
const localVarPath = '/products/{id}'
|
|
131
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
132
|
+
// Make Request Context
|
|
133
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
134
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
135
|
+
// Body Params
|
|
136
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
137
|
+
"application/json"
|
|
138
|
+
]);
|
|
139
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
140
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateProductPayload, "APIUpdateProductPayload", ""), contentType);
|
|
141
|
+
requestContext.setBody(serializedBody);
|
|
142
|
+
const defaultAuth = _config?.authMethods?.default;
|
|
143
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
144
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
145
|
+
}
|
|
146
|
+
return requestContext;
|
|
166
147
|
}
|
|
167
148
|
}
|
|
168
149
|
exports.ProductsApiRequestFactory = ProductsApiRequestFactory;
|
|
@@ -174,23 +155,21 @@ class ProductsApiResponseProcessor {
|
|
|
174
155
|
* @params response Response returned by the server for a request to createProduct
|
|
175
156
|
* @throws ApiException if the response code was not in [200, 299]
|
|
176
157
|
*/
|
|
177
|
-
createProductWithHttpInfo(response) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
193
|
-
});
|
|
158
|
+
async createProductWithHttpInfo(response) {
|
|
159
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
160
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
161
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
162
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
163
|
+
}
|
|
164
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
165
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
166
|
+
}
|
|
167
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
168
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
169
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
170
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
171
|
+
}
|
|
172
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
194
173
|
}
|
|
195
174
|
/**
|
|
196
175
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -199,19 +178,17 @@ class ProductsApiResponseProcessor {
|
|
|
199
178
|
* @params response Response returned by the server for a request to deleteProduct
|
|
200
179
|
* @throws ApiException if the response code was not in [200, 299]
|
|
201
180
|
*/
|
|
202
|
-
deleteProductWithHttpInfo(response) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
214
|
-
});
|
|
181
|
+
async deleteProductWithHttpInfo(response) {
|
|
182
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
183
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
184
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
185
|
+
}
|
|
186
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
187
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
188
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
189
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
190
|
+
}
|
|
191
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
215
192
|
}
|
|
216
193
|
/**
|
|
217
194
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -220,23 +197,21 @@ class ProductsApiResponseProcessor {
|
|
|
220
197
|
* @params response Response returned by the server for a request to getProduct
|
|
221
198
|
* @throws ApiException if the response code was not in [200, 299]
|
|
222
199
|
*/
|
|
223
|
-
getProductWithHttpInfo(response) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
239
|
-
});
|
|
200
|
+
async getProductWithHttpInfo(response) {
|
|
201
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
202
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
203
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
204
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
205
|
+
}
|
|
206
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
207
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
|
|
208
|
+
}
|
|
209
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
210
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
211
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
212
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
213
|
+
}
|
|
214
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
240
215
|
}
|
|
241
216
|
/**
|
|
242
217
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -245,23 +220,21 @@ class ProductsApiResponseProcessor {
|
|
|
245
220
|
* @params response Response returned by the server for a request to queryProducts
|
|
246
221
|
* @throws ApiException if the response code was not in [200, 299]
|
|
247
222
|
*/
|
|
248
|
-
queryProductsWithHttpInfo(response) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
264
|
-
});
|
|
223
|
+
async queryProductsWithHttpInfo(response) {
|
|
224
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
225
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
226
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPIProduct", "");
|
|
227
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
228
|
+
}
|
|
229
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
230
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
|
|
231
|
+
}
|
|
232
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
233
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
234
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPIProduct", "");
|
|
235
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
236
|
+
}
|
|
237
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
265
238
|
}
|
|
266
239
|
/**
|
|
267
240
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
@@ -270,26 +243,24 @@ class ProductsApiResponseProcessor {
|
|
|
270
243
|
* @params response Response returned by the server for a request to updateProduct
|
|
271
244
|
* @throws ApiException if the response code was not in [200, 299]
|
|
272
245
|
*/
|
|
273
|
-
updateProductWithHttpInfo(response) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
292
|
-
});
|
|
246
|
+
async updateProductWithHttpInfo(response) {
|
|
247
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
248
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
249
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
250
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
251
|
+
}
|
|
252
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
253
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
254
|
+
}
|
|
255
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
256
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
|
|
257
|
+
}
|
|
258
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
259
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
260
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
|
|
261
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
262
|
+
}
|
|
263
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
293
264
|
}
|
|
294
265
|
}
|
|
295
266
|
exports.ProductsApiResponseProcessor = ProductsApiResponseProcessor;
|
|
@@ -2,12 +2,18 @@ import { HttpLibrary } from "./http/http";
|
|
|
2
2
|
import { Middleware, PromiseMiddleware } from "./middleware";
|
|
3
3
|
import { BaseServerConfiguration } from "./servers";
|
|
4
4
|
import { AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
|
5
|
-
export interface Configuration {
|
|
5
|
+
export interface Configuration<M = Middleware> {
|
|
6
6
|
readonly baseServer: BaseServerConfiguration;
|
|
7
7
|
readonly httpApi: HttpLibrary;
|
|
8
|
-
readonly middleware:
|
|
8
|
+
readonly middleware: M[];
|
|
9
9
|
readonly authMethods: AuthMethods;
|
|
10
10
|
}
|
|
11
|
+
export interface MiddlewareMergeOptions {
|
|
12
|
+
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
|
13
|
+
}
|
|
14
|
+
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
|
15
|
+
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
|
16
|
+
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
|
11
17
|
/**
|
|
12
18
|
* Interface with which a configuration object can be configured.
|
|
13
19
|
*/
|