@revenexx/sdk 0.0.2

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 (182) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -0
  3. package/dist/cjs/package.json +3 -0
  4. package/dist/cjs/sdk.js +16340 -0
  5. package/dist/cjs/sdk.js.map +1 -0
  6. package/dist/esm/package.json +3 -0
  7. package/dist/esm/sdk.js +16250 -0
  8. package/dist/esm/sdk.js.map +1 -0
  9. package/dist/iife/sdk.js +20101 -0
  10. package/package.json +56 -0
  11. package/src/channel.ts +158 -0
  12. package/src/client.ts +950 -0
  13. package/src/enums/adapter.ts +4 -0
  14. package/src/enums/attribute-boolean-status.ts +7 -0
  15. package/src/enums/attribute-datetime-status.ts +7 -0
  16. package/src/enums/attribute-email-status.ts +7 -0
  17. package/src/enums/attribute-enum-status.ts +7 -0
  18. package/src/enums/attribute-float-status.ts +7 -0
  19. package/src/enums/attribute-integer-status.ts +7 -0
  20. package/src/enums/attribute-ip-status.ts +7 -0
  21. package/src/enums/attribute-line-status.ts +7 -0
  22. package/src/enums/attribute-longtext-status.ts +7 -0
  23. package/src/enums/attribute-mediumtext-status.ts +7 -0
  24. package/src/enums/attribute-point-status.ts +7 -0
  25. package/src/enums/attribute-polygon-status.ts +7 -0
  26. package/src/enums/attribute-relationship-status.ts +7 -0
  27. package/src/enums/attribute-string-status.ts +7 -0
  28. package/src/enums/attribute-text-status.ts +7 -0
  29. package/src/enums/attribute-url-status.ts +7 -0
  30. package/src/enums/attribute-varchar-status.ts +7 -0
  31. package/src/enums/build-runtime.ts +73 -0
  32. package/src/enums/code.ts +16 -0
  33. package/src/enums/collection.ts +4 -0
  34. package/src/enums/column-boolean-status.ts +7 -0
  35. package/src/enums/column-datetime-status.ts +7 -0
  36. package/src/enums/column-email-status.ts +7 -0
  37. package/src/enums/column-enum-status.ts +7 -0
  38. package/src/enums/column-float-status.ts +7 -0
  39. package/src/enums/column-integer-status.ts +7 -0
  40. package/src/enums/column-ip-status.ts +7 -0
  41. package/src/enums/column-line-status.ts +7 -0
  42. package/src/enums/column-longtext-status.ts +7 -0
  43. package/src/enums/column-mediumtext-status.ts +7 -0
  44. package/src/enums/column-point-status.ts +7 -0
  45. package/src/enums/column-polygon-status.ts +7 -0
  46. package/src/enums/column-relationship-status.ts +7 -0
  47. package/src/enums/column-string-status.ts +7 -0
  48. package/src/enums/column-text-status.ts +7 -0
  49. package/src/enums/column-url-status.ts +7 -0
  50. package/src/enums/column-varchar-status.ts +7 -0
  51. package/src/enums/compression.ts +5 -0
  52. package/src/enums/database-type.ts +4 -0
  53. package/src/enums/deployment-status.ts +8 -0
  54. package/src/enums/execution-status.ts +7 -0
  55. package/src/enums/execution-trigger.ts +5 -0
  56. package/src/enums/framework.ts +17 -0
  57. package/src/enums/gravity.ts +11 -0
  58. package/src/enums/health-antivirus-status.ts +5 -0
  59. package/src/enums/health-status-status.ts +4 -0
  60. package/src/enums/index-status.ts +7 -0
  61. package/src/enums/message-status.ts +7 -0
  62. package/src/enums/method.ts +9 -0
  63. package/src/enums/output.ts +9 -0
  64. package/src/enums/permissions.ts +22 -0
  65. package/src/enums/priority.ts +4 -0
  66. package/src/enums/range.ts +5 -0
  67. package/src/enums/runtime.ts +73 -0
  68. package/src/enums/runtimes.ts +73 -0
  69. package/src/enums/scopes.ts +57 -0
  70. package/src/enums/theme.ts +4 -0
  71. package/src/enums/timezone.ts +421 -0
  72. package/src/enums/type.ts +5 -0
  73. package/src/enums/use-cases.ts +9 -0
  74. package/src/id.ts +47 -0
  75. package/src/index.ts +92 -0
  76. package/src/models.ts +6013 -0
  77. package/src/operator.ts +308 -0
  78. package/src/permission.ts +57 -0
  79. package/src/query.ts +576 -0
  80. package/src/role.ts +100 -0
  81. package/src/service.ts +30 -0
  82. package/src/services/apps.ts +2473 -0
  83. package/src/services/avatars.ts +744 -0
  84. package/src/services/carts.ts +1057 -0
  85. package/src/services/channels.ts +227 -0
  86. package/src/services/customers.ts +729 -0
  87. package/src/services/greetings.ts +294 -0
  88. package/src/services/locale.ts +198 -0
  89. package/src/services/markets.ts +796 -0
  90. package/src/services/messaging.ts +3463 -0
  91. package/src/services/products.ts +3100 -0
  92. package/src/services/realtime.ts +537 -0
  93. package/src/services/search.ts +346 -0
  94. package/src/services/sites.ts +1847 -0
  95. package/src/services/storage.ts +1076 -0
  96. package/src/services/tokens.ts +314 -0
  97. package/types/channel.d.ts +74 -0
  98. package/types/client.d.ts +211 -0
  99. package/types/enums/adapter.d.ts +4 -0
  100. package/types/enums/attribute-boolean-status.d.ts +7 -0
  101. package/types/enums/attribute-datetime-status.d.ts +7 -0
  102. package/types/enums/attribute-email-status.d.ts +7 -0
  103. package/types/enums/attribute-enum-status.d.ts +7 -0
  104. package/types/enums/attribute-float-status.d.ts +7 -0
  105. package/types/enums/attribute-integer-status.d.ts +7 -0
  106. package/types/enums/attribute-ip-status.d.ts +7 -0
  107. package/types/enums/attribute-line-status.d.ts +7 -0
  108. package/types/enums/attribute-longtext-status.d.ts +7 -0
  109. package/types/enums/attribute-mediumtext-status.d.ts +7 -0
  110. package/types/enums/attribute-point-status.d.ts +7 -0
  111. package/types/enums/attribute-polygon-status.d.ts +7 -0
  112. package/types/enums/attribute-relationship-status.d.ts +7 -0
  113. package/types/enums/attribute-string-status.d.ts +7 -0
  114. package/types/enums/attribute-text-status.d.ts +7 -0
  115. package/types/enums/attribute-url-status.d.ts +7 -0
  116. package/types/enums/attribute-varchar-status.d.ts +7 -0
  117. package/types/enums/build-runtime.d.ts +73 -0
  118. package/types/enums/code.d.ts +16 -0
  119. package/types/enums/collection.d.ts +4 -0
  120. package/types/enums/column-boolean-status.d.ts +7 -0
  121. package/types/enums/column-datetime-status.d.ts +7 -0
  122. package/types/enums/column-email-status.d.ts +7 -0
  123. package/types/enums/column-enum-status.d.ts +7 -0
  124. package/types/enums/column-float-status.d.ts +7 -0
  125. package/types/enums/column-integer-status.d.ts +7 -0
  126. package/types/enums/column-ip-status.d.ts +7 -0
  127. package/types/enums/column-line-status.d.ts +7 -0
  128. package/types/enums/column-longtext-status.d.ts +7 -0
  129. package/types/enums/column-mediumtext-status.d.ts +7 -0
  130. package/types/enums/column-point-status.d.ts +7 -0
  131. package/types/enums/column-polygon-status.d.ts +7 -0
  132. package/types/enums/column-relationship-status.d.ts +7 -0
  133. package/types/enums/column-string-status.d.ts +7 -0
  134. package/types/enums/column-text-status.d.ts +7 -0
  135. package/types/enums/column-url-status.d.ts +7 -0
  136. package/types/enums/column-varchar-status.d.ts +7 -0
  137. package/types/enums/compression.d.ts +5 -0
  138. package/types/enums/database-type.d.ts +4 -0
  139. package/types/enums/deployment-status.d.ts +8 -0
  140. package/types/enums/execution-status.d.ts +7 -0
  141. package/types/enums/execution-trigger.d.ts +5 -0
  142. package/types/enums/framework.d.ts +17 -0
  143. package/types/enums/gravity.d.ts +11 -0
  144. package/types/enums/health-antivirus-status.d.ts +5 -0
  145. package/types/enums/health-status-status.d.ts +4 -0
  146. package/types/enums/index-status.d.ts +7 -0
  147. package/types/enums/message-status.d.ts +7 -0
  148. package/types/enums/method.d.ts +9 -0
  149. package/types/enums/output.d.ts +9 -0
  150. package/types/enums/permissions.d.ts +22 -0
  151. package/types/enums/priority.d.ts +4 -0
  152. package/types/enums/range.d.ts +5 -0
  153. package/types/enums/runtime.d.ts +73 -0
  154. package/types/enums/runtimes.d.ts +73 -0
  155. package/types/enums/scopes.d.ts +57 -0
  156. package/types/enums/theme.d.ts +4 -0
  157. package/types/enums/timezone.d.ts +421 -0
  158. package/types/enums/type.d.ts +5 -0
  159. package/types/enums/use-cases.d.ts +9 -0
  160. package/types/id.d.ts +20 -0
  161. package/types/index.d.ts +92 -0
  162. package/types/models.d.ts +5830 -0
  163. package/types/operator.d.ts +180 -0
  164. package/types/permission.d.ts +43 -0
  165. package/types/query.d.ts +442 -0
  166. package/types/role.d.ts +70 -0
  167. package/types/service.d.ts +11 -0
  168. package/types/services/apps.d.ts +932 -0
  169. package/types/services/avatars.d.ts +318 -0
  170. package/types/services/carts.d.ts +352 -0
  171. package/types/services/channels.d.ts +75 -0
  172. package/types/services/customers.d.ts +231 -0
  173. package/types/services/greetings.d.ts +101 -0
  174. package/types/services/locale.d.ts +64 -0
  175. package/types/services/markets.d.ts +274 -0
  176. package/types/services/messaging.d.ts +1324 -0
  177. package/types/services/products.d.ts +1014 -0
  178. package/types/services/realtime.d.ts +134 -0
  179. package/types/services/search.d.ts +131 -0
  180. package/types/services/sites.d.ts +689 -0
  181. package/types/services/storage.d.ts +421 -0
  182. package/types/services/tokens.d.ts +119 -0
