vayu-ts 0.2.14 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/example/index.d.ts +1 -0
- package/dist/example/index.js +74 -0
- package/dist/openapi/apis/CatalogProductsApi.d.ts +89 -0
- package/dist/openapi/apis/CatalogProductsApi.js +354 -0
- package/dist/openapi/apis/CloudUsageSubmissionApi.d.ts +25 -0
- package/dist/openapi/apis/CloudUsageSubmissionApi.js +85 -0
- package/dist/openapi/apis/ContractsApi.d.ts +21 -3
- package/dist/openapi/apis/ContractsApi.js +75 -3
- package/dist/openapi/apis/CustomersApi.d.ts +63 -0
- package/dist/openapi/apis/CustomersApi.js +257 -7
- package/dist/openapi/apis/EventsApi.d.ts +16 -0
- package/dist/openapi/apis/EventsApi.js +67 -12
- package/dist/openapi/apis/InvoicesApi.d.ts +19 -3
- package/dist/openapi/apis/InvoicesApi.js +69 -3
- package/dist/openapi/apis/ProductConsumptionsApi.js +0 -3
- package/dist/openapi/apis/WebhooksApi.js +0 -3
- package/dist/openapi/http/http.d.ts +6 -18
- package/dist/openapi/http/http.js +25 -13
- package/dist/openapi/http/isomorphic-fetch.d.ts +1 -0
- package/dist/openapi/http/isomorphic-fetch.js +4 -7
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +3 -1
- package/dist/openapi/models/Address.d.ts +5 -5
- package/dist/openapi/models/CloudUsageResult.d.ts +83 -0
- package/dist/openapi/models/CloudUsageResult.js +103 -0
- package/dist/openapi/models/Contact.d.ts +3 -1
- package/dist/openapi/models/Contact.js +12 -0
- package/dist/openapi/models/ContractStatus.d.ts +23 -0
- package/dist/openapi/models/ContractStatus.js +27 -0
- package/dist/openapi/models/CreateCatalogProductRequest.d.ts +42 -0
- package/dist/openapi/models/CreateCatalogProductRequest.js +44 -0
- package/dist/openapi/models/CreateCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCatalogProductResponse.js +32 -0
- package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.d.ts +45 -0
- package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.js +62 -0
- package/dist/openapi/models/CreateContractRequest.d.ts +47 -5
- package/dist/openapi/models/CreateContractRequest.js +65 -5
- package/dist/openapi/models/CreateCustomerRelationRequest.d.ts +38 -0
- package/dist/openapi/models/CreateCustomerRelationRequest.js +38 -0
- package/dist/openapi/models/CreateCustomerRelationResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomerRelationResponse.js +32 -0
- package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.d.ts +41 -0
- package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.js +56 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +50 -2
- package/dist/openapi/models/CreateCustomerRequest.js +82 -6
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +50 -2
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +82 -6
- package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -1
- package/dist/openapi/models/CreditLedgerEntry.js +8 -2
- package/dist/openapi/models/Currency.d.ts +24 -0
- package/dist/openapi/models/Currency.js +28 -0
- package/dist/openapi/models/CustomField.d.ts +65 -0
- package/dist/openapi/models/CustomField.js +78 -0
- package/dist/openapi/models/CustomFieldValue.d.ts +33 -0
- package/dist/openapi/models/CustomFieldValue.js +44 -0
- package/dist/openapi/models/CustomFieldValueTypes.d.ts +19 -0
- package/dist/openapi/models/CustomFieldValueTypes.js +23 -0
- package/dist/openapi/models/CustomerCloudProviderSettings.d.ts +39 -0
- package/dist/openapi/models/CustomerCloudProviderSettings.js +51 -0
- package/dist/openapi/models/CustomerSource.d.ts +21 -0
- package/dist/openapi/models/CustomerSource.js +25 -0
- package/dist/openapi/models/DeleteCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCatalogProductResponse.js +32 -0
- package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.d.ts +46 -0
- package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.js +68 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +47 -5
- package/dist/openapi/models/DeleteContractResponseContract.js +65 -5
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +50 -2
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +82 -6
- package/dist/openapi/models/DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.d.ts +56 -0
- package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.js +80 -0
- package/dist/openapi/models/ExternalOverageStrategy.d.ts +20 -0
- package/dist/openapi/models/ExternalOverageStrategy.js +24 -0
- package/dist/openapi/models/GetCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/GetCatalogProductResponse.js +32 -0
- package/dist/openapi/models/GetContractByIntegrationIdResponse.d.ts +32 -0
- package/dist/openapi/models/GetContractByIntegrationIdResponse.js +32 -0
- package/dist/openapi/models/GetContractResponseContract.d.ts +47 -5
- package/dist/openapi/models/GetContractResponseContract.js +65 -5
- package/dist/openapi/models/GetCustomerByIntegrationIdResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerByIntegrationIdResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerByNameResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +103 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +153 -0
- package/dist/openapi/models/GetCustomerRelationResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomerRelationResponse.js +32 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +14 -0
- package/dist/openapi/models/GetInvoiceResponseInvoice.js +30 -0
- package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.d.ts +39 -0
- package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.js +65 -0
- package/dist/openapi/models/IntegrationEntity.d.ts +42 -0
- package/dist/openapi/models/IntegrationEntity.js +62 -0
- package/dist/openapi/models/IntegrationEntityTypes.d.ts +23 -0
- package/dist/openapi/models/IntegrationEntityTypes.js +27 -0
- package/dist/openapi/models/IntegrationProviders.d.ts +26 -0
- package/dist/openapi/models/IntegrationProviders.js +30 -0
- package/dist/openapi/models/IntegrationType.d.ts +26 -0
- package/dist/openapi/models/IntegrationType.js +30 -0
- package/dist/openapi/models/InvoiceBillingStatus.d.ts +21 -0
- package/dist/openapi/models/InvoiceBillingStatus.js +25 -0
- package/dist/openapi/models/InvoicePaymentStatusResponse.d.ts +39 -0
- package/dist/openapi/models/InvoicePaymentStatusResponse.js +74 -0
- package/dist/openapi/models/ListCatalogProductsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCatalogProductsResponse.js +50 -0
- package/dist/openapi/models/NotificationEventType.d.ts +3 -1
- package/dist/openapi/models/NotificationEventType.js +2 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +61 -0
- package/dist/openapi/models/ObjectSerializer.js +191 -0
- package/dist/openapi/models/PartnerSubmissionDetail.d.ts +46 -0
- package/dist/openapi/models/PartnerSubmissionDetail.js +49 -0
- package/dist/openapi/models/PaymentInfo.d.ts +45 -0
- package/dist/openapi/models/PaymentInfo.js +89 -0
- package/dist/openapi/models/PaymentInfoDepositTo.d.ts +32 -0
- package/dist/openapi/models/PaymentInfoDepositTo.js +38 -0
- package/dist/openapi/models/PaymentTerm.d.ts +18 -0
- package/dist/openapi/models/PaymentTerm.js +22 -0
- package/dist/openapi/models/ProductCloudProviderSettings.d.ts +39 -0
- package/dist/openapi/models/ProductCloudProviderSettings.js +51 -0
- package/dist/openapi/models/ProductGroup.d.ts +65 -0
- package/dist/openapi/models/ProductGroup.js +80 -0
- package/dist/openapi/models/ProductGroupCommitment.d.ts +45 -0
- package/dist/openapi/models/ProductGroupCommitment.js +53 -0
- package/dist/openapi/models/ProductGroupProductsInner.d.ts +68 -0
- package/dist/openapi/models/ProductGroupProductsInner.js +98 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +45 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +36 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.js +24 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +35 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +37 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.d.ts +32 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.js +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +37 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.d.ts +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.js +45 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.d.ts +46 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.js +78 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.d.ts +38 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.js +45 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.d.ts +35 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.js +56 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.js +60 -0
- package/dist/openapi/models/ProductGroupProductsInnerScheduling.d.ts +39 -0
- package/dist/openapi/models/ProductGroupProductsInnerScheduling.js +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.js +48 -0
- package/dist/openapi/models/SubmitCloudUsageRequest.d.ts +39 -0
- package/dist/openapi/models/SubmitCloudUsageRequest.js +38 -0
- package/dist/openapi/models/SyncStatus.d.ts +16 -0
- package/dist/openapi/models/SyncStatus.js +20 -0
- package/dist/openapi/models/UpdateCatalogProductRequest.d.ts +42 -0
- package/dist/openapi/models/UpdateCatalogProductRequest.js +44 -0
- package/dist/openapi/models/UpdateCatalogProductResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCatalogProductResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +50 -2
- package/dist/openapi/models/UpdateCustomerRequest.js +82 -6
- package/dist/openapi/models/UsageWindow.d.ts +41 -0
- package/dist/openapi/models/UsageWindow.js +41 -0
- package/dist/openapi/models/all.d.ts +61 -0
- package/dist/openapi/models/all.js +61 -0
- package/dist/openapi/types/ObservableAPI.d.ts +212 -12
- package/dist/openapi/types/ObservableAPI.js +424 -17
- package/dist/openapi/types/PromiseAPI.d.ts +208 -12
- package/dist/openapi/types/PromiseAPI.js +294 -34
- package/dist/sdk/clients/CatalogProductsClient.d.ts +11 -0
- package/dist/sdk/clients/CatalogProductsClient.js +28 -0
- package/dist/sdk/clients/CloudUsageSubmissionClient.d.ts +6 -0
- package/dist/sdk/clients/CloudUsageSubmissionClient.js +14 -0
- package/dist/sdk/clients/ContractsClient.d.ts +2 -1
- package/dist/sdk/clients/ContractsClient.js +3 -0
- package/dist/sdk/clients/CreditsClient.d.ts +9 -0
- package/dist/sdk/clients/CreditsClient.js +22 -0
- package/dist/sdk/clients/CustomersClient.d.ts +6 -1
- package/dist/sdk/clients/CustomersClient.js +15 -0
- package/dist/sdk/clients/EventsClient.d.ts +2 -1
- package/dist/sdk/clients/EventsClient.js +3 -0
- package/dist/sdk/clients/InvoicesClient.d.ts +1 -0
- package/dist/sdk/clients/InvoicesClient.js +3 -0
- package/dist/sdk/clients/MeasurementsClient.d.ts +10 -0
- package/dist/sdk/clients/MeasurementsClient.js +25 -0
- package/dist/sdk/clients/index.d.ts +4 -0
- package/dist/sdk/clients/index.js +4 -0
- package/dist/sdk/index.d.ts +6 -1
- package/dist/sdk/index.js +13 -0
- package/dist/sdk/services/authenticated-http-library.d.ts +11 -0
- package/dist/sdk/services/authenticated-http-library.js +29 -0
- package/dist/sdk/services/authenticator.d.ts +11 -0
- package/dist/sdk/services/authenticator.js +57 -0
- package/dist/sdk/services/configuration.service.d.ts +7 -6
- package/dist/sdk/services/configuration.service.js +12 -44
- package/dist/sdk/types/CatalogProducts.d.ts +1 -0
- package/dist/sdk/types/CatalogProducts.js +2 -0
- package/dist/sdk/types/CloudUsageSubmission.d.ts +1 -0
- package/dist/sdk/types/CloudUsageSubmission.js +2 -0
- package/dist/sdk/types/Contracts.d.ts +1 -1
- package/dist/sdk/types/Credits.d.ts +1 -0
- package/dist/sdk/types/Credits.js +2 -0
- package/dist/sdk/types/Customers.d.ts +1 -1
- package/dist/sdk/types/Events.d.ts +1 -1
- package/dist/sdk/types/Invoices.d.ts +1 -1
- package/dist/sdk/types/Measurements.d.ts +1 -0
- package/dist/sdk/types/Measurements.js +2 -0
- package/dist/sdk/types/index.d.ts +4 -0
- package/dist/sdk/types/index.js +4 -0
- package/dist/sdk-v2/services/configuration.service.js +16 -8
- package/package.json +3 -4
|
@@ -4,7 +4,9 @@ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
|
4
4
|
import { CreateContractRequest } from '../models/CreateContractRequest';
|
|
5
5
|
import { CreateContractResponse } from '../models/CreateContractResponse';
|
|
6
6
|
import { DeleteContractResponse } from '../models/DeleteContractResponse';
|
|
7
|
+
import { GetContractByIntegrationIdResponse } from '../models/GetContractByIntegrationIdResponse';
|
|
7
8
|
import { GetContractResponse } from '../models/GetContractResponse';
|
|
9
|
+
import { IntegrationType } from '../models/IntegrationType';
|
|
8
10
|
import { ListContractsResponse } from '../models/ListContractsResponse';
|
|
9
11
|
/**
|
|
10
12
|
* no description
|
|
@@ -29,12 +31,20 @@ export declare class ContractsApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
29
31
|
*/
|
|
30
32
|
getContract(contractId: string, _options?: Configuration): Promise<RequestContext>;
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
+
* Use this endpoint to get a specific contract using its integration provider and identifier.
|
|
35
|
+
* Get contract by integration id
|
|
36
|
+
* @param integrationType
|
|
37
|
+
* @param integrationId
|
|
38
|
+
*/
|
|
39
|
+
getContractByIntegrationId(integrationType: IntegrationType, integrationId: string, _options?: Configuration): Promise<RequestContext>;
|
|
40
|
+
/**
|
|
41
|
+
* List contracts for the account. Optionally filter by customerId to retrieve contracts for a specific customer.
|
|
42
|
+
* List contracts
|
|
34
43
|
* @param limit
|
|
35
44
|
* @param cursor
|
|
45
|
+
* @param customerId
|
|
36
46
|
*/
|
|
37
|
-
listContracts(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
47
|
+
listContracts(limit?: number, cursor?: string, customerId?: string, _options?: Configuration): Promise<RequestContext>;
|
|
38
48
|
}
|
|
39
49
|
export declare class ContractsApiResponseProcessor {
|
|
40
50
|
/**
|
|
@@ -61,6 +71,14 @@ export declare class ContractsApiResponseProcessor {
|
|
|
61
71
|
* @throws ApiException if the response code was not in [200, 299]
|
|
62
72
|
*/
|
|
63
73
|
getContractWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetContractResponse>>;
|
|
74
|
+
/**
|
|
75
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
76
|
+
* to the expected objects
|
|
77
|
+
*
|
|
78
|
+
* @params response Response returned by the server for a request to getContractByIntegrationId
|
|
79
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
80
|
+
*/
|
|
81
|
+
getContractByIntegrationIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetContractByIntegrationIdResponse>>;
|
|
64
82
|
/**
|
|
65
83
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
66
84
|
* to the expected objects
|
|
@@ -105,12 +105,48 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
105
105
|
return requestContext;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
108
|
+
* Use this endpoint to get a specific contract using its integration provider and identifier.
|
|
109
|
+
* Get contract by integration id
|
|
110
|
+
* @param integrationType
|
|
111
|
+
* @param integrationId
|
|
112
|
+
*/
|
|
113
|
+
async getContractByIntegrationId(integrationType, integrationId, _options) {
|
|
114
|
+
let _config = _options || this.configuration;
|
|
115
|
+
// verify required parameter 'integrationType' is not null or undefined
|
|
116
|
+
if (integrationType === null || integrationType === undefined) {
|
|
117
|
+
throw new baseapi_1.RequiredError("ContractsApi", "getContractByIntegrationId", "integrationType");
|
|
118
|
+
}
|
|
119
|
+
// verify required parameter 'integrationId' is not null or undefined
|
|
120
|
+
if (integrationId === null || integrationId === undefined) {
|
|
121
|
+
throw new baseapi_1.RequiredError("ContractsApi", "getContractByIntegrationId", "integrationId");
|
|
122
|
+
}
|
|
123
|
+
// Path Params
|
|
124
|
+
const localVarPath = '/contracts/integration/{integrationType}/{integrationId}'
|
|
125
|
+
.replace('{' + 'integrationType' + '}', encodeURIComponent(String(integrationType)))
|
|
126
|
+
.replace('{' + 'integrationId' + '}', encodeURIComponent(String(integrationId)));
|
|
127
|
+
// Make Request Context
|
|
128
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
129
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
130
|
+
let authMethod;
|
|
131
|
+
// Apply auth methods
|
|
132
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
133
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
134
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
135
|
+
}
|
|
136
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
137
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
138
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
139
|
+
}
|
|
140
|
+
return requestContext;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* List contracts for the account. Optionally filter by customerId to retrieve contracts for a specific customer.
|
|
144
|
+
* List contracts
|
|
110
145
|
* @param limit
|
|
111
146
|
* @param cursor
|
|
147
|
+
* @param customerId
|
|
112
148
|
*/
|
|
113
|
-
async listContracts(limit, cursor, _options) {
|
|
149
|
+
async listContracts(limit, cursor, customerId, _options) {
|
|
114
150
|
let _config = _options || this.configuration;
|
|
115
151
|
// Path Params
|
|
116
152
|
const localVarPath = '/contracts';
|
|
@@ -125,6 +161,10 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
125
161
|
if (cursor !== undefined) {
|
|
126
162
|
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
127
163
|
}
|
|
164
|
+
// Query Params
|
|
165
|
+
if (customerId !== undefined) {
|
|
166
|
+
requestContext.setQueryParam("customerId", ObjectSerializer_1.ObjectSerializer.serialize(customerId, "string", ""));
|
|
167
|
+
}
|
|
128
168
|
let authMethod;
|
|
129
169
|
// Apply auth methods
|
|
130
170
|
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
@@ -242,6 +282,38 @@ class ContractsApiResponseProcessor {
|
|
|
242
282
|
}
|
|
243
283
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
244
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
287
|
+
* to the expected objects
|
|
288
|
+
*
|
|
289
|
+
* @params response Response returned by the server for a request to getContractByIntegrationId
|
|
290
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
291
|
+
*/
|
|
292
|
+
async getContractByIntegrationIdWithHttpInfo(response) {
|
|
293
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
294
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
295
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetContractByIntegrationIdResponse", "");
|
|
296
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
297
|
+
}
|
|
298
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
299
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
300
|
+
}
|
|
301
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
302
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
303
|
+
}
|
|
304
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
305
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
306
|
+
}
|
|
307
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
308
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
309
|
+
}
|
|
310
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
311
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
312
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetContractByIntegrationIdResponse", "");
|
|
313
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
314
|
+
}
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
316
|
+
}
|
|
245
317
|
/**
|
|
246
318
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
247
319
|
* to the expected objects
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
+
import { CreateCustomerRelationRequest } from '../models/CreateCustomerRelationRequest';
|
|
5
|
+
import { CreateCustomerRelationResponse } from '../models/CreateCustomerRelationResponse';
|
|
4
6
|
import { CreateCustomerRequest } from '../models/CreateCustomerRequest';
|
|
5
7
|
import { CreateCustomerResponse } from '../models/CreateCustomerResponse';
|
|
6
8
|
import { DeleteCustomerResponse } from '../models/DeleteCustomerResponse';
|
|
9
|
+
import { GetCustomerByIntegrationIdResponse } from '../models/GetCustomerByIntegrationIdResponse';
|
|
10
|
+
import { GetCustomerByNameResponse } from '../models/GetCustomerByNameResponse';
|
|
7
11
|
import { GetCustomerProductsConsumptionsByAliasResponse } from '../models/GetCustomerProductsConsumptionsByAliasResponse';
|
|
8
12
|
import { GetCustomerProductsConsumptionsResponse } from '../models/GetCustomerProductsConsumptionsResponse';
|
|
13
|
+
import { GetCustomerRelationResponse } from '../models/GetCustomerRelationResponse';
|
|
9
14
|
import { GetCustomerResponse } from '../models/GetCustomerResponse';
|
|
15
|
+
import { IntegrationType } from '../models/IntegrationType';
|
|
10
16
|
import { ListCustomersResponse } from '../models/ListCustomersResponse';
|
|
11
17
|
import { UpdateCustomerRequest } from '../models/UpdateCustomerRequest';
|
|
12
18
|
import { UpdateCustomerResponse } from '../models/UpdateCustomerResponse';
|
|
@@ -20,6 +26,12 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
20
26
|
* @param createCustomerRequest
|
|
21
27
|
*/
|
|
22
28
|
createCustomer(createCustomerRequest: CreateCustomerRequest, _options?: Configuration): Promise<RequestContext>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new Customer relation.
|
|
31
|
+
* Create Customer relation
|
|
32
|
+
* @param createCustomerRelationRequest
|
|
33
|
+
*/
|
|
34
|
+
createCustomerRelation(createCustomerRelationRequest: CreateCustomerRelationRequest, _options?: Configuration): Promise<RequestContext>;
|
|
23
35
|
/**
|
|
24
36
|
* Delete a Customer by id.
|
|
25
37
|
* Delete Customer
|
|
@@ -38,6 +50,19 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
38
50
|
* @param externalId
|
|
39
51
|
*/
|
|
40
52
|
getCustomerByExternalId(externalId: string, _options?: Configuration): Promise<RequestContext>;
|
|
53
|
+
/**
|
|
54
|
+
* Use this endpoint to get a specific customer using its integration provider and identifier.
|
|
55
|
+
* Get customer by integration id
|
|
56
|
+
* @param integrationType
|
|
57
|
+
* @param integrationId
|
|
58
|
+
*/
|
|
59
|
+
getCustomerByIntegrationId(integrationType: IntegrationType, integrationId: string, _options?: Configuration): Promise<RequestContext>;
|
|
60
|
+
/**
|
|
61
|
+
* Use this endpoint to get a specific customer using its name.
|
|
62
|
+
* Get customer by name
|
|
63
|
+
* @param name
|
|
64
|
+
*/
|
|
65
|
+
getCustomerByName(name: string, _options?: Configuration): Promise<RequestContext>;
|
|
41
66
|
/**
|
|
42
67
|
* Use this endpoint to get the products consumptions by the customer id.
|
|
43
68
|
* Get products consumptions by customer id
|
|
@@ -50,6 +75,12 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
50
75
|
* @param alias
|
|
51
76
|
*/
|
|
52
77
|
getCustomerProductsConsumptionsByAlias(alias: string, _options?: Configuration): Promise<RequestContext>;
|
|
78
|
+
/**
|
|
79
|
+
* Get a Customer relation by id.
|
|
80
|
+
* Get Customer relation
|
|
81
|
+
* @param customerRelationId
|
|
82
|
+
*/
|
|
83
|
+
getCustomerRelation(customerRelationId: string, _options?: Configuration): Promise<RequestContext>;
|
|
53
84
|
/**
|
|
54
85
|
* Get a list of Customers.
|
|
55
86
|
* List Customers
|
|
@@ -74,6 +105,14 @@ export declare class CustomersApiResponseProcessor {
|
|
|
74
105
|
* @throws ApiException if the response code was not in [200, 299]
|
|
75
106
|
*/
|
|
76
107
|
createCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomerResponse>>;
|
|
108
|
+
/**
|
|
109
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
110
|
+
* to the expected objects
|
|
111
|
+
*
|
|
112
|
+
* @params response Response returned by the server for a request to createCustomerRelation
|
|
113
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
114
|
+
*/
|
|
115
|
+
createCustomerRelationWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomerRelationResponse>>;
|
|
77
116
|
/**
|
|
78
117
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
79
118
|
* to the expected objects
|
|
@@ -98,6 +137,22 @@ export declare class CustomersApiResponseProcessor {
|
|
|
98
137
|
* @throws ApiException if the response code was not in [200, 299]
|
|
99
138
|
*/
|
|
100
139
|
getCustomerByExternalIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
142
|
+
* to the expected objects
|
|
143
|
+
*
|
|
144
|
+
* @params response Response returned by the server for a request to getCustomerByIntegrationId
|
|
145
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
146
|
+
*/
|
|
147
|
+
getCustomerByIntegrationIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerByIntegrationIdResponse>>;
|
|
148
|
+
/**
|
|
149
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
150
|
+
* to the expected objects
|
|
151
|
+
*
|
|
152
|
+
* @params response Response returned by the server for a request to getCustomerByName
|
|
153
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
154
|
+
*/
|
|
155
|
+
getCustomerByNameWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerByNameResponse>>;
|
|
101
156
|
/**
|
|
102
157
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
103
158
|
* to the expected objects
|
|
@@ -114,6 +169,14 @@ export declare class CustomersApiResponseProcessor {
|
|
|
114
169
|
* @throws ApiException if the response code was not in [200, 299]
|
|
115
170
|
*/
|
|
116
171
|
getCustomerProductsConsumptionsByAliasWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerProductsConsumptionsByAliasResponse>>;
|
|
172
|
+
/**
|
|
173
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
174
|
+
* to the expected objects
|
|
175
|
+
*
|
|
176
|
+
* @params response Response returned by the server for a request to getCustomerRelation
|
|
177
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
178
|
+
*/
|
|
179
|
+
getCustomerRelationWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerRelationResponse>>;
|
|
117
180
|
/**
|
|
118
181
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
119
182
|
* to the expected objects
|
|
@@ -46,6 +46,41 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
46
46
|
}
|
|
47
47
|
return requestContext;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new Customer relation.
|
|
51
|
+
* Create Customer relation
|
|
52
|
+
* @param createCustomerRelationRequest
|
|
53
|
+
*/
|
|
54
|
+
async createCustomerRelation(createCustomerRelationRequest, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'createCustomerRelationRequest' is not null or undefined
|
|
57
|
+
if (createCustomerRelationRequest === null || createCustomerRelationRequest === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("CustomersApi", "createCustomerRelation", "createCustomerRelationRequest");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/customer-relations';
|
|
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(createCustomerRelationRequest, "CreateCustomerRelationRequest", ""), 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 = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
|
+
}
|
|
82
|
+
return requestContext;
|
|
83
|
+
}
|
|
49
84
|
/**
|
|
50
85
|
* Delete a Customer by id.
|
|
51
86
|
* Delete Customer
|
|
@@ -133,6 +168,70 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
133
168
|
}
|
|
134
169
|
return requestContext;
|
|
135
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Use this endpoint to get a specific customer using its integration provider and identifier.
|
|
173
|
+
* Get customer by integration id
|
|
174
|
+
* @param integrationType
|
|
175
|
+
* @param integrationId
|
|
176
|
+
*/
|
|
177
|
+
async getCustomerByIntegrationId(integrationType, integrationId, _options) {
|
|
178
|
+
let _config = _options || this.configuration;
|
|
179
|
+
// verify required parameter 'integrationType' is not null or undefined
|
|
180
|
+
if (integrationType === null || integrationType === undefined) {
|
|
181
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByIntegrationId", "integrationType");
|
|
182
|
+
}
|
|
183
|
+
// verify required parameter 'integrationId' is not null or undefined
|
|
184
|
+
if (integrationId === null || integrationId === undefined) {
|
|
185
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByIntegrationId", "integrationId");
|
|
186
|
+
}
|
|
187
|
+
// Path Params
|
|
188
|
+
const localVarPath = '/customers/integration/{integrationType}/{integrationId}'
|
|
189
|
+
.replace('{' + 'integrationType' + '}', encodeURIComponent(String(integrationType)))
|
|
190
|
+
.replace('{' + 'integrationId' + '}', encodeURIComponent(String(integrationId)));
|
|
191
|
+
// Make Request Context
|
|
192
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
193
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
194
|
+
let authMethod;
|
|
195
|
+
// Apply auth methods
|
|
196
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
197
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
198
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
199
|
+
}
|
|
200
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
201
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
202
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
203
|
+
}
|
|
204
|
+
return requestContext;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Use this endpoint to get a specific customer using its name.
|
|
208
|
+
* Get customer by name
|
|
209
|
+
* @param name
|
|
210
|
+
*/
|
|
211
|
+
async getCustomerByName(name, _options) {
|
|
212
|
+
let _config = _options || this.configuration;
|
|
213
|
+
// verify required parameter 'name' is not null or undefined
|
|
214
|
+
if (name === null || name === undefined) {
|
|
215
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerByName", "name");
|
|
216
|
+
}
|
|
217
|
+
// Path Params
|
|
218
|
+
const localVarPath = '/customers/name/{name}'
|
|
219
|
+
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
|
220
|
+
// Make Request Context
|
|
221
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
222
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
223
|
+
let authMethod;
|
|
224
|
+
// Apply auth methods
|
|
225
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
226
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
227
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
228
|
+
}
|
|
229
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
230
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
231
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
232
|
+
}
|
|
233
|
+
return requestContext;
|
|
234
|
+
}
|
|
136
235
|
/**
|
|
137
236
|
* Use this endpoint to get the products consumptions by the customer id.
|
|
138
237
|
* Get products consumptions by customer id
|
|
@@ -191,6 +290,35 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
191
290
|
}
|
|
192
291
|
return requestContext;
|
|
193
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Get a Customer relation by id.
|
|
295
|
+
* Get Customer relation
|
|
296
|
+
* @param customerRelationId
|
|
297
|
+
*/
|
|
298
|
+
async getCustomerRelation(customerRelationId, _options) {
|
|
299
|
+
let _config = _options || this.configuration;
|
|
300
|
+
// verify required parameter 'customerRelationId' is not null or undefined
|
|
301
|
+
if (customerRelationId === null || customerRelationId === undefined) {
|
|
302
|
+
throw new baseapi_1.RequiredError("CustomersApi", "getCustomerRelation", "customerRelationId");
|
|
303
|
+
}
|
|
304
|
+
// Path Params
|
|
305
|
+
const localVarPath = '/customer-relations/{customerRelationId}'
|
|
306
|
+
.replace('{' + 'customerRelationId' + '}', encodeURIComponent(String(customerRelationId)));
|
|
307
|
+
// Make Request Context
|
|
308
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
309
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
310
|
+
let authMethod;
|
|
311
|
+
// Apply auth methods
|
|
312
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
313
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
314
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
315
|
+
}
|
|
316
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
317
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
318
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
319
|
+
}
|
|
320
|
+
return requestContext;
|
|
321
|
+
}
|
|
194
322
|
/**
|
|
195
323
|
* Get a list of Customers.
|
|
196
324
|
* List Customers
|
|
@@ -300,6 +428,38 @@ class CustomersApiResponseProcessor {
|
|
|
300
428
|
}
|
|
301
429
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
302
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
433
|
+
* to the expected objects
|
|
434
|
+
*
|
|
435
|
+
* @params response Response returned by the server for a request to createCustomerRelation
|
|
436
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
437
|
+
*/
|
|
438
|
+
async createCustomerRelationWithHttpInfo(response) {
|
|
439
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
440
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
441
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerRelationResponse", "");
|
|
442
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
443
|
+
}
|
|
444
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
445
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
446
|
+
}
|
|
447
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
448
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
449
|
+
}
|
|
450
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
451
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
452
|
+
}
|
|
453
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
454
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
455
|
+
}
|
|
456
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
457
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
458
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomerRelationResponse", "");
|
|
459
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
460
|
+
}
|
|
461
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
462
|
+
}
|
|
303
463
|
/**
|
|
304
464
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
305
465
|
* to the expected objects
|
|
@@ -389,9 +549,6 @@ class CustomersApiResponseProcessor {
|
|
|
389
549
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
390
550
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
391
551
|
}
|
|
392
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
393
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
394
|
-
}
|
|
395
552
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
396
553
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
397
554
|
}
|
|
@@ -405,6 +562,70 @@ class CustomersApiResponseProcessor {
|
|
|
405
562
|
}
|
|
406
563
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
407
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
567
|
+
* to the expected objects
|
|
568
|
+
*
|
|
569
|
+
* @params response Response returned by the server for a request to getCustomerByIntegrationId
|
|
570
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
571
|
+
*/
|
|
572
|
+
async getCustomerByIntegrationIdWithHttpInfo(response) {
|
|
573
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
574
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
575
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByIntegrationIdResponse", "");
|
|
576
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
577
|
+
}
|
|
578
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
579
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
580
|
+
}
|
|
581
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
582
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
583
|
+
}
|
|
584
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
585
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
586
|
+
}
|
|
587
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
588
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
589
|
+
}
|
|
590
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
591
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
592
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByIntegrationIdResponse", "");
|
|
593
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
594
|
+
}
|
|
595
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
599
|
+
* to the expected objects
|
|
600
|
+
*
|
|
601
|
+
* @params response Response returned by the server for a request to getCustomerByName
|
|
602
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
603
|
+
*/
|
|
604
|
+
async getCustomerByNameWithHttpInfo(response) {
|
|
605
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
606
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
607
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByNameResponse", "");
|
|
608
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
609
|
+
}
|
|
610
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
611
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
612
|
+
}
|
|
613
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
614
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
615
|
+
}
|
|
616
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
617
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
618
|
+
}
|
|
619
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
620
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
621
|
+
}
|
|
622
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
623
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
624
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerByNameResponse", "");
|
|
625
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
626
|
+
}
|
|
627
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
628
|
+
}
|
|
408
629
|
/**
|
|
409
630
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
410
631
|
* to the expected objects
|
|
@@ -424,9 +645,6 @@ class CustomersApiResponseProcessor {
|
|
|
424
645
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
425
646
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
426
647
|
}
|
|
427
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
428
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
429
|
-
}
|
|
430
648
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
431
649
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
432
650
|
}
|
|
@@ -459,6 +677,38 @@ class CustomersApiResponseProcessor {
|
|
|
459
677
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
460
678
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
461
679
|
}
|
|
680
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
681
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
682
|
+
}
|
|
683
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
684
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
685
|
+
}
|
|
686
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
687
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
688
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerProductsConsumptionsByAliasResponse", "");
|
|
689
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
690
|
+
}
|
|
691
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
695
|
+
* to the expected objects
|
|
696
|
+
*
|
|
697
|
+
* @params response Response returned by the server for a request to getCustomerRelation
|
|
698
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
699
|
+
*/
|
|
700
|
+
async getCustomerRelationWithHttpInfo(response) {
|
|
701
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
702
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
703
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerRelationResponse", "");
|
|
704
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
705
|
+
}
|
|
706
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
707
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
708
|
+
}
|
|
709
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
710
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
711
|
+
}
|
|
462
712
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
463
713
|
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
464
714
|
}
|
|
@@ -470,7 +720,7 @@ class CustomersApiResponseProcessor {
|
|
|
470
720
|
}
|
|
471
721
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
472
722
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
473
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "
|
|
723
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomerRelationResponse", "");
|
|
474
724
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
475
725
|
}
|
|
476
726
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
@@ -2,6 +2,8 @@ import { BaseAPIRequestFactory } from './baseapi';
|
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
4
|
import { DeleteEventResponse } from '../models/DeleteEventResponse';
|
|
5
|
+
import { DeleteEventsByRefsRequest } from '../models/DeleteEventsByRefsRequest';
|
|
6
|
+
import { DeleteEventsByRefsResponse } from '../models/DeleteEventsByRefsResponse';
|
|
5
7
|
import { EventsDryRunRequest } from '../models/EventsDryRunRequest';
|
|
6
8
|
import { EventsDryRunResponse } from '../models/EventsDryRunResponse';
|
|
7
9
|
import { GetEventResponse } from '../models/GetEventResponse';
|
|
@@ -18,6 +20,12 @@ export declare class EventsApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
18
20
|
* @param refId
|
|
19
21
|
*/
|
|
20
22
|
deleteEventByRefId(refId: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
+
/**
|
|
24
|
+
* Delete multiple events, identified by ref, in a single request.
|
|
25
|
+
* Delete events by refs
|
|
26
|
+
* @param deleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
|
|
27
|
+
*/
|
|
28
|
+
deleteEventsByRefs(deleteEventsByRefsRequest: DeleteEventsByRefsRequest, _options?: Configuration): Promise<RequestContext>;
|
|
21
29
|
/**
|
|
22
30
|
* Use this endpoint to get a specific event using its reference ID.
|
|
23
31
|
* Get event by refId
|
|
@@ -56,6 +64,14 @@ export declare class EventsApiResponseProcessor {
|
|
|
56
64
|
* @throws ApiException if the response code was not in [200, 299]
|
|
57
65
|
*/
|
|
58
66
|
deleteEventByRefIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeleteEventResponse>>;
|
|
67
|
+
/**
|
|
68
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
69
|
+
* to the expected objects
|
|
70
|
+
*
|
|
71
|
+
* @params response Response returned by the server for a request to deleteEventsByRefs
|
|
72
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
73
|
+
*/
|
|
74
|
+
deleteEventsByRefsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeleteEventsByRefsResponse>>;
|
|
59
75
|
/**
|
|
60
76
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
61
77
|
* to the expected objects
|