vayu-ts 0.3.4 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi/apis/AuthApi.js +8 -4
- package/dist/openapi/apis/CatalogProductsApi.js +46 -23
- package/dist/openapi/apis/CloudUsageSubmissionApi.js +8 -4
- package/dist/openapi/apis/ContractsApi.js +48 -22
- package/dist/openapi/apis/CreditsApi.js +24 -12
- package/dist/openapi/apis/CustomFieldsApi.d.ts +89 -0
- package/dist/openapi/apis/CustomFieldsApi.js +377 -0
- package/dist/openapi/apis/CustomersApi.js +124 -52
- package/dist/openapi/apis/EventsApi.d.ts +116 -1
- package/dist/openapi/apis/EventsApi.js +605 -25
- package/dist/openapi/apis/InvoicesApi.d.ts +4 -1
- package/dist/openapi/apis/InvoicesApi.js +42 -14
- package/dist/openapi/apis/MeasurementsApi.js +36 -18
- package/dist/openapi/apis/MetersApi.js +38 -19
- package/dist/openapi/apis/PlansApi.d.ts +56 -0
- package/dist/openapi/apis/PlansApi.js +225 -0
- package/dist/openapi/apis/ProductConsumptionsApi.js +12 -4
- package/dist/openapi/apis/WebhooksApi.js +12 -4
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +3 -1
- package/dist/openapi/models/BillingInterval.d.ts +18 -0
- package/dist/openapi/models/BillingInterval.js +22 -0
- package/dist/openapi/models/ConflictErrorResponse.d.ts +42 -0
- package/dist/openapi/models/ConflictErrorResponse.js +52 -0
- package/dist/openapi/models/Contact.js +1 -1
- package/dist/openapi/models/CreateContractRequest.d.ts +14 -0
- package/dist/openapi/models/CreateContractRequest.js +24 -0
- package/dist/openapi/models/CreateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/CreateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/CreateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.d.ts +74 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.js +108 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerRequest.js +30 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/CustomFieldEntities.d.ts +20 -0
- package/dist/openapi/models/CustomFieldEntities.js +24 -0
- package/dist/openapi/models/CustomFieldValueTypes.d.ts +2 -1
- package/dist/openapi/models/CustomFieldValueTypes.js +1 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/DeleteContractResponseContract.js +12 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.js +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.d.ts +75 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.js +114 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/DeletePlanResponse.d.ts +32 -0
- package/dist/openapi/models/DeletePlanResponse.js +32 -0
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +42 -0
- package/dist/openapi/models/DeletePlanResponsePlan.js +68 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +1 -1
- package/dist/openapi/models/GetContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/GetContractResponseContract.js +12 -0
- package/dist/openapi/models/GetCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomFieldResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +30 -0
- package/dist/openapi/models/GetPlanResponse.d.ts +32 -0
- package/dist/openapi/models/GetPlanResponse.js +32 -0
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +41 -0
- package/dist/openapi/models/GetPlanResponsePlan.js +62 -0
- package/dist/openapi/models/InternalServerErrorResponse.d.ts +42 -0
- package/dist/openapi/models/InternalServerErrorResponse.js +52 -0
- package/dist/openapi/models/ListCustomFieldsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCustomFieldsResponse.js +50 -0
- package/dist/openapi/models/ListPlansResponse.d.ts +35 -0
- package/dist/openapi/models/ListPlansResponse.js +50 -0
- package/dist/openapi/models/NotFoundErrorResponse.d.ts +42 -0
- package/dist/openapi/models/NotFoundErrorResponse.js +52 -0
- package/dist/openapi/models/NotificationEventType.d.ts +5 -1
- package/dist/openapi/models/NotificationEventType.js +4 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +51 -0
- package/dist/openapi/models/ObjectSerializer.js +176 -0
- package/dist/openapi/models/PlanBillingData.d.ts +41 -0
- package/dist/openapi/models/PlanBillingData.js +59 -0
- package/dist/openapi/models/PlanDuration.d.ts +30 -0
- package/dist/openapi/models/PlanDuration.js +25 -0
- package/dist/openapi/models/PlanStatus.d.ts +19 -0
- package/dist/openapi/models/PlanStatus.js +23 -0
- package/dist/openapi/models/ProductGroupCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +4 -4
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +2 -2
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +3 -1
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +12 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.d.ts +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.js +58 -0
- package/dist/openapi/models/QueryEventsResponse.d.ts +3 -3
- package/dist/openapi/models/QueryEventsResponse.js +18 -0
- package/dist/openapi/models/RateLimitErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RateLimitErrorResponse.js +52 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.js +52 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.d.ts +42 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.js +52 -0
- package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
- package/dist/openapi/models/UnlimitedDuration.js +18 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/UpdateCustomerRequest.js +30 -0
- package/dist/openapi/models/V2DeleteEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2DeleteEventResponse.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.js +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.js +32 -0
- package/dist/openapi/models/V2GetEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2GetEventResponse.js +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.d.ts +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.js +70 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.d.ts +39 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.js +62 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.js +44 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.d.ts +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.js +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.d.ts +43 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.js +54 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.d.ts +30 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.js +25 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.d.ts +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.d.ts +42 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.js +52 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.js +38 -0
- package/dist/openapi/models/V2QueryEventsResponse.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsResponse.js +50 -0
- package/dist/openapi/models/V2SendEventsRequest.d.ts +32 -0
- package/dist/openapi/models/V2SendEventsRequest.js +32 -0
- package/dist/openapi/models/V2SendEventsResponse.d.ts +40 -0
- package/dist/openapi/models/V2SendEventsResponse.js +38 -0
- package/dist/openapi/models/ValidationErrorResponse.d.ts +51 -0
- package/dist/openapi/models/ValidationErrorResponse.js +60 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.d.ts +38 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.js +38 -0
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +1 -0
- package/dist/openapi/models/WebhookSubscribeRequest.js +6 -0
- package/dist/openapi/models/all.d.ts +51 -0
- package/dist/openapi/models/all.js +51 -0
- package/dist/openapi/types/ObservableAPI.d.ts +243 -4
- package/dist/openapi/types/ObservableAPI.js +486 -9
- package/dist/openapi/types/PromiseAPI.d.ts +239 -4
- package/dist/openapi/types/PromiseAPI.js +330 -22
- package/dist/sdk/clients/EventsClient.js +1 -1
- package/dist/sdk/clients/WebhooksClient.d.ts +2 -0
- package/dist/sdk/clients/WebhooksClient.js +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlansApiResponseProcessor = exports.PlansApiRequestFactory = void 0;
|
|
4
|
+
// TODO: better import syntax?
|
|
5
|
+
const baseapi_1 = require("./baseapi");
|
|
6
|
+
const http_1 = require("../http/http");
|
|
7
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
8
|
+
const exception_1 = require("./exception");
|
|
9
|
+
const util_1 = require("../util");
|
|
10
|
+
/**
|
|
11
|
+
* no description
|
|
12
|
+
*/
|
|
13
|
+
class PlansApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Delete a Plan by id.
|
|
16
|
+
* Delete Plan
|
|
17
|
+
* @param planId
|
|
18
|
+
*/
|
|
19
|
+
async deletePlan(planId, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'planId' is not null or undefined
|
|
22
|
+
if (planId === null || planId === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("PlansApi", "deletePlan", "planId");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/plans/{planId}'
|
|
27
|
+
.replace('{' + 'planId' + '}', encodeURIComponent(String(planId)));
|
|
28
|
+
// Make Request Context
|
|
29
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
30
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
31
|
+
let authMethod;
|
|
32
|
+
// Apply auth methods
|
|
33
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
34
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
35
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
|
+
}
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
|
+
}
|
|
41
|
+
return requestContext;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get a Plan by id.
|
|
45
|
+
* Get Plan
|
|
46
|
+
* @param planId
|
|
47
|
+
*/
|
|
48
|
+
async getPlan(planId, _options) {
|
|
49
|
+
let _config = _options || this.configuration;
|
|
50
|
+
// verify required parameter 'planId' is not null or undefined
|
|
51
|
+
if (planId === null || planId === undefined) {
|
|
52
|
+
throw new baseapi_1.RequiredError("PlansApi", "getPlan", "planId");
|
|
53
|
+
}
|
|
54
|
+
// Path Params
|
|
55
|
+
const localVarPath = '/plans/{planId}'
|
|
56
|
+
.replace('{' + 'planId' + '}', encodeURIComponent(String(planId)));
|
|
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
|
+
* Get a list of Plans.
|
|
74
|
+
* List Plans
|
|
75
|
+
* @param limit
|
|
76
|
+
* @param cursor
|
|
77
|
+
*/
|
|
78
|
+
async listPlans(limit, cursor, _options) {
|
|
79
|
+
let _config = _options || this.configuration;
|
|
80
|
+
// Path Params
|
|
81
|
+
const localVarPath = '/plans';
|
|
82
|
+
// Make Request Context
|
|
83
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
84
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
85
|
+
// Query Params
|
|
86
|
+
if (limit !== undefined) {
|
|
87
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
88
|
+
}
|
|
89
|
+
// Query Params
|
|
90
|
+
if (cursor !== undefined) {
|
|
91
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
92
|
+
}
|
|
93
|
+
let authMethod;
|
|
94
|
+
// Apply auth methods
|
|
95
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
96
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
97
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
98
|
+
}
|
|
99
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
100
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
101
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
102
|
+
}
|
|
103
|
+
return requestContext;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.PlansApiRequestFactory = PlansApiRequestFactory;
|
|
107
|
+
class PlansApiResponseProcessor {
|
|
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 deletePlan
|
|
113
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
114
|
+
*/
|
|
115
|
+
async deletePlanWithHttpInfo(response) {
|
|
116
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
117
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
118
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeletePlanResponse", "");
|
|
119
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
120
|
+
}
|
|
121
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
122
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
123
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
124
|
+
}
|
|
125
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
126
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
127
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
128
|
+
}
|
|
129
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
130
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
131
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
132
|
+
}
|
|
133
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
134
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
135
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
136
|
+
}
|
|
137
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
138
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
139
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
140
|
+
}
|
|
141
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
142
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
143
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeletePlanResponse", "");
|
|
144
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
145
|
+
}
|
|
146
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
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 getPlan
|
|
153
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
154
|
+
*/
|
|
155
|
+
async getPlanWithHttpInfo(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), "GetPlanResponse", "");
|
|
159
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
160
|
+
}
|
|
161
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
162
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
163
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
164
|
+
}
|
|
165
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
166
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
167
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
168
|
+
}
|
|
169
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
170
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
171
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
172
|
+
}
|
|
173
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
174
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
175
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
176
|
+
}
|
|
177
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
178
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
179
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
180
|
+
}
|
|
181
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
182
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
183
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetPlanResponse", "");
|
|
184
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
185
|
+
}
|
|
186
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
190
|
+
* to the expected objects
|
|
191
|
+
*
|
|
192
|
+
* @params response Response returned by the server for a request to listPlans
|
|
193
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
194
|
+
*/
|
|
195
|
+
async listPlansWithHttpInfo(response) {
|
|
196
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
197
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListPlansResponse", "");
|
|
199
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
200
|
+
}
|
|
201
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
203
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
204
|
+
}
|
|
205
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
207
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
208
|
+
}
|
|
209
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
211
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
212
|
+
}
|
|
213
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
214
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
215
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
216
|
+
}
|
|
217
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
218
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
219
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListPlansResponse", "");
|
|
220
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
221
|
+
}
|
|
222
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.PlansApiResponseProcessor = PlansApiResponseProcessor;
|
|
@@ -57,16 +57,24 @@ class ProductConsumptionsApiResponseProcessor {
|
|
|
57
57
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
58
58
|
}
|
|
59
59
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
60
|
-
|
|
60
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
61
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
61
62
|
}
|
|
62
63
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
63
|
-
|
|
64
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
65
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
66
|
+
}
|
|
67
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
68
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
69
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
64
70
|
}
|
|
65
71
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
66
|
-
|
|
72
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
73
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
67
74
|
}
|
|
68
75
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
69
|
-
|
|
76
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
77
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
70
78
|
}
|
|
71
79
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
72
80
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -62,16 +62,24 @@ class WebhooksApiResponseProcessor {
|
|
|
62
62
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
63
63
|
}
|
|
64
64
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
65
|
-
|
|
65
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
66
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
66
67
|
}
|
|
67
68
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
68
|
-
|
|
69
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
70
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
71
|
+
}
|
|
72
|
+
if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
|
|
73
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RequestTooLongErrorResponse", "");
|
|
74
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
|
|
69
75
|
}
|
|
70
76
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
71
|
-
|
|
77
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
78
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
72
79
|
}
|
|
73
80
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
74
|
-
|
|
81
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
82
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
75
83
|
}
|
|
76
84
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
77
85
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
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, 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';
|
|
10
|
+
export { PromiseAuthApi as AuthApi, PromiseCatalogProductsApi as CatalogProductsApi, PromiseCloudUsageSubmissionApi as CloudUsageSubmissionApi, PromiseContractsApi as ContractsApi, PromiseCreditsApi as CreditsApi, PromiseCustomFieldsApi as CustomFieldsApi, PromiseCustomersApi as CustomersApi, PromiseEventsApi as EventsApi, PromiseInvoicesApi as InvoicesApi, PromiseMeasurementsApi as MeasurementsApi, PromiseMetersApi as MetersApi, PromisePlansApi as PlansApi, 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.CloudUsageSubmissionApi = exports.CatalogProductsApi = exports.AuthApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
17
|
+
exports.WebhooksApi = exports.ProductConsumptionsApi = exports.PlansApi = exports.MetersApi = exports.MeasurementsApi = exports.InvoicesApi = exports.EventsApi = exports.CustomersApi = exports.CustomFieldsApi = 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);
|
|
@@ -30,10 +30,12 @@ Object.defineProperty(exports, "CatalogProductsApi", { enumerable: true, get: fu
|
|
|
30
30
|
Object.defineProperty(exports, "CloudUsageSubmissionApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCloudUsageSubmissionApi; } });
|
|
31
31
|
Object.defineProperty(exports, "ContractsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseContractsApi; } });
|
|
32
32
|
Object.defineProperty(exports, "CreditsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCreditsApi; } });
|
|
33
|
+
Object.defineProperty(exports, "CustomFieldsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCustomFieldsApi; } });
|
|
33
34
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCustomersApi; } });
|
|
34
35
|
Object.defineProperty(exports, "EventsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseEventsApi; } });
|
|
35
36
|
Object.defineProperty(exports, "InvoicesApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseInvoicesApi; } });
|
|
36
37
|
Object.defineProperty(exports, "MeasurementsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseMeasurementsApi; } });
|
|
37
38
|
Object.defineProperty(exports, "MetersApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseMetersApi; } });
|
|
39
|
+
Object.defineProperty(exports, "PlansApi", { enumerable: true, get: function () { return PromiseAPI_1.PromisePlansApi; } });
|
|
38
40
|
Object.defineProperty(exports, "ProductConsumptionsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseProductConsumptionsApi; } });
|
|
39
41
|
Object.defineProperty(exports, "WebhooksApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseWebhooksApi; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export declare enum BillingInterval {
|
|
13
|
+
Monthly = "Monthly",
|
|
14
|
+
BiMonthly = "BiMonthly",
|
|
15
|
+
Quarterly = "Quarterly",
|
|
16
|
+
SixMonths = "SixMonths",
|
|
17
|
+
Yearly = "Yearly"
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Vayu API
|
|
4
|
+
* 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
|
|
5
|
+
*
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
* Contact: dev@withvayu.com
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.BillingInterval = void 0;
|
|
15
|
+
var BillingInterval;
|
|
16
|
+
(function (BillingInterval) {
|
|
17
|
+
BillingInterval["Monthly"] = "Monthly";
|
|
18
|
+
BillingInterval["BiMonthly"] = "BiMonthly";
|
|
19
|
+
BillingInterval["Quarterly"] = "Quarterly";
|
|
20
|
+
BillingInterval["SixMonths"] = "SixMonths";
|
|
21
|
+
BillingInterval["Yearly"] = "Yearly";
|
|
22
|
+
})(BillingInterval = exports.BillingInterval || (exports.BillingInterval = {}));
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
export declare class ConflictErrorResponse {
|
|
13
|
+
'type': ConflictErrorResponseTypeEnum;
|
|
14
|
+
'code': ConflictErrorResponseCodeEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Human-readable error explanation
|
|
17
|
+
*/
|
|
18
|
+
'message': string;
|
|
19
|
+
static readonly discriminator: string | undefined;
|
|
20
|
+
static readonly mapping: {
|
|
21
|
+
[index: string]: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
static readonly attributeTypeMap: Array<{
|
|
24
|
+
name: string;
|
|
25
|
+
baseName: string;
|
|
26
|
+
type: string;
|
|
27
|
+
format: string;
|
|
28
|
+
}>;
|
|
29
|
+
static getAttributeTypeMap(): {
|
|
30
|
+
name: string;
|
|
31
|
+
baseName: string;
|
|
32
|
+
type: string;
|
|
33
|
+
format: string;
|
|
34
|
+
}[];
|
|
35
|
+
constructor();
|
|
36
|
+
}
|
|
37
|
+
export declare enum ConflictErrorResponseTypeEnum {
|
|
38
|
+
InvalidRequestError = "invalid_request_error"
|
|
39
|
+
}
|
|
40
|
+
export declare enum ConflictErrorResponseCodeEnum {
|
|
41
|
+
ResourceAlreadyExists = "resource_already_exists"
|
|
42
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Vayu API
|
|
4
|
+
* 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
|
|
5
|
+
*
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
* Contact: dev@withvayu.com
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ConflictErrorResponseCodeEnum = exports.ConflictErrorResponseTypeEnum = exports.ConflictErrorResponse = void 0;
|
|
15
|
+
class ConflictErrorResponse {
|
|
16
|
+
static getAttributeTypeMap() {
|
|
17
|
+
return ConflictErrorResponse.attributeTypeMap;
|
|
18
|
+
}
|
|
19
|
+
constructor() {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ConflictErrorResponse = ConflictErrorResponse;
|
|
23
|
+
ConflictErrorResponse.discriminator = undefined;
|
|
24
|
+
ConflictErrorResponse.mapping = undefined;
|
|
25
|
+
ConflictErrorResponse.attributeTypeMap = [
|
|
26
|
+
{
|
|
27
|
+
"name": "type",
|
|
28
|
+
"baseName": "type",
|
|
29
|
+
"type": "ConflictErrorResponseTypeEnum",
|
|
30
|
+
"format": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "code",
|
|
34
|
+
"baseName": "code",
|
|
35
|
+
"type": "ConflictErrorResponseCodeEnum",
|
|
36
|
+
"format": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "message",
|
|
40
|
+
"baseName": "message",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": ""
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
var ConflictErrorResponseTypeEnum;
|
|
46
|
+
(function (ConflictErrorResponseTypeEnum) {
|
|
47
|
+
ConflictErrorResponseTypeEnum["InvalidRequestError"] = "invalid_request_error";
|
|
48
|
+
})(ConflictErrorResponseTypeEnum = exports.ConflictErrorResponseTypeEnum || (exports.ConflictErrorResponseTypeEnum = {}));
|
|
49
|
+
var ConflictErrorResponseCodeEnum;
|
|
50
|
+
(function (ConflictErrorResponseCodeEnum) {
|
|
51
|
+
ConflictErrorResponseCodeEnum["ResourceAlreadyExists"] = "resource_already_exists";
|
|
52
|
+
})(ConflictErrorResponseCodeEnum = exports.ConflictErrorResponseCodeEnum || (exports.ConflictErrorResponseCodeEnum = {}));
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { ContractStatus } from '../models/ContractStatus';
|
|
13
|
+
import { Currency } from '../models/Currency';
|
|
13
14
|
import { CustomField } from '../models/CustomField';
|
|
14
15
|
import { CustomFieldValue } from '../models/CustomFieldValue';
|
|
15
16
|
import { ProductGroup } from '../models/ProductGroup';
|
|
@@ -28,6 +29,14 @@ export declare class CreateContractRequest {
|
|
|
28
29
|
*/
|
|
29
30
|
'name': string;
|
|
30
31
|
/**
|
|
32
|
+
* The id of the plan template to create the contract from. When provided, the contract\'s products are derived from the plan template.
|
|
33
|
+
*/
|
|
34
|
+
'planId'?: string;
|
|
35
|
+
/**
|
|
36
|
+
* An external identifier for the contract
|
|
37
|
+
*/
|
|
38
|
+
'externalId'?: string | null;
|
|
39
|
+
/**
|
|
31
40
|
* The id of the sales force opportunity that the contract is associated with
|
|
32
41
|
*/
|
|
33
42
|
'salesForceOpportunityId'?: string | null;
|
|
@@ -68,6 +77,11 @@ export declare class CreateContractRequest {
|
|
|
68
77
|
*/
|
|
69
78
|
'customFieldValues'?: Array<CustomFieldValue> | null;
|
|
70
79
|
'status'?: ContractStatus;
|
|
80
|
+
/**
|
|
81
|
+
* The purchase order number of the contract
|
|
82
|
+
*/
|
|
83
|
+
'purchaseOrder'?: string;
|
|
84
|
+
'currency'?: Currency;
|
|
71
85
|
static readonly discriminator: string | undefined;
|
|
72
86
|
static readonly mapping: {
|
|
73
87
|
[index: string]: string;
|
|
@@ -41,6 +41,18 @@ CreateContractRequest.attributeTypeMap = [
|
|
|
41
41
|
"type": "string",
|
|
42
42
|
"format": ""
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
"name": "planId",
|
|
46
|
+
"baseName": "planId",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "externalId",
|
|
52
|
+
"baseName": "externalId",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": ""
|
|
55
|
+
},
|
|
44
56
|
{
|
|
45
57
|
"name": "salesForceOpportunityId",
|
|
46
58
|
"baseName": "salesForceOpportunityId",
|
|
@@ -106,5 +118,17 @@ CreateContractRequest.attributeTypeMap = [
|
|
|
106
118
|
"baseName": "status",
|
|
107
119
|
"type": "ContractStatus",
|
|
108
120
|
"format": ""
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "purchaseOrder",
|
|
124
|
+
"baseName": "purchaseOrder",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"format": ""
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "currency",
|
|
130
|
+
"baseName": "currency",
|
|
131
|
+
"type": "Currency",
|
|
132
|
+
"format": ""
|
|
109
133
|
}
|
|
110
134
|
];
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { CustomFieldEntities } from '../models/CustomFieldEntities';
|
|
13
|
+
import { CustomFieldValueTypes } from '../models/CustomFieldValueTypes';
|
|
14
|
+
import { IntegrationEntityTypes } from '../models/IntegrationEntityTypes';
|
|
15
|
+
export declare class CreateCustomFieldRequest {
|
|
16
|
+
'vayuEntity': CustomFieldEntities;
|
|
17
|
+
/**
|
|
18
|
+
* The name of the custom field in Vayu
|
|
19
|
+
*/
|
|
20
|
+
'vayuCustomFieldName': string;
|
|
21
|
+
'valueType': CustomFieldValueTypes;
|
|
22
|
+
/**
|
|
23
|
+
* The integration provider (e.g., \"Salesforce\", \"HubSpot\")
|
|
24
|
+
*/
|
|
25
|
+
'integrationSource'?: CreateCustomFieldRequestIntegrationSourceEnum;
|
|
26
|
+
'integrationEntityType'?: IntegrationEntityTypes;
|
|
27
|
+
/**
|
|
28
|
+
* The path to the field in the integration
|
|
29
|
+
*/
|
|
30
|
+
'fieldPath'?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Allowed values for Enum type fields
|
|
33
|
+
*/
|
|
34
|
+
'allowedValues'?: Array<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Default value for Enum type fields. Must be one of allowedValues.
|
|
37
|
+
*/
|
|
38
|
+
'defaultValue'?: string;
|
|
39
|
+
static readonly discriminator: string | undefined;
|
|
40
|
+
static readonly mapping: {
|
|
41
|
+
[index: string]: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
static readonly attributeTypeMap: Array<{
|
|
44
|
+
name: string;
|
|
45
|
+
baseName: string;
|
|
46
|
+
type: string;
|
|
47
|
+
format: string;
|
|
48
|
+
}>;
|
|
49
|
+
static getAttributeTypeMap(): {
|
|
50
|
+
name: string;
|
|
51
|
+
baseName: string;
|
|
52
|
+
type: string;
|
|
53
|
+
format: string;
|
|
54
|
+
}[];
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
57
|
+
export declare enum CreateCustomFieldRequestIntegrationSourceEnum {
|
|
58
|
+
NetSuite = "NetSuite",
|
|
59
|
+
QuickBooks = "QuickBooks",
|
|
60
|
+
Stripe = "Stripe",
|
|
61
|
+
Salesforce = "Salesforce",
|
|
62
|
+
Hubspot = "Hubspot",
|
|
63
|
+
Vayu = "Vayu",
|
|
64
|
+
Slack = "Slack",
|
|
65
|
+
S3 = "S3",
|
|
66
|
+
Morning = "Morning",
|
|
67
|
+
Snowflake = "Snowflake",
|
|
68
|
+
Anrok = "Anrok",
|
|
69
|
+
Connact = "Connact",
|
|
70
|
+
Xero = "Xero"
|
|
71
|
+
}
|