@@ -0,0 +1,1057 @@
1
+ import { Service } from '../service';
2
+ import { RevenexxException, Client, type Payload, UploadProgress } from '../client';
3
+ import type { Models } from '../models';
4
+
5
+
6
+ export class Carts {
7
+ client: Client;
8
+
9
+ constructor(client: Client) {
10
+ this.client = client;
11
+ }
12
+
13
+ /**
14
+ *
15
+ * @throws {RevenexxException}
16
+ * @returns {Promise<{}>}
17
+ */
18
+ cartsList(): Promise<{}> {
19
+
20
+ const apiPath = '/v1/carts';
21
+ const payload: Payload = {};
22
+ const uri = new URL(this.client.config.endpoint + apiPath);
23
+
24
+ const apiHeaders: { [header: string]: string } = {
25
+ }
26
+
27
+ return this.client.call(
28
+ 'get',
29
+ uri,
30
+ apiHeaders,
31
+ payload
32
+ );
33
+ }
34
+
35
+ /**
36
+ *
37
+ * @throws {RevenexxException}
38
+ * @returns {Promise<Models.Cart>}
39
+ */
40
+ cartsCreate(): Promise<Models.Cart> {
41
+
42
+ const apiPath = '/v1/carts';
43
+ const payload: Payload = {};
44
+ const uri = new URL(this.client.config.endpoint + apiPath);
45
+
46
+ const apiHeaders: { [header: string]: string } = {
47
+ 'content-type': 'application/json',
48
+ }
49
+
50
+ return this.client.call(
51
+ 'post',
52
+ uri,
53
+ apiHeaders,
54
+ payload
55
+ );
56
+ }
57
+
58
+ /**
59
+ *
60
+ * @throws {RevenexxException}
61
+ * @returns {Promise<{}>}
62
+ */
63
+ cartsClaim(): Promise<{}> {
64
+
65
+ const apiPath = '/v1/carts/claim';
66
+ const payload: Payload = {};
67
+ const uri = new URL(this.client.config.endpoint + apiPath);
68
+
69
+ const apiHeaders: { [header: string]: string } = {
70
+ 'content-type': 'application/json',
71
+ }
72
+
73
+ return this.client.call(
74
+ 'post',
75
+ uri,
76
+ apiHeaders,
77
+ payload
78
+ );
79
+ }
80
+
81
+ /**
82
+ *
83
+ * @throws {RevenexxException}
84
+ * @returns {Promise<{}>}
85
+ */
86
+ cartsImport(): Promise<{}> {
87
+
88
+ const apiPath = '/v1/carts/import';
89
+ const payload: Payload = {};
90
+ const uri = new URL(this.client.config.endpoint + apiPath);
91
+
92
+ const apiHeaders: { [header: string]: string } = {
93
+ 'content-type': 'application/json',
94
+ }
95
+
96
+ return this.client.call(
97
+ 'post',
98
+ uri,
99
+ apiHeaders,
100
+ payload
101
+ );
102
+ }
103
+
104
+ /**
105
+ *
106
+ * @throws {RevenexxException}
107
+ * @returns {Promise<{}>}
108
+ */
109
+ cartsIoProfilesList(): Promise<{}> {
110
+
111
+ const apiPath = '/v1/carts/io/profiles';
112
+ const payload: Payload = {};
113
+ const uri = new URL(this.client.config.endpoint + apiPath);
114
+
115
+ const apiHeaders: { [header: string]: string } = {
116
+ }
117
+
118
+ return this.client.call(
119
+ 'get',
120
+ uri,
121
+ apiHeaders,
122
+ payload
123
+ );
124
+ }
125
+
126
+ /**
127
+ *
128
+ * @throws {RevenexxException}
129
+ * @returns {Promise<Models.IoProfile>}
130
+ */
131
+ cartsIoProfilesCreate(): Promise<Models.IoProfile> {
132
+
133
+ const apiPath = '/v1/carts/io/profiles';
134
+ const payload: Payload = {};
135
+ const uri = new URL(this.client.config.endpoint + apiPath);
136
+
137
+ const apiHeaders: { [header: string]: string } = {
138
+ 'content-type': 'application/json',
139
+ }
140
+
141
+ return this.client.call(
142
+ 'post',
143
+ uri,
144
+ apiHeaders,
145
+ payload
146
+ );
147
+ }
148
+
149
+ /**
150
+ *
151
+ * @throws {RevenexxException}
152
+ * @returns {Promise<{}>}
153
+ */
154
+ cartsIoProfilesDefaults(): Promise<{}> {
155
+
156
+ const apiPath = '/v1/carts/io/profiles/defaults';
157
+ const payload: Payload = {};
158
+ const uri = new URL(this.client.config.endpoint + apiPath);
159
+
160
+ const apiHeaders: { [header: string]: string } = {
161
+ }
162
+
163
+ return this.client.call(
164
+ 'post',
165
+ uri,
166
+ apiHeaders,
167
+ payload
168
+ );
169
+ }
170
+
171
+ /**
172
+ *
173
+ * @param {string} params.id -
174
+ * @throws {RevenexxException}
175
+ * @returns {Promise<{}>}
176
+ */
177
+ cartsIoProfilesDelete(params: { id: string }): Promise<{}>;
178
+ /**
179
+ *
180
+ * @param {string} id -
181
+ * @throws {RevenexxException}
182
+ * @returns {Promise<{}>}
183
+ * @deprecated Use the object parameter style method for a better developer experience.
184
+ */
185
+ cartsIoProfilesDelete(id: string): Promise<{}>;
186
+ cartsIoProfilesDelete(
187
+ paramsOrFirst: { id: string } | string
188
+ ): Promise<{}> {
189
+ let params: { id: string };
190
+
191
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
192
+ params = (paramsOrFirst || {}) as { id: string };
193
+ } else {
194
+ params = {
195
+ id: paramsOrFirst as string
196
+ };
197
+ }
198
+
199
+ const id = params.id;
200
+
201
+ if (typeof id === 'undefined') {
202
+ throw new RevenexxException('Missing required parameter: "id"');
203
+ }
204
+
205
+ const apiPath = '/v1/carts/io/profiles/{id}'.replace('{id}', id);
206
+ const payload: Payload = {};
207
+ const uri = new URL(this.client.config.endpoint + apiPath);
208
+
209
+ const apiHeaders: { [header: string]: string } = {
210
+ }
211
+
212
+ return this.client.call(
213
+ 'delete',
214
+ uri,
215
+ apiHeaders,
216
+ payload
217
+ );
218
+ }
219
+
220
+ /**
221
+ *
222
+ * @param {string} params.id -
223
+ * @throws {RevenexxException}
224
+ * @returns {Promise<Models.IoProfile>}
225
+ */
226
+ cartsIoProfilesGet(params: { id: string }): Promise<Models.IoProfile>;
227
+ /**
228
+ *
229
+ * @param {string} id -
230
+ * @throws {RevenexxException}
231
+ * @returns {Promise<Models.IoProfile>}
232
+ * @deprecated Use the object parameter style method for a better developer experience.
233
+ */
234
+ cartsIoProfilesGet(id: string): Promise<Models.IoProfile>;
235
+ cartsIoProfilesGet(
236
+ paramsOrFirst: { id: string } | string
237
+ ): Promise<Models.IoProfile> {
238
+ let params: { id: string };
239
+
240
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
241
+ params = (paramsOrFirst || {}) as { id: string };
242
+ } else {
243
+ params = {
244
+ id: paramsOrFirst as string
245
+ };
246
+ }
247
+
248
+ const id = params.id;
249
+
250
+ if (typeof id === 'undefined') {
251
+ throw new RevenexxException('Missing required parameter: "id"');
252
+ }
253
+
254
+ const apiPath = '/v1/carts/io/profiles/{id}'.replace('{id}', id);
255
+ const payload: Payload = {};
256
+ const uri = new URL(this.client.config.endpoint + apiPath);
257
+
258
+ const apiHeaders: { [header: string]: string } = {
259
+ }
260
+
261
+ return this.client.call(
262
+ 'get',
263
+ uri,
264
+ apiHeaders,
265
+ payload
266
+ );
267
+ }
268
+
269
+ /**
270
+ *
271
+ * @param {string} params.id -
272
+ * @throws {RevenexxException}
273
+ * @returns {Promise<Models.IoProfile>}
274
+ */
275
+ cartsIoProfilesUpdate(params: { id: string }): Promise<Models.IoProfile>;
276
+ /**
277
+ *
278
+ * @param {string} id -
279
+ * @throws {RevenexxException}
280
+ * @returns {Promise<Models.IoProfile>}
281
+ * @deprecated Use the object parameter style method for a better developer experience.
282
+ */
283
+ cartsIoProfilesUpdate(id: string): Promise<Models.IoProfile>;
284
+ cartsIoProfilesUpdate(
285
+ paramsOrFirst: { id: string } | string
286
+ ): Promise<Models.IoProfile> {
287
+ let params: { id: string };
288
+
289
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
290
+ params = (paramsOrFirst || {}) as { id: string };
291
+ } else {
292
+ params = {
293
+ id: paramsOrFirst as string
294
+ };
295
+ }
296
+
297
+ const id = params.id;
298
+
299
+ if (typeof id === 'undefined') {
300
+ throw new RevenexxException('Missing required parameter: "id"');
301
+ }
302
+
303
+ const apiPath = '/v1/carts/io/profiles/{id}'.replace('{id}', id);
304
+ const payload: Payload = {};
305
+ const uri = new URL(this.client.config.endpoint + apiPath);
306
+
307
+ const apiHeaders: { [header: string]: string } = {
308
+ 'content-type': 'application/json',
309
+ }
310
+
311
+ return this.client.call(
312
+ 'put',
313
+ uri,
314
+ apiHeaders,
315
+ payload
316
+ );
317
+ }
318
+
319
+ /**
320
+ *
321
+ * @throws {RevenexxException}
322
+ * @returns {Promise<{}>}
323
+ */
324
+ cartsMerge(): Promise<{}> {
325
+
326
+ const apiPath = '/v1/carts/merge';
327
+ const payload: Payload = {};
328
+ const uri = new URL(this.client.config.endpoint + apiPath);
329
+
330
+ const apiHeaders: { [header: string]: string } = {
331
+ 'content-type': 'application/json',
332
+ }
333
+
334
+ return this.client.call(
335
+ 'post',
336
+ uri,
337
+ apiHeaders,
338
+ payload
339
+ );
340
+ }
341
+
342
+ /**
343
+ *
344
+ * @param {string} params.cartId -
345
+ * @throws {RevenexxException}
346
+ * @returns {Promise<{}>}
347
+ */
348
+ cartsItemsList(params: { cartId: string }): Promise<{}>;
349
+ /**
350
+ *
351
+ * @param {string} cartId -
352
+ * @throws {RevenexxException}
353
+ * @returns {Promise<{}>}
354
+ * @deprecated Use the object parameter style method for a better developer experience.
355
+ */
356
+ cartsItemsList(cartId: string): Promise<{}>;
357
+ cartsItemsList(
358
+ paramsOrFirst: { cartId: string } | string
359
+ ): Promise<{}> {
360
+ let params: { cartId: string };
361
+
362
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
363
+ params = (paramsOrFirst || {}) as { cartId: string };
364
+ } else {
365
+ params = {
366
+ cartId: paramsOrFirst as string
367
+ };
368
+ }
369
+
370
+ const cartId = params.cartId;
371
+
372
+ if (typeof cartId === 'undefined') {
373
+ throw new RevenexxException('Missing required parameter: "cartId"');
374
+ }
375
+
376
+ const apiPath = '/v1/carts/{cart_id}/items'.replace('{cartId}', cartId);
377
+ const payload: Payload = {};
378
+ const uri = new URL(this.client.config.endpoint + apiPath);
379
+
380
+ const apiHeaders: { [header: string]: string } = {
381
+ }
382
+
383
+ return this.client.call(
384
+ 'get',
385
+ uri,
386
+ apiHeaders,
387
+ payload
388
+ );
389
+ }
390
+
391
+ /**
392
+ *
393
+ * @param {string} params.cartId -
394
+ * @throws {RevenexxException}
395
+ * @returns {Promise<Models.CartItem>}
396
+ */
397
+ cartsItemsCreate(params: { cartId: string }): Promise<Models.CartItem>;
398
+ /**
399
+ *
400
+ * @param {string} cartId -
401
+ * @throws {RevenexxException}
402
+ * @returns {Promise<Models.CartItem>}
403
+ * @deprecated Use the object parameter style method for a better developer experience.
404
+ */
405
+ cartsItemsCreate(cartId: string): Promise<Models.CartItem>;
406
+ cartsItemsCreate(
407
+ paramsOrFirst: { cartId: string } | string
408
+ ): Promise<Models.CartItem> {
409
+ let params: { cartId: string };
410
+
411
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
412
+ params = (paramsOrFirst || {}) as { cartId: string };
413
+ } else {
414
+ params = {
415
+ cartId: paramsOrFirst as string
416
+ };
417
+ }
418
+
419
+ const cartId = params.cartId;
420
+
421
+ if (typeof cartId === 'undefined') {
422
+ throw new RevenexxException('Missing required parameter: "cartId"');
423
+ }
424
+
425
+ const apiPath = '/v1/carts/{cart_id}/items'.replace('{cartId}', cartId);
426
+ const payload: Payload = {};
427
+ const uri = new URL(this.client.config.endpoint + apiPath);
428
+
429
+ const apiHeaders: { [header: string]: string } = {
430
+ 'content-type': 'application/json',
431
+ }
432
+
433
+ return this.client.call(
434
+ 'post',
435
+ uri,
436
+ apiHeaders,
437
+ payload
438
+ );
439
+ }
440
+
441
+ /**
442
+ *
443
+ * @param {string} params.cartId -
444
+ * @throws {RevenexxException}
445
+ * @returns {Promise<{}>}
446
+ */
447
+ cartsItemsReplace(params: { cartId: string }): Promise<{}>;
448
+ /**
449
+ *
450
+ * @param {string} cartId -
451
+ * @throws {RevenexxException}
452
+ * @returns {Promise<{}>}
453
+ * @deprecated Use the object parameter style method for a better developer experience.
454
+ */
455
+ cartsItemsReplace(cartId: string): Promise<{}>;
456
+ cartsItemsReplace(
457
+ paramsOrFirst: { cartId: string } | string
458
+ ): Promise<{}> {
459
+ let params: { cartId: string };
460
+
461
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
462
+ params = (paramsOrFirst || {}) as { cartId: string };
463
+ } else {
464
+ params = {
465
+ cartId: paramsOrFirst as string
466
+ };
467
+ }
468
+
469
+ const cartId = params.cartId;
470
+
471
+ if (typeof cartId === 'undefined') {
472
+ throw new RevenexxException('Missing required parameter: "cartId"');
473
+ }
474
+
475
+ const apiPath = '/v1/carts/{cart_id}/items'.replace('{cartId}', cartId);
476
+ const payload: Payload = {};
477
+ const uri = new URL(this.client.config.endpoint + apiPath);
478
+
479
+ const apiHeaders: { [header: string]: string } = {
480
+ 'content-type': 'application/json',
481
+ }
482
+
483
+ return this.client.call(
484
+ 'put',
485
+ uri,
486
+ apiHeaders,
487
+ payload
488
+ );
489
+ }
490
+
491
+ /**
492
+ *
493
+ * @param {string} params.cartId -
494
+ * @param {string} params.id -
495
+ * @throws {RevenexxException}
496
+ * @returns {Promise<{}>}
497
+ */
498
+ cartsItemsDelete(params: { cartId: string, id: string }): Promise<{}>;
499
+ /**
500
+ *
501
+ * @param {string} cartId -
502
+ * @param {string} id -
503
+ * @throws {RevenexxException}
504
+ * @returns {Promise<{}>}
505
+ * @deprecated Use the object parameter style method for a better developer experience.
506
+ */
507
+ cartsItemsDelete(cartId: string, id: string): Promise<{}>;
508
+ cartsItemsDelete(
509
+ paramsOrFirst: { cartId: string, id: string } | string,
510
+ ...rest: [(string)?]
511
+ ): Promise<{}> {
512
+ let params: { cartId: string, id: string };
513
+
514
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
515
+ params = (paramsOrFirst || {}) as { cartId: string, id: string };
516
+ } else {
517
+ params = {
518
+ cartId: paramsOrFirst as string,
519
+ id: rest[0] as string
520
+ };
521
+ }
522
+
523
+ const cartId = params.cartId;
524
+ const id = params.id;
525
+
526
+ if (typeof cartId === 'undefined') {
527
+ throw new RevenexxException('Missing required parameter: "cartId"');
528
+ }
529
+ if (typeof id === 'undefined') {
530
+ throw new RevenexxException('Missing required parameter: "id"');
531
+ }
532
+
533
+ const apiPath = '/v1/carts/{cart_id}/items/{id}'.replace('{cartId}', cartId).replace('{id}', id);
534
+ const payload: Payload = {};
535
+ const uri = new URL(this.client.config.endpoint + apiPath);
536
+
537
+ const apiHeaders: { [header: string]: string } = {
538
+ }
539
+
540
+ return this.client.call(
541
+ 'delete',
542
+ uri,
543
+ apiHeaders,
544
+ payload
545
+ );
546
+ }
547
+
548
+ /**
549
+ *
550
+ * @param {string} params.cartId -
551
+ * @param {string} params.id -
552
+ * @throws {RevenexxException}
553
+ * @returns {Promise<Models.CartItem>}
554
+ */
555
+ cartsItemsGet(params: { cartId: string, id: string }): Promise<Models.CartItem>;
556
+ /**
557
+ *
558
+ * @param {string} cartId -
559
+ * @param {string} id -
560
+ * @throws {RevenexxException}
561
+ * @returns {Promise<Models.CartItem>}
562
+ * @deprecated Use the object parameter style method for a better developer experience.
563
+ */
564
+ cartsItemsGet(cartId: string, id: string): Promise<Models.CartItem>;
565
+ cartsItemsGet(
566
+ paramsOrFirst: { cartId: string, id: string } | string,
567
+ ...rest: [(string)?]
568
+ ): Promise<Models.CartItem> {
569
+ let params: { cartId: string, id: string };
570
+
571
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
572
+ params = (paramsOrFirst || {}) as { cartId: string, id: string };
573
+ } else {
574
+ params = {
575
+ cartId: paramsOrFirst as string,
576
+ id: rest[0] as string
577
+ };
578
+ }
579
+
580
+ const cartId = params.cartId;
581
+ const id = params.id;
582
+
583
+ if (typeof cartId === 'undefined') {
584
+ throw new RevenexxException('Missing required parameter: "cartId"');
585
+ }
586
+ if (typeof id === 'undefined') {
587
+ throw new RevenexxException('Missing required parameter: "id"');
588
+ }
589
+
590
+ const apiPath = '/v1/carts/{cart_id}/items/{id}'.replace('{cartId}', cartId).replace('{id}', id);
591
+ const payload: Payload = {};
592
+ const uri = new URL(this.client.config.endpoint + apiPath);
593
+
594
+ const apiHeaders: { [header: string]: string } = {
595
+ }
596
+
597
+ return this.client.call(
598
+ 'get',
599
+ uri,
600
+ apiHeaders,
601
+ payload
602
+ );
603
+ }
604
+
605
+ /**
606
+ *
607
+ * @param {string} params.cartId -
608
+ * @param {string} params.id -
609
+ * @throws {RevenexxException}
610
+ * @returns {Promise<Models.CartItem>}
611
+ */
612
+ cartsItemsUpdate(params: { cartId: string, id: string }): Promise<Models.CartItem>;
613
+ /**
614
+ *
615
+ * @param {string} cartId -
616
+ * @param {string} id -
617
+ * @throws {RevenexxException}
618
+ * @returns {Promise<Models.CartItem>}
619
+ * @deprecated Use the object parameter style method for a better developer experience.
620
+ */
621
+ cartsItemsUpdate(cartId: string, id: string): Promise<Models.CartItem>;
622
+ cartsItemsUpdate(
623
+ paramsOrFirst: { cartId: string, id: string } | string,
624
+ ...rest: [(string)?]
625
+ ): Promise<Models.CartItem> {
626
+ let params: { cartId: string, id: string };
627
+
628
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
629
+ params = (paramsOrFirst || {}) as { cartId: string, id: string };
630
+ } else {
631
+ params = {
632
+ cartId: paramsOrFirst as string,
633
+ id: rest[0] as string
634
+ };
635
+ }
636
+
637
+ const cartId = params.cartId;
638
+ const id = params.id;
639
+
640
+ if (typeof cartId === 'undefined') {
641
+ throw new RevenexxException('Missing required parameter: "cartId"');
642
+ }
643
+ if (typeof id === 'undefined') {
644
+ throw new RevenexxException('Missing required parameter: "id"');
645
+ }
646
+
647
+ const apiPath = '/v1/carts/{cart_id}/items/{id}'.replace('{cartId}', cartId).replace('{id}', id);
648
+ const payload: Payload = {};
649
+ const uri = new URL(this.client.config.endpoint + apiPath);
650
+
651
+ const apiHeaders: { [header: string]: string } = {
652
+ 'content-type': 'application/json',
653
+ }
654
+
655
+ return this.client.call(
656
+ 'put',
657
+ uri,
658
+ apiHeaders,
659
+ payload
660
+ );
661
+ }
662
+
663
+ /**
664
+ *
665
+ * @param {string} params.id -
666
+ * @throws {RevenexxException}
667
+ * @returns {Promise<{}>}
668
+ */
669
+ cartsDelete(params: { id: string }): Promise<{}>;
670
+ /**
671
+ *
672
+ * @param {string} id -
673
+ * @throws {RevenexxException}
674
+ * @returns {Promise<{}>}
675
+ * @deprecated Use the object parameter style method for a better developer experience.
676
+ */
677
+ cartsDelete(id: string): Promise<{}>;
678
+ cartsDelete(
679
+ paramsOrFirst: { id: string } | string
680
+ ): Promise<{}> {
681
+ let params: { id: string };
682
+
683
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
684
+ params = (paramsOrFirst || {}) as { id: string };
685
+ } else {
686
+ params = {
687
+ id: paramsOrFirst as string
688
+ };
689
+ }
690
+
691
+ const id = params.id;
692
+
693
+ if (typeof id === 'undefined') {
694
+ throw new RevenexxException('Missing required parameter: "id"');
695
+ }
696
+
697
+ const apiPath = '/v1/carts/{id}'.replace('{id}', id);
698
+ const payload: Payload = {};
699
+ const uri = new URL(this.client.config.endpoint + apiPath);
700
+
701
+ const apiHeaders: { [header: string]: string } = {
702
+ }
703
+
704
+ return this.client.call(
705
+ 'delete',
706
+ uri,
707
+ apiHeaders,
708
+ payload
709
+ );
710
+ }
711
+
712
+ /**
713
+ *
714
+ * @param {string} params.id -
715
+ * @throws {RevenexxException}
716
+ * @returns {Promise<Models.Cart>}
717
+ */
718
+ cartsGet(params: { id: string }): Promise<Models.Cart>;
719
+ /**
720
+ *
721
+ * @param {string} id -
722
+ * @throws {RevenexxException}
723
+ * @returns {Promise<Models.Cart>}
724
+ * @deprecated Use the object parameter style method for a better developer experience.
725
+ */
726
+ cartsGet(id: string): Promise<Models.Cart>;
727
+ cartsGet(
728
+ paramsOrFirst: { id: string } | string
729
+ ): Promise<Models.Cart> {
730
+ let params: { id: string };
731
+
732
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
733
+ params = (paramsOrFirst || {}) as { id: string };
734
+ } else {
735
+ params = {
736
+ id: paramsOrFirst as string
737
+ };
738
+ }
739
+
740
+ const id = params.id;
741
+
742
+ if (typeof id === 'undefined') {
743
+ throw new RevenexxException('Missing required parameter: "id"');
744
+ }
745
+
746
+ const apiPath = '/v1/carts/{id}'.replace('{id}', id);
747
+ const payload: Payload = {};
748
+ const uri = new URL(this.client.config.endpoint + apiPath);
749
+
750
+ const apiHeaders: { [header: string]: string } = {
751
+ }
752
+
753
+ return this.client.call(
754
+ 'get',
755
+ uri,
756
+ apiHeaders,
757
+ payload
758
+ );
759
+ }
760
+
761
+ /**
762
+ *
763
+ * @param {string} params.id -
764
+ * @throws {RevenexxException}
765
+ * @returns {Promise<Models.Cart>}
766
+ */
767
+ cartsUpdate(params: { id: string }): Promise<Models.Cart>;
768
+ /**
769
+ *
770
+ * @param {string} id -
771
+ * @throws {RevenexxException}
772
+ * @returns {Promise<Models.Cart>}
773
+ * @deprecated Use the object parameter style method for a better developer experience.
774
+ */
775
+ cartsUpdate(id: string): Promise<Models.Cart>;
776
+ cartsUpdate(
777
+ paramsOrFirst: { id: string } | string
778
+ ): Promise<Models.Cart> {
779
+ let params: { id: string };
780
+
781
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
782
+ params = (paramsOrFirst || {}) as { id: string };
783
+ } else {
784
+ params = {
785
+ id: paramsOrFirst as string
786
+ };
787
+ }
788
+
789
+ const id = params.id;
790
+
791
+ if (typeof id === 'undefined') {
792
+ throw new RevenexxException('Missing required parameter: "id"');
793
+ }
794
+
795
+ const apiPath = '/v1/carts/{id}'.replace('{id}', id);
796
+ const payload: Payload = {};
797
+ const uri = new URL(this.client.config.endpoint + apiPath);
798
+
799
+ const apiHeaders: { [header: string]: string } = {
800
+ 'content-type': 'application/json',
801
+ }
802
+
803
+ return this.client.call(
804
+ 'put',
805
+ uri,
806
+ apiHeaders,
807
+ payload
808
+ );
809
+ }
810
+
811
+ /**
812
+ *
813
+ * @param {string} params.id -
814
+ * @throws {RevenexxException}
815
+ * @returns {Promise<Models.Cart>}
816
+ */
817
+ cartsAbandon(params: { id: string }): Promise<Models.Cart>;
818
+ /**
819
+ *
820
+ * @param {string} id -
821
+ * @throws {RevenexxException}
822
+ * @returns {Promise<Models.Cart>}
823
+ * @deprecated Use the object parameter style method for a better developer experience.
824
+ */
825
+ cartsAbandon(id: string): Promise<Models.Cart>;
826
+ cartsAbandon(
827
+ paramsOrFirst: { id: string } | string
828
+ ): Promise<Models.Cart> {
829
+ let params: { id: string };
830
+
831
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
832
+ params = (paramsOrFirst || {}) as { id: string };
833
+ } else {
834
+ params = {
835
+ id: paramsOrFirst as string
836
+ };
837
+ }
838
+
839
+ const id = params.id;
840
+
841
+ if (typeof id === 'undefined') {
842
+ throw new RevenexxException('Missing required parameter: "id"');
843
+ }
844
+
845
+ const apiPath = '/v1/carts/{id}/abandon'.replace('{id}', id);
846
+ const payload: Payload = {};
847
+ const uri = new URL(this.client.config.endpoint + apiPath);
848
+
849
+ const apiHeaders: { [header: string]: string } = {
850
+ }
851
+
852
+ return this.client.call(
853
+ 'post',
854
+ uri,
855
+ apiHeaders,
856
+ payload
857
+ );
858
+ }
859
+
860
+ /**
861
+ *
862
+ * @param {string} params.id -
863
+ * @throws {RevenexxException}
864
+ * @returns {Promise<Models.Cart>}
865
+ */
866
+ cartsActivate(params: { id: string }): Promise<Models.Cart>;
867
+ /**
868
+ *
869
+ * @param {string} id -
870
+ * @throws {RevenexxException}
871
+ * @returns {Promise<Models.Cart>}
872
+ * @deprecated Use the object parameter style method for a better developer experience.
873
+ */
874
+ cartsActivate(id: string): Promise<Models.Cart>;
875
+ cartsActivate(
876
+ paramsOrFirst: { id: string } | string
877
+ ): Promise<Models.Cart> {
878
+ let params: { id: string };
879
+
880
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
881
+ params = (paramsOrFirst || {}) as { id: string };
882
+ } else {
883
+ params = {
884
+ id: paramsOrFirst as string
885
+ };
886
+ }
887
+
888
+ const id = params.id;
889
+
890
+ if (typeof id === 'undefined') {
891
+ throw new RevenexxException('Missing required parameter: "id"');
892
+ }
893
+
894
+ const apiPath = '/v1/carts/{id}/activate'.replace('{id}', id);
895
+ const payload: Payload = {};
896
+ const uri = new URL(this.client.config.endpoint + apiPath);
897
+
898
+ const apiHeaders: { [header: string]: string } = {
899
+ }
900
+
901
+ return this.client.call(
902
+ 'post',
903
+ uri,
904
+ apiHeaders,
905
+ payload
906
+ );
907
+ }
908
+
909
+ /**
910
+ *
911
+ * @param {string} params.id -
912
+ * @throws {RevenexxException}
913
+ * @returns {Promise<{}>}
914
+ */
915
+ cartsExport(params: { id: string }): Promise<{}>;
916
+ /**
917
+ *
918
+ * @param {string} id -
919
+ * @throws {RevenexxException}
920
+ * @returns {Promise<{}>}
921
+ * @deprecated Use the object parameter style method for a better developer experience.
922
+ */
923
+ cartsExport(id: string): Promise<{}>;
924
+ cartsExport(
925
+ paramsOrFirst: { id: string } | string
926
+ ): Promise<{}> {
927
+ let params: { id: string };
928
+
929
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
930
+ params = (paramsOrFirst || {}) as { id: string };
931
+ } else {
932
+ params = {
933
+ id: paramsOrFirst as string
934
+ };
935
+ }
936
+
937
+ const id = params.id;
938
+
939
+ if (typeof id === 'undefined') {
940
+ throw new RevenexxException('Missing required parameter: "id"');
941
+ }
942
+
943
+ const apiPath = '/v1/carts/{id}/export'.replace('{id}', id);
944
+ const payload: Payload = {};
945
+ const uri = new URL(this.client.config.endpoint + apiPath);
946
+
947
+ const apiHeaders: { [header: string]: string } = {
948
+ 'content-type': 'application/json',
949
+ }
950
+
951
+ return this.client.call(
952
+ 'post',
953
+ uri,
954
+ apiHeaders,
955
+ payload
956
+ );
957
+ }
958
+
959
+ /**
960
+ *
961
+ * @param {string} params.id -
962
+ * @throws {RevenexxException}
963
+ * @returns {Promise<Models.Cart>}
964
+ */
965
+ cartsOrder(params: { id: string }): Promise<Models.Cart>;
966
+ /**
967
+ *
968
+ * @param {string} id -
969
+ * @throws {RevenexxException}
970
+ * @returns {Promise<Models.Cart>}
971
+ * @deprecated Use the object parameter style method for a better developer experience.
972
+ */
973
+ cartsOrder(id: string): Promise<Models.Cart>;
974
+ cartsOrder(
975
+ paramsOrFirst: { id: string } | string
976
+ ): Promise<Models.Cart> {
977
+ let params: { id: string };
978
+
979
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
980
+ params = (paramsOrFirst || {}) as { id: string };
981
+ } else {
982
+ params = {
983
+ id: paramsOrFirst as string
984
+ };
985
+ }
986
+
987
+ const id = params.id;
988
+
989
+ if (typeof id === 'undefined') {
990
+ throw new RevenexxException('Missing required parameter: "id"');
991
+ }
992
+
993
+ const apiPath = '/v1/carts/{id}/order'.replace('{id}', id);
994
+ const payload: Payload = {};
995
+ const uri = new URL(this.client.config.endpoint + apiPath);
996
+
997
+ const apiHeaders: { [header: string]: string } = {
998
+ 'content-type': 'application/json',
999
+ }
1000
+
1001
+ return this.client.call(
1002
+ 'post',
1003
+ uri,
1004
+ apiHeaders,
1005
+ payload
1006
+ );
1007
+ }
1008
+
1009
+ /**
1010
+ *
1011
+ * @param {string} params.id -
1012
+ * @throws {RevenexxException}
1013
+ * @returns {Promise<Models.Cart>}
1014
+ */
1015
+ cartsReopen(params: { id: string }): Promise<Models.Cart>;
1016
+ /**
1017
+ *
1018
+ * @param {string} id -
1019
+ * @throws {RevenexxException}
1020
+ * @returns {Promise<Models.Cart>}
1021
+ * @deprecated Use the object parameter style method for a better developer experience.
1022
+ */
1023
+ cartsReopen(id: string): Promise<Models.Cart>;
1024
+ cartsReopen(
1025
+ paramsOrFirst: { id: string } | string
1026
+ ): Promise<Models.Cart> {
1027
+ let params: { id: string };
1028
+
1029
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1030
+ params = (paramsOrFirst || {}) as { id: string };
1031
+ } else {
1032
+ params = {
1033
+ id: paramsOrFirst as string
1034
+ };
1035
+ }
1036
+
1037
+ const id = params.id;
1038
+
1039
+ if (typeof id === 'undefined') {
1040
+ throw new RevenexxException('Missing required parameter: "id"');
1041
+ }
1042
+
1043
+ const apiPath = '/v1/carts/{id}/reopen'.replace('{id}', id);
1044
+ const payload: Payload = {};
1045
+ const uri = new URL(this.client.config.endpoint + apiPath);
1046
+
1047
+ const apiHeaders: { [header: string]: string } = {
1048
+ }
1049
+
1050
+ return this.client.call(
1051
+ 'post',
1052
+ uri,
1053
+ apiHeaders,
1054
+ payload
1055
+ );
1056
+ }
1057
+ }