vayu-ts 0.0.7 → 0.0.13

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.
Files changed (253) hide show
  1. package/package.json +1 -1
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +0 -17
  4. package/dist/openapi/apis/AuthApi.d.ts +0 -26
  5. package/dist/openapi/apis/AuthApi.js +0 -93
  6. package/dist/openapi/apis/ContractsApi.d.ts +0 -72
  7. package/dist/openapi/apis/ContractsApi.js +0 -307
  8. package/dist/openapi/apis/CreditsApi.d.ts +0 -57
  9. package/dist/openapi/apis/CreditsApi.js +0 -248
  10. package/dist/openapi/apis/CustomersApi.d.ts +0 -89
  11. package/dist/openapi/apis/CustomersApi.js +0 -388
  12. package/dist/openapi/apis/EventsApi.d.ts +0 -91
  13. package/dist/openapi/apis/EventsApi.js +0 -408
  14. package/dist/openapi/apis/IntegrationsApi.d.ts +0 -41
  15. package/dist/openapi/apis/IntegrationsApi.js +0 -170
  16. package/dist/openapi/apis/InvoicesApi.d.ts +0 -41
  17. package/dist/openapi/apis/InvoicesApi.js +0 -166
  18. package/dist/openapi/apis/MetersApi.d.ts +0 -73
  19. package/dist/openapi/apis/MetersApi.js +0 -316
  20. package/dist/openapi/apis/PlansApi.d.ts +0 -56
  21. package/dist/openapi/apis/PlansApi.js +0 -235
  22. package/dist/openapi/apis/ReportsApi.d.ts +0 -41
  23. package/dist/openapi/apis/ReportsApi.js +0 -166
  24. package/dist/openapi/apis/WebhooksApi.d.ts +0 -25
  25. package/dist/openapi/apis/WebhooksApi.js +0 -101
  26. package/dist/openapi/apis/baseapi.d.ts +0 -33
  27. package/dist/openapi/apis/baseapi.js +0 -41
  28. package/dist/openapi/apis/exception.d.ts +0 -19
  29. package/dist/openapi/apis/exception.js +0 -22
  30. package/dist/openapi/auth/auth.d.ts +0 -54
  31. package/dist/openapi/auth/auth.js +0 -50
  32. package/dist/openapi/configuration.d.ts +0 -63
  33. package/dist/openapi/configuration.js +0 -34
  34. package/dist/openapi/http/http.d.ts +0 -142
  35. package/dist/openapi/http/http.js +0 -229
  36. package/dist/openapi/http/isomorphic-fetch.d.ts +0 -5
  37. package/dist/openapi/http/isomorphic-fetch.js +0 -33
  38. package/dist/openapi/index.d.ts +0 -10
  39. package/dist/openapi/index.js +0 -38
  40. package/dist/openapi/middleware.d.ts +0 -54
  41. package/dist/openapi/middleware.js +0 -16
  42. package/dist/openapi/models/AggregationMethod.d.ts +0 -40
  43. package/dist/openapi/models/AggregationMethod.js +0 -46
  44. package/dist/openapi/models/AggregationOperator.d.ts +0 -24
  45. package/dist/openapi/models/AggregationOperator.js +0 -28
  46. package/dist/openapi/models/BillingCycleStatus.d.ts +0 -15
  47. package/dist/openapi/models/BillingCycleStatus.js +0 -19
  48. package/dist/openapi/models/BillingInterval.d.ts +0 -18
  49. package/dist/openapi/models/BillingInterval.js +0 -22
  50. package/dist/openapi/models/Condition.d.ts +0 -29
  51. package/dist/openapi/models/Condition.js +0 -31
  52. package/dist/openapi/models/ContractStatus.d.ts +0 -18
  53. package/dist/openapi/models/ContractStatus.js +0 -22
  54. package/dist/openapi/models/CreateContractRequest.d.ts +0 -43
  55. package/dist/openapi/models/CreateContractRequest.js +0 -49
  56. package/dist/openapi/models/CreateContractResponse.d.ts +0 -29
  57. package/dist/openapi/models/CreateContractResponse.js +0 -31
  58. package/dist/openapi/models/CreateCustomerRequest.d.ts +0 -35
  59. package/dist/openapi/models/CreateCustomerRequest.js +0 -37
  60. package/dist/openapi/models/CreateCustomerResponse.d.ts +0 -29
  61. package/dist/openapi/models/CreateCustomerResponse.js +0 -31
  62. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +0 -38
  63. package/dist/openapi/models/CreateCustomerResponseCustomer.js +0 -55
  64. package/dist/openapi/models/CreditLedgerEntry.d.ts +0 -32
  65. package/dist/openapi/models/CreditLedgerEntry.js +0 -49
  66. package/dist/openapi/models/Criterion.d.ts +0 -31
  67. package/dist/openapi/models/Criterion.js +0 -43
  68. package/dist/openapi/models/CriterionOperator.d.ts +0 -23
  69. package/dist/openapi/models/CriterionOperator.js +0 -27
  70. package/dist/openapi/models/Currency.d.ts +0 -17
  71. package/dist/openapi/models/Currency.js +0 -21
  72. package/dist/openapi/models/DeductCreditsRequest.d.ts +0 -35
  73. package/dist/openapi/models/DeductCreditsRequest.js +0 -37
  74. package/dist/openapi/models/DeleteContractResponse.d.ts +0 -29
  75. package/dist/openapi/models/DeleteContractResponse.js +0 -31
  76. package/dist/openapi/models/DeleteContractResponseContract.d.ts +0 -47
  77. package/dist/openapi/models/DeleteContractResponseContract.js +0 -73
  78. package/dist/openapi/models/DeleteCustomerResponse.d.ts +0 -29
  79. package/dist/openapi/models/DeleteCustomerResponse.js +0 -31
  80. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +0 -39
  81. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +0 -61
  82. package/dist/openapi/models/DeleteEventResponse.d.ts +0 -29
  83. package/dist/openapi/models/DeleteEventResponse.js +0 -31
  84. package/dist/openapi/models/DeleteEventResponseEvent.d.ts +0 -56
  85. package/dist/openapi/models/DeleteEventResponseEvent.js +0 -82
  86. package/dist/openapi/models/DeleteMeterResponse.d.ts +0 -29
  87. package/dist/openapi/models/DeleteMeterResponse.js +0 -31
  88. package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +0 -43
  89. package/dist/openapi/models/DeleteMeterResponseMeter.js +0 -73
  90. package/dist/openapi/models/DeletePlanResponse.d.ts +0 -29
  91. package/dist/openapi/models/DeletePlanResponse.js +0 -31
  92. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +0 -39
  93. package/dist/openapi/models/DeletePlanResponsePlan.js +0 -67
  94. package/dist/openapi/models/Event.d.ts +0 -49
  95. package/dist/openapi/models/Event.js +0 -55
  96. package/dist/openapi/models/EventsDryRunRequest.d.ts +0 -29
  97. package/dist/openapi/models/EventsDryRunRequest.js +0 -31
  98. package/dist/openapi/models/EventsDryRunResponse.d.ts +0 -29
  99. package/dist/openapi/models/EventsDryRunResponse.js +0 -31
  100. package/dist/openapi/models/EventsDryRunResponseObject.d.ts +0 -32
  101. package/dist/openapi/models/EventsDryRunResponseObject.js +0 -43
  102. package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +0 -35
  103. package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +0 -61
  104. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +0 -41
  105. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +0 -61
  106. package/dist/openapi/models/Filter.d.ts +0 -32
  107. package/dist/openapi/models/Filter.js +0 -34
  108. package/dist/openapi/models/GetCommitmentReportResponse.d.ts +0 -44
  109. package/dist/openapi/models/GetCommitmentReportResponse.js +0 -115
  110. package/dist/openapi/models/GetContractResponse.d.ts +0 -29
  111. package/dist/openapi/models/GetContractResponse.js +0 -31
  112. package/dist/openapi/models/GetContractResponseContract.d.ts +0 -46
  113. package/dist/openapi/models/GetContractResponseContract.js +0 -67
  114. package/dist/openapi/models/GetCustomerResponse.d.ts +0 -29
  115. package/dist/openapi/models/GetCustomerResponse.js +0 -31
  116. package/dist/openapi/models/GetEventResponse.d.ts +0 -29
  117. package/dist/openapi/models/GetEventResponse.js +0 -31
  118. package/dist/openapi/models/GetEventResponseEvent.d.ts +0 -55
  119. package/dist/openapi/models/GetEventResponseEvent.js +0 -76
  120. package/dist/openapi/models/GetInvoiceResponse.d.ts +0 -29
  121. package/dist/openapi/models/GetInvoiceResponse.js +0 -31
  122. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +0 -50
  123. package/dist/openapi/models/GetInvoiceResponseInvoice.js +0 -79
  124. package/dist/openapi/models/GetMeterResponse.d.ts +0 -29
  125. package/dist/openapi/models/GetMeterResponse.js +0 -31
  126. package/dist/openapi/models/GetMeterResponseMeter.d.ts +0 -42
  127. package/dist/openapi/models/GetMeterResponseMeter.js +0 -67
  128. package/dist/openapi/models/GetPlanResponse.d.ts +0 -29
  129. package/dist/openapi/models/GetPlanResponse.js +0 -31
  130. package/dist/openapi/models/GetPlanResponsePlan.d.ts +0 -38
  131. package/dist/openapi/models/GetPlanResponsePlan.js +0 -61
  132. package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +0 -44
  133. package/dist/openapi/models/GetProductsUsageReportResponse.js +0 -115
  134. package/dist/openapi/models/GrantCreditsRequest.d.ts +0 -35
  135. package/dist/openapi/models/GrantCreditsRequest.js +0 -37
  136. package/dist/openapi/models/InvalidEvent.d.ts +0 -33
  137. package/dist/openapi/models/InvalidEvent.js +0 -37
  138. package/dist/openapi/models/LineItem.d.ts +0 -35
  139. package/dist/openapi/models/LineItem.js +0 -37
  140. package/dist/openapi/models/ListContractsResponse.d.ts +0 -32
  141. package/dist/openapi/models/ListContractsResponse.js +0 -49
  142. package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +0 -32
  143. package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +0 -31
  144. package/dist/openapi/models/ListCustomersResponse.d.ts +0 -32
  145. package/dist/openapi/models/ListCustomersResponse.js +0 -49
  146. package/dist/openapi/models/ListInvoicesResponse.d.ts +0 -32
  147. package/dist/openapi/models/ListInvoicesResponse.js +0 -49
  148. package/dist/openapi/models/ListMetersResponse.d.ts +0 -32
  149. package/dist/openapi/models/ListMetersResponse.js +0 -49
  150. package/dist/openapi/models/ListPlansResponse.d.ts +0 -32
  151. package/dist/openapi/models/ListPlansResponse.js +0 -49
  152. package/dist/openapi/models/LoginRequest.d.ts +0 -31
  153. package/dist/openapi/models/LoginRequest.js +0 -31
  154. package/dist/openapi/models/LoginResponse.d.ts +0 -31
  155. package/dist/openapi/models/LoginResponse.js +0 -31
  156. package/dist/openapi/models/Meter.d.ts +0 -39
  157. package/dist/openapi/models/Meter.js +0 -49
  158. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +0 -30
  159. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +0 -43
  160. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +0 -34
  161. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +0 -47
  162. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +0 -39
  163. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +0 -85
  164. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +0 -28
  165. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +0 -31
  166. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +0 -29
  167. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +0 -31
  168. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +0 -33
  169. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +0 -55
  170. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +0 -29
  171. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +0 -37
  172. package/dist/openapi/models/NotificationEventType.d.ts +0 -17
  173. package/dist/openapi/models/NotificationEventType.js +0 -21
  174. package/dist/openapi/models/ObjectSerializer.d.ts +0 -106
  175. package/dist/openapi/models/ObjectSerializer.js +0 -488
  176. package/dist/openapi/models/PaymentTerm.d.ts +0 -15
  177. package/dist/openapi/models/PaymentTerm.js +0 -19
  178. package/dist/openapi/models/Period.d.ts +0 -32
  179. package/dist/openapi/models/Period.js +0 -40
  180. package/dist/openapi/models/PlanBillingData.d.ts +0 -37
  181. package/dist/openapi/models/PlanBillingData.js +0 -58
  182. package/dist/openapi/models/PlanStatus.d.ts +0 -19
  183. package/dist/openapi/models/PlanStatus.js +0 -23
  184. package/dist/openapi/models/QueryEventsResponse.d.ts +0 -32
  185. package/dist/openapi/models/QueryEventsResponse.js +0 -31
  186. package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +0 -52
  187. package/dist/openapi/models/QueryEventsResponseEventsInner.js +0 -73
  188. package/dist/openapi/models/SendEventsRequest.d.ts +0 -29
  189. package/dist/openapi/models/SendEventsRequest.js +0 -31
  190. package/dist/openapi/models/SendEventsResponse.d.ts +0 -37
  191. package/dist/openapi/models/SendEventsResponse.js +0 -37
  192. package/dist/openapi/models/UpdateCustomerRequest.d.ts +0 -35
  193. package/dist/openapi/models/UpdateCustomerRequest.js +0 -37
  194. package/dist/openapi/models/UpdateCustomerResponse.d.ts +0 -29
  195. package/dist/openapi/models/UpdateCustomerResponse.js +0 -31
  196. package/dist/openapi/models/UpdateMeterRequest.d.ts +0 -39
  197. package/dist/openapi/models/UpdateMeterRequest.js +0 -49
  198. package/dist/openapi/models/UpdateMeterResponse.d.ts +0 -29
  199. package/dist/openapi/models/UpdateMeterResponse.js +0 -31
  200. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +0 -30
  201. package/dist/openapi/models/WebhookSubscribeRequest.js +0 -37
  202. package/dist/openapi/models/all.d.ts +0 -79
  203. package/dist/openapi/models/all.js +0 -95
  204. package/dist/openapi/rxjsStub.d.ts +0 -10
  205. package/dist/openapi/rxjsStub.js +0 -31
  206. package/dist/openapi/servers.d.ts +0 -39
  207. package/dist/openapi/servers.js +0 -52
  208. package/dist/openapi/types/ObjectParamAPI.d.ts +0 -825
  209. package/dist/openapi/types/ObjectParamAPI.js +0 -590
  210. package/dist/openapi/types/ObservableAPI.d.ts +0 -532
  211. package/dist/openapi/types/ObservableAPI.js +0 -1060
  212. package/dist/openapi/types/PromiseAPI.d.ts +0 -509
  213. package/dist/openapi/types/PromiseAPI.js +0 -684
  214. package/dist/openapi/util.d.ts +0 -15
  215. package/dist/openapi/util.js +0 -42
  216. package/dist/sdk/clients/ContractsClient.d.ts +0 -10
  217. package/dist/sdk/clients/ContractsClient.js +0 -42
  218. package/dist/sdk/clients/CustomersClient.d.ts +0 -11
  219. package/dist/sdk/clients/CustomersClient.js +0 -47
  220. package/dist/sdk/clients/EventsClient.d.ts +0 -11
  221. package/dist/sdk/clients/EventsClient.js +0 -49
  222. package/dist/sdk/clients/InvoicesClient.d.ts +0 -7
  223. package/dist/sdk/clients/InvoicesClient.js +0 -32
  224. package/dist/sdk/clients/MetersClient.d.ts +0 -10
  225. package/dist/sdk/clients/MetersClient.js +0 -42
  226. package/dist/sdk/clients/PlansClient.d.ts +0 -8
  227. package/dist/sdk/clients/PlansClient.js +0 -37
  228. package/dist/sdk/clients/index.d.ts +0 -6
  229. package/dist/sdk/clients/index.js +0 -22
  230. package/dist/sdk/index.d.ts +0 -13
  231. package/dist/sdk/index.js +0 -59
  232. package/dist/sdk/services/configuration.service.d.ts +0 -21
  233. package/dist/sdk/services/configuration.service.js +0 -104
  234. package/dist/sdk/services/index.d.ts +0 -1
  235. package/dist/sdk/services/index.js +0 -17
  236. package/dist/sdk/types/Contracts.d.ts +0 -1
  237. package/dist/sdk/types/Contracts.js +0 -2
  238. package/dist/sdk/types/Customers.d.ts +0 -1
  239. package/dist/sdk/types/Customers.js +0 -2
  240. package/dist/sdk/types/Events.d.ts +0 -1
  241. package/dist/sdk/types/Events.js +0 -2
  242. package/dist/sdk/types/Invoices.d.ts +0 -1
  243. package/dist/sdk/types/Invoices.js +0 -2
  244. package/dist/sdk/types/Meters.d.ts +0 -1
  245. package/dist/sdk/types/Meters.js +0 -2
  246. package/dist/sdk/types/Plans.d.ts +0 -1
  247. package/dist/sdk/types/Plans.js +0 -2
  248. package/dist/sdk/types/index.d.ts +0 -7
  249. package/dist/sdk/types/index.js +0 -23
  250. package/dist/sdk/types/pagination-options.d.ts +0 -4
  251. package/dist/sdk/types/pagination-options.js +0 -2
  252. package/dist/types.d.ts +0 -1
  253. package/dist/types.js +0 -17
