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