@unchainedshop/core 4.6.0 → 4.6.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 (110) hide show
  1. package/lib/bulk-exporter/createBulkExporter.d.ts +33 -0
  2. package/lib/bulk-exporter/createBulkExporter.js +46 -0
  3. package/lib/bulk-exporter/handlers/exportAssortmentsHandler.d.ts +38 -0
  4. package/lib/bulk-exporter/handlers/exportAssortmentsHandler.js +137 -0
  5. package/lib/bulk-exporter/handlers/exportFiltersHandler.d.ts +26 -0
  6. package/lib/bulk-exporter/handlers/exportFiltersHandler.js +88 -0
  7. package/lib/bulk-exporter/handlers/exportProductsHandler.d.ts +40 -0
  8. package/lib/bulk-exporter/handlers/exportProductsHandler.js +238 -0
  9. package/lib/bulk-exporter/handlers/exportUsersHandler.d.ts +40 -0
  10. package/lib/bulk-exporter/handlers/exportUsersHandler.js +340 -0
  11. package/lib/bulk-exporter/handlers/generateCSVFileAndUrl.d.ts +13 -0
  12. package/lib/bulk-exporter/handlers/generateCSVFileAndUrl.js +21 -0
  13. package/lib/bulk-exporter/handlers/toCSV.d.ts +2 -0
  14. package/lib/bulk-exporter/handlers/toCSV.js +5 -0
  15. package/lib/bulk-exporter/index.d.ts +3 -0
  16. package/lib/bulk-exporter/index.js +3 -0
  17. package/lib/core-index.d.ts +7 -1
  18. package/lib/core-index.js +5 -1
  19. package/lib/directors/FileDirector.d.ts +10 -0
  20. package/lib/directors/FileDirector.js +25 -0
  21. package/lib/directors/WorkerAdapter.d.ts +2 -0
  22. package/lib/errors/common.d.ts +568 -0
  23. package/lib/errors/common.js +789 -0
  24. package/lib/errors/index.d.ts +1 -0
  25. package/lib/errors/index.js +1 -0
  26. package/lib/plugins/PluginRegistry.d.ts +42 -0
  27. package/lib/plugins/PluginRegistry.js +113 -0
  28. package/lib/services/addCartDiscount.d.ts +10 -0
  29. package/lib/services/addCartDiscount.js +27 -0
  30. package/lib/services/addCartItem.d.ts +15 -0
  31. package/lib/services/addCartItem.js +41 -0
  32. package/lib/services/addCartQuotation.d.ts +16 -0
  33. package/lib/services/addCartQuotation.js +52 -0
  34. package/lib/services/addEmail.d.ts +7 -0
  35. package/lib/services/addEmail.js +17 -0
  36. package/lib/services/addProductAssignment.d.ts +3 -0
  37. package/lib/services/addProductAssignment.js +63 -0
  38. package/lib/services/authenticateWithPassword.d.ts +15 -0
  39. package/lib/services/authenticateWithPassword.js +34 -0
  40. package/lib/services/changePassword.d.ts +10 -0
  41. package/lib/services/changePassword.js +19 -0
  42. package/lib/services/countOrdersWithFilters.d.ts +3 -0
  43. package/lib/services/countOrdersWithFilters.js +25 -0
  44. package/lib/services/createAssortment.d.ts +7 -0
  45. package/lib/services/createAssortment.js +10 -0
  46. package/lib/services/createBookmark.d.ts +8 -0
  47. package/lib/services/createBookmark.js +21 -0
  48. package/lib/services/createDeliveryProvider.d.ts +6 -0
  49. package/lib/services/createDeliveryProvider.js +19 -0
  50. package/lib/services/createEnrollment.d.ts +17 -0
  51. package/lib/services/createEnrollment.js +33 -0
  52. package/lib/services/createProduct.d.ts +7 -0
  53. package/lib/services/createProduct.js +8 -0
  54. package/lib/services/createProductBundleItem.d.ts +5 -0
  55. package/lib/services/createProductBundleItem.js +25 -0
  56. package/lib/services/createProductReview.d.ts +8 -0
  57. package/lib/services/createProductReview.js +12 -0
  58. package/lib/services/deliverOrder.d.ts +5 -0
  59. package/lib/services/deliverOrder.js +26 -0
  60. package/lib/services/findActiveWorkTypes.d.ts +2 -0
  61. package/lib/services/findActiveWorkTypes.js +6 -0
  62. package/lib/services/findDeliveryInterfaces.d.ts +7 -0
  63. package/lib/services/findDeliveryInterfaces.js +13 -0
  64. package/lib/services/findOrdersWithFilters.d.ts +9 -0
  65. package/lib/services/findOrdersWithFilters.js +25 -0
  66. package/lib/services/findPaymentInterfaces.d.ts +7 -0
  67. package/lib/services/findPaymentInterfaces.js +13 -0
  68. package/lib/services/findWarehousingInterfaces.d.ts +7 -0
  69. package/lib/services/findWarehousingInterfaces.js +13 -0
  70. package/lib/services/getDeliveryDiscounts.d.ts +8 -0
  71. package/lib/services/getDeliveryDiscounts.js +14 -0
  72. package/lib/services/getPaymentDiscounts.d.ts +8 -0
  73. package/lib/services/getPaymentDiscounts.js +14 -0
  74. package/lib/services/getShopInfo.d.ts +25 -0
  75. package/lib/services/getShopInfo.js +47 -0
  76. package/lib/services/impersonateUser.d.ts +8 -0
  77. package/lib/services/impersonateUser.js +20 -0
  78. package/lib/services/loginAsGuest.d.ts +10 -0
  79. package/lib/services/loginAsGuest.js +19 -0
  80. package/lib/services/obfuscateWorkerData.d.ts +4 -0
  81. package/lib/services/obfuscateWorkerData.js +4 -0
  82. package/lib/services/orderPricingAccessors.d.ts +18 -0
  83. package/lib/services/orderPricingAccessors.js +29 -0
  84. package/lib/services/payOrder.d.ts +5 -0
  85. package/lib/services/payOrder.js +25 -0
  86. package/lib/services/registerUser.d.ts +14 -0
  87. package/lib/services/registerUser.js +44 -0
  88. package/lib/services/removeBookmark.d.ts +6 -0
  89. package/lib/services/removeBookmark.js +10 -0
  90. package/lib/services/removeCartItem.d.ts +6 -0
  91. package/lib/services/removeCartItem.js +19 -0
  92. package/lib/services/resetPasswordWithMigration.d.ts +14 -0
  93. package/lib/services/resetPasswordWithMigration.js +31 -0
  94. package/lib/services/resolveWorkType.d.ts +1 -0
  95. package/lib/services/resolveWorkType.js +7 -0
  96. package/lib/services/searchProductsWithAssortment.d.ts +19 -0
  97. package/lib/services/searchProductsWithAssortment.js +17 -0
  98. package/lib/services/toggleBookmark.d.ts +8 -0
  99. package/lib/services/toggleBookmark.js +33 -0
  100. package/lib/services/updateCart.d.ts +15 -0
  101. package/lib/services/updateCart.js +27 -0
  102. package/lib/services/updateCartItem.d.ts +11 -0
  103. package/lib/services/updateCartItem.js +37 -0
  104. package/lib/services/updateEnrollment.d.ts +13 -0
  105. package/lib/services/updateEnrollment.js +36 -0
  106. package/lib/services/verifyEmailWithMigration.d.ts +15 -0
  107. package/lib/services/verifyEmailWithMigration.js +23 -0
  108. package/lib/utils/getFileAdapter.d.ts +1 -0
  109. package/lib/utils/getFileAdapter.js +7 -0
  110. package/package.json +1 -1
