vayu-ts 0.3.4 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi/apis/AuthApi.js +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.js +26 -13
- 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 +6 -0
- package/dist/openapi/models/CreateContractRequest.js +12 -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 +235 -2
- package/dist/openapi/types/ObservableAPI.js +476 -5
- package/dist/openapi/types/PromiseAPI.d.ts +231 -2
- package/dist/openapi/types/PromiseAPI.js +320 -18
- 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,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomFieldsApiResponseProcessor = exports.CustomFieldsApiRequestFactory = 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 CustomFieldsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Create a new Custom field.
|
|
16
|
+
* Create Custom field
|
|
17
|
+
* @param createCustomFieldRequest
|
|
18
|
+
*/
|
|
19
|
+
async createCustomField(createCustomFieldRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'createCustomFieldRequest' is not null or undefined
|
|
22
|
+
if (createCustomFieldRequest === null || createCustomFieldRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "createCustomField", "createCustomFieldRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/customFields';
|
|
27
|
+
// Make Request Context
|
|
28
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
29
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
30
|
+
// Body Params
|
|
31
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
32
|
+
"application/json"
|
|
33
|
+
]);
|
|
34
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createCustomFieldRequest, "CreateCustomFieldRequest", ""), contentType);
|
|
36
|
+
requestContext.setBody(serializedBody);
|
|
37
|
+
let authMethod;
|
|
38
|
+
// Apply auth methods
|
|
39
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
40
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
41
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
|
+
}
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
|
+
}
|
|
47
|
+
return requestContext;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Delete a Custom field by id.
|
|
51
|
+
* Delete Custom field
|
|
52
|
+
* @param customFieldId
|
|
53
|
+
*/
|
|
54
|
+
async deleteCustomField(customFieldId, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
57
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "deleteCustomField", "customFieldId");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
62
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
63
|
+
// Make Request Context
|
|
64
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
65
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
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
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get a Custom field by id.
|
|
80
|
+
* Get Custom field
|
|
81
|
+
* @param customFieldId
|
|
82
|
+
*/
|
|
83
|
+
async getCustomField(customFieldId, _options) {
|
|
84
|
+
let _config = _options || this.configuration;
|
|
85
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
86
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
87
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "getCustomField", "customFieldId");
|
|
88
|
+
}
|
|
89
|
+
// Path Params
|
|
90
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
91
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
92
|
+
// Make Request Context
|
|
93
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
94
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
95
|
+
let authMethod;
|
|
96
|
+
// Apply auth methods
|
|
97
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
98
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
99
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
100
|
+
}
|
|
101
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
102
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
103
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
104
|
+
}
|
|
105
|
+
return requestContext;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get a list of Custom fields.
|
|
109
|
+
* List Custom fields
|
|
110
|
+
* @param limit
|
|
111
|
+
* @param cursor
|
|
112
|
+
*/
|
|
113
|
+
async listCustomFields(limit, cursor, _options) {
|
|
114
|
+
let _config = _options || this.configuration;
|
|
115
|
+
// Path Params
|
|
116
|
+
const localVarPath = '/customFields';
|
|
117
|
+
// Make Request Context
|
|
118
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
119
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
120
|
+
// Query Params
|
|
121
|
+
if (limit !== undefined) {
|
|
122
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
123
|
+
}
|
|
124
|
+
// Query Params
|
|
125
|
+
if (cursor !== undefined) {
|
|
126
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
127
|
+
}
|
|
128
|
+
let authMethod;
|
|
129
|
+
// Apply auth methods
|
|
130
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
131
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
132
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
135
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
136
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
137
|
+
}
|
|
138
|
+
return requestContext;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Update a Custom field by id.
|
|
142
|
+
* Update Custom field
|
|
143
|
+
* @param updateCustomFieldRequest
|
|
144
|
+
* @param customFieldId
|
|
145
|
+
*/
|
|
146
|
+
async updateCustomField(updateCustomFieldRequest, customFieldId, _options) {
|
|
147
|
+
let _config = _options || this.configuration;
|
|
148
|
+
// verify required parameter 'updateCustomFieldRequest' is not null or undefined
|
|
149
|
+
if (updateCustomFieldRequest === null || updateCustomFieldRequest === undefined) {
|
|
150
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "updateCustomField", "updateCustomFieldRequest");
|
|
151
|
+
}
|
|
152
|
+
// verify required parameter 'customFieldId' is not null or undefined
|
|
153
|
+
if (customFieldId === null || customFieldId === undefined) {
|
|
154
|
+
throw new baseapi_1.RequiredError("CustomFieldsApi", "updateCustomField", "customFieldId");
|
|
155
|
+
}
|
|
156
|
+
// Path Params
|
|
157
|
+
const localVarPath = '/customFields/{customFieldId}'
|
|
158
|
+
.replace('{' + 'customFieldId' + '}', encodeURIComponent(String(customFieldId)));
|
|
159
|
+
// Make Request Context
|
|
160
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
161
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
162
|
+
// Body Params
|
|
163
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
164
|
+
"application/json"
|
|
165
|
+
]);
|
|
166
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
167
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateCustomFieldRequest, "UpdateCustomFieldRequest", ""), contentType);
|
|
168
|
+
requestContext.setBody(serializedBody);
|
|
169
|
+
let authMethod;
|
|
170
|
+
// Apply auth methods
|
|
171
|
+
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
172
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
173
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
174
|
+
}
|
|
175
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
176
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
177
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
178
|
+
}
|
|
179
|
+
return requestContext;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.CustomFieldsApiRequestFactory = CustomFieldsApiRequestFactory;
|
|
183
|
+
class CustomFieldsApiResponseProcessor {
|
|
184
|
+
/**
|
|
185
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
186
|
+
* to the expected objects
|
|
187
|
+
*
|
|
188
|
+
* @params response Response returned by the server for a request to createCustomField
|
|
189
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
190
|
+
*/
|
|
191
|
+
async createCustomFieldWithHttpInfo(response) {
|
|
192
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
193
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
194
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomFieldResponse", "");
|
|
195
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
196
|
+
}
|
|
197
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
199
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
200
|
+
}
|
|
201
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
203
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
204
|
+
}
|
|
205
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
207
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
208
|
+
}
|
|
209
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
211
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
212
|
+
}
|
|
213
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
214
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
215
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateCustomFieldResponse", "");
|
|
216
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
217
|
+
}
|
|
218
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
222
|
+
* to the expected objects
|
|
223
|
+
*
|
|
224
|
+
* @params response Response returned by the server for a request to deleteCustomField
|
|
225
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
226
|
+
*/
|
|
227
|
+
async deleteCustomFieldWithHttpInfo(response) {
|
|
228
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
229
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
230
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomFieldResponse", "");
|
|
231
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
232
|
+
}
|
|
233
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
234
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
235
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
236
|
+
}
|
|
237
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
238
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
239
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
240
|
+
}
|
|
241
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
242
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
243
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
244
|
+
}
|
|
245
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
246
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
247
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
248
|
+
}
|
|
249
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
250
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
251
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
252
|
+
}
|
|
253
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
254
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
255
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteCustomFieldResponse", "");
|
|
256
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
257
|
+
}
|
|
258
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
262
|
+
* to the expected objects
|
|
263
|
+
*
|
|
264
|
+
* @params response Response returned by the server for a request to getCustomField
|
|
265
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
266
|
+
*/
|
|
267
|
+
async getCustomFieldWithHttpInfo(response) {
|
|
268
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
269
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
270
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCustomFieldResponse", "");
|
|
271
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
272
|
+
}
|
|
273
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
274
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
275
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
276
|
+
}
|
|
277
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
278
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
279
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
280
|
+
}
|
|
281
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
282
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
283
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
284
|
+
}
|
|
285
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
286
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
287
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
288
|
+
}
|
|
289
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
290
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
291
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, 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), "GetCustomFieldResponse", "");
|
|
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
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
302
|
+
* to the expected objects
|
|
303
|
+
*
|
|
304
|
+
* @params response Response returned by the server for a request to listCustomFields
|
|
305
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
306
|
+
*/
|
|
307
|
+
async listCustomFieldsWithHttpInfo(response) {
|
|
308
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
309
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
310
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomFieldsResponse", "");
|
|
311
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
312
|
+
}
|
|
313
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
314
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
316
|
+
}
|
|
317
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
318
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
319
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
320
|
+
}
|
|
321
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
322
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
323
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
324
|
+
}
|
|
325
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
326
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
327
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
328
|
+
}
|
|
329
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
330
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
331
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ListCustomFieldsResponse", "");
|
|
332
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
333
|
+
}
|
|
334
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
338
|
+
* to the expected objects
|
|
339
|
+
*
|
|
340
|
+
* @params response Response returned by the server for a request to updateCustomField
|
|
341
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
342
|
+
*/
|
|
343
|
+
async updateCustomFieldWithHttpInfo(response) {
|
|
344
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
345
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
346
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomFieldResponse", "");
|
|
347
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
348
|
+
}
|
|
349
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
350
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
351
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
352
|
+
}
|
|
353
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
354
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
355
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
356
|
+
}
|
|
357
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
358
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
359
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
360
|
+
}
|
|
361
|
+
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
362
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
363
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
364
|
+
}
|
|
365
|
+
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
366
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
367
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
368
|
+
}
|
|
369
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
370
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
371
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateCustomFieldResponse", "");
|
|
372
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
373
|
+
}
|
|
374
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
exports.CustomFieldsApiResponseProcessor = CustomFieldsApiResponseProcessor;
|