@teamnovu/kit-shopware-composables 0.0.16 → 0.0.18

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.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { inject as Y, unref as i, computed as c, reactive as Z, watch as H, toRef as W } from "vue";
2
2
  import { until as J } from "@vueuse/core";
3
- import { queryOptions as Q, useQuery as M, useQueryClient as C, useMutation as v } from "@tanstack/vue-query";
3
+ import { queryOptions as P, useQuery as Q, useQueryClient as C, useMutation as h } from "@tanstack/vue-query";
4
4
  import "@teamnovu/kit-shopware-api-client";
5
5
  const _ = Symbol("shopwareClient");
6
6
  function g() {
@@ -76,11 +76,12 @@ const F = {
76
76
  body: e
77
77
  }
78
78
  ]
79
- }, I = {
79
+ }, x = {
80
80
  get: () => ["cart"]
81
81
  }, L = {
82
82
  all: () => ["customer"],
83
- detail: (e) => ["customer", { body: e }]
83
+ detail: (e) => ["customer", { body: e }],
84
+ imitateLogin: (e) => ["customer", "imitateLogin", { body: e }]
84
85
  }, R = {
85
86
  all: () => ["address"],
86
87
  lists: () => [...R.all(), "list"],
@@ -169,7 +170,7 @@ function ne(e) {
169
170
  var n;
170
171
  return (n = p(e)) == null ? void 0 : n.body;
171
172
  }));
