@equisoft/billing-sdk 0.0.2-snapshot.20250930230514

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 (189) hide show
  1. package/.openapi-generator/FILES +41 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +13 -0
  4. package/.tool-versions +3 -0
  5. package/README.md +46 -0
  6. package/dist/apis/DistributorV1Api.d.ts +37 -0
  7. package/dist/apis/DistributorV1Api.js +102 -0
  8. package/dist/apis/OrganizationV1Api.d.ts +180 -0
  9. package/dist/apis/OrganizationV1Api.js +566 -0
  10. package/dist/apis/UserV1Api.d.ts +63 -0
  11. package/dist/apis/UserV1Api.js +180 -0
  12. package/dist/apis/index.d.ts +3 -0
  13. package/dist/apis/index.js +21 -0
  14. package/dist/esm/apis/DistributorV1Api.d.ts +37 -0
  15. package/dist/esm/apis/DistributorV1Api.js +98 -0
  16. package/dist/esm/apis/OrganizationV1Api.d.ts +180 -0
  17. package/dist/esm/apis/OrganizationV1Api.js +562 -0
  18. package/dist/esm/apis/UserV1Api.d.ts +63 -0
  19. package/dist/esm/apis/UserV1Api.js +176 -0
  20. package/dist/esm/apis/index.d.ts +3 -0
  21. package/dist/esm/apis/index.js +5 -0
  22. package/dist/esm/index.d.ts +3 -0
  23. package/dist/esm/index.js +5 -0
  24. package/dist/esm/models/ErrorCodes.d.ts +31 -0
  25. package/dist/esm/models/ErrorCodes.js +49 -0
  26. package/dist/esm/models/ErrorSchema.d.ts +39 -0
  27. package/dist/esm/models/ErrorSchema.js +46 -0
  28. package/dist/esm/models/SubscriptionCreationMode.d.ts +26 -0
  29. package/dist/esm/models/SubscriptionCreationMode.js +44 -0
  30. package/dist/esm/models/V1BillingStatus.d.ts +48 -0
  31. package/dist/esm/models/V1BillingStatus.js +66 -0
  32. package/dist/esm/models/V1BillingType.d.ts +30 -0
  33. package/dist/esm/models/V1BillingType.js +48 -0
  34. package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
  35. package/dist/esm/models/V1ChargebeeV1NotPaidInvoice.js +49 -0
  36. package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
  37. package/dist/esm/models/V1ChargebeeV1PaymentDueInvoice.js +49 -0
  38. package/dist/esm/models/V1ChargebeeV1PortalSession.d.ts +44 -0
  39. package/dist/esm/models/V1ChargebeeV1PortalSession.js +49 -0
  40. package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
  41. package/dist/esm/models/V1ChargebeeV1UnpaidInvoice.js +49 -0
  42. package/dist/esm/models/V1CollectChargebeeV1Payment.d.ts +32 -0
  43. package/dist/esm/models/V1CollectChargebeeV1Payment.js +43 -0
  44. package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
  45. package/dist/esm/models/V1CreateChargebeeV1PortalSessionPayload.js +41 -0
  46. package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
  47. package/dist/esm/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +47 -0
  48. package/dist/esm/models/V1Distributor.d.ts +50 -0
  49. package/dist/esm/models/V1Distributor.js +53 -0
  50. package/dist/esm/models/V1DistributorList.d.ts +33 -0
  51. package/dist/esm/models/V1DistributorList.js +44 -0
  52. package/dist/esm/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
  53. package/dist/esm/models/V1MigrateLegacyBillingPayload.js +47 -0
  54. package/dist/esm/models/V1Organization.d.ts +57 -0
  55. package/dist/esm/models/V1Organization.js +54 -0
  56. package/dist/esm/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
  57. package/dist/esm/models/V1OrganizationChargebeeV1Status.js +72 -0
  58. package/dist/esm/models/V1OrganizationStatus.d.ts +59 -0
  59. package/dist/esm/models/V1OrganizationStatus.js +58 -0
  60. package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
  61. package/dist/esm/models/V1OrganizationStatusChargebeeV1Addon.js +49 -0
  62. package/dist/esm/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
  63. package/dist/esm/models/V1OrganizationStatusChargebeeV1User.js +53 -0
  64. package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
  65. package/dist/esm/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +58 -0
  66. package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
  67. package/dist/esm/models/V1SetChargebeeV1BillingPayorPayload.js +43 -0
  68. package/dist/esm/models/V1SetChargebeeV1Payload.d.ts +45 -0
  69. package/dist/esm/models/V1SetChargebeeV1Payload.js +52 -0
  70. package/dist/esm/models/V1SetLegacyBillingPayload.d.ts +45 -0
  71. package/dist/esm/models/V1SetLegacyBillingPayload.js +50 -0
  72. package/dist/esm/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
  73. package/dist/esm/models/V1SetOrganisationDistributorPayload.js +43 -0
  74. package/dist/esm/models/V1SetUserNonBillablePayload.d.ts +32 -0
  75. package/dist/esm/models/V1SetUserNonBillablePayload.js +43 -0
  76. package/dist/esm/models/V1User.d.ts +50 -0
  77. package/dist/esm/models/V1User.js +55 -0
  78. package/dist/esm/models/V1UserServiceStatus.d.ts +44 -0
  79. package/dist/esm/models/V1UserServiceStatus.js +51 -0
  80. package/dist/esm/models/V1UserStatus.d.ts +33 -0
  81. package/dist/esm/models/V1UserStatus.js +44 -0
  82. package/dist/esm/models/index.d.ts +29 -0
  83. package/dist/esm/models/index.js +31 -0
  84. package/dist/esm/runtime.d.ts +184 -0
  85. package/dist/esm/runtime.js +334 -0
  86. package/dist/index.d.ts +3 -0
  87. package/dist/index.js +21 -0
  88. package/dist/models/ErrorCodes.d.ts +31 -0
  89. package/dist/models/ErrorCodes.js +57 -0
  90. package/dist/models/ErrorSchema.d.ts +39 -0
  91. package/dist/models/ErrorSchema.js +53 -0
  92. package/dist/models/SubscriptionCreationMode.d.ts +26 -0
  93. package/dist/models/SubscriptionCreationMode.js +52 -0
  94. package/dist/models/V1BillingStatus.d.ts +48 -0
  95. package/dist/models/V1BillingStatus.js +74 -0
  96. package/dist/models/V1BillingType.d.ts +30 -0
  97. package/dist/models/V1BillingType.js +56 -0
  98. package/dist/models/V1ChargebeeV1NotPaidInvoice.d.ts +44 -0
  99. package/dist/models/V1ChargebeeV1NotPaidInvoice.js +56 -0
  100. package/dist/models/V1ChargebeeV1PaymentDueInvoice.d.ts +44 -0
  101. package/dist/models/V1ChargebeeV1PaymentDueInvoice.js +56 -0
  102. package/dist/models/V1ChargebeeV1PortalSession.d.ts +44 -0
  103. package/dist/models/V1ChargebeeV1PortalSession.js +56 -0
  104. package/dist/models/V1ChargebeeV1UnpaidInvoice.d.ts +44 -0
  105. package/dist/models/V1ChargebeeV1UnpaidInvoice.js +56 -0
  106. package/dist/models/V1CollectChargebeeV1Payment.d.ts +32 -0
  107. package/dist/models/V1CollectChargebeeV1Payment.js +50 -0
  108. package/dist/models/V1CreateChargebeeV1PortalSessionPayload.d.ts +32 -0
  109. package/dist/models/V1CreateChargebeeV1PortalSessionPayload.js +48 -0
  110. package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.d.ts +38 -0
  111. package/dist/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.js +54 -0
  112. package/dist/models/V1Distributor.d.ts +50 -0
  113. package/dist/models/V1Distributor.js +60 -0
  114. package/dist/models/V1DistributorList.d.ts +33 -0
  115. package/dist/models/V1DistributorList.js +51 -0
  116. package/dist/models/V1MigrateLegacyBillingPayload.d.ts +38 -0
  117. package/dist/models/V1MigrateLegacyBillingPayload.js +54 -0
  118. package/dist/models/V1Organization.d.ts +57 -0
  119. package/dist/models/V1Organization.js +61 -0
  120. package/dist/models/V1OrganizationChargebeeV1Status.d.ts +79 -0
  121. package/dist/models/V1OrganizationChargebeeV1Status.js +79 -0
  122. package/dist/models/V1OrganizationStatus.d.ts +59 -0
  123. package/dist/models/V1OrganizationStatus.js +65 -0
  124. package/dist/models/V1OrganizationStatusChargebeeV1Addon.d.ts +44 -0
  125. package/dist/models/V1OrganizationStatusChargebeeV1Addon.js +56 -0
  126. package/dist/models/V1OrganizationStatusChargebeeV1User.d.ts +46 -0
  127. package/dist/models/V1OrganizationStatusChargebeeV1User.js +60 -0
  128. package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.d.ts +40 -0
  129. package/dist/models/V1OrganizationStatusChargebeeV1UserBillingStatus.js +66 -0
  130. package/dist/models/V1SetChargebeeV1BillingPayorPayload.d.ts +32 -0
  131. package/dist/models/V1SetChargebeeV1BillingPayorPayload.js +50 -0
  132. package/dist/models/V1SetChargebeeV1Payload.d.ts +45 -0
  133. package/dist/models/V1SetChargebeeV1Payload.js +59 -0
  134. package/dist/models/V1SetLegacyBillingPayload.d.ts +45 -0
  135. package/dist/models/V1SetLegacyBillingPayload.js +57 -0
  136. package/dist/models/V1SetOrganisationDistributorPayload.d.ts +32 -0
  137. package/dist/models/V1SetOrganisationDistributorPayload.js +50 -0
  138. package/dist/models/V1SetUserNonBillablePayload.d.ts +32 -0
  139. package/dist/models/V1SetUserNonBillablePayload.js +50 -0
  140. package/dist/models/V1User.d.ts +50 -0
  141. package/dist/models/V1User.js +62 -0
  142. package/dist/models/V1UserServiceStatus.d.ts +44 -0
  143. package/dist/models/V1UserServiceStatus.js +58 -0
  144. package/dist/models/V1UserStatus.d.ts +33 -0
  145. package/dist/models/V1UserStatus.js +51 -0
  146. package/dist/models/index.d.ts +29 -0
  147. package/dist/models/index.js +47 -0
  148. package/dist/runtime.d.ts +184 -0
  149. package/dist/runtime.js +350 -0
  150. package/package.json +22 -0
  151. package/renovate.json +6 -0
  152. package/src/apis/DistributorV1Api.ts +117 -0
  153. package/src/apis/OrganizationV1Api.ts +784 -0
  154. package/src/apis/UserV1Api.ts +232 -0
  155. package/src/apis/index.ts +5 -0
  156. package/src/index.ts +5 -0
  157. package/src/models/ErrorCodes.ts +59 -0
  158. package/src/models/ErrorSchema.ts +84 -0
  159. package/src/models/SubscriptionCreationMode.ts +54 -0
  160. package/src/models/V1BillingStatus.ts +76 -0
  161. package/src/models/V1BillingType.ts +58 -0
  162. package/src/models/V1ChargebeeV1NotPaidInvoice.ts +83 -0
  163. package/src/models/V1ChargebeeV1PaymentDueInvoice.ts +83 -0
  164. package/src/models/V1ChargebeeV1PortalSession.ts +83 -0
  165. package/src/models/V1ChargebeeV1UnpaidInvoice.ts +83 -0
  166. package/src/models/V1CollectChargebeeV1Payment.ts +66 -0
  167. package/src/models/V1CreateChargebeeV1PortalSessionPayload.ts +65 -0
  168. package/src/models/V1CreateOrUpdateChargebeeV1SubscriptionPayload.ts +75 -0
  169. package/src/models/V1Distributor.ts +92 -0
  170. package/src/models/V1DistributorList.ts +74 -0
  171. package/src/models/V1MigrateLegacyBillingPayload.ts +75 -0
  172. package/src/models/V1Organization.ts +109 -0
  173. package/src/models/V1OrganizationChargebeeV1Status.ts +163 -0
  174. package/src/models/V1OrganizationStatus.ts +124 -0
  175. package/src/models/V1OrganizationStatusChargebeeV1Addon.ts +83 -0
  176. package/src/models/V1OrganizationStatusChargebeeV1User.ts +101 -0
  177. package/src/models/V1OrganizationStatusChargebeeV1UserBillingStatus.ts +68 -0
  178. package/src/models/V1SetChargebeeV1BillingPayorPayload.ts +66 -0
  179. package/src/models/V1SetChargebeeV1Payload.ts +94 -0
  180. package/src/models/V1SetLegacyBillingPayload.ts +93 -0
  181. package/src/models/V1SetOrganisationDistributorPayload.ts +66 -0
  182. package/src/models/V1SetUserNonBillablePayload.ts +66 -0
  183. package/src/models/V1User.ts +93 -0
  184. package/src/models/V1UserServiceStatus.ts +84 -0
  185. package/src/models/V1UserStatus.ts +74 -0
  186. package/src/models/index.ts +31 -0
  187. package/src/runtime.ts +432 -0
  188. package/tsconfig.esm.json +7 -0
  189. package/tsconfig.json +16 -0
