@flexprice/sdk 0.0.1

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 (167) hide show
  1. package/README.md +380 -0
  2. package/dist/ApiClient.js +703 -0
  3. package/dist/api/AuthApi.js +116 -0
  4. package/dist/api/CustomersApi.js +373 -0
  5. package/dist/api/EntitlementsApi.js +291 -0
  6. package/dist/api/EnvironmentsApi.js +204 -0
  7. package/dist/api/EventsApi.js +237 -0
  8. package/dist/api/FeaturesApi.js +252 -0
  9. package/dist/api/IntegrationsApi.js +189 -0
  10. package/dist/api/InvoicesApi.js +444 -0
  11. package/dist/api/MetersApi.js +287 -0
  12. package/dist/api/PaymentsApi.js +296 -0
  13. package/dist/api/PlansApi.js +248 -0
  14. package/dist/api/PricesApi.js +250 -0
  15. package/dist/api/SecretsApi.js +155 -0
  16. package/dist/api/SubscriptionsApi.js +383 -0
  17. package/dist/api/TasksApi.js +254 -0
  18. package/dist/api/TenantsApi.js +182 -0
  19. package/dist/api/UsersApi.js +75 -0
  20. package/dist/api/WalletsApi.js +384 -0
  21. package/dist/index.js +1154 -0
  22. package/dist/model/DtoAddress.js +149 -0
  23. package/dist/model/DtoAggregatedEntitlement.js +123 -0
  24. package/dist/model/DtoAggregatedFeature.js +138 -0
  25. package/dist/model/DtoAuthResponse.js +113 -0
  26. package/dist/model/DtoBillingPeriodInfo.js +114 -0
  27. package/dist/model/DtoBulkIngestEventRequest.js +130 -0
  28. package/dist/model/DtoCreateAPIKeyRequest.js +147 -0
  29. package/dist/model/DtoCreateAPIKeyResponse.js +103 -0
  30. package/dist/model/DtoCreateCustomerRequest.js +218 -0
  31. package/dist/model/DtoCreateEntitlementRequest.js +180 -0
  32. package/dist/model/DtoCreateEnvironmentRequest.js +126 -0
  33. package/dist/model/DtoCreateFeatureRequest.js +193 -0
  34. package/dist/model/DtoCreateIntegrationRequest.js +135 -0
  35. package/dist/model/DtoCreateInvoiceLineItemRequest.js +238 -0
  36. package/dist/model/DtoCreateInvoiceRequest.js +316 -0
  37. package/dist/model/DtoCreateMeterRequest.js +183 -0
  38. package/dist/model/DtoCreatePaymentRequest.js +202 -0
  39. package/dist/model/DtoCreatePlanEntitlementRequest.js +180 -0
  40. package/dist/model/DtoCreatePlanPriceRequest.js +318 -0
  41. package/dist/model/DtoCreatePlanRequest.js +196 -0
  42. package/dist/model/DtoCreatePriceRequest.js +318 -0
  43. package/dist/model/DtoCreatePriceTier.js +132 -0
  44. package/dist/model/DtoCreateSubscriptionRequest.js +244 -0
  45. package/dist/model/DtoCreateTaskRequest.js +167 -0
  46. package/dist/model/DtoCreateTenantRequest.js +126 -0
  47. package/dist/model/DtoCreateWalletRequest.js +216 -0
  48. package/dist/model/DtoCustomerEntitlementsResponse.js +122 -0
  49. package/dist/model/DtoCustomerInvoiceSummary.js +165 -0
  50. package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +134 -0
  51. package/dist/model/DtoCustomerResponse.js +300 -0
  52. package/dist/model/DtoCustomerUsageSummaryResponse.js +150 -0
  53. package/dist/model/DtoEntitlementResponse.js +276 -0
  54. package/dist/model/DtoEntitlementSource.js +161 -0
  55. package/dist/model/DtoEnvironmentResponse.js +137 -0
  56. package/dist/model/DtoEvent.js +159 -0
  57. package/dist/model/DtoFeatureResponse.js +275 -0
  58. package/dist/model/DtoFeatureUsageSummary.js +164 -0
  59. package/dist/model/DtoGetEventsResponse.js +142 -0
  60. package/dist/model/DtoGetPreviewInvoiceRequest.js +136 -0
  61. package/dist/model/DtoGetUsageByMeterRequest.js +179 -0
  62. package/dist/model/DtoGetUsageBySubscriptionRequest.js +144 -0
  63. package/dist/model/DtoGetUsageBySubscriptionResponse.js +166 -0
  64. package/dist/model/DtoGetUsageRequest.js +203 -0
  65. package/dist/model/DtoGetUsageResponse.js +139 -0
  66. package/dist/model/DtoIngestEventRequest.js +186 -0
  67. package/dist/model/DtoInvoiceLineItemResponse.js +343 -0
  68. package/dist/model/DtoInvoiceResponse.js +479 -0
  69. package/dist/model/DtoLinkedIntegrationsResponse.js +89 -0
  70. package/dist/model/DtoListCustomersResponse.js +124 -0
  71. package/dist/model/DtoListEntitlementsResponse.js +124 -0
  72. package/dist/model/DtoListEnvironmentsResponse.js +134 -0
  73. package/dist/model/DtoListFeaturesResponse.js +124 -0
  74. package/dist/model/DtoListInvoicesResponse.js +124 -0
  75. package/dist/model/DtoListPaymentsResponse.js +124 -0
  76. package/dist/model/DtoListPlansResponse.js +124 -0
  77. package/dist/model/DtoListPricesResponse.js +124 -0
  78. package/dist/model/DtoListSecretsResponse.js +124 -0
  79. package/dist/model/DtoListSubscriptionPausesResponse.js +118 -0
  80. package/dist/model/DtoListSubscriptionsResponse.js +124 -0
  81. package/dist/model/DtoListTasksResponse.js +124 -0
  82. package/dist/model/DtoListWalletTransactionsResponse.js +124 -0
  83. package/dist/model/DtoLoginRequest.js +138 -0
  84. package/dist/model/DtoMeterResponse.js +217 -0
  85. package/dist/model/DtoPauseSubscriptionRequest.js +171 -0
  86. package/dist/model/DtoPaymentAttemptResponse.js +191 -0
  87. package/dist/model/DtoPaymentResponse.js +331 -0
  88. package/dist/model/DtoPlanResponse.js +269 -0
  89. package/dist/model/DtoPriceResponse.js +412 -0
  90. package/dist/model/DtoResumeSubscriptionRequest.js +127 -0
  91. package/dist/model/DtoSecretResponse.js +200 -0
  92. package/dist/model/DtoSignUpRequest.js +148 -0
  93. package/dist/model/DtoSubscriptionPauseResponse.js +300 -0
  94. package/dist/model/DtoSubscriptionResponse.js +518 -0
  95. package/dist/model/DtoSubscriptionUsageByMetersResponse.js +165 -0
  96. package/dist/model/DtoTaskResponse.js +311 -0
  97. package/dist/model/DtoTenantBillingDetails.js +127 -0
  98. package/dist/model/DtoTenantBillingUsage.js +124 -0
  99. package/dist/model/DtoTenantResponse.js +151 -0
  100. package/dist/model/DtoTopUpWalletRequest.js +185 -0
  101. package/dist/model/DtoUpdateCustomerRequest.js +195 -0
  102. package/dist/model/DtoUpdateEntitlementRequest.js +122 -0
  103. package/dist/model/DtoUpdateEnvironmentRequest.js +101 -0
  104. package/dist/model/DtoUpdateFeatureRequest.js +135 -0
  105. package/dist/model/DtoUpdateMeterRequest.js +110 -0
  106. package/dist/model/DtoUpdatePaymentRequest.js +99 -0
  107. package/dist/model/DtoUpdatePaymentStatusRequest.js +117 -0
  108. package/dist/model/DtoUpdatePlanEntitlementRequest.js +193 -0
  109. package/dist/model/DtoUpdatePlanPriceRequest.js +331 -0
  110. package/dist/model/DtoUpdatePlanRequest.js +176 -0
  111. package/dist/model/DtoUpdatePriceRequest.js +111 -0
  112. package/dist/model/DtoUpdateTaskStatusRequest.js +109 -0
  113. package/dist/model/DtoUpdateTenantRequest.js +91 -0
  114. package/dist/model/DtoUpdateWalletRequest.js +150 -0
  115. package/dist/model/DtoUsageResult.js +97 -0
  116. package/dist/model/DtoUserResponse.js +115 -0
  117. package/dist/model/DtoWalletBalanceResponse.js +353 -0
  118. package/dist/model/DtoWalletResponse.js +252 -0
  119. package/dist/model/DtoWalletTransactionResponse.js +238 -0
  120. package/dist/model/ErrorsErrorDetail.js +111 -0
  121. package/dist/model/ErrorsErrorResponse.js +99 -0
  122. package/dist/model/MeterAggregation.js +99 -0
  123. package/dist/model/MeterFilter.js +103 -0
  124. package/dist/model/PriceJSONBTransformQuantity.js +99 -0
  125. package/dist/model/PricePrice.js +398 -0
  126. package/dist/model/PricePriceTier.js +104 -0
  127. package/dist/model/PriceTransformQuantity.js +99 -0
  128. package/dist/model/SubscriptionSubscriptionLineItem.js +355 -0
  129. package/dist/model/SubscriptionSubscriptionPause.js +300 -0
  130. package/dist/model/TypesAggregationType.js +68 -0
  131. package/dist/model/TypesAutoTopupTrigger.js +58 -0
  132. package/dist/model/TypesBillingCadence.js +58 -0
  133. package/dist/model/TypesBillingModel.js +63 -0
  134. package/dist/model/TypesBillingPeriod.js +78 -0
  135. package/dist/model/TypesBillingTier.js +58 -0
  136. package/dist/model/TypesEntityType.js +63 -0
  137. package/dist/model/TypesFeatureType.js +63 -0
  138. package/dist/model/TypesFileType.js +58 -0
  139. package/dist/model/TypesInvoiceBillingReason.js +68 -0
  140. package/dist/model/TypesInvoiceCadence.js +58 -0
  141. package/dist/model/TypesInvoiceStatus.js +63 -0
  142. package/dist/model/TypesInvoiceType.js +63 -0
  143. package/dist/model/TypesPaginationResponse.js +101 -0
  144. package/dist/model/TypesPauseMode.js +63 -0
  145. package/dist/model/TypesPauseStatus.js +73 -0
  146. package/dist/model/TypesPaymentDestinationType.js +53 -0
  147. package/dist/model/TypesPaymentMethodType.js +68 -0
  148. package/dist/model/TypesPaymentStatus.js +78 -0
  149. package/dist/model/TypesPriceType.js +58 -0
  150. package/dist/model/TypesResetUsage.js +58 -0
  151. package/dist/model/TypesResumeMode.js +63 -0
  152. package/dist/model/TypesSecretProvider.js +63 -0
  153. package/dist/model/TypesSecretType.js +63 -0
  154. package/dist/model/TypesStatus.js +63 -0
  155. package/dist/model/TypesSubscriptionStatus.js +88 -0
  156. package/dist/model/TypesTaskStatus.js +68 -0
  157. package/dist/model/TypesTaskType.js +58 -0
  158. package/dist/model/TypesTransactionReason.js +88 -0
  159. package/dist/model/TypesTransactionStatus.js +63 -0
  160. package/dist/model/TypesTransactionType.js +58 -0
  161. package/dist/model/TypesWalletConfig.js +91 -0
  162. package/dist/model/TypesWalletConfigPriceType.js +63 -0
  163. package/dist/model/TypesWalletStatus.js +63 -0
  164. package/dist/model/TypesWalletTxReferenceType.js +68 -0
  165. package/dist/model/TypesWalletType.js +58 -0
  166. package/dist/model/TypesWindowSize.js +63 -0
  167. package/package.json +54 -0
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _DtoCreatePlanRequest = _interopRequireDefault(require("../model/DtoCreatePlanRequest"));
9
+ var _DtoListPlansResponse = _interopRequireDefault(require("../model/DtoListPlansResponse"));
10
+ var _DtoPlanResponse = _interopRequireDefault(require("../model/DtoPlanResponse"));
11
+ var _DtoUpdatePlanRequest = _interopRequireDefault(require("../model/DtoUpdatePlanRequest"));
12
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * FlexPrice API
21
+ * FlexPrice API Service
22
+ *
23
+ * The version of the OpenAPI document: 1.0
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * Plans service.
33
+ * @module api/PlansApi
34
+ * @version 1.0
35
+ */
36
+ var PlansApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new PlansApi.
39
+ * @alias module:api/PlansApi
40
+ * @class
41
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
42
+ * default to {@link module:ApiClient#instance} if unspecified.
43
+ */
44
+ function PlansApi(apiClient) {
45
+ _classCallCheck(this, PlansApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Callback function to receive the result of the plansGet operation.
51
+ * @callback module:api/PlansApi~plansGetCallback
52
+ * @param {String} error Error message, if any.
53
+ * @param {module:model/DtoListPlansResponse} data The data returned by the service call.
54
+ * @param {String} response The complete HTTP response.
55
+ */
56
+
57
+ /**
58
+ * Get plans
59
+ * Get plans with optional filtering
60
+ * @param {Object} opts Optional parameters
61
+ * @param {String} [endTime]
62
+ * @param {String} [expand]
63
+ * @param {Number} [limit]
64
+ * @param {Number} [offset]
65
+ * @param {module:model/String} [order]
66
+ * @param {Array.<String>} [planIds]
67
+ * @param {String} [sort]
68
+ * @param {String} [startTime]
69
+ * @param {module:model/String} [status]
70
+ * @param {module:api/PlansApi~plansGetCallback} callback The callback function, accepting three arguments: error, data, response
71
+ * data is of type: {@link module:model/DtoListPlansResponse}
72
+ */
73
+ return _createClass(PlansApi, [{
74
+ key: "plansGet",
75
+ value: function plansGet(opts, callback) {
76
+ opts = opts || {};
77
+ var postBody = null;
78
+ var pathParams = {};
79
+ var queryParams = {
80
+ 'end_time': opts['endTime'],
81
+ 'expand': opts['expand'],
82
+ 'limit': opts['limit'],
83
+ 'offset': opts['offset'],
84
+ 'order': opts['order'],
85
+ 'plan_ids': this.apiClient.buildCollectionParam(opts['planIds'], 'csv'),
86
+ 'sort': opts['sort'],
87
+ 'start_time': opts['startTime'],
88
+ 'status': opts['status']
89
+ };
90
+ var headerParams = {};
91
+ var formParams = {};
92
+ var authNames = ['ApiKeyAuth'];
93
+ var contentTypes = [];
94
+ var accepts = ['application/json'];
95
+ var returnType = _DtoListPlansResponse["default"];
96
+ return this.apiClient.callApi('/plans', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
97
+ }
98
+
99
+ /**
100
+ * Callback function to receive the result of the plansIdDelete operation.
101
+ * @callback module:api/PlansApi~plansIdDeleteCallback
102
+ * @param {String} error Error message, if any.
103
+ * @param {Object.<String, {String: Object}>} data The data returned by the service call.
104
+ * @param {String} response The complete HTTP response.
105
+ */
106
+
107
+ /**
108
+ * Delete a plan
109
+ * Delete a plan by ID
110
+ * @param {String} id Plan ID
111
+ * @param {module:api/PlansApi~plansIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
112
+ * data is of type: {@link Object.<String, {String: Object}>}
113
+ */
114
+ }, {
115
+ key: "plansIdDelete",
116
+ value: function plansIdDelete(id, callback) {
117
+ var postBody = null;
118
+ // verify the required parameter 'id' is set
119
+ if (id === undefined || id === null) {
120
+ throw new Error("Missing the required parameter 'id' when calling plansIdDelete");
121
+ }
122
+ var pathParams = {
123
+ 'id': id
124
+ };
125
+ var queryParams = {};
126
+ var headerParams = {};
127
+ var formParams = {};
128
+ var authNames = ['ApiKeyAuth'];
129
+ var contentTypes = [];
130
+ var accepts = ['application/json'];
131
+ var returnType = {
132
+ 'String': Object
133
+ };
134
+ return this.apiClient.callApi('/plans/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
135
+ }
136
+
137
+ /**
138
+ * Callback function to receive the result of the plansIdGet operation.
139
+ * @callback module:api/PlansApi~plansIdGetCallback
140
+ * @param {String} error Error message, if any.
141
+ * @param {module:model/DtoPlanResponse} data The data returned by the service call.
142
+ * @param {String} response The complete HTTP response.
143
+ */
144
+
145
+ /**
146
+ * Get a plan
147
+ * Get a plan by ID
148
+ * @param {String} id Plan ID
149
+ * @param {module:api/PlansApi~plansIdGetCallback} callback The callback function, accepting three arguments: error, data, response
150
+ * data is of type: {@link module:model/DtoPlanResponse}
151
+ */
152
+ }, {
153
+ key: "plansIdGet",
154
+ value: function plansIdGet(id, callback) {
155
+ var postBody = null;
156
+ // verify the required parameter 'id' is set
157
+ if (id === undefined || id === null) {
158
+ throw new Error("Missing the required parameter 'id' when calling plansIdGet");
159
+ }
160
+ var pathParams = {
161
+ 'id': id
162
+ };
163
+ var queryParams = {};
164
+ var headerParams = {};
165
+ var formParams = {};
166
+ var authNames = ['ApiKeyAuth'];
167
+ var contentTypes = [];
168
+ var accepts = ['application/json'];
169
+ var returnType = _DtoPlanResponse["default"];
170
+ return this.apiClient.callApi('/plans/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
171
+ }
172
+
173
+ /**
174
+ * Callback function to receive the result of the plansIdPut operation.
175
+ * @callback module:api/PlansApi~plansIdPutCallback
176
+ * @param {String} error Error message, if any.
177
+ * @param {module:model/DtoPlanResponse} data The data returned by the service call.
178
+ * @param {String} response The complete HTTP response.
179
+ */
180
+
181
+ /**
182
+ * Update a plan
183
+ * Update a plan by ID
184
+ * @param {String} id Plan ID
185
+ * @param {module:model/DtoUpdatePlanRequest} plan Plan update
186
+ * @param {module:api/PlansApi~plansIdPutCallback} callback The callback function, accepting three arguments: error, data, response
187
+ * data is of type: {@link module:model/DtoPlanResponse}
188
+ */
189
+ }, {
190
+ key: "plansIdPut",
191
+ value: function plansIdPut(id, plan, callback) {
192
+ var postBody = plan;
193
+ // verify the required parameter 'id' is set
194
+ if (id === undefined || id === null) {
195
+ throw new Error("Missing the required parameter 'id' when calling plansIdPut");
196
+ }
197
+ // verify the required parameter 'plan' is set
198
+ if (plan === undefined || plan === null) {
199
+ throw new Error("Missing the required parameter 'plan' when calling plansIdPut");
200
+ }
201
+ var pathParams = {
202
+ 'id': id
203
+ };
204
+ var queryParams = {};
205
+ var headerParams = {};
206
+ var formParams = {};
207
+ var authNames = ['ApiKeyAuth'];
208
+ var contentTypes = ['application/json'];
209
+ var accepts = ['application/json'];
210
+ var returnType = _DtoPlanResponse["default"];
211
+ return this.apiClient.callApi('/plans/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
212
+ }
213
+
214
+ /**
215
+ * Callback function to receive the result of the plansPost operation.
216
+ * @callback module:api/PlansApi~plansPostCallback
217
+ * @param {String} error Error message, if any.
218
+ * @param {module:model/DtoPlanResponse} data The data returned by the service call.
219
+ * @param {String} response The complete HTTP response.
220
+ */
221
+
222
+ /**
223
+ * Create a new plan
224
+ * Create a new plan with the specified configuration
225
+ * @param {module:model/DtoCreatePlanRequest} plan Plan configuration
226
+ * @param {module:api/PlansApi~plansPostCallback} callback The callback function, accepting three arguments: error, data, response
227
+ * data is of type: {@link module:model/DtoPlanResponse}
228
+ */
229
+ }, {
230
+ key: "plansPost",
231
+ value: function plansPost(plan, callback) {
232
+ var postBody = plan;
233
+ // verify the required parameter 'plan' is set
234
+ if (plan === undefined || plan === null) {
235
+ throw new Error("Missing the required parameter 'plan' when calling plansPost");
236
+ }
237
+ var pathParams = {};
238
+ var queryParams = {};
239
+ var headerParams = {};
240
+ var formParams = {};
241
+ var authNames = ['ApiKeyAuth'];
242
+ var contentTypes = ['application/json'];
243
+ var accepts = ['application/json'];
244
+ var returnType = _DtoPlanResponse["default"];
245
+ return this.apiClient.callApi('/plans', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
246
+ }
247
+ }]);
248
+ }();
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _DtoCreatePriceRequest = _interopRequireDefault(require("../model/DtoCreatePriceRequest"));
9
+ var _DtoListPricesResponse = _interopRequireDefault(require("../model/DtoListPricesResponse"));
10
+ var _DtoPriceResponse = _interopRequireDefault(require("../model/DtoPriceResponse"));
11
+ var _DtoUpdatePriceRequest = _interopRequireDefault(require("../model/DtoUpdatePriceRequest"));
12
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * FlexPrice API
21
+ * FlexPrice API Service
22
+ *
23
+ * The version of the OpenAPI document: 1.0
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * Prices service.
33
+ * @module api/PricesApi
34
+ * @version 1.0
35
+ */
36
+ var PricesApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new PricesApi.
39
+ * @alias module:api/PricesApi
40
+ * @class
41
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
42
+ * default to {@link module:ApiClient#instance} if unspecified.
43
+ */
44
+ function PricesApi(apiClient) {
45
+ _classCallCheck(this, PricesApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Callback function to receive the result of the pricesGet operation.
51
+ * @callback module:api/PricesApi~pricesGetCallback
52
+ * @param {String} error Error message, if any.
53
+ * @param {module:model/DtoListPricesResponse} data The data returned by the service call.
54
+ * @param {String} response The complete HTTP response.
55
+ */
56
+
57
+ /**
58
+ * Get prices
59
+ * Get prices with the specified filter
60
+ * @param {Object} opts Optional parameters
61
+ * @param {String} [endTime]
62
+ * @param {String} [expand]
63
+ * @param {Number} [limit]
64
+ * @param {Number} [offset]
65
+ * @param {module:model/String} [order]
66
+ * @param {Array.<String>} [planIds]
67
+ * @param {Array.<String>} [priceIds]
68
+ * @param {String} [sort]
69
+ * @param {String} [startTime]
70
+ * @param {module:model/String} [status]
71
+ * @param {module:api/PricesApi~pricesGetCallback} callback The callback function, accepting three arguments: error, data, response
72
+ * data is of type: {@link module:model/DtoListPricesResponse}
73
+ */
74
+ return _createClass(PricesApi, [{
75
+ key: "pricesGet",
76
+ value: function pricesGet(opts, callback) {
77
+ opts = opts || {};
78
+ var postBody = null;
79
+ var pathParams = {};
80
+ var queryParams = {
81
+ 'end_time': opts['endTime'],
82
+ 'expand': opts['expand'],
83
+ 'limit': opts['limit'],
84
+ 'offset': opts['offset'],
85
+ 'order': opts['order'],
86
+ 'plan_ids': this.apiClient.buildCollectionParam(opts['planIds'], 'csv'),
87
+ 'price_ids': this.apiClient.buildCollectionParam(opts['priceIds'], 'csv'),
88
+ 'sort': opts['sort'],
89
+ 'start_time': opts['startTime'],
90
+ 'status': opts['status']
91
+ };
92
+ var headerParams = {};
93
+ var formParams = {};
94
+ var authNames = ['ApiKeyAuth'];
95
+ var contentTypes = [];
96
+ var accepts = ['application/json'];
97
+ var returnType = _DtoListPricesResponse["default"];
98
+ return this.apiClient.callApi('/prices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
99
+ }
100
+
101
+ /**
102
+ * Callback function to receive the result of the pricesIdDelete operation.
103
+ * @callback module:api/PricesApi~pricesIdDeleteCallback
104
+ * @param {String} error Error message, if any.
105
+ * @param {Object.<String, {String: Object}>} data The data returned by the service call.
106
+ * @param {String} response The complete HTTP response.
107
+ */
108
+
109
+ /**
110
+ * Delete a price
111
+ * Delete a price
112
+ * @param {String} id Price ID
113
+ * @param {module:api/PricesApi~pricesIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
114
+ * data is of type: {@link Object.<String, {String: Object}>}
115
+ */
116
+ }, {
117
+ key: "pricesIdDelete",
118
+ value: function pricesIdDelete(id, callback) {
119
+ var postBody = null;
120
+ // verify the required parameter 'id' is set
121
+ if (id === undefined || id === null) {
122
+ throw new Error("Missing the required parameter 'id' when calling pricesIdDelete");
123
+ }
124
+ var pathParams = {
125
+ 'id': id
126
+ };
127
+ var queryParams = {};
128
+ var headerParams = {};
129
+ var formParams = {};
130
+ var authNames = ['ApiKeyAuth'];
131
+ var contentTypes = [];
132
+ var accepts = ['application/json'];
133
+ var returnType = {
134
+ 'String': Object
135
+ };
136
+ return this.apiClient.callApi('/prices/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
137
+ }
138
+
139
+ /**
140
+ * Callback function to receive the result of the pricesIdGet operation.
141
+ * @callback module:api/PricesApi~pricesIdGetCallback
142
+ * @param {String} error Error message, if any.
143
+ * @param {module:model/DtoPriceResponse} data The data returned by the service call.
144
+ * @param {String} response The complete HTTP response.
145
+ */
146
+
147
+ /**
148
+ * Get a price by ID
149
+ * Get a price by ID
150
+ * @param {String} id Price ID
151
+ * @param {module:api/PricesApi~pricesIdGetCallback} callback The callback function, accepting three arguments: error, data, response
152
+ * data is of type: {@link module:model/DtoPriceResponse}
153
+ */
154
+ }, {
155
+ key: "pricesIdGet",
156
+ value: function pricesIdGet(id, callback) {
157
+ var postBody = null;
158
+ // verify the required parameter 'id' is set
159
+ if (id === undefined || id === null) {
160
+ throw new Error("Missing the required parameter 'id' when calling pricesIdGet");
161
+ }
162
+ var pathParams = {
163
+ 'id': id
164
+ };
165
+ var queryParams = {};
166
+ var headerParams = {};
167
+ var formParams = {};
168
+ var authNames = ['ApiKeyAuth'];
169
+ var contentTypes = [];
170
+ var accepts = ['application/json'];
171
+ var returnType = _DtoPriceResponse["default"];
172
+ return this.apiClient.callApi('/prices/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
173
+ }
174
+
175
+ /**
176
+ * Callback function to receive the result of the pricesIdPut operation.
177
+ * @callback module:api/PricesApi~pricesIdPutCallback
178
+ * @param {String} error Error message, if any.
179
+ * @param {module:model/DtoPriceResponse} data The data returned by the service call.
180
+ * @param {String} response The complete HTTP response.
181
+ */
182
+
183
+ /**
184
+ * Update a price
185
+ * Update a price with the specified configuration
186
+ * @param {String} id Price ID
187
+ * @param {module:model/DtoUpdatePriceRequest} price Price configuration
188
+ * @param {module:api/PricesApi~pricesIdPutCallback} callback The callback function, accepting three arguments: error, data, response
189
+ * data is of type: {@link module:model/DtoPriceResponse}
190
+ */
191
+ }, {
192
+ key: "pricesIdPut",
193
+ value: function pricesIdPut(id, price, callback) {
194
+ var postBody = price;
195
+ // verify the required parameter 'id' is set
196
+ if (id === undefined || id === null) {
197
+ throw new Error("Missing the required parameter 'id' when calling pricesIdPut");
198
+ }
199
+ // verify the required parameter 'price' is set
200
+ if (price === undefined || price === null) {
201
+ throw new Error("Missing the required parameter 'price' when calling pricesIdPut");
202
+ }
203
+ var pathParams = {
204
+ 'id': id
205
+ };
206
+ var queryParams = {};
207
+ var headerParams = {};
208
+ var formParams = {};
209
+ var authNames = ['ApiKeyAuth'];
210
+ var contentTypes = ['application/json'];
211
+ var accepts = ['application/json'];
212
+ var returnType = _DtoPriceResponse["default"];
213
+ return this.apiClient.callApi('/prices/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
214
+ }
215
+
216
+ /**
217
+ * Callback function to receive the result of the pricesPost operation.
218
+ * @callback module:api/PricesApi~pricesPostCallback
219
+ * @param {String} error Error message, if any.
220
+ * @param {module:model/DtoPriceResponse} data The data returned by the service call.
221
+ * @param {String} response The complete HTTP response.
222
+ */
223
+
224
+ /**
225
+ * Create a new price
226
+ * Create a new price with the specified configuration
227
+ * @param {module:model/DtoCreatePriceRequest} price Price configuration
228
+ * @param {module:api/PricesApi~pricesPostCallback} callback The callback function, accepting three arguments: error, data, response
229
+ * data is of type: {@link module:model/DtoPriceResponse}
230
+ */
231
+ }, {
232
+ key: "pricesPost",
233
+ value: function pricesPost(price, callback) {
234
+ var postBody = price;
235
+ // verify the required parameter 'price' is set
236
+ if (price === undefined || price === null) {
237
+ throw new Error("Missing the required parameter 'price' when calling pricesPost");
238
+ }
239
+ var pathParams = {};
240
+ var queryParams = {};
241
+ var headerParams = {};
242
+ var formParams = {};
243
+ var authNames = ['ApiKeyAuth'];
244
+ var contentTypes = ['application/json'];
245
+ var accepts = ['application/json'];
246
+ var returnType = _DtoPriceResponse["default"];
247
+ return this.apiClient.callApi('/prices', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
248
+ }
249
+ }]);
250
+ }();
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _DtoCreateAPIKeyRequest = _interopRequireDefault(require("../model/DtoCreateAPIKeyRequest"));
9
+ var _DtoCreateAPIKeyResponse = _interopRequireDefault(require("../model/DtoCreateAPIKeyResponse"));
10
+ var _DtoListSecretsResponse = _interopRequireDefault(require("../model/DtoListSecretsResponse"));
11
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * FlexPrice API
20
+ * FlexPrice API Service
21
+ *
22
+ * The version of the OpenAPI document: 1.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * Secrets service.
32
+ * @module api/SecretsApi
33
+ * @version 1.0
34
+ */
35
+ var SecretsApi = exports["default"] = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new SecretsApi.
38
+ * @alias module:api/SecretsApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
+ function SecretsApi(apiClient) {
44
+ _classCallCheck(this, SecretsApi);
45
+ this.apiClient = apiClient || _ApiClient["default"].instance;
46
+ }
47
+
48
+ /**
49
+ * Callback function to receive the result of the secretsApiKeysGet operation.
50
+ * @callback module:api/SecretsApi~secretsApiKeysGetCallback
51
+ * @param {String} error Error message, if any.
52
+ * @param {module:model/DtoListSecretsResponse} data The data returned by the service call.
53
+ * @param {String} response The complete HTTP response.
54
+ */
55
+
56
+ /**
57
+ * List API keys
58
+ * Get a paginated list of API keys
59
+ * @param {Object} opts Optional parameters
60
+ * @param {Number} [limit] Limit
61
+ * @param {Number} [offset] Offset
62
+ * @param {String} [status] Status (published/archived)
63
+ * @param {module:api/SecretsApi~secretsApiKeysGetCallback} callback The callback function, accepting three arguments: error, data, response
64
+ * data is of type: {@link module:model/DtoListSecretsResponse}
65
+ */
66
+ return _createClass(SecretsApi, [{
67
+ key: "secretsApiKeysGet",
68
+ value: function secretsApiKeysGet(opts, callback) {
69
+ opts = opts || {};
70
+ var postBody = null;
71
+ var pathParams = {};
72
+ var queryParams = {
73
+ 'limit': opts['limit'],
74
+ 'offset': opts['offset'],
75
+ 'status': opts['status']
76
+ };
77
+ var headerParams = {};
78
+ var formParams = {};
79
+ var authNames = [];
80
+ var contentTypes = [];
81
+ var accepts = ['application/json'];
82
+ var returnType = _DtoListSecretsResponse["default"];
83
+ return this.apiClient.callApi('/secrets/api/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
84
+ }
85
+
86
+ /**
87
+ * Callback function to receive the result of the secretsApiKeysIdDelete operation.
88
+ * @callback module:api/SecretsApi~secretsApiKeysIdDeleteCallback
89
+ * @param {String} error Error message, if any.
90
+ * @param data This operation does not return a value.
91
+ * @param {String} response The complete HTTP response.
92
+ */
93
+
94
+ /**
95
+ * Delete an API key
96
+ * Delete an API key by ID
97
+ * @param {String} id API key ID
98
+ * @param {module:api/SecretsApi~secretsApiKeysIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
99
+ */
100
+ }, {
101
+ key: "secretsApiKeysIdDelete",
102
+ value: function secretsApiKeysIdDelete(id, callback) {
103
+ var postBody = null;
104
+ // verify the required parameter 'id' is set
105
+ if (id === undefined || id === null) {
106
+ throw new Error("Missing the required parameter 'id' when calling secretsApiKeysIdDelete");
107
+ }
108
+ var pathParams = {
109
+ 'id': id
110
+ };
111
+ var queryParams = {};
112
+ var headerParams = {};
113
+ var formParams = {};
114
+ var authNames = [];
115
+ var contentTypes = [];
116
+ var accepts = ['application/json'];
117
+ var returnType = null;
118
+ return this.apiClient.callApi('/secrets/api/keys/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
119
+ }
120
+
121
+ /**
122
+ * Callback function to receive the result of the secretsApiKeysPost operation.
123
+ * @callback module:api/SecretsApi~secretsApiKeysPostCallback
124
+ * @param {String} error Error message, if any.
125
+ * @param {module:model/DtoCreateAPIKeyResponse} data The data returned by the service call.
126
+ * @param {String} response The complete HTTP response.
127
+ */
128
+
129
+ /**
130
+ * Create a new API key
131
+ * Create a new API key with the specified type and permissions
132
+ * @param {module:model/DtoCreateAPIKeyRequest} request API key creation request
133
+ * @param {module:api/SecretsApi~secretsApiKeysPostCallback} callback The callback function, accepting three arguments: error, data, response
134
+ * data is of type: {@link module:model/DtoCreateAPIKeyResponse}
135
+ */
136
+ }, {
137
+ key: "secretsApiKeysPost",
138
+ value: function secretsApiKeysPost(request, callback) {
139
+ var postBody = request;
140
+ // verify the required parameter 'request' is set
141
+ if (request === undefined || request === null) {
142
+ throw new Error("Missing the required parameter 'request' when calling secretsApiKeysPost");
143
+ }
144
+ var pathParams = {};
145
+ var queryParams = {};
146
+ var headerParams = {};
147
+ var formParams = {};
148
+ var authNames = [];
149
+ var contentTypes = ['application/json'];
150
+ var accepts = ['application/json'];
151
+ var returnType = _DtoCreateAPIKeyResponse["default"];
152
+ return this.apiClient.callApi('/secrets/api/keys', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
153
+ }
154
+ }]);
155
+ }();