172
- return Q({
173
+ return P({
173
174
  queryKey: t,
174
175
  queryFn: ({ signal: n }) => s.query(te, {
175
176
  ...p(e),
@@ -178,13 +179,13 @@ function ne(e) {
178
179
  });
179
180
  }
180
181
  function se(e) {
181
- return M(ne(e));
182
+ return Q(ne(e));
182
183
  }
183
184
  const V = (e) => {
184
185
  const s = e.replace(/\/?$/, "");
185
186
  return s.startsWith("/") ? s.slice(1) : s;
186
- }, gt = (e) => `/${V(e)}`;
187
- function mt(e, s, t) {
187
+ }, ft = (e) => `/${V(e)}`;
188
+ function ht(e, s, t) {
188
189
  const n = C();
189
190
  return {
190
191
  onMutate: async (r) => {
@@ -213,7 +214,7 @@ function mt(e, s, t) {
213
214
  const re = "readContext get /context";
214
215
  function ae(e) {
215
216
  const s = g();
216
- return Q({
217
+ return P({
217
218
  queryKey: F.all(),
218
219
  queryFn: ({ signal: t }) => s.query(re, {
219
220
  ...p(e),
@@ -222,12 +223,12 @@ function ae(e) {
222
223
  });
223
224
  }
224
225
  function k(e) {
225
- return M(ae(e));
226
+ return Q(ae(e));
226
227
  }
227
228
  const ue = "updateContext patch /context";
228
229
  function $(e) {
229
230
  const s = g(), t = C();
230
- return v({
231
+ return h({
231
232
  ...e,
232
233
  mutationFn: async (n) => (t.cancelQueries({ queryKey: F.all() }), s.query(ue, {
233
234
  body: n
@@ -238,7 +239,7 @@ function $(e) {
238
239
  }
239
240
  });
240
241
  }
241
- function ft() {
242
+ function vt() {
242
243
  const e = $(), s = k(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), r = async (d) => {
243
244
  await e.mutateAsync({
244
245
  billingAddressId: d.id
@@ -248,25 +249,25 @@ function ft() {
248
249
  shippingAddressId: d.id
249
250
  }), await J(n).toBe(!1);
250
251
  }, u = c(() => {
251
- var d, P;
252
- return (P = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : P.activeBillingAddress;
252
+ var d, M;
253
+ return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeBillingAddress;
253
254
  }), o = c(() => {
254
- var d, P;
255
- return (P = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : P.activeShippingAddress;
255
+ var d, M;
256
+ return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeShippingAddress;
256
257
  }), f = c(() => {
257
258
  var d;
258
259
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
259
- (P) => {
260
+ (M) => {
260
261
  var O;
261
- return P.id !== ((O = u.value) == null ? void 0 : O.id);
262
+ return M.id !== ((O = u.value) == null ? void 0 : O.id);
262
263
  }
263
264
  )) ?? [];
264
265
  }), S = c(() => {
265
266
  var d;
266
267
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
267
- (P) => {
268
+ (M) => {
268
269
  var O;
269
- return P.id !== ((O = o.value) == null ? void 0 : O.id);
270
+ return M.id !== ((O = o.value) == null ? void 0 : O.id);
270
271
  }
271
272
  )) ?? [];
272
273
  });
@@ -286,7 +287,7 @@ function ft() {
286
287
  const oe = "readOrder post /order";
287
288
  function ie(e) {
288
289
  const s = g(), t = U.detail(e);
289
- return Q({
290
+ return P({
290
291
  queryKey: t,
291
292
  queryFn: async ({ signal: n }) => {
292
293
  const r = p(e);
@@ -298,9 +299,9 @@ function ie(e) {
298
299
  });
299
300
  }
300
301
  function ce(e) {
301
- return M(ie(e));
302
+ return Q(ie(e));
302
303
  }
303
- function vt(e, s) {
304
+ function qt(e, s) {
304
305
  const t = c(() => {
305
306
  const l = i(e);
306
307
  if (l)
@@ -318,8 +319,8 @@ function vt(e, s) {
318
319
  }
319
320
  };
320
321
  }), n = ce(t.value), r = c(() => {
321
- var l, m, q, x;
322
- return (x = (q = (m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.orders) == null ? void 0 : q.elements) == null ? void 0 : x[0];
322
+ var l, m, q, I;
323
+ return (I = (q = (m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.orders) == null ? void 0 : q.elements) == null ? void 0 : I[0];
323
324
  }), a = c(() => {
324
325
  var l, m;
325
326
  return ((m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.paymentChangeable) || {};
@@ -338,19 +339,19 @@ function vt(e, s) {
338
339
  }), d = c(() => {
339
340
  var l;
340
341
  return (l = r.value) == null ? void 0 : l.shippingTotal;
341
- }), P = c(() => {
342
- var l, m, q, x, z, G;
342
+ }), M = c(() => {
343
+ var l, m, q, I, z, G;
343
344
  return {
344
345
  email: (m = (l = r.value) == null ? void 0 : l.orderCustomer) == null ? void 0 : m.email,
345
- firstName: (x = (q = r.value) == null ? void 0 : q.orderCustomer) == null ? void 0 : x.firstName,
346
+ firstName: (I = (q = r.value) == null ? void 0 : q.orderCustomer) == null ? void 0 : I.firstName,
346
347
  lastName: (G = (z = r.value) == null ? void 0 : z.orderCustomer) == null ? void 0 : G.lastName
347
348
  };
348
349
  }), O = c(() => {
349
350
  var l, m;
350
351
  return (m = (l = r.value) == null ? void 0 : l.addresses) == null ? void 0 : m.find(
351
352
  ({ id: q }) => {
352
- var x;
353
- return q === ((x = r.value) == null ? void 0 : x.billingAddressId);
353
+ var I;
354
+ return q === ((I = r.value) == null ? void 0 : I.billingAddressId);
354
355
  }
355
356
  );
356
357
  }), y = c(
@@ -358,7 +359,7 @@ function vt(e, s) {
358
359
  var l, m, q;
359
360
  return (q = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : q.shippingOrderAddress;
360
361
  }
361
- ), h = c(() => {
362
+ ), v = c(() => {
362
363
  var m, q;
363
364
  const l = (m = r.value) == null ? void 0 : m.transactions;
364
365
  if (l != null && l.length)
@@ -382,14 +383,14 @@ function vt(e, s) {
382
383
  shippingCosts: d,
383
384
  shippingAddress: y,
384
385
  billingAddress: O,
385
- personalDetails: P,
386
+ personalDetails: M,
386
387
  shippingMethod: K,
387
- paymentMethod: h,
388
+ paymentMethod: v,
388
389
  paymentChangeable: A,
389
390
  orderQuery: n
390
391
  };
391
392
  }
392
- function ht(e) {
393
+ function Ct(e) {
393
394
  const s = c(() => {
394
395
  var r, a;
395
396
  return (a = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : a.find((u) => {
@@ -410,9 +411,9 @@ function ht(e) {
410
411
  };
411
412
  }
412
413
  const le = "createCustomerAddress post /account/address";
413
- function qt(e) {
414
+ function St(e) {
414
415
  const s = g(), t = C();
415
- return v({
416
+ return h({
416
417
  ...e,
417
418
  mutationFn: async (n) => s.query(le, p(n)),
418
419
  onSuccess: async (n, r, a) => {
@@ -422,9 +423,9 @@ function qt(e) {
422
423
  });
423
424
  }
424
425
  const de = "deleteCustomerAddress delete /account/address/{addressId}";
425
- function Ct(e) {
426
+ function Pt(e) {
426
427
  const s = g(), t = C();
427
- return v({
428
+ return h({
428
429
  ...e,
429
430
  mutationFn: async (n) => s.query(de, p(n)),
430
431
  onSuccess: async (n, r, a) => {
@@ -434,9 +435,9 @@ function Ct(e) {
434
435
  });
435
436
  }
436
437
  const ye = "updateCustomerAddress patch /account/address/{addressId}";
437
- function St(e) {
438
+ function Qt(e) {
438
439
  const s = g(), t = C();
439
- return v({
440
+ return h({
440
441
  ...e,
441
442
  mutationFn: async (n) => s.query(ye, p(n)),
442
443
  onSuccess: async (n, r, a) => {
@@ -453,23 +454,23 @@ function St(e) {
453
454
  });
454
455
  }
455
456
  const pe = "addLineItem post /checkout/cart/line-item";
456
- function Pt(e) {
457
+ function Mt(e) {
457
458
  const s = g(), t = C();
458
- return v({
459
+ return h({
459
460
  ...e,
460
461
  mutationFn: async (n) => s.query(pe, {
461
462
  body: n
462
463
  }),
463
464
  onSuccess: async (n, r, a) => {
464
465
  var u, o;
465
- t.setQueryData(I.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
466
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
466
467
  }
467
468
  });
468
469
  }
469
470
  const ge = "readCart get /checkout/cart";
470
471
  function me(e) {
471
- const s = g(), t = I.get();
472
- return Q({
472
+ const s = g(), t = x.get();
473
+ return P({
473
474
  queryKey: t,
474
475
  queryFn: async ({ signal: n }) => s.query(ge, {
475
476
  ...p(e),
@@ -477,48 +478,46 @@ function me(e) {
477
478
  })
478
479
  });
479
480
  }
480
- function Qt() {
481
- return M(me());
481
+ function Ot() {
482
+ return Q(me());
482
483
  }
483
484
  const fe = "removeLineItem post /checkout/cart/line-item/delete";
484
- function Mt(e) {
485
+ function Kt(e) {
485
486
  const s = g(), t = C();
486
- return v({
487
+ return h({
487
488
  ...e,
488
489
  mutationFn: async (n) => s.query(fe, {
489
490
  body: n
490
491
  }),
491
492
  onSuccess: async (n, r, a) => {
492
493
  var u, o;
493
- t.setQueryData(I.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
494
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
494
495
  }
495
496
  });
496
497
  }
497
- const ve = "updateLineItem patch /checkout/cart/line-item";
498
- function Ot(e) {
498
+ const he = "updateLineItem patch /checkout/cart/line-item";
499
+ function At(e) {
499
500
  const s = g(), t = C();
500
- return v({
501
+ return h({
501
502
  ...e,
502
- mutationFn: async (n) => s.query(ve, {
503
+ mutationFn: async (n) => s.query(he, {
503
504
  body: n
504
505
  }),
505
506
  onSuccess: async (n, r, a) => {
506
507
  var u, o;
507
- t.setQueryData(I.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
508
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
508
509
  }
509
510
  });
510
511
  }
511
- const he = "createOrder post /checkout/order";
512
- function Kt(e) {
512
+ const ve = "createOrder post /checkout/order";
513
+ function wt(e) {
513
514
  const s = g(), t = C();
514
- return v({
515
+ return h({
515
516
  ...e,
516
- mutationFn: async (n) => s.query(he, p(n)),
517
+ mutationFn: async (n) => s.query(ve, p(n)),
517
518
  onSuccess: async (n, r, a) => {
518
519
  var u, o;
519
520
  await Promise.all([
520
- // Clear cart after successful order creation
521
- t.invalidateQueries({ queryKey: I.get() }),
522
521
  // Invalidate order list to refetch data
523
522
  t.invalidateQueries({ queryKey: U.lists() })
524
523
  ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -528,7 +527,7 @@ function Kt(e) {
528
527
  const qe = "readLanguages post /language";
529
528
  function Ce(e) {
530
529
  const s = g();
531
- return Q({
530
+ return P({
532
531
  queryKey: ee.all(),
533
532
  queryFn: ({ signal: t }) => s.query(qe, {
534
533
  ...p(e),
@@ -536,12 +535,12 @@ function Ce(e) {
536
535
  })
537
536
  });
538
537
  }
539
- function At(e) {
540
- return M(Ce(e));
538
+ function Rt(e) {
539
+ return Q(Ce(e));
541
540
  }
542
541
  const Se = "readCountry post /country", Pe = function(s) {
543
542
  const t = g(), n = j.list(s);
544
- return Q({
543
+ return P({
545
544
  queryKey: n,
546
545
  queryFn: async ({ signal: r }) => {
547
546
  const a = p(s);
@@ -552,13 +551,13 @@ const Se = "readCountry post /country", Pe = function(s) {
552
551
  }
553
552
  });
554
553
  };
555
- function wt(e) {
556
- return M(Pe(e));
554
+ function Ft(e) {
555
+ return Q(Pe(e));
557
556
  }
558
557
  const Qe = "changeEmail post /account/change-email";
559
- function Rt(e) {
558
+ function Lt(e) {
560
559
  const s = g(), t = C();
561
- return v({
560
+ return h({
562
561
  ...e,
563
562
  mutationFn: async (n) => s.query(Qe, p(n)),
564
563
  onSuccess: async (n, r, a) => {
@@ -568,9 +567,9 @@ function Rt(e) {
568
567
  });
569
568
  }
570
569
  const Me = "changeProfile post /account/change-profile";
571
- function Ft(e) {
570
+ function It(e) {
572
571
  const s = g(), t = C();
573
- return v({
572
+ return h({
574
573
  ...e,
575
574
  mutationFn: async (n) => s.query(Me, p(n)),
576
575
  onSuccess: async (n, r, a) => {
@@ -583,9 +582,9 @@ function Ft(e) {
583
582
  });
584
583
  }
585
584
  const Oe = "loginCustomer post /account/login";
586
- function It(e) {
585
+ function xt(e) {
587
586
  const s = g(), t = C();
588
- return v({
587
+ return h({
589
588
  ...e,
590
589
  mutationFn: async (n) => {
591
590
  const r = await s.queryRaw(Oe, {
@@ -597,23 +596,23 @@ function It(e) {
597
596
  var u, o;
598
597
  await Promise.all([
599
598
  t.resetQueries({ queryKey: F.all() }),
600
- t.invalidateQueries({ queryKey: I.get() }),
599
+ t.invalidateQueries({ queryKey: x.get() }),
601
600
  t.invalidateQueries({ queryKey: L.all() })
602
601
  ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
603
602
  }
604
603
  });
605
604
  }
606
605
  const Ke = "logoutCustomer post /account/logout";
607
- function Lt(e) {
606
+ function Ut(e) {
608
607
  const s = g(), t = C();
609
- return v({
608
+ return h({
610
609
  ...e,
611
610
  mutationFn: async (n) => s.query(Ke, p(n)),
612
611
  onSuccess: async (n, r, a) => {
613
612
  var u, o;
614
613
  await Promise.all([
615
614
  t.resetQueries({ queryKey: F.all() }),
616
- t.invalidateQueries({ queryKey: I.get() }),
615
+ t.invalidateQueries({ queryKey: x.get() }),
617
616
  t.invalidateQueries({ queryKey: L.all() })
618
617
  ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
619
618
  }
@@ -622,18 +621,18 @@ function Lt(e) {
622
621
  const Ae = "readCustomer post /account/customer";
623
622
  function we(e) {
624
623
  const s = g(), t = L.detail(c(() => p(e).body ?? {}));
625
- return Q({
624
+ return P({
626
625
  queryKey: t,
627
626
  queryFn: async () => s.query(Ae, p(e))
628
627
  });
629
628
  }
630
629
  function Re(e) {
631
- return M(we(e));
630
+ return Q(we(e));
632
631
  }
633
632
  const Fe = "register post /account/register";
634
- function xt(e) {
633
+ function bt(e) {
635
634
  const s = g(), t = C();
636
- return v({
635
+ return h({
637
636
  ...e,
638
637
  mutationFn: async (n) => s.query(Fe, p(n)),
639
638
  onSuccess: async (n, r, a) => {
@@ -642,12 +641,12 @@ function xt(e) {
642
641
  }
643
642
  });
644
643
  }
645
- const Ie = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
646
- function Ut(e) {
644
+ const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
645
+ function kt(e) {
647
646
  const s = g(), t = C();
648
- return v({
647
+ return h({
649
648
  ...e,
650
- mutationFn: async (n) => s.query(Ie, p(n)),
649
+ mutationFn: async (n) => s.query(Le, p(n)),
651
650
  onSuccess: async (n, r, a) => {
652
651
  var u, o;
653
652
  await Promise.all([
@@ -657,12 +656,12 @@ function Ut(e) {
657
656
  }
658
657
  });
659
658
  }
660
- const Le = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
661
- function bt(e) {
659
+ const Ie = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
660
+ function Bt(e) {
662
661
  const s = g(), t = C();
663
- return v({
662
+ return h({
664
663
  ...e,
665
- mutationFn: async (n) => s.query(Le, p(n)),
664
+ mutationFn: async (n) => s.query(Ie, p(n)),
666
665
  onSuccess: async (n, r, a) => {
667
666
  var u, o;
668
667
  await Promise.all([
@@ -673,9 +672,9 @@ function bt(e) {
673
672
  });
674
673
  }
675
674
  const xe = "deleteCustomer delete /account/customer";
676
- function kt(e) {
675
+ function Dt(e) {
677
676
  const s = g(), t = C();
678
- return v({
677
+ return h({
679
678
  ...e,
680
679
  mutationFn: async (n) => s.query(xe, p(n)),
681
680
  onSuccess: async (n, r, a) => {
@@ -683,15 +682,15 @@ function kt(e) {
683
682
  await Promise.all([
684
683
  t.resetQueries({ queryKey: L.all() }),
685
684
  t.resetQueries({ queryKey: F.all() }),
686
- t.resetQueries({ queryKey: I.get() })
685
+ t.resetQueries({ queryKey: x.get() })
687
686
  ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
688
687
  }
689
688
  });
690
689
  }
691
690
  const Ue = "registerConfirm post /account/register-confirm";
692
- function Bt(e) {
691
+ function Nt(e) {
693
692
  const s = g();
694
- return v({
693
+ return h({
695
694
  ...e,
696
695
  mutationFn: async (t) => {
697
696
  const n = await s.queryRaw(Ue, {
@@ -706,9 +705,9 @@ function Bt(e) {
706
705
  });
707
706
  }
708
707
  const be = "sendRecoveryMail post /account/recovery-password";
709
- function Dt(e) {
708
+ function Tt(e) {
710
709
  const s = g();
711
- return v({
710
+ return h({
712
711
  ...e,
713
712
  mutationFn: async (t) => s.query(be, p(t)),
714
713
  onSuccess: async (t, n, r) => {
@@ -718,9 +717,9 @@ function Dt(e) {
718
717
  });
719
718
  }
720
719
  const ke = "changePassword post /account/change-password";
721
- function Nt(e) {
720
+ function Et(e) {
722
721
  const s = g();
723
- return v({
722
+ return h({
724
723
  ...e,
725
724
  mutationFn: async (t) => s.query(ke, p(t)),
726
725
  onSuccess: async (t, n, r) => {
@@ -729,25 +728,36 @@ function Nt(e) {
729
728
  }
730
729
  });
731
730
  }
732
- const Be = "recoveryPassword post /account/recovery-password-confirm";
733
- function Tt(e) {
731
+ const Be = "imitateCustomerLogin post /account/login/imitate-customer";
732
+ function De(e) {
733
+ const s = g(), t = L.imitateLogin(c(() => p(e).body ?? {}));
734
+ return P({
735
+ queryKey: t,
736
+ queryFn: async () => s.query(Be, p(e))
737
+ });
738
+ }
739
+ function jt(e) {
740
+ return Q(De(e));
741
+ }
742
+ const Ne = "recoveryPassword post /account/recovery-password-confirm";
743
+ function Vt(e) {
734
744
  const s = g();
735
- return v({
745
+ return h({
736
746
  ...e,
737
- mutationFn: async (t) => s.query(Be, p(t)),
747
+ mutationFn: async (t) => s.query(Ne, p(t)),
738
748
  onSuccess: async (t, n, r) => {
739
749
  var a, u;
740
750
  await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
741
751
  }
742
752
  });
743
753
  }
744
- const De = "readNavigation post /navigation/{activeId}/{rootId}", Ne = function(s, t, n) {
754
+ const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
745
755
  const r = g(), a = b.detail(s, t, n);
746
- return Q({
756
+ return P({
747
757
  queryKey: a,
748
758
  queryFn: async ({ signal: u }) => {
749
759
  const o = i(s), f = i(t), S = p(n);
750
- return r.query(De, {
760
+ return r.query(Te, {
751
761
  ...S,
752
762
  params: {
753
763
  activeId: o,
@@ -758,71 +768,71 @@ const De = "readNavigation post /navigation/{activeId}/{rootId}", Ne = function(
758
768
  }
759
769
  });
760
770
  };
761
- function Et(e, s, t) {
762
- return M(Ne(e, s, t));
771
+ function $t(e, s, t) {
772
+ return Q(Ee(e, s, t));
763
773
  }
764
- const Te = "readPaymentMethod post /payment-method";
765
- function Ee(e) {
774
+ const je = "readPaymentMethod post /payment-method";
775
+ function Ve(e) {
766
776
  const s = g(), t = N.list(c(() => {
767
777
  var n;
768
778
  return (n = p(e)) == null ? void 0 : n.body;
769
779
  }));
770
- return Q({
780
+ return P({
771
781
  queryKey: t,
772
- queryFn: ({ signal: n }) => s.query(Te, {
782
+ queryFn: ({ signal: n }) => s.query(je, {
773
783
  ...p(e),
774
784
  signal: n
775
785
  })
776
786
  });
777
787
  }
778
- function je(e) {
779
- return M(Ee(e));
788
+ function $e(e) {
789
+ return Q(Ve(e));
780
790
  }
781
- const Ve = "handlePaymentMethod post /handle-payment";
782
- function jt(e) {
791
+ const ze = "handlePaymentMethod post /handle-payment";
792
+ function zt(e) {
783
793
  const s = g(), t = C();
784
- return v({
794
+ return h({
785
795
  ...e,
786
- mutationFn: async (n) => s.query(Ve, p(n)),
796
+ mutationFn: async (n) => s.query(ze, p(n)),
787
797
  onSuccess: async (n, r, a) => {
788
798
  var u, o;
789
- await t.invalidateQueries({ queryKey: I.get() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
799
+ await t.invalidateQueries({ queryKey: x.get() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
790
800
  }
791
801
  });
792
802
  }
793
- const $e = "orderSetPayment post /order/payment";
794
- function Vt(e) {
803
+ const Ge = "orderSetPayment post /order/payment";
804
+ function Gt(e) {
795
805
  const s = g(), t = C();
796
- return v({
806
+ return h({
797
807
  ...e,
798
- mutationFn: async (n) => s.query($e, p(n)),
808
+ mutationFn: async (n) => s.query(Ge, p(n)),
799
809
  onSuccess: async (n, r, a) => {
800
810
  var u, o;
801
811
  await t.invalidateQueries({ queryKey: U.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
802
812
  }
803
813
  });
804
814
  }
805
- const ze = "readCategoryList post /category", Ge = function(s) {
815
+ const He = "readCategoryList post /category", We = function(s) {
806
816
  const t = g(), n = B.list(s);
807
- return Q({
817
+ return P({
808
818
  queryKey: n,
809
- queryFn: async ({ signal: r }) => t.query(ze, {
819
+ queryFn: async ({ signal: r }) => t.query(He, {
810
820
  ...p(s),
811
821
  signal: r
812
822
  })
813
823
  });
814
824
  };
815
- function $t(e) {
816
- return M(Ge(e));
825
+ function Ht(e) {
826
+ return Q(We(e));
817
827
  }
818
- const He = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
819
- function We(e, s) {
828
+ const Je = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
829
+ function Xe(e, s) {
820
830
  const t = g(), n = w.list(e, s);
821
- return Q({
831
+ return P({
822
832
  queryKey: n,
823
833
  queryFn: async ({ signal: r }) => {
824
834
  const a = p(s);
825
- return t.query(He, {
835
+ return t.query(Je, {
826
836
  ...a,
827
837
  params: {
828
838
  ...a.params,
@@ -833,17 +843,17 @@ function We(e, s) {
833
843
  }
834
844
  });
835
845
  }
836
- function zt(e, s) {
837
- return M(We(e, s));
846
+ function Wt(e, s) {
847
+ return Q(Xe(e, s));
838
848
  }
839
- const Je = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
840
- function Xe(e, s) {
849
+ const Ye = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
850
+ function Ze(e, s) {
841
851
  const t = g(), n = w.customDetail(e, s);
842
- return Q({
852
+ return P({
843
853
  queryKey: n,
844
854
  queryFn: async ({ signal: r }) => {
845
855
  const a = p(s);
846
- return t.query(Je, {
856
+ return t.query(Ye, {
847
857
  ...a,
848
858
  params: {
849
859
  ...a.params,
@@ -854,94 +864,94 @@ function Xe(e, s) {
854
864
  }
855
865
  });
856
866
  }
857
- function Gt(e, s) {
858
- return M(Xe(e, s));
867
+ function Jt(e, s) {
868
+ return Q(Ze(e, s));
859
869
  }
860
- const Ye = "searchPage post /search";
861
- function Ze(e) {
870
+ const _e = "searchPage post /search";
871
+ function et(e) {
862
872
  const s = g(), t = w.search(e);
863
- return Q({
873
+ return P({
864
874
  queryKey: t,
865
875
  queryFn: async ({ signal: n }) => {
866
876
  const r = p(e);
867
- return s.query(Ye, {
877
+ return s.query(_e, {
868
878
  ...r,
869
879
  signal: n
870
880
  });
871
881
  }
872
882
  });
873
883
  }
874
- function Ht(e) {
875
- return M(Ze(e));
884
+ function Xt(e) {
885
+ return Q(et(e));
876
886
  }
877
- const _e = "readProduct post /product";
878
- function et(e) {
887
+ const tt = "readProduct post /product";
888
+ function nt(e) {
879
889
  const s = g(), t = w.detail(e);
880
- return Q({
890
+ return P({
881
891
  queryKey: t,
882
892
  queryFn: async ({ signal: n }) => {
883
893
  const r = p(e);
884
- return s.query(_e, {
894
+ return s.query(tt, {
885
895
  ...r,
886
896
  signal: n
887
897
  });
888
898
  }
889
899
  });
890
900
  }
891
- function Wt(e) {
892
- return M(et(e));
901
+ function Yt(e) {
902
+ return Q(nt(e));
893
903
  }
894
- const tt = "readSalutation post /salutation", nt = function(s) {
904
+ const st = "readSalutation post /salutation", rt = function(s) {
895
905
  const t = g(), n = E.list(s);
896
- return Q({
906
+ return P({
897
907
  queryKey: n,
898
908
  queryFn: async ({ signal: r }) => {
899
909
  const a = p(s);
900
- return t.query(tt, {
910
+ return t.query(st, {
901
911
  ...a,
902
912
  signal: r
903
913
  });
904
914
  }
905
915
  });
906
916
  };
907
- function Jt(e) {
908
- return M(nt(e));
917
+ function Zt(e) {
918
+ return Q(rt(e));
909
919
  }
910
- const st = "readSeoUrl post /seo-url", rt = function(s) {
920
+ const at = "readSeoUrl post /seo-url", ut = function(s) {
911
921
  const t = g(), n = T.list(s);
912
- return Q({
922
+ return P({
913
923
  queryKey: n,
914
924
  queryFn: async ({ signal: r }) => {
915
925
  const a = p(s);
916
- return t.query(st, {
926
+ return t.query(at, {
917
927
  ...a,
918
928
  signal: r
919
929
  });
920
930
  }
921
931
  });
922
932
  };
923
- function Xt(e) {
924
- return M(rt(e));
933
+ function _t(e) {
934
+ return Q(ut(e));
925
935
  }
926
- const at = "readShippingMethod post /shipping-method";
927
- function ut(e) {
936
+ const ot = "readShippingMethod post /shipping-method";
937
+ function it(e) {
928
938
  const s = g(), t = D.list(c(() => {
929
939
  var n;
930
940
  return (n = p(e)) == null ? void 0 : n.body;
931
941
  }));
932
- return Q({
942
+ return P({
933
943
  queryKey: t,
934
- queryFn: ({ signal: n }) => s.query(at, {
944
+ queryFn: ({ signal: n }) => s.query(ot, {
935
945
  ...p(e),
936
946
  signal: n
937
947
  })
938
948
  });
939
949
  }
940
- function ot(e) {
941
- return M(ut(e));
950
+ function ct(e) {
951
+ return Q(it(e));
942
952
  }
943
- function Yt() {
944
- const e = k(), s = $(), t = je({
953
+ function en() {
954
+ const e = k(), s = $(), t = $e({
945
955
  query: {
946
956
  onlyAvailable: !0
947
957
  }
@@ -952,7 +962,7 @@ function Yt() {
952
962
  return (f = (o = e.data) == null ? void 0 : o.value) == null ? void 0 : f.paymentMethod;
953
963
  }), u = c(() => {
954
964
  var o, f, S;
955
- return ((S = (f = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : f.elements) == null ? void 0 : S.sort((d, P) => (d.position ?? 0) - (P.position ?? 0))) ?? [];
965
+ return ((S = (f = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : f.elements) == null ? void 0 : S.sort((d, M) => (d.position ?? 0) - (M.position ?? 0))) ?? [];
956
966
  });
957
967
  return {
958
968
  contextUpdateMutation: s,
@@ -964,8 +974,8 @@ function Yt() {
964
974
  paymentMethods: u
965
975
  };
966
976
  }
967
- function Zt() {
968
- const e = k(), s = $(), t = ot({
977
+ function tn() {
978
+ const e = k(), s = $(), t = ct({
969
979
  query: {
970
980
  onlyAvailable: !0
971
981
  }
@@ -988,7 +998,7 @@ function Zt() {
988
998
  shippingMethods: u
989
999
  };
990
1000
  }
991
- const it = (e, s) => {
1001
+ const lt = (e, s) => {
992
1002
  var n;
993
1003
  const t = (n = e == null ? void 0 : e.extensions) == null ? void 0 : n.novuSeoUrls;
994
1004
  if (Array.isArray(s)) {
@@ -996,17 +1006,17 @@ const it = (e, s) => {
996
1006
  return r ? (t == null ? void 0 : t[r]) ?? "" : "";
997
1007
  }
998
1008
  return (t == null ? void 0 : t[s]) ?? "";
999
- }, _t = () => {
1009
+ }, nn = () => {
1000
1010
  const e = k(), s = c(() => {
1001
1011
  var t, n, r;
1002
1012
  return ((r = (n = (t = e.data) == null ? void 0 : t.value) == null ? void 0 : n.context) == null ? void 0 : r.languageIdChain) ?? [];
1003
1013
  });
1004
1014
  return (t, n) => {
1005
1015
  const r = [n, ...s.value];
1006
- return it(i(t), i(r));
1016
+ return lt(i(t), i(r));
1007
1017
  };
1008
1018
  };
1009
- function en(e) {
1019
+ function sn(e) {
1010
1020
  const { total: s, limit: t, page: n, totalCountMode: r } = e ?? {}, a = Z({
1011
1021
  page: n ?? 1,
1012
1022
  total: s ?? 0,
@@ -1030,7 +1040,7 @@ function en(e) {
1030
1040
  p: a.page,
1031
1041
  limit: a.limit,
1032
1042
  "total-count-mode": a.totalCountMode ?? "none"
1033
- })), P = (O) => {
1043
+ })), M = (O) => {
1034
1044
  H(() => i(O), (y) => {
1035
1045
  y && (a.total = (y == null ? void 0 : y.total) ?? 0, a.limit = (y == null ? void 0 : y.limit) ?? 0);
1036
1046
  });
@@ -1042,7 +1052,7 @@ function en(e) {
1042
1052
  pageCount: u,
1043
1053
  isLastPage: f,
1044
1054
  isFirstPage: S,
1045
- usePaginationSync: P,
1055
+ usePaginationSync: M,
1046
1056
  // This can be used to pass the pagination options directly to the query options
1047
1057
  queryOptions: d
1048
1058
  };
@@ -1058,30 +1068,30 @@ function X(e) {
1058
1068
  unitPrice: n
1059
1069
  }));
1060
1070
  }
1061
- function tn(e) {
1071
+ function rn(e) {
1062
1072
  const s = c(() => {
1063
1073
  var y;
1064
1074
  return (y = e.value) == null ? void 0 : y.calculatedCheapestPrice;
1065
1075
  }), t = c(
1066
1076
  () => {
1067
- var y, h, K, A, l;
1068
- return (((h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.length) ?? 0) > 0 ? (A = (K = e.value) == null ? void 0 : K.calculatedPrices) == null ? void 0 : A[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1077
+ var y, v, K, A, l;
1078
+ return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 0 ? (A = (K = e.value) == null ? void 0 : K.calculatedPrices) == null ? void 0 : A[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1069
1079
  }
1070
1080
  ), n = c(() => {
1071
1081
  var y;
1072
1082
  return (y = t == null ? void 0 : t.value) == null ? void 0 : y.referencePrice;
1073
1083
  }), r = c(() => {
1074
- var y, h;
1075
- return (((h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.length) ?? 0) > 1;
1084
+ var y, v;
1085
+ return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 1;
1076
1086
  }), a = c(
1077
1087
  () => {
1078
- var y, h, K, A, l, m;
1079
- return !!((y = e.value) != null && y.parentId) && ((K = (h = e.value) == null ? void 0 : h.calculatedCheapestPrice) == null ? void 0 : K.hasRange) && ((A = t == null ? void 0 : t.value) == null ? void 0 : A.unitPrice) !== ((l = s == null ? void 0 : s.value) == null ? void 0 : l.unitPrice) && ((m = s == null ? void 0 : s.value) == null ? void 0 : m.unitPrice);
1088
+ var y, v, K, A, l, m;
1089
+ return !!((y = e.value) != null && y.parentId) && ((K = (v = e.value) == null ? void 0 : v.calculatedCheapestPrice) == null ? void 0 : K.hasRange) && ((A = t == null ? void 0 : t.value) == null ? void 0 : A.unitPrice) !== ((l = s == null ? void 0 : s.value) == null ? void 0 : l.unitPrice) && ((m = s == null ? void 0 : s.value) == null ? void 0 : m.unitPrice);
1080
1090
  }
1081
1091
  ), u = c(
1082
1092
  () => {
1083
- var y, h;
1084
- return r.value && X(e.value).length > 1 ? (h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.reduce((K, A) => A.unitPrice < K.unitPrice ? A : K) : t.value;
1093
+ var y, v;
1094
+ return r.value && X(e.value).length > 1 ? (v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.reduce((K, A) => A.unitPrice < K.unitPrice ? A : K) : t.value;
1085
1095
  }
1086
1096
  ), o = c(
1087
1097
  () => {
@@ -1096,12 +1106,12 @@ function tn(e) {
1096
1106
  ), S = c(
1097
1107
  () => u.value
1098
1108
  ), d = c(() => {
1099
- var y, h;
1100
- return !!((h = (y = u.value) == null ? void 0 : y.listPrice) != null && h.percentage);
1101
- }), P = c(
1109
+ var y, v;
1110
+ return !!((v = (y = u.value) == null ? void 0 : y.listPrice) != null && v.percentage);
1111
+ }), M = c(
1102
1112
  () => {
1103
- var y, h, K;
1104
- return (K = (h = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : h.regulationPrice) == null ? void 0 : K.price;
1113
+ var y, v, K;
1114
+ return (K = (v = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : v.regulationPrice) == null ? void 0 : K.price;
1105
1115
  }
1106
1116
  ), O = c(() => X(e.value));
1107
1117
  return {
@@ -1113,10 +1123,10 @@ function tn(e) {
1113
1123
  tierPrices: O,
1114
1124
  referencePrice: n,
1115
1125
  isListPrice: d,
1116
- regulationPrice: P
1126
+ regulationPrice: M
1117
1127
  };
1118
1128
  }
1119
- function ct(e, s) {
1129
+ function dt(e, s) {
1120
1130
  var n;
1121
1131
  const t = (n = e.extensions) == null ? void 0 : n.variants;
1122
1132
  return s.length === 0 ? (t == null ? void 0 : t.find((r) => {
@@ -1127,16 +1137,16 @@ function ct(e, s) {
1127
1137
  return (a = r.optionIds) == null ? void 0 : a.every((u) => s.includes(u));
1128
1138
  });
1129
1139
  }
1130
- function nn(e, s) {
1131
- return c(() => ct(i(e), i(s)));
1140
+ function an(e, s) {
1141
+ return c(() => dt(i(e), i(s)));
1132
1142
  }
1133
- function sn(e) {
1143
+ function un(e) {
1134
1144
  return c(() => {
1135
1145
  var s, t, n, r, a, u;
1136
1146
  return !!((t = (s = i(e)) == null ? void 0 : s.customer) != null && t.id) && !!((r = (n = i(e)) == null ? void 0 : n.customer) != null && r.active) && !((u = (a = i(e)) == null ? void 0 : a.customer) != null && u.guest);
1137
1147
  });
1138
1148
  }
1139
- function rn(e) {
1149
+ function on(e) {
1140
1150
  const s = Re(e ? { body: e } : void 0), t = c(() => {
1141
1151
  var d;
1142
1152
  return (d = s.data) == null ? void 0 : d.value;
@@ -1189,94 +1199,96 @@ function rn(e) {
1189
1199
  };
1190
1200
  }
1191
1201
  export {
1192
- gt as absolutizeSeoUrl,
1202
+ ft as absolutizeSeoUrl,
1193
1203
  R as addressKeys,
1194
- I as cartKeys,
1204
+ x as cartKeys,
1195
1205
  B as categoryKeys,
1196
1206
  F as contextKeys,
1197
1207
  j as countryKeys,
1198
1208
  L as customerKeys,
1199
- ct as getProductVariantForOptions,
1209
+ dt as getProductVariantForOptions,
1200
1210
  ee as languageKey,
1201
1211
  b as navigationKeys,
1202
1212
  U as orderKeys,
1203
1213
  N as paymentKeys,
1204
1214
  w as productKeys,
1205
- Te as readPaymentMethodOperation,
1206
- at as readShippingMethodOperation,
1215
+ je as readPaymentMethodOperation,
1216
+ ot as readShippingMethodOperation,
1207
1217
  V as relativizeSeoUrl,
1208
1218
  E as salutationKeys,
1209
1219
  T as seoUrlKeys,
1210
1220
  D as shippingKeys,
1211
1221
  _ as shopwareClientKey,
1212
1222
  p as unrefOptions,
1213
- Pt as useAddLineItemMutation,
1214
- Rt as useChangeEmailMutation,
1215
- Nt as useChangePasswordMutation,
1216
- Ft as useChangeProfileMutation,
1217
- ft as useCheckoutAddresses,
1218
- qt as useCreateCustomerAddressMutation,
1219
- Kt as useCreateOrderMutation,
1220
- Ut as useDefaultBillingAddressMutation,
1221
- bt as useDefaultShippingAddressMutation,
1222
- Ct as useDeleteCustomerAddressMutation,
1223
- kt as useDeleteCustomerMutation,
1224
- jt as useHandlePaymentMutation,
1225
- sn as useIsLoggedIn,
1223
+ Mt as useAddLineItemMutation,
1224
+ Lt as useChangeEmailMutation,
1225
+ Et as useChangePasswordMutation,
1226
+ It as useChangeProfileMutation,
1227
+ vt as useCheckoutAddresses,
1228
+ St as useCreateCustomerAddressMutation,
1229
+ wt as useCreateOrderMutation,
1230
+ kt as useDefaultBillingAddressMutation,
1231
+ Bt as useDefaultShippingAddressMutation,
1232
+ Pt as useDeleteCustomerAddressMutation,
1233
+ Dt as useDeleteCustomerMutation,
1234
+ zt as useHandlePaymentMutation,
1235
+ jt as useImitateCustomerLoginQuery,
1236
+ De as useImitateCustomerLoginQueryOptions,
1237
+ un as useIsLoggedIn,
1226
1238
  se as useListAddressQuery,
1227
1239
  ne as useListAddressQueryOptions,
1228
- It as useLoginCustomerMutation,
1229
- Lt as useLogoutCustomerMutation,
1230
- mt as useOptimistic,
1231
- vt as useOrderDetails,
1232
- ht as useOrderPayment,
1233
- Vt as useOrderSetPaymentMutation,
1234
- en as usePagination,
1235
- Yt as usePaymentMethods,
1236
- tn as useProductPrice,
1237
- nn as useProductVariantForOptions,
1238
- Qt as useReadCartQuery,
1240
+ xt as useLoginCustomerMutation,
1241
+ Ut as useLogoutCustomerMutation,
1242
+ ht as useOptimistic,
1243
+ qt as useOrderDetails,
1244
+ Ct as useOrderPayment,
1245
+ Gt as useOrderSetPaymentMutation,
1246
+ sn as usePagination,
1247
+ en as usePaymentMethods,
1248
+ rn as useProductPrice,
1249
+ an as useProductVariantForOptions,
1250
+ Ot as useReadCartQuery,
1239
1251
  me as useReadCartQueryOptions,
1240
- $t as useReadCategoryListQuery,
1241
- Ge as useReadCategoryListQueryOptions,
1242
- zt as useReadCompactProductListingQuery,
1243
- We as useReadCompactProductListingQueryOptions,
1252
+ Ht as useReadCategoryListQuery,
1253
+ We as useReadCategoryListQueryOptions,
1254
+ Wt as useReadCompactProductListingQuery,
1255
+ Xe as useReadCompactProductListingQueryOptions,
1244
1256
  k as useReadContextQuery,
1245
1257
  ae as useReadContextQueryOptions,
1246
- wt as useReadCountryQuery,
1258
+ Ft as useReadCountryQuery,
1247
1259
  Pe as useReadCountryQueryOptions,
1248
- Xe as useReadCustomProductDetailOptions,
1249
- Gt as useReadCustomProductDetailQuery,
1260
+ Ze as useReadCustomProductDetailOptions,
1261
+ Jt as useReadCustomProductDetailQuery,
1250
1262
  Re as useReadCustomerQuery,
1251
1263
  we as useReadCustomerQueryOptions,
1252
- At as useReadLanguageQuery,
1264
+ Rt as useReadLanguageQuery,
1253
1265
  Ce as useReadLanguageQueryOptions,
1254
- Et as useReadNavigationQuery,
1255
- Ne as useReadNavigationQueryOptions,
1266
+ $t as useReadNavigationQuery,
1267
+ Ee as useReadNavigationQueryOptions,
1256
1268
  ce as useReadOrderQuery,
1257
1269
  ie as useReadOrderQueryOptions,
1258
- je as useReadPaymentMethodQuery,
1259
- Ee as useReadPaymentMethodQueryOptions,
1260
- Wt as useReadProductQuery,
1261
- et as useReadProductQueryOptions,
1262
- Jt as useReadSalutationQuery,
1263
- nt as useReadSalutationQueryOptions,
1264
- Xt as useReadSeoUrlQuery,
1265
- rt as useReadSeoUrlQueryOptions,
1266
- ot as useReadShippingMethodQuery,
1267
- ut as useReadShippingMethodQueryOptions,
1268
- Tt as useRecoveryPasswordMutation,
1269
- Bt as useRegisterConfirmMutation,
1270
- xt as useRegisterCustomerMutation,
1271
- Mt as useRemoveLineItemMutation,
1272
- Ht as useSearchPageQuery,
1273
- Ze as useSearchPageQueryOptions,
1274
- Dt as useSendRecoveryMailMutation,
1275
- _t as useSeoUrl,
1276
- Zt as useShippingMethods,
1270
+ $e as useReadPaymentMethodQuery,
1271
+ Ve as useReadPaymentMethodQueryOptions,
1272
+ Yt as useReadProductQuery,
1273
+ nt as useReadProductQueryOptions,
1274
+ Zt as useReadSalutationQuery,
1275
+ rt as useReadSalutationQueryOptions,
1276
+ _t as useReadSeoUrlQuery,
1277
+ ut as useReadSeoUrlQueryOptions,
1278
+ ct as useReadShippingMethodQuery,
1279
+ it as useReadShippingMethodQueryOptions,
1280
+ Vt as useRecoveryPasswordMutation,
1281
+ Nt as useRegisterConfirmMutation,
1282
+ bt as useRegisterCustomerMutation,
1283
+ Kt as useRemoveLineItemMutation,
1284
+ Xt as useSearchPageQuery,
1285
+ et as useSearchPageQueryOptions,
1286
+ Tt as useSendRecoveryMailMutation,
1287
+ nn as useSeoUrl,
1288
+ tn as useShippingMethods,
1277
1289
  g as useShopwareQueryClient,
1278
1290
  $ as useUpdateContextMutation,
1279
- St as useUpdateCustomerAddressMutation,
1280
- Ot as useUpdateLineItemMutation,
1281
- rn as useUser
1291
+ Qt as useUpdateCustomerAddressMutation,
1292
+ At as useUpdateLineItemMutation,
1293
+ on as useUser
1282
1294
  };
package/dist/keys.d.ts CHANGED
@@ -52,6 +52,9 @@ export declare const customerKeys: {
52
52
  detail: (body: MaybeRef<unknown>) => readonly ["customer", {
53
53
  readonly body: unknown;
54
54
  }];
55
+ imitateLogin: (body: MaybeRef<unknown>) => readonly ["customer", "imitateLogin", {
56
+ readonly body: unknown;
57
+ }];
55
58
  };
56
59
  export declare const addressKeys: {
57
60
  all: () => readonly ["address"];
@@ -10,4 +10,5 @@ export * from './useDeleteCustomerMutation';
10
10
  export * from './useRegisterConfirmMutation';
11
11
  export * from './useSendRecoveryMailMutation';
12
12
  export * from './useChangePasswordMutation';
13
+ export * from './useImitateCustomerLoginQuery';
13
14
  export * from './useRecoveryPasswordMutation';
@@ -0,0 +1,17 @@
1
+ import { OperationOptions } from '../types/query';
2
+ import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-query';
3
+ import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
4
+ import { Operations } from '..';
5
+ declare const imitateCustomerLoginKey = "imitateCustomerLogin post /account/login/imitate-customer";
6
+ export declare function useImitateCustomerLoginQueryOptions(options?: OperationOptions<typeof imitateCustomerLoginKey>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "imitateCustomerLogin post /account/login/imitate-customer">, Error, BrandedResponse<Operations, "imitateCustomerLogin post /account/login/imitate-customer">, readonly ["customer", "imitateLogin", {
7
+ readonly body: unknown;
8
+ }]> & {
9
+ queryKey: readonly ["customer", "imitateLogin", {
10
+ readonly body: unknown;
11
+ }] & {
12
+ [dataTagSymbol]: BrandedResponse<Operations, "imitateCustomerLogin post /account/login/imitate-customer">;
13
+ [dataTagErrorSymbol]: Error;
14
+ };
15
+ };
16
+ export declare function useImitateCustomerLoginQuery(options?: OperationOptions<typeof imitateCustomerLoginKey>): UseQueryReturnType<BrandedResponse<Operations, "imitateCustomerLogin post /account/login/imitate-customer">, Error>;
17
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-shopware-composables",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "A collection of composables for the Shopware API",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -17,7 +17,7 @@
17
17
  "peerDependencies": {
18
18
  "@tanstack/vue-query": "^5.85.3",
19
19
  "vue": "^3.0.0",
20
- "@teamnovu/kit-shopware-api-client": "0.0.11"
20
+ "@teamnovu/kit-shopware-api-client": "0.0.13"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
package/src/keys.ts CHANGED
@@ -90,6 +90,7 @@ export const cartKeys = {
90
90
  export const customerKeys = {
91
91
  all: () => ['customer'] as const,
92
92
  detail: (body: MaybeRef<unknown>) => ['customer', { body }] as const,
93
+ imitateLogin: (body: MaybeRef<unknown>) => ['customer', 'imitateLogin', { body }] as const,
93
94
  }
94
95
 
95
96
  export const addressKeys = {
@@ -2,7 +2,7 @@ import { useMutation, useQueryClient, type UseMutationOptions } from '@tanstack/
2
2
  import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client'
3
3
  import { unref } from 'vue'
4
4
  import { useShopwareQueryClient } from '../../inject'
5
- import { cartKeys, orderKeys } from '../../keys'
5
+ import { orderKeys } from '../../keys'
6
6
  import { unrefOptions } from '../../util/unrefOptions'
7
7
  import type { OperationKey, OperationOptions, OperationResponse } from '../types/query'
8
8
 
@@ -25,9 +25,6 @@ export function useCreateOrderMutation(
25
25
  },
26
26
  onSuccess: async (data, variables, context) => {
27
27
  await Promise.all([
28
- // Clear cart after successful order creation
29
- queryClient.invalidateQueries({ queryKey: cartKeys.get() }),
30
-
31
28
  // Invalidate order list to refetch data
32
29
  queryClient.invalidateQueries({ queryKey: orderKeys.lists() }),
33
30
  ])
@@ -10,4 +10,5 @@ export * from './useDeleteCustomerMutation'
10
10
  export * from './useRegisterConfirmMutation'
11
11
  export * from './useSendRecoveryMailMutation'
12
12
  export * from './useChangePasswordMutation'
13
+ export * from './useImitateCustomerLoginQuery'
13
14
  export * from './useRecoveryPasswordMutation'
@@ -0,0 +1,28 @@
1
+ import { queryOptions, useQuery } from '@tanstack/vue-query'
2
+ import { useShopwareQueryClient } from '../../inject'
3
+ import { customerKeys } from '../../keys'
4
+ import { unrefOptions } from '../../util'
5
+ import type { OperationKey, OperationOptions } from '../types/query'
6
+ import { computed } from 'vue'
7
+
8
+ const imitateCustomerLoginKey = 'imitateCustomerLogin post /account/login/imitate-customer' satisfies OperationKey
9
+
10
+ export function useImitateCustomerLoginQueryOptions(
11
+ options?: OperationOptions<typeof imitateCustomerLoginKey>,
12
+ ) {
13
+ const client = useShopwareQueryClient()
14
+ const queryKey = customerKeys.imitateLogin(computed(() => unrefOptions(options).body ?? {}))
15
+
16
+ return queryOptions({
17
+ queryKey,
18
+ queryFn: async () => {
19
+ return client.query(imitateCustomerLoginKey, unrefOptions(options))
20
+ },
21
+ })
22
+ }
23
+
24
+ export function useImitateCustomerLoginQuery(
25
+ options?: OperationOptions<typeof imitateCustomerLoginKey>,
26
+ ) {
27
+ return useQuery(useImitateCustomerLoginQueryOptions(options))
28
+ }