@@ -0,0 +1,334 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Billing
5
+ * Micro-Service to handle billing
6
+ *
7
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
8
+ * Contact: customersuccess@equisoft.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ export const BASE_PATH = "http://../..".replace(/\/+$/, "");
24
+ export class Configuration {
25
+ constructor(configuration = {}) {
26
+ this.configuration = configuration;
27
+ }
28
+ set config(configuration) {
29
+ this.configuration = configuration;
30
+ }
31
+ get basePath() {
32
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
33
+ }
34
+ get fetchApi() {
35
+ return this.configuration.fetchApi;
36
+ }
37
+ get middleware() {
38
+ return this.configuration.middleware || [];
39
+ }
40
+ get queryParamsStringify() {
41
+ return this.configuration.queryParamsStringify || querystring;
42
+ }
43
+ get username() {
44
+ return this.configuration.username;
45
+ }
46
+ get password() {
47
+ return this.configuration.password;
48
+ }
49
+ get apiKey() {
50
+ const apiKey = this.configuration.apiKey;
51
+ if (apiKey) {
52
+ return typeof apiKey === 'function' ? apiKey : () => apiKey;
53
+ }
54
+ return undefined;
55
+ }
56
+ get accessToken() {
57
+ const accessToken = this.configuration.accessToken;
58
+ if (accessToken) {
59
+ return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
60
+ }
61
+ return undefined;
62
+ }
63
+ get headers() {
64
+ return this.configuration.headers;
65
+ }
66
+ get credentials() {
67
+ return this.configuration.credentials;
68
+ }
69
+ }
70
+ export const DefaultConfig = new Configuration();
71
+ /**
72
+ * This is the base class for all generated API classes.
73
+ */
74
+ export class BaseAPI {
75
+ constructor(configuration = DefaultConfig) {
76
+ this.configuration = configuration;
77
+ this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
78
+ let fetchParams = { url, init };
79
+ for (const middleware of this.middleware) {
80
+ if (middleware.pre) {
81
+ fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
82
+ }
83
+ }
84
+ let response = undefined;
85
+ try {
86
+ response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
87
+ }
88
+ catch (e) {
89
+ for (const middleware of this.middleware) {
90
+ if (middleware.onError) {
91
+ response = (yield middleware.onError({
92
+ fetch: this.fetchApi,
93
+ url: fetchParams.url,
94
+ init: fetchParams.init,
95
+ error: e,
96
+ response: response ? response.clone() : undefined,
97
+ })) || response;
98
+ }
99
+ }
100
+ if (response === undefined) {
101
+ if (e instanceof Error) {
102
+ throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
103
+ }
104
+ else {
105
+ throw e;
106
+ }
107
+ }
108
+ }
109
+ for (const middleware of this.middleware) {
110
+ if (middleware.post) {
111
+ response = (yield middleware.post({
112
+ fetch: this.fetchApi,
113
+ url: fetchParams.url,
114
+ init: fetchParams.init,
115
+ response: response.clone(),
116
+ })) || response;
117
+ }
118
+ }
119
+ return response;
120
+ });
121
+ this.middleware = configuration.middleware;
122
+ }
123
+ withMiddleware(...middlewares) {
124
+ const next = this.clone();
125
+ next.middleware = next.middleware.concat(...middlewares);
126
+ return next;
127
+ }
128
+ withPreMiddleware(...preMiddlewares) {
129
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
130
+ return this.withMiddleware(...middlewares);
131
+ }
132
+ withPostMiddleware(...postMiddlewares) {
133
+ const middlewares = postMiddlewares.map((post) => ({ post }));
134
+ return this.withMiddleware(...middlewares);
135
+ }
136
+ /**
137
+ * Check if the given MIME is a JSON MIME.
138
+ * JSON MIME examples:
139
+ * application/json
140
+ * application/json; charset=UTF8
141
+ * APPLICATION/JSON
142
+ * application/vnd.company+json
143
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
144
+ * @return True if the given MIME is JSON, false otherwise.
145
+ */
146
+ isJsonMime(mime) {
147
+ if (!mime) {
148
+ return false;
149
+ }
150
+ return BaseAPI.jsonRegex.test(mime);
151
+ }
152
+ request(context, initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const { url, init } = yield this.createFetchParams(context, initOverrides);
155
+ const response = yield this.fetchApi(url, init);
156
+ if (response && (response.status >= 200 && response.status < 300)) {
157
+ return response;
158
+ }
159
+ throw new ResponseError(response, 'Response returned an error code');
160
+ });
161
+ }
162
+ createFetchParams(context, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ let url = this.configuration.basePath + context.path;
165
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
166
+ // only add the querystring to the URL if there are query parameters.
167
+ // this is done to avoid urls ending with a "?" character which buggy webservers
168
+ // do not handle correctly sometimes.
169
+ url += '?' + this.configuration.queryParamsStringify(context.query);
170
+ }
171
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
172
+ Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
173
+ const initOverrideFn = typeof initOverrides === "function"
174
+ ? initOverrides
175
+ : () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
176
+ const initParams = {
177
+ method: context.method,
178
+ headers,
179
+ body: context.body,
180
+ credentials: this.configuration.credentials,
181
+ };
182
+ const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
183
+ init: initParams,
184
+ context,
185
+ })));
186
+ let body;
187
+ if (isFormData(overriddenInit.body)
188
+ || (overriddenInit.body instanceof URLSearchParams)
189
+ || isBlob(overriddenInit.body)) {
190
+ body = overriddenInit.body;
191
+ }
192
+ else if (this.isJsonMime(headers['Content-Type'])) {
193
+ body = JSON.stringify(overriddenInit.body);
194
+ }
195
+ else {
196
+ body = overriddenInit.body;
197
+ }
198
+ const init = Object.assign(Object.assign({}, overriddenInit), { body });
199
+ return { url, init };
200
+ });
201
+ }
202
+ /**
203
+ * Create a shallow clone of `this` by constructing a new instance
204
+ * and then shallow cloning data members.
205
+ */
206
+ clone() {
207
+ const constructor = this.constructor;
208
+ const next = new constructor(this.configuration);
209
+ next.middleware = this.middleware.slice();
210
+ return next;
211
+ }
212
+ }
213
+ BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
214
+ ;
215
+ function isBlob(value) {
216
+ return typeof Blob !== 'undefined' && value instanceof Blob;
217
+ }
218
+ function isFormData(value) {
219
+ return typeof FormData !== "undefined" && value instanceof FormData;
220
+ }
221
+ export class ResponseError extends Error {
222
+ constructor(response, msg) {
223
+ super(msg);
224
+ this.response = response;
225
+ this.name = "ResponseError";
226
+ }
227
+ }
228
+ export class FetchError extends Error {
229
+ constructor(cause, msg) {
230
+ super(msg);
231
+ this.cause = cause;
232
+ this.name = "FetchError";
233
+ }
234
+ }
235
+ export class RequiredError extends Error {
236
+ constructor(field, msg) {
237
+ super(msg);
238
+ this.field = field;
239
+ this.name = "RequiredError";
240
+ }
241
+ }
242
+ export const COLLECTION_FORMATS = {
243
+ csv: ",",
244
+ ssv: " ",
245
+ tsv: "\t",
246
+ pipes: "|",
247
+ };
248
+ export function querystring(params, prefix = '') {
249
+ return Object.keys(params)
250
+ .map(key => querystringSingleKey(key, params[key], prefix))
251
+ .filter(part => part.length > 0)
252
+ .join('&');
253
+ }
254
+ function querystringSingleKey(key, value, keyPrefix = '') {
255
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
256
+ if (value instanceof Array) {
257
+ const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
258
+ .join(`&${encodeURIComponent(fullKey)}=`);
259
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
260
+ }
261
+ if (value instanceof Set) {
262
+ const valueAsArray = Array.from(value);
263
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
264
+ }
265
+ if (value instanceof Date) {
266
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
267
+ }
268
+ if (value instanceof Object) {
269
+ return querystring(value, fullKey);
270
+ }
271
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
272
+ }
273
+ export function exists(json, key) {
274
+ const value = json[key];
275
+ return value !== null && value !== undefined;
276
+ }
277
+ export function mapValues(data, fn) {
278
+ const result = {};
279
+ for (const key of Object.keys(data)) {
280
+ result[key] = fn(data[key]);
281
+ }
282
+ return result;
283
+ }
284
+ export function canConsumeForm(consumes) {
285
+ for (const consume of consumes) {
286
+ if ('multipart/form-data' === consume.contentType) {
287
+ return true;
288
+ }
289
+ }
290
+ return false;
291
+ }
292
+ export class JSONApiResponse {
293
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
294
+ this.raw = raw;
295
+ this.transformer = transformer;
296
+ }
297
+ value() {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ return this.transformer(yield this.raw.json());
300
+ });
301
+ }
302
+ }
303
+ export class VoidApiResponse {
304
+ constructor(raw) {
305
+ this.raw = raw;
306
+ }
307
+ value() {
308
+ return __awaiter(this, void 0, void 0, function* () {
309
+ return undefined;
310
+ });
311
+ }
312
+ }
313
+ export class BlobApiResponse {
314
+ constructor(raw) {
315
+ this.raw = raw;
316
+ }
317
+ value() {
318
+ return __awaiter(this, void 0, void 0, function* () {
319
+ return yield this.raw.blob();
320
+ });
321
+ }
322
+ ;
323
+ }
324
+ export class TextApiResponse {
325
+ constructor(raw) {
326
+ this.raw = raw;
327
+ }
328
+ value() {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ return yield this.raw.text();
331
+ });
332
+ }
333
+ ;
334
+ }
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Billing
3
+ * Micro-Service to handle billing
4
+ *
5
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
6
+ * Contact: customersuccess@equisoft.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const ErrorCodes: {
17
+ readonly NOT_FOUND: "NOT_FOUND";
18
+ readonly SERVER_ERROR: "SERVER_ERROR";
19
+ readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
20
+ readonly INVALID_BILLING_TYPE: "INVALID_BILLING_TYPE";
21
+ readonly ACCESS_DENIED: "ACCESS_DENIED";
22
+ readonly PAYMENT_ERROR: "PAYMENT_ERROR";
23
+ readonly INVALID_PORTAL_SESSION_REDIRECT_URL: "INVALID_PORTAL_SESSION_REDIRECT_URL";
24
+ readonly unknown_default_open_api: "11184809";
25
+ };
26
+ export type ErrorCodes = typeof ErrorCodes[keyof typeof ErrorCodes];
27
+ export declare function instanceOfErrorCodes(value: any): boolean;
28
+ export declare function ErrorCodesFromJSON(json: any): ErrorCodes;
29
+ export declare function ErrorCodesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorCodes;
30
+ export declare function ErrorCodesToJSON(value?: ErrorCodes | null): any;
31
+ export declare function ErrorCodesToJSONTyped(value: any, ignoreDiscriminator: boolean): ErrorCodes;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Billing
6
+ * Micro-Service to handle billing
7
+ *
8
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
9
+ * Contact: customersuccess@equisoft.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ErrorCodes = void 0;
17
+ exports.instanceOfErrorCodes = instanceOfErrorCodes;
18
+ exports.ErrorCodesFromJSON = ErrorCodesFromJSON;
19
+ exports.ErrorCodesFromJSONTyped = ErrorCodesFromJSONTyped;
20
+ exports.ErrorCodesToJSON = ErrorCodesToJSON;
21
+ exports.ErrorCodesToJSONTyped = ErrorCodesToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.ErrorCodes = {
27
+ NOT_FOUND: 'NOT_FOUND',
28
+ SERVER_ERROR: 'SERVER_ERROR',
29
+ SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
30
+ INVALID_BILLING_TYPE: 'INVALID_BILLING_TYPE',
31
+ ACCESS_DENIED: 'ACCESS_DENIED',
32
+ PAYMENT_ERROR: 'PAYMENT_ERROR',
33
+ INVALID_PORTAL_SESSION_REDIRECT_URL: 'INVALID_PORTAL_SESSION_REDIRECT_URL',
34
+ unknown_default_open_api: '11184809'
35
+ };
36
+ function instanceOfErrorCodes(value) {
37
+ for (const key in exports.ErrorCodes) {
38
+ if (Object.prototype.hasOwnProperty.call(exports.ErrorCodes, key)) {
39
+ if (exports.ErrorCodes[key] === value) {
40
+ return true;
41
+ }
42
+ }
43
+ }
44
+ return false;
45
+ }
46
+ function ErrorCodesFromJSON(json) {
47
+ return ErrorCodesFromJSONTyped(json, false);
48
+ }
49
+ function ErrorCodesFromJSONTyped(json, ignoreDiscriminator) {
50
+ return json;
51
+ }
52
+ function ErrorCodesToJSON(value) {
53
+ return value;
54
+ }
55
+ function ErrorCodesToJSONTyped(value, ignoreDiscriminator) {
56
+ return value;
57
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Billing
3
+ * Micro-Service to handle billing
4
+ *
5
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
6
+ * Contact: customersuccess@equisoft.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ErrorCodes } from './ErrorCodes';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ErrorSchema
17
+ */
18
+ export interface ErrorSchema {
19
+ /**
20
+ *
21
+ * @type {ErrorCodes}
22
+ * @memberof ErrorSchema
23
+ */
24
+ code: ErrorCodes;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ErrorSchema
29
+ */
30
+ message?: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ErrorSchema interface.
34
+ */
35
+ export declare function instanceOfErrorSchema(value: object): value is ErrorSchema;
36
+ export declare function ErrorSchemaFromJSON(json: any): ErrorSchema;
37
+ export declare function ErrorSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSchema;
38
+ export declare function ErrorSchemaToJSON(json: any): ErrorSchema;
39
+ export declare function ErrorSchemaToJSONTyped(value?: ErrorSchema | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Billing
6
+ * Micro-Service to handle billing
7
+ *
8
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
9
+ * Contact: customersuccess@equisoft.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfErrorSchema = instanceOfErrorSchema;
17
+ exports.ErrorSchemaFromJSON = ErrorSchemaFromJSON;
18
+ exports.ErrorSchemaFromJSONTyped = ErrorSchemaFromJSONTyped;
19
+ exports.ErrorSchemaToJSON = ErrorSchemaToJSON;
20
+ exports.ErrorSchemaToJSONTyped = ErrorSchemaToJSONTyped;
21
+ const ErrorCodes_1 = require("./ErrorCodes");
22
+ /**
23
+ * Check if a given object implements the ErrorSchema interface.
24
+ */
25
+ function instanceOfErrorSchema(value) {
26
+ if (!('code' in value) || value['code'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function ErrorSchemaFromJSON(json) {
31
+ return ErrorSchemaFromJSONTyped(json, false);
32
+ }
33
+ function ErrorSchemaFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'code': (0, ErrorCodes_1.ErrorCodesFromJSON)(json['code']),
39
+ 'message': json['message'] == null ? undefined : json['message'],
40
+ };
41
+ }
42
+ function ErrorSchemaToJSON(json) {
43
+ return ErrorSchemaToJSONTyped(json, false);
44
+ }
45
+ function ErrorSchemaToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'code': (0, ErrorCodes_1.ErrorCodesToJSON)(value['code']),
51
+ 'message': value['message'],
52
+ };
53
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Billing
3
+ * Micro-Service to handle billing
4
+ *
5
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
6
+ * Contact: customersuccess@equisoft.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const SubscriptionCreationMode: {
17
+ readonly CREATE_ON_FIRST_PAYMENT: "CREATE_ON_FIRST_PAYMENT";
18
+ readonly CREATE_NOW_WITH_PAYMENT_DUE: "CREATE_NOW_WITH_PAYMENT_DUE";
19
+ readonly unknown_default_open_api: "11184809";
20
+ };
21
+ export type SubscriptionCreationMode = typeof SubscriptionCreationMode[keyof typeof SubscriptionCreationMode];
22
+ export declare function instanceOfSubscriptionCreationMode(value: any): boolean;
23
+ export declare function SubscriptionCreationModeFromJSON(json: any): SubscriptionCreationMode;
24
+ export declare function SubscriptionCreationModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCreationMode;
25
+ export declare function SubscriptionCreationModeToJSON(value?: SubscriptionCreationMode | null): any;
26
+ export declare function SubscriptionCreationModeToJSONTyped(value: any, ignoreDiscriminator: boolean): SubscriptionCreationMode;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Billing
6
+ * Micro-Service to handle billing
7
+ *
8
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
9
+ * Contact: customersuccess@equisoft.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SubscriptionCreationMode = void 0;
17
+ exports.instanceOfSubscriptionCreationMode = instanceOfSubscriptionCreationMode;
18
+ exports.SubscriptionCreationModeFromJSON = SubscriptionCreationModeFromJSON;
19
+ exports.SubscriptionCreationModeFromJSONTyped = SubscriptionCreationModeFromJSONTyped;
20
+ exports.SubscriptionCreationModeToJSON = SubscriptionCreationModeToJSON;
21
+ exports.SubscriptionCreationModeToJSONTyped = SubscriptionCreationModeToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.SubscriptionCreationMode = {
27
+ CREATE_ON_FIRST_PAYMENT: 'CREATE_ON_FIRST_PAYMENT',
28
+ CREATE_NOW_WITH_PAYMENT_DUE: 'CREATE_NOW_WITH_PAYMENT_DUE',
29
+ unknown_default_open_api: '11184809'
30
+ };
31
+ function instanceOfSubscriptionCreationMode(value) {
32
+ for (const key in exports.SubscriptionCreationMode) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.SubscriptionCreationMode, key)) {
34
+ if (exports.SubscriptionCreationMode[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function SubscriptionCreationModeFromJSON(json) {
42
+ return SubscriptionCreationModeFromJSONTyped(json, false);
43
+ }
44
+ function SubscriptionCreationModeFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function SubscriptionCreationModeToJSON(value) {
48
+ return value;
49
+ }
50
+ function SubscriptionCreationModeToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Billing
3
+ * Micro-Service to handle billing
4
+ *
5
+ * The version of the OpenAPI document: 2.1.1-SNAPSHOT
6
+ * Contact: customersuccess@equisoft.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Billing status of the organization. This is agnostic and complementary to the billingType
14
+ * @export
15
+ */
16
+ export declare const V1BillingStatus: {
17
+ /**
18
+ * Automatic billing with active subscription
19
+ */
20
+ readonly ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION";
21
+ /**
22
+ * Automatic billing without subscription. Waiting customer first payment.
23
+ */
24
+ readonly NO_SUBSCRIPTION: "NO_SUBSCRIPTION";
25
+ /**
26
+ * Automatic billing without unpaid invoices
27
+ */
28
+ readonly UNPAID_SUBSCRIPTION: "UNPAID_SUBSCRIPTION";
29
+ /**
30
+ * Automatic billing with canceled subscription
31
+ */
32
+ readonly CANCELLED_SUBSCRIPTION: "CANCELLED_SUBSCRIPTION";
33
+ /**
34
+ * Manual billing
35
+ */
36
+ readonly MANUAL: "MANUAL";
37
+ /**
38
+ * No billing
39
+ */
40
+ readonly NONE: "NONE";
41
+ readonly unknown_default_open_api: "11184809";
42
+ };
43
+ export type V1BillingStatus = typeof V1BillingStatus[keyof typeof V1BillingStatus];
44
+ export declare function instanceOfV1BillingStatus(value: any): boolean;
45
+ export declare function V1BillingStatusFromJSON(json: any): V1BillingStatus;
46
+ export declare function V1BillingStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1BillingStatus;
47
+ export declare function V1BillingStatusToJSON(value?: V1BillingStatus | null): any;
48
+ export declare function V1BillingStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): V1BillingStatus;