@teamnovu/kit-shopware-composables 0.0.9 → 0.0.11
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/helpers/general/useSeoUrl.d.ts +1 -3
- package/dist/index.mjs +396 -365
- package/dist/inject.d.ts +1 -1
- package/dist/keys.d.ts +3 -0
- package/dist/query/context/index.d.ts +1 -0
- package/dist/query/context/useReadLanguageQuery.d.ts +13 -0
- package/package.json +2 -2
- package/src/helpers/general/useSeoUrl.ts +15 -5
- package/src/inject.ts +1 -1
- package/src/keys.ts +4 -0
- package/src/query/context/index.ts +1 -0
- package/src/query/context/useReadLanguageQuery.ts +28 -0
- package/src/query/customer/useLoginCustomerMutation.ts +1 -1
- package/src/query/customer/useRegisterConfirmMutation.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
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 Q, useQuery as M, useQueryClient as S, useMutation as f } from "@tanstack/vue-query";
|
|
4
4
|
import "@teamnovu/kit-shopware-api-client";
|
|
5
5
|
const _ = Symbol("shopwareClient");
|
|
6
|
-
function
|
|
6
|
+
function m() {
|
|
7
7
|
const e = Y(_);
|
|
8
8
|
if (!e)
|
|
9
9
|
throw new Error("Shopware client not provided!");
|
|
10
10
|
return e;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const R = {
|
|
13
13
|
all: () => ["context"]
|
|
14
|
-
},
|
|
14
|
+
}, ee = {
|
|
15
|
+
all: () => ["language"]
|
|
16
|
+
}, B = {
|
|
15
17
|
all: () => ["category"],
|
|
16
|
-
lists: () => [...
|
|
18
|
+
lists: () => [...B.all(), "list"],
|
|
17
19
|
list: (e) => [
|
|
18
|
-
...
|
|
20
|
+
...B.all(),
|
|
19
21
|
"list",
|
|
20
22
|
{
|
|
21
23
|
body: e
|
|
@@ -70,7 +72,7 @@ const F = {
|
|
|
70
72
|
]
|
|
71
73
|
}, x = {
|
|
72
74
|
get: () => ["cart"]
|
|
73
|
-
},
|
|
75
|
+
}, F = {
|
|
74
76
|
all: () => ["customer"],
|
|
75
77
|
detail: (e) => ["customer", { body: e }]
|
|
76
78
|
}, w = {
|
|
@@ -85,21 +87,21 @@ const F = {
|
|
|
85
87
|
],
|
|
86
88
|
details: () => [...w.all(), "detail"],
|
|
87
89
|
detail: (e, s) => [...w.details(), e, ...s ? [{ body: s }] : []]
|
|
88
|
-
},
|
|
90
|
+
}, N = {
|
|
89
91
|
all: () => ["shippingMethod"],
|
|
90
|
-
lists: () => [...
|
|
92
|
+
lists: () => [...N.all(), "list"],
|
|
91
93
|
list: (e) => [
|
|
92
|
-
...
|
|
94
|
+
...N.all(),
|
|
93
95
|
"list",
|
|
94
96
|
{
|
|
95
97
|
body: e
|
|
96
98
|
}
|
|
97
99
|
]
|
|
98
|
-
},
|
|
100
|
+
}, D = {
|
|
99
101
|
all: () => ["paymentMethod"],
|
|
100
|
-
lists: () => [...
|
|
102
|
+
lists: () => [...D.all(), "list"],
|
|
101
103
|
list: (e) => [
|
|
102
|
-
...
|
|
104
|
+
...D.all(),
|
|
103
105
|
"list",
|
|
104
106
|
{
|
|
105
107
|
body: e
|
|
@@ -116,38 +118,38 @@ const F = {
|
|
|
116
118
|
body: e
|
|
117
119
|
}
|
|
118
120
|
]
|
|
119
|
-
},
|
|
121
|
+
}, E = {
|
|
120
122
|
all: () => ["seoUrl"],
|
|
121
|
-
lists: () => [...
|
|
123
|
+
lists: () => [...E.all(), "list"],
|
|
122
124
|
list: (e) => [
|
|
123
|
-
...
|
|
125
|
+
...E.all(),
|
|
124
126
|
"list",
|
|
125
127
|
{
|
|
126
128
|
body: e
|
|
127
129
|
}
|
|
128
130
|
]
|
|
129
|
-
},
|
|
131
|
+
}, j = {
|
|
130
132
|
all: () => ["salutation"],
|
|
131
|
-
lists: () => [...
|
|
133
|
+
lists: () => [...j.all(), "list"],
|
|
132
134
|
list: (e) => [
|
|
133
|
-
...
|
|
135
|
+
...j.all(),
|
|
134
136
|
"list",
|
|
135
137
|
{
|
|
136
138
|
body: e
|
|
137
139
|
}
|
|
138
140
|
]
|
|
139
|
-
},
|
|
141
|
+
}, T = {
|
|
140
142
|
all: () => ["country"],
|
|
141
|
-
lists: () => [...
|
|
143
|
+
lists: () => [...T.all(), "list"],
|
|
142
144
|
list: (e) => [
|
|
143
|
-
...
|
|
145
|
+
...T.all(),
|
|
144
146
|
"list",
|
|
145
147
|
{
|
|
146
148
|
body: e
|
|
147
149
|
}
|
|
148
150
|
]
|
|
149
151
|
};
|
|
150
|
-
function
|
|
152
|
+
function g(e) {
|
|
151
153
|
const s = i(e);
|
|
152
154
|
return Object.fromEntries(
|
|
153
155
|
Object.entries(s ?? {}).map(
|
|
@@ -155,28 +157,28 @@ function m(e) {
|
|
|
155
157
|
)
|
|
156
158
|
);
|
|
157
159
|
}
|
|
158
|
-
const
|
|
159
|
-
function
|
|
160
|
-
const s =
|
|
160
|
+
const te = "listAddress post /account/list-address";
|
|
161
|
+
function ne(e) {
|
|
162
|
+
const s = m(), t = w.list(c(() => {
|
|
161
163
|
var n;
|
|
162
|
-
return (n =
|
|
164
|
+
return (n = g(e)) == null ? void 0 : n.body;
|
|
163
165
|
}));
|
|
164
|
-
return
|
|
166
|
+
return Q({
|
|
165
167
|
queryKey: t,
|
|
166
|
-
queryFn: ({ signal: n }) => s.query(
|
|
167
|
-
...
|
|
168
|
+
queryFn: ({ signal: n }) => s.query(te, {
|
|
169
|
+
...g(e),
|
|
168
170
|
signal: n
|
|
169
171
|
})
|
|
170
172
|
});
|
|
171
173
|
}
|
|
172
|
-
function
|
|
173
|
-
return
|
|
174
|
+
function se(e) {
|
|
175
|
+
return M(ne(e));
|
|
174
176
|
}
|
|
175
|
-
const
|
|
177
|
+
const V = (e) => {
|
|
176
178
|
const s = e.replace(/\/?$/, "");
|
|
177
179
|
return s.startsWith("/") ? s.slice(1) : s;
|
|
178
|
-
},
|
|
179
|
-
function
|
|
180
|
+
}, pt = (e) => `/${V(e)}`;
|
|
181
|
+
function gt(e, s, t) {
|
|
180
182
|
const n = S();
|
|
181
183
|
return {
|
|
182
184
|
onMutate: async (a) => {
|
|
@@ -202,43 +204,43 @@ function dt(e, s, t) {
|
|
|
202
204
|
}
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
|
-
const
|
|
207
|
+
const re = (e) => {
|
|
206
208
|
var t, n, a, r;
|
|
207
209
|
const s = (n = (t = i(e)) == null ? void 0 : t.transactions) == null ? void 0 : n.find((u) => {
|
|
208
210
|
var o;
|
|
209
211
|
return (o = u.paymentMethod) == null ? void 0 : o.active;
|
|
210
212
|
});
|
|
211
213
|
return ((a = s == null ? void 0 : s.paymentMethod) == null ? void 0 : a.asynchronous) && ((r = s == null ? void 0 : s.paymentMethod) == null ? void 0 : r.afterOrderEnabled);
|
|
212
|
-
},
|
|
213
|
-
function
|
|
214
|
-
const s =
|
|
215
|
-
return
|
|
216
|
-
queryKey:
|
|
217
|
-
queryFn: ({ signal: t }) => s.query(
|
|
218
|
-
...
|
|
214
|
+
}, ae = "readContext get /context";
|
|
215
|
+
function ue(e) {
|
|
216
|
+
const s = m();
|
|
217
|
+
return Q({
|
|
218
|
+
queryKey: R.all(),
|
|
219
|
+
queryFn: ({ signal: t }) => s.query(ae, {
|
|
220
|
+
...g(e),
|
|
219
221
|
signal: t
|
|
220
222
|
})
|
|
221
223
|
});
|
|
222
224
|
}
|
|
223
|
-
function
|
|
224
|
-
return
|
|
225
|
+
function k(e) {
|
|
226
|
+
return M(ue(e));
|
|
225
227
|
}
|
|
226
|
-
const
|
|
228
|
+
const oe = "updateContext patch /context";
|
|
227
229
|
function $(e) {
|
|
228
|
-
const s =
|
|
230
|
+
const s = m(), t = S();
|
|
229
231
|
return f({
|
|
230
232
|
...e,
|
|
231
|
-
mutationFn: async (n) => (t.cancelQueries({ queryKey:
|
|
233
|
+
mutationFn: async (n) => (t.cancelQueries({ queryKey: R.all() }), s.query(oe, {
|
|
232
234
|
body: n
|
|
233
235
|
})),
|
|
234
236
|
onSuccess: async (n, a, r) => {
|
|
235
237
|
var u, o;
|
|
236
|
-
await t.invalidateQueries({ queryKey:
|
|
238
|
+
await t.invalidateQueries({ queryKey: R.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
237
239
|
}
|
|
238
240
|
});
|
|
239
241
|
}
|
|
240
|
-
function
|
|
241
|
-
const e = $(), s =
|
|
242
|
+
function mt() {
|
|
243
|
+
const e = $(), s = k(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), a = async (d) => {
|
|
242
244
|
await e.mutateAsync({
|
|
243
245
|
billingAddressId: d.id
|
|
244
246
|
}), await J(n).toBe(!1);
|
|
@@ -256,16 +258,16 @@ function yt() {
|
|
|
256
258
|
var d;
|
|
257
259
|
return ((d = t.data.value) == null ? void 0 : d.elements.filter(
|
|
258
260
|
(P) => {
|
|
259
|
-
var
|
|
260
|
-
return P.id !== ((
|
|
261
|
+
var O;
|
|
262
|
+
return P.id !== ((O = u.value) == null ? void 0 : O.id);
|
|
261
263
|
}
|
|
262
264
|
)) ?? [];
|
|
263
265
|
}), C = c(() => {
|
|
264
266
|
var d;
|
|
265
267
|
return ((d = t.data.value) == null ? void 0 : d.elements.filter(
|
|
266
268
|
(P) => {
|
|
267
|
-
var
|
|
268
|
-
return P.id !== ((
|
|
269
|
+
var O;
|
|
270
|
+
return P.id !== ((O = o.value) == null ? void 0 : O.id);
|
|
269
271
|
}
|
|
270
272
|
)) ?? [];
|
|
271
273
|
});
|
|
@@ -282,24 +284,24 @@ function yt() {
|
|
|
282
284
|
inactiveShippingAddresses: C
|
|
283
285
|
};
|
|
284
286
|
}
|
|
285
|
-
const
|
|
286
|
-
function
|
|
287
|
-
const s =
|
|
288
|
-
return
|
|
287
|
+
const ie = "readOrder post /order";
|
|
288
|
+
function ce(e) {
|
|
289
|
+
const s = m(), t = U.detail(e);
|
|
290
|
+
return Q({
|
|
289
291
|
queryKey: t,
|
|
290
292
|
queryFn: async ({ signal: n }) => {
|
|
291
|
-
const a =
|
|
292
|
-
return s.query(
|
|
293
|
+
const a = g(e);
|
|
294
|
+
return s.query(ie, {
|
|
293
295
|
...a,
|
|
294
296
|
signal: n
|
|
295
297
|
});
|
|
296
298
|
}
|
|
297
299
|
});
|
|
298
300
|
}
|
|
299
|
-
function
|
|
300
|
-
return
|
|
301
|
+
function le(e) {
|
|
302
|
+
return M(ce(e));
|
|
301
303
|
}
|
|
302
|
-
function
|
|
304
|
+
function ht(e, s) {
|
|
303
305
|
const t = c(() => {
|
|
304
306
|
const l = i(e);
|
|
305
307
|
if (l)
|
|
@@ -316,7 +318,7 @@ function pt(e, s) {
|
|
|
316
318
|
checkPromotion: !0
|
|
317
319
|
}
|
|
318
320
|
};
|
|
319
|
-
}), n =
|
|
321
|
+
}), n = le(t.value), a = c(() => {
|
|
320
322
|
var l, p, q, I;
|
|
321
323
|
return (I = (q = (p = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : p.orders) == null ? void 0 : q.elements) == null ? void 0 : I[0];
|
|
322
324
|
}), r = c(() => {
|
|
@@ -344,7 +346,7 @@ function pt(e, s) {
|
|
|
344
346
|
firstName: (I = (q = a.value) == null ? void 0 : q.orderCustomer) == null ? void 0 : I.firstName,
|
|
345
347
|
lastName: (G = (z = a.value) == null ? void 0 : z.orderCustomer) == null ? void 0 : G.lastName
|
|
346
348
|
};
|
|
347
|
-
}),
|
|
349
|
+
}), O = c(() => {
|
|
348
350
|
var l, p;
|
|
349
351
|
return (p = (l = a.value) == null ? void 0 : l.addresses) == null ? void 0 : p.find(
|
|
350
352
|
({ id: q }) => {
|
|
@@ -380,7 +382,7 @@ function pt(e, s) {
|
|
|
380
382
|
subtotal: C,
|
|
381
383
|
shippingCosts: d,
|
|
382
384
|
shippingAddress: y,
|
|
383
|
-
billingAddress:
|
|
385
|
+
billingAddress: O,
|
|
384
386
|
personalDetails: P,
|
|
385
387
|
shippingMethod: A,
|
|
386
388
|
paymentMethod: v,
|
|
@@ -388,7 +390,7 @@ function pt(e, s) {
|
|
|
388
390
|
orderQuery: n
|
|
389
391
|
};
|
|
390
392
|
}
|
|
391
|
-
function
|
|
393
|
+
function ft(e) {
|
|
392
394
|
const s = c(() => {
|
|
393
395
|
var r, u;
|
|
394
396
|
return (u = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : u.find((o) => {
|
|
@@ -403,61 +405,61 @@ function mt(e) {
|
|
|
403
405
|
return (r = s.value) == null ? void 0 : r.stateMachineState;
|
|
404
406
|
});
|
|
405
407
|
return {
|
|
406
|
-
isAsynchronous: c(() =>
|
|
408
|
+
isAsynchronous: c(() => re(e)),
|
|
407
409
|
activeTransaction: s,
|
|
408
410
|
state: n,
|
|
409
411
|
paymentMethod: t
|
|
410
412
|
};
|
|
411
413
|
}
|
|
412
|
-
const
|
|
413
|
-
function
|
|
414
|
-
const s =
|
|
414
|
+
const de = "createCustomerAddress post /account/address";
|
|
415
|
+
function vt(e) {
|
|
416
|
+
const s = m(), t = S();
|
|
415
417
|
return f({
|
|
416
418
|
...e,
|
|
417
|
-
mutationFn: async (n) => s.query(
|
|
419
|
+
mutationFn: async (n) => s.query(de, g(n)),
|
|
418
420
|
onSuccess: async (n, a, r) => {
|
|
419
421
|
var u, o;
|
|
420
422
|
await t.invalidateQueries({ queryKey: w.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
421
423
|
}
|
|
422
424
|
});
|
|
423
425
|
}
|
|
424
|
-
const
|
|
425
|
-
function
|
|
426
|
-
const s =
|
|
426
|
+
const ye = "deleteCustomerAddress delete /account/address/{addressId}";
|
|
427
|
+
function qt(e) {
|
|
428
|
+
const s = m(), t = S();
|
|
427
429
|
return f({
|
|
428
430
|
...e,
|
|
429
|
-
mutationFn: async (n) => s.query(
|
|
431
|
+
mutationFn: async (n) => s.query(ye, g(n)),
|
|
430
432
|
onSuccess: async (n, a, r) => {
|
|
431
433
|
var u, o;
|
|
432
434
|
await t.invalidateQueries({ queryKey: w.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
433
435
|
}
|
|
434
436
|
});
|
|
435
437
|
}
|
|
436
|
-
const
|
|
437
|
-
function
|
|
438
|
-
const s =
|
|
438
|
+
const pe = "updateCustomerAddress patch /account/address/{addressId}";
|
|
439
|
+
function Ct(e) {
|
|
440
|
+
const s = m(), t = S();
|
|
439
441
|
return f({
|
|
440
442
|
...e,
|
|
441
|
-
mutationFn: async (n) => s.query(
|
|
443
|
+
mutationFn: async (n) => s.query(pe, g(n)),
|
|
442
444
|
onSuccess: async (n, a, r) => {
|
|
443
445
|
var o, h;
|
|
444
|
-
const { addressId: u } =
|
|
446
|
+
const { addressId: u } = g(a).params;
|
|
445
447
|
t.setQueryData(w.detail(u), n), await Promise.all([
|
|
446
448
|
t.invalidateQueries({ queryKey: w.lists() }),
|
|
447
449
|
t.invalidateQueries({
|
|
448
|
-
queryKey: w.detail(
|
|
450
|
+
queryKey: w.detail(g(a).params.addressId),
|
|
449
451
|
predicate: (C) => C.queryKey.at(-1) !== u
|
|
450
452
|
})
|
|
451
453
|
]), await ((h = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : h(n, a, r));
|
|
452
454
|
}
|
|
453
455
|
});
|
|
454
456
|
}
|
|
455
|
-
const
|
|
456
|
-
function
|
|
457
|
-
const s =
|
|
457
|
+
const ge = "addLineItem post /checkout/cart/line-item";
|
|
458
|
+
function St(e) {
|
|
459
|
+
const s = m(), t = S();
|
|
458
460
|
return f({
|
|
459
461
|
...e,
|
|
460
|
-
mutationFn: async (n) => s.query(
|
|
462
|
+
mutationFn: async (n) => s.query(ge, {
|
|
461
463
|
body: n
|
|
462
464
|
}),
|
|
463
465
|
onSuccess: async (n, a, r) => {
|
|
@@ -467,25 +469,25 @@ function vt(e) {
|
|
|
467
469
|
});
|
|
468
470
|
}
|
|
469
471
|
const me = "readCart get /checkout/cart";
|
|
470
|
-
function
|
|
471
|
-
const s =
|
|
472
|
-
return
|
|
472
|
+
function he(e) {
|
|
473
|
+
const s = m(), t = x.get();
|
|
474
|
+
return Q({
|
|
473
475
|
queryKey: t,
|
|
474
476
|
queryFn: async ({ signal: n }) => s.query(me, {
|
|
475
|
-
...
|
|
477
|
+
...g(e),
|
|
476
478
|
signal: n
|
|
477
479
|
})
|
|
478
480
|
});
|
|
479
481
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
482
|
+
function Pt() {
|
|
483
|
+
return M(he());
|
|
482
484
|
}
|
|
483
|
-
const
|
|
484
|
-
function
|
|
485
|
-
const s =
|
|
485
|
+
const fe = "removeLineItem post /checkout/cart/line-item/delete";
|
|
486
|
+
function Qt(e) {
|
|
487
|
+
const s = m(), t = S();
|
|
486
488
|
return f({
|
|
487
489
|
...e,
|
|
488
|
-
mutationFn: async (n) => s.query(
|
|
490
|
+
mutationFn: async (n) => s.query(fe, {
|
|
489
491
|
body: n
|
|
490
492
|
}),
|
|
491
493
|
onSuccess: async (n, a, r) => {
|
|
@@ -494,12 +496,12 @@ function Ct(e) {
|
|
|
494
496
|
}
|
|
495
497
|
});
|
|
496
498
|
}
|
|
497
|
-
const
|
|
498
|
-
function
|
|
499
|
-
const s =
|
|
499
|
+
const ve = "updateLineItem patch /checkout/cart/line-item";
|
|
500
|
+
function Mt(e) {
|
|
501
|
+
const s = m(), t = S();
|
|
500
502
|
return f({
|
|
501
503
|
...e,
|
|
502
|
-
mutationFn: async (n) => s.query(
|
|
504
|
+
mutationFn: async (n) => s.query(ve, {
|
|
503
505
|
body: n
|
|
504
506
|
}),
|
|
505
507
|
onSuccess: async (n, a, r) => {
|
|
@@ -508,12 +510,12 @@ function St(e) {
|
|
|
508
510
|
}
|
|
509
511
|
});
|
|
510
512
|
}
|
|
511
|
-
const
|
|
512
|
-
function
|
|
513
|
-
const s =
|
|
513
|
+
const qe = "createOrder post /checkout/order";
|
|
514
|
+
function Ot(e) {
|
|
515
|
+
const s = m(), t = S();
|
|
514
516
|
return f({
|
|
515
517
|
...e,
|
|
516
|
-
mutationFn: async (n) => s.query(
|
|
518
|
+
mutationFn: async (n) => s.query(qe, g(n)),
|
|
517
519
|
onSuccess: async (n, a, r) => {
|
|
518
520
|
var u, o;
|
|
519
521
|
await Promise.all([
|
|
@@ -525,165 +527,179 @@ function Pt(e) {
|
|
|
525
527
|
}
|
|
526
528
|
});
|
|
527
529
|
}
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
530
|
+
const Ce = "readLanguages post /language";
|
|
531
|
+
function Se(e) {
|
|
532
|
+
const s = m();
|
|
533
|
+
return Q({
|
|
534
|
+
queryKey: ee.all(),
|
|
535
|
+
queryFn: ({ signal: t }) => s.query(Ce, {
|
|
536
|
+
...g(e),
|
|
537
|
+
signal: t
|
|
538
|
+
})
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
function At(e) {
|
|
542
|
+
return M(Se(e));
|
|
543
|
+
}
|
|
544
|
+
const Pe = "readCountry post /country", Qe = function(s) {
|
|
545
|
+
const t = m(), n = T.list(s);
|
|
546
|
+
return Q({
|
|
531
547
|
queryKey: n,
|
|
532
548
|
queryFn: async ({ signal: a }) => {
|
|
533
|
-
const r =
|
|
534
|
-
return t.query(
|
|
549
|
+
const r = g(s);
|
|
550
|
+
return t.query(Pe, {
|
|
535
551
|
...r,
|
|
536
552
|
signal: a
|
|
537
553
|
});
|
|
538
554
|
}
|
|
539
555
|
});
|
|
540
556
|
};
|
|
541
|
-
function
|
|
542
|
-
return
|
|
557
|
+
function Kt(e) {
|
|
558
|
+
return M(Qe(e));
|
|
543
559
|
}
|
|
544
|
-
const
|
|
545
|
-
function
|
|
546
|
-
const s =
|
|
560
|
+
const Me = "changeEmail post /account/change-email";
|
|
561
|
+
function wt(e) {
|
|
562
|
+
const s = m(), t = S();
|
|
547
563
|
return f({
|
|
548
564
|
...e,
|
|
549
|
-
mutationFn: async (n) => s.query(
|
|
565
|
+
mutationFn: async (n) => s.query(Me, g(n)),
|
|
550
566
|
onSuccess: async (n, a, r) => {
|
|
551
567
|
var u, o;
|
|
552
|
-
await t.invalidateQueries({ queryKey:
|
|
568
|
+
await t.invalidateQueries({ queryKey: F.all() }), await t.invalidateQueries({ queryKey: R.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
553
569
|
}
|
|
554
570
|
});
|
|
555
571
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
558
|
-
const s =
|
|
572
|
+
const Oe = "changeProfile post /account/change-profile";
|
|
573
|
+
function Rt(e) {
|
|
574
|
+
const s = m(), t = S();
|
|
559
575
|
return f({
|
|
560
576
|
...e,
|
|
561
|
-
mutationFn: async (n) => s.query(
|
|
577
|
+
mutationFn: async (n) => s.query(Oe, g(n)),
|
|
562
578
|
onSuccess: async (n, a, r) => {
|
|
563
579
|
var u, o;
|
|
564
580
|
await Promise.all([
|
|
565
|
-
t.invalidateQueries({ queryKey:
|
|
566
|
-
t.invalidateQueries({ queryKey:
|
|
581
|
+
t.invalidateQueries({ queryKey: F.all() }),
|
|
582
|
+
t.invalidateQueries({ queryKey: R.all() })
|
|
567
583
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
568
584
|
}
|
|
569
585
|
});
|
|
570
586
|
}
|
|
571
|
-
const
|
|
572
|
-
function
|
|
573
|
-
const s =
|
|
587
|
+
const Ae = "loginCustomer post /account/login";
|
|
588
|
+
function Ft(e) {
|
|
589
|
+
const s = m(), t = S();
|
|
574
590
|
return f({
|
|
575
591
|
...e,
|
|
576
592
|
mutationFn: async (n) => {
|
|
577
|
-
const a = await s.queryRaw(
|
|
593
|
+
const a = await s.queryRaw(Ae, {
|
|
578
594
|
body: n
|
|
579
595
|
}), r = a.headers.get("sw-context-token");
|
|
580
|
-
return r && s.
|
|
596
|
+
return r && (s.contextToken = r), a.json();
|
|
581
597
|
},
|
|
582
598
|
onSuccess: async (n, a, r) => {
|
|
583
599
|
var u, o;
|
|
584
600
|
await Promise.all([
|
|
585
|
-
t.removeQueries({ queryKey:
|
|
601
|
+
t.removeQueries({ queryKey: R.all() }),
|
|
586
602
|
t.invalidateQueries({ queryKey: x.get() }),
|
|
587
|
-
t.invalidateQueries({ queryKey:
|
|
603
|
+
t.invalidateQueries({ queryKey: F.all() })
|
|
588
604
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
589
605
|
}
|
|
590
606
|
});
|
|
591
607
|
}
|
|
592
|
-
const
|
|
593
|
-
function
|
|
594
|
-
const s =
|
|
608
|
+
const Ke = "logoutCustomer post /account/logout";
|
|
609
|
+
function It(e) {
|
|
610
|
+
const s = m(), t = S();
|
|
595
611
|
return f({
|
|
596
612
|
...e,
|
|
597
|
-
mutationFn: async (n) => s.query(
|
|
613
|
+
mutationFn: async (n) => s.query(Ke, g(n)),
|
|
598
614
|
onSuccess: async (n, a, r) => {
|
|
599
615
|
var u, o;
|
|
600
616
|
await Promise.all([
|
|
601
|
-
t.removeQueries({ queryKey:
|
|
617
|
+
t.removeQueries({ queryKey: R.all() }),
|
|
602
618
|
t.invalidateQueries({ queryKey: x.get() }),
|
|
603
|
-
t.invalidateQueries({ queryKey:
|
|
619
|
+
t.invalidateQueries({ queryKey: F.all() })
|
|
604
620
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
605
621
|
}
|
|
606
622
|
});
|
|
607
623
|
}
|
|
608
|
-
const
|
|
609
|
-
function
|
|
610
|
-
const s =
|
|
611
|
-
return
|
|
624
|
+
const we = "readCustomer post /account/customer";
|
|
625
|
+
function Re(e) {
|
|
626
|
+
const s = m(), t = F.detail(c(() => g(e).body ?? {}));
|
|
627
|
+
return Q({
|
|
612
628
|
queryKey: t,
|
|
613
|
-
queryFn: async () => s.query(
|
|
629
|
+
queryFn: async () => s.query(we, g(e))
|
|
614
630
|
});
|
|
615
631
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
632
|
+
function Fe(e) {
|
|
633
|
+
return M(Re(e));
|
|
618
634
|
}
|
|
619
|
-
const
|
|
620
|
-
function
|
|
621
|
-
const s =
|
|
635
|
+
const Ie = "register post /account/register";
|
|
636
|
+
function Lt(e) {
|
|
637
|
+
const s = m(), t = S();
|
|
622
638
|
return f({
|
|
623
639
|
...e,
|
|
624
|
-
mutationFn: async (n) => s.query(
|
|
640
|
+
mutationFn: async (n) => s.query(Ie, g(n)),
|
|
625
641
|
onSuccess: async (n, a, r) => {
|
|
626
642
|
var u, o;
|
|
627
|
-
await t.invalidateQueries({ queryKey:
|
|
643
|
+
await t.invalidateQueries({ queryKey: F.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
628
644
|
}
|
|
629
645
|
});
|
|
630
646
|
}
|
|
631
|
-
const
|
|
632
|
-
function
|
|
633
|
-
const s =
|
|
647
|
+
const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
|
|
648
|
+
function xt(e) {
|
|
649
|
+
const s = m(), t = S();
|
|
634
650
|
return f({
|
|
635
651
|
...e,
|
|
636
|
-
mutationFn: async (n) => s.query(
|
|
652
|
+
mutationFn: async (n) => s.query(Le, g(n)),
|
|
637
653
|
onSuccess: async (n, a, r) => {
|
|
638
654
|
var u, o;
|
|
639
655
|
await Promise.all([
|
|
640
|
-
t.invalidateQueries({ queryKey:
|
|
641
|
-
t.invalidateQueries({ queryKey:
|
|
656
|
+
t.invalidateQueries({ queryKey: F.all() }),
|
|
657
|
+
t.invalidateQueries({ queryKey: R.all() })
|
|
642
658
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
643
659
|
}
|
|
644
660
|
});
|
|
645
661
|
}
|
|
646
|
-
const
|
|
647
|
-
function
|
|
648
|
-
const s =
|
|
662
|
+
const xe = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
|
|
663
|
+
function Ut(e) {
|
|
664
|
+
const s = m(), t = S();
|
|
649
665
|
return f({
|
|
650
666
|
...e,
|
|
651
|
-
mutationFn: async (n) => s.query(
|
|
667
|
+
mutationFn: async (n) => s.query(xe, g(n)),
|
|
652
668
|
onSuccess: async (n, a, r) => {
|
|
653
669
|
var u, o;
|
|
654
670
|
await Promise.all([
|
|
655
|
-
t.invalidateQueries({ queryKey:
|
|
656
|
-
t.invalidateQueries({ queryKey:
|
|
671
|
+
t.invalidateQueries({ queryKey: F.all() }),
|
|
672
|
+
t.invalidateQueries({ queryKey: R.all() })
|
|
657
673
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
658
674
|
}
|
|
659
675
|
});
|
|
660
676
|
}
|
|
661
|
-
const
|
|
662
|
-
function
|
|
663
|
-
const s =
|
|
677
|
+
const Ue = "deleteCustomer delete /account/customer";
|
|
678
|
+
function bt(e) {
|
|
679
|
+
const s = m(), t = S();
|
|
664
680
|
return f({
|
|
665
681
|
...e,
|
|
666
|
-
mutationFn: async (n) => s.query(
|
|
682
|
+
mutationFn: async (n) => s.query(Ue, g(n)),
|
|
667
683
|
onSuccess: async (n, a, r) => {
|
|
668
684
|
var u, o;
|
|
669
685
|
await Promise.all([
|
|
670
|
-
t.resetQueries({ queryKey: R.all() }),
|
|
671
686
|
t.resetQueries({ queryKey: F.all() }),
|
|
687
|
+
t.resetQueries({ queryKey: R.all() }),
|
|
672
688
|
t.resetQueries({ queryKey: x.get() })
|
|
673
689
|
]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
674
690
|
}
|
|
675
691
|
});
|
|
676
692
|
}
|
|
677
|
-
const
|
|
678
|
-
function
|
|
679
|
-
const s =
|
|
693
|
+
const be = "registerConfirm post /account/register-confirm";
|
|
694
|
+
function kt(e) {
|
|
695
|
+
const s = m();
|
|
680
696
|
return f({
|
|
681
697
|
...e,
|
|
682
698
|
mutationFn: async (t) => {
|
|
683
|
-
const n = await s.queryRaw(
|
|
699
|
+
const n = await s.queryRaw(be, {
|
|
684
700
|
body: t
|
|
685
701
|
}), a = n.headers.get("sw-context-token");
|
|
686
|
-
return a && s.
|
|
702
|
+
return a && (s.contextToken = a), n.json();
|
|
687
703
|
},
|
|
688
704
|
onSuccess: async (t, n, a) => {
|
|
689
705
|
var r, u;
|
|
@@ -691,49 +707,49 @@ function Lt(e) {
|
|
|
691
707
|
}
|
|
692
708
|
});
|
|
693
709
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
696
|
-
const s =
|
|
710
|
+
const ke = "sendRecoveryMail post /account/recovery-password";
|
|
711
|
+
function Bt(e) {
|
|
712
|
+
const s = m();
|
|
697
713
|
return f({
|
|
698
714
|
...e,
|
|
699
|
-
mutationFn: async (t) => s.query(
|
|
715
|
+
mutationFn: async (t) => s.query(ke, g(t)),
|
|
700
716
|
onSuccess: async (t, n, a) => {
|
|
701
717
|
var r, u;
|
|
702
718
|
await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
|
|
703
719
|
}
|
|
704
720
|
});
|
|
705
721
|
}
|
|
706
|
-
const
|
|
707
|
-
function
|
|
708
|
-
const s =
|
|
722
|
+
const Be = "changePassword post /account/change-password";
|
|
723
|
+
function Nt(e) {
|
|
724
|
+
const s = m();
|
|
709
725
|
return f({
|
|
710
726
|
...e,
|
|
711
|
-
mutationFn: async (t) => s.query(
|
|
727
|
+
mutationFn: async (t) => s.query(Be, g(t)),
|
|
712
728
|
onSuccess: async (t, n, a) => {
|
|
713
729
|
var r, u;
|
|
714
730
|
await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
|
|
715
731
|
}
|
|
716
732
|
});
|
|
717
733
|
}
|
|
718
|
-
const
|
|
719
|
-
function
|
|
720
|
-
const s =
|
|
734
|
+
const Ne = "recoveryPassword post /account/recovery-password-confirm";
|
|
735
|
+
function Dt(e) {
|
|
736
|
+
const s = m();
|
|
721
737
|
return f({
|
|
722
738
|
...e,
|
|
723
|
-
mutationFn: async (t) => s.query(
|
|
739
|
+
mutationFn: async (t) => s.query(Ne, g(t)),
|
|
724
740
|
onSuccess: async (t, n, a) => {
|
|
725
741
|
var r, u;
|
|
726
742
|
await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
|
|
727
743
|
}
|
|
728
744
|
});
|
|
729
745
|
}
|
|
730
|
-
const
|
|
731
|
-
const a =
|
|
732
|
-
return
|
|
746
|
+
const De = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
|
|
747
|
+
const a = m(), r = b.detail(s, t, n);
|
|
748
|
+
return Q({
|
|
733
749
|
queryKey: r,
|
|
734
750
|
queryFn: async ({ signal: u }) => {
|
|
735
|
-
const o = i(s), h = i(t), C =
|
|
736
|
-
return a.query(
|
|
751
|
+
const o = i(s), h = i(t), C = g(n);
|
|
752
|
+
return a.query(De, {
|
|
737
753
|
...C,
|
|
738
754
|
params: {
|
|
739
755
|
activeId: o,
|
|
@@ -744,173 +760,173 @@ const ke = "readNavigation post /navigation/{activeId}/{rootId}", Be = function(
|
|
|
744
760
|
}
|
|
745
761
|
});
|
|
746
762
|
};
|
|
747
|
-
function
|
|
748
|
-
return
|
|
763
|
+
function Et(e, s, t) {
|
|
764
|
+
return M(Ee(e, s, t));
|
|
749
765
|
}
|
|
750
|
-
const
|
|
751
|
-
function
|
|
752
|
-
const s =
|
|
766
|
+
const je = "readPaymentMethod post /payment-method";
|
|
767
|
+
function Te(e) {
|
|
768
|
+
const s = m(), t = D.list(c(() => {
|
|
753
769
|
var n;
|
|
754
|
-
return (n =
|
|
770
|
+
return (n = g(e)) == null ? void 0 : n.body;
|
|
755
771
|
}));
|
|
756
|
-
return
|
|
772
|
+
return Q({
|
|
757
773
|
queryKey: t,
|
|
758
|
-
queryFn: ({ signal: n }) => s.query(
|
|
759
|
-
...
|
|
774
|
+
queryFn: ({ signal: n }) => s.query(je, {
|
|
775
|
+
...g(e),
|
|
760
776
|
signal: n
|
|
761
777
|
})
|
|
762
778
|
});
|
|
763
779
|
}
|
|
764
|
-
function
|
|
765
|
-
return
|
|
780
|
+
function Ve(e) {
|
|
781
|
+
return M(Te(e));
|
|
766
782
|
}
|
|
767
|
-
const
|
|
768
|
-
function
|
|
769
|
-
const s =
|
|
783
|
+
const $e = "handlePaymentMethod post /handle-payment";
|
|
784
|
+
function jt(e) {
|
|
785
|
+
const s = m();
|
|
770
786
|
return f({
|
|
771
787
|
...e,
|
|
772
|
-
mutationFn: async (t) => s.query(
|
|
788
|
+
mutationFn: async (t) => s.query($e, g(t)),
|
|
773
789
|
onSuccess: async (t, n, a) => {
|
|
774
790
|
var r, u;
|
|
775
791
|
await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
|
|
776
792
|
}
|
|
777
793
|
});
|
|
778
794
|
}
|
|
779
|
-
const
|
|
780
|
-
function
|
|
781
|
-
const s =
|
|
795
|
+
const ze = "orderSetPayment post /order/payment";
|
|
796
|
+
function Tt(e) {
|
|
797
|
+
const s = m(), t = S();
|
|
782
798
|
return f({
|
|
783
799
|
...e,
|
|
784
|
-
mutationFn: async (n) => s.query(
|
|
800
|
+
mutationFn: async (n) => s.query(ze, g(n)),
|
|
785
801
|
onSuccess: async (n, a, r) => {
|
|
786
802
|
var u, o;
|
|
787
803
|
await t.invalidateQueries({ queryKey: U.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
|
|
788
804
|
}
|
|
789
805
|
});
|
|
790
806
|
}
|
|
791
|
-
const
|
|
792
|
-
const t =
|
|
793
|
-
return
|
|
807
|
+
const Ge = "readCategoryList post /category", He = function(s) {
|
|
808
|
+
const t = m(), n = B.list(s);
|
|
809
|
+
return Q({
|
|
794
810
|
queryKey: n,
|
|
795
|
-
queryFn: async ({ signal: a }) => t.query(
|
|
796
|
-
...
|
|
811
|
+
queryFn: async ({ signal: a }) => t.query(Ge, {
|
|
812
|
+
...g(s),
|
|
797
813
|
signal: a
|
|
798
814
|
})
|
|
799
815
|
});
|
|
800
816
|
};
|
|
801
|
-
function
|
|
802
|
-
return
|
|
817
|
+
function Vt(e) {
|
|
818
|
+
return M(He(e));
|
|
803
819
|
}
|
|
804
|
-
const
|
|
805
|
-
function
|
|
806
|
-
const t =
|
|
807
|
-
return
|
|
820
|
+
const We = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
|
|
821
|
+
function Je(e, s) {
|
|
822
|
+
const t = m(), n = L.list(e, s);
|
|
823
|
+
return Q({
|
|
808
824
|
queryKey: n,
|
|
809
825
|
queryFn: async ({ signal: a }) => {
|
|
810
|
-
const r =
|
|
811
|
-
return t.query(
|
|
826
|
+
const r = g(s);
|
|
827
|
+
return t.query(We, {
|
|
812
828
|
...r,
|
|
813
829
|
params: {
|
|
814
830
|
...r.params,
|
|
815
|
-
seoUrl:
|
|
831
|
+
seoUrl: V(i(e))
|
|
816
832
|
},
|
|
817
833
|
signal: a
|
|
818
834
|
});
|
|
819
835
|
}
|
|
820
836
|
});
|
|
821
837
|
}
|
|
822
|
-
function
|
|
823
|
-
return
|
|
838
|
+
function $t(e, s) {
|
|
839
|
+
return M(Je(e, s));
|
|
824
840
|
}
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
const t =
|
|
828
|
-
return
|
|
841
|
+
const Xe = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
|
|
842
|
+
function Ye(e, s) {
|
|
843
|
+
const t = m(), n = L.detail(e, s);
|
|
844
|
+
return Q({
|
|
829
845
|
queryKey: n,
|
|
830
846
|
queryFn: async ({ signal: a }) => {
|
|
831
|
-
const r =
|
|
832
|
-
return t.query(
|
|
847
|
+
const r = g(s);
|
|
848
|
+
return t.query(Xe, {
|
|
833
849
|
...r,
|
|
834
850
|
params: {
|
|
835
851
|
...r.params,
|
|
836
|
-
seoUrl:
|
|
852
|
+
seoUrl: V(i(e))
|
|
837
853
|
},
|
|
838
854
|
signal: a
|
|
839
855
|
});
|
|
840
856
|
}
|
|
841
857
|
});
|
|
842
858
|
}
|
|
843
|
-
function
|
|
844
|
-
return
|
|
859
|
+
function zt(e, s) {
|
|
860
|
+
return M(Ye(e, s));
|
|
845
861
|
}
|
|
846
|
-
const
|
|
847
|
-
function
|
|
848
|
-
const s =
|
|
849
|
-
return
|
|
862
|
+
const Ze = "searchPage post /search";
|
|
863
|
+
function _e(e) {
|
|
864
|
+
const s = m(), t = L.search(e);
|
|
865
|
+
return Q({
|
|
850
866
|
queryKey: t,
|
|
851
867
|
queryFn: async ({ signal: n }) => {
|
|
852
|
-
const a =
|
|
853
|
-
return s.query(
|
|
868
|
+
const a = g(e);
|
|
869
|
+
return s.query(Ze, {
|
|
854
870
|
...a,
|
|
855
871
|
signal: n
|
|
856
872
|
});
|
|
857
873
|
}
|
|
858
874
|
});
|
|
859
875
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
876
|
+
function Gt(e) {
|
|
877
|
+
return M(_e(e));
|
|
862
878
|
}
|
|
863
|
-
const
|
|
864
|
-
const t =
|
|
865
|
-
return
|
|
879
|
+
const et = "readSalutation post /salutation", tt = function(s) {
|
|
880
|
+
const t = m(), n = j.list(s);
|
|
881
|
+
return Q({
|
|
866
882
|
queryKey: n,
|
|
867
883
|
queryFn: async ({ signal: a }) => {
|
|
868
|
-
const r =
|
|
869
|
-
return t.query(
|
|
884
|
+
const r = g(s);
|
|
885
|
+
return t.query(et, {
|
|
870
886
|
...r,
|
|
871
887
|
signal: a
|
|
872
888
|
});
|
|
873
889
|
}
|
|
874
890
|
});
|
|
875
891
|
};
|
|
876
|
-
function
|
|
877
|
-
return
|
|
892
|
+
function Ht(e) {
|
|
893
|
+
return M(tt(e));
|
|
878
894
|
}
|
|
879
|
-
const
|
|
880
|
-
const t =
|
|
881
|
-
return
|
|
895
|
+
const nt = "readSeoUrl post /seo-url", st = function(s) {
|
|
896
|
+
const t = m(), n = E.list(s);
|
|
897
|
+
return Q({
|
|
882
898
|
queryKey: n,
|
|
883
899
|
queryFn: async ({ signal: a }) => {
|
|
884
|
-
const r =
|
|
885
|
-
return t.query(
|
|
900
|
+
const r = g(s);
|
|
901
|
+
return t.query(nt, {
|
|
886
902
|
...r,
|
|
887
903
|
signal: a
|
|
888
904
|
});
|
|
889
905
|
}
|
|
890
906
|
});
|
|
891
907
|
};
|
|
892
|
-
function
|
|
893
|
-
return
|
|
908
|
+
function Wt(e) {
|
|
909
|
+
return M(st(e));
|
|
894
910
|
}
|
|
895
|
-
const
|
|
896
|
-
function
|
|
897
|
-
const s =
|
|
911
|
+
const rt = "readShippingMethod post /shipping-method";
|
|
912
|
+
function at(e) {
|
|
913
|
+
const s = m(), t = N.list(c(() => {
|
|
898
914
|
var n;
|
|
899
|
-
return (n =
|
|
915
|
+
return (n = g(e)) == null ? void 0 : n.body;
|
|
900
916
|
}));
|
|
901
|
-
return
|
|
917
|
+
return Q({
|
|
902
918
|
queryKey: t,
|
|
903
|
-
queryFn: ({ signal: n }) => s.query(
|
|
904
|
-
...
|
|
919
|
+
queryFn: ({ signal: n }) => s.query(rt, {
|
|
920
|
+
...g(e),
|
|
905
921
|
signal: n
|
|
906
922
|
})
|
|
907
923
|
});
|
|
908
924
|
}
|
|
909
|
-
function
|
|
910
|
-
return
|
|
925
|
+
function ut(e) {
|
|
926
|
+
return M(at(e));
|
|
911
927
|
}
|
|
912
|
-
function
|
|
913
|
-
const e =
|
|
928
|
+
function Jt() {
|
|
929
|
+
const e = k(), s = $(), t = Ve({
|
|
914
930
|
query: {
|
|
915
931
|
onlyAvailable: !0
|
|
916
932
|
}
|
|
@@ -933,8 +949,8 @@ function zt() {
|
|
|
933
949
|
paymentMethods: u
|
|
934
950
|
};
|
|
935
951
|
}
|
|
936
|
-
function
|
|
937
|
-
const e =
|
|
952
|
+
function Xt() {
|
|
953
|
+
const e = k(), s = $(), t = ut({
|
|
938
954
|
query: {
|
|
939
955
|
onlyAvailable: !0
|
|
940
956
|
}
|
|
@@ -957,12 +973,25 @@ function Gt() {
|
|
|
957
973
|
shippingMethods: u
|
|
958
974
|
};
|
|
959
975
|
}
|
|
960
|
-
const
|
|
976
|
+
const ot = (e, s) => {
|
|
961
977
|
var n;
|
|
962
|
-
const t = (n = e.extensions) == null ? void 0 : n.novuSeoUrls;
|
|
978
|
+
const t = (n = e == null ? void 0 : e.extensions) == null ? void 0 : n.novuSeoUrls;
|
|
979
|
+
if (Array.isArray(s)) {
|
|
980
|
+
const a = s.find((r) => !!(t != null && t[r]));
|
|
981
|
+
return a ? (t == null ? void 0 : t[a]) ?? "" : "";
|
|
982
|
+
}
|
|
963
983
|
return (t == null ? void 0 : t[s]) ?? "";
|
|
964
|
-
},
|
|
965
|
-
|
|
984
|
+
}, Yt = () => {
|
|
985
|
+
const e = k(), s = c(() => {
|
|
986
|
+
var t, n, a;
|
|
987
|
+
return ((a = (n = (t = e.data) == null ? void 0 : t.value) == null ? void 0 : n.context) == null ? void 0 : a.languageIdChain) ?? [];
|
|
988
|
+
});
|
|
989
|
+
return (t, n) => {
|
|
990
|
+
const a = [n, ...s.value];
|
|
991
|
+
return ot(i(t), i(a));
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
function Zt(e) {
|
|
966
995
|
const { total: s, limit: t, page: n, totalCountMode: a } = e ?? {}, r = Z({
|
|
967
996
|
page: n ?? 1,
|
|
968
997
|
total: s ?? 0,
|
|
@@ -972,22 +1001,22 @@ function Wt(e) {
|
|
|
972
1001
|
get() {
|
|
973
1002
|
return r.page;
|
|
974
1003
|
},
|
|
975
|
-
set(
|
|
976
|
-
r.page = Math.max(1, Math.min(i(u),
|
|
1004
|
+
set(O) {
|
|
1005
|
+
r.page = Math.max(1, Math.min(i(u), O));
|
|
977
1006
|
}
|
|
978
1007
|
});
|
|
979
1008
|
H(
|
|
980
1009
|
[() => i(u), () => r],
|
|
981
|
-
([
|
|
982
|
-
r.page = Math.min(
|
|
1010
|
+
([O, y]) => {
|
|
1011
|
+
r.page = Math.min(O, r.page), r.total = y.total ?? 0, r.limit = y.limit;
|
|
983
1012
|
}
|
|
984
1013
|
);
|
|
985
1014
|
const h = c(() => r.page === i(u)), C = c(() => r.page === 1), d = c(() => ({
|
|
986
1015
|
p: r.page,
|
|
987
1016
|
limit: r.limit,
|
|
988
1017
|
"total-count-mode": r.totalCountMode ?? "none"
|
|
989
|
-
})), P = (
|
|
990
|
-
H(() => i(
|
|
1018
|
+
})), P = (O) => {
|
|
1019
|
+
H(() => i(O), (y) => {
|
|
991
1020
|
y && (r.total = (y == null ? void 0 : y.total) ?? 0, r.limit = (y == null ? void 0 : y.limit) ?? 0);
|
|
992
1021
|
});
|
|
993
1022
|
};
|
|
@@ -1014,7 +1043,7 @@ function X(e) {
|
|
|
1014
1043
|
unitPrice: n
|
|
1015
1044
|
}));
|
|
1016
1045
|
}
|
|
1017
|
-
function
|
|
1046
|
+
function _t(e) {
|
|
1018
1047
|
const s = c(() => {
|
|
1019
1048
|
var y;
|
|
1020
1049
|
return (y = e.value) == null ? void 0 : y.calculatedCheapestPrice;
|
|
@@ -1059,20 +1088,20 @@ function Jt(e) {
|
|
|
1059
1088
|
var y, v, A;
|
|
1060
1089
|
return (A = (v = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : v.regulationPrice) == null ? void 0 : A.price;
|
|
1061
1090
|
}
|
|
1062
|
-
),
|
|
1091
|
+
), O = c(() => X(e.value));
|
|
1063
1092
|
return {
|
|
1064
1093
|
price: C,
|
|
1065
1094
|
totalPrice: h,
|
|
1066
1095
|
unitPrice: o,
|
|
1067
1096
|
displayFromVariants: r,
|
|
1068
1097
|
displayFrom: a,
|
|
1069
|
-
tierPrices:
|
|
1098
|
+
tierPrices: O,
|
|
1070
1099
|
referencePrice: n,
|
|
1071
1100
|
isListPrice: d,
|
|
1072
1101
|
regulationPrice: P
|
|
1073
1102
|
};
|
|
1074
1103
|
}
|
|
1075
|
-
function
|
|
1104
|
+
function it(e, s) {
|
|
1076
1105
|
var n;
|
|
1077
1106
|
const t = (n = e.extensions) == null ? void 0 : n.variants;
|
|
1078
1107
|
return s.length === 0 ? (t == null ? void 0 : t.find((a) => {
|
|
@@ -1083,17 +1112,17 @@ function at(e, s) {
|
|
|
1083
1112
|
return (r = a.optionIds) == null ? void 0 : r.every((u) => s.includes(u));
|
|
1084
1113
|
});
|
|
1085
1114
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return c(() =>
|
|
1115
|
+
function en(e, s) {
|
|
1116
|
+
return c(() => it(i(e), i(s)));
|
|
1088
1117
|
}
|
|
1089
|
-
function
|
|
1118
|
+
function tn(e) {
|
|
1090
1119
|
return c(() => {
|
|
1091
1120
|
var s, t, n, a, r, u;
|
|
1092
1121
|
return !!((t = (s = i(e)) == null ? void 0 : s.customer) != null && t.id) && !!((a = (n = i(e)) == null ? void 0 : n.customer) != null && a.active) && !((u = (r = i(e)) == null ? void 0 : r.customer) != null && u.guest);
|
|
1093
1122
|
});
|
|
1094
1123
|
}
|
|
1095
|
-
function
|
|
1096
|
-
const s =
|
|
1124
|
+
function nn(e) {
|
|
1125
|
+
const s = Fe(e ? { body: e } : void 0), t = c(() => {
|
|
1097
1126
|
var d;
|
|
1098
1127
|
return (d = s.data) == null ? void 0 : d.value;
|
|
1099
1128
|
}), n = c(
|
|
@@ -1145,91 +1174,93 @@ function Zt(e) {
|
|
|
1145
1174
|
};
|
|
1146
1175
|
}
|
|
1147
1176
|
export {
|
|
1148
|
-
|
|
1177
|
+
pt as absolutizeSeoUrl,
|
|
1149
1178
|
w as addressKeys,
|
|
1150
1179
|
x as cartKeys,
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1180
|
+
B as categoryKeys,
|
|
1181
|
+
R as contextKeys,
|
|
1182
|
+
T as countryKeys,
|
|
1183
|
+
F as customerKeys,
|
|
1184
|
+
it as getProductVariantForOptions,
|
|
1185
|
+
re as isAsynchronousOrder,
|
|
1186
|
+
ee as languageKey,
|
|
1158
1187
|
b as navigationKeys,
|
|
1159
1188
|
U as orderKeys,
|
|
1160
|
-
|
|
1189
|
+
D as paymentKeys,
|
|
1161
1190
|
L as productKeys,
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1191
|
+
je as readPaymentMethodOperation,
|
|
1192
|
+
rt as readShippingMethodOperation,
|
|
1193
|
+
V as relativizeSeoUrl,
|
|
1194
|
+
j as salutationKeys,
|
|
1195
|
+
E as seoUrlKeys,
|
|
1196
|
+
N as shippingKeys,
|
|
1168
1197
|
_ as shopwareClientKey,
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1198
|
+
g as unrefOptions,
|
|
1199
|
+
St as useAddLineItemMutation,
|
|
1200
|
+
wt as useChangeEmailMutation,
|
|
1201
|
+
Nt as useChangePasswordMutation,
|
|
1202
|
+
Rt as useChangeProfileMutation,
|
|
1203
|
+
mt as useCheckoutAddresses,
|
|
1204
|
+
vt as useCreateCustomerAddressMutation,
|
|
1205
|
+
Ot as useCreateOrderMutation,
|
|
1206
|
+
xt as useDefaultBillingAddressMutation,
|
|
1207
|
+
Ut as useDefaultShippingAddressMutation,
|
|
1208
|
+
qt as useDeleteCustomerAddressMutation,
|
|
1209
|
+
bt as useDeleteCustomerMutation,
|
|
1210
|
+
jt as useHandlePaymentMutation,
|
|
1211
|
+
tn as useIsLoggedIn,
|
|
1212
|
+
se as useListAddressQuery,
|
|
1213
|
+
ne as useListAddressQueryOptions,
|
|
1214
|
+
Ft as useLoginCustomerMutation,
|
|
1215
|
+
It as useLogoutCustomerMutation,
|
|
1216
|
+
gt as useOptimistic,
|
|
1217
|
+
ht as useOrderDetails,
|
|
1218
|
+
ft as useOrderPayment,
|
|
1219
|
+
Tt as useOrderSetPaymentMutation,
|
|
1220
|
+
Zt as usePagination,
|
|
1221
|
+
Jt as usePaymentMethods,
|
|
1222
|
+
_t as useProductPrice,
|
|
1223
|
+
en as useProductVariantForOptions,
|
|
1224
|
+
Pt as useReadCartQuery,
|
|
1225
|
+
he as useReadCartQueryOptions,
|
|
1226
|
+
Vt as useReadCategoryListQuery,
|
|
1227
|
+
He as useReadCategoryListQueryOptions,
|
|
1228
|
+
$t as useReadCompactProductListingQuery,
|
|
1229
|
+
Je as useReadCompactProductListingQueryOptions,
|
|
1230
|
+
k as useReadContextQuery,
|
|
1231
|
+
ue as useReadContextQueryOptions,
|
|
1232
|
+
Kt as useReadCountryQuery,
|
|
1233
|
+
Qe as useReadCountryQueryOptions,
|
|
1234
|
+
Ye as useReadCustomProductDetailOptions,
|
|
1235
|
+
zt as useReadCustomProductDetailQuery,
|
|
1236
|
+
Fe as useReadCustomerQuery,
|
|
1237
|
+
Re as useReadCustomerQueryOptions,
|
|
1238
|
+
At as useReadLanguageQuery,
|
|
1239
|
+
Se as useReadLanguageQueryOptions,
|
|
1240
|
+
Et as useReadNavigationQuery,
|
|
1241
|
+
Ee as useReadNavigationQueryOptions,
|
|
1242
|
+
le as useReadOrderQuery,
|
|
1243
|
+
ce as useReadOrderQueryOptions,
|
|
1244
|
+
Ve as useReadPaymentMethodQuery,
|
|
1245
|
+
Te as useReadPaymentMethodQueryOptions,
|
|
1246
|
+
Ht as useReadSalutationQuery,
|
|
1247
|
+
tt as useReadSalutationQueryOptions,
|
|
1248
|
+
Wt as useReadSeoUrlQuery,
|
|
1249
|
+
st as useReadSeoUrlQueryOptions,
|
|
1250
|
+
ut as useReadShippingMethodQuery,
|
|
1251
|
+
at as useReadShippingMethodQueryOptions,
|
|
1252
|
+
Dt as useRecoveryPasswordMutation,
|
|
1253
|
+
kt as useRegisterConfirmMutation,
|
|
1254
|
+
Lt as useRegisterCustomerMutation,
|
|
1255
|
+
Qt as useRemoveLineItemMutation,
|
|
1256
|
+
Gt as useSearchPageQuery,
|
|
1257
|
+
_e as useSearchPageQueryOptions,
|
|
1258
|
+
Bt as useSendRecoveryMailMutation,
|
|
1259
|
+
Yt as useSeoUrl,
|
|
1260
|
+
Xt as useShippingMethods,
|
|
1261
|
+
m as useShopwareQueryClient,
|
|
1231
1262
|
$ as useUpdateContextMutation,
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1263
|
+
Ct as useUpdateCustomerAddressMutation,
|
|
1264
|
+
Mt as useUpdateLineItemMutation,
|
|
1265
|
+
nn as useUser
|
|
1235
1266
|
};
|