@mintmoney/react 0.1.0-alpha.11 → 0.1.0-alpha.12

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 (87) hide show
  1. package/dist/esm/api/checkouts.js +9 -9
  2. package/dist/esm/api/generated.js +544 -592
  3. package/dist/esm/api/index.js +10 -10
  4. package/dist/esm/api/payments.js +17 -21
  5. package/dist/esm/api/types.js +8 -2
  6. package/dist/esm/api/types.js.map +1 -1
  7. package/dist/esm/checkout/container.js +2 -2
  8. package/dist/esm/checkout/index.js +18 -38
  9. package/dist/esm/checkout/modal.js +52 -63
  10. package/dist/esm/checkout/views/back.js +3 -7
  11. package/dist/esm/checkout/views/card-intent/details.js +4 -21
  12. package/dist/esm/checkout/views/crypto-intent/curreny.js +18 -43
  13. package/dist/esm/checkout/views/crypto-intent/curreny.js.map +1 -1
  14. package/dist/esm/checkout/views/crypto-intent/direct-details.js +16 -60
  15. package/dist/esm/checkout/views/crypto-intent/methods.js +19 -27
  16. package/dist/esm/checkout/views/crypto-intent/processing.js +31 -39
  17. package/dist/esm/checkout/views/crypto-intent/processing.js.map +1 -1
  18. package/dist/esm/checkout/views/crypto-intent/success.js +14 -32
  19. package/dist/esm/checkout/views/initial.js +24 -29
  20. package/dist/esm/checkout/views/method-select.js +10 -24
  21. package/dist/esm/components/buttons/index.js +11 -20
  22. package/dist/esm/components/icons/checkMark.js +4 -16
  23. package/dist/esm/components/icons/close.js +4 -19
  24. package/dist/esm/components/icons/index.js +1 -1
  25. package/dist/esm/components/index.js +1 -1
  26. package/dist/esm/components/lists/empty.js +2 -5
  27. package/dist/esm/components/lists/index.js +8 -47
  28. package/dist/esm/components/loading/index.js +6 -47
  29. package/dist/esm/components/modals/index.js +1 -1
  30. package/dist/esm/components/modals/modal-with-views.js +23 -62
  31. package/dist/esm/components/modals/modal.js +11 -67
  32. package/dist/esm/components/modals/use-modal-with-views.js +22 -25
  33. package/dist/esm/components/text/index.js +21 -21
  34. package/dist/esm/config.js +14 -5
  35. package/dist/esm/config.js.map +1 -1
  36. package/dist/esm/context.js +10 -18
  37. package/dist/esm/index.js +1 -1
  38. package/dist/esm/state/checkout/store.js +144 -144
  39. package/dist/esm/state/checkout/store.js.map +1 -1
  40. package/dist/esm/themes/default.js +55 -55
  41. package/dist/esm/themes/index.js +1 -1
  42. package/dist/esm/themes/types.js +1 -1
  43. package/dist/esm/utils/cn.js +1 -1
  44. package/dist/types/api/checkouts.d.ts +5 -5
  45. package/dist/types/api/generated.d.ts +835 -924
  46. package/dist/types/api/index.d.ts +1 -1
  47. package/dist/types/api/payments.d.ts +3 -10
  48. package/dist/types/api/types.d.ts +16 -14
  49. package/dist/types/api/types.d.ts.map +1 -1
  50. package/dist/types/checkout/container.d.ts +2 -12
  51. package/dist/types/checkout/index.d.ts +6 -10
  52. package/dist/types/checkout/modal.d.ts +5 -7
  53. package/dist/types/checkout/views/back.d.ts +3 -5
  54. package/dist/types/checkout/views/card-intent/details.d.ts +1 -1
  55. package/dist/types/checkout/views/crypto-intent/curreny.d.ts +1 -1
  56. package/dist/types/checkout/views/crypto-intent/curreny.d.ts.map +1 -1
  57. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts +2 -4
  58. package/dist/types/checkout/views/crypto-intent/methods.d.ts +1 -1
  59. package/dist/types/checkout/views/crypto-intent/processing.d.ts +1 -1
  60. package/dist/types/checkout/views/crypto-intent/processing.d.ts.map +1 -1
  61. package/dist/types/checkout/views/crypto-intent/success.d.ts +3 -5
  62. package/dist/types/checkout/views/initial.d.ts +3 -5
  63. package/dist/types/checkout/views/method-select.d.ts +1 -1
  64. package/dist/types/components/buttons/index.d.ts +6 -16
  65. package/dist/types/components/icons/checkMark.d.ts +3 -5
  66. package/dist/types/components/icons/close.d.ts +3 -5
  67. package/dist/types/components/icons/index.d.ts +1 -1
  68. package/dist/types/components/index.d.ts +1 -1
  69. package/dist/types/components/lists/empty.d.ts +3 -5
  70. package/dist/types/components/lists/index.d.ts +9 -17
  71. package/dist/types/components/loading/index.d.ts +4 -4
  72. package/dist/types/components/modals/index.d.ts +1 -1
  73. package/dist/types/components/modals/modal-with-views.d.ts +18 -23
  74. package/dist/types/components/modals/modal.d.ts +9 -17
  75. package/dist/types/components/modals/use-modal-with-views.d.ts +6 -9
  76. package/dist/types/components/text/index.d.ts +7 -17
  77. package/dist/types/config.d.ts +16 -12
  78. package/dist/types/config.d.ts.map +1 -1
  79. package/dist/types/context.d.ts +4 -7
  80. package/dist/types/index.d.ts +1 -1
  81. package/dist/types/state/checkout/store.d.ts +51 -74
  82. package/dist/types/state/checkout/store.d.ts.map +1 -1
  83. package/dist/types/themes/default.d.ts +1 -1
  84. package/dist/types/themes/index.d.ts +1 -1
  85. package/dist/types/themes/types.d.ts +26 -25
  86. package/dist/types/utils/cn.d.ts +1 -1
  87. package/package.json +1 -1
