@epcc-sdk/sdks-shopper 0.0.26 → 0.0.27

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 (63) hide show
  1. package/dist/client/@tanstack/react-query.gen.cjs +2741 -0
  2. package/dist/client/@tanstack/react-query.gen.cjs.map +1 -0
  3. package/dist/client/@tanstack/react-query.gen.d.cts +2854 -0
  4. package/dist/client/@tanstack/react-query.gen.d.ts +798 -794
  5. package/dist/client/@tanstack/react-query.gen.mjs +2598 -0
  6. package/dist/client/@tanstack/react-query.gen.mjs.map +1 -0
  7. package/dist/client/index.cjs +25 -0
  8. package/dist/client/index.cjs.map +1 -0
  9. package/dist/client/index.d.cts +3 -0
  10. package/dist/client/index.d.ts +3 -2
  11. package/dist/client/index.mjs +3 -0
  12. package/dist/client/index.mjs.map +1 -0
  13. package/dist/client/sdk.gen.cjs +1923 -0
  14. package/dist/client/sdk.gen.cjs.map +1 -0
  15. package/dist/client/{sdk.gen.js → sdk.gen.d.cts} +330 -1134
  16. package/dist/client/sdk.gen.d.ts +277 -273
  17. package/dist/client/sdk.gen.mjs +1778 -0
  18. package/dist/client/sdk.gen.mjs.map +1 -0
  19. package/dist/client/transformers.gen.cjs +801 -0
  20. package/dist/client/transformers.gen.cjs.map +1 -0
  21. package/dist/client/transformers.gen.d.cts +59 -0
  22. package/dist/client/transformers.gen.d.ts +59 -56
  23. package/dist/client/transformers.gen.mjs +723 -0
  24. package/dist/client/transformers.gen.mjs.map +1 -0
  25. package/dist/client/types.gen.cjs +17 -0
  26. package/dist/client/types.gen.cjs.map +1 -0
  27. package/dist/client/types.gen.d.cts +10550 -0
  28. package/dist/client/types.gen.d.ts +1129 -1127
  29. package/dist/client/types.gen.mjs +1 -0
  30. package/dist/client/types.gen.mjs.map +1 -0
  31. package/dist/index.cjs +40 -0
  32. package/dist/index.cjs.map +1 -0
  33. package/dist/index.d.cts +6 -0
  34. package/dist/index.d.ts +6 -6
  35. package/dist/index.mjs +11 -0
  36. package/dist/index.mjs.map +1 -0
  37. package/dist/utils/extract-media.cjs +54 -0
  38. package/dist/utils/extract-media.cjs.map +1 -0
  39. package/dist/utils/extract-media.d.cts +18 -0
  40. package/dist/utils/extract-media.d.ts +6 -3
  41. package/dist/utils/extract-media.mjs +30 -0
  42. package/dist/utils/extract-media.mjs.map +1 -0
  43. package/dist/utils/extract-product-image.cjs +35 -0
  44. package/dist/utils/extract-product-image.cjs.map +1 -0
  45. package/dist/utils/extract-product-image.d.cts +5 -0
  46. package/dist/utils/extract-product-image.d.ts +5 -2
  47. package/dist/utils/extract-product-image.mjs +11 -0
  48. package/dist/utils/extract-product-image.mjs.map +1 -0
  49. package/dist/utils/index.cjs +32 -0
  50. package/dist/utils/index.cjs.map +1 -0
  51. package/dist/utils/index.d.cts +3 -0
  52. package/dist/utils/index.d.ts +3 -2
  53. package/dist/utils/index.mjs +7 -0
  54. package/dist/utils/index.mjs.map +1 -0
  55. package/package.json +22 -14
  56. package/dist/client/@tanstack/react-query.gen.js +0 -2717
  57. package/dist/client/index.js +0 -3
  58. package/dist/client/transformers.gen.js +0 -789
  59. package/dist/client/types.gen.js +0 -2
  60. package/dist/index.js +0 -6
  61. package/dist/utils/extract-media.js +0 -54
  62. package/dist/utils/extract-product-image.js +0 -8
  63. package/dist/utils/index.js +0 -2
