@teamnovu/kit-shopware-composables 0.0.24 → 0.0.25

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 C, useQuery as P, useQueryClient as S, useMutation as h } from "@tanstack/vue-query";
3
+ import { queryOptions as v, useQuery as q, useQueryClient as P, useMutation as h } from "@tanstack/vue-query";
4
4
  import "@teamnovu/kit-shopware-api-client";
5
5
  const _ = Symbol("shopwareClient");
6
6
  function g() {
@@ -43,20 +43,20 @@ const F = {
43
43
  body: t
44
44
  }
45
45
  ]
46
- }, A = {
46
+ }, K = {
47
47
  all: () => ["product"],
48
- lists: () => [...A.all(), "list"],
48
+ lists: () => [...K.all(), "list"],
49
49
  list: (e, s) => [
50
- ...A.all(),
50
+ ...K.all(),
51
51
  "list",
52
52
  {
53
53
  url: e,
54
54
  body: s
55
55
  }
56
56
  ],
57
- details: () => [...A.all(), "detail"],
57
+ details: () => [...K.all(), "detail"],
58
58
  customDetail: (e, s) => [
59
- ...A.details(),
59
+ ...K.details(),
60
60
  "custom",
61
61
  {
62
62
  url: e,
@@ -64,24 +64,31 @@ const F = {
64
64
  }
65
65
  ],
66
66
  headlessDetail: (e) => [
67
- ...A.details(),
67
+ ...K.details(),
68
68
  {
69
69
  body: e
70
70
  }
71
71
  ],
72
72
  detail: (e, s) => [
73
- ...A.details(),
73
+ ...K.details(),
74
74
  e,
75
75
  {
76
76
  body: s
77
77
  }
78
78
  ],
79
79
  search: (e) => [
80
- ...A.all(),
80
+ ...K.all(),
81
81
  "search",
82
82
  {
83
83
  body: e
84
84
  }
85
+ ],
86
+ searchSuggest: (e) => [
87
+ ...K.all(),
88
+ "searchSuggest",
89
+ {
90
+ body: e
91
+ }
85
92
  ]
86
93
  }, L = {
87
94
  get: () => ["cart"]
@@ -163,7 +170,7 @@ const F = {
163
170
  }
164
171
  ]
165
172
  };
166
- function p(e) {
173
+ function y(e) {
167
174
  const s = i(e);
168
175
  return Object.fromEntries(
169
176
  Object.entries(s ?? {}).map(
@@ -175,25 +182,25 @@ const te = "listAddress post /account/list-address";
175
182
  function ne(e) {
176
183
  const s = g(), t = R.list(c(() => {
177
184
  var n;
178
- return (n = p(e)) == null ? void 0 : n.body;
185
+ return (n = y(e)) == null ? void 0 : n.body;
179
186
  }));
180
- return C({
187
+ return v({
181
188
  queryKey: t,
182
189
  queryFn: ({ signal: n }) => s.query(te, {
183
- ...p(e),
190
+ ...y(e),
184
191
  signal: n
185
192
  })
186
193
  });
187
194
  }
188
195
  function se(e) {
189
- return P(ne(e));
196
+ return q(ne(e));
190
197
  }
191
198
  const V = (e) => {
192
199
  const s = e.replace(/\/?$/, "");
193
200
  return s.startsWith("/") ? s.slice(1) : s;
194
- }, vt = (e) => `/${V(e)}`;
195
- function qt(e, s, t) {
196
- const n = S();
201
+ }, St = (e) => `/${V(e)}`;
202
+ function Ct(e, s, t) {
203
+ const n = P();
197
204
  return {
198
205
  onMutate: async (r) => {
199
206
  await n.cancelQueries({ queryKey: e });
@@ -221,20 +228,20 @@ function qt(e, s, t) {
221
228
  const re = "readContext get /context";
222
229
  function ae(e) {
223
230
  const s = g();
224
- return C({
231
+ return v({
225
232
  queryKey: F.all(),
226
233
  queryFn: ({ signal: t }) => s.query(re, {
227
- ...p(e),
234
+ ...y(e),
228
235
  signal: t
229
236
  })
230
237
  });
231
238
  }
232
239
  function b(e) {
233
- return P(ae(e));
240
+ return q(ae(e));
234
241
  }
235
242
  const ue = "updateContext patch /context";
236
243
  function $(e) {
237
- const s = g(), t = S();
244
+ const s = g(), t = P();
238
245
  return h({
239
246
  ...e,
240
247
  mutationFn: async (n) => (t.cancelQueries({ queryKey: F.all() }), s.query(ue, {
@@ -249,7 +256,7 @@ function $(e) {
249
256
  }
250
257
  });
251
258
  }
252
- function Ct() {
259
+ function Pt() {
253
260
  const e = $(), s = b(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), r = async (d) => {
254
261
  await e.mutateAsync({
255
262
  billingAddressId: d.id
@@ -297,10 +304,10 @@ function Ct() {
297
304
  const oe = "readOrder post /order";
298
305
  function ie(e) {
299
306
  const s = g(), t = U.detail(e);
300
- return C({
307
+ return v({
301
308
  queryKey: t,
302
309
  queryFn: async ({ signal: n }) => {
303
- const r = p(e);
310
+ const r = y(e);
304
311
  return s.query(oe, {
305
312
  ...r,
306
313
  signal: n
@@ -309,9 +316,9 @@ function ie(e) {
309
316
  });
310
317
  }
311
318
  function ce(e) {
312
- return P(ie(e));
319
+ return q(ie(e));
313
320
  }
314
- function Pt(e, s) {
321
+ function Qt(e, s) {
315
322
  const t = c(() => {
316
323
  const l = i(e);
317
324
  if (l)
@@ -329,14 +336,14 @@ function Pt(e, s) {
329
336
  }
330
337
  };
331
338
  }), n = ce(t.value), r = c(() => {
332
- var l, m, q, x;
333
- 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];
339
+ var l, m, C, x;
340
+ return (x = (C = (m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.orders) == null ? void 0 : C.elements) == null ? void 0 : x[0];
334
341
  }), a = c(() => {
335
342
  var l, m;
336
343
  return ((m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.paymentChangeable) || {};
337
344
  }), u = c(() => {
338
- var l, m, q;
339
- return (q = (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.translated) == null ? void 0 : q.name;
345
+ var l, m, C;
346
+ return (C = (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.translated) == null ? void 0 : C.name;
340
347
  }), o = c(() => {
341
348
  var l, m;
342
349
  return (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.technicalName;
@@ -350,35 +357,35 @@ function Pt(e, s) {
350
357
  var l;
351
358
  return (l = r.value) == null ? void 0 : l.shippingTotal;
352
359
  }), M = c(() => {
353
- var l, m, q, x, z, G;
360
+ var l, m, C, x, z, G;
354
361
  return {
355
362
  email: (m = (l = r.value) == null ? void 0 : l.orderCustomer) == null ? void 0 : m.email,
356
- firstName: (x = (q = r.value) == null ? void 0 : q.orderCustomer) == null ? void 0 : x.firstName,
363
+ firstName: (x = (C = r.value) == null ? void 0 : C.orderCustomer) == null ? void 0 : x.firstName,
357
364
  lastName: (G = (z = r.value) == null ? void 0 : z.orderCustomer) == null ? void 0 : G.lastName
358
365
  };
359
366
  }), O = c(() => {
360
367
  var l, m;
361
368
  return (m = (l = r.value) == null ? void 0 : l.addresses) == null ? void 0 : m.find(
362
- ({ id: q }) => {
369
+ ({ id: C }) => {
363
370
  var x;
364
- return q === ((x = r.value) == null ? void 0 : x.billingAddressId);
371
+ return C === ((x = r.value) == null ? void 0 : x.billingAddressId);
365
372
  }
366
373
  );
367
- }), y = c(
374
+ }), p = c(
368
375
  () => {
369
- var l, m, q;
370
- return (q = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : q.shippingOrderAddress;
376
+ var l, m, C;
377
+ return (C = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : C.shippingOrderAddress;
371
378
  }
372
- ), v = c(() => {
373
- var m, q;
379
+ ), S = c(() => {
380
+ var m, C;
374
381
  const l = (m = r.value) == null ? void 0 : m.transactions;
375
382
  if (l != null && l.length)
376
- return (q = l.at(-1)) == null ? void 0 : q.paymentMethod;
377
- }), K = c(() => {
378
- var m, q;
383
+ return (C = l.at(-1)) == null ? void 0 : C.paymentMethod;
384
+ }), A = c(() => {
385
+ var m, C;
379
386
  const l = (m = r.value) == null ? void 0 : m.deliveries;
380
387
  if (l != null && l.length)
381
- return (q = l.at(-1)) == null ? void 0 : q.shippingMethod;
388
+ return (C = l.at(-1)) == null ? void 0 : C.shippingMethod;
382
389
  }), w = c(() => {
383
390
  var m;
384
391
  const l = i(e);
@@ -391,16 +398,16 @@ function Pt(e, s) {
391
398
  total: f,
392
399
  subtotal: Q,
393
400
  shippingCosts: d,
394
- shippingAddress: y,
401
+ shippingAddress: p,
395
402
  billingAddress: O,
396
403
  personalDetails: M,
397
- shippingMethod: K,
398
- paymentMethod: v,
404
+ shippingMethod: A,
405
+ paymentMethod: S,
399
406
  paymentChangeable: w,
400
407
  orderQuery: n
401
408
  };
402
409
  }
403
- function St(e) {
410
+ function Mt(e) {
404
411
  const s = c(() => {
405
412
  var r, a;
406
413
  return (a = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : a.find((u) => {
@@ -421,11 +428,11 @@ function St(e) {
421
428
  };
422
429
  }
423
430
  const le = "createCustomerAddress post /account/address";
424
- function Qt(e) {
425
- const s = g(), t = S();
431
+ function Ot(e) {
432
+ const s = g(), t = P();
426
433
  return h({
427
434
  ...e,
428
- mutationFn: async (n) => s.query(le, p(n)),
435
+ mutationFn: async (n) => s.query(le, y(n)),
429
436
  onSuccess: async (n, r, a) => {
430
437
  var u, o;
431
438
  await t.invalidateQueries({ queryKey: R.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -433,11 +440,11 @@ function Qt(e) {
433
440
  });
434
441
  }
435
442
  const de = "deleteCustomerAddress delete /account/address/{addressId}";
436
- function Mt(e) {
437
- const s = g(), t = S();
443
+ function Kt(e) {
444
+ const s = g(), t = P();
438
445
  return h({
439
446
  ...e,
440
- mutationFn: async (n) => s.query(de, p(n)),
447
+ mutationFn: async (n) => s.query(de, y(n)),
441
448
  onSuccess: async (n, r, a) => {
442
449
  var u, o;
443
450
  await t.invalidateQueries({ queryKey: R.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -445,18 +452,18 @@ function Mt(e) {
445
452
  });
446
453
  }
447
454
  const ye = "updateCustomerAddress patch /account/address/{addressId}";
448
- function Ot(e) {
449
- const s = g(), t = S();
455
+ function At(e) {
456
+ const s = g(), t = P();
450
457
  return h({
451
458
  ...e,
452
- mutationFn: async (n) => s.query(ye, p(n)),
459
+ mutationFn: async (n) => s.query(ye, y(n)),
453
460
  onSuccess: async (n, r, a) => {
454
461
  var o, f;
455
- const { addressId: u } = p(r).params;
462
+ const { addressId: u } = y(r).params;
456
463
  t.setQueryData(R.detail(u), n), await Promise.all([
457
464
  t.invalidateQueries({ queryKey: R.lists() }),
458
465
  t.invalidateQueries({
459
- queryKey: R.detail(p(r).params.addressId),
466
+ queryKey: R.detail(y(r).params.addressId),
460
467
  predicate: (Q) => Q.queryKey.at(-1) !== u
461
468
  })
462
469
  ]), await ((f = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : f(n, r, a));
@@ -464,8 +471,8 @@ function Ot(e) {
464
471
  });
465
472
  }
466
473
  const pe = "addLineItem post /checkout/cart/line-item";
467
- function Kt(e) {
468
- const s = g(), t = S();
474
+ function wt(e) {
475
+ const s = g(), t = P();
469
476
  return h({
470
477
  ...e,
471
478
  mutationFn: async (n) => s.query(pe, {
@@ -480,20 +487,20 @@ function Kt(e) {
480
487
  const ge = "readCart get /checkout/cart";
481
488
  function me(e) {
482
489
  const s = g(), t = L.get();
483
- return C({
490
+ return v({
484
491
  queryKey: t,
485
492
  queryFn: async ({ signal: n }) => s.query(ge, {
486
- ...p(e),
493
+ ...y(e),
487
494
  signal: n
488
495
  })
489
496
  });
490
497
  }
491
- function At() {
492
- return P(me());
498
+ function Rt() {
499
+ return q(me());
493
500
  }
494
501
  const fe = "removeLineItem post /checkout/cart/line-item/delete";
495
- function wt(e) {
496
- const s = g(), t = S();
502
+ function Ft(e) {
503
+ const s = g(), t = P();
497
504
  return h({
498
505
  ...e,
499
506
  mutationFn: async (n) => s.query(fe, {
@@ -506,8 +513,8 @@ function wt(e) {
506
513
  });
507
514
  }
508
515
  const he = "updateLineItem patch /checkout/cart/line-item";
509
- function Rt(e) {
510
- const s = g(), t = S();
516
+ function Lt(e) {
517
+ const s = g(), t = P();
511
518
  return h({
512
519
  ...e,
513
520
  mutationFn: async (n) => s.query(he, {
@@ -520,11 +527,11 @@ function Rt(e) {
520
527
  });
521
528
  }
522
529
  const ve = "createOrder post /checkout/order";
523
- function Ft(e) {
524
- const s = g(), t = S();
530
+ function It(e) {
531
+ const s = g(), t = P();
525
532
  return h({
526
533
  ...e,
527
- mutationFn: async (n) => s.query(ve, p(n)),
534
+ mutationFn: async (n) => s.query(ve, y(n)),
528
535
  onSuccess: async (n, r, a) => {
529
536
  var u, o;
530
537
  await Promise.all([
@@ -537,41 +544,41 @@ function Ft(e) {
537
544
  });
538
545
  }
539
546
  const qe = "readLanguages post /language";
540
- function Ce(e) {
547
+ function Se(e) {
541
548
  const s = g();
542
- return C({
549
+ return v({
543
550
  queryKey: ee.all(),
544
551
  queryFn: ({ signal: t }) => s.query(qe, {
545
- ...p(e),
552
+ ...y(e),
546
553
  signal: t
547
554
  })
548
555
  });
549
556
  }
550
- function Lt(e) {
551
- return P(Ce(e));
557
+ function xt(e) {
558
+ return q(Se(e));
552
559
  }
553
- const Pe = "readCountry post /country", Se = function(s) {
560
+ const Ce = "readCountry post /country", Pe = function(s) {
554
561
  const t = g(), n = j.list(s);
555
- return C({
562
+ return v({
556
563
  queryKey: n,
557
564
  queryFn: async ({ signal: r }) => {
558
- const a = p(s);
559
- return t.query(Pe, {
565
+ const a = y(s);
566
+ return t.query(Ce, {
560
567
  ...a,
561
568
  signal: r
562
569
  });
563
570
  }
564
571
  });
565
572
  };
566
- function It(e) {
567
- return P(Se(e));
573
+ function Ut(e) {
574
+ return q(Pe(e));
568
575
  }
569
576
  const Qe = "changeEmail post /account/change-email";
570
- function xt(e) {
571
- const s = g(), t = S();
577
+ function Dt(e) {
578
+ const s = g(), t = P();
572
579
  return h({
573
580
  ...e,
574
- mutationFn: async (n) => s.query(Qe, p(n)),
581
+ mutationFn: async (n) => s.query(Qe, y(n)),
575
582
  onSuccess: async (n, r, a) => {
576
583
  var u, o;
577
584
  await t.invalidateQueries({ queryKey: I.all() }), await t.invalidateQueries({ queryKey: F.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -579,11 +586,11 @@ function xt(e) {
579
586
  });
580
587
  }
581
588
  const Me = "changeProfile post /account/change-profile";
582
- function Ut(e) {
583
- const s = g(), t = S();
589
+ function bt(e) {
590
+ const s = g(), t = P();
584
591
  return h({
585
592
  ...e,
586
- mutationFn: async (n) => s.query(Me, p(n)),
593
+ mutationFn: async (n) => s.query(Me, y(n)),
587
594
  onSuccess: async (n, r, a) => {
588
595
  var u, o;
589
596
  await Promise.all([
@@ -594,8 +601,8 @@ function Ut(e) {
594
601
  });
595
602
  }
596
603
  const Oe = "loginCustomer post /account/login";
597
- function Dt(e) {
598
- const s = g(), t = S();
604
+ function kt(e) {
605
+ const s = g(), t = P();
599
606
  return h({
600
607
  ...e,
601
608
  mutationFn: async (n) => {
@@ -615,11 +622,11 @@ function Dt(e) {
615
622
  });
616
623
  }
617
624
  const Ke = "logoutCustomer post /account/logout";
618
- function bt(e) {
619
- const s = g(), t = S();
625
+ function Bt(e) {
626
+ const s = g(), t = P();
620
627
  return h({
621
628
  ...e,
622
- mutationFn: async (n) => s.query(Ke, p(n)),
629
+ mutationFn: async (n) => s.query(Ke, y(n)),
623
630
  onSuccess: async (n, r, a) => {
624
631
  var u, o;
625
632
  await Promise.all([
@@ -632,21 +639,21 @@ function bt(e) {
632
639
  }
633
640
  const Ae = "readCustomer post /account/customer";
634
641
  function we(e) {
635
- const s = g(), t = I.detail(c(() => p(e).body ?? {}));
636
- return C({
642
+ const s = g(), t = I.detail(c(() => y(e).body ?? {}));
643
+ return v({
637
644
  queryKey: t,
638
- queryFn: async () => s.query(Ae, p(e))
645
+ queryFn: async () => s.query(Ae, y(e))
639
646
  });
640
647
  }
641
648
  function Re(e) {
642
- return P(we(e));
649
+ return q(we(e));
643
650
  }
644
651
  const Fe = "register post /account/register";
645
- function kt(e) {
646
- const s = g(), t = S();
652
+ function Nt(e) {
653
+ const s = g(), t = P();
647
654
  return h({
648
655
  ...e,
649
- mutationFn: async (n) => s.query(Fe, p(n)),
656
+ mutationFn: async (n) => s.query(Fe, y(n)),
650
657
  onSuccess: async (n, r, a) => {
651
658
  var u, o;
652
659
  await t.invalidateQueries({ queryKey: I.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -654,11 +661,11 @@ function kt(e) {
654
661
  });
655
662
  }
656
663
  const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
657
- function Bt(e) {
658
- const s = g(), t = S();
664
+ function Tt(e) {
665
+ const s = g(), t = P();
659
666
  return h({
660
667
  ...e,
661
- mutationFn: async (n) => s.query(Le, p(n)),
668
+ mutationFn: async (n) => s.query(Le, y(n)),
662
669
  onSuccess: async (n, r, a) => {
663
670
  var u, o;
664
671
  await Promise.all([
@@ -669,11 +676,11 @@ function Bt(e) {
669
676
  });
670
677
  }
671
678
  const Ie = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
672
- function Nt(e) {
673
- const s = g(), t = S();
679
+ function Et(e) {
680
+ const s = g(), t = P();
674
681
  return h({
675
682
  ...e,
676
- mutationFn: async (n) => s.query(Ie, p(n)),
683
+ mutationFn: async (n) => s.query(Ie, y(n)),
677
684
  onSuccess: async (n, r, a) => {
678
685
  var u, o;
679
686
  await Promise.all([
@@ -684,11 +691,11 @@ function Nt(e) {
684
691
  });
685
692
  }
686
693
  const xe = "deleteCustomer delete /account/customer";
687
- function Tt(e) {
688
- const s = g(), t = S();
694
+ function jt(e) {
695
+ const s = g(), t = P();
689
696
  return h({
690
697
  ...e,
691
- mutationFn: async (n) => s.query(xe, p(n)),
698
+ mutationFn: async (n) => s.query(xe, y(n)),
692
699
  onSuccess: async (n, r, a) => {
693
700
  var u, o;
694
701
  await Promise.all([
@@ -700,7 +707,7 @@ function Tt(e) {
700
707
  });
701
708
  }
702
709
  const Ue = "registerConfirm post /account/register-confirm";
703
- function Et(e) {
710
+ function Vt(e) {
704
711
  const s = g();
705
712
  return h({
706
713
  ...e,
@@ -717,11 +724,11 @@ function Et(e) {
717
724
  });
718
725
  }
719
726
  const De = "sendRecoveryMail post /account/recovery-password";
720
- function jt(e) {
727
+ function $t(e) {
721
728
  const s = g();
722
729
  return h({
723
730
  ...e,
724
- mutationFn: async (t) => s.query(De, p(t)),
731
+ mutationFn: async (t) => s.query(De, y(t)),
725
732
  onSuccess: async (t, n, r) => {
726
733
  var a, u;
727
734
  await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
@@ -729,11 +736,11 @@ function jt(e) {
729
736
  });
730
737
  }
731
738
  const be = "changePassword post /account/change-password";
732
- function Vt(e) {
739
+ function zt(e) {
733
740
  const s = g();
734
741
  return h({
735
742
  ...e,
736
- mutationFn: async (t) => s.query(be, p(t)),
743
+ mutationFn: async (t) => s.query(be, y(t)),
737
744
  onSuccess: async (t, n, r) => {
738
745
  var a, u;
739
746
  await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
@@ -742,21 +749,21 @@ function Vt(e) {
742
749
  }
743
750
  const ke = "imitateCustomerLogin post /account/login/imitate-customer";
744
751
  function Be(e) {
745
- const s = g(), t = I.imitateLogin(c(() => p(e).body ?? {}));
746
- return C({
752
+ const s = g(), t = I.imitateLogin(c(() => y(e).body ?? {}));
753
+ return v({
747
754
  queryKey: t,
748
- queryFn: async () => s.query(ke, p(e))
755
+ queryFn: async () => s.query(ke, y(e))
749
756
  });
750
757
  }
751
- function $t(e) {
752
- return P(Be(e));
758
+ function Gt(e) {
759
+ return q(Be(e));
753
760
  }
754
761
  const Ne = "recoveryPassword post /account/recovery-password-confirm";
755
- function zt(e) {
762
+ function Ht(e) {
756
763
  const s = g();
757
764
  return h({
758
765
  ...e,
759
- mutationFn: async (t) => s.query(Ne, p(t)),
766
+ mutationFn: async (t) => s.query(Ne, y(t)),
760
767
  onSuccess: async (t, n, r) => {
761
768
  var a, u;
762
769
  await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
@@ -765,10 +772,10 @@ function zt(e) {
765
772
  }
766
773
  const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
767
774
  const r = g(), a = D.detail(s, t, n);
768
- return C({
775
+ return v({
769
776
  queryKey: a,
770
777
  queryFn: async ({ signal: u }) => {
771
- const o = i(s), f = i(t), Q = p(n);
778
+ const o = i(s), f = i(t), Q = y(n);
772
779
  return r.query(Te, {
773
780
  ...Q,
774
781
  params: {
@@ -780,32 +787,32 @@ const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(
780
787
  }
781
788
  });
782
789
  };
783
- function Gt(e, s, t) {
784
- return P(Ee(e, s, t));
790
+ function Wt(e, s, t) {
791
+ return q(Ee(e, s, t));
785
792
  }
786
793
  const je = "readPaymentMethod post /payment-method";
787
794
  function Ve(e) {
788
795
  const s = g(), t = N.list(c(() => {
789
796
  var n;
790
- return (n = p(e)) == null ? void 0 : n.body;
797
+ return (n = y(e)) == null ? void 0 : n.body;
791
798
  }));
792
- return C({
799
+ return v({
793
800
  queryKey: t,
794
801
  queryFn: ({ signal: n }) => s.query(je, {
795
- ...p(e),
802
+ ...y(e),
796
803
  signal: n
797
804
  })
798
805
  });
799
806
  }
800
807
  function $e(e) {
801
- return P(Ve(e));
808
+ return q(Ve(e));
802
809
  }
803
810
  const ze = "handlePaymentMethod post /handle-payment";
804
- function Ht(e) {
805
- const s = g(), t = S();
811
+ function Jt(e) {
812
+ const s = g(), t = P();
806
813
  return h({
807
814
  ...e,
808
- mutationFn: async (n) => s.query(ze, p(n)),
815
+ mutationFn: async (n) => s.query(ze, y(n)),
809
816
  onSuccess: async (n, r, a) => {
810
817
  var u, o;
811
818
  await t.invalidateQueries({ queryKey: L.get() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -813,11 +820,11 @@ function Ht(e) {
813
820
  });
814
821
  }
815
822
  const Ge = "orderSetPayment post /order/payment";
816
- function Wt(e) {
817
- const s = g(), t = S();
823
+ function Xt(e) {
824
+ const s = g(), t = P();
818
825
  return h({
819
826
  ...e,
820
- mutationFn: async (n) => s.query(Ge, p(n)),
827
+ mutationFn: async (n) => s.query(Ge, y(n)),
821
828
  onSuccess: async (n, r, a) => {
822
829
  var u, o;
823
830
  await t.invalidateQueries({ queryKey: U.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
@@ -826,24 +833,24 @@ function Wt(e) {
826
833
  }
827
834
  const He = "readCategoryList post /category", We = function(s) {
828
835
  const t = g(), n = k.list(s);
829
- return C({
836
+ return v({
830
837
  queryKey: n,
831
838
  queryFn: async ({ signal: r }) => t.query(He, {
832
- ...p(s),
839
+ ...y(s),
833
840
  signal: r
834
841
  })
835
842
  });
836
843
  };
837
- function Jt(e) {
838
- return P(We(e));
844
+ function Yt(e) {
845
+ return q(We(e));
839
846
  }
840
847
  const Je = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
841
848
  function Xe(e, s) {
842
- const t = g(), n = A.list(e, s);
843
- return C({
849
+ const t = g(), n = K.list(e, s);
850
+ return v({
844
851
  queryKey: n,
845
852
  queryFn: async ({ signal: r }) => {
846
- const a = p(s);
853
+ const a = y(s);
847
854
  return t.query(Je, {
848
855
  ...a,
849
856
  params: {
@@ -855,16 +862,16 @@ function Xe(e, s) {
855
862
  }
856
863
  });
857
864
  }
858
- function Xt(e, s) {
859
- return P(Xe(e, s));
865
+ function Zt(e, s) {
866
+ return q(Xe(e, s));
860
867
  }
861
868
  const Ye = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
862
869
  function Ze(e, s) {
863
- const t = g(), n = A.customDetail(e, s);
864
- return C({
870
+ const t = g(), n = K.customDetail(e, s);
871
+ return v({
865
872
  queryKey: n,
866
873
  queryFn: async ({ signal: r }) => {
867
- const a = p(s);
874
+ const a = y(s);
868
875
  return t.query(Ye, {
869
876
  ...a,
870
877
  params: {
@@ -876,16 +883,16 @@ function Ze(e, s) {
876
883
  }
877
884
  });
878
885
  }
879
- function Yt(e, s) {
880
- return P(Ze(e, s));
886
+ function _t(e, s) {
887
+ return q(Ze(e, s));
881
888
  }
882
889
  const _e = "searchPage post /search";
883
890
  function et(e) {
884
- const s = g(), t = A.search(e);
885
- return C({
891
+ const s = g(), t = K.search(e);
892
+ return v({
886
893
  queryKey: t,
887
894
  queryFn: async ({ signal: n }) => {
888
- const r = p(e);
895
+ const r = y(e);
889
896
  return s.query(_e, {
890
897
  ...r,
891
898
  signal: n
@@ -893,16 +900,16 @@ function et(e) {
893
900
  }
894
901
  });
895
902
  }
896
- function Zt(e) {
897
- return P(et(e));
903
+ function en(e) {
904
+ return q(et(e));
898
905
  }
899
- const tt = "readProduct post /product";
906
+ const tt = "searchSuggest post /search-suggest";
900
907
  function nt(e) {
901
- const s = g(), t = A.headlessDetail(e);
902
- return C({
908
+ const s = g(), t = K.searchSuggest(e);
909
+ return v({
903
910
  queryKey: t,
904
911
  queryFn: async ({ signal: n }) => {
905
- const r = p(e);
912
+ const r = y(e);
906
913
  return s.query(tt, {
907
914
  ...r,
908
915
  signal: n
@@ -910,17 +917,34 @@ function nt(e) {
910
917
  }
911
918
  });
912
919
  }
913
- function _t(e) {
914
- return P(nt(e));
920
+ function tn(e) {
921
+ return q(nt(e));
922
+ }
923
+ const st = "readProduct post /product";
924
+ function rt(e) {
925
+ const s = g(), t = K.headlessDetail(e);
926
+ return v({
927
+ queryKey: t,
928
+ queryFn: async ({ signal: n }) => {
929
+ const r = y(e);
930
+ return s.query(st, {
931
+ ...r,
932
+ signal: n
933
+ });
934
+ }
935
+ });
936
+ }
937
+ function nn(e) {
938
+ return q(rt(e));
915
939
  }
916
- const st = "readProductDetail post /product/{productId}";
917
- function rt(e, s) {
918
- const t = g(), n = A.detail(e, s);
919
- return C({
940
+ const at = "readProductDetail post /product/{productId}";
941
+ function ut(e, s) {
942
+ const t = g(), n = K.detail(e, s);
943
+ return v({
920
944
  queryKey: n,
921
945
  queryFn: async ({ signal: r }) => {
922
- const a = p(s);
923
- return t.query(st, {
946
+ const a = y(s);
947
+ return t.query(at, {
924
948
  ...a,
925
949
  params: {
926
950
  ...a.params,
@@ -931,59 +955,59 @@ function rt(e, s) {
931
955
  }
932
956
  });
933
957
  }
934
- function en(e, s) {
935
- return P(rt(e, s));
958
+ function sn(e, s) {
959
+ return q(ut(e, s));
936
960
  }
937
- const at = "readSalutation post /salutation", ut = function(s) {
961
+ const ot = "readSalutation post /salutation", it = function(s) {
938
962
  const t = g(), n = E.list(s);
939
- return C({
963
+ return v({
940
964
  queryKey: n,
941
965
  queryFn: async ({ signal: r }) => {
942
- const a = p(s);
943
- return t.query(at, {
966
+ const a = y(s);
967
+ return t.query(ot, {
944
968
  ...a,
945
969
  signal: r
946
970
  });
947
971
  }
948
972
  });
949
973
  };
950
- function tn(e) {
951
- return P(ut(e));
974
+ function rn(e) {
975
+ return q(it(e));
952
976
  }
953
- const ot = "readSeoUrl post /seo-url", it = function(s) {
977
+ const ct = "readSeoUrl post /seo-url", lt = function(s) {
954
978
  const t = g(), n = T.list(s);
955
- return C({
979
+ return v({
956
980
  queryKey: n,
957
981
  queryFn: async ({ signal: r }) => {
958
- const a = p(s);
959
- return t.query(ot, {
982
+ const a = y(s);
983
+ return t.query(ct, {
960
984
  ...a,
961
985
  signal: r
962
986
  });
963
987
  }
964
988
  });
965
989
  };
966
- function nn(e) {
967
- return P(it(e));
990
+ function an(e) {
991
+ return q(lt(e));
968
992
  }
969
- const ct = "readShippingMethod post /shipping-method";
970
- function lt(e) {
993
+ const dt = "readShippingMethod post /shipping-method";
994
+ function yt(e) {
971
995
  const s = g(), t = B.list(c(() => {
972
996
  var n;
973
- return (n = p(e)) == null ? void 0 : n.body;
997
+ return (n = y(e)) == null ? void 0 : n.body;
974
998
  }));
975
- return C({
999
+ return v({
976
1000
  queryKey: t,
977
- queryFn: ({ signal: n }) => s.query(ct, {
978
- ...p(e),
1001
+ queryFn: ({ signal: n }) => s.query(dt, {
1002
+ ...y(e),
979
1003
  signal: n
980
1004
  })
981
1005
  });
982
1006
  }
983
- function dt(e) {
984
- return P(lt(e));
1007
+ function pt(e) {
1008
+ return q(yt(e));
985
1009
  }
986
- function sn() {
1010
+ function un() {
987
1011
  const e = b(), s = $(), t = $e({
988
1012
  query: {
989
1013
  onlyAvailable: !0
@@ -1007,8 +1031,8 @@ function sn() {
1007
1031
  paymentMethods: u
1008
1032
  };
1009
1033
  }
1010
- function rn() {
1011
- const e = b(), s = $(), t = dt({
1034
+ function on() {
1035
+ const e = b(), s = $(), t = pt({
1012
1036
  query: {
1013
1037
  onlyAvailable: !0
1014
1038
  }
@@ -1031,7 +1055,7 @@ function rn() {
1031
1055
  shippingMethods: u
1032
1056
  };
1033
1057
  }
1034
- const yt = (e, s) => {
1058
+ const gt = (e, s) => {
1035
1059
  var n;
1036
1060
  const t = (n = e == null ? void 0 : e.extensions) == null ? void 0 : n.novuSeoUrls;
1037
1061
  if (Array.isArray(s)) {
@@ -1039,17 +1063,17 @@ const yt = (e, s) => {
1039
1063
  return r ? (t == null ? void 0 : t[r]) ?? "" : "";
1040
1064
  }
1041
1065
  return (t == null ? void 0 : t[s]) ?? "";
1042
- }, an = () => {
1066
+ }, cn = () => {
1043
1067
  const e = b(), s = c(() => {
1044
1068
  var t, n, r;
1045
1069
  return ((r = (n = (t = e.data) == null ? void 0 : t.value) == null ? void 0 : n.context) == null ? void 0 : r.languageIdChain) ?? [];
1046
1070
  });
1047
1071
  return (t, n) => {
1048
1072
  const r = [n, ...s.value];
1049
- return yt(i(t), i(r));
1073
+ return gt(i(t), i(r));
1050
1074
  };
1051
1075
  };
1052
- function un(e) {
1076
+ function ln(e) {
1053
1077
  const { total: s, limit: t, page: n, totalCountMode: r } = e ?? {}, a = Z({
1054
1078
  page: n ?? 1,
1055
1079
  total: s ?? 0,
@@ -1065,8 +1089,8 @@ function un(e) {
1065
1089
  });
1066
1090
  H(
1067
1091
  [() => i(u), () => a],
1068
- ([O, y]) => {
1069
- a.page = Math.min(O, a.page), a.total = y.total ?? 0, a.limit = y.limit;
1092
+ ([O, p]) => {
1093
+ a.page = Math.min(O, a.page), a.total = p.total ?? 0, a.limit = p.limit;
1070
1094
  }
1071
1095
  );
1072
1096
  const f = c(() => a.page === i(u)), Q = c(() => a.page === 1), d = c(() => ({
@@ -1074,8 +1098,8 @@ function un(e) {
1074
1098
  limit: a.limit,
1075
1099
  "total-count-mode": a.totalCountMode ?? "none"
1076
1100
  })), M = (O) => {
1077
- H(() => i(O), (y) => {
1078
- y && (a.total = (y == null ? void 0 : y.total) ?? 0, a.limit = (y == null ? void 0 : y.limit) ?? 0);
1101
+ H(() => i(O), (p) => {
1102
+ p && (a.total = (p == null ? void 0 : p.total) ?? 0, a.limit = (p == null ? void 0 : p.limit) ?? 0);
1079
1103
  });
1080
1104
  };
1081
1105
  return {
@@ -1101,50 +1125,50 @@ function X(e) {
1101
1125
  unitPrice: n
1102
1126
  }));
1103
1127
  }
1104
- function on(e) {
1128
+ function dn(e) {
1105
1129
  const s = c(() => {
1106
- var y;
1107
- return (y = e.value) == null ? void 0 : y.calculatedCheapestPrice;
1130
+ var p;
1131
+ return (p = e.value) == null ? void 0 : p.calculatedCheapestPrice;
1108
1132
  }), t = c(
1109
1133
  () => {
1110
- var y, v, K, w, l;
1111
- return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 0 ? (w = (K = e.value) == null ? void 0 : K.calculatedPrices) == null ? void 0 : w[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1134
+ var p, S, A, w, l;
1135
+ return (((S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.length) ?? 0) > 0 ? (w = (A = e.value) == null ? void 0 : A.calculatedPrices) == null ? void 0 : w[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1112
1136
  }
1113
1137
  ), n = c(() => {
1114
- var y;
1115
- return (y = t == null ? void 0 : t.value) == null ? void 0 : y.referencePrice;
1138
+ var p;
1139
+ return (p = t == null ? void 0 : t.value) == null ? void 0 : p.referencePrice;
1116
1140
  }), r = c(() => {
1117
- var y, v;
1118
- return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 1;
1141
+ var p, S;
1142
+ return (((S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.length) ?? 0) > 1;
1119
1143
  }), a = c(
1120
1144
  () => {
1121
- var y, v, K, w, l, m;
1122
- return !!((y = e.value) != null && y.parentId) && ((K = (v = e.value) == null ? void 0 : v.calculatedCheapestPrice) == null ? void 0 : K.hasRange) && ((w = t == null ? void 0 : t.value) == null ? void 0 : w.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);
1145
+ var p, S, A, w, l, m;
1146
+ return !!((p = e.value) != null && p.parentId) && ((A = (S = e.value) == null ? void 0 : S.calculatedCheapestPrice) == null ? void 0 : A.hasRange) && ((w = t == null ? void 0 : t.value) == null ? void 0 : w.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);
1123
1147
  }
1124
1148
  ), u = c(
1125
1149
  () => {
1126
- var y, v;
1127
- return r.value && X(e.value).length > 1 ? (v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.reduce((K, w) => w.unitPrice < K.unitPrice ? w : K) : t.value;
1150
+ var p, S;
1151
+ return r.value && X(e.value).length > 1 ? (S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.reduce((A, w) => w.unitPrice < A.unitPrice ? w : A) : t.value;
1128
1152
  }
1129
1153
  ), o = c(
1130
1154
  () => {
1131
- var y;
1132
- return (y = u.value) == null ? void 0 : y.unitPrice;
1155
+ var p;
1156
+ return (p = u.value) == null ? void 0 : p.unitPrice;
1133
1157
  }
1134
1158
  ), f = c(
1135
1159
  () => {
1136
- var y;
1137
- return (y = u.value) == null ? void 0 : y.totalPrice;
1160
+ var p;
1161
+ return (p = u.value) == null ? void 0 : p.totalPrice;
1138
1162
  }
1139
1163
  ), Q = c(
1140
1164
  () => u.value
1141
1165
  ), d = c(() => {
1142
- var y, v;
1143
- return !!((v = (y = u.value) == null ? void 0 : y.listPrice) != null && v.percentage);
1166
+ var p, S;
1167
+ return !!((S = (p = u.value) == null ? void 0 : p.listPrice) != null && S.percentage);
1144
1168
  }), M = c(
1145
1169
  () => {
1146
- var y, v, K;
1147
- return (K = (v = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : v.regulationPrice) == null ? void 0 : K.price;
1170
+ var p, S, A;
1171
+ return (A = (S = (p = e.value) == null ? void 0 : p.calculatedPrice) == null ? void 0 : S.regulationPrice) == null ? void 0 : A.price;
1148
1172
  }
1149
1173
  ), O = c(() => X(e.value));
1150
1174
  return {
@@ -1159,7 +1183,7 @@ function on(e) {
1159
1183
  regulationPrice: M
1160
1184
  };
1161
1185
  }
1162
- function pt(e, s) {
1186
+ function mt(e, s) {
1163
1187
  var n;
1164
1188
  const t = (n = e.extensions) == null ? void 0 : n.variants;
1165
1189
  return s.length === 0 ? (t == null ? void 0 : t.find((r) => {
@@ -1170,16 +1194,16 @@ function pt(e, s) {
1170
1194
  return (a = r.optionIds) == null ? void 0 : a.every((u) => s.includes(u));
1171
1195
  });
1172
1196
  }
1173
- function cn(e, s) {
1174
- return c(() => pt(i(e), i(s)));
1197
+ function yn(e, s) {
1198
+ return c(() => mt(i(e), i(s)));
1175
1199
  }
1176
- function ln(e) {
1200
+ function pn(e) {
1177
1201
  return c(() => {
1178
1202
  var s, t, n, r, a, u;
1179
1203
  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);
1180
1204
  });
1181
1205
  }
1182
- function dn(e) {
1206
+ function gn(e) {
1183
1207
  const s = Re(e ? { body: e } : void 0), t = c(() => {
1184
1208
  var d;
1185
1209
  return (d = s.data) == null ? void 0 : d.value;
@@ -1232,98 +1256,100 @@ function dn(e) {
1232
1256
  };
1233
1257
  }
1234
1258
  export {
1235
- vt as absolutizeSeoUrl,
1259
+ St as absolutizeSeoUrl,
1236
1260
  R as addressKeys,
1237
1261
  L as cartKeys,
1238
1262
  k as categoryKeys,
1239
1263
  F as contextKeys,
1240
1264
  j as countryKeys,
1241
1265
  I as customerKeys,
1242
- pt as getProductVariantForOptions,
1266
+ mt as getProductVariantForOptions,
1243
1267
  ee as languageKey,
1244
1268
  D as navigationKeys,
1245
1269
  U as orderKeys,
1246
1270
  N as paymentKeys,
1247
- A as productKeys,
1271
+ K as productKeys,
1248
1272
  je as readPaymentMethodOperation,
1249
- ct as readShippingMethodOperation,
1273
+ dt as readShippingMethodOperation,
1250
1274
  V as relativizeSeoUrl,
1251
1275
  E as salutationKeys,
1252
1276
  T as seoUrlKeys,
1253
1277
  B as shippingKeys,
1254
1278
  _ as shopwareClientKey,
1255
- p as unrefOptions,
1256
- Kt as useAddLineItemMutation,
1257
- xt as useChangeEmailMutation,
1258
- Vt as useChangePasswordMutation,
1259
- Ut as useChangeProfileMutation,
1260
- Ct as useCheckoutAddresses,
1261
- Qt as useCreateCustomerAddressMutation,
1262
- Ft as useCreateOrderMutation,
1263
- Bt as useDefaultBillingAddressMutation,
1264
- Nt as useDefaultShippingAddressMutation,
1265
- Mt as useDeleteCustomerAddressMutation,
1266
- Tt as useDeleteCustomerMutation,
1267
- Ht as useHandlePaymentMutation,
1268
- $t as useImitateCustomerLoginQuery,
1279
+ y as unrefOptions,
1280
+ wt as useAddLineItemMutation,
1281
+ Dt as useChangeEmailMutation,
1282
+ zt as useChangePasswordMutation,
1283
+ bt as useChangeProfileMutation,
1284
+ Pt as useCheckoutAddresses,
1285
+ Ot as useCreateCustomerAddressMutation,
1286
+ It as useCreateOrderMutation,
1287
+ Tt as useDefaultBillingAddressMutation,
1288
+ Et as useDefaultShippingAddressMutation,
1289
+ Kt as useDeleteCustomerAddressMutation,
1290
+ jt as useDeleteCustomerMutation,
1291
+ Jt as useHandlePaymentMutation,
1292
+ Gt as useImitateCustomerLoginQuery,
1269
1293
  Be as useImitateCustomerLoginQueryOptions,
1270
- ln as useIsLoggedIn,
1294
+ pn as useIsLoggedIn,
1271
1295
  se as useListAddressQuery,
1272
1296
  ne as useListAddressQueryOptions,
1273
- Dt as useLoginCustomerMutation,
1274
- bt as useLogoutCustomerMutation,
1275
- qt as useOptimistic,
1276
- Pt as useOrderDetails,
1277
- St as useOrderPayment,
1278
- Wt as useOrderSetPaymentMutation,
1279
- un as usePagination,
1280
- sn as usePaymentMethods,
1281
- on as useProductPrice,
1282
- cn as useProductVariantForOptions,
1283
- At as useReadCartQuery,
1297
+ kt as useLoginCustomerMutation,
1298
+ Bt as useLogoutCustomerMutation,
1299
+ Ct as useOptimistic,
1300
+ Qt as useOrderDetails,
1301
+ Mt as useOrderPayment,
1302
+ Xt as useOrderSetPaymentMutation,
1303
+ ln as usePagination,
1304
+ un as usePaymentMethods,
1305
+ dn as useProductPrice,
1306
+ yn as useProductVariantForOptions,
1307
+ Rt as useReadCartQuery,
1284
1308
  me as useReadCartQueryOptions,
1285
- Jt as useReadCategoryListQuery,
1309
+ Yt as useReadCategoryListQuery,
1286
1310
  We as useReadCategoryListQueryOptions,
1287
- Xt as useReadCompactProductListingQuery,
1311
+ Zt as useReadCompactProductListingQuery,
1288
1312
  Xe as useReadCompactProductListingQueryOptions,
1289
1313
  b as useReadContextQuery,
1290
1314
  ae as useReadContextQueryOptions,
1291
- It as useReadCountryQuery,
1292
- Se as useReadCountryQueryOptions,
1315
+ Ut as useReadCountryQuery,
1316
+ Pe as useReadCountryQueryOptions,
1293
1317
  Ze as useReadCustomProductDetailOptions,
1294
- Yt as useReadCustomProductDetailQuery,
1318
+ _t as useReadCustomProductDetailQuery,
1295
1319
  Re as useReadCustomerQuery,
1296
1320
  we as useReadCustomerQueryOptions,
1297
- Lt as useReadLanguageQuery,
1298
- Ce as useReadLanguageQueryOptions,
1299
- Gt as useReadNavigationQuery,
1321
+ xt as useReadLanguageQuery,
1322
+ Se as useReadLanguageQueryOptions,
1323
+ Wt as useReadNavigationQuery,
1300
1324
  Ee as useReadNavigationQueryOptions,
1301
1325
  ce as useReadOrderQuery,
1302
1326
  ie as useReadOrderQueryOptions,
1303
1327
  $e as useReadPaymentMethodQuery,
1304
1328
  Ve as useReadPaymentMethodQueryOptions,
1305
- en as useReadProductDetailQuery,
1306
- rt as useReadProductDetailQueryOptions,
1307
- _t as useReadProductQuery,
1308
- nt as useReadProductQueryOptions,
1309
- tn as useReadSalutationQuery,
1310
- ut as useReadSalutationQueryOptions,
1311
- nn as useReadSeoUrlQuery,
1312
- it as useReadSeoUrlQueryOptions,
1313
- dt as useReadShippingMethodQuery,
1314
- lt as useReadShippingMethodQueryOptions,
1315
- zt as useRecoveryPasswordMutation,
1316
- Et as useRegisterConfirmMutation,
1317
- kt as useRegisterCustomerMutation,
1318
- wt as useRemoveLineItemMutation,
1319
- Zt as useSearchPageQuery,
1329
+ sn as useReadProductDetailQuery,
1330
+ ut as useReadProductDetailQueryOptions,
1331
+ nn as useReadProductQuery,
1332
+ rt as useReadProductQueryOptions,
1333
+ rn as useReadSalutationQuery,
1334
+ it as useReadSalutationQueryOptions,
1335
+ an as useReadSeoUrlQuery,
1336
+ lt as useReadSeoUrlQueryOptions,
1337
+ pt as useReadShippingMethodQuery,
1338
+ yt as useReadShippingMethodQueryOptions,
1339
+ Ht as useRecoveryPasswordMutation,
1340
+ Vt as useRegisterConfirmMutation,
1341
+ Nt as useRegisterCustomerMutation,
1342
+ Ft as useRemoveLineItemMutation,
1343
+ en as useSearchPageQuery,
1320
1344
  et as useSearchPageQueryOptions,
1321
- jt as useSendRecoveryMailMutation,
1322
- an as useSeoUrl,
1323
- rn as useShippingMethods,
1345
+ tn as useSearchSuggestQuery,
1346
+ nt as useSearchSuggestQueryOptions,
1347
+ $t as useSendRecoveryMailMutation,
1348
+ cn as useSeoUrl,
1349
+ on as useShippingMethods,
1324
1350
  g as useShopwareQueryClient,
1325
1351
  $ as useUpdateContextMutation,
1326
- Ot as useUpdateCustomerAddressMutation,
1327
- Rt as useUpdateLineItemMutation,
1328
- dn as useUser
1352
+ At as useUpdateCustomerAddressMutation,
1353
+ Lt as useUpdateLineItemMutation,
1354
+ gn as useUser
1329
1355
  };
package/dist/keys.d.ts CHANGED
@@ -46,6 +46,9 @@ export declare const productKeys: {
46
46
  search: (body: MaybeRef<unknown>) => readonly ["product", "search", {
47
47
  readonly body: unknown;
48
48
  }];
49
+ searchSuggest: (body: MaybeRef<unknown>) => readonly ["product", "searchSuggest", {
50
+ readonly body: unknown;
51
+ }];
49
52
  };
50
53
  export declare const cartKeys: {
51
54
  get: () => readonly ["cart"];
@@ -2,5 +2,6 @@ export * from './useReadCategoryListQuery';
2
2
  export * from './useReadCompactProductListingQuery';
3
3
  export * from './useReadCustomProductDetailQuery';
4
4
  export * from './useSearchPageQuery';
5
+ export * from './useSearchSuggestQuery';
5
6
  export * from './useReadProductQuery';
6
7
  export * from './useReadProductDetailQuery';
@@ -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 searchSuggestOperation = "searchSuggest post /search-suggest";
6
+ export declare function useSearchSuggestQueryOptions(body?: OperationOptions<typeof searchSuggestOperation, 'params'>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "searchSuggest post /search-suggest">, Error, BrandedResponse<Operations, "searchSuggest post /search-suggest">, readonly ["product", "searchSuggest", {
7
+ readonly body: unknown;
8
+ }]> & {
9
+ queryKey: readonly ["product", "searchSuggest", {
10
+ readonly body: unknown;
11
+ }] & {
12
+ [dataTagSymbol]: BrandedResponse<Operations, "searchSuggest post /search-suggest">;
13
+ [dataTagErrorSymbol]: Error;
14
+ };
15
+ };
16
+ export declare function useSearchSuggestQuery(body?: OperationOptions<typeof searchSuggestOperation, 'params'>): UseQueryReturnType<BrandedResponse<Operations, "searchSuggest post /search-suggest">, Error>;
17
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-shopware-composables",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "A collection of composables for the Shopware API",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
package/src/keys.ts CHANGED
@@ -89,6 +89,14 @@ export const productKeys = {
89
89
  body,
90
90
  },
91
91
  ] as const,
92
+ searchSuggest: (body: MaybeRef<unknown>) =>
93
+ [
94
+ ...productKeys.all(),
95
+ 'searchSuggest',
96
+ {
97
+ body,
98
+ },
99
+ ] as const,
92
100
  }
93
101
 
94
102
  export const cartKeys = {
@@ -2,5 +2,6 @@ export * from './useReadCategoryListQuery'
2
2
  export * from './useReadCompactProductListingQuery'
3
3
  export * from './useReadCustomProductDetailQuery'
4
4
  export * from './useSearchPageQuery'
5
+ export * from './useSearchSuggestQuery'
5
6
  export * from './useReadProductQuery'
6
7
  export * from './useReadProductDetailQuery'
@@ -0,0 +1,31 @@
1
+ import { queryOptions, useQuery } from '@tanstack/vue-query'
2
+ import { useShopwareQueryClient } from '../../inject'
3
+ import { productKeys } from '../../keys'
4
+ import { unrefOptions } from '../../util/unrefOptions'
5
+ import type { OperationKey, OperationOptions } from '../types/query'
6
+
7
+ const searchSuggestOperation = 'searchSuggest post /search-suggest' satisfies OperationKey
8
+
9
+ export function useSearchSuggestQueryOptions(
10
+ body?: OperationOptions<typeof searchSuggestOperation, 'params'>,
11
+ ) {
12
+ const client = useShopwareQueryClient()
13
+ const queryKey = productKeys.searchSuggest(body)
14
+
15
+ return queryOptions({
16
+ queryKey,
17
+ queryFn: async ({ signal }) => {
18
+ const opts = unrefOptions(body)
19
+ return client.query(searchSuggestOperation, {
20
+ ...opts,
21
+ signal,
22
+ })
23
+ },
24
+ })
25
+ }
26
+
27
+ export function useSearchSuggestQuery(
28
+ body?: OperationOptions<typeof searchSuggestOperation, 'params'>,
29
+ ) {
30
+ return useQuery(useSearchSuggestQueryOptions(body))
31
+ }