@@ -10,234 +10,208 @@
10
10
  */
11
11
  export var ContentType;
12
12
  (function (ContentType) {
13
- ContentType["Json"] = "application/json";
14
- ContentType["FormData"] = "multipart/form-data";
15
- ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
16
- ContentType["Text"] = "text/plain";
13
+ ContentType["Json"] = "application/json";
14
+ ContentType["FormData"] = "multipart/form-data";
15
+ ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
16
+ ContentType["Text"] = "text/plain";
17
17
  })(ContentType || (ContentType = {}));
18
18
  export class HttpClient {
19
- constructor(apiConfig = {}) {
20
- Object.defineProperty(this, "baseUrl", {
21
- enumerable: true,
22
- configurable: true,
23
- writable: true,
24
- value: "https://api.local.getmint.money",
25
- });
26
- Object.defineProperty(this, "securityData", {
27
- enumerable: true,
28
- configurable: true,
29
- writable: true,
30
- value: null,
31
- });
32
- Object.defineProperty(this, "securityWorker", {
33
- enumerable: true,
34
- configurable: true,
35
- writable: true,
36
- value: void 0,
37
- });
38
- Object.defineProperty(this, "abortControllers", {
39
- enumerable: true,
40
- configurable: true,
41
- writable: true,
42
- value: new Map(),
43
- });
44
- Object.defineProperty(this, "customFetch", {
45
- enumerable: true,
46
- configurable: true,
47
- writable: true,
48
- value: (...fetchParams) => fetch(...fetchParams),
49
- });
50
- Object.defineProperty(this, "baseApiParams", {
51
- enumerable: true,
52
- configurable: true,
53
- writable: true,
54
- value: {
55
- credentials: "same-origin",
56
- headers: {},
57
- redirect: "follow",
58
- referrerPolicy: "no-referrer",
59
- },
60
- });
61
- Object.defineProperty(this, "setSecurityData", {
62
- enumerable: true,
63
- configurable: true,
64
- writable: true,
65
- value: (data) => {
66
- this.securityData = data;
67
- },
68
- });
69
- Object.defineProperty(this, "contentFormatters", {
70
- enumerable: true,
71
- configurable: true,
72
- writable: true,
73
- value: {
74
- [ContentType.Json]: (input) =>
75
- input !== null &&
76
- (typeof input === "object" || typeof input === "string")
77
- ? JSON.stringify(input)
78
- : input,
79
- [ContentType.Text]: (input) =>
80
- input !== null && typeof input !== "string"
81
- ? JSON.stringify(input)
82
- : input,
83
- [ContentType.FormData]: (input) =>
84
- Object.keys(input || {}).reduce((formData, key) => {
85
- const property = input[key];
86
- formData.append(
87
- key,
88
- property instanceof Blob
89
- ? property
90
- : typeof property === "object" && property !== null
91
- ? JSON.stringify(property)
92
- : `${property}`,
93
- );
94
- return formData;
95
- }, new FormData()),
96
- [ContentType.UrlEncoded]: (input) => this.toQueryString(input),
97
- },
98
- });
99
- Object.defineProperty(this, "createAbortSignal", {
100
- enumerable: true,
101
- configurable: true,
102
- writable: true,
103
- value: (cancelToken) => {
104
- if (this.abortControllers.has(cancelToken)) {
105
- const abortController = this.abortControllers.get(cancelToken);
106
- if (abortController) {
107
- return abortController.signal;
108
- }
109
- return void 0;
110
- }
111
- const abortController = new AbortController();
112
- this.abortControllers.set(cancelToken, abortController);
113
- return abortController.signal;
114
- },
115
- });
116
- Object.defineProperty(this, "abortRequest", {
117
- enumerable: true,
118
- configurable: true,
119
- writable: true,
120
- value: (cancelToken) => {
121
- const abortController = this.abortControllers.get(cancelToken);
122
- if (abortController) {
123
- abortController.abort();
124
- this.abortControllers.delete(cancelToken);
125
- }
126
- },
127
- });
128
- Object.defineProperty(this, "request", {
129
- enumerable: true,
130
- configurable: true,
131
- writable: true,
132
- value: async ({
133
- body,
134
- secure,
135
- path,
136
- type,
137
- query,
138
- format,
139
- baseUrl,
140
- cancelToken,
141
- ...params
142
- }) => {
143
- const secureParams =
144
- ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
145
- this.securityWorker &&
146
- (await this.securityWorker(this.securityData))) ||
147
- {};
148
- const requestParams = this.mergeRequestParams(params, secureParams);
149
- const queryString = query && this.toQueryString(query);
150
- const payloadFormatter =
151
- this.contentFormatters[type || ContentType.Json];
152
- const responseFormat = format || requestParams.format;
153
- return this.customFetch(
154
- `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
155
- {
156
- ...requestParams,
157
- headers: {
158
- ...(requestParams.headers || {}),
159
- ...(type && type !== ContentType.FormData
160
- ? { "Content-Type": type }
161
- : {}),
162
- },
163
- signal:
164
- (cancelToken
165
- ? this.createAbortSignal(cancelToken)
166
- : requestParams.signal) || null,
167
- body:
168
- typeof body === "undefined" || body === null
169
- ? null
170
- : payloadFormatter(body),
171
- },
172
- ).then(async (response) => {
173
- const r = response.clone();
174
- r.data = null;
175
- r.error = null;
176
- const data = !responseFormat
177
- ? r
178
- : await response[responseFormat]()
179
- .then((data) => {
180
- if (r.ok) {
181
- r.data = data;
182
- } else {
183
- r.error = data;
184
- }
185
- return r;
186
- })
187
- .catch((e) => {
188
- r.error = e;
189
- return r;
19
+ constructor(apiConfig = {}) {
20
+ Object.defineProperty(this, "baseUrl", {
21
+ enumerable: true,
22
+ configurable: true,
23
+ writable: true,
24
+ value: "https://api.local.getmint.money"
25
+ });
26
+ Object.defineProperty(this, "securityData", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: null
31
+ });
32
+ Object.defineProperty(this, "securityWorker", {
33
+ enumerable: true,
34
+ configurable: true,
35
+ writable: true,
36
+ value: void 0
37
+ });
38
+ Object.defineProperty(this, "abortControllers", {
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true,
42
+ value: new Map()
43
+ });
44
+ Object.defineProperty(this, "customFetch", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: (...fetchParams) => fetch(...fetchParams)
49
+ });
50
+ Object.defineProperty(this, "baseApiParams", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: {
55
+ credentials: "same-origin",
56
+ headers: {},
57
+ redirect: "follow",
58
+ referrerPolicy: "no-referrer",
59
+ }
60
+ });
61
+ Object.defineProperty(this, "setSecurityData", {
62
+ enumerable: true,
63
+ configurable: true,
64
+ writable: true,
65
+ value: (data) => {
66
+ this.securityData = data;
67
+ }
68
+ });
69
+ Object.defineProperty(this, "contentFormatters", {
70
+ enumerable: true,
71
+ configurable: true,
72
+ writable: true,
73
+ value: {
74
+ [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
75
+ ? JSON.stringify(input)
76
+ : input,
77
+ [ContentType.Text]: (input) => input !== null && typeof input !== "string"
78
+ ? JSON.stringify(input)
79
+ : input,
80
+ [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
81
+ const property = input[key];
82
+ formData.append(key, property instanceof Blob
83
+ ? property
84
+ : typeof property === "object" && property !== null
85
+ ? JSON.stringify(property)
86
+ : `${property}`);
87
+ return formData;
88
+ }, new FormData()),
89
+ [ContentType.UrlEncoded]: (input) => this.toQueryString(input),
90
+ }
91
+ });
92
+ Object.defineProperty(this, "createAbortSignal", {
93
+ enumerable: true,
94
+ configurable: true,
95
+ writable: true,
96
+ value: (cancelToken) => {
97
+ if (this.abortControllers.has(cancelToken)) {
98
+ const abortController = this.abortControllers.get(cancelToken);
99
+ if (abortController) {
100
+ return abortController.signal;
101
+ }
102
+ return void 0;
103
+ }
104
+ const abortController = new AbortController();
105
+ this.abortControllers.set(cancelToken, abortController);
106
+ return abortController.signal;
107
+ }
108
+ });
109
+ Object.defineProperty(this, "abortRequest", {
110
+ enumerable: true,
111
+ configurable: true,
112
+ writable: true,
113
+ value: (cancelToken) => {
114
+ const abortController = this.abortControllers.get(cancelToken);
115
+ if (abortController) {
116
+ abortController.abort();
117
+ this.abortControllers.delete(cancelToken);
118
+ }
119
+ }
120
+ });
121
+ Object.defineProperty(this, "request", {
122
+ enumerable: true,
123
+ configurable: true,
124
+ writable: true,
125
+ value: async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
126
+ const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
127
+ this.securityWorker &&
128
+ (await this.securityWorker(this.securityData))) ||
129
+ {};
130
+ const requestParams = this.mergeRequestParams(params, secureParams);
131
+ const queryString = query && this.toQueryString(query);
132
+ const payloadFormatter = this.contentFormatters[type || ContentType.Json];
133
+ const responseFormat = format || requestParams.format;
134
+ return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
135
+ ...requestParams,
136
+ headers: {
137
+ ...(requestParams.headers || {}),
138
+ ...(type && type !== ContentType.FormData
139
+ ? { "Content-Type": type }
140
+ : {}),
141
+ },
142
+ signal: (cancelToken
143
+ ? this.createAbortSignal(cancelToken)
144
+ : requestParams.signal) || null,
145
+ body: typeof body === "undefined" || body === null
146
+ ? null
147
+ : payloadFormatter(body),
148
+ }).then(async (response) => {
149
+ const r = response.clone();
150
+ r.data = null;
151
+ r.error = null;
152
+ const data = !responseFormat
153
+ ? r
154
+ : await response[responseFormat]()
155
+ .then((data) => {
156
+ if (r.ok) {
157
+ r.data = data;
158
+ }
159
+ else {
160
+ r.error = data;
161
+ }
162
+ return r;
163
+ })
164
+ .catch((e) => {
165
+ r.error = e;
166
+ return r;
167
+ });
168
+ if (cancelToken) {
169
+ this.abortControllers.delete(cancelToken);
170
+ }
171
+ if (!response.ok)
172
+ throw data;
173
+ return data;
190
174
  });
191
- if (cancelToken) {
192
- this.abortControllers.delete(cancelToken);
193
- }
194
- if (!response.ok) throw data;
195
- return data;
175
+ }
196
176
  });
197
- },
198
- });
199
- Object.assign(this, apiConfig);
200
- }
201
- encodeQueryParam(key, value) {
202
- const encodedKey = encodeURIComponent(key);
203
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
204
- }
205
- addQueryParam(query, key) {
206
- return this.encodeQueryParam(key, query[key]);
207
- }
208
- addArrayQueryParam(query, key) {
209
- const value = query[key];
210
- return value.map((v) => this.encodeQueryParam(key, v)).join("&");
211
- }
212
- toQueryString(rawQuery) {
213
- const query = rawQuery || {};
214
- const keys = Object.keys(query).filter(
215
- (key) => "undefined" !== typeof query[key],
216
- );
217
- return keys
218
- .map((key) =>
219
- Array.isArray(query[key])
220
- ? this.addArrayQueryParam(query, key)
221
- : this.addQueryParam(query, key),
222
- )
223
- .join("&");
224
- }
225
- addQueryParams(rawQuery) {
226
- const queryString = this.toQueryString(rawQuery);
227
- return queryString ? `?${queryString}` : "";
228
- }
229
- mergeRequestParams(params1, params2) {
230
- return {
231
- ...this.baseApiParams,
232
- ...params1,
233
- ...(params2 || {}),
234
- headers: {
235
- ...(this.baseApiParams.headers || {}),
236
- ...(params1.headers || {}),
237
- ...((params2 && params2.headers) || {}),
238
- },
239
- };
240
- }
177
+ Object.assign(this, apiConfig);
178
+ }
179
+ encodeQueryParam(key, value) {
180
+ const encodedKey = encodeURIComponent(key);
181
+ return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
182
+ }
183
+ addQueryParam(query, key) {
184
+ return this.encodeQueryParam(key, query[key]);
185
+ }
186
+ addArrayQueryParam(query, key) {
187
+ const value = query[key];
188
+ return value.map((v) => this.encodeQueryParam(key, v)).join("&");
189
+ }
190
+ toQueryString(rawQuery) {
191
+ const query = rawQuery || {};
192
+ const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
193
+ return keys
194
+ .map((key) => Array.isArray(query[key])
195
+ ? this.addArrayQueryParam(query, key)
196
+ : this.addQueryParam(query, key))
197
+ .join("&");
198
+ }
199
+ addQueryParams(rawQuery) {
200
+ const queryString = this.toQueryString(rawQuery);
201
+ return queryString ? `?${queryString}` : "";
202
+ }
203
+ mergeRequestParams(params1, params2) {
204
+ return {
205
+ ...this.baseApiParams,
206
+ ...params1,
207
+ ...(params2 || {}),
208
+ headers: {
209
+ ...(this.baseApiParams.headers || {}),
210
+ ...(params1.headers || {}),
211
+ ...((params2 && params2.headers) || {}),
212
+ },
213
+ };
214
+ }
241
215
  }
242
216
  /**
243
217
  * @title Mint Money API
@@ -247,372 +221,350 @@ export class HttpClient {
247
221
  * API for the getmint.money platform
248
222
  */
249
223
  export class Api extends HttpClient {
250
- constructor() {
251
- super(...arguments);
252
- Object.defineProperty(this, "v1", {
253
- enumerable: true,
254
- configurable: true,
255
- writable: true,
256
- value: {
257
- /**
258
- * No description
259
- *
260
- * @tags Health
261
- * @name HealthzList
262
- * @request GET:/v1/healthz
263
- * @response `200` `HealthzListData` Default Response
264
- */
265
- healthzList: (params = {}) =>
266
- this.request({
267
- path: `/v1/healthz`,
268
- method: "GET",
269
- format: "json",
270
- ...params,
271
- }),
272
- /**
273
- * @description Create a new organisation
274
- *
275
- * @tags Organisations
276
- * @name OrganizationsCreate
277
- * @request POST:/v1/organizations/
278
- * @response `201` `OrganizationsCreateData` Default Response
279
- */
280
- organizationsCreate: (data, params = {}) =>
281
- this.request({
282
- path: `/v1/organizations/`,
283
- method: "POST",
284
- body: data,
285
- type: ContentType.Json,
286
- format: "json",
287
- ...params,
288
- }),
289
- /**
290
- * @description Get account details for the current user
291
- *
292
- * @tags Account
293
- * @name AccountsMeList
294
- * @request GET:/v1/accounts/me
295
- * @response `200` `AccountsMeListData` Default Response
296
- */
297
- accountsMeList: (params = {}) =>
298
- this.request({
299
- path: `/v1/accounts/me`,
300
- method: "GET",
301
- format: "json",
302
- ...params,
303
- }),
304
- /**
305
- * @description Create a new on-chain payment
306
- *
307
- * @tags Payments
308
- * @name PaymentsCreate
309
- * @request POST:/v1/payments/
310
- * @response `201` `PaymentsCreateData` Default Response
311
- */
312
- paymentsCreate: (data, params = {}) =>
313
- this.request({
314
- path: `/v1/payments/`,
315
- method: "POST",
316
- body: data,
317
- type: ContentType.Json,
318
- format: "json",
319
- ...params,
320
- }),
321
- /**
322
- * @description Fetch all payment by id
323
- *
324
- * @tags Payments
325
- * @name PaymentsList
326
- * @request GET:/v1/payments/
327
- * @response `200` `PaymentsListData` Default Response
328
- */
329
- paymentsList: (query, params = {}) =>
330
- this.request({
331
- path: `/v1/payments/`,
332
- method: "GET",
333
- query: query,
334
- format: "json",
335
- ...params,
336
- }),
337
- /**
338
- * @description Fetch a payment by id
339
- *
340
- * @tags Payments
341
- * @name PaymentsDetail
342
- * @request GET:/v1/payments/{paymentId}
343
- * @response `201` `PaymentsDetailData` Default Response
344
- */
345
- paymentsDetail: (paymentId, params = {}) =>
346
- this.request({
347
- path: `/v1/payments/${paymentId}`,
348
- method: "GET",
349
- format: "json",
350
- ...params,
351
- }),
352
- /**
353
- * @description Add attempt to pay for a payment using cryptocurrency
354
- *
355
- * @tags Payments
356
- * @name PaymentsCryptoPayCreate
357
- * @request POST:/v1/payments/crypto-pay/{paymentId}
358
- * @response `201` `PaymentsCryptoPayCreateData` Default Response
359
- */
360
- paymentsCryptoPayCreate: (paymentId, data, params = {}) =>
361
- this.request({
362
- path: `/v1/payments/crypto-pay/${paymentId}`,
363
- method: "POST",
364
- body: data,
365
- type: ContentType.Json,
366
- format: "json",
367
- ...params,
368
- }),
369
- /**
370
- * @description Fetch the supported chains
371
- *
372
- * @tags Chain
373
- * @name ChainsList
374
- * @request GET:/v1/chains
375
- * @response `200` `ChainsListData` Default Response
376
- */
377
- chainsList: (query, params = {}) =>
378
- this.request({
379
- path: `/v1/chains`,
380
- method: "GET",
381
- query: query,
382
- format: "json",
383
- ...params,
384
- }),
385
- /**
386
- * @description Fetch the supported tokens
387
- *
388
- * @tags Chain
389
- * @name TokensList
390
- * @request GET:/v1/tokens
391
- * @response `200` `TokensListData` Default Response
392
- */
393
- tokensList: (query, params = {}) =>
394
- this.request({
395
- path: `/v1/tokens`,
396
- method: "GET",
397
- query: query,
398
- format: "json",
399
- ...params,
400
- }),
401
- /**
402
- * @description Create a new endpoint for the organization
403
- *
404
- * @tags Webhooks
405
- * @name WebhooksCreate
406
- * @request POST:/v1/webhooks/
407
- * @response `201` `WebhooksCreateData` Default Response
408
- */
409
- webhooksCreate: (data, params = {}) =>
410
- this.request({
411
- path: `/v1/webhooks/`,
412
- method: "POST",
413
- body: data,
414
- type: ContentType.Json,
415
- format: "json",
416
- ...params,
417
- }),
418
- /**
419
- * @description Fetch all WebhookUrls
420
- *
421
- * @tags Webhooks
422
- * @name WebhooksList
423
- * @request GET:/v1/webhooks/
424
- * @response `200` `WebhooksListData` Default Response
425
- */
426
- webhooksList: (query, params = {}) =>
427
- this.request({
428
- path: `/v1/webhooks/`,
429
- method: "GET",
430
- query: query,
431
- format: "json",
432
- ...params,
433
- }),
434
- /**
435
- * @description Create a new API key for the organization
436
- *
437
- * @tags ApiKeys
438
- * @name ApiKeysCreate
439
- * @request POST:/v1/api-keys/
440
- * @response `201` `ApiKeysCreateData` Default Response
441
- */
442
- apiKeysCreate: (data, params = {}) =>
443
- this.request({
444
- path: `/v1/api-keys/`,
445
- method: "POST",
446
- body: data,
447
- type: ContentType.Json,
448
- format: "json",
449
- ...params,
450
- }),
451
- /**
452
- * @description Fetch all ApiKeys
453
- *
454
- * @tags ApiKeys
455
- * @name ApiKeysList
456
- * @request GET:/v1/api-keys/
457
- * @response `200` `ApiKeysListData` Default Response
458
- */
459
- apiKeysList: (query, params = {}) =>
460
- this.request({
461
- path: `/v1/api-keys/`,
462
- method: "GET",
463
- query: query,
464
- format: "json",
465
- ...params,
466
- }),
467
- /**
468
- * @description Delete an ApiKey
469
- *
470
- * @tags ApiKeys
471
- * @name ApiKeysDelete
472
- * @request DELETE:/v1/api-keys/{apiKeyId}
473
- * @response `200` `ApiKeysDeleteData` Default Response
474
- */
475
- apiKeysDelete: (apiKeyId, params = {}) =>
476
- this.request({
477
- path: `/v1/api-keys/${apiKeyId}`,
478
- method: "DELETE",
479
- format: "json",
480
- ...params,
481
- }),
482
- /**
483
- * @description Patch an ApiKey
484
- *
485
- * @tags ApiKeys
486
- * @name ApiKeysPartialUpdate
487
- * @request PATCH:/v1/api-keys/{apiKeyId}
488
- * @response `201` `ApiKeysPartialUpdateData` Default Response
489
- */
490
- apiKeysPartialUpdate: (apiKeyId, data, params = {}) =>
491
- this.request({
492
- path: `/v1/api-keys/${apiKeyId}`,
493
- method: "PATCH",
494
- body: data,
495
- type: ContentType.Json,
496
- format: "json",
497
- ...params,
498
- }),
499
- /**
500
- * @description Sync a specific block
501
- *
502
- * @tags Blocks
503
- * @name BlocksCreate
504
- * @request POST:/v1/blocks
505
- * @response `200` `BlocksCreateData` Default Response
506
- */
507
- blocksCreate: (data, params = {}) =>
508
- this.request({
509
- path: `/v1/blocks`,
510
- method: "POST",
511
- body: data,
512
- type: ContentType.Json,
513
- format: "json",
514
- ...params,
515
- }),
516
- /**
517
- * @description Begin identity verification
518
- *
519
- * @tags Auth
520
- * @name AuthIdentifyStartCreate
521
- * @request POST:/v1/auth/identify/start
522
- * @response `200` `AuthIdentifyStartCreateData` Default Response
523
- */
524
- authIdentifyStartCreate: (data, params = {}) =>
525
- this.request({
526
- path: `/v1/auth/identify/start`,
527
- method: "POST",
528
- body: data,
529
- type: ContentType.Json,
530
- format: "json",
531
- ...params,
532
- }),
533
- /**
534
- * @description Send identity verification
535
- *
536
- * @tags Auth
537
- * @name AuthIdentifyVerifyCreate
538
- * @request POST:/v1/auth/identify/verify
539
- * @response `200` `AuthIdentifyVerifyCreateData` Default Response
540
- */
541
- authIdentifyVerifyCreate: (data, params = {}) =>
542
- this.request({
543
- path: `/v1/auth/identify/verify`,
544
- method: "POST",
545
- body: data,
546
- type: ContentType.Json,
547
- format: "json",
548
- ...params,
549
- }),
550
- /**
551
- * @description Create a new checkout
552
- *
553
- * @tags Checkouts
554
- * @name CheckoutsCreate
555
- * @request POST:/v1/checkouts/
556
- * @response `201` `CheckoutsCreateData` Default Response
557
- */
558
- checkoutsCreate: (data, params = {}) =>
559
- this.request({
560
- path: `/v1/checkouts/`,
561
- method: "POST",
562
- body: data,
563
- type: ContentType.Json,
564
- format: "json",
565
- ...params,
566
- }),
567
- /**
568
- * @description Get a checkout by id
569
- *
570
- * @tags Checkouts
571
- * @name CheckoutsDetail
572
- * @request GET:/v1/checkouts/{id}
573
- * @response `200` `CheckoutsDetailData` Default Response
574
- */
575
- checkoutsDetail: (id, params = {}) =>
576
- this.request({
577
- path: `/v1/checkouts/${id}`,
578
- method: "GET",
579
- format: "json",
580
- ...params,
581
- }),
582
- /**
583
- * @description Publish a checkout by id
584
- *
585
- * @tags Checkouts
586
- * @name CheckoutsPublishCreate
587
- * @request POST:/v1/checkouts/{id}/publish
588
- * @response `200` `CheckoutsPublishCreateData` Default Response
589
- */
590
- checkoutsPublishCreate: (id, params = {}) =>
591
- this.request({
592
- path: `/v1/checkouts/${id}/publish`,
593
- method: "POST",
594
- format: "json",
595
- ...params,
596
- }),
597
- /**
598
- * @description Create a new merchant account
599
- *
600
- * @tags Merchant Accounts
601
- * @name MerchantAccountsCreate
602
- * @request POST:/v1/merchant-accounts/
603
- * @response `201` `MerchantAccountsCreateData` Default Response
604
- */
605
- merchantAccountsCreate: (data, params = {}) =>
606
- this.request({
607
- path: `/v1/merchant-accounts/`,
608
- method: "POST",
609
- body: data,
610
- type: ContentType.Json,
611
- format: "json",
612
- ...params,
613
- }),
614
- },
615
- });
616
- }
224
+ constructor() {
225
+ super(...arguments);
226
+ Object.defineProperty(this, "v1", {
227
+ enumerable: true,
228
+ configurable: true,
229
+ writable: true,
230
+ value: {
231
+ /**
232
+ * No description
233
+ *
234
+ * @tags Health
235
+ * @name HealthzList
236
+ * @request GET:/v1/healthz
237
+ * @response `200` `HealthzListData` Default Response
238
+ */
239
+ healthzList: (params = {}) => this.request({
240
+ path: `/v1/healthz`,
241
+ method: "GET",
242
+ format: "json",
243
+ ...params,
244
+ }),
245
+ /**
246
+ * @description Create a new organisation
247
+ *
248
+ * @tags Organisations
249
+ * @name OrganizationsCreate
250
+ * @request POST:/v1/organizations/
251
+ * @response `201` `OrganizationsCreateData` Default Response
252
+ */
253
+ organizationsCreate: (data, params = {}) => this.request({
254
+ path: `/v1/organizations/`,
255
+ method: "POST",
256
+ body: data,
257
+ type: ContentType.Json,
258
+ format: "json",
259
+ ...params,
260
+ }),
261
+ /**
262
+ * @description Get account details for the current user
263
+ *
264
+ * @tags Account
265
+ * @name AccountsMeList
266
+ * @request GET:/v1/accounts/me
267
+ * @response `200` `AccountsMeListData` Default Response
268
+ */
269
+ accountsMeList: (params = {}) => this.request({
270
+ path: `/v1/accounts/me`,
271
+ method: "GET",
272
+ format: "json",
273
+ ...params,
274
+ }),
275
+ /**
276
+ * @description Create a new on-chain payment
277
+ *
278
+ * @tags Payments
279
+ * @name PaymentsCreate
280
+ * @request POST:/v1/payments/
281
+ * @response `201` `PaymentsCreateData` Default Response
282
+ */
283
+ paymentsCreate: (data, params = {}) => this.request({
284
+ path: `/v1/payments/`,
285
+ method: "POST",
286
+ body: data,
287
+ type: ContentType.Json,
288
+ format: "json",
289
+ ...params,
290
+ }),
291
+ /**
292
+ * @description Fetch all payment by id
293
+ *
294
+ * @tags Payments
295
+ * @name PaymentsList
296
+ * @request GET:/v1/payments/
297
+ * @response `200` `PaymentsListData` Default Response
298
+ */
299
+ paymentsList: (query, params = {}) => this.request({
300
+ path: `/v1/payments/`,
301
+ method: "GET",
302
+ query: query,
303
+ format: "json",
304
+ ...params,
305
+ }),
306
+ /**
307
+ * @description Fetch a payment by id
308
+ *
309
+ * @tags Payments
310
+ * @name PaymentsDetail
311
+ * @request GET:/v1/payments/{paymentId}
312
+ * @response `201` `PaymentsDetailData` Default Response
313
+ */
314
+ paymentsDetail: (paymentId, params = {}) => this.request({
315
+ path: `/v1/payments/${paymentId}`,
316
+ method: "GET",
317
+ format: "json",
318
+ ...params,
319
+ }),
320
+ /**
321
+ * @description Add attempt to pay for a payment using cryptocurrency
322
+ *
323
+ * @tags Payments
324
+ * @name PaymentsCryptoPayCreate
325
+ * @request POST:/v1/payments/crypto-pay/{paymentId}
326
+ * @response `201` `PaymentsCryptoPayCreateData` Default Response
327
+ */
328
+ paymentsCryptoPayCreate: (paymentId, data, params = {}) => this.request({
329
+ path: `/v1/payments/crypto-pay/${paymentId}`,
330
+ method: "POST",
331
+ body: data,
332
+ type: ContentType.Json,
333
+ format: "json",
334
+ ...params,
335
+ }),
336
+ /**
337
+ * @description Fetch the supported chains
338
+ *
339
+ * @tags Chain
340
+ * @name ChainsList
341
+ * @request GET:/v1/chains
342
+ * @response `200` `ChainsListData` Default Response
343
+ */
344
+ chainsList: (query, params = {}) => this.request({
345
+ path: `/v1/chains`,
346
+ method: "GET",
347
+ query: query,
348
+ format: "json",
349
+ ...params,
350
+ }),
351
+ /**
352
+ * @description Fetch the supported tokens
353
+ *
354
+ * @tags Chain
355
+ * @name TokensList
356
+ * @request GET:/v1/tokens
357
+ * @response `200` `TokensListData` Default Response
358
+ */
359
+ tokensList: (query, params = {}) => this.request({
360
+ path: `/v1/tokens`,
361
+ method: "GET",
362
+ query: query,
363
+ format: "json",
364
+ ...params,
365
+ }),
366
+ /**
367
+ * @description Create a new endpoint for the organization
368
+ *
369
+ * @tags Webhooks
370
+ * @name WebhooksCreate
371
+ * @request POST:/v1/webhooks/
372
+ * @response `201` `WebhooksCreateData` Default Response
373
+ */
374
+ webhooksCreate: (data, params = {}) => this.request({
375
+ path: `/v1/webhooks/`,
376
+ method: "POST",
377
+ body: data,
378
+ type: ContentType.Json,
379
+ format: "json",
380
+ ...params,
381
+ }),
382
+ /**
383
+ * @description Fetch all WebhookUrls
384
+ *
385
+ * @tags Webhooks
386
+ * @name WebhooksList
387
+ * @request GET:/v1/webhooks/
388
+ * @response `200` `WebhooksListData` Default Response
389
+ */
390
+ webhooksList: (query, params = {}) => this.request({
391
+ path: `/v1/webhooks/`,
392
+ method: "GET",
393
+ query: query,
394
+ format: "json",
395
+ ...params,
396
+ }),
397
+ /**
398
+ * @description Create a new API key for the organization
399
+ *
400
+ * @tags ApiKeys
401
+ * @name ApiKeysCreate
402
+ * @request POST:/v1/api-keys/
403
+ * @response `201` `ApiKeysCreateData` Default Response
404
+ */
405
+ apiKeysCreate: (data, params = {}) => this.request({
406
+ path: `/v1/api-keys/`,
407
+ method: "POST",
408
+ body: data,
409
+ type: ContentType.Json,
410
+ format: "json",
411
+ ...params,
412
+ }),
413
+ /**
414
+ * @description Fetch all ApiKeys
415
+ *
416
+ * @tags ApiKeys
417
+ * @name ApiKeysList
418
+ * @request GET:/v1/api-keys/
419
+ * @response `200` `ApiKeysListData` Default Response
420
+ */
421
+ apiKeysList: (query, params = {}) => this.request({
422
+ path: `/v1/api-keys/`,
423
+ method: "GET",
424
+ query: query,
425
+ format: "json",
426
+ ...params,
427
+ }),
428
+ /**
429
+ * @description Delete an ApiKey
430
+ *
431
+ * @tags ApiKeys
432
+ * @name ApiKeysDelete
433
+ * @request DELETE:/v1/api-keys/{apiKeyId}
434
+ * @response `200` `ApiKeysDeleteData` Default Response
435
+ */
436
+ apiKeysDelete: (apiKeyId, params = {}) => this.request({
437
+ path: `/v1/api-keys/${apiKeyId}`,
438
+ method: "DELETE",
439
+ format: "json",
440
+ ...params,
441
+ }),
442
+ /**
443
+ * @description Patch an ApiKey
444
+ *
445
+ * @tags ApiKeys
446
+ * @name ApiKeysPartialUpdate
447
+ * @request PATCH:/v1/api-keys/{apiKeyId}
448
+ * @response `201` `ApiKeysPartialUpdateData` Default Response
449
+ */
450
+ apiKeysPartialUpdate: (apiKeyId, data, params = {}) => this.request({
451
+ path: `/v1/api-keys/${apiKeyId}`,
452
+ method: "PATCH",
453
+ body: data,
454
+ type: ContentType.Json,
455
+ format: "json",
456
+ ...params,
457
+ }),
458
+ /**
459
+ * @description Sync a specific block
460
+ *
461
+ * @tags Blocks
462
+ * @name BlocksCreate
463
+ * @request POST:/v1/blocks
464
+ * @response `200` `BlocksCreateData` Default Response
465
+ */
466
+ blocksCreate: (data, params = {}) => this.request({
467
+ path: `/v1/blocks`,
468
+ method: "POST",
469
+ body: data,
470
+ type: ContentType.Json,
471
+ format: "json",
472
+ ...params,
473
+ }),
474
+ /**
475
+ * @description Begin identity verification
476
+ *
477
+ * @tags Auth
478
+ * @name AuthIdentifyStartCreate
479
+ * @request POST:/v1/auth/identify/start
480
+ * @response `200` `AuthIdentifyStartCreateData` Default Response
481
+ */
482
+ authIdentifyStartCreate: (data, params = {}) => this.request({
483
+ path: `/v1/auth/identify/start`,
484
+ method: "POST",
485
+ body: data,
486
+ type: ContentType.Json,
487
+ format: "json",
488
+ ...params,
489
+ }),
490
+ /**
491
+ * @description Send identity verification
492
+ *
493
+ * @tags Auth
494
+ * @name AuthIdentifyVerifyCreate
495
+ * @request POST:/v1/auth/identify/verify
496
+ * @response `200` `AuthIdentifyVerifyCreateData` Default Response
497
+ */
498
+ authIdentifyVerifyCreate: (data, params = {}) => this.request({
499
+ path: `/v1/auth/identify/verify`,
500
+ method: "POST",
501
+ body: data,
502
+ type: ContentType.Json,
503
+ format: "json",
504
+ ...params,
505
+ }),
506
+ /**
507
+ * @description Create a new checkout
508
+ *
509
+ * @tags Checkouts
510
+ * @name CheckoutsCreate
511
+ * @request POST:/v1/checkouts/
512
+ * @response `201` `CheckoutsCreateData` Default Response
513
+ */
514
+ checkoutsCreate: (data, params = {}) => this.request({
515
+ path: `/v1/checkouts/`,
516
+ method: "POST",
517
+ body: data,
518
+ type: ContentType.Json,
519
+ format: "json",
520
+ ...params,
521
+ }),
522
+ /**
523
+ * @description Get a checkout by id
524
+ *
525
+ * @tags Checkouts
526
+ * @name CheckoutsDetail
527
+ * @request GET:/v1/checkouts/{id}
528
+ * @response `200` `CheckoutsDetailData` Default Response
529
+ */
530
+ checkoutsDetail: (id, params = {}) => this.request({
531
+ path: `/v1/checkouts/${id}`,
532
+ method: "GET",
533
+ format: "json",
534
+ ...params,
535
+ }),
536
+ /**
537
+ * @description Publish a checkout by id
538
+ *
539
+ * @tags Checkouts
540
+ * @name CheckoutsPublishCreate
541
+ * @request POST:/v1/checkouts/{id}/publish
542
+ * @response `200` `CheckoutsPublishCreateData` Default Response
543
+ */
544
+ checkoutsPublishCreate: (id, params = {}) => this.request({
545
+ path: `/v1/checkouts/${id}/publish`,
546
+ method: "POST",
547
+ format: "json",
548
+ ...params,
549
+ }),
550
+ /**
551
+ * @description Create a new merchant account
552
+ *
553
+ * @tags Merchant Accounts
554
+ * @name MerchantAccountsCreate
555
+ * @request POST:/v1/merchant-accounts/
556
+ * @response `201` `MerchantAccountsCreateData` Default Response
557
+ */
558
+ merchantAccountsCreate: (data, params = {}) => this.request({
559
+ path: `/v1/merchant-accounts/`,
560
+ method: "POST",
561
+ body: data,
562
+ type: ContentType.Json,
563
+ format: "json",
564
+ ...params,
565
+ }),
566
+ }
567
+ });
568
+ }
617
569
  }
618
- //# sourceMappingURL=generated.js.map
570
+ //# sourceMappingURL=generated.js.map