@@ -0,0 +1,2598 @@
1
+ import { queryOptions } from "@tanstack/react-query";
2
+ import {
3
+ getByContextRelease,
4
+ getByContextAllHierarchies,
5
+ getByContextHierarchy,
6
+ getByContextHierarchyNodes,
7
+ getByContextHierarchyChildNodes,
8
+ getByContextAllNodes,
9
+ getByContextNode,
10
+ getByContextChildNodes,
11
+ getByContextAllProducts,
12
+ getByContextProduct,
13
+ getByContextComponentProductIds,
14
+ getByContextChildProducts,
15
+ getByContextProductsForHierarchy,
16
+ getByContextProductsForNode,
17
+ configureByContextProduct,
18
+ getCatalogs,
19
+ createCatalog,
20
+ deleteCatalogById,
21
+ getCatalogById,
22
+ updateCatalog,
23
+ deleteReleases,
24
+ getReleases,
25
+ publishRelease,
26
+ deleteReleaseById,
27
+ getReleaseById,
28
+ getRules,
29
+ createRule,
30
+ deleteRuleById,
31
+ getRuleById,
32
+ updateRule,
33
+ getAllHierarchies,
34
+ getHierarchy,
35
+ getHierarchyNodes,
36
+ getHierarchyChildNodes,
37
+ getAllNodes,
38
+ getNode,
39
+ getChildNodes,
40
+ getAllProducts,
41
+ getProduct,
42
+ getComponentProductIds,
43
+ getChildProducts,
44
+ getProductsForHierarchy,
45
+ getProductsForNode,
46
+ getCarts,
47
+ createACart,
48
+ deleteACart,
49
+ getCart,
50
+ updateACart,
51
+ deleteAllCartItems,
52
+ getCartItems,
53
+ manageCarts,
54
+ bulkUpdateItemsInCart,
55
+ deleteACartItem,
56
+ updateACartItem,
57
+ deleteAccountCartAssociation,
58
+ createAccountCartAssociation,
59
+ deleteCustomerCartAssociation,
60
+ createCustomerCartAssociation,
61
+ deleteAPromotionViaPromotionCode,
62
+ addTaxItemToCart,
63
+ bulkDeleteTaxItemsFromCart,
64
+ bulkAddTaxItemsToCart,
65
+ deleteATaxItem,
66
+ updateATaxItem,
67
+ bulkDeleteCustomDiscountsFromCart,
68
+ bulkAddCustomDiscountsToCart,
69
+ deleteCustomDiscountFromCart,
70
+ updateCustomDiscountForCart,
71
+ addCustomDiscountToCartItem,
72
+ deleteCustomDiscountFromCartItem,
73
+ updateCustomDiscountForCartItem,
74
+ createCartPaymentIntent,
75
+ checkoutApi,
76
+ getCustomerOrders,
77
+ getAnOrder,
78
+ updateAnOrder,
79
+ getOrderItems,
80
+ anonymizeOrders,
81
+ paymentSetup,
82
+ confirmPayment,
83
+ captureATransaction,
84
+ refundATransaction,
85
+ getOrderTransactions,
86
+ getATransaction,
87
+ cancelATransaction,
88
+ getSubscriptionProduct,
89
+ getPlan,
90
+ listOfferings,
91
+ getOffering,
92
+ listOfferingPlans,
93
+ listOfferingFeatures,
94
+ listOfferingProducts,
95
+ listSubscriptions,
96
+ getSubscription,
97
+ listSubscriptionProducts,
98
+ listSubscriptionPlans,
99
+ listSubscriptionStates,
100
+ getSubscriptionState,
101
+ listSubscriptionInvoices,
102
+ listSubscriptionInvoicePayments,
103
+ getSubscriptionInvoicePayment,
104
+ getSubscriptionInvoice,
105
+ listInvoices,
106
+ getInvoice,
107
+ getFeature,
108
+ getStock,
109
+ listLocations,
110
+ createAnAccessToken,
111
+ getV2AccountAddresses,
112
+ postV2AccountAddress,
113
+ deleteV2AccountAddress,
114
+ getV2AccountAddress,
115
+ putV2AccountAddress,
116
+ getV2Accounts,
117
+ postV2Accounts,
118
+ getV2AccountsAccountId,
119
+ putV2AccountsAccountId,
120
+ getV2AccountMembers,
121
+ getV2AccountMembersAccountMemberId,
122
+ getV2AccountsAccountIdAccountMemberships,
123
+ postV2AccountMembersTokens,
124
+ getAllCurrencies,
125
+ getACurrency,
126
+ getAllFiles,
127
+ getAFile,
128
+ client
129
+ } from "../sdk.gen.mjs";
130
+ const createQueryKey = (id, options, infinite) => {
131
+ const params = {
132
+ _id: id,
133
+ baseUrl: (options?.client ?? client).getConfig().baseUrl
134
+ };
135
+ if (infinite) {
136
+ params._infinite = infinite;
137
+ }
138
+ if (options?.body) {
139
+ params.body = options.body;
140
+ }
141
+ if (options?.headers) {
142
+ params.headers = options.headers;
143
+ }
144
+ if (options?.path) {
145
+ params.path = options.path;
146
+ }
147
+ if (options?.query) {
148
+ params.query = options.query;
149
+ }
150
+ return params;
151
+ };
152
+ const getByContextReleaseQueryKey = (options) => [createQueryKey("getByContextRelease", options)];
153
+ const getByContextReleaseOptions = (options) => {
154
+ return queryOptions({
155
+ queryFn: async ({ queryKey, signal }) => {
156
+ const { data } = await getByContextRelease({
157
+ ...options,
158
+ ...queryKey[0],
159
+ signal,
160
+ throwOnError: true
161
+ });
162
+ return data;
163
+ },
164
+ queryKey: getByContextReleaseQueryKey(options)
165
+ });
166
+ };
167
+ const getByContextAllHierarchiesQueryKey = (options) => [createQueryKey("getByContextAllHierarchies", options)];
168
+ const getByContextAllHierarchiesOptions = (options) => {
169
+ return queryOptions({
170
+ queryFn: async ({ queryKey, signal }) => {
171
+ const { data } = await getByContextAllHierarchies({
172
+ ...options,
173
+ ...queryKey[0],
174
+ signal,
175
+ throwOnError: true
176
+ });
177
+ return data;
178
+ },
179
+ queryKey: getByContextAllHierarchiesQueryKey(options)
180
+ });
181
+ };
182
+ const getByContextHierarchyQueryKey = (options) => [createQueryKey("getByContextHierarchy", options)];
183
+ const getByContextHierarchyOptions = (options) => {
184
+ return queryOptions({
185
+ queryFn: async ({ queryKey, signal }) => {
186
+ const { data } = await getByContextHierarchy({
187
+ ...options,
188
+ ...queryKey[0],
189
+ signal,
190
+ throwOnError: true
191
+ });
192
+ return data;
193
+ },
194
+ queryKey: getByContextHierarchyQueryKey(options)
195
+ });
196
+ };
197
+ const getByContextHierarchyNodesQueryKey = (options) => [createQueryKey("getByContextHierarchyNodes", options)];
198
+ const getByContextHierarchyNodesOptions = (options) => {
199
+ return queryOptions({
200
+ queryFn: async ({ queryKey, signal }) => {
201
+ const { data } = await getByContextHierarchyNodes({
202
+ ...options,
203
+ ...queryKey[0],
204
+ signal,
205
+ throwOnError: true
206
+ });
207
+ return data;
208
+ },
209
+ queryKey: getByContextHierarchyNodesQueryKey(options)
210
+ });
211
+ };
212
+ const getByContextHierarchyChildNodesQueryKey = (options) => [createQueryKey("getByContextHierarchyChildNodes", options)];
213
+ const getByContextHierarchyChildNodesOptions = (options) => {
214
+ return queryOptions({
215
+ queryFn: async ({ queryKey, signal }) => {
216
+ const { data } = await getByContextHierarchyChildNodes({
217
+ ...options,
218
+ ...queryKey[0],
219
+ signal,
220
+ throwOnError: true
221
+ });
222
+ return data;
223
+ },
224
+ queryKey: getByContextHierarchyChildNodesQueryKey(options)
225
+ });
226
+ };
227
+ const getByContextAllNodesQueryKey = (options) => [createQueryKey("getByContextAllNodes", options)];
228
+ const getByContextAllNodesOptions = (options) => {
229
+ return queryOptions({
230
+ queryFn: async ({ queryKey, signal }) => {
231
+ const { data } = await getByContextAllNodes({
232
+ ...options,
233
+ ...queryKey[0],
234
+ signal,
235
+ throwOnError: true
236
+ });
237
+ return data;
238
+ },
239
+ queryKey: getByContextAllNodesQueryKey(options)
240
+ });
241
+ };
242
+ const getByContextNodeQueryKey = (options) => [createQueryKey("getByContextNode", options)];
243
+ const getByContextNodeOptions = (options) => {
244
+ return queryOptions({
245
+ queryFn: async ({ queryKey, signal }) => {
246
+ const { data } = await getByContextNode({
247
+ ...options,
248
+ ...queryKey[0],
249
+ signal,
250
+ throwOnError: true
251
+ });
252
+ return data;
253
+ },
254
+ queryKey: getByContextNodeQueryKey(options)
255
+ });
256
+ };
257
+ const getByContextChildNodesQueryKey = (options) => [createQueryKey("getByContextChildNodes", options)];
258
+ const getByContextChildNodesOptions = (options) => {
259
+ return queryOptions({
260
+ queryFn: async ({ queryKey, signal }) => {
261
+ const { data } = await getByContextChildNodes({
262
+ ...options,
263
+ ...queryKey[0],
264
+ signal,
265
+ throwOnError: true
266
+ });
267
+ return data;
268
+ },
269
+ queryKey: getByContextChildNodesQueryKey(options)
270
+ });
271
+ };
272
+ const getByContextAllProductsQueryKey = (options) => [createQueryKey("getByContextAllProducts", options)];
273
+ const getByContextAllProductsOptions = (options) => {
274
+ return queryOptions({
275
+ queryFn: async ({ queryKey, signal }) => {
276
+ const { data } = await getByContextAllProducts({
277
+ ...options,
278
+ ...queryKey[0],
279
+ signal,
280
+ throwOnError: true
281
+ });
282
+ return data;
283
+ },
284
+ queryKey: getByContextAllProductsQueryKey(options)
285
+ });
286
+ };
287
+ const getByContextProductQueryKey = (options) => [createQueryKey("getByContextProduct", options)];
288
+ const getByContextProductOptions = (options) => {
289
+ return queryOptions({
290
+ queryFn: async ({ queryKey, signal }) => {
291
+ const { data } = await getByContextProduct({
292
+ ...options,
293
+ ...queryKey[0],
294
+ signal,
295
+ throwOnError: true
296
+ });
297
+ return data;
298
+ },
299
+ queryKey: getByContextProductQueryKey(options)
300
+ });
301
+ };
302
+ const getByContextComponentProductIdsQueryKey = (options) => [createQueryKey("getByContextComponentProductIds", options)];
303
+ const getByContextComponentProductIdsOptions = (options) => {
304
+ return queryOptions({
305
+ queryFn: async ({ queryKey, signal }) => {
306
+ const { data } = await getByContextComponentProductIds({
307
+ ...options,
308
+ ...queryKey[0],
309
+ signal,
310
+ throwOnError: true
311
+ });
312
+ return data;
313
+ },
314
+ queryKey: getByContextComponentProductIdsQueryKey(options)
315
+ });
316
+ };
317
+ const getByContextChildProductsQueryKey = (options) => [createQueryKey("getByContextChildProducts", options)];
318
+ const getByContextChildProductsOptions = (options) => {
319
+ return queryOptions({
320
+ queryFn: async ({ queryKey, signal }) => {
321
+ const { data } = await getByContextChildProducts({
322
+ ...options,
323
+ ...queryKey[0],
324
+ signal,
325
+ throwOnError: true
326
+ });
327
+ return data;
328
+ },
329
+ queryKey: getByContextChildProductsQueryKey(options)
330
+ });
331
+ };
332
+ const getByContextProductsForHierarchyQueryKey = (options) => [createQueryKey("getByContextProductsForHierarchy", options)];
333
+ const getByContextProductsForHierarchyOptions = (options) => {
334
+ return queryOptions({
335
+ queryFn: async ({ queryKey, signal }) => {
336
+ const { data } = await getByContextProductsForHierarchy({
337
+ ...options,
338
+ ...queryKey[0],
339
+ signal,
340
+ throwOnError: true
341
+ });
342
+ return data;
343
+ },
344
+ queryKey: getByContextProductsForHierarchyQueryKey(options)
345
+ });
346
+ };
347
+ const getByContextProductsForNodeQueryKey = (options) => [createQueryKey("getByContextProductsForNode", options)];
348
+ const getByContextProductsForNodeOptions = (options) => {
349
+ return queryOptions({
350
+ queryFn: async ({ queryKey, signal }) => {
351
+ const { data } = await getByContextProductsForNode({
352
+ ...options,
353
+ ...queryKey[0],
354
+ signal,
355
+ throwOnError: true
356
+ });
357
+ return data;
358
+ },
359
+ queryKey: getByContextProductsForNodeQueryKey(options)
360
+ });
361
+ };
362
+ const configureByContextProductQueryKey = (options) => [createQueryKey("configureByContextProduct", options)];
363
+ const configureByContextProductOptions = (options) => {
364
+ return queryOptions({
365
+ queryFn: async ({ queryKey, signal }) => {
366
+ const { data } = await configureByContextProduct({
367
+ ...options,
368
+ ...queryKey[0],
369
+ signal,
370
+ throwOnError: true
371
+ });
372
+ return data;
373
+ },
374
+ queryKey: configureByContextProductQueryKey(options)
375
+ });
376
+ };
377
+ const configureByContextProductMutation = (options) => {
378
+ const mutationOptions = {
379
+ mutationFn: async (localOptions) => {
380
+ const { data } = await configureByContextProduct({
381
+ ...options,
382
+ ...localOptions,
383
+ throwOnError: true
384
+ });
385
+ return data;
386
+ }
387
+ };
388
+ return mutationOptions;
389
+ };
390
+ const getCatalogsQueryKey = (options) => [
391
+ createQueryKey("getCatalogs", options)
392
+ ];
393
+ const getCatalogsOptions = (options) => {
394
+ return queryOptions({
395
+ queryFn: async ({ queryKey, signal }) => {
396
+ const { data } = await getCatalogs({
397
+ ...options,
398
+ ...queryKey[0],
399
+ signal,
400
+ throwOnError: true
401
+ });
402
+ return data;
403
+ },
404
+ queryKey: getCatalogsQueryKey(options)
405
+ });
406
+ };
407
+ const createCatalogQueryKey = (options) => [
408
+ createQueryKey("createCatalog", options)
409
+ ];
410
+ const createCatalogOptions = (options) => {
411
+ return queryOptions({
412
+ queryFn: async ({ queryKey, signal }) => {
413
+ const { data } = await createCatalog({
414
+ ...options,
415
+ ...queryKey[0],
416
+ signal,
417
+ throwOnError: true
418
+ });
419
+ return data;
420
+ },
421
+ queryKey: createCatalogQueryKey(options)
422
+ });
423
+ };
424
+ const createCatalogMutation = (options) => {
425
+ const mutationOptions = {
426
+ mutationFn: async (localOptions) => {
427
+ const { data } = await createCatalog({
428
+ ...options,
429
+ ...localOptions,
430
+ throwOnError: true
431
+ });
432
+ return data;
433
+ }
434
+ };
435
+ return mutationOptions;
436
+ };
437
+ const deleteCatalogByIdMutation = (options) => {
438
+ const mutationOptions = {
439
+ mutationFn: async (localOptions) => {
440
+ const { data } = await deleteCatalogById({
441
+ ...options,
442
+ ...localOptions,
443
+ throwOnError: true
444
+ });
445
+ return data;
446
+ }
447
+ };
448
+ return mutationOptions;
449
+ };
450
+ const getCatalogByIdQueryKey = (options) => [createQueryKey("getCatalogById", options)];
451
+ const getCatalogByIdOptions = (options) => {
452
+ return queryOptions({
453
+ queryFn: async ({ queryKey, signal }) => {
454
+ const { data } = await getCatalogById({
455
+ ...options,
456
+ ...queryKey[0],
457
+ signal,
458
+ throwOnError: true
459
+ });
460
+ return data;
461
+ },
462
+ queryKey: getCatalogByIdQueryKey(options)
463
+ });
464
+ };
465
+ const updateCatalogMutation = (options) => {
466
+ const mutationOptions = {
467
+ mutationFn: async (localOptions) => {
468
+ const { data } = await updateCatalog({
469
+ ...options,
470
+ ...localOptions,
471
+ throwOnError: true
472
+ });
473
+ return data;
474
+ }
475
+ };
476
+ return mutationOptions;
477
+ };
478
+ const deleteReleasesMutation = (options) => {
479
+ const mutationOptions = {
480
+ mutationFn: async (localOptions) => {
481
+ const { data } = await deleteReleases({
482
+ ...options,
483
+ ...localOptions,
484
+ throwOnError: true
485
+ });
486
+ return data;
487
+ }
488
+ };
489
+ return mutationOptions;
490
+ };
491
+ const getReleasesQueryKey = (options) => [
492
+ createQueryKey("getReleases", options)
493
+ ];
494
+ const getReleasesOptions = (options) => {
495
+ return queryOptions({
496
+ queryFn: async ({ queryKey, signal }) => {
497
+ const { data } = await getReleases({
498
+ ...options,
499
+ ...queryKey[0],
500
+ signal,
501
+ throwOnError: true
502
+ });
503
+ return data;
504
+ },
505
+ queryKey: getReleasesQueryKey(options)
506
+ });
507
+ };
508
+ const publishReleaseQueryKey = (options) => [createQueryKey("publishRelease", options)];
509
+ const publishReleaseOptions = (options) => {
510
+ return queryOptions({
511
+ queryFn: async ({ queryKey, signal }) => {
512
+ const { data } = await publishRelease({
513
+ ...options,
514
+ ...queryKey[0],
515
+ signal,
516
+ throwOnError: true
517
+ });
518
+ return data;
519
+ },
520
+ queryKey: publishReleaseQueryKey(options)
521
+ });
522
+ };
523
+ const publishReleaseMutation = (options) => {
524
+ const mutationOptions = {
525
+ mutationFn: async (localOptions) => {
526
+ const { data } = await publishRelease({
527
+ ...options,
528
+ ...localOptions,
529
+ throwOnError: true
530
+ });
531
+ return data;
532
+ }
533
+ };
534
+ return mutationOptions;
535
+ };
536
+ const deleteReleaseByIdMutation = (options) => {
537
+ const mutationOptions = {
538
+ mutationFn: async (localOptions) => {
539
+ const { data } = await deleteReleaseById({
540
+ ...options,
541
+ ...localOptions,
542
+ throwOnError: true
543
+ });
544
+ return data;
545
+ }
546
+ };
547
+ return mutationOptions;
548
+ };
549
+ const getReleaseByIdQueryKey = (options) => [createQueryKey("getReleaseById", options)];
550
+ const getReleaseByIdOptions = (options) => {
551
+ return queryOptions({
552
+ queryFn: async ({ queryKey, signal }) => {
553
+ const { data } = await getReleaseById({
554
+ ...options,
555
+ ...queryKey[0],
556
+ signal,
557
+ throwOnError: true
558
+ });
559
+ return data;
560
+ },
561
+ queryKey: getReleaseByIdQueryKey(options)
562
+ });
563
+ };
564
+ const getRulesQueryKey = (options) => [
565
+ createQueryKey("getRules", options)
566
+ ];
567
+ const getRulesOptions = (options) => {
568
+ return queryOptions({
569
+ queryFn: async ({ queryKey, signal }) => {
570
+ const { data } = await getRules({
571
+ ...options,
572
+ ...queryKey[0],
573
+ signal,
574
+ throwOnError: true
575
+ });
576
+ return data;
577
+ },
578
+ queryKey: getRulesQueryKey(options)
579
+ });
580
+ };
581
+ const createRuleQueryKey = (options) => [
582
+ createQueryKey("createRule", options)
583
+ ];
584
+ const createRuleOptions = (options) => {
585
+ return queryOptions({
586
+ queryFn: async ({ queryKey, signal }) => {
587
+ const { data } = await createRule({
588
+ ...options,
589
+ ...queryKey[0],
590
+ signal,
591
+ throwOnError: true
592
+ });
593
+ return data;
594
+ },
595
+ queryKey: createRuleQueryKey(options)
596
+ });
597
+ };
598
+ const createRuleMutation = (options) => {
599
+ const mutationOptions = {
600
+ mutationFn: async (localOptions) => {
601
+ const { data } = await createRule({
602
+ ...options,
603
+ ...localOptions,
604
+ throwOnError: true
605
+ });
606
+ return data;
607
+ }
608
+ };
609
+ return mutationOptions;
610
+ };
611
+ const deleteRuleByIdMutation = (options) => {
612
+ const mutationOptions = {
613
+ mutationFn: async (localOptions) => {
614
+ const { data } = await deleteRuleById({
615
+ ...options,
616
+ ...localOptions,
617
+ throwOnError: true
618
+ });
619
+ return data;
620
+ }
621
+ };
622
+ return mutationOptions;
623
+ };
624
+ const getRuleByIdQueryKey = (options) => [
625
+ createQueryKey("getRuleById", options)
626
+ ];
627
+ const getRuleByIdOptions = (options) => {
628
+ return queryOptions({
629
+ queryFn: async ({ queryKey, signal }) => {
630
+ const { data } = await getRuleById({
631
+ ...options,
632
+ ...queryKey[0],
633
+ signal,
634
+ throwOnError: true
635
+ });
636
+ return data;
637
+ },
638
+ queryKey: getRuleByIdQueryKey(options)
639
+ });
640
+ };
641
+ const updateRuleMutation = (options) => {
642
+ const mutationOptions = {
643
+ mutationFn: async (localOptions) => {
644
+ const { data } = await updateRule({
645
+ ...options,
646
+ ...localOptions,
647
+ throwOnError: true
648
+ });
649
+ return data;
650
+ }
651
+ };
652
+ return mutationOptions;
653
+ };
654
+ const getAllHierarchiesQueryKey = (options) => [createQueryKey("getAllHierarchies", options)];
655
+ const getAllHierarchiesOptions = (options) => {
656
+ return queryOptions({
657
+ queryFn: async ({ queryKey, signal }) => {
658
+ const { data } = await getAllHierarchies({
659
+ ...options,
660
+ ...queryKey[0],
661
+ signal,
662
+ throwOnError: true
663
+ });
664
+ return data;
665
+ },
666
+ queryKey: getAllHierarchiesQueryKey(options)
667
+ });
668
+ };
669
+ const getHierarchyQueryKey = (options) => [
670
+ createQueryKey("getHierarchy", options)
671
+ ];
672
+ const getHierarchyOptions = (options) => {
673
+ return queryOptions({
674
+ queryFn: async ({ queryKey, signal }) => {
675
+ const { data } = await getHierarchy({
676
+ ...options,
677
+ ...queryKey[0],
678
+ signal,
679
+ throwOnError: true
680
+ });
681
+ return data;
682
+ },
683
+ queryKey: getHierarchyQueryKey(options)
684
+ });
685
+ };
686
+ const getHierarchyNodesQueryKey = (options) => [createQueryKey("getHierarchyNodes", options)];
687
+ const getHierarchyNodesOptions = (options) => {
688
+ return queryOptions({
689
+ queryFn: async ({ queryKey, signal }) => {
690
+ const { data } = await getHierarchyNodes({
691
+ ...options,
692
+ ...queryKey[0],
693
+ signal,
694
+ throwOnError: true
695
+ });
696
+ return data;
697
+ },
698
+ queryKey: getHierarchyNodesQueryKey(options)
699
+ });
700
+ };
701
+ const getHierarchyChildNodesQueryKey = (options) => [createQueryKey("getHierarchyChildNodes", options)];
702
+ const getHierarchyChildNodesOptions = (options) => {
703
+ return queryOptions({
704
+ queryFn: async ({ queryKey, signal }) => {
705
+ const { data } = await getHierarchyChildNodes({
706
+ ...options,
707
+ ...queryKey[0],
708
+ signal,
709
+ throwOnError: true
710
+ });
711
+ return data;
712
+ },
713
+ queryKey: getHierarchyChildNodesQueryKey(options)
714
+ });
715
+ };
716
+ const getAllNodesQueryKey = (options) => [
717
+ createQueryKey("getAllNodes", options)
718
+ ];
719
+ const getAllNodesOptions = (options) => {
720
+ return queryOptions({
721
+ queryFn: async ({ queryKey, signal }) => {
722
+ const { data } = await getAllNodes({
723
+ ...options,
724
+ ...queryKey[0],
725
+ signal,
726
+ throwOnError: true
727
+ });
728
+ return data;
729
+ },
730
+ queryKey: getAllNodesQueryKey(options)
731
+ });
732
+ };
733
+ const getNodeQueryKey = (options) => [
734
+ createQueryKey("getNode", options)
735
+ ];
736
+ const getNodeOptions = (options) => {
737
+ return queryOptions({
738
+ queryFn: async ({ queryKey, signal }) => {
739
+ const { data } = await getNode({
740
+ ...options,
741
+ ...queryKey[0],
742
+ signal,
743
+ throwOnError: true
744
+ });
745
+ return data;
746
+ },
747
+ queryKey: getNodeQueryKey(options)
748
+ });
749
+ };
750
+ const getChildNodesQueryKey = (options) => [
751
+ createQueryKey("getChildNodes", options)
752
+ ];
753
+ const getChildNodesOptions = (options) => {
754
+ return queryOptions({
755
+ queryFn: async ({ queryKey, signal }) => {
756
+ const { data } = await getChildNodes({
757
+ ...options,
758
+ ...queryKey[0],
759
+ signal,
760
+ throwOnError: true
761
+ });
762
+ return data;
763
+ },
764
+ queryKey: getChildNodesQueryKey(options)
765
+ });
766
+ };
767
+ const getAllProductsQueryKey = (options) => [createQueryKey("getAllProducts", options)];
768
+ const getAllProductsOptions = (options) => {
769
+ return queryOptions({
770
+ queryFn: async ({ queryKey, signal }) => {
771
+ const { data } = await getAllProducts({
772
+ ...options,
773
+ ...queryKey[0],
774
+ signal,
775
+ throwOnError: true
776
+ });
777
+ return data;
778
+ },
779
+ queryKey: getAllProductsQueryKey(options)
780
+ });
781
+ };
782
+ const getProductQueryKey = (options) => [
783
+ createQueryKey("getProduct", options)
784
+ ];
785
+ const getProductOptions = (options) => {
786
+ return queryOptions({
787
+ queryFn: async ({ queryKey, signal }) => {
788
+ const { data } = await getProduct({
789
+ ...options,
790
+ ...queryKey[0],
791
+ signal,
792
+ throwOnError: true
793
+ });
794
+ return data;
795
+ },
796
+ queryKey: getProductQueryKey(options)
797
+ });
798
+ };
799
+ const getComponentProductIdsQueryKey = (options) => [createQueryKey("getComponentProductIds", options)];
800
+ const getComponentProductIdsOptions = (options) => {
801
+ return queryOptions({
802
+ queryFn: async ({ queryKey, signal }) => {
803
+ const { data } = await getComponentProductIds({
804
+ ...options,
805
+ ...queryKey[0],
806
+ signal,
807
+ throwOnError: true
808
+ });
809
+ return data;
810
+ },
811
+ queryKey: getComponentProductIdsQueryKey(options)
812
+ });
813
+ };
814
+ const getChildProductsQueryKey = (options) => [createQueryKey("getChildProducts", options)];
815
+ const getChildProductsOptions = (options) => {
816
+ return queryOptions({
817
+ queryFn: async ({ queryKey, signal }) => {
818
+ const { data } = await getChildProducts({
819
+ ...options,
820
+ ...queryKey[0],
821
+ signal,
822
+ throwOnError: true
823
+ });
824
+ return data;
825
+ },
826
+ queryKey: getChildProductsQueryKey(options)
827
+ });
828
+ };
829
+ const getProductsForHierarchyQueryKey = (options) => [createQueryKey("getProductsForHierarchy", options)];
830
+ const getProductsForHierarchyOptions = (options) => {
831
+ return queryOptions({
832
+ queryFn: async ({ queryKey, signal }) => {
833
+ const { data } = await getProductsForHierarchy({
834
+ ...options,
835
+ ...queryKey[0],
836
+ signal,
837
+ throwOnError: true
838
+ });
839
+ return data;
840
+ },
841
+ queryKey: getProductsForHierarchyQueryKey(options)
842
+ });
843
+ };
844
+ const getProductsForNodeQueryKey = (options) => [createQueryKey("getProductsForNode", options)];
845
+ const getProductsForNodeOptions = (options) => {
846
+ return queryOptions({
847
+ queryFn: async ({ queryKey, signal }) => {
848
+ const { data } = await getProductsForNode({
849
+ ...options,
850
+ ...queryKey[0],
851
+ signal,
852
+ throwOnError: true
853
+ });
854
+ return data;
855
+ },
856
+ queryKey: getProductsForNodeQueryKey(options)
857
+ });
858
+ };
859
+ const getCartsQueryKey = (options) => [
860
+ createQueryKey("getCarts", options)
861
+ ];
862
+ const getCartsOptions = (options) => {
863
+ return queryOptions({
864
+ queryFn: async ({ queryKey, signal }) => {
865
+ const { data } = await getCarts({
866
+ ...options,
867
+ ...queryKey[0],
868
+ signal,
869
+ throwOnError: true
870
+ });
871
+ return data;
872
+ },
873
+ queryKey: getCartsQueryKey(options)
874
+ });
875
+ };
876
+ const createACartQueryKey = (options) => [
877
+ createQueryKey("createACart", options)
878
+ ];
879
+ const createACartOptions = (options) => {
880
+ return queryOptions({
881
+ queryFn: async ({ queryKey, signal }) => {
882
+ const { data } = await createACart({
883
+ ...options,
884
+ ...queryKey[0],
885
+ signal,
886
+ throwOnError: true
887
+ });
888
+ return data;
889
+ },
890
+ queryKey: createACartQueryKey(options)
891
+ });
892
+ };
893
+ const createACartMutation = (options) => {
894
+ const mutationOptions = {
895
+ mutationFn: async (localOptions) => {
896
+ const { data } = await createACart({
897
+ ...options,
898
+ ...localOptions,
899
+ throwOnError: true
900
+ });
901
+ return data;
902
+ }
903
+ };
904
+ return mutationOptions;
905
+ };
906
+ const deleteACartMutation = (options) => {
907
+ const mutationOptions = {
908
+ mutationFn: async (localOptions) => {
909
+ const { data } = await deleteACart({
910
+ ...options,
911
+ ...localOptions,
912
+ throwOnError: true
913
+ });
914
+ return data;
915
+ }
916
+ };
917
+ return mutationOptions;
918
+ };
919
+ const getCartQueryKey = (options) => [
920
+ createQueryKey("getCart", options)
921
+ ];
922
+ const getCartOptions = (options) => {
923
+ return queryOptions({
924
+ queryFn: async ({ queryKey, signal }) => {
925
+ const { data } = await getCart({
926
+ ...options,
927
+ ...queryKey[0],
928
+ signal,
929
+ throwOnError: true
930
+ });
931
+ return data;
932
+ },
933
+ queryKey: getCartQueryKey(options)
934
+ });
935
+ };
936
+ const updateACartMutation = (options) => {
937
+ const mutationOptions = {
938
+ mutationFn: async (localOptions) => {
939
+ const { data } = await updateACart({
940
+ ...options,
941
+ ...localOptions,
942
+ throwOnError: true
943
+ });
944
+ return data;
945
+ }
946
+ };
947
+ return mutationOptions;
948
+ };
949
+ const deleteAllCartItemsMutation = (options) => {
950
+ const mutationOptions = {
951
+ mutationFn: async (localOptions) => {
952
+ const { data } = await deleteAllCartItems({
953
+ ...options,
954
+ ...localOptions,
955
+ throwOnError: true
956
+ });
957
+ return data;
958
+ }
959
+ };
960
+ return mutationOptions;
961
+ };
962
+ const getCartItemsQueryKey = (options) => [
963
+ createQueryKey("getCartItems", options)
964
+ ];
965
+ const getCartItemsOptions = (options) => {
966
+ return queryOptions({
967
+ queryFn: async ({ queryKey, signal }) => {
968
+ const { data } = await getCartItems({
969
+ ...options,
970
+ ...queryKey[0],
971
+ signal,
972
+ throwOnError: true
973
+ });
974
+ return data;
975
+ },
976
+ queryKey: getCartItemsQueryKey(options)
977
+ });
978
+ };
979
+ const manageCartsQueryKey = (options) => [
980
+ createQueryKey("manageCarts", options)
981
+ ];
982
+ const manageCartsOptions = (options) => {
983
+ return queryOptions({
984
+ queryFn: async ({ queryKey, signal }) => {
985
+ const { data } = await manageCarts({
986
+ ...options,
987
+ ...queryKey[0],
988
+ signal,
989
+ throwOnError: true
990
+ });
991
+ return data;
992
+ },
993
+ queryKey: manageCartsQueryKey(options)
994
+ });
995
+ };
996
+ const manageCartsMutation = (options) => {
997
+ const mutationOptions = {
998
+ mutationFn: async (localOptions) => {
999
+ const { data } = await manageCarts({
1000
+ ...options,
1001
+ ...localOptions,
1002
+ throwOnError: true
1003
+ });
1004
+ return data;
1005
+ }
1006
+ };
1007
+ return mutationOptions;
1008
+ };
1009
+ const bulkUpdateItemsInCartMutation = (options) => {
1010
+ const mutationOptions = {
1011
+ mutationFn: async (localOptions) => {
1012
+ const { data } = await bulkUpdateItemsInCart({
1013
+ ...options,
1014
+ ...localOptions,
1015
+ throwOnError: true
1016
+ });
1017
+ return data;
1018
+ }
1019
+ };
1020
+ return mutationOptions;
1021
+ };
1022
+ const deleteACartItemMutation = (options) => {
1023
+ const mutationOptions = {
1024
+ mutationFn: async (localOptions) => {
1025
+ const { data } = await deleteACartItem({
1026
+ ...options,
1027
+ ...localOptions,
1028
+ throwOnError: true
1029
+ });
1030
+ return data;
1031
+ }
1032
+ };
1033
+ return mutationOptions;
1034
+ };
1035
+ const updateACartItemMutation = (options) => {
1036
+ const mutationOptions = {
1037
+ mutationFn: async (localOptions) => {
1038
+ const { data } = await updateACartItem({
1039
+ ...options,
1040
+ ...localOptions,
1041
+ throwOnError: true
1042
+ });
1043
+ return data;
1044
+ }
1045
+ };
1046
+ return mutationOptions;
1047
+ };
1048
+ const deleteAccountCartAssociationMutation = (options) => {
1049
+ const mutationOptions = {
1050
+ mutationFn: async (localOptions) => {
1051
+ const { data } = await deleteAccountCartAssociation({
1052
+ ...options,
1053
+ ...localOptions,
1054
+ throwOnError: true
1055
+ });
1056
+ return data;
1057
+ }
1058
+ };
1059
+ return mutationOptions;
1060
+ };
1061
+ const createAccountCartAssociationQueryKey = (options) => [createQueryKey("createAccountCartAssociation", options)];
1062
+ const createAccountCartAssociationOptions = (options) => {
1063
+ return queryOptions({
1064
+ queryFn: async ({ queryKey, signal }) => {
1065
+ const { data } = await createAccountCartAssociation({
1066
+ ...options,
1067
+ ...queryKey[0],
1068
+ signal,
1069
+ throwOnError: true
1070
+ });
1071
+ return data;
1072
+ },
1073
+ queryKey: createAccountCartAssociationQueryKey(options)
1074
+ });
1075
+ };
1076
+ const createAccountCartAssociationMutation = (options) => {
1077
+ const mutationOptions = {
1078
+ mutationFn: async (localOptions) => {
1079
+ const { data } = await createAccountCartAssociation({
1080
+ ...options,
1081
+ ...localOptions,
1082
+ throwOnError: true
1083
+ });
1084
+ return data;
1085
+ }
1086
+ };
1087
+ return mutationOptions;
1088
+ };
1089
+ const deleteCustomerCartAssociationMutation = (options) => {
1090
+ const mutationOptions = {
1091
+ mutationFn: async (localOptions) => {
1092
+ const { data } = await deleteCustomerCartAssociation({
1093
+ ...options,
1094
+ ...localOptions,
1095
+ throwOnError: true
1096
+ });
1097
+ return data;
1098
+ }
1099
+ };
1100
+ return mutationOptions;
1101
+ };
1102
+ const createCustomerCartAssociationQueryKey = (options) => [createQueryKey("createCustomerCartAssociation", options)];
1103
+ const createCustomerCartAssociationOptions = (options) => {
1104
+ return queryOptions({
1105
+ queryFn: async ({ queryKey, signal }) => {
1106
+ const { data } = await createCustomerCartAssociation({
1107
+ ...options,
1108
+ ...queryKey[0],
1109
+ signal,
1110
+ throwOnError: true
1111
+ });
1112
+ return data;
1113
+ },
1114
+ queryKey: createCustomerCartAssociationQueryKey(options)
1115
+ });
1116
+ };
1117
+ const createCustomerCartAssociationMutation = (options) => {
1118
+ const mutationOptions = {
1119
+ mutationFn: async (localOptions) => {
1120
+ const { data } = await createCustomerCartAssociation({
1121
+ ...options,
1122
+ ...localOptions,
1123
+ throwOnError: true
1124
+ });
1125
+ return data;
1126
+ }
1127
+ };
1128
+ return mutationOptions;
1129
+ };
1130
+ const deleteAPromotionViaPromotionCodeMutation = (options) => {
1131
+ const mutationOptions = {
1132
+ mutationFn: async (localOptions) => {
1133
+ const { data } = await deleteAPromotionViaPromotionCode({
1134
+ ...options,
1135
+ ...localOptions,
1136
+ throwOnError: true
1137
+ });
1138
+ return data;
1139
+ }
1140
+ };
1141
+ return mutationOptions;
1142
+ };
1143
+ const addTaxItemToCartQueryKey = (options) => [createQueryKey("addTaxItemToCart", options)];
1144
+ const addTaxItemToCartOptions = (options) => {
1145
+ return queryOptions({
1146
+ queryFn: async ({ queryKey, signal }) => {
1147
+ const { data } = await addTaxItemToCart({
1148
+ ...options,
1149
+ ...queryKey[0],
1150
+ signal,
1151
+ throwOnError: true
1152
+ });
1153
+ return data;
1154
+ },
1155
+ queryKey: addTaxItemToCartQueryKey(options)
1156
+ });
1157
+ };
1158
+ const addTaxItemToCartMutation = (options) => {
1159
+ const mutationOptions = {
1160
+ mutationFn: async (localOptions) => {
1161
+ const { data } = await addTaxItemToCart({
1162
+ ...options,
1163
+ ...localOptions,
1164
+ throwOnError: true
1165
+ });
1166
+ return data;
1167
+ }
1168
+ };
1169
+ return mutationOptions;
1170
+ };
1171
+ const bulkDeleteTaxItemsFromCartMutation = (options) => {
1172
+ const mutationOptions = {
1173
+ mutationFn: async (localOptions) => {
1174
+ const { data } = await bulkDeleteTaxItemsFromCart({
1175
+ ...options,
1176
+ ...localOptions,
1177
+ throwOnError: true
1178
+ });
1179
+ return data;
1180
+ }
1181
+ };
1182
+ return mutationOptions;
1183
+ };
1184
+ const bulkAddTaxItemsToCartQueryKey = (options) => [createQueryKey("bulkAddTaxItemsToCart", options)];
1185
+ const bulkAddTaxItemsToCartOptions = (options) => {
1186
+ return queryOptions({
1187
+ queryFn: async ({ queryKey, signal }) => {
1188
+ const { data } = await bulkAddTaxItemsToCart({
1189
+ ...options,
1190
+ ...queryKey[0],
1191
+ signal,
1192
+ throwOnError: true
1193
+ });
1194
+ return data;
1195
+ },
1196
+ queryKey: bulkAddTaxItemsToCartQueryKey(options)
1197
+ });
1198
+ };
1199
+ const bulkAddTaxItemsToCartMutation = (options) => {
1200
+ const mutationOptions = {
1201
+ mutationFn: async (localOptions) => {
1202
+ const { data } = await bulkAddTaxItemsToCart({
1203
+ ...options,
1204
+ ...localOptions,
1205
+ throwOnError: true
1206
+ });
1207
+ return data;
1208
+ }
1209
+ };
1210
+ return mutationOptions;
1211
+ };
1212
+ const deleteATaxItemMutation = (options) => {
1213
+ const mutationOptions = {
1214
+ mutationFn: async (localOptions) => {
1215
+ const { data } = await deleteATaxItem({
1216
+ ...options,
1217
+ ...localOptions,
1218
+ throwOnError: true
1219
+ });
1220
+ return data;
1221
+ }
1222
+ };
1223
+ return mutationOptions;
1224
+ };
1225
+ const updateATaxItemMutation = (options) => {
1226
+ const mutationOptions = {
1227
+ mutationFn: async (localOptions) => {
1228
+ const { data } = await updateATaxItem({
1229
+ ...options,
1230
+ ...localOptions,
1231
+ throwOnError: true
1232
+ });
1233
+ return data;
1234
+ }
1235
+ };
1236
+ return mutationOptions;
1237
+ };
1238
+ const bulkDeleteCustomDiscountsFromCartMutation = (options) => {
1239
+ const mutationOptions = {
1240
+ mutationFn: async (localOptions) => {
1241
+ const { data } = await bulkDeleteCustomDiscountsFromCart({
1242
+ ...options,
1243
+ ...localOptions,
1244
+ throwOnError: true
1245
+ });
1246
+ return data;
1247
+ }
1248
+ };
1249
+ return mutationOptions;
1250
+ };
1251
+ const bulkAddCustomDiscountsToCartQueryKey = (options) => [createQueryKey("bulkAddCustomDiscountsToCart", options)];
1252
+ const bulkAddCustomDiscountsToCartOptions = (options) => {
1253
+ return queryOptions({
1254
+ queryFn: async ({ queryKey, signal }) => {
1255
+ const { data } = await bulkAddCustomDiscountsToCart({
1256
+ ...options,
1257
+ ...queryKey[0],
1258
+ signal,
1259
+ throwOnError: true
1260
+ });
1261
+ return data;
1262
+ },
1263
+ queryKey: bulkAddCustomDiscountsToCartQueryKey(options)
1264
+ });
1265
+ };
1266
+ const bulkAddCustomDiscountsToCartMutation = (options) => {
1267
+ const mutationOptions = {
1268
+ mutationFn: async (localOptions) => {
1269
+ const { data } = await bulkAddCustomDiscountsToCart({
1270
+ ...options,
1271
+ ...localOptions,
1272
+ throwOnError: true
1273
+ });
1274
+ return data;
1275
+ }
1276
+ };
1277
+ return mutationOptions;
1278
+ };
1279
+ const deleteCustomDiscountFromCartMutation = (options) => {
1280
+ const mutationOptions = {
1281
+ mutationFn: async (localOptions) => {
1282
+ const { data } = await deleteCustomDiscountFromCart({
1283
+ ...options,
1284
+ ...localOptions,
1285
+ throwOnError: true
1286
+ });
1287
+ return data;
1288
+ }
1289
+ };
1290
+ return mutationOptions;
1291
+ };
1292
+ const updateCustomDiscountForCartMutation = (options) => {
1293
+ const mutationOptions = {
1294
+ mutationFn: async (localOptions) => {
1295
+ const { data } = await updateCustomDiscountForCart({
1296
+ ...options,
1297
+ ...localOptions,
1298
+ throwOnError: true
1299
+ });
1300
+ return data;
1301
+ }
1302
+ };
1303
+ return mutationOptions;
1304
+ };
1305
+ const addCustomDiscountToCartItemQueryKey = (options) => [createQueryKey("addCustomDiscountToCartItem", options)];
1306
+ const addCustomDiscountToCartItemOptions = (options) => {
1307
+ return queryOptions({
1308
+ queryFn: async ({ queryKey, signal }) => {
1309
+ const { data } = await addCustomDiscountToCartItem({
1310
+ ...options,
1311
+ ...queryKey[0],
1312
+ signal,
1313
+ throwOnError: true
1314
+ });
1315
+ return data;
1316
+ },
1317
+ queryKey: addCustomDiscountToCartItemQueryKey(options)
1318
+ });
1319
+ };
1320
+ const addCustomDiscountToCartItemMutation = (options) => {
1321
+ const mutationOptions = {
1322
+ mutationFn: async (localOptions) => {
1323
+ const { data } = await addCustomDiscountToCartItem({
1324
+ ...options,
1325
+ ...localOptions,
1326
+ throwOnError: true
1327
+ });
1328
+ return data;
1329
+ }
1330
+ };
1331
+ return mutationOptions;
1332
+ };
1333
+ const deleteCustomDiscountFromCartItemMutation = (options) => {
1334
+ const mutationOptions = {
1335
+ mutationFn: async (localOptions) => {
1336
+ const { data } = await deleteCustomDiscountFromCartItem({
1337
+ ...options,
1338
+ ...localOptions,
1339
+ throwOnError: true
1340
+ });
1341
+ return data;
1342
+ }
1343
+ };
1344
+ return mutationOptions;
1345
+ };
1346
+ const updateCustomDiscountForCartItemMutation = (options) => {
1347
+ const mutationOptions = {
1348
+ mutationFn: async (localOptions) => {
1349
+ const { data } = await updateCustomDiscountForCartItem({
1350
+ ...options,
1351
+ ...localOptions,
1352
+ throwOnError: true
1353
+ });
1354
+ return data;
1355
+ }
1356
+ };
1357
+ return mutationOptions;
1358
+ };
1359
+ const createCartPaymentIntentQueryKey = (options) => [createQueryKey("createCartPaymentIntent", options)];
1360
+ const createCartPaymentIntentOptions = (options) => {
1361
+ return queryOptions({
1362
+ queryFn: async ({ queryKey, signal }) => {
1363
+ const { data } = await createCartPaymentIntent({
1364
+ ...options,
1365
+ ...queryKey[0],
1366
+ signal,
1367
+ throwOnError: true
1368
+ });
1369
+ return data;
1370
+ },
1371
+ queryKey: createCartPaymentIntentQueryKey(options)
1372
+ });
1373
+ };
1374
+ const createCartPaymentIntentMutation = (options) => {
1375
+ const mutationOptions = {
1376
+ mutationFn: async (localOptions) => {
1377
+ const { data } = await createCartPaymentIntent({
1378
+ ...options,
1379
+ ...localOptions,
1380
+ throwOnError: true
1381
+ });
1382
+ return data;
1383
+ }
1384
+ };
1385
+ return mutationOptions;
1386
+ };
1387
+ const checkoutApiQueryKey = (options) => [
1388
+ createQueryKey("checkoutApi", options)
1389
+ ];
1390
+ const checkoutApiOptions = (options) => {
1391
+ return queryOptions({
1392
+ queryFn: async ({ queryKey, signal }) => {
1393
+ const { data } = await checkoutApi({
1394
+ ...options,
1395
+ ...queryKey[0],
1396
+ signal,
1397
+ throwOnError: true
1398
+ });
1399
+ return data;
1400
+ },
1401
+ queryKey: checkoutApiQueryKey(options)
1402
+ });
1403
+ };
1404
+ const checkoutApiMutation = (options) => {
1405
+ const mutationOptions = {
1406
+ mutationFn: async (localOptions) => {
1407
+ const { data } = await checkoutApi({
1408
+ ...options,
1409
+ ...localOptions,
1410
+ throwOnError: true
1411
+ });
1412
+ return data;
1413
+ }
1414
+ };
1415
+ return mutationOptions;
1416
+ };
1417
+ const getCustomerOrdersQueryKey = (options) => [createQueryKey("getCustomerOrders", options)];
1418
+ const getCustomerOrdersOptions = (options) => {
1419
+ return queryOptions({
1420
+ queryFn: async ({ queryKey, signal }) => {
1421
+ const { data } = await getCustomerOrders({
1422
+ ...options,
1423
+ ...queryKey[0],
1424
+ signal,
1425
+ throwOnError: true
1426
+ });
1427
+ return data;
1428
+ },
1429
+ queryKey: getCustomerOrdersQueryKey(options)
1430
+ });
1431
+ };
1432
+ const getAnOrderQueryKey = (options) => [
1433
+ createQueryKey("getAnOrder", options)
1434
+ ];
1435
+ const getAnOrderOptions = (options) => {
1436
+ return queryOptions({
1437
+ queryFn: async ({ queryKey, signal }) => {
1438
+ const { data } = await getAnOrder({
1439
+ ...options,
1440
+ ...queryKey[0],
1441
+ signal,
1442
+ throwOnError: true
1443
+ });
1444
+ return data;
1445
+ },
1446
+ queryKey: getAnOrderQueryKey(options)
1447
+ });
1448
+ };
1449
+ const updateAnOrderMutation = (options) => {
1450
+ const mutationOptions = {
1451
+ mutationFn: async (localOptions) => {
1452
+ const { data } = await updateAnOrder({
1453
+ ...options,
1454
+ ...localOptions,
1455
+ throwOnError: true
1456
+ });
1457
+ return data;
1458
+ }
1459
+ };
1460
+ return mutationOptions;
1461
+ };
1462
+ const getOrderItemsQueryKey = (options) => [
1463
+ createQueryKey("getOrderItems", options)
1464
+ ];
1465
+ const getOrderItemsOptions = (options) => {
1466
+ return queryOptions({
1467
+ queryFn: async ({ queryKey, signal }) => {
1468
+ const { data } = await getOrderItems({
1469
+ ...options,
1470
+ ...queryKey[0],
1471
+ signal,
1472
+ throwOnError: true
1473
+ });
1474
+ return data;
1475
+ },
1476
+ queryKey: getOrderItemsQueryKey(options)
1477
+ });
1478
+ };
1479
+ const anonymizeOrdersQueryKey = (options) => [createQueryKey("anonymizeOrders", options)];
1480
+ const anonymizeOrdersOptions = (options) => {
1481
+ return queryOptions({
1482
+ queryFn: async ({ queryKey, signal }) => {
1483
+ const { data } = await anonymizeOrders({
1484
+ ...options,
1485
+ ...queryKey[0],
1486
+ signal,
1487
+ throwOnError: true
1488
+ });
1489
+ return data;
1490
+ },
1491
+ queryKey: anonymizeOrdersQueryKey(options)
1492
+ });
1493
+ };
1494
+ const anonymizeOrdersMutation = (options) => {
1495
+ const mutationOptions = {
1496
+ mutationFn: async (localOptions) => {
1497
+ const { data } = await anonymizeOrders({
1498
+ ...options,
1499
+ ...localOptions,
1500
+ throwOnError: true
1501
+ });
1502
+ return data;
1503
+ }
1504
+ };
1505
+ return mutationOptions;
1506
+ };
1507
+ const paymentSetupQueryKey = (options) => [
1508
+ createQueryKey("paymentSetup", options)
1509
+ ];
1510
+ const paymentSetupOptions = (options) => {
1511
+ return queryOptions({
1512
+ queryFn: async ({ queryKey, signal }) => {
1513
+ const { data } = await paymentSetup({
1514
+ ...options,
1515
+ ...queryKey[0],
1516
+ signal,
1517
+ throwOnError: true
1518
+ });
1519
+ return data;
1520
+ },
1521
+ queryKey: paymentSetupQueryKey(options)
1522
+ });
1523
+ };
1524
+ const paymentSetupMutation = (options) => {
1525
+ const mutationOptions = {
1526
+ mutationFn: async (localOptions) => {
1527
+ const { data } = await paymentSetup({
1528
+ ...options,
1529
+ ...localOptions,
1530
+ throwOnError: true
1531
+ });
1532
+ return data;
1533
+ }
1534
+ };
1535
+ return mutationOptions;
1536
+ };
1537
+ const confirmPaymentQueryKey = (options) => [createQueryKey("confirmPayment", options)];
1538
+ const confirmPaymentOptions = (options) => {
1539
+ return queryOptions({
1540
+ queryFn: async ({ queryKey, signal }) => {
1541
+ const { data } = await confirmPayment({
1542
+ ...options,
1543
+ ...queryKey[0],
1544
+ signal,
1545
+ throwOnError: true
1546
+ });
1547
+ return data;
1548
+ },
1549
+ queryKey: confirmPaymentQueryKey(options)
1550
+ });
1551
+ };
1552
+ const confirmPaymentMutation = (options) => {
1553
+ const mutationOptions = {
1554
+ mutationFn: async (localOptions) => {
1555
+ const { data } = await confirmPayment({
1556
+ ...options,
1557
+ ...localOptions,
1558
+ throwOnError: true
1559
+ });
1560
+ return data;
1561
+ }
1562
+ };
1563
+ return mutationOptions;
1564
+ };
1565
+ const captureATransactionQueryKey = (options) => [createQueryKey("captureATransaction", options)];
1566
+ const captureATransactionOptions = (options) => {
1567
+ return queryOptions({
1568
+ queryFn: async ({ queryKey, signal }) => {
1569
+ const { data } = await captureATransaction({
1570
+ ...options,
1571
+ ...queryKey[0],
1572
+ signal,
1573
+ throwOnError: true
1574
+ });
1575
+ return data;
1576
+ },
1577
+ queryKey: captureATransactionQueryKey(options)
1578
+ });
1579
+ };
1580
+ const captureATransactionMutation = (options) => {
1581
+ const mutationOptions = {
1582
+ mutationFn: async (localOptions) => {
1583
+ const { data } = await captureATransaction({
1584
+ ...options,
1585
+ ...localOptions,
1586
+ throwOnError: true
1587
+ });
1588
+ return data;
1589
+ }
1590
+ };
1591
+ return mutationOptions;
1592
+ };
1593
+ const refundATransactionQueryKey = (options) => [createQueryKey("refundATransaction", options)];
1594
+ const refundATransactionOptions = (options) => {
1595
+ return queryOptions({
1596
+ queryFn: async ({ queryKey, signal }) => {
1597
+ const { data } = await refundATransaction({
1598
+ ...options,
1599
+ ...queryKey[0],
1600
+ signal,
1601
+ throwOnError: true
1602
+ });
1603
+ return data;
1604
+ },
1605
+ queryKey: refundATransactionQueryKey(options)
1606
+ });
1607
+ };
1608
+ const refundATransactionMutation = (options) => {
1609
+ const mutationOptions = {
1610
+ mutationFn: async (localOptions) => {
1611
+ const { data } = await refundATransaction({
1612
+ ...options,
1613
+ ...localOptions,
1614
+ throwOnError: true
1615
+ });
1616
+ return data;
1617
+ }
1618
+ };
1619
+ return mutationOptions;
1620
+ };
1621
+ const getOrderTransactionsQueryKey = (options) => [createQueryKey("getOrderTransactions", options)];
1622
+ const getOrderTransactionsOptions = (options) => {
1623
+ return queryOptions({
1624
+ queryFn: async ({ queryKey, signal }) => {
1625
+ const { data } = await getOrderTransactions({
1626
+ ...options,
1627
+ ...queryKey[0],
1628
+ signal,
1629
+ throwOnError: true
1630
+ });
1631
+ return data;
1632
+ },
1633
+ queryKey: getOrderTransactionsQueryKey(options)
1634
+ });
1635
+ };
1636
+ const getATransactionQueryKey = (options) => [createQueryKey("getATransaction", options)];
1637
+ const getATransactionOptions = (options) => {
1638
+ return queryOptions({
1639
+ queryFn: async ({ queryKey, signal }) => {
1640
+ const { data } = await getATransaction({
1641
+ ...options,
1642
+ ...queryKey[0],
1643
+ signal,
1644
+ throwOnError: true
1645
+ });
1646
+ return data;
1647
+ },
1648
+ queryKey: getATransactionQueryKey(options)
1649
+ });
1650
+ };
1651
+ const cancelATransactionQueryKey = (options) => [createQueryKey("cancelATransaction", options)];
1652
+ const cancelATransactionOptions = (options) => {
1653
+ return queryOptions({
1654
+ queryFn: async ({ queryKey, signal }) => {
1655
+ const { data } = await cancelATransaction({
1656
+ ...options,
1657
+ ...queryKey[0],
1658
+ signal,
1659
+ throwOnError: true
1660
+ });
1661
+ return data;
1662
+ },
1663
+ queryKey: cancelATransactionQueryKey(options)
1664
+ });
1665
+ };
1666
+ const cancelATransactionMutation = (options) => {
1667
+ const mutationOptions = {
1668
+ mutationFn: async (localOptions) => {
1669
+ const { data } = await cancelATransaction({
1670
+ ...options,
1671
+ ...localOptions,
1672
+ throwOnError: true
1673
+ });
1674
+ return data;
1675
+ }
1676
+ };
1677
+ return mutationOptions;
1678
+ };
1679
+ const getSubscriptionProductQueryKey = (options) => [createQueryKey("getSubscriptionProduct", options)];
1680
+ const getSubscriptionProductOptions = (options) => {
1681
+ return queryOptions({
1682
+ queryFn: async ({ queryKey, signal }) => {
1683
+ const { data } = await getSubscriptionProduct({
1684
+ ...options,
1685
+ ...queryKey[0],
1686
+ signal,
1687
+ throwOnError: true
1688
+ });
1689
+ return data;
1690
+ },
1691
+ queryKey: getSubscriptionProductQueryKey(options)
1692
+ });
1693
+ };
1694
+ const getPlanQueryKey = (options) => [
1695
+ createQueryKey("getPlan", options)
1696
+ ];
1697
+ const getPlanOptions = (options) => {
1698
+ return queryOptions({
1699
+ queryFn: async ({ queryKey, signal }) => {
1700
+ const { data } = await getPlan({
1701
+ ...options,
1702
+ ...queryKey[0],
1703
+ signal,
1704
+ throwOnError: true
1705
+ });
1706
+ return data;
1707
+ },
1708
+ queryKey: getPlanQueryKey(options)
1709
+ });
1710
+ };
1711
+ const listOfferingsQueryKey = (options) => [
1712
+ createQueryKey("listOfferings", options)
1713
+ ];
1714
+ const listOfferingsOptions = (options) => {
1715
+ return queryOptions({
1716
+ queryFn: async ({ queryKey, signal }) => {
1717
+ const { data } = await listOfferings({
1718
+ ...options,
1719
+ ...queryKey[0],
1720
+ signal,
1721
+ throwOnError: true
1722
+ });
1723
+ return data;
1724
+ },
1725
+ queryKey: listOfferingsQueryKey(options)
1726
+ });
1727
+ };
1728
+ const getOfferingQueryKey = (options) => [
1729
+ createQueryKey("getOffering", options)
1730
+ ];
1731
+ const getOfferingOptions = (options) => {
1732
+ return queryOptions({
1733
+ queryFn: async ({ queryKey, signal }) => {
1734
+ const { data } = await getOffering({
1735
+ ...options,
1736
+ ...queryKey[0],
1737
+ signal,
1738
+ throwOnError: true
1739
+ });
1740
+ return data;
1741
+ },
1742
+ queryKey: getOfferingQueryKey(options)
1743
+ });
1744
+ };
1745
+ const listOfferingPlansQueryKey = (options) => [createQueryKey("listOfferingPlans", options)];
1746
+ const listOfferingPlansOptions = (options) => {
1747
+ return queryOptions({
1748
+ queryFn: async ({ queryKey, signal }) => {
1749
+ const { data } = await listOfferingPlans({
1750
+ ...options,
1751
+ ...queryKey[0],
1752
+ signal,
1753
+ throwOnError: true
1754
+ });
1755
+ return data;
1756
+ },
1757
+ queryKey: listOfferingPlansQueryKey(options)
1758
+ });
1759
+ };
1760
+ const listOfferingFeaturesQueryKey = (options) => [createQueryKey("listOfferingFeatures", options)];
1761
+ const listOfferingFeaturesOptions = (options) => {
1762
+ return queryOptions({
1763
+ queryFn: async ({ queryKey, signal }) => {
1764
+ const { data } = await listOfferingFeatures({
1765
+ ...options,
1766
+ ...queryKey[0],
1767
+ signal,
1768
+ throwOnError: true
1769
+ });
1770
+ return data;
1771
+ },
1772
+ queryKey: listOfferingFeaturesQueryKey(options)
1773
+ });
1774
+ };
1775
+ const listOfferingProductsQueryKey = (options) => [createQueryKey("listOfferingProducts", options)];
1776
+ const listOfferingProductsOptions = (options) => {
1777
+ return queryOptions({
1778
+ queryFn: async ({ queryKey, signal }) => {
1779
+ const { data } = await listOfferingProducts({
1780
+ ...options,
1781
+ ...queryKey[0],
1782
+ signal,
1783
+ throwOnError: true
1784
+ });
1785
+ return data;
1786
+ },
1787
+ queryKey: listOfferingProductsQueryKey(options)
1788
+ });
1789
+ };
1790
+ const listSubscriptionsQueryKey = (options) => [createQueryKey("listSubscriptions", options)];
1791
+ const listSubscriptionsOptions = (options) => {
1792
+ return queryOptions({
1793
+ queryFn: async ({ queryKey, signal }) => {
1794
+ const { data } = await listSubscriptions({
1795
+ ...options,
1796
+ ...queryKey[0],
1797
+ signal,
1798
+ throwOnError: true
1799
+ });
1800
+ return data;
1801
+ },
1802
+ queryKey: listSubscriptionsQueryKey(options)
1803
+ });
1804
+ };
1805
+ const getSubscriptionQueryKey = (options) => [createQueryKey("getSubscription", options)];
1806
+ const getSubscriptionOptions = (options) => {
1807
+ return queryOptions({
1808
+ queryFn: async ({ queryKey, signal }) => {
1809
+ const { data } = await getSubscription({
1810
+ ...options,
1811
+ ...queryKey[0],
1812
+ signal,
1813
+ throwOnError: true
1814
+ });
1815
+ return data;
1816
+ },
1817
+ queryKey: getSubscriptionQueryKey(options)
1818
+ });
1819
+ };
1820
+ const listSubscriptionProductsQueryKey = (options) => [createQueryKey("listSubscriptionProducts", options)];
1821
+ const listSubscriptionProductsOptions = (options) => {
1822
+ return queryOptions({
1823
+ queryFn: async ({ queryKey, signal }) => {
1824
+ const { data } = await listSubscriptionProducts({
1825
+ ...options,
1826
+ ...queryKey[0],
1827
+ signal,
1828
+ throwOnError: true
1829
+ });
1830
+ return data;
1831
+ },
1832
+ queryKey: listSubscriptionProductsQueryKey(options)
1833
+ });
1834
+ };
1835
+ const listSubscriptionPlansQueryKey = (options) => [createQueryKey("listSubscriptionPlans", options)];
1836
+ const listSubscriptionPlansOptions = (options) => {
1837
+ return queryOptions({
1838
+ queryFn: async ({ queryKey, signal }) => {
1839
+ const { data } = await listSubscriptionPlans({
1840
+ ...options,
1841
+ ...queryKey[0],
1842
+ signal,
1843
+ throwOnError: true
1844
+ });
1845
+ return data;
1846
+ },
1847
+ queryKey: listSubscriptionPlansQueryKey(options)
1848
+ });
1849
+ };
1850
+ const listSubscriptionStatesQueryKey = (options) => [createQueryKey("listSubscriptionStates", options)];
1851
+ const listSubscriptionStatesOptions = (options) => {
1852
+ return queryOptions({
1853
+ queryFn: async ({ queryKey, signal }) => {
1854
+ const { data } = await listSubscriptionStates({
1855
+ ...options,
1856
+ ...queryKey[0],
1857
+ signal,
1858
+ throwOnError: true
1859
+ });
1860
+ return data;
1861
+ },
1862
+ queryKey: listSubscriptionStatesQueryKey(options)
1863
+ });
1864
+ };
1865
+ const getSubscriptionStateQueryKey = (options) => [createQueryKey("getSubscriptionState", options)];
1866
+ const getSubscriptionStateOptions = (options) => {
1867
+ return queryOptions({
1868
+ queryFn: async ({ queryKey, signal }) => {
1869
+ const { data } = await getSubscriptionState({
1870
+ ...options,
1871
+ ...queryKey[0],
1872
+ signal,
1873
+ throwOnError: true
1874
+ });
1875
+ return data;
1876
+ },
1877
+ queryKey: getSubscriptionStateQueryKey(options)
1878
+ });
1879
+ };
1880
+ const listSubscriptionInvoicesQueryKey = (options) => [createQueryKey("listSubscriptionInvoices", options)];
1881
+ const listSubscriptionInvoicesOptions = (options) => {
1882
+ return queryOptions({
1883
+ queryFn: async ({ queryKey, signal }) => {
1884
+ const { data } = await listSubscriptionInvoices({
1885
+ ...options,
1886
+ ...queryKey[0],
1887
+ signal,
1888
+ throwOnError: true
1889
+ });
1890
+ return data;
1891
+ },
1892
+ queryKey: listSubscriptionInvoicesQueryKey(options)
1893
+ });
1894
+ };
1895
+ const listSubscriptionInvoicePaymentsQueryKey = (options) => [createQueryKey("listSubscriptionInvoicePayments", options)];
1896
+ const listSubscriptionInvoicePaymentsOptions = (options) => {
1897
+ return queryOptions({
1898
+ queryFn: async ({ queryKey, signal }) => {
1899
+ const { data } = await listSubscriptionInvoicePayments({
1900
+ ...options,
1901
+ ...queryKey[0],
1902
+ signal,
1903
+ throwOnError: true
1904
+ });
1905
+ return data;
1906
+ },
1907
+ queryKey: listSubscriptionInvoicePaymentsQueryKey(options)
1908
+ });
1909
+ };
1910
+ const getSubscriptionInvoicePaymentQueryKey = (options) => [createQueryKey("getSubscriptionInvoicePayment", options)];
1911
+ const getSubscriptionInvoicePaymentOptions = (options) => {
1912
+ return queryOptions({
1913
+ queryFn: async ({ queryKey, signal }) => {
1914
+ const { data } = await getSubscriptionInvoicePayment({
1915
+ ...options,
1916
+ ...queryKey[0],
1917
+ signal,
1918
+ throwOnError: true
1919
+ });
1920
+ return data;
1921
+ },
1922
+ queryKey: getSubscriptionInvoicePaymentQueryKey(options)
1923
+ });
1924
+ };
1925
+ const getSubscriptionInvoiceQueryKey = (options) => [createQueryKey("getSubscriptionInvoice", options)];
1926
+ const getSubscriptionInvoiceOptions = (options) => {
1927
+ return queryOptions({
1928
+ queryFn: async ({ queryKey, signal }) => {
1929
+ const { data } = await getSubscriptionInvoice({
1930
+ ...options,
1931
+ ...queryKey[0],
1932
+ signal,
1933
+ throwOnError: true
1934
+ });
1935
+ return data;
1936
+ },
1937
+ queryKey: getSubscriptionInvoiceQueryKey(options)
1938
+ });
1939
+ };
1940
+ const listInvoicesQueryKey = (options) => [
1941
+ createQueryKey("listInvoices", options)
1942
+ ];
1943
+ const listInvoicesOptions = (options) => {
1944
+ return queryOptions({
1945
+ queryFn: async ({ queryKey, signal }) => {
1946
+ const { data } = await listInvoices({
1947
+ ...options,
1948
+ ...queryKey[0],
1949
+ signal,
1950
+ throwOnError: true
1951
+ });
1952
+ return data;
1953
+ },
1954
+ queryKey: listInvoicesQueryKey(options)
1955
+ });
1956
+ };
1957
+ const getInvoiceQueryKey = (options) => [
1958
+ createQueryKey("getInvoice", options)
1959
+ ];
1960
+ const getInvoiceOptions = (options) => {
1961
+ return queryOptions({
1962
+ queryFn: async ({ queryKey, signal }) => {
1963
+ const { data } = await getInvoice({
1964
+ ...options,
1965
+ ...queryKey[0],
1966
+ signal,
1967
+ throwOnError: true
1968
+ });
1969
+ return data;
1970
+ },
1971
+ queryKey: getInvoiceQueryKey(options)
1972
+ });
1973
+ };
1974
+ const getFeatureQueryKey = (options) => [
1975
+ createQueryKey("getFeature", options)
1976
+ ];
1977
+ const getFeatureOptions = (options) => {
1978
+ return queryOptions({
1979
+ queryFn: async ({ queryKey, signal }) => {
1980
+ const { data } = await getFeature({
1981
+ ...options,
1982
+ ...queryKey[0],
1983
+ signal,
1984
+ throwOnError: true
1985
+ });
1986
+ return data;
1987
+ },
1988
+ queryKey: getFeatureQueryKey(options)
1989
+ });
1990
+ };
1991
+ const getStockQueryKey = (options) => [
1992
+ createQueryKey("getStock", options)
1993
+ ];
1994
+ const getStockOptions = (options) => {
1995
+ return queryOptions({
1996
+ queryFn: async ({ queryKey, signal }) => {
1997
+ const { data } = await getStock({
1998
+ ...options,
1999
+ ...queryKey[0],
2000
+ signal,
2001
+ throwOnError: true
2002
+ });
2003
+ return data;
2004
+ },
2005
+ queryKey: getStockQueryKey(options)
2006
+ });
2007
+ };
2008
+ const listLocationsQueryKey = (options) => [
2009
+ createQueryKey("listLocations", options)
2010
+ ];
2011
+ const listLocationsOptions = (options) => {
2012
+ return queryOptions({
2013
+ queryFn: async ({ queryKey, signal }) => {
2014
+ const { data } = await listLocations({
2015
+ ...options,
2016
+ ...queryKey[0],
2017
+ signal,
2018
+ throwOnError: true
2019
+ });
2020
+ return data;
2021
+ },
2022
+ queryKey: listLocationsQueryKey(options)
2023
+ });
2024
+ };
2025
+ const createAnAccessTokenQueryKey = (options) => [createQueryKey("createAnAccessToken", options)];
2026
+ const createAnAccessTokenOptions = (options) => {
2027
+ return queryOptions({
2028
+ queryFn: async ({ queryKey, signal }) => {
2029
+ const { data } = await createAnAccessToken({
2030
+ ...options,
2031
+ ...queryKey[0],
2032
+ signal,
2033
+ throwOnError: true
2034
+ });
2035
+ return data;
2036
+ },
2037
+ queryKey: createAnAccessTokenQueryKey(options)
2038
+ });
2039
+ };
2040
+ const createAnAccessTokenMutation = (options) => {
2041
+ const mutationOptions = {
2042
+ mutationFn: async (localOptions) => {
2043
+ const { data } = await createAnAccessToken({
2044
+ ...options,
2045
+ ...localOptions,
2046
+ throwOnError: true
2047
+ });
2048
+ return data;
2049
+ }
2050
+ };
2051
+ return mutationOptions;
2052
+ };
2053
+ const getV2AccountAddressesQueryKey = (options) => [createQueryKey("getV2AccountAddresses", options)];
2054
+ const getV2AccountAddressesOptions = (options) => {
2055
+ return queryOptions({
2056
+ queryFn: async ({ queryKey, signal }) => {
2057
+ const { data } = await getV2AccountAddresses({
2058
+ ...options,
2059
+ ...queryKey[0],
2060
+ signal,
2061
+ throwOnError: true
2062
+ });
2063
+ return data;
2064
+ },
2065
+ queryKey: getV2AccountAddressesQueryKey(options)
2066
+ });
2067
+ };
2068
+ const postV2AccountAddressQueryKey = (options) => [createQueryKey("postV2AccountAddress", options)];
2069
+ const postV2AccountAddressOptions = (options) => {
2070
+ return queryOptions({
2071
+ queryFn: async ({ queryKey, signal }) => {
2072
+ const { data } = await postV2AccountAddress({
2073
+ ...options,
2074
+ ...queryKey[0],
2075
+ signal,
2076
+ throwOnError: true
2077
+ });
2078
+ return data;
2079
+ },
2080
+ queryKey: postV2AccountAddressQueryKey(options)
2081
+ });
2082
+ };
2083
+ const postV2AccountAddressMutation = (options) => {
2084
+ const mutationOptions = {
2085
+ mutationFn: async (localOptions) => {
2086
+ const { data } = await postV2AccountAddress({
2087
+ ...options,
2088
+ ...localOptions,
2089
+ throwOnError: true
2090
+ });
2091
+ return data;
2092
+ }
2093
+ };
2094
+ return mutationOptions;
2095
+ };
2096
+ const deleteV2AccountAddressMutation = (options) => {
2097
+ const mutationOptions = {
2098
+ mutationFn: async (localOptions) => {
2099
+ const { data } = await deleteV2AccountAddress({
2100
+ ...options,
2101
+ ...localOptions,
2102
+ throwOnError: true
2103
+ });
2104
+ return data;
2105
+ }
2106
+ };
2107
+ return mutationOptions;
2108
+ };
2109
+ const getV2AccountAddressQueryKey = (options) => [createQueryKey("getV2AccountAddress", options)];
2110
+ const getV2AccountAddressOptions = (options) => {
2111
+ return queryOptions({
2112
+ queryFn: async ({ queryKey, signal }) => {
2113
+ const { data } = await getV2AccountAddress({
2114
+ ...options,
2115
+ ...queryKey[0],
2116
+ signal,
2117
+ throwOnError: true
2118
+ });
2119
+ return data;
2120
+ },
2121
+ queryKey: getV2AccountAddressQueryKey(options)
2122
+ });
2123
+ };
2124
+ const putV2AccountAddressMutation = (options) => {
2125
+ const mutationOptions = {
2126
+ mutationFn: async (localOptions) => {
2127
+ const { data } = await putV2AccountAddress({
2128
+ ...options,
2129
+ ...localOptions,
2130
+ throwOnError: true
2131
+ });
2132
+ return data;
2133
+ }
2134
+ };
2135
+ return mutationOptions;
2136
+ };
2137
+ const getV2AccountsQueryKey = (options) => [
2138
+ createQueryKey("getV2Accounts", options)
2139
+ ];
2140
+ const getV2AccountsOptions = (options) => {
2141
+ return queryOptions({
2142
+ queryFn: async ({ queryKey, signal }) => {
2143
+ const { data } = await getV2Accounts({
2144
+ ...options,
2145
+ ...queryKey[0],
2146
+ signal,
2147
+ throwOnError: true
2148
+ });
2149
+ return data;
2150
+ },
2151
+ queryKey: getV2AccountsQueryKey(options)
2152
+ });
2153
+ };
2154
+ const postV2AccountsQueryKey = (options) => [createQueryKey("postV2Accounts", options)];
2155
+ const postV2AccountsOptions = (options) => {
2156
+ return queryOptions({
2157
+ queryFn: async ({ queryKey, signal }) => {
2158
+ const { data } = await postV2Accounts({
2159
+ ...options,
2160
+ ...queryKey[0],
2161
+ signal,
2162
+ throwOnError: true
2163
+ });
2164
+ return data;
2165
+ },
2166
+ queryKey: postV2AccountsQueryKey(options)
2167
+ });
2168
+ };
2169
+ const postV2AccountsMutation = (options) => {
2170
+ const mutationOptions = {
2171
+ mutationFn: async (localOptions) => {
2172
+ const { data } = await postV2Accounts({
2173
+ ...options,
2174
+ ...localOptions,
2175
+ throwOnError: true
2176
+ });
2177
+ return data;
2178
+ }
2179
+ };
2180
+ return mutationOptions;
2181
+ };
2182
+ const getV2AccountsAccountIdQueryKey = (options) => [createQueryKey("getV2AccountsAccountId", options)];
2183
+ const getV2AccountsAccountIdOptions = (options) => {
2184
+ return queryOptions({
2185
+ queryFn: async ({ queryKey, signal }) => {
2186
+ const { data } = await getV2AccountsAccountId({
2187
+ ...options,
2188
+ ...queryKey[0],
2189
+ signal,
2190
+ throwOnError: true
2191
+ });
2192
+ return data;
2193
+ },
2194
+ queryKey: getV2AccountsAccountIdQueryKey(options)
2195
+ });
2196
+ };
2197
+ const putV2AccountsAccountIdMutation = (options) => {
2198
+ const mutationOptions = {
2199
+ mutationFn: async (localOptions) => {
2200
+ const { data } = await putV2AccountsAccountId({
2201
+ ...options,
2202
+ ...localOptions,
2203
+ throwOnError: true
2204
+ });
2205
+ return data;
2206
+ }
2207
+ };
2208
+ return mutationOptions;
2209
+ };
2210
+ const getV2AccountMembersQueryKey = (options) => [createQueryKey("getV2AccountMembers", options)];
2211
+ const getV2AccountMembersOptions = (options) => {
2212
+ return queryOptions({
2213
+ queryFn: async ({ queryKey, signal }) => {
2214
+ const { data } = await getV2AccountMembers({
2215
+ ...options,
2216
+ ...queryKey[0],
2217
+ signal,
2218
+ throwOnError: true
2219
+ });
2220
+ return data;
2221
+ },
2222
+ queryKey: getV2AccountMembersQueryKey(options)
2223
+ });
2224
+ };
2225
+ const getV2AccountMembersAccountMemberIdQueryKey = (options) => [createQueryKey("getV2AccountMembersAccountMemberId", options)];
2226
+ const getV2AccountMembersAccountMemberIdOptions = (options) => {
2227
+ return queryOptions({
2228
+ queryFn: async ({ queryKey, signal }) => {
2229
+ const { data } = await getV2AccountMembersAccountMemberId({
2230
+ ...options,
2231
+ ...queryKey[0],
2232
+ signal,
2233
+ throwOnError: true
2234
+ });
2235
+ return data;
2236
+ },
2237
+ queryKey: getV2AccountMembersAccountMemberIdQueryKey(options)
2238
+ });
2239
+ };
2240
+ const getV2AccountsAccountIdAccountMembershipsQueryKey = (options) => [createQueryKey("getV2AccountsAccountIdAccountMemberships", options)];
2241
+ const getV2AccountsAccountIdAccountMembershipsOptions = (options) => {
2242
+ return queryOptions({
2243
+ queryFn: async ({ queryKey, signal }) => {
2244
+ const { data } = await getV2AccountsAccountIdAccountMemberships({
2245
+ ...options,
2246
+ ...queryKey[0],
2247
+ signal,
2248
+ throwOnError: true
2249
+ });
2250
+ return data;
2251
+ },
2252
+ queryKey: getV2AccountsAccountIdAccountMembershipsQueryKey(options)
2253
+ });
2254
+ };
2255
+ const postV2AccountMembersTokensQueryKey = (options) => [createQueryKey("postV2AccountMembersTokens", options)];
2256
+ const postV2AccountMembersTokensOptions = (options) => {
2257
+ return queryOptions({
2258
+ queryFn: async ({ queryKey, signal }) => {
2259
+ const { data } = await postV2AccountMembersTokens({
2260
+ ...options,
2261
+ ...queryKey[0],
2262
+ signal,
2263
+ throwOnError: true
2264
+ });
2265
+ return data;
2266
+ },
2267
+ queryKey: postV2AccountMembersTokensQueryKey(options)
2268
+ });
2269
+ };
2270
+ const postV2AccountMembersTokensMutation = (options) => {
2271
+ const mutationOptions = {
2272
+ mutationFn: async (localOptions) => {
2273
+ const { data } = await postV2AccountMembersTokens({
2274
+ ...options,
2275
+ ...localOptions,
2276
+ throwOnError: true
2277
+ });
2278
+ return data;
2279
+ }
2280
+ };
2281
+ return mutationOptions;
2282
+ };
2283
+ const getAllCurrenciesQueryKey = (options) => [createQueryKey("getAllCurrencies", options)];
2284
+ const getAllCurrenciesOptions = (options) => {
2285
+ return queryOptions({
2286
+ queryFn: async ({ queryKey, signal }) => {
2287
+ const { data } = await getAllCurrencies({
2288
+ ...options,
2289
+ ...queryKey[0],
2290
+ signal,
2291
+ throwOnError: true
2292
+ });
2293
+ return data;
2294
+ },
2295
+ queryKey: getAllCurrenciesQueryKey(options)
2296
+ });
2297
+ };
2298
+ const getACurrencyQueryKey = (options) => [
2299
+ createQueryKey("getACurrency", options)
2300
+ ];
2301
+ const getACurrencyOptions = (options) => {
2302
+ return queryOptions({
2303
+ queryFn: async ({ queryKey, signal }) => {
2304
+ const { data } = await getACurrency({
2305
+ ...options,
2306
+ ...queryKey[0],
2307
+ signal,
2308
+ throwOnError: true
2309
+ });
2310
+ return data;
2311
+ },
2312
+ queryKey: getACurrencyQueryKey(options)
2313
+ });
2314
+ };
2315
+ const getAllFilesQueryKey = (options) => [
2316
+ createQueryKey("getAllFiles", options)
2317
+ ];
2318
+ const getAllFilesOptions = (options) => {
2319
+ return queryOptions({
2320
+ queryFn: async ({ queryKey, signal }) => {
2321
+ const { data } = await getAllFiles({
2322
+ ...options,
2323
+ ...queryKey[0],
2324
+ signal,
2325
+ throwOnError: true
2326
+ });
2327
+ return data;
2328
+ },
2329
+ queryKey: getAllFilesQueryKey(options)
2330
+ });
2331
+ };
2332
+ const getAFileQueryKey = (options) => [
2333
+ createQueryKey("getAFile", options)
2334
+ ];
2335
+ const getAFileOptions = (options) => {
2336
+ return queryOptions({
2337
+ queryFn: async ({ queryKey, signal }) => {
2338
+ const { data } = await getAFile({
2339
+ ...options,
2340
+ ...queryKey[0],
2341
+ signal,
2342
+ throwOnError: true
2343
+ });
2344
+ return data;
2345
+ },
2346
+ queryKey: getAFileQueryKey(options)
2347
+ });
2348
+ };
2349
+ export {
2350
+ addCustomDiscountToCartItemMutation,
2351
+ addCustomDiscountToCartItemOptions,
2352
+ addCustomDiscountToCartItemQueryKey,
2353
+ addTaxItemToCartMutation,
2354
+ addTaxItemToCartOptions,
2355
+ addTaxItemToCartQueryKey,
2356
+ anonymizeOrdersMutation,
2357
+ anonymizeOrdersOptions,
2358
+ anonymizeOrdersQueryKey,
2359
+ bulkAddCustomDiscountsToCartMutation,
2360
+ bulkAddCustomDiscountsToCartOptions,
2361
+ bulkAddCustomDiscountsToCartQueryKey,
2362
+ bulkAddTaxItemsToCartMutation,
2363
+ bulkAddTaxItemsToCartOptions,
2364
+ bulkAddTaxItemsToCartQueryKey,
2365
+ bulkDeleteCustomDiscountsFromCartMutation,
2366
+ bulkDeleteTaxItemsFromCartMutation,
2367
+ bulkUpdateItemsInCartMutation,
2368
+ cancelATransactionMutation,
2369
+ cancelATransactionOptions,
2370
+ cancelATransactionQueryKey,
2371
+ captureATransactionMutation,
2372
+ captureATransactionOptions,
2373
+ captureATransactionQueryKey,
2374
+ checkoutApiMutation,
2375
+ checkoutApiOptions,
2376
+ checkoutApiQueryKey,
2377
+ configureByContextProductMutation,
2378
+ configureByContextProductOptions,
2379
+ configureByContextProductQueryKey,
2380
+ confirmPaymentMutation,
2381
+ confirmPaymentOptions,
2382
+ confirmPaymentQueryKey,
2383
+ createACartMutation,
2384
+ createACartOptions,
2385
+ createACartQueryKey,
2386
+ createAccountCartAssociationMutation,
2387
+ createAccountCartAssociationOptions,
2388
+ createAccountCartAssociationQueryKey,
2389
+ createAnAccessTokenMutation,
2390
+ createAnAccessTokenOptions,
2391
+ createAnAccessTokenQueryKey,
2392
+ createCartPaymentIntentMutation,
2393
+ createCartPaymentIntentOptions,
2394
+ createCartPaymentIntentQueryKey,
2395
+ createCatalogMutation,
2396
+ createCatalogOptions,
2397
+ createCatalogQueryKey,
2398
+ createCustomerCartAssociationMutation,
2399
+ createCustomerCartAssociationOptions,
2400
+ createCustomerCartAssociationQueryKey,
2401
+ createRuleMutation,
2402
+ createRuleOptions,
2403
+ createRuleQueryKey,
2404
+ deleteACartItemMutation,
2405
+ deleteACartMutation,
2406
+ deleteAPromotionViaPromotionCodeMutation,
2407
+ deleteATaxItemMutation,
2408
+ deleteAccountCartAssociationMutation,
2409
+ deleteAllCartItemsMutation,
2410
+ deleteCatalogByIdMutation,
2411
+ deleteCustomDiscountFromCartItemMutation,
2412
+ deleteCustomDiscountFromCartMutation,
2413
+ deleteCustomerCartAssociationMutation,
2414
+ deleteReleaseByIdMutation,
2415
+ deleteReleasesMutation,
2416
+ deleteRuleByIdMutation,
2417
+ deleteV2AccountAddressMutation,
2418
+ getACurrencyOptions,
2419
+ getACurrencyQueryKey,
2420
+ getAFileOptions,
2421
+ getAFileQueryKey,
2422
+ getATransactionOptions,
2423
+ getATransactionQueryKey,
2424
+ getAllCurrenciesOptions,
2425
+ getAllCurrenciesQueryKey,
2426
+ getAllFilesOptions,
2427
+ getAllFilesQueryKey,
2428
+ getAllHierarchiesOptions,
2429
+ getAllHierarchiesQueryKey,
2430
+ getAllNodesOptions,
2431
+ getAllNodesQueryKey,
2432
+ getAllProductsOptions,
2433
+ getAllProductsQueryKey,
2434
+ getAnOrderOptions,
2435
+ getAnOrderQueryKey,
2436
+ getByContextAllHierarchiesOptions,
2437
+ getByContextAllHierarchiesQueryKey,
2438
+ getByContextAllNodesOptions,
2439
+ getByContextAllNodesQueryKey,
2440
+ getByContextAllProductsOptions,
2441
+ getByContextAllProductsQueryKey,
2442
+ getByContextChildNodesOptions,
2443
+ getByContextChildNodesQueryKey,
2444
+ getByContextChildProductsOptions,
2445
+ getByContextChildProductsQueryKey,
2446
+ getByContextComponentProductIdsOptions,
2447
+ getByContextComponentProductIdsQueryKey,
2448
+ getByContextHierarchyChildNodesOptions,
2449
+ getByContextHierarchyChildNodesQueryKey,
2450
+ getByContextHierarchyNodesOptions,
2451
+ getByContextHierarchyNodesQueryKey,
2452
+ getByContextHierarchyOptions,
2453
+ getByContextHierarchyQueryKey,
2454
+ getByContextNodeOptions,
2455
+ getByContextNodeQueryKey,
2456
+ getByContextProductOptions,
2457
+ getByContextProductQueryKey,
2458
+ getByContextProductsForHierarchyOptions,
2459
+ getByContextProductsForHierarchyQueryKey,
2460
+ getByContextProductsForNodeOptions,
2461
+ getByContextProductsForNodeQueryKey,
2462
+ getByContextReleaseOptions,
2463
+ getByContextReleaseQueryKey,
2464
+ getCartItemsOptions,
2465
+ getCartItemsQueryKey,
2466
+ getCartOptions,
2467
+ getCartQueryKey,
2468
+ getCartsOptions,
2469
+ getCartsQueryKey,
2470
+ getCatalogByIdOptions,
2471
+ getCatalogByIdQueryKey,
2472
+ getCatalogsOptions,
2473
+ getCatalogsQueryKey,
2474
+ getChildNodesOptions,
2475
+ getChildNodesQueryKey,
2476
+ getChildProductsOptions,
2477
+ getChildProductsQueryKey,
2478
+ getComponentProductIdsOptions,
2479
+ getComponentProductIdsQueryKey,
2480
+ getCustomerOrdersOptions,
2481
+ getCustomerOrdersQueryKey,
2482
+ getFeatureOptions,
2483
+ getFeatureQueryKey,
2484
+ getHierarchyChildNodesOptions,
2485
+ getHierarchyChildNodesQueryKey,
2486
+ getHierarchyNodesOptions,
2487
+ getHierarchyNodesQueryKey,
2488
+ getHierarchyOptions,
2489
+ getHierarchyQueryKey,
2490
+ getInvoiceOptions,
2491
+ getInvoiceQueryKey,
2492
+ getNodeOptions,
2493
+ getNodeQueryKey,
2494
+ getOfferingOptions,
2495
+ getOfferingQueryKey,
2496
+ getOrderItemsOptions,
2497
+ getOrderItemsQueryKey,
2498
+ getOrderTransactionsOptions,
2499
+ getOrderTransactionsQueryKey,
2500
+ getPlanOptions,
2501
+ getPlanQueryKey,
2502
+ getProductOptions,
2503
+ getProductQueryKey,
2504
+ getProductsForHierarchyOptions,
2505
+ getProductsForHierarchyQueryKey,
2506
+ getProductsForNodeOptions,
2507
+ getProductsForNodeQueryKey,
2508
+ getReleaseByIdOptions,
2509
+ getReleaseByIdQueryKey,
2510
+ getReleasesOptions,
2511
+ getReleasesQueryKey,
2512
+ getRuleByIdOptions,
2513
+ getRuleByIdQueryKey,
2514
+ getRulesOptions,
2515
+ getRulesQueryKey,
2516
+ getStockOptions,
2517
+ getStockQueryKey,
2518
+ getSubscriptionInvoiceOptions,
2519
+ getSubscriptionInvoicePaymentOptions,
2520
+ getSubscriptionInvoicePaymentQueryKey,
2521
+ getSubscriptionInvoiceQueryKey,
2522
+ getSubscriptionOptions,
2523
+ getSubscriptionProductOptions,
2524
+ getSubscriptionProductQueryKey,
2525
+ getSubscriptionQueryKey,
2526
+ getSubscriptionStateOptions,
2527
+ getSubscriptionStateQueryKey,
2528
+ getV2AccountAddressOptions,
2529
+ getV2AccountAddressQueryKey,
2530
+ getV2AccountAddressesOptions,
2531
+ getV2AccountAddressesQueryKey,
2532
+ getV2AccountMembersAccountMemberIdOptions,
2533
+ getV2AccountMembersAccountMemberIdQueryKey,
2534
+ getV2AccountMembersOptions,
2535
+ getV2AccountMembersQueryKey,
2536
+ getV2AccountsAccountIdAccountMembershipsOptions,
2537
+ getV2AccountsAccountIdAccountMembershipsQueryKey,
2538
+ getV2AccountsAccountIdOptions,
2539
+ getV2AccountsAccountIdQueryKey,
2540
+ getV2AccountsOptions,
2541
+ getV2AccountsQueryKey,
2542
+ listInvoicesOptions,
2543
+ listInvoicesQueryKey,
2544
+ listLocationsOptions,
2545
+ listLocationsQueryKey,
2546
+ listOfferingFeaturesOptions,
2547
+ listOfferingFeaturesQueryKey,
2548
+ listOfferingPlansOptions,
2549
+ listOfferingPlansQueryKey,
2550
+ listOfferingProductsOptions,
2551
+ listOfferingProductsQueryKey,
2552
+ listOfferingsOptions,
2553
+ listOfferingsQueryKey,
2554
+ listSubscriptionInvoicePaymentsOptions,
2555
+ listSubscriptionInvoicePaymentsQueryKey,
2556
+ listSubscriptionInvoicesOptions,
2557
+ listSubscriptionInvoicesQueryKey,
2558
+ listSubscriptionPlansOptions,
2559
+ listSubscriptionPlansQueryKey,
2560
+ listSubscriptionProductsOptions,
2561
+ listSubscriptionProductsQueryKey,
2562
+ listSubscriptionStatesOptions,
2563
+ listSubscriptionStatesQueryKey,
2564
+ listSubscriptionsOptions,
2565
+ listSubscriptionsQueryKey,
2566
+ manageCartsMutation,
2567
+ manageCartsOptions,
2568
+ manageCartsQueryKey,
2569
+ paymentSetupMutation,
2570
+ paymentSetupOptions,
2571
+ paymentSetupQueryKey,
2572
+ postV2AccountAddressMutation,
2573
+ postV2AccountAddressOptions,
2574
+ postV2AccountAddressQueryKey,
2575
+ postV2AccountMembersTokensMutation,
2576
+ postV2AccountMembersTokensOptions,
2577
+ postV2AccountMembersTokensQueryKey,
2578
+ postV2AccountsMutation,
2579
+ postV2AccountsOptions,
2580
+ postV2AccountsQueryKey,
2581
+ publishReleaseMutation,
2582
+ publishReleaseOptions,
2583
+ publishReleaseQueryKey,
2584
+ putV2AccountAddressMutation,
2585
+ putV2AccountsAccountIdMutation,
2586
+ refundATransactionMutation,
2587
+ refundATransactionOptions,
2588
+ refundATransactionQueryKey,
2589
+ updateACartItemMutation,
2590
+ updateACartMutation,
2591
+ updateATaxItemMutation,
2592
+ updateAnOrderMutation,
2593
+ updateCatalogMutation,
2594
+ updateCustomDiscountForCartItemMutation,
2595
+ updateCustomDiscountForCartMutation,
2596
+ updateRuleMutation
2597
+ };
2598
+ //# sourceMappingURL=react-query.gen.mjs.map