@@ -0,0 +1,789 @@
1
+ export class OrderNotFoundError extends Error {
2
+ code = 'OrderNotFoundError';
3
+ data;
4
+ constructor(data = {}) {
5
+ super('Order not found');
6
+ this.data = data;
7
+ }
8
+ }
9
+ export class OrderWrongStatusError extends Error {
10
+ code = 'OrderWrongStatusError';
11
+ data;
12
+ constructor(data = {}) {
13
+ super('The current status of the order does not allow this operation');
14
+ this.data = data;
15
+ }
16
+ }
17
+ export class OrderItemNotFoundError extends Error {
18
+ code = 'OrderItemNotFoundError';
19
+ data;
20
+ constructor(data = {}) {
21
+ super('Order item not found');
22
+ this.data = data;
23
+ }
24
+ }
25
+ export class OrderQuantityTooLowError extends Error {
26
+ code = 'OrderQuantityTooLowError';
27
+ data;
28
+ constructor(data = {}) {
29
+ super('Quantity cannot be lower than 1');
30
+ this.data = data;
31
+ }
32
+ }
33
+ export class OrderPaymentNotFoundError extends Error {
34
+ code = 'OrderPaymentNotFoundError';
35
+ data;
36
+ constructor(data = {}) {
37
+ super('Order payment not found');
38
+ this.data = data;
39
+ }
40
+ }
41
+ export class OrderWrongPaymentStatusError extends Error {
42
+ code = 'OrderWrongPaymentStatusError';
43
+ data;
44
+ constructor(data = {}) {
45
+ super('The current status of the payment does not allow this operation');
46
+ this.data = data;
47
+ }
48
+ }
49
+ export class OrderDeliveryNotFoundError extends Error {
50
+ code = 'OrderDeliveryNotFoundError';
51
+ data;
52
+ constructor(data = {}) {
53
+ super('Order delivery not found');
54
+ this.data = data;
55
+ }
56
+ }
57
+ export class OrderWrongDeliveryStatusError extends Error {
58
+ code = 'OrderWrongDeliveryStatusError';
59
+ data;
60
+ constructor(data = {}) {
61
+ super('The current status of the delivery does not allow this operation');
62
+ this.data = data;
63
+ }
64
+ }
65
+ export class OrderDiscountCodeAlreadyPresentError extends Error {
66
+ code = 'OrderDiscountCodeAlreadyPresentError';
67
+ data;
68
+ constructor(data = {}) {
69
+ super('Order discount code already present');
70
+ this.data = data;
71
+ }
72
+ }
73
+ export class OrderDiscountCodeNotValidError extends Error {
74
+ code = 'OrderDiscountCodeNotValidError';
75
+ data;
76
+ constructor(data = {}) {
77
+ super('Order discount code not valid');
78
+ this.data = data;
79
+ }
80
+ }
81
+ export class OrderContactMissingError extends Error {
82
+ code = 'OrderContactMissingError';
83
+ data;
84
+ constructor(data = {}) {
85
+ super('Contact data not provided');
86
+ this.data = data;
87
+ }
88
+ }
89
+ export class OrderBillingAddressMissingError extends Error {
90
+ code = 'OrderBillingAddressMissingError';
91
+ data;
92
+ constructor(data = {}) {
93
+ super('Billing address not provided');
94
+ this.data = data;
95
+ }
96
+ }
97
+ export class OrderDeliveryProviderMissingError extends Error {
98
+ code = 'OrderDeliveryProviderMissingError';
99
+ data;
100
+ constructor(data = {}) {
101
+ super('No delivery provider selected');
102
+ this.data = data;
103
+ }
104
+ }
105
+ export class OrderPaymentProviderMissingError extends Error {
106
+ code = 'OrderPaymentProviderMissingError';
107
+ data;
108
+ constructor(data = {}) {
109
+ super('No payment provider selected');
110
+ this.data = data;
111
+ }
112
+ }
113
+ export class ProductNotFoundError extends Error {
114
+ code = 'ProductNotFoundError';
115
+ data;
116
+ constructor(data = {}) {
117
+ super('Product not found');
118
+ this.data = data;
119
+ }
120
+ }
121
+ export class ProductWrongStatusError extends Error {
122
+ code = 'ProductWrongStatusError';
123
+ data;
124
+ constructor(data = {}) {
125
+ super('The current status of the product does not allow this operation');
126
+ this.data = data;
127
+ }
128
+ }
129
+ export class ProductWrongTypeError extends Error {
130
+ code = 'ProductWrongTypeError';
131
+ data;
132
+ constructor(data = {}) {
133
+ super('The current type of the product does not allow this operation');
134
+ this.data = data;
135
+ }
136
+ }
137
+ export class ProductLinkedToActiveBundleError extends Error {
138
+ code = 'ProductLinkedToActiveBundleError';
139
+ data;
140
+ constructor(data = {}) {
141
+ super('Product is part of a active/draft bundle item, remove it from any active/draft bundle item before deleting');
142
+ this.data = data;
143
+ }
144
+ }
145
+ export class ProductLinkedToActiveVariationError extends Error {
146
+ code = 'ProductLinkedToActiveVariationError';
147
+ data;
148
+ constructor(data = {}) {
149
+ super('Product is part of a active variation, remove it from any active/draft variation before deleting');
150
+ this.data = data;
151
+ }
152
+ }
153
+ export class ProductLinkedToQuotationError extends Error {
154
+ code = 'ProductLinkedToQuotationError';
155
+ data;
156
+ constructor(data = {}) {
157
+ super('Product is part of a requested/proposed quotations item, remove it from any requested/proposed quotations item before deleting');
158
+ this.data = data;
159
+ }
160
+ }
161
+ export class ProductLinkedToEnrollmentError extends Error {
162
+ code = 'ProductLinkedToEnrollmentError';
163
+ data;
164
+ constructor(data = {}) {
165
+ super('Product is part of a active/paused subscriptions item, remove it from any active/paused subscriptions item before deleting');
166
+ this.data = data;
167
+ }
168
+ }
169
+ export class CyclicProductBundlingNotSupportedError extends Error {
170
+ code = 'CyclicProductBundlingNotSupportedError';
171
+ data;
172
+ constructor(data = {}) {
173
+ super('Cyclic bundling detected, make sure bundled product is not the same as the bundle product itself');
174
+ this.data = data;
175
+ }
176
+ }
177
+ export class ProductVariationInfinityLoopError extends Error {
178
+ code = 'ProductVariationInfinityLoop';
179
+ data;
180
+ constructor(data = {}) {
181
+ super('Assigning the proxy to itself as child in product assignments is not allowed, this would create an infinite loop');
182
+ this.data = data;
183
+ }
184
+ }
185
+ export class ProductVariationVectorInvalidError extends Error {
186
+ code = 'ProductVariationVectorInvalid';
187
+ data;
188
+ constructor(data) {
189
+ super('Product variation vector is invalid/incomplete');
190
+ this.data = data;
191
+ }
192
+ }
193
+ export class ProductVariationVectorAlreadySetError extends Error {
194
+ code = 'ProductVariationVectorAlreadySet';
195
+ data;
196
+ constructor(data) {
197
+ super('Product variation vector is already set, remove the existing one before setting a new one');
198
+ this.data = data;
199
+ }
200
+ }
201
+ export class EnrollmentNotFoundError extends Error {
202
+ code = 'EnrollmentNotFoundError';
203
+ data;
204
+ constructor(data = {}) {
205
+ super('Enrollment not found');
206
+ this.data = data;
207
+ }
208
+ }
209
+ export class EnrollmentWrongStatusError extends Error {
210
+ code = 'EnrollmentWrongStatusError';
211
+ data;
212
+ constructor(data = {}) {
213
+ super('The current status of the enrollment does not allow this operation');
214
+ this.data = data;
215
+ }
216
+ }
217
+ export class EnrollmentPlanUpdateNotAllowedError extends Error {
218
+ code = 'EnrollmentPlanUpdateNotAllowedError';
219
+ data;
220
+ constructor(data = {}) {
221
+ super('Plan updates are only allowed in INITIAL status');
222
+ this.data = data;
223
+ }
224
+ }
225
+ export class EnrollmentProductNotFoundError extends Error {
226
+ code = 'EnrollmentProductNotFoundError';
227
+ data;
228
+ constructor(data = {}) {
229
+ super('Product not found for enrollment');
230
+ this.data = data;
231
+ }
232
+ }
233
+ export class QuotationNotFoundError extends Error {
234
+ code = 'QuotationNotFoundError';
235
+ data;
236
+ constructor(data = {}) {
237
+ super('Quotation not found');
238
+ this.data = data;
239
+ }
240
+ }
241
+ export class QuotationWrongStatusError extends Error {
242
+ code = 'QuotationWrongStatusError';
243
+ data;
244
+ constructor(data = {}) {
245
+ super('The current status of the quotation does not allow this operation');
246
+ this.data = data;
247
+ }
248
+ }
249
+ export class QuotationItemConfigurationError extends Error {
250
+ code = 'QuotationItemConfigurationError';
251
+ data;
252
+ constructor(data) {
253
+ super('Could not transform quotation item');
254
+ this.data = data;
255
+ }
256
+ }
257
+ export class QuotationExpiredError extends Error {
258
+ code = 'QuotationExpiredError';
259
+ data;
260
+ constructor(data = {}) {
261
+ super('Quotation expired or fulfilled, please request a new offer');
262
+ this.data = data;
263
+ }
264
+ }
265
+ export class UserNotFoundError extends Error {
266
+ code = 'UserNotFoundError';
267
+ data;
268
+ constructor(data = {}) {
269
+ super('User not found');
270
+ this.data = data;
271
+ }
272
+ }
273
+ export class UsernameOrEmailRequiredError extends Error {
274
+ code = 'UsernameOrEmailRequiredError';
275
+ data;
276
+ constructor(data = {}) {
277
+ super('No username or email is provided.');
278
+ this.data = data;
279
+ }
280
+ }
281
+ export class PasswordOrWebAuthnPublicKeyRequiredError extends Error {
282
+ code = 'PasswordOrWebAuthnPublicKeyRequiredError';
283
+ data;
284
+ constructor(data) {
285
+ super('A password or a WebAuthn public key is required');
286
+ this.data = data;
287
+ }
288
+ }
289
+ export class EmailAlreadyExistsError extends Error {
290
+ code = 'EmailAlreadyExistsError';
291
+ data;
292
+ constructor(data = {}) {
293
+ super('Email already exists or is invalid');
294
+ this.data = data;
295
+ }
296
+ }
297
+ export class UsernameAlreadyExistsError extends Error {
298
+ code = 'UsernameAlreadyExistsError';
299
+ data;
300
+ constructor(data = {}) {
301
+ super('Username already exists or is invalid');
302
+ this.data = data;
303
+ }
304
+ }
305
+ export class PasswordInvalidError extends Error {
306
+ code = 'PasswordInvalidError';
307
+ data;
308
+ constructor(data = {}) {
309
+ super('The provided password is invalid, maybe too insecure');
310
+ this.data = data;
311
+ }
312
+ }
313
+ export class WebAuthnVerificationFailedError extends Error {
314
+ code = 'WebAuthnVerificationFailedError';
315
+ data;
316
+ constructor(data) {
317
+ super('WebAuthn credential verification failed');
318
+ this.data = data;
319
+ }
320
+ }
321
+ export class AuthOperationFailedError extends Error {
322
+ code = 'AuthOperationFailedError';
323
+ data;
324
+ constructor(data = {}) {
325
+ super('Operation failed, please make sure you have provided all required parameters');
326
+ this.data = data;
327
+ }
328
+ }
329
+ export class InvalidCredentialsError extends Error {
330
+ code = 'InvalidCredentialsError';
331
+ data;
332
+ constructor(data) {
333
+ super('Invalid credentials provided');
334
+ this.data = data;
335
+ }
336
+ }
337
+ export class ImpersonatingAdminUserError extends Error {
338
+ code = 'ImpersonatingAdminUserError';
339
+ data;
340
+ constructor(data = {}) {
341
+ super('Can not impersonate a admin user account');
342
+ this.data = data;
343
+ }
344
+ }
345
+ export class InvalidEmailVerificationTokenError extends Error {
346
+ code = 'InvalidEmailVerificationTokenError';
347
+ data;
348
+ constructor(data = {}) {
349
+ super('Token invalid or expired');
350
+ this.data = data;
351
+ }
352
+ }
353
+ export class InvalidResetTokenError extends Error {
354
+ code = 'InvalidResetTokenError';
355
+ constructor() {
356
+ super('Reset token invalid or expired');
357
+ }
358
+ }
359
+ export class BookmarkNotFoundError extends Error {
360
+ code = 'BookmarkNotFoundError';
361
+ data;
362
+ constructor(data = {}) {
363
+ super('Bookmark not found');
364
+ this.data = data;
365
+ }
366
+ }
367
+ export class MultipleBookmarksFoundError extends Error {
368
+ code = 'MultipleBookmarksFound';
369
+ data;
370
+ constructor(data = {}) {
371
+ super('The convenience bookmark mutation cannot be used because multiple bookmarks were explicitly created with different metadata');
372
+ this.data = data;
373
+ }
374
+ }
375
+ export class BookmarkAlreadyExistsError extends Error {
376
+ code = 'BookmarkAlreadyExistsError';
377
+ data;
378
+ constructor(data = {}) {
379
+ super('Bookmark already exists');
380
+ this.data = data;
381
+ }
382
+ }
383
+ export class MutuallyExclusiveInputError extends Error {
384
+ code = 'MutuallyExclusiveInputError';
385
+ data;
386
+ constructor(data) {
387
+ const fieldNames = data.fields.join(', ');
388
+ super(`Exactly one of the following parameters must be provided: ${fieldNames}`);
389
+ this.data = data;
390
+ }
391
+ }
392
+ export class ProviderConfigurationInvalidError extends Error {
393
+ code = 'ProviderConfigurationInvalid';
394
+ data;
395
+ constructor(data = {}) {
396
+ super('Provider Configuration invalid (check if the Adapter Key exists)');
397
+ this.data = data;
398
+ }
399
+ }
400
+ export class PermissionSystemError extends Error {
401
+ code = 'PermissionSystemError';
402
+ data;
403
+ constructor(data) {
404
+ super('Permission System Error');
405
+ this.data = data;
406
+ }
407
+ }
408
+ export class NoPermissionError extends Error {
409
+ code = 'NoPermissionError';
410
+ data;
411
+ constructor(data = {}) {
412
+ super(data.message || 'Not authorized');
413
+ this.data = { userId: data.userId, action: data.action, key: data.key };
414
+ }
415
+ }
416
+ export class AssortmentNotFoundError extends Error {
417
+ code = 'AssortmentNotFoundError';
418
+ data;
419
+ constructor(data = {}) {
420
+ super('Assortment not found');
421
+ this.data = data;
422
+ }
423
+ }
424
+ export class AssortmentFilterNotFoundError extends Error {
425
+ code = 'AssortmentFilterNotFoundError';
426
+ data;
427
+ constructor(data = {}) {
428
+ super('Assortment filter not found');
429
+ this.data = data;
430
+ }
431
+ }
432
+ export class AssortmentLinkNotFoundError extends Error {
433
+ code = 'AssortmentLinkNotFoundError';
434
+ data;
435
+ constructor(data = {}) {
436
+ super('Assortment link not found');
437
+ this.data = data;
438
+ }
439
+ }
440
+ export class AssortmentProductNotFoundError extends Error {
441
+ code = 'AssortmentProductNotFoundError';
442
+ data;
443
+ constructor(data = {}) {
444
+ super('Assortment product not found');
445
+ this.data = data;
446
+ }
447
+ }
448
+ export class AssortmentMediaNotFoundError extends Error {
449
+ code = 'AssortmentMediaNotFoundError';
450
+ data;
451
+ constructor(data = {}) {
452
+ super('Assortment media not found');
453
+ this.data = data;
454
+ }
455
+ }
456
+ export class CyclicAssortmentLinkNotSupportedError extends Error {
457
+ code = 'CyclicAssortmentLinkNotSupported';
458
+ data;
459
+ constructor(data = {}) {
460
+ super('Cyclic assortment link detected, make sure child assortment is not assigned as a parent on the assortment graph');
461
+ this.data = data;
462
+ }
463
+ }
464
+ export class ProductVariationNotFoundError extends Error {
465
+ code = 'ProductVariationNotFoundError';
466
+ data;
467
+ constructor(data = {}) {
468
+ super('Product variation not found');
469
+ this.data = data;
470
+ }
471
+ }
472
+ export class ProductMediaNotFoundError extends Error {
473
+ code = 'ProductMediaNotFoundError';
474
+ data;
475
+ constructor(data = {}) {
476
+ super('Product media not found');
477
+ this.data = data;
478
+ }
479
+ }
480
+ export class ProductReviewNotFoundError extends Error {
481
+ code = 'ProductReviewNotFoundError';
482
+ data;
483
+ constructor(data = {}) {
484
+ super('ProductReview not found');
485
+ this.data = data;
486
+ }
487
+ }
488
+ export class ProductInvalidStatusError extends Error {
489
+ code = 'ProductInvalidStatusError';
490
+ data;
491
+ constructor(data = {}) {
492
+ super('Invalid product status');
493
+ this.data = data;
494
+ }
495
+ }
496
+ export class ProductQuantityInvalidError extends Error {
497
+ code = 'ProductQuantityInvalidError';
498
+ data;
499
+ constructor(data = {}) {
500
+ super('Invalid quantity for product');
501
+ this.data = data;
502
+ }
503
+ }
504
+ export class FilterNotFoundError extends Error {
505
+ code = 'FilterNotFoundError';
506
+ data;
507
+ constructor(data = {}) {
508
+ super('Filter not found');
509
+ this.data = data;
510
+ }
511
+ }
512
+ export class DuplicateFilterKeyError extends Error {
513
+ code = 'DuplicateFilterKeyError';
514
+ data;
515
+ constructor(data = {}) {
516
+ super('Key already registered for another filter');
517
+ this.data = data;
518
+ }
519
+ }
520
+ export class CountryNotFoundError extends Error {
521
+ code = 'CountryNotFoundError';
522
+ data;
523
+ constructor(data = {}) {
524
+ super('Country not found');
525
+ this.data = data;
526
+ }
527
+ }
528
+ export class CurrencyNotFoundError extends Error {
529
+ code = 'CurrencyNotFoundError';
530
+ data;
531
+ constructor(data = {}) {
532
+ super('Currency not found');
533
+ this.data = data;
534
+ }
535
+ }
536
+ export class LanguageNotFoundError extends Error {
537
+ code = 'LanguageNotFoundError';
538
+ data;
539
+ constructor(data = {}) {
540
+ super('Language not found');
541
+ this.data = data;
542
+ }
543
+ }
544
+ export class DeliveryProviderNotFoundError extends Error {
545
+ code = 'DeliveryProviderNotFoundError';
546
+ data;
547
+ constructor(data = {}) {
548
+ super('Delivery provider not found');
549
+ this.data = data;
550
+ }
551
+ }
552
+ export class PaymentProviderNotFoundError extends Error {
553
+ code = 'PaymentProviderNotFoundError';
554
+ data;
555
+ constructor(data = {}) {
556
+ super('Payment provider not found');
557
+ this.data = data;
558
+ }
559
+ }
560
+ export class PaymentCredentialsNotFoundError extends Error {
561
+ code = 'PaymentCredentialsNotFoundError';
562
+ data;
563
+ constructor(data = {}) {
564
+ super('Payment credentials not found');
565
+ this.data = data;
566
+ }
567
+ }
568
+ export class OrderNumberAlreadyExistsError extends Error {
569
+ code = 'OrderNumberAlreadyExistsError';
570
+ data;
571
+ constructor(data = {}) {
572
+ super('This orderNumber has already been used by another order');
573
+ this.data = data;
574
+ }
575
+ }
576
+ export class OrderDiscountNotFoundError extends Error {
577
+ code = 'OrderDiscountNotFoundError';
578
+ data;
579
+ constructor(data = {}) {
580
+ super('Order discount not found');
581
+ this.data = data;
582
+ }
583
+ }
584
+ export class OrderPaymentTypeError extends Error {
585
+ code = 'OrderPaymentTypeError';
586
+ data;
587
+ constructor(data = {}) {
588
+ super('The current type of the order payment does not allow this operation');
589
+ this.data = data;
590
+ }
591
+ }
592
+ export class OrderDeliveryTypeError extends Error {
593
+ code = 'OrderDeliveryTypeError';
594
+ data;
595
+ constructor(data = {}) {
596
+ super('The current type of the order delivery does not allow this operation');
597
+ this.data = data;
598
+ }
599
+ }
600
+ export class OrderCheckoutError extends Error {
601
+ code = 'OrderCheckoutError';
602
+ data;
603
+ constructor(data = {}) {
604
+ super('A problem occured while processing the order');
605
+ this.data = data;
606
+ }
607
+ }
608
+ export class OrderPaymentConfigurationError extends Error {
609
+ code = 'OrderPaymentConfigurationError';
610
+ data;
611
+ constructor(data = {}) {
612
+ super('Payment configuration invalid');
613
+ this.data = data;
614
+ }
615
+ }
616
+ export class UserWebAuthnCredentialsNotFoundError extends Error {
617
+ code = 'UserWebAuthnCredentialsNotFoundError';
618
+ data;
619
+ constructor(data = {}) {
620
+ super('User WebAuth Credentials not found');
621
+ this.data = data;
622
+ }
623
+ }
624
+ export class WebAuthnDisabledError extends Error {
625
+ code = 'WebAuthnDisabledError';
626
+ constructor() {
627
+ super('WebAuthn disabled');
628
+ }
629
+ }
630
+ export class UserWeb3AddressNotFoundError extends Error {
631
+ code = 'UserWeb3AddressNotFoundError';
632
+ data;
633
+ constructor(data = {}) {
634
+ super('Web3 Account not found for User');
635
+ this.data = data;
636
+ }
637
+ }
638
+ export class UserWeb3InvalidAddressError extends Error {
639
+ code = 'UserWeb3InvalidAddressError';
640
+ data;
641
+ constructor(data = {}) {
642
+ super('Invalid address provided');
643
+ this.data = data;
644
+ }
645
+ }
646
+ export class UserWeb3AddressSignatureError extends Error {
647
+ code = 'UserWeb3AddressSignatureError';
648
+ data;
649
+ constructor(data = {}) {
650
+ super('Signature does not match web3 account / is invalid');
651
+ this.data = data;
652
+ }
653
+ }
654
+ export class UserNoCartError extends Error {
655
+ code = 'UserNoCartError';
656
+ data;
657
+ constructor(data = {}) {
658
+ super('No open cart available to checkout');
659
+ this.data = data;
660
+ }
661
+ }
662
+ export class NoEmailSetError extends Error {
663
+ code = 'NoEmailSet';
664
+ data;
665
+ constructor(data = {}) {
666
+ super('User has no email set');
667
+ this.data = data;
668
+ }
669
+ }
670
+ export class ResetPasswordLinkUnknownAddressError extends Error {
671
+ code = 'ResetPasswordLinkUnknownAddress';
672
+ data;
673
+ constructor(data = {}) {
674
+ super('Valid token but no email address found for the entry');
675
+ this.data = data;
676
+ }
677
+ }
678
+ export class UserDeactivatedError extends Error {
679
+ code = 'UserDeactivatedError';
680
+ data;
681
+ constructor(data = {}) {
682
+ super('User is deactivated, so not allowed to login');
683
+ this.data = data;
684
+ }
685
+ }
686
+ export class LogoutFailedError extends Error {
687
+ code = 'LogoutFailedError';
688
+ data;
689
+ constructor(data = {}) {
690
+ super('Failed to logout all sessions');
691
+ this.data = data;
692
+ }
693
+ }
694
+ export class WorkNotFoundError extends Error {
695
+ code = 'WorkNotFoundError';
696
+ data;
697
+ constructor(data = {}) {
698
+ super('Work not found');
699
+ this.data = data;
700
+ }
701
+ }
702
+ export class WorkNotFoundOrWrongStatus extends Error {
703
+ code = 'WorkNotFoundOrWrongStatus';
704
+ data;
705
+ constructor(data = {}) {
706
+ super('Could not find work or no work with the correct status');
707
+ this.data = data;
708
+ }
709
+ }
710
+ export class WorkTypeInvalidError extends Error {
711
+ code = 'WorkTypeInvalidError';
712
+ data;
713
+ constructor(data = {}) {
714
+ super('Work type invalid');
715
+ this.data = data;
716
+ }
717
+ }
718
+ export class WarehousingProviderNotFoundError extends Error {
719
+ code = 'WarehousingProviderNotFoundError';
720
+ data;
721
+ constructor(data = {}) {
722
+ super('Warehousing provider not found');
723
+ this.data = data;
724
+ }
725
+ }
726
+ export class TokenNotFoundError extends Error {
727
+ code = 'TokenNotFoundError';
728
+ data;
729
+ constructor(data = {}) {
730
+ super('Token not found');
731
+ this.data = data;
732
+ }
733
+ }
734
+ export class TokenWrongStatusError extends Error {
735
+ code = 'TokenWrongStatusError';
736
+ data;
737
+ constructor(data = {}) {
738
+ super('The current status of the token does not allow this operation');
739
+ this.data = data;
740
+ }
741
+ }
742
+ export class FileNotFoundError extends Error {
743
+ code = 'FileNotFoundError';
744
+ data;
745
+ constructor(data = {}) {
746
+ super('File not found');
747
+ this.data = data;
748
+ }
749
+ }
750
+ export class FileUploadExpiredError extends Error {
751
+ code = 'FileUploadExpired';
752
+ data;
753
+ constructor(data = {}) {
754
+ super('File upload has expired');
755
+ this.data = data;
756
+ }
757
+ }
758
+ export class SignedURLCreationError extends Error {
759
+ code = 'SignedURLCreationError';
760
+ data;
761
+ constructor(data = {}) {
762
+ super('Could not prepare signed URL');
763
+ this.data = data;
764
+ }
765
+ }
766
+ export class FileUploadError extends Error {
767
+ code = 'FileUploadError';
768
+ data;
769
+ constructor(data = {}) {
770
+ super('File not found after upload');
771
+ this.data = data;
772
+ }
773
+ }
774
+ export class InvalidMediaIdError extends Error {
775
+ code = 'InvalidMediaIdError';
776
+ data;
777
+ constructor(data = {}) {
778
+ super('Media id/s to be removed not provided as a string or array');
779
+ this.data = data;
780
+ }
781
+ }
782
+ export class DownloadURLCreationError extends Error {
783
+ code = 'DownloadURLCreationError';
784
+ data;
785
+ constructor(data = {}) {
786
+ super('Could not create download URL');
787
+ this.data = data;
788
+ }
789
+ }