vayu-ts 0.2.15 → 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 +5 -1
- package/dist/sdk/clients/CustomersClient.js +12 -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
|
@@ -40,6 +40,41 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
}
|
|
41
41
|
return requestContext;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Delete multiple events, identified by ref, in a single request.
|
|
45
|
+
* Delete events by refs
|
|
46
|
+
* @param deleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
|
|
47
|
+
*/
|
|
48
|
+
async deleteEventsByRefs(deleteEventsByRefsRequest, _options) {
|
|
49
|
+
let _config = _options || this.configuration;
|
|
50
|
+
// verify required parameter 'deleteEventsByRefsRequest' is not null or undefined
|
|
51
|
+
if (deleteEventsByRefsRequest === null || deleteEventsByRefsRequest === undefined) {
|
|
52
|
+
throw new baseapi_1.RequiredError("EventsApi", "deleteEventsByRefs", "deleteEventsByRefsRequest");
|
|
53
|
+
}
|
|
54
|
+
// Path Params
|
|
55
|
+
const localVarPath = '/events/delete-by-refs';
|
|
56
|
+
// Make Request Context
|
|
57
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
58
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
59
|
+
// Body Params
|
|
60
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
61
|
+
"application/json"
|
|
62
|
+
]);
|
|
63
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
64
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(deleteEventsByRefsRequest, "DeleteEventsByRefsRequest", ""), contentType);
|
|
65
|
+
requestContext.setBody(serializedBody);
|
|
66
|
+
let authMethod;
|
|
67
|
+
// Apply auth methods
|
|
68
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
69
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
70
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
71
|
+
}
|
|
72
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
73
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
74
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
75
|
+
}
|
|
76
|
+
return requestContext;
|
|
77
|
+
}
|
|
43
78
|
/**
|
|
44
79
|
* Use this endpoint to get a specific event using its reference ID.
|
|
45
80
|
* Get event by refId
|
|
@@ -217,9 +252,6 @@ class EventsApiResponseProcessor {
|
|
|
217
252
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
218
253
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
219
254
|
}
|
|
220
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
221
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
222
|
-
}
|
|
223
255
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
224
256
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
225
257
|
}
|
|
@@ -233,6 +265,38 @@ class EventsApiResponseProcessor {
|
|
|
233
265
|
}
|
|
234
266
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
235
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
270
|
+
* to the expected objects
|
|
271
|
+
*
|
|
272
|
+
* @params response Response returned by the server for a request to deleteEventsByRefs
|
|
273
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
274
|
+
*/
|
|
275
|
+
async deleteEventsByRefsWithHttpInfo(response) {
|
|
276
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
277
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
278
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteEventsByRefsResponse", "");
|
|
279
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
280
|
+
}
|
|
281
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
282
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
283
|
+
}
|
|
284
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
285
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
286
|
+
}
|
|
287
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
288
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
289
|
+
}
|
|
290
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
291
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
292
|
+
}
|
|
293
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
294
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
295
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteEventsByRefsResponse", "");
|
|
296
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
297
|
+
}
|
|
298
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
299
|
+
}
|
|
236
300
|
/**
|
|
237
301
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
238
302
|
* to the expected objects
|
|
@@ -252,9 +316,6 @@ class EventsApiResponseProcessor {
|
|
|
252
316
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
253
317
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
254
318
|
}
|
|
255
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
256
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
257
|
-
}
|
|
258
319
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
259
320
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
260
321
|
}
|
|
@@ -319,9 +380,6 @@ class EventsApiResponseProcessor {
|
|
|
319
380
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
320
381
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
321
382
|
}
|
|
322
|
-
if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
|
|
323
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
|
|
324
|
-
}
|
|
325
383
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
326
384
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
327
385
|
}
|
|
@@ -354,9 +412,6 @@ class EventsApiResponseProcessor {
|
|
|
354
412
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
355
413
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
356
414
|
}
|
|
357
|
-
if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
|
|
358
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
|
|
359
|
-
}
|
|
360
415
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
361
416
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
362
417
|
}
|
|
@@ -2,6 +2,7 @@ import { BaseAPIRequestFactory } from './baseapi';
|
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
4
|
import { GetInvoiceResponse } from '../models/GetInvoiceResponse';
|
|
5
|
+
import { InvoicePaymentStatusResponse } from '../models/InvoicePaymentStatusResponse';
|
|
5
6
|
import { ListInvoicesResponse } from '../models/ListInvoicesResponse';
|
|
6
7
|
/**
|
|
7
8
|
* no description
|
|
@@ -14,12 +15,19 @@ export declare class InvoicesApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
14
15
|
*/
|
|
15
16
|
getInvoice(invoiceId: string, _options?: Configuration): Promise<RequestContext>;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
18
|
+
* Use this endpoint to retrieve payment status information for a specific invoice, including payment status, amount due, amount paid, total, due date, paid date, and invoice PDF URL.
|
|
19
|
+
* Get invoice payment status
|
|
20
|
+
* @param invoiceId
|
|
21
|
+
*/
|
|
22
|
+
getInvoicePaymentStatus(invoiceId: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
+
/**
|
|
24
|
+
* List invoices for the account. Optionally filter by customerId to retrieve invoices for a specific customer.
|
|
25
|
+
* List invoices
|
|
19
26
|
* @param limit
|
|
20
27
|
* @param cursor
|
|
28
|
+
* @param customerId
|
|
21
29
|
*/
|
|
22
|
-
listInvoices(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
30
|
+
listInvoices(limit?: number, cursor?: string, customerId?: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
31
|
}
|
|
24
32
|
export declare class InvoicesApiResponseProcessor {
|
|
25
33
|
/**
|
|
@@ -30,6 +38,14 @@ export declare class InvoicesApiResponseProcessor {
|
|
|
30
38
|
* @throws ApiException if the response code was not in [200, 299]
|
|
31
39
|
*/
|
|
32
40
|
getInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetInvoiceResponse>>;
|
|
41
|
+
/**
|
|
42
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
43
|
+
* to the expected objects
|
|
44
|
+
*
|
|
45
|
+
* @params response Response returned by the server for a request to getInvoicePaymentStatus
|
|
46
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
47
|
+
*/
|
|
48
|
+
getInvoicePaymentStatusWithHttpInfo(response: ResponseContext): Promise<HttpInfo<InvoicePaymentStatusResponse>>;
|
|
33
49
|
/**
|
|
34
50
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
35
51
|
* to the expected objects
|
|
@@ -41,12 +41,42 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
41
41
|
return requestContext;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* Use this endpoint to retrieve payment status information for a specific invoice, including payment status, amount due, amount paid, total, due date, paid date, and invoice PDF URL.
|
|
45
|
+
* Get invoice payment status
|
|
46
|
+
* @param invoiceId
|
|
47
|
+
*/
|
|
48
|
+
async getInvoicePaymentStatus(invoiceId, _options) {
|
|
49
|
+
let _config = _options || this.configuration;
|
|
50
|
+
// verify required parameter 'invoiceId' is not null or undefined
|
|
51
|
+
if (invoiceId === null || invoiceId === undefined) {
|
|
52
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "getInvoicePaymentStatus", "invoiceId");
|
|
53
|
+
}
|
|
54
|
+
// Path Params
|
|
55
|
+
const localVarPath = '/invoices/{invoiceId}/payment-status'
|
|
56
|
+
.replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId)));
|
|
57
|
+
// Make Request Context
|
|
58
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
59
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
60
|
+
let authMethod;
|
|
61
|
+
// Apply auth methods
|
|
62
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
63
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
64
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
65
|
+
}
|
|
66
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
67
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
68
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
69
|
+
}
|
|
70
|
+
return requestContext;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* List invoices for the account. Optionally filter by customerId to retrieve invoices for a specific customer.
|
|
74
|
+
* List invoices
|
|
46
75
|
* @param limit
|
|
47
76
|
* @param cursor
|
|
77
|
+
* @param customerId
|
|
48
78
|
*/
|
|
49
|
-
async listInvoices(limit, cursor, _options) {
|
|
79
|
+
async listInvoices(limit, cursor, customerId, _options) {
|
|
50
80
|
let _config = _options || this.configuration;
|
|
51
81
|
// Path Params
|
|
52
82
|
const localVarPath = '/invoices';
|
|
@@ -61,6 +91,10 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
61
91
|
if (cursor !== undefined) {
|
|
62
92
|
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
63
93
|
}
|
|
94
|
+
// Query Params
|
|
95
|
+
if (customerId !== undefined) {
|
|
96
|
+
requestContext.setQueryParam("customerId", ObjectSerializer_1.ObjectSerializer.serialize(customerId, "string", ""));
|
|
97
|
+
}
|
|
64
98
|
let authMethod;
|
|
65
99
|
// Apply auth methods
|
|
66
100
|
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
@@ -111,6 +145,38 @@ class InvoicesApiResponseProcessor {
|
|
|
111
145
|
}
|
|
112
146
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
113
147
|
}
|
|
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 getInvoicePaymentStatus
|
|
153
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
154
|
+
*/
|
|
155
|
+
async getInvoicePaymentStatusWithHttpInfo(response) {
|
|
156
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
157
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
158
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InvoicePaymentStatusResponse", "");
|
|
159
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
160
|
+
}
|
|
161
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
162
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
163
|
+
}
|
|
164
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
165
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
166
|
+
}
|
|
167
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
168
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
169
|
+
}
|
|
170
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
171
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
172
|
+
}
|
|
173
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
174
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
175
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InvoicePaymentStatusResponse", "");
|
|
176
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
177
|
+
}
|
|
178
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
179
|
+
}
|
|
114
180
|
/**
|
|
115
181
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
116
182
|
* to the expected objects
|
|
@@ -62,9 +62,6 @@ class ProductConsumptionsApiResponseProcessor {
|
|
|
62
62
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
63
63
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
64
64
|
}
|
|
65
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
66
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
67
|
-
}
|
|
68
65
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
69
66
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
70
67
|
}
|
|
@@ -67,9 +67,6 @@ class WebhooksApiResponseProcessor {
|
|
|
67
67
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
68
68
|
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
69
69
|
}
|
|
70
|
-
if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
|
|
71
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
|
|
72
|
-
}
|
|
73
70
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
74
71
|
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
75
72
|
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
import * as FormData from "form-data";
|
|
6
|
-
import { URLSearchParams } from 'url';
|
|
7
|
-
import * as http from 'http';
|
|
8
|
-
import * as https from 'https';
|
|
9
1
|
import { Observable } from '../rxjsStub';
|
|
10
2
|
export * from './isomorphic-fetch';
|
|
11
3
|
/**
|
|
@@ -25,9 +17,8 @@ export declare enum HttpMethod {
|
|
|
25
17
|
/**
|
|
26
18
|
* Represents an HTTP file which will be transferred from or to a server.
|
|
27
19
|
*/
|
|
28
|
-
export type HttpFile = {
|
|
29
|
-
|
|
30
|
-
name: string;
|
|
20
|
+
export type HttpFile = Blob & {
|
|
21
|
+
readonly name: string;
|
|
31
22
|
};
|
|
32
23
|
export declare class HttpException extends Error {
|
|
33
24
|
constructor(msg: string);
|
|
@@ -45,7 +36,6 @@ export declare class RequestContext {
|
|
|
45
36
|
private headers;
|
|
46
37
|
private body;
|
|
47
38
|
private url;
|
|
48
|
-
private agent;
|
|
49
39
|
/**
|
|
50
40
|
* Creates the request context using a http method and request resource url
|
|
51
41
|
*
|
|
@@ -80,20 +70,18 @@ export declare class RequestContext {
|
|
|
80
70
|
*/
|
|
81
71
|
addCookie(name: string, value: string): void;
|
|
82
72
|
setHeaderParam(key: string, value: string): void;
|
|
83
|
-
setAgent(agent: http.Agent | https.Agent): void;
|
|
84
|
-
getAgent(): http.Agent | https.Agent | undefined;
|
|
85
73
|
}
|
|
86
74
|
export interface ResponseBody {
|
|
87
75
|
text(): Promise<string>;
|
|
88
|
-
binary(): Promise<
|
|
76
|
+
binary(): Promise<Blob>;
|
|
89
77
|
}
|
|
90
78
|
/**
|
|
91
79
|
* Helper class to generate a `ResponseBody` from binary data
|
|
92
80
|
*/
|
|
93
81
|
export declare class SelfDecodingBody implements ResponseBody {
|
|
94
82
|
private dataSource;
|
|
95
|
-
constructor(dataSource: Promise<
|
|
96
|
-
binary(): Promise<
|
|
83
|
+
constructor(dataSource: Promise<Blob>);
|
|
84
|
+
binary(): Promise<Blob>;
|
|
97
85
|
text(): Promise<string>;
|
|
98
86
|
}
|
|
99
87
|
export declare class ResponseContext {
|
|
@@ -114,7 +102,7 @@ export declare class ResponseContext {
|
|
|
114
102
|
* Use a heuristic to get a body of unknown data structure.
|
|
115
103
|
* Return as string if possible, otherwise as binary.
|
|
116
104
|
*/
|
|
117
|
-
getBodyAsAny(): Promise<string |
|
|
105
|
+
getBodyAsAny(): Promise<string | Blob | undefined>;
|
|
118
106
|
}
|
|
119
107
|
export interface HttpLibrary {
|
|
120
108
|
send(request: RequestContext): Observable<ResponseContext>;
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.HttpInfo = exports.wrapHttpLibrary = exports.ResponseContext = exports.SelfDecodingBody = exports.RequestContext = exports.HttpException = exports.HttpMethod = void 0;
|
|
18
|
-
const url_1 = require("url");
|
|
19
18
|
const rxjsStub_1 = require("../rxjsStub");
|
|
20
19
|
__exportStar(require("./isomorphic-fetch"), exports);
|
|
21
20
|
/**
|
|
@@ -43,7 +42,7 @@ function ensureAbsoluteUrl(url) {
|
|
|
43
42
|
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
44
43
|
return url;
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
return window.location.origin + url;
|
|
47
46
|
}
|
|
48
47
|
/**
|
|
49
48
|
* Represents an HTTP request context
|
|
@@ -59,8 +58,7 @@ class RequestContext {
|
|
|
59
58
|
this.httpMethod = httpMethod;
|
|
60
59
|
this.headers = {};
|
|
61
60
|
this.body = undefined;
|
|
62
|
-
this.
|
|
63
|
-
this.url = new url_1.URL(ensureAbsoluteUrl(url));
|
|
61
|
+
this.url = new URL(ensureAbsoluteUrl(url));
|
|
64
62
|
}
|
|
65
63
|
/*
|
|
66
64
|
* Returns the url set in the constructor including the query string
|
|
@@ -76,7 +74,7 @@ class RequestContext {
|
|
|
76
74
|
*
|
|
77
75
|
*/
|
|
78
76
|
setUrl(url) {
|
|
79
|
-
this.url = new
|
|
77
|
+
this.url = new URL(ensureAbsoluteUrl(url));
|
|
80
78
|
}
|
|
81
79
|
/**
|
|
82
80
|
* Sets the body of the http request either as a string or FormData
|
|
@@ -118,12 +116,6 @@ class RequestContext {
|
|
|
118
116
|
setHeaderParam(key, value) {
|
|
119
117
|
this.headers[key] = value;
|
|
120
118
|
}
|
|
121
|
-
setAgent(agent) {
|
|
122
|
-
this.agent = agent;
|
|
123
|
-
}
|
|
124
|
-
getAgent() {
|
|
125
|
-
return this.agent;
|
|
126
|
-
}
|
|
127
119
|
}
|
|
128
120
|
exports.RequestContext = RequestContext;
|
|
129
121
|
/**
|
|
@@ -138,7 +130,17 @@ class SelfDecodingBody {
|
|
|
138
130
|
}
|
|
139
131
|
async text() {
|
|
140
132
|
const data = await this.dataSource;
|
|
141
|
-
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
if (data.text) {
|
|
135
|
+
// @ts-ignore
|
|
136
|
+
return data.text();
|
|
137
|
+
}
|
|
138
|
+
return new Promise((resolve, reject) => {
|
|
139
|
+
const reader = new FileReader();
|
|
140
|
+
reader.addEventListener("load", () => resolve(reader.result));
|
|
141
|
+
reader.addEventListener("error", () => reject(reader.error));
|
|
142
|
+
reader.readAsText(data);
|
|
143
|
+
});
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
exports.SelfDecodingBody = SelfDecodingBody;
|
|
@@ -183,7 +185,17 @@ class ResponseContext {
|
|
|
183
185
|
async getBodyAsFile() {
|
|
184
186
|
const data = await this.body.binary();
|
|
185
187
|
const fileName = this.getParsedHeader("content-disposition")["filename"] || "";
|
|
186
|
-
|
|
188
|
+
const contentType = this.headers["content-type"] || "";
|
|
189
|
+
try {
|
|
190
|
+
return new File([data], fileName, { type: contentType });
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
/** Fallback for when the File constructor is not available */
|
|
194
|
+
return Object.assign(data, {
|
|
195
|
+
name: fileName,
|
|
196
|
+
type: contentType
|
|
197
|
+
});
|
|
198
|
+
}
|
|
187
199
|
}
|
|
188
200
|
/**
|
|
189
201
|
* Use a heuristic to get a body of unknown data structure.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpLibrary, RequestContext, ResponseContext } from './http';
|
|
2
2
|
import { Observable } from '../rxjsStub';
|
|
3
|
+
import "whatwg-fetch";
|
|
3
4
|
export declare class IsomorphicFetchHttpLibrary implements HttpLibrary {
|
|
4
5
|
send(request: RequestContext): Observable<ResponseContext>;
|
|
5
6
|
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.IsomorphicFetchHttpLibrary = void 0;
|
|
7
4
|
const http_1 = require("./http");
|
|
8
5
|
const rxjsStub_1 = require("../rxjsStub");
|
|
9
|
-
|
|
6
|
+
require("whatwg-fetch");
|
|
10
7
|
class IsomorphicFetchHttpLibrary {
|
|
11
8
|
send(request) {
|
|
12
9
|
let method = request.getHttpMethod().toString();
|
|
13
10
|
let body = request.getBody();
|
|
14
|
-
const resultPromise = (
|
|
11
|
+
const resultPromise = fetch(request.getUrl(), {
|
|
15
12
|
method: method,
|
|
16
13
|
body: body,
|
|
17
14
|
headers: request.getHeaders(),
|
|
18
|
-
|
|
15
|
+
credentials: "same-origin"
|
|
19
16
|
}).then((resp) => {
|
|
20
17
|
const headers = {};
|
|
21
18
|
resp.headers.forEach((value, name) => {
|
|
@@ -23,7 +20,7 @@ class IsomorphicFetchHttpLibrary {
|
|
|
23
20
|
});
|
|
24
21
|
const body = {
|
|
25
22
|
text: () => resp.text(),
|
|
26
|
-
binary: () => resp.
|
|
23
|
+
binary: () => resp.blob()
|
|
27
24
|
};
|
|
28
25
|
return new http_1.ResponseContext(resp.status, headers, body);
|
|
29
26
|
});
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export * from "./apis/exception";
|
|
|
7
7
|
export * from "./servers";
|
|
8
8
|
export { RequiredError } from "./apis/baseapi";
|
|
9
9
|
export type { PromiseMiddleware as Middleware } from './middleware';
|
|
10
|
-
export { PromiseAuthApi as AuthApi, PromiseContractsApi as ContractsApi, PromiseCreditsApi as CreditsApi, PromiseCustomersApi as CustomersApi, PromiseEventsApi as EventsApi, PromiseInvoicesApi as InvoicesApi, PromiseMeasurementsApi as MeasurementsApi, PromiseMetersApi as MetersApi, PromiseProductConsumptionsApi as ProductConsumptionsApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI';
|
|
10
|
+
export { PromiseAuthApi as AuthApi, PromiseCatalogProductsApi as CatalogProductsApi, PromiseCloudUsageSubmissionApi as CloudUsageSubmissionApi, PromiseContractsApi as ContractsApi, PromiseCreditsApi as CreditsApi, PromiseCustomersApi as CustomersApi, PromiseEventsApi as EventsApi, PromiseInvoicesApi as InvoicesApi, PromiseMeasurementsApi as MeasurementsApi, PromiseMetersApi as MetersApi, PromiseProductConsumptionsApi as ProductConsumptionsApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI';
|
package/dist/openapi/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WebhooksApi = exports.ProductConsumptionsApi = exports.MetersApi = exports.MeasurementsApi = exports.InvoicesApi = exports.EventsApi = exports.CustomersApi = exports.CreditsApi = exports.ContractsApi = exports.AuthApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
17
|
+
exports.WebhooksApi = exports.ProductConsumptionsApi = exports.MetersApi = exports.MeasurementsApi = exports.InvoicesApi = exports.EventsApi = exports.CustomersApi = exports.CreditsApi = exports.ContractsApi = exports.CloudUsageSubmissionApi = exports.CatalogProductsApi = exports.AuthApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
18
18
|
__exportStar(require("./http/http"), exports);
|
|
19
19
|
__exportStar(require("./auth/auth"), exports);
|
|
20
20
|
__exportStar(require("./models/all"), exports);
|
|
@@ -26,6 +26,8 @@ var baseapi_1 = require("./apis/baseapi");
|
|
|
26
26
|
Object.defineProperty(exports, "RequiredError", { enumerable: true, get: function () { return baseapi_1.RequiredError; } });
|
|
27
27
|
var PromiseAPI_1 = require("./types/PromiseAPI");
|
|
28
28
|
Object.defineProperty(exports, "AuthApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseAuthApi; } });
|
|
29
|
+
Object.defineProperty(exports, "CatalogProductsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCatalogProductsApi; } });
|
|
30
|
+
Object.defineProperty(exports, "CloudUsageSubmissionApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCloudUsageSubmissionApi; } });
|
|
29
31
|
Object.defineProperty(exports, "ContractsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseContractsApi; } });
|
|
30
32
|
Object.defineProperty(exports, "CreditsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCreditsApi; } });
|
|
31
33
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCustomersApi; } });
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* The address of the customer
|
|
14
14
|
*/
|
|
15
15
|
export declare class Address {
|
|
16
|
-
'country'?: string;
|
|
17
|
-
'city'?: string;
|
|
18
|
-
'addressText'?: string;
|
|
19
|
-
'state'?: string;
|
|
20
|
-
'postalCode'?: string;
|
|
16
|
+
'country'?: string | null;
|
|
17
|
+
'city'?: string | null;
|
|
18
|
+
'addressText'?: string | null;
|
|
19
|
+
'state'?: string | null;
|
|
20
|
+
'postalCode'?: string | null;
|
|
21
21
|
static readonly discriminator: string | undefined;
|
|
22
22
|
static readonly mapping: {
|
|
23
23
|
[index: string]: string;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vayu API
|
|
3
|
+
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
* Contact: dev@withvayu.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { PartnerSubmissionDetail } from '../models/PartnerSubmissionDetail';
|
|
13
|
+
import { UsageWindow } from '../models/UsageWindow';
|
|
14
|
+
export declare class CloudUsageResult {
|
|
15
|
+
/**
|
|
16
|
+
* The status of the cloud usage submission result
|
|
17
|
+
*/
|
|
18
|
+
'status': CloudUsageResultStatusEnum;
|
|
19
|
+
/**
|
|
20
|
+
* Error code if the submission was rejected
|
|
21
|
+
*/
|
|
22
|
+
'errorCode'?: string;
|
|
23
|
+
'usageWindow': UsageWindow;
|
|
24
|
+
/**
|
|
25
|
+
* Detailed error message if the submission was rejected
|
|
26
|
+
*/
|
|
27
|
+
'errorMessage'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Unique identifier for tracing the submission through the system
|
|
30
|
+
*/
|
|
31
|
+
'correlationId': string;
|
|
32
|
+
/**
|
|
33
|
+
* Key used to ensure the submission is processed exactly once
|
|
34
|
+
*/
|
|
35
|
+
'idempotencyKey': string;
|
|
36
|
+
/**
|
|
37
|
+
* The dimension of the meter being reported (e.g., API_CALLS, STORAGE_GB)
|
|
38
|
+
*/
|
|
39
|
+
'meterDimension': string;
|
|
40
|
+
/**
|
|
41
|
+
* The quantity that was accepted by the cloud provider
|
|
42
|
+
*/
|
|
43
|
+
'acceptedQuantity': number;
|
|
44
|
+
/**
|
|
45
|
+
* Details of submissions to partner systems, keyed by request ID
|
|
46
|
+
*/
|
|
47
|
+
'partnerSubmission': {
|
|
48
|
+
[key: string]: PartnerSubmissionDetail;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The total quantity that was submitted
|
|
52
|
+
*/
|
|
53
|
+
'quantitySubmitted': number;
|
|
54
|
+
/**
|
|
55
|
+
* The timestamp when the usage was submitted
|
|
56
|
+
*/
|
|
57
|
+
'timestampSubmitted': Date;
|
|
58
|
+
/**
|
|
59
|
+
* The AWS customer identifier associated with this usage
|
|
60
|
+
*/
|
|
61
|
+
'awsCustomerIdentifier': string;
|
|
62
|
+
static readonly discriminator: string | undefined;
|
|
63
|
+
static readonly mapping: {
|
|
64
|
+
[index: string]: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
static readonly attributeTypeMap: Array<{
|
|
67
|
+
name: string;
|
|
68
|
+
baseName: string;
|
|
69
|
+
type: string;
|
|
70
|
+
format: string;
|
|
71
|
+
}>;
|
|
72
|
+
static getAttributeTypeMap(): {
|
|
73
|
+
name: string;
|
|
74
|
+
baseName: string;
|
|
75
|
+
type: string;
|
|
76
|
+
format: string;
|
|
77
|
+
}[];
|
|
78
|
+
constructor();
|
|
79
|
+
}
|
|
80
|
+
export declare enum CloudUsageResultStatusEnum {
|
|
81
|
+
Accepted = "ACCEPTED",
|
|
82
|
+
Rejected = "REJECTED"
|
|
83
|
+
}
|