@@ -1,235 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PlansApiResponseProcessor = exports.PlansApiRequestFactory = void 0;
13
- // TODO: better import syntax?
14
- const baseapi_1 = require("./baseapi");
15
- const http_1 = require("../http/http");
16
- const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
- const exception_1 = require("./exception");
18
- const util_1 = require("../util");
19
- /**
20
- * no description
21
- */
22
- class PlansApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
- /**
24
- * Delete a Plan by id.
25
- * Delete Plan
26
- * @param planId
27
- */
28
- deletePlan(planId, _options) {
29
- var _a, _b, _c;
30
- return __awaiter(this, void 0, void 0, function* () {
31
- let _config = _options || this.configuration;
32
- // verify required parameter 'planId' is not null or undefined
33
- if (planId === null || planId === undefined) {
34
- throw new baseapi_1.RequiredError("PlansApi", "deletePlan", "planId");
35
- }
36
- // Path Params
37
- const localVarPath = '/plans/{planId}'
38
- .replace('{' + 'planId' + '}', encodeURIComponent(String(planId)));
39
- // Make Request Context
40
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
41
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
42
- let authMethod;
43
- // Apply auth methods
44
- authMethod = _config.authMethods["BearerAuthorizer"];
45
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
46
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
47
- }
48
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
49
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
50
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
51
- }
52
- return requestContext;
53
- });
54
- }
55
- /**
56
- * Get a Plan by id.
57
- * Get Plan
58
- * @param planId
59
- */
60
- getPlan(planId, _options) {
61
- var _a, _b, _c;
62
- return __awaiter(this, void 0, void 0, function* () {
63
- let _config = _options || this.configuration;
64
- // verify required parameter 'planId' is not null or undefined
65
- if (planId === null || planId === undefined) {
66
- throw new baseapi_1.RequiredError("PlansApi", "getPlan", "planId");
67
- }
68
- // Path Params
69
- const localVarPath = '/plans/{planId}'
70
- .replace('{' + 'planId' + '}', encodeURIComponent(String(planId)));
71
- // Make Request Context
72
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
73
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
74
- let authMethod;
75
- // Apply auth methods
76
- authMethod = _config.authMethods["BearerAuthorizer"];
77
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
78
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
79
- }
80
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
81
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
82
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
83
- }
84
- return requestContext;
85
- });
86
- }
87
- /**
88
- * Get a list of Plans.
89
- * List Plans
90
- * @param limit
91
- * @param cursor
92
- */
93
- listPlans(limit, cursor, _options) {
94
- var _a, _b, _c;
95
- return __awaiter(this, void 0, void 0, function* () {
96
- let _config = _options || this.configuration;
97
- // Path Params
98
- const localVarPath = '/plans';
99
- // Make Request Context
100
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
101
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
102
- // Query Params
103
- if (limit !== undefined) {
104
- requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
105
- }
106
- // Query Params
107
- if (cursor !== undefined) {
108
- requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
109
- }
110
- let authMethod;
111
- // Apply auth methods
112
- authMethod = _config.authMethods["BearerAuthorizer"];
113
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
114
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
115
- }
116
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
117
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
118
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
119
- }
120
- return requestContext;
121
- });
122
- }
123
- }
124
- exports.PlansApiRequestFactory = PlansApiRequestFactory;
125
- class PlansApiResponseProcessor {
126
- /**
127
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
128
- * to the expected objects
129
- *
130
- * @params response Response returned by the server for a request to deletePlan
131
- * @throws ApiException if the response code was not in [200, 299]
132
- */
133
- deletePlanWithHttpInfo(response) {
134
- return __awaiter(this, void 0, void 0, function* () {
135
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
136
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
137
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeletePlanResponse", "");
138
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
139
- }
140
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
141
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
142
- }
143
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
144
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
145
- }
146
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
147
- throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
148
- }
149
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
150
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
151
- }
152
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
153
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
154
- }
155
- // Work around for missing responses in specification, e.g. for petstore.yaml
156
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
157
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeletePlanResponse", "");
158
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
159
- }
160
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
161
- });
162
- }
163
- /**
164
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
165
- * to the expected objects
166
- *
167
- * @params response Response returned by the server for a request to getPlan
168
- * @throws ApiException if the response code was not in [200, 299]
169
- */
170
- getPlanWithHttpInfo(response) {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
173
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
174
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetPlanResponse", "");
175
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
176
- }
177
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
178
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
179
- }
180
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
181
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
182
- }
183
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
184
- throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
185
- }
186
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
187
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
188
- }
189
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
190
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
191
- }
192
- // Work around for missing responses in specification, e.g. for petstore.yaml
193
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
194
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetPlanResponse", "");
195
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
196
- }
197
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
198
- });
199
- }
200
- /**
201
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
202
- * to the expected objects
203
- *
204
- * @params response Response returned by the server for a request to listPlans
205
- * @throws ApiException if the response code was not in [200, 299]
206
- */
207
- listPlansWithHttpInfo(response) {
208
- return __awaiter(this, void 0, void 0, function* () {
209
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
210
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
211
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListPlansResponse", "");
212
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
213
- }
214
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
215
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
216
- }
217
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
218
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
219
- }
220
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
221
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
222
- }
223
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
224
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
225
- }
226
- // Work around for missing responses in specification, e.g. for petstore.yaml
227
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
228
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListPlansResponse", "");
229
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
230
- }
231
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
232
- });
233
- }
234
- }
235
- exports.PlansApiResponseProcessor = PlansApiResponseProcessor;
@@ -1,41 +0,0 @@
1
- import { BaseAPIRequestFactory } from './baseapi';
2
- import { Configuration } from '../configuration';
3
- import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
- import { GetCommitmentReportResponse } from '../models/GetCommitmentReportResponse';
5
- import { GetProductsUsageReportResponse } from '../models/GetProductsUsageReportResponse';
6
- /**
7
- * no description
8
- */
9
- export declare class ReportsApiRequestFactory extends BaseAPIRequestFactory {
10
- /**
11
- * Get commitment report
12
- * @param reportId
13
- */
14
- getCommitmentReportResponse(reportId?: string, _options?: Configuration): Promise<RequestContext>;
15
- /**
16
- * Use this endpoint to get the products usage report.
17
- * Get products usage report
18
- * @param reportId
19
- * @param limit
20
- * @param cursor
21
- */
22
- getProductsUsageReport(reportId?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
23
- }
24
- export declare class ReportsApiResponseProcessor {
25
- /**
26
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
27
- * to the expected objects
28
- *
29
- * @params response Response returned by the server for a request to getCommitmentReportResponse
30
- * @throws ApiException if the response code was not in [200, 299]
31
- */
32
- getCommitmentReportResponseWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCommitmentReportResponse>>;
33
- /**
34
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
35
- * to the expected objects
36
- *
37
- * @params response Response returned by the server for a request to getProductsUsageReport
38
- * @throws ApiException if the response code was not in [200, 299]
39
- */
40
- getProductsUsageReportWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetProductsUsageReportResponse>>;
41
- }
@@ -1,166 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ReportsApiResponseProcessor = exports.ReportsApiRequestFactory = void 0;
13
- // TODO: better import syntax?
14
- const baseapi_1 = require("./baseapi");
15
- const http_1 = require("../http/http");
16
- const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
- const exception_1 = require("./exception");
18
- const util_1 = require("../util");
19
- /**
20
- * no description
21
- */
22
- class ReportsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
- /**
24
- * Get commitment report
25
- * @param reportId
26
- */
27
- getCommitmentReportResponse(reportId, _options) {
28
- var _a, _b, _c;
29
- return __awaiter(this, void 0, void 0, function* () {
30
- let _config = _options || this.configuration;
31
- // Path Params
32
- const localVarPath = '/report/commitment';
33
- // Make Request Context
34
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
35
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
36
- // Query Params
37
- if (reportId !== undefined) {
38
- requestContext.setQueryParam("reportId", ObjectSerializer_1.ObjectSerializer.serialize(reportId, "string", ""));
39
- }
40
- let authMethod;
41
- // Apply auth methods
42
- authMethod = _config.authMethods["BearerAuthorizer"];
43
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
44
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
45
- }
46
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
47
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
48
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
49
- }
50
- return requestContext;
51
- });
52
- }
53
- /**
54
- * Use this endpoint to get the products usage report.
55
- * Get products usage report
56
- * @param reportId
57
- * @param limit
58
- * @param cursor
59
- */
60
- getProductsUsageReport(reportId, limit, cursor, _options) {
61
- var _a, _b, _c;
62
- return __awaiter(this, void 0, void 0, function* () {
63
- let _config = _options || this.configuration;
64
- // Path Params
65
- const localVarPath = '/report/products-usage';
66
- // Make Request Context
67
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
68
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
69
- // Query Params
70
- if (reportId !== undefined) {
71
- requestContext.setQueryParam("reportId", ObjectSerializer_1.ObjectSerializer.serialize(reportId, "string", ""));
72
- }
73
- // Query Params
74
- if (limit !== undefined) {
75
- requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
76
- }
77
- // Query Params
78
- if (cursor !== undefined) {
79
- requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
80
- }
81
- let authMethod;
82
- // Apply auth methods
83
- authMethod = _config.authMethods["BearerAuthorizer"];
84
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
85
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
86
- }
87
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
88
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
89
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
90
- }
91
- return requestContext;
92
- });
93
- }
94
- }
95
- exports.ReportsApiRequestFactory = ReportsApiRequestFactory;
96
- class ReportsApiResponseProcessor {
97
- /**
98
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
99
- * to the expected objects
100
- *
101
- * @params response Response returned by the server for a request to getCommitmentReportResponse
102
- * @throws ApiException if the response code was not in [200, 299]
103
- */
104
- getCommitmentReportResponseWithHttpInfo(response) {
105
- return __awaiter(this, void 0, void 0, function* () {
106
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
107
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
108
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetCommitmentReportResponse", "");
109
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
110
- }
111
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
112
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
113
- }
114
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
115
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
116
- }
117
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
118
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
119
- }
120
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
121
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
122
- }
123
- // Work around for missing responses in specification, e.g. for petstore.yaml
124
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
125
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetCommitmentReportResponse", "");
126
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
127
- }
128
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
129
- });
130
- }
131
- /**
132
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
133
- * to the expected objects
134
- *
135
- * @params response Response returned by the server for a request to getProductsUsageReport
136
- * @throws ApiException if the response code was not in [200, 299]
137
- */
138
- getProductsUsageReportWithHttpInfo(response) {
139
- return __awaiter(this, void 0, void 0, function* () {
140
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
141
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
142
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetProductsUsageReportResponse", "");
143
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
144
- }
145
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
146
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
147
- }
148
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
149
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
150
- }
151
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
152
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
153
- }
154
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
155
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
156
- }
157
- // Work around for missing responses in specification, e.g. for petstore.yaml
158
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
159
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetProductsUsageReportResponse", "");
160
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
161
- }
162
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
163
- });
164
- }
165
- }
166
- exports.ReportsApiResponseProcessor = ReportsApiResponseProcessor;
@@ -1,25 +0,0 @@
1
- import { BaseAPIRequestFactory } from './baseapi';
2
- import { Configuration } from '../configuration';
3
- import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
- import { WebhookSubscribeRequest } from '../models/WebhookSubscribeRequest';
5
- /**
6
- * no description
7
- */
8
- export declare class WebhooksApiRequestFactory extends BaseAPIRequestFactory {
9
- /**
10
- * Use this endpoint to subscribe to webhooks and receive event notifications.
11
- * Subscribe to webhooks
12
- * @param webhookSubscribeRequest Subscribe to webhooks and receive event notifications.
13
- */
14
- webhookSubscribe(webhookSubscribeRequest: WebhookSubscribeRequest, _options?: Configuration): Promise<RequestContext>;
15
- }
16
- export declare class WebhooksApiResponseProcessor {
17
- /**
18
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
19
- * to the expected objects
20
- *
21
- * @params response Response returned by the server for a request to webhookSubscribe
22
- * @throws ApiException if the response code was not in [200, 299]
23
- */
24
- webhookSubscribeWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
25
- }
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WebhooksApiResponseProcessor = exports.WebhooksApiRequestFactory = void 0;
13
- // TODO: better import syntax?
14
- const baseapi_1 = require("./baseapi");
15
- const http_1 = require("../http/http");
16
- const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
- const exception_1 = require("./exception");
18
- const util_1 = require("../util");
19
- /**
20
- * no description
21
- */
22
- class WebhooksApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
- /**
24
- * Use this endpoint to subscribe to webhooks and receive event notifications.
25
- * Subscribe to webhooks
26
- * @param webhookSubscribeRequest Subscribe to webhooks and receive event notifications.
27
- */
28
- webhookSubscribe(webhookSubscribeRequest, _options) {
29
- var _a, _b, _c;
30
- return __awaiter(this, void 0, void 0, function* () {
31
- let _config = _options || this.configuration;
32
- // verify required parameter 'webhookSubscribeRequest' is not null or undefined
33
- if (webhookSubscribeRequest === null || webhookSubscribeRequest === undefined) {
34
- throw new baseapi_1.RequiredError("WebhooksApi", "webhookSubscribe", "webhookSubscribeRequest");
35
- }
36
- // Path Params
37
- const localVarPath = '/webhook';
38
- // Make Request Context
39
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
40
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
41
- // Body Params
42
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
43
- "application/json"
44
- ]);
45
- requestContext.setHeaderParam("Content-Type", contentType);
46
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(webhookSubscribeRequest, "WebhookSubscribeRequest", ""), contentType);
47
- requestContext.setBody(serializedBody);
48
- let authMethod;
49
- // Apply auth methods
50
- authMethod = _config.authMethods["BearerAuthorizer"];
51
- if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
52
- yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
53
- }
54
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
55
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
56
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
57
- }
58
- return requestContext;
59
- });
60
- }
61
- }
62
- exports.WebhooksApiRequestFactory = WebhooksApiRequestFactory;
63
- class WebhooksApiResponseProcessor {
64
- /**
65
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
66
- * to the expected objects
67
- *
68
- * @params response Response returned by the server for a request to webhookSubscribe
69
- * @throws ApiException if the response code was not in [200, 299]
70
- */
71
- webhookSubscribeWithHttpInfo(response) {
72
- return __awaiter(this, void 0, void 0, function* () {
73
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
74
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
75
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
76
- }
77
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
78
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
79
- }
80
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
81
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
82
- }
83
- if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
84
- throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
85
- }
86
- if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
87
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
88
- }
89
- if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
90
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
91
- }
92
- // Work around for missing responses in specification, e.g. for petstore.yaml
93
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
94
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
95
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
96
- }
97
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
98
- });
99
- }
100
- }
101
- exports.WebhooksApiResponseProcessor = WebhooksApiResponseProcessor;
@@ -1,33 +0,0 @@
1
- import { Configuration } from '../configuration';
2
- /**
3
- *
4
- * @export
5
- */
6
- export declare const COLLECTION_FORMATS: {
7
- csv: string;
8
- ssv: string;
9
- tsv: string;
10
- pipes: string;
11
- };
12
- /**
13
- *
14
- * @export
15
- * @class BaseAPI
16
- */
17
- export declare class BaseAPIRequestFactory {
18
- protected configuration: Configuration;
19
- constructor(configuration: Configuration);
20
- }
21
- /**
22
- *
23
- * @export
24
- * @class RequiredError
25
- * @extends {Error}
26
- */
27
- export declare class RequiredError extends Error {
28
- api: string;
29
- method: string;
30
- field: string;
31
- name: "RequiredError";
32
- constructor(api: string, method: string, field: string);
33
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequiredError = exports.BaseAPIRequestFactory = exports.COLLECTION_FORMATS = void 0;
4
- /**
5
- *
6
- * @export
7
- */
8
- exports.COLLECTION_FORMATS = {
9
- csv: ",",
10
- ssv: " ",
11
- tsv: "\t",
12
- pipes: "|",
13
- };
14
- /**
15
- *
16
- * @export
17
- * @class BaseAPI
18
- */
19
- class BaseAPIRequestFactory {
20
- constructor(configuration) {
21
- this.configuration = configuration;
22
- }
23
- }
24
- exports.BaseAPIRequestFactory = BaseAPIRequestFactory;
25
- ;
26
- /**
27
- *
28
- * @export
29
- * @class RequiredError
30
- * @extends {Error}
31
- */
32
- class RequiredError extends Error {
33
- constructor(api, method, field) {
34
- super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".");
35
- this.api = api;
36
- this.method = method;
37
- this.field = field;
38
- this.name = "RequiredError";
39
- }
40
- }
41
- exports.RequiredError = RequiredError;