@teamnovu/kit-shopware-composables 0.0.33 → 0.0.34

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 o, 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 v, useQuery as q, useQueryClient as Q, useMutation as h } from "@tanstack/vue-query";
3
+ import { queryOptions as h, useQuery as q, useQueryClient as C, useMutation as f } from "@tanstack/vue-query";
4
4
  import "@teamnovu/kit-shopware-api-client";
5
5
  const _ = Symbol("shopwareClient");
6
6
  function g() {
@@ -9,7 +9,7 @@ function g() {
9
9
  throw new Error("Shopware client not provided!");
10
10
  return e;
11
11
  }
12
- const A = {
12
+ const R = {
13
13
  all: () => ["context"]
14
14
  }, ee = {
15
15
  all: () => ["language"]
@@ -96,18 +96,18 @@ const A = {
96
96
  all: () => ["customer"],
97
97
  detail: (e) => ["customer", { body: e }],
98
98
  imitateLogin: (e) => ["customer", "imitateLogin", { body: e }]
99
- }, F = {
99
+ }, A = {
100
100
  all: () => ["address"],
101
- lists: () => [...F.all(), "list"],
101
+ lists: () => [...A.all(), "list"],
102
102
  list: (e) => [
103
- ...F.all(),
103
+ ...A.all(),
104
104
  "list",
105
105
  {
106
106
  body: e
107
107
  }
108
108
  ],
109
- details: () => [...F.all(), "detail"],
110
- detail: (e, s) => [...F.details(), e, ...s ? [{ body: s }] : []]
109
+ details: () => [...A.all(), "detail"],
110
+ detail: (e, s) => [...A.details(), e, ...s ? [{ body: s }] : []]
111
111
  }, D = {
112
112
  all: () => ["shippingMethod"],
113
113
  lists: () => [...D.all(), "list"],
@@ -179,11 +179,11 @@ function y(e) {
179
179
  }
180
180
  const te = "listAddress post /account/list-address";
181
181
  function ne(e) {
182
- const s = g(), t = F.list(c(() => {
182
+ const s = g(), t = A.list(c(() => {
183
183
  var n;
184
184
  return (n = y(e)) == null ? void 0 : n.body;
185
185
  }));
186
- return v({
186
+ return h({
187
187
  queryKey: t,
188
188
  queryFn: ({ signal: n }) => s.query(te, {
189
189
  ...y(e),
@@ -197,9 +197,9 @@ function se(e) {
197
197
  const V = (e) => {
198
198
  const s = e.replace(/\/?$/, "");
199
199
  return s.startsWith("/") ? s.slice(1) : s;
200
- }, St = (e) => `/${V(e)}`;
201
- function Ct(e, s, t) {
202
- const n = Q();
200
+ }, Qt = (e) => `/${V(e)}`;
201
+ function St(e, s, t) {
202
+ const n = C();
203
203
  return {
204
204
  onMutate: async (r) => {
205
205
  await n.cancelQueries({ queryKey: e });
@@ -212,8 +212,8 @@ function Ct(e, s, t) {
212
212
  },
213
213
  onError: (r, a, u) => {
214
214
  if (u && n.setQueryData(e, u.previousValue), t) {
215
- const i = o(t), f = o(i.onError);
216
- f == null || f(r, a, u);
215
+ const i = o(t), v = o(i.onError);
216
+ v == null || v(r, a, u);
217
217
  }
218
218
  },
219
219
  onSettled: (...r) => {
@@ -227,8 +227,8 @@ function Ct(e, s, t) {
227
227
  const re = "readContext get /context";
228
228
  function ae(e) {
229
229
  const s = g();
230
- return v({
231
- queryKey: A.all(),
230
+ return h({
231
+ queryKey: R.all(),
232
232
  queryFn: ({ signal: t }) => s.query(re, {
233
233
  ...y(e),
234
234
  signal: t
@@ -240,16 +240,16 @@ function B(e) {
240
240
  }
241
241
  const ue = "updateContext patch /context";
242
242
  function $(e) {
243
- const s = g(), t = Q();
244
- return h({
243
+ const s = g(), t = C();
244
+ return f({
245
245
  ...e,
246
- mutationFn: async (n) => (t.cancelQueries({ queryKey: A.all() }), s.query(ue, {
246
+ mutationFn: async (n) => (t.cancelQueries({ queryKey: R.all() }), s.query(ue, {
247
247
  body: n
248
248
  })),
249
249
  onSuccess: async (n, r, a) => {
250
250
  var u, i;
251
251
  await Promise.all([
252
- t.invalidateQueries({ queryKey: A.all() }),
252
+ t.invalidateQueries({ queryKey: R.all() }),
253
253
  t.invalidateQueries({ queryKey: L.get() }),
254
254
  t.invalidateQueries({ queryKey: b.lists() }),
255
255
  t.invalidateQueries({ queryKey: D.lists() })
@@ -257,7 +257,7 @@ function $(e) {
257
257
  }
258
258
  });
259
259
  }
260
- function Qt() {
260
+ function Ct() {
261
261
  const e = $(), s = B(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), r = async (d) => {
262
262
  await e.mutateAsync({
263
263
  billingAddressId: d.id
@@ -267,25 +267,25 @@ function Qt() {
267
267
  shippingAddressId: d.id
268
268
  }), await J(n).toBe(!1);
269
269
  }, u = c(() => {
270
- var d, M;
271
- return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeBillingAddress;
270
+ var d, K;
271
+ return (K = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : K.activeBillingAddress;
272
272
  }), i = c(() => {
273
- var d, M;
274
- return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeShippingAddress;
275
- }), f = c(() => {
273
+ var d, K;
274
+ return (K = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : K.activeShippingAddress;
275
+ }), v = c(() => {
276
276
  var d;
277
277
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
278
- (M) => {
279
- var K;
280
- return M.id !== ((K = u.value) == null ? void 0 : K.id);
278
+ (K) => {
279
+ var M;
280
+ return K.id !== ((M = u.value) == null ? void 0 : M.id);
281
281
  }
282
282
  )) ?? [];
283
283
  }), P = c(() => {
284
284
  var d;
285
285
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
286
- (M) => {
287
- var K;
288
- return M.id !== ((K = i.value) == null ? void 0 : K.id);
286
+ (K) => {
287
+ var M;
288
+ return K.id !== ((M = i.value) == null ? void 0 : M.id);
289
289
  }
290
290
  )) ?? [];
291
291
  });
@@ -298,14 +298,14 @@ function Qt() {
298
298
  isSaving: n,
299
299
  activeBillingAddress: u,
300
300
  activeShippingAddress: i,
301
- inactiveBillingAddresses: f,
301
+ inactiveBillingAddresses: v,
302
302
  inactiveShippingAddresses: P
303
303
  };
304
304
  }
305
305
  const ie = "readOrder post /order";
306
306
  function oe(e) {
307
307
  const s = g(), t = U.detail(e);
308
- return v({
308
+ return h({
309
309
  queryKey: t,
310
310
  queryFn: async ({ signal: n }) => {
311
311
  const r = y(e);
@@ -337,18 +337,18 @@ function Pt(e, s) {
337
337
  }
338
338
  };
339
339
  }), n = ce(t.value), r = c(() => {
340
- var l, m, C, x;
341
- 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];
340
+ var l, m, S, x;
341
+ return (x = (S = (m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.orders) == null ? void 0 : S.elements) == null ? void 0 : x[0];
342
342
  }), a = c(() => {
343
343
  var l, m;
344
344
  return ((m = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : m.paymentChangeable) || {};
345
345
  }), u = c(() => {
346
- var l, m, C;
347
- return (C = (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.translated) == null ? void 0 : C.name;
346
+ var l, m, S;
347
+ return (S = (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.translated) == null ? void 0 : S.name;
348
348
  }), i = c(() => {
349
349
  var l, m;
350
350
  return (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.technicalName;
351
- }), f = c(() => {
351
+ }), v = c(() => {
352
352
  var l, m;
353
353
  return (m = (l = r.value) == null ? void 0 : l.price) == null ? void 0 : m.totalPrice;
354
354
  }), P = c(() => {
@@ -357,37 +357,37 @@ function Pt(e, s) {
357
357
  }), d = c(() => {
358
358
  var l;
359
359
  return (l = r.value) == null ? void 0 : l.shippingTotal;
360
- }), M = c(() => {
361
- var l, m, C, x, z, G;
360
+ }), K = c(() => {
361
+ var l, m, S, x, z, G;
362
362
  return {
363
363
  email: (m = (l = r.value) == null ? void 0 : l.orderCustomer) == null ? void 0 : m.email,
364
- firstName: (x = (C = r.value) == null ? void 0 : C.orderCustomer) == null ? void 0 : x.firstName,
364
+ firstName: (x = (S = r.value) == null ? void 0 : S.orderCustomer) == null ? void 0 : x.firstName,
365
365
  lastName: (G = (z = r.value) == null ? void 0 : z.orderCustomer) == null ? void 0 : G.lastName
366
366
  };
367
- }), K = c(() => {
367
+ }), M = c(() => {
368
368
  var l, m;
369
369
  return (m = (l = r.value) == null ? void 0 : l.addresses) == null ? void 0 : m.find(
370
- ({ id: C }) => {
370
+ ({ id: S }) => {
371
371
  var x;
372
- return C === ((x = r.value) == null ? void 0 : x.billingAddressId);
372
+ return S === ((x = r.value) == null ? void 0 : x.billingAddressId);
373
373
  }
374
374
  );
375
375
  }), p = c(
376
376
  () => {
377
- var l, m, C;
378
- return (C = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : C.shippingOrderAddress;
377
+ var l, m, S;
378
+ return (S = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : S.shippingOrderAddress;
379
379
  }
380
- ), S = c(() => {
381
- var m, C;
380
+ ), Q = c(() => {
381
+ var m, S;
382
382
  const l = (m = r.value) == null ? void 0 : m.transactions;
383
383
  if (l != null && l.length)
384
- return (C = l.at(-1)) == null ? void 0 : C.paymentMethod;
384
+ return (S = l.at(-1)) == null ? void 0 : S.paymentMethod;
385
385
  }), w = c(() => {
386
- var m, C;
386
+ var m, S;
387
387
  const l = (m = r.value) == null ? void 0 : m.deliveries;
388
388
  if (l != null && l.length)
389
- return (C = l.at(-1)) == null ? void 0 : C.shippingMethod;
390
- }), R = c(() => {
389
+ return (S = l.at(-1)) == null ? void 0 : S.shippingMethod;
390
+ }), F = c(() => {
391
391
  var m;
392
392
  const l = o(e);
393
393
  return ((m = a.value) == null ? void 0 : m[l]) ?? !1;
@@ -396,19 +396,19 @@ function Pt(e, s) {
396
396
  order: r,
397
397
  status: u,
398
398
  statusTechnicalName: i,
399
- total: f,
399
+ total: v,
400
400
  subtotal: P,
401
401
  shippingCosts: d,
402
402
  shippingAddress: p,
403
- billingAddress: K,
404
- personalDetails: M,
403
+ billingAddress: M,
404
+ personalDetails: K,
405
405
  shippingMethod: w,
406
- paymentMethod: S,
407
- paymentChangeable: R,
406
+ paymentMethod: Q,
407
+ paymentChangeable: F,
408
408
  orderQuery: n
409
409
  };
410
410
  }
411
- function Mt(e) {
411
+ function Kt(e) {
412
412
  const s = c(() => {
413
413
  var r, a;
414
414
  return (a = (r = o(e)) == null ? void 0 : r.transactions) == null ? void 0 : a.find((u) => {
@@ -429,52 +429,52 @@ function Mt(e) {
429
429
  };
430
430
  }
431
431
  const le = "createCustomerAddress post /account/address";
432
- function Kt(e) {
433
- const s = g(), t = Q();
434
- return h({
432
+ function Mt(e) {
433
+ const s = g(), t = C();
434
+ return f({
435
435
  ...e,
436
436
  mutationFn: async (n) => s.query(le, y(n)),
437
437
  onSuccess: async (n, r, a) => {
438
438
  var u, i;
439
- await t.invalidateQueries({ queryKey: F.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
439
+ await t.invalidateQueries({ queryKey: A.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
440
440
  }
441
441
  });
442
442
  }
443
443
  const de = "deleteCustomerAddress delete /account/address/{addressId}";
444
444
  function Ot(e) {
445
- const s = g(), t = Q();
446
- return h({
445
+ const s = g(), t = C();
446
+ return f({
447
447
  ...e,
448
448
  mutationFn: async (n) => s.query(de, y(n)),
449
449
  onSuccess: async (n, r, a) => {
450
450
  var u, i;
451
- await t.invalidateQueries({ queryKey: F.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
451
+ await t.invalidateQueries({ queryKey: A.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
452
452
  }
453
453
  });
454
454
  }
455
455
  const ye = "updateCustomerAddress patch /account/address/{addressId}";
456
456
  function wt(e) {
457
- const s = g(), t = Q();
458
- return h({
457
+ const s = g(), t = C();
458
+ return f({
459
459
  ...e,
460
460
  mutationFn: async (n) => s.query(ye, y(n)),
461
461
  onSuccess: async (n, r, a) => {
462
- var i, f;
462
+ var i, v;
463
463
  const { addressId: u } = y(r).params;
464
- t.setQueryData(F.detail(u), n), await Promise.all([
465
- t.invalidateQueries({ queryKey: F.lists() }),
464
+ t.setQueryData(A.detail(u), n), await Promise.all([
465
+ t.invalidateQueries({ queryKey: A.lists() }),
466
466
  t.invalidateQueries({
467
- queryKey: F.detail(y(r).params.addressId),
467
+ queryKey: A.detail(y(r).params.addressId),
468
468
  predicate: (P) => P.queryKey.at(-1) !== u
469
469
  })
470
- ]), await ((f = o((i = o(e)) == null ? void 0 : i.onSuccess)) == null ? void 0 : f(n, r, a));
470
+ ]), await ((v = o((i = o(e)) == null ? void 0 : i.onSuccess)) == null ? void 0 : v(n, r, a));
471
471
  }
472
472
  });
473
473
  }
474
474
  const pe = "addLineItem post /checkout/cart/line-item";
475
475
  function At(e) {
476
- const s = g(), t = Q();
477
- return h({
476
+ const s = g(), t = C();
477
+ return f({
478
478
  ...e,
479
479
  mutationFn: async (n) => s.query(pe, {
480
480
  body: n
@@ -495,7 +495,7 @@ function At(e) {
495
495
  const ge = "readCart get /checkout/cart";
496
496
  function me(e) {
497
497
  const s = g(), t = L.get();
498
- return v({
498
+ return h({
499
499
  queryKey: t,
500
500
  queryFn: async ({ signal: n }) => s.query(ge, {
501
501
  ...y(e),
@@ -506,12 +506,12 @@ function me(e) {
506
506
  function Rt() {
507
507
  return q(me());
508
508
  }
509
- const fe = "removeLineItem post /checkout/cart/line-item/delete";
509
+ const ve = "removeLineItem post /checkout/cart/line-item/delete";
510
510
  function Ft(e) {
511
- const s = g(), t = Q();
512
- return h({
511
+ const s = g(), t = C();
512
+ return f({
513
513
  ...e,
514
- mutationFn: async (n) => s.query(fe, {
514
+ mutationFn: async (n) => s.query(ve, {
515
515
  body: n
516
516
  }),
517
517
  onSuccess: async (n, r, a) => {
@@ -527,12 +527,12 @@ function Ft(e) {
527
527
  }
528
528
  });
529
529
  }
530
- const he = "updateLineItem patch /checkout/cart/line-item";
530
+ const fe = "updateLineItem patch /checkout/cart/line-item";
531
531
  function Lt(e) {
532
- const s = g(), t = Q();
533
- return h({
532
+ const s = g(), t = C();
533
+ return f({
534
534
  ...e,
535
- mutationFn: async (n) => s.query(he, {
535
+ mutationFn: async (n) => s.query(fe, {
536
536
  body: n
537
537
  }),
538
538
  onSuccess: async (n, r, a) => {
@@ -541,12 +541,12 @@ function Lt(e) {
541
541
  }
542
542
  });
543
543
  }
544
- const ve = "createOrder post /checkout/order";
544
+ const he = "createOrder post /checkout/order";
545
545
  function It(e) {
546
- const s = g(), t = Q();
547
- return h({
546
+ const s = g(), t = C();
547
+ return f({
548
548
  ...e,
549
- mutationFn: async (n) => s.query(ve, y(n)),
549
+ mutationFn: async (n) => s.query(he, y(n)),
550
550
  onSuccess: async (n, r, a) => {
551
551
  var u, i;
552
552
  await Promise.all([
@@ -559,9 +559,9 @@ function It(e) {
559
559
  });
560
560
  }
561
561
  const qe = "readLanguages post /language";
562
- function Se(e) {
562
+ function Qe(e) {
563
563
  const s = g();
564
- return v({
564
+ return h({
565
565
  queryKey: ee.all(),
566
566
  queryFn: ({ signal: t }) => s.query(qe, {
567
567
  ...y(e),
@@ -570,15 +570,15 @@ function Se(e) {
570
570
  });
571
571
  }
572
572
  function xt(e) {
573
- return q(Se(e));
573
+ return q(Qe(e));
574
574
  }
575
- const Ce = "readCountry post /country", Qe = function(s) {
575
+ const Se = "readCountry post /country", Ce = function(s) {
576
576
  const t = g(), n = j.list(s);
577
- return v({
577
+ return h({
578
578
  queryKey: n,
579
579
  queryFn: async ({ signal: r }) => {
580
580
  const a = y(s);
581
- return t.query(Ce, {
581
+ return t.query(Se, {
582
582
  ...a,
583
583
  signal: r
584
584
  });
@@ -586,42 +586,42 @@ const Ce = "readCountry post /country", Qe = function(s) {
586
586
  });
587
587
  };
588
588
  function Ut(e) {
589
- return q(Qe(e));
589
+ return q(Ce(e));
590
590
  }
591
591
  const Pe = "changeEmail post /account/change-email";
592
592
  function Dt(e) {
593
- const s = g(), t = Q();
594
- return h({
593
+ const s = g(), t = C();
594
+ return f({
595
595
  ...e,
596
596
  mutationFn: async (n) => s.query(Pe, y(n)),
597
597
  onSuccess: async (n, r, a) => {
598
598
  var u, i;
599
- await t.invalidateQueries({ queryKey: I.all() }), await t.invalidateQueries({ queryKey: A.all() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
599
+ await t.invalidateQueries({ queryKey: I.all() }), await t.invalidateQueries({ queryKey: R.all() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
600
600
  }
601
601
  });
602
602
  }
603
- const Me = "changeProfile post /account/change-profile";
603
+ const Ke = "changeProfile post /account/change-profile";
604
604
  function bt(e) {
605
- const s = g(), t = Q();
606
- return h({
605
+ const s = g(), t = C();
606
+ return f({
607
607
  ...e,
608
- mutationFn: async (n) => s.query(Me, y(n)),
608
+ mutationFn: async (n) => s.query(Ke, y(n)),
609
609
  onSuccess: async (n, r, a) => {
610
610
  var u, i;
611
611
  await Promise.all([
612
612
  t.invalidateQueries({ queryKey: I.all() }),
613
- t.invalidateQueries({ queryKey: A.all() })
613
+ t.invalidateQueries({ queryKey: R.all() })
614
614
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
615
615
  }
616
616
  });
617
617
  }
618
- const Ke = "loginCustomer post /account/login";
618
+ const Me = "loginCustomer post /account/login";
619
619
  function kt(e) {
620
- const s = g(), t = Q();
621
- return h({
620
+ const s = g(), t = C();
621
+ return f({
622
622
  ...e,
623
623
  mutationFn: async (n) => {
624
- const r = await s.queryRaw(Ke, {
624
+ const r = await s.queryRaw(Me, {
625
625
  body: n
626
626
  }), a = r.headers.get("sw-context-token");
627
627
  return a && (s.contextToken = a), r.json();
@@ -629,7 +629,7 @@ function kt(e) {
629
629
  onSuccess: async (n, r, a) => {
630
630
  var u, i;
631
631
  await Promise.all([
632
- t.resetQueries({ queryKey: A.all() }),
632
+ t.resetQueries({ queryKey: R.all() }),
633
633
  t.invalidateQueries({ queryKey: L.get() }),
634
634
  t.invalidateQueries({ queryKey: I.all() })
635
635
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
@@ -638,16 +638,20 @@ function kt(e) {
638
638
  }
639
639
  const Oe = "logoutCustomer post /account/logout";
640
640
  function Bt(e) {
641
- const s = g(), t = Q();
642
- return h({
641
+ const s = g(), t = C();
642
+ return f({
643
643
  ...e,
644
644
  mutationFn: async (n) => s.query(Oe, y(n)),
645
645
  onSuccess: async (n, r, a) => {
646
646
  var u, i;
647
647
  await Promise.all([
648
- t.resetQueries({ queryKey: A.all() }),
648
+ t.resetQueries({ queryKey: R.all() }),
649
649
  t.invalidateQueries({ queryKey: L.get() }),
650
- t.invalidateQueries({ queryKey: I.all() })
650
+ t.invalidateQueries({ queryKey: I.all() }),
651
+ t.invalidateQueries({ queryKey: A.all() }),
652
+ t.invalidateQueries({ queryKey: D.all() }),
653
+ t.invalidateQueries({ queryKey: b.all() }),
654
+ t.invalidateQueries({ queryKey: U.all() })
651
655
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
652
656
  }
653
657
  });
@@ -655,7 +659,7 @@ function Bt(e) {
655
659
  const we = "readCustomer post /account/customer";
656
660
  function Ae(e) {
657
661
  const s = g(), t = I.detail(c(() => y(e).body ?? {}));
658
- return v({
662
+ return h({
659
663
  queryKey: t,
660
664
  queryFn: async () => s.query(we, y(e))
661
665
  });
@@ -665,14 +669,14 @@ function Re(e) {
665
669
  }
666
670
  const Fe = "register post /account/register";
667
671
  function Nt(e) {
668
- const s = g(), t = Q();
669
- return h({
672
+ const s = g(), t = C();
673
+ return f({
670
674
  ...e,
671
675
  mutationFn: async (n) => s.query(Fe, y(n)),
672
676
  onSuccess: async (n, r, a) => {
673
677
  var u, i;
674
678
  await Promise.all([
675
- t.resetQueries({ queryKey: A.all() }),
679
+ t.resetQueries({ queryKey: R.all() }),
676
680
  t.invalidateQueries({ queryKey: I.all() })
677
681
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
678
682
  }
@@ -680,45 +684,45 @@ function Nt(e) {
680
684
  }
681
685
  const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
682
686
  function Tt(e) {
683
- const s = g(), t = Q();
684
- return h({
687
+ const s = g(), t = C();
688
+ return f({
685
689
  ...e,
686
690
  mutationFn: async (n) => s.query(Le, y(n)),
687
691
  onSuccess: async (n, r, a) => {
688
692
  var u, i;
689
693
  await Promise.all([
690
694
  t.invalidateQueries({ queryKey: I.all() }),
691
- t.invalidateQueries({ queryKey: A.all() })
695
+ t.invalidateQueries({ queryKey: R.all() })
692
696
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
693
697
  }
694
698
  });
695
699
  }
696
700
  const Ie = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
697
701
  function Et(e) {
698
- const s = g(), t = Q();
699
- return h({
702
+ const s = g(), t = C();
703
+ return f({
700
704
  ...e,
701
705
  mutationFn: async (n) => s.query(Ie, y(n)),
702
706
  onSuccess: async (n, r, a) => {
703
707
  var u, i;
704
708
  await Promise.all([
705
709
  t.invalidateQueries({ queryKey: I.all() }),
706
- t.invalidateQueries({ queryKey: A.all() })
710
+ t.invalidateQueries({ queryKey: R.all() })
707
711
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
708
712
  }
709
713
  });
710
714
  }
711
715
  const xe = "deleteCustomer delete /account/customer";
712
716
  function jt(e) {
713
- const s = g(), t = Q();
714
- return h({
717
+ const s = g(), t = C();
718
+ return f({
715
719
  ...e,
716
720
  mutationFn: async (n) => s.query(xe, y(n)),
717
721
  onSuccess: async (n, r, a) => {
718
722
  var u, i;
719
723
  await Promise.all([
720
724
  t.resetQueries({ queryKey: I.all() }),
721
- t.resetQueries({ queryKey: A.all() }),
725
+ t.resetQueries({ queryKey: R.all() }),
722
726
  t.resetQueries({ queryKey: L.get() })
723
727
  ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
724
728
  }
@@ -727,7 +731,7 @@ function jt(e) {
727
731
  const Ue = "registerConfirm post /account/register-confirm";
728
732
  function Vt(e) {
729
733
  const s = g();
730
- return h({
734
+ return f({
731
735
  ...e,
732
736
  mutationFn: async (t) => {
733
737
  const n = await s.queryRaw(Ue, {
@@ -744,7 +748,7 @@ function Vt(e) {
744
748
  const De = "sendRecoveryMail post /account/recovery-password";
745
749
  function $t(e) {
746
750
  const s = g();
747
- return h({
751
+ return f({
748
752
  ...e,
749
753
  mutationFn: async (t) => s.query(De, y(t)),
750
754
  onSuccess: async (t, n, r) => {
@@ -756,7 +760,7 @@ function $t(e) {
756
760
  const be = "changePassword post /account/change-password";
757
761
  function zt(e) {
758
762
  const s = g();
759
- return h({
763
+ return f({
760
764
  ...e,
761
765
  mutationFn: async (t) => s.query(be, y(t)),
762
766
  onSuccess: async (t, n, r) => {
@@ -768,7 +772,7 @@ function zt(e) {
768
772
  const ke = "imitateCustomerLogin post /account/login/imitate-customer";
769
773
  function Be(e) {
770
774
  const s = g(), t = I.imitateLogin(c(() => y(e).body ?? {}));
771
- return v({
775
+ return h({
772
776
  queryKey: t,
773
777
  queryFn: async () => s.query(ke, y(e))
774
778
  });
@@ -779,7 +783,7 @@ function Gt(e) {
779
783
  const Ne = "recoveryPassword post /account/recovery-password-confirm";
780
784
  function Ht(e) {
781
785
  const s = g();
782
- return h({
786
+ return f({
783
787
  ...e,
784
788
  mutationFn: async (t) => s.query(Ne, y(t)),
785
789
  onSuccess: async (t, n, r) => {
@@ -790,15 +794,15 @@ function Ht(e) {
790
794
  }
791
795
  const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
792
796
  const r = g(), a = k.detail(s, t, n);
793
- return v({
797
+ return h({
794
798
  queryKey: a,
795
799
  queryFn: async ({ signal: u }) => {
796
- const i = o(s), f = o(t), P = y(n);
800
+ const i = o(s), v = o(t), P = y(n);
797
801
  return r.query(Te, {
798
802
  ...P,
799
803
  params: {
800
804
  activeId: i,
801
- rootId: f
805
+ rootId: v
802
806
  },
803
807
  signal: u
804
808
  });
@@ -814,7 +818,7 @@ function Ve(e) {
814
818
  var n;
815
819
  return (n = y(e)) == null ? void 0 : n.body;
816
820
  }));
817
- return v({
821
+ return h({
818
822
  queryKey: t,
819
823
  queryFn: ({ signal: n }) => s.query(je, {
820
824
  ...y(e),
@@ -827,8 +831,8 @@ function $e(e) {
827
831
  }
828
832
  const ze = "handlePaymentMethod post /handle-payment";
829
833
  function Jt(e) {
830
- const s = g(), t = Q();
831
- return h({
834
+ const s = g(), t = C();
835
+ return f({
832
836
  ...e,
833
837
  mutationFn: async (n) => s.query(ze, y(n)),
834
838
  onSuccess: async (n, r, a) => {
@@ -839,8 +843,8 @@ function Jt(e) {
839
843
  }
840
844
  const Ge = "orderSetPayment post /order/payment";
841
845
  function Xt(e) {
842
- const s = g(), t = Q();
843
- return h({
846
+ const s = g(), t = C();
847
+ return f({
844
848
  ...e,
845
849
  mutationFn: async (n) => s.query(Ge, y(n)),
846
850
  onSuccess: async (n, r, a) => {
@@ -851,7 +855,7 @@ function Xt(e) {
851
855
  }
852
856
  const He = "readCategoryList post /category", We = function(s) {
853
857
  const t = g(), n = N.list(s);
854
- return v({
858
+ return h({
855
859
  queryKey: n,
856
860
  queryFn: async ({ signal: r }) => t.query(He, {
857
861
  ...y(s),
@@ -865,7 +869,7 @@ function Yt(e) {
865
869
  const Je = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
866
870
  function Xe(e, s) {
867
871
  const t = g(), n = O.list(e, s);
868
- return v({
872
+ return h({
869
873
  queryKey: n,
870
874
  queryFn: async ({ signal: r }) => {
871
875
  const a = y(s);
@@ -886,7 +890,7 @@ function Zt(e, s) {
886
890
  const Ye = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
887
891
  function Ze(e, s) {
888
892
  const t = g(), n = O.customDetail(e, s);
889
- return v({
893
+ return h({
890
894
  queryKey: n,
891
895
  queryFn: async ({ signal: r }) => {
892
896
  const a = y(s);
@@ -907,7 +911,7 @@ function _t(e, s) {
907
911
  const _e = "searchPage post /search";
908
912
  function et(e) {
909
913
  const s = g(), t = O.search(e);
910
- return v({
914
+ return h({
911
915
  queryKey: t,
912
916
  queryFn: async ({ signal: n }) => {
913
917
  const r = y(e);
@@ -924,7 +928,7 @@ function en(e) {
924
928
  const tt = "searchSuggest post /search-suggest";
925
929
  function nt(e) {
926
930
  const s = g(), t = O.searchSuggest(e);
927
- return v({
931
+ return h({
928
932
  queryKey: t,
929
933
  queryFn: async ({ signal: n }) => {
930
934
  const r = y(e);
@@ -941,7 +945,7 @@ function tn(e) {
941
945
  const st = "readProduct post /product";
942
946
  function rt(e) {
943
947
  const s = g(), t = O.headlessDetail(e);
944
- return v({
948
+ return h({
945
949
  queryKey: t,
946
950
  queryFn: async ({ signal: n }) => {
947
951
  const r = y(e);
@@ -958,7 +962,7 @@ function nn(e) {
958
962
  const at = "readProductDetail post /product/{productId}";
959
963
  function ut(e, s) {
960
964
  const t = g(), n = O.detail(e, s);
961
- return v({
965
+ return h({
962
966
  queryKey: n,
963
967
  queryFn: async ({ signal: r }) => {
964
968
  const a = y(s);
@@ -978,7 +982,7 @@ function sn(e, s) {
978
982
  }
979
983
  const it = "readSalutation post /salutation", ot = function(s) {
980
984
  const t = g(), n = E.list(s);
981
- return v({
985
+ return h({
982
986
  queryKey: n,
983
987
  queryFn: async ({ signal: r }) => {
984
988
  const a = y(s);
@@ -994,7 +998,7 @@ function rn(e) {
994
998
  }
995
999
  const ct = "readSeoUrl post /seo-url", lt = function(s) {
996
1000
  const t = g(), n = T.list(s);
997
- return v({
1001
+ return h({
998
1002
  queryKey: n,
999
1003
  queryFn: async ({ signal: r }) => {
1000
1004
  const a = y(s);
@@ -1014,7 +1018,7 @@ function yt(e) {
1014
1018
  var n;
1015
1019
  return (n = y(e)) == null ? void 0 : n.body;
1016
1020
  }));
1017
- return v({
1021
+ return h({
1018
1022
  queryKey: t,
1019
1023
  queryFn: ({ signal: n }) => s.query(dt, {
1020
1024
  ...y(e),
@@ -1033,11 +1037,11 @@ function un() {
1033
1037
  }), n = c(() => s.isPending.value), r = async (i) => s.mutateAsync({
1034
1038
  paymentMethodId: i
1035
1039
  }), a = c(() => {
1036
- var i, f;
1037
- return (f = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : f.paymentMethod;
1040
+ var i, v;
1041
+ return (v = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : v.paymentMethod;
1038
1042
  }), u = c(() => {
1039
- var i, f, P;
1040
- return ((P = (f = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : f.elements) == null ? void 0 : P.sort((d, M) => (d.position ?? 0) - (M.position ?? 0))) ?? [];
1043
+ var i, v, P;
1044
+ return ((P = (v = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : v.elements) == null ? void 0 : P.sort((d, K) => (d.position ?? 0) - (K.position ?? 0))) ?? [];
1041
1045
  });
1042
1046
  return {
1043
1047
  contextUpdateMutation: s,
@@ -1057,11 +1061,11 @@ function on() {
1057
1061
  }), n = c(() => s.isPending.value), r = async (i) => s.mutateAsync({
1058
1062
  shippingMethodId: i
1059
1063
  }), a = c(() => {
1060
- var i, f;
1061
- return (f = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : f.shippingMethod;
1064
+ var i, v;
1065
+ return (v = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : v.shippingMethod;
1062
1066
  }), u = c(() => {
1063
- var i, f;
1064
- return ((f = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : f.elements.sort((P, d) => (P.position ?? 0) - (d.position ?? 0))) ?? [];
1067
+ var i, v;
1068
+ return ((v = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : v.elements.sort((P, d) => (P.position ?? 0) - (d.position ?? 0))) ?? [];
1065
1069
  });
1066
1070
  return {
1067
1071
  contextUpdateMutation: s,
@@ -1101,22 +1105,22 @@ function ln(e) {
1101
1105
  get() {
1102
1106
  return a.page;
1103
1107
  },
1104
- set(K) {
1105
- a.page = Math.max(1, Math.min(o(u), K));
1108
+ set(M) {
1109
+ a.page = Math.max(1, Math.min(o(u), M));
1106
1110
  }
1107
1111
  });
1108
1112
  H(
1109
1113
  [() => o(u), () => a],
1110
- ([K, p]) => {
1111
- a.page = Math.min(K, a.page), a.total = p.total ?? 0, a.limit = p.limit;
1114
+ ([M, p]) => {
1115
+ a.page = Math.min(M, a.page), a.total = p.total ?? 0, a.limit = p.limit;
1112
1116
  }
1113
1117
  );
1114
- const f = c(() => a.page === o(u)), P = c(() => a.page === 1), d = c(() => ({
1118
+ const v = c(() => a.page === o(u)), P = c(() => a.page === 1), d = c(() => ({
1115
1119
  p: a.page,
1116
1120
  limit: a.limit,
1117
1121
  "total-count-mode": a.totalCountMode ?? "none"
1118
- })), M = (K) => {
1119
- H(() => o(K), (p) => {
1122
+ })), K = (M) => {
1123
+ H(() => o(M), (p) => {
1120
1124
  p && (a.total = (p == null ? void 0 : p.total) ?? 0, a.limit = (p == null ? void 0 : p.limit) ?? 0);
1121
1125
  });
1122
1126
  };
@@ -1125,9 +1129,9 @@ function ln(e) {
1125
1129
  total: W(a, "total"),
1126
1130
  limit: W(a, "limit"),
1127
1131
  pageCount: u,
1128
- isLastPage: f,
1132
+ isLastPage: v,
1129
1133
  isFirstPage: P,
1130
- usePaginationSync: M,
1134
+ usePaginationSync: K,
1131
1135
  // This can be used to pass the pagination options directly to the query options
1132
1136
  queryOptions: d
1133
1137
  };
@@ -1149,31 +1153,31 @@ function dn(e) {
1149
1153
  return (p = e.value) == null ? void 0 : p.calculatedCheapestPrice;
1150
1154
  }), t = c(
1151
1155
  () => {
1152
- var p, S, w, R, l;
1153
- return (((S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.length) ?? 0) > 0 ? (R = (w = e.value) == null ? void 0 : w.calculatedPrices) == null ? void 0 : R[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1156
+ var p, Q, w, F, l;
1157
+ return (((Q = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : Q.length) ?? 0) > 0 ? (F = (w = e.value) == null ? void 0 : w.calculatedPrices) == null ? void 0 : F[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1154
1158
  }
1155
1159
  ), n = c(() => {
1156
1160
  var p;
1157
1161
  return (p = t == null ? void 0 : t.value) == null ? void 0 : p.referencePrice;
1158
1162
  }), r = c(() => {
1159
- var p, S;
1160
- return (((S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.length) ?? 0) > 1;
1163
+ var p, Q;
1164
+ return (((Q = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : Q.length) ?? 0) > 1;
1161
1165
  }), a = c(
1162
1166
  () => {
1163
- var p, S, w, R, l, m;
1164
- return !!((p = e.value) != null && p.parentId) && ((w = (S = e.value) == null ? void 0 : S.calculatedCheapestPrice) == null ? void 0 : w.hasRange) && ((R = t == null ? void 0 : t.value) == null ? void 0 : R.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);
1167
+ var p, Q, w, F, l, m;
1168
+ return !!((p = e.value) != null && p.parentId) && ((w = (Q = e.value) == null ? void 0 : Q.calculatedCheapestPrice) == null ? void 0 : w.hasRange) && ((F = t == null ? void 0 : t.value) == null ? void 0 : F.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);
1165
1169
  }
1166
1170
  ), u = c(
1167
1171
  () => {
1168
- var p, S;
1169
- return r.value && X(e.value).length > 1 ? (S = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : S.reduce((w, R) => R.unitPrice < w.unitPrice ? R : w) : t.value;
1172
+ var p, Q;
1173
+ return r.value && X(e.value).length > 1 ? (Q = (p = e.value) == null ? void 0 : p.calculatedPrices) == null ? void 0 : Q.reduce((w, F) => F.unitPrice < w.unitPrice ? F : w) : t.value;
1170
1174
  }
1171
1175
  ), i = c(
1172
1176
  () => {
1173
1177
  var p;
1174
1178
  return (p = u.value) == null ? void 0 : p.unitPrice;
1175
1179
  }
1176
- ), f = c(
1180
+ ), v = c(
1177
1181
  () => {
1178
1182
  var p;
1179
1183
  return (p = u.value) == null ? void 0 : p.totalPrice;
@@ -1181,24 +1185,24 @@ function dn(e) {
1181
1185
  ), P = c(
1182
1186
  () => u.value
1183
1187
  ), d = c(() => {
1184
- var p, S;
1185
- return !!((S = (p = u.value) == null ? void 0 : p.listPrice) != null && S.percentage);
1186
- }), M = c(
1188
+ var p, Q;
1189
+ return !!((Q = (p = u.value) == null ? void 0 : p.listPrice) != null && Q.percentage);
1190
+ }), K = c(
1187
1191
  () => {
1188
- var p, S, w;
1189
- return (w = (S = (p = e.value) == null ? void 0 : p.calculatedPrice) == null ? void 0 : S.regulationPrice) == null ? void 0 : w.price;
1192
+ var p, Q, w;
1193
+ return (w = (Q = (p = e.value) == null ? void 0 : p.calculatedPrice) == null ? void 0 : Q.regulationPrice) == null ? void 0 : w.price;
1190
1194
  }
1191
- ), K = c(() => X(e.value));
1195
+ ), M = c(() => X(e.value));
1192
1196
  return {
1193
1197
  price: P,
1194
- totalPrice: f,
1198
+ totalPrice: v,
1195
1199
  unitPrice: i,
1196
1200
  displayFromVariants: a,
1197
1201
  displayFrom: r,
1198
- tierPrices: K,
1202
+ tierPrices: M,
1199
1203
  referencePrice: n,
1200
1204
  isListPrice: d,
1201
- regulationPrice: M
1205
+ regulationPrice: K
1202
1206
  };
1203
1207
  }
1204
1208
  function mt(e, s) {
@@ -1248,7 +1252,7 @@ function gn(e) {
1248
1252
  var d;
1249
1253
  return ((d = t.value) == null ? void 0 : d.defaultShippingAddressId) || null;
1250
1254
  }
1251
- ), f = c(
1255
+ ), v = c(
1252
1256
  () => {
1253
1257
  var d;
1254
1258
  return ((d = t.value) == null ? void 0 : d.defaultBillingAddress) || null;
@@ -1267,18 +1271,18 @@ function gn(e) {
1267
1271
  isGuestSession: a,
1268
1272
  defaultBillingAddressId: u,
1269
1273
  defaultShippingAddressId: i,
1270
- userDefaultBillingAddress: f,
1274
+ userDefaultBillingAddress: v,
1271
1275
  userDefaultShippingAddress: P,
1272
1276
  // Expose queries and mutations directly
1273
1277
  customerQuery: s
1274
1278
  };
1275
1279
  }
1276
1280
  export {
1277
- St as absolutizeSeoUrl,
1278
- F as addressKeys,
1281
+ Qt as absolutizeSeoUrl,
1282
+ A as addressKeys,
1279
1283
  L as cartKeys,
1280
1284
  N as categoryKeys,
1281
- A as contextKeys,
1285
+ R as contextKeys,
1282
1286
  j as countryKeys,
1283
1287
  I as customerKeys,
1284
1288
  mt as getProductVariantForOptions,
@@ -1299,8 +1303,8 @@ export {
1299
1303
  Dt as useChangeEmailMutation,
1300
1304
  zt as useChangePasswordMutation,
1301
1305
  bt as useChangeProfileMutation,
1302
- Qt as useCheckoutAddresses,
1303
- Kt as useCreateCustomerAddressMutation,
1306
+ Ct as useCheckoutAddresses,
1307
+ Mt as useCreateCustomerAddressMutation,
1304
1308
  It as useCreateOrderMutation,
1305
1309
  Tt as useDefaultBillingAddressMutation,
1306
1310
  Et as useDefaultShippingAddressMutation,
@@ -1314,9 +1318,9 @@ export {
1314
1318
  ne as useListAddressQueryOptions,
1315
1319
  kt as useLoginCustomerMutation,
1316
1320
  Bt as useLogoutCustomerMutation,
1317
- Ct as useOptimistic,
1321
+ St as useOptimistic,
1318
1322
  Pt as useOrderDetails,
1319
- Mt as useOrderPayment,
1323
+ Kt as useOrderPayment,
1320
1324
  Xt as useOrderSetPaymentMutation,
1321
1325
  ln as usePagination,
1322
1326
  un as usePaymentMethods,
@@ -1331,13 +1335,13 @@ export {
1331
1335
  B as useReadContextQuery,
1332
1336
  ae as useReadContextQueryOptions,
1333
1337
  Ut as useReadCountryQuery,
1334
- Qe as useReadCountryQueryOptions,
1338
+ Ce as useReadCountryQueryOptions,
1335
1339
  Ze as useReadCustomProductDetailOptions,
1336
1340
  _t as useReadCustomProductDetailQuery,
1337
1341
  Re as useReadCustomerQuery,
1338
1342
  Ae as useReadCustomerQueryOptions,
1339
1343
  xt as useReadLanguageQuery,
1340
- Se as useReadLanguageQueryOptions,
1344
+ Qe as useReadLanguageQueryOptions,
1341
1345
  Wt as useReadNavigationQuery,
1342
1346
  Ee as useReadNavigationQueryOptions,
1343
1347
  ce as useReadOrderQuery,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-shopware-composables",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "A collection of composables for the Shopware API",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -3,7 +3,7 @@ import { useMutation, type UseMutationOptions, useQueryClient } from '@tanstack/
3
3
  import { unref } from 'vue'
4
4
  import type { OperationKey, OperationOptions, OperationResponse } from '../types/query'
5
5
  import { useShopwareQueryClient } from '../../inject'
6
- import { cartKeys, contextKeys, customerKeys } from '../../keys'
6
+ import { addressKeys, cartKeys, contextKeys, customerKeys, orderKeys, paymentKeys, shippingKeys } from '../../keys'
7
7
  import { unrefOptions } from '../../util/unrefOptions'
8
8
 
9
9
  const logoutOperation = 'logoutCustomer post /account/logout' satisfies OperationKey
@@ -28,6 +28,10 @@ export function useLogoutCustomerMutation(
28
28
  queryClient.resetQueries({ queryKey: contextKeys.all() }),
29
29
  queryClient.invalidateQueries({ queryKey: cartKeys.get() }),
30
30
  queryClient.invalidateQueries({ queryKey: customerKeys.all() }),
31
+ queryClient.invalidateQueries({ queryKey: addressKeys.all() }),
32
+ queryClient.invalidateQueries({ queryKey: shippingKeys.all() }),
33
+ queryClient.invalidateQueries({ queryKey: paymentKeys.all() }),
34
+ queryClient.invalidateQueries({ queryKey: orderKeys.all() }),
31
35
  ])
32
36
 
33
37
  await unref(unref(mutationOptions)?.onSuccess)?.(data, variables, context)