@teamnovu/kit-shopware-composables 0.0.32 → 0.0.33
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
|
@@ -23,19 +23,19 @@ const A = {
|
|
|
23
23
|
body: e
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
|
-
},
|
|
26
|
+
}, k = {
|
|
27
27
|
all: () => ["navigation"],
|
|
28
|
-
lists: () => [...
|
|
28
|
+
lists: () => [...k.all(), "list"],
|
|
29
29
|
list: (e) => [
|
|
30
|
-
...
|
|
30
|
+
...k.all(),
|
|
31
31
|
"list",
|
|
32
32
|
{
|
|
33
33
|
body: e
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
details: () => [...
|
|
36
|
+
details: () => [...k.all(), "detail"],
|
|
37
37
|
detail: (e, s, t) => [
|
|
38
|
-
...
|
|
38
|
+
...k.all(),
|
|
39
39
|
"detail",
|
|
40
40
|
{
|
|
41
41
|
activeId: e,
|
|
@@ -108,21 +108,21 @@ const A = {
|
|
|
108
108
|
],
|
|
109
109
|
details: () => [...F.all(), "detail"],
|
|
110
110
|
detail: (e, s) => [...F.details(), e, ...s ? [{ body: s }] : []]
|
|
111
|
-
},
|
|
111
|
+
}, D = {
|
|
112
112
|
all: () => ["shippingMethod"],
|
|
113
|
-
lists: () => [...
|
|
113
|
+
lists: () => [...D.all(), "list"],
|
|
114
114
|
list: (e) => [
|
|
115
|
-
...
|
|
115
|
+
...D.all(),
|
|
116
116
|
"list",
|
|
117
117
|
{
|
|
118
118
|
body: e
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
|
-
},
|
|
121
|
+
}, b = {
|
|
122
122
|
all: () => ["paymentMethod"],
|
|
123
|
-
lists: () => [...
|
|
123
|
+
lists: () => [...b.all(), "list"],
|
|
124
124
|
list: (e) => [
|
|
125
|
-
...
|
|
125
|
+
...b.lists(),
|
|
126
126
|
{
|
|
127
127
|
body: e
|
|
128
128
|
}
|
|
@@ -250,7 +250,9 @@ function $(e) {
|
|
|
250
250
|
var u, i;
|
|
251
251
|
await Promise.all([
|
|
252
252
|
t.invalidateQueries({ queryKey: A.all() }),
|
|
253
|
-
t.invalidateQueries({ queryKey: L.get() })
|
|
253
|
+
t.invalidateQueries({ queryKey: L.get() }),
|
|
254
|
+
t.invalidateQueries({ queryKey: b.lists() }),
|
|
255
|
+
t.invalidateQueries({ queryKey: D.lists() })
|
|
254
256
|
]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
|
|
255
257
|
}
|
|
256
258
|
});
|
|
@@ -480,8 +482,8 @@ function At(e) {
|
|
|
480
482
|
onSuccess: async (n, r, a) => {
|
|
481
483
|
var u, i;
|
|
482
484
|
t.setQueryData(L.get(), n), await Promise.all([
|
|
483
|
-
t.invalidateQueries({ queryKey:
|
|
484
|
-
t.invalidateQueries({ queryKey:
|
|
485
|
+
t.invalidateQueries({ queryKey: b.lists() }),
|
|
486
|
+
t.invalidateQueries({ queryKey: D.lists() })
|
|
485
487
|
]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(
|
|
486
488
|
n,
|
|
487
489
|
r,
|
|
@@ -515,8 +517,8 @@ function Ft(e) {
|
|
|
515
517
|
onSuccess: async (n, r, a) => {
|
|
516
518
|
var u, i;
|
|
517
519
|
t.setQueryData(L.get(), n), await Promise.all([
|
|
518
|
-
t.invalidateQueries({ queryKey:
|
|
519
|
-
t.invalidateQueries({ queryKey:
|
|
520
|
+
t.invalidateQueries({ queryKey: b.lists() }),
|
|
521
|
+
t.invalidateQueries({ queryKey: D.lists() })
|
|
520
522
|
]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(
|
|
521
523
|
n,
|
|
522
524
|
r,
|
|
@@ -787,7 +789,7 @@ function Ht(e) {
|
|
|
787
789
|
});
|
|
788
790
|
}
|
|
789
791
|
const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
|
|
790
|
-
const r = g(), a =
|
|
792
|
+
const r = g(), a = k.detail(s, t, n);
|
|
791
793
|
return v({
|
|
792
794
|
queryKey: a,
|
|
793
795
|
queryFn: async ({ signal: u }) => {
|
|
@@ -808,7 +810,7 @@ function Wt(e, s, t) {
|
|
|
808
810
|
}
|
|
809
811
|
const je = "readPaymentMethod post /payment-method";
|
|
810
812
|
function Ve(e) {
|
|
811
|
-
const s = g(), t =
|
|
813
|
+
const s = g(), t = b.list(c(() => {
|
|
812
814
|
var n;
|
|
813
815
|
return (n = y(e)) == null ? void 0 : n.body;
|
|
814
816
|
}));
|
|
@@ -1008,7 +1010,7 @@ function an(e) {
|
|
|
1008
1010
|
}
|
|
1009
1011
|
const dt = "readShippingMethod post /shipping-method";
|
|
1010
1012
|
function yt(e) {
|
|
1011
|
-
const s = g(), t =
|
|
1013
|
+
const s = g(), t = D.list(c(() => {
|
|
1012
1014
|
var n;
|
|
1013
1015
|
return (n = y(e)) == null ? void 0 : n.body;
|
|
1014
1016
|
}));
|
|
@@ -1281,16 +1283,16 @@ export {
|
|
|
1281
1283
|
I as customerKeys,
|
|
1282
1284
|
mt as getProductVariantForOptions,
|
|
1283
1285
|
ee as languageKey,
|
|
1284
|
-
|
|
1286
|
+
k as navigationKeys,
|
|
1285
1287
|
U as orderKeys,
|
|
1286
|
-
|
|
1288
|
+
b as paymentKeys,
|
|
1287
1289
|
O as productKeys,
|
|
1288
1290
|
je as readPaymentMethodOperation,
|
|
1289
1291
|
dt as readShippingMethodOperation,
|
|
1290
1292
|
V as relativizeSeoUrl,
|
|
1291
1293
|
E as salutationKeys,
|
|
1292
1294
|
T as seoUrlKeys,
|
|
1293
|
-
|
|
1295
|
+
D as shippingKeys,
|
|
1294
1296
|
_ as shopwareClientKey,
|
|
1295
1297
|
y as unrefOptions,
|
|
1296
1298
|
At as useAddLineItemMutation,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { useMutation, type UseMutationOptions, useQueryClient } from '@tanstack/
|
|
|
2
2
|
import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client'
|
|
3
3
|
import { unref } from 'vue'
|
|
4
4
|
import { useShopwareQueryClient } from '../../inject'
|
|
5
|
-
import { cartKeys, contextKeys } from '../../keys'
|
|
5
|
+
import { cartKeys, contextKeys, paymentKeys, shippingKeys } from '../../keys'
|
|
6
6
|
import type { OperationBody, OperationKey, OperationResponse } from '../types/query'
|
|
7
7
|
|
|
8
8
|
const updateContextOperation = 'updateContext patch /context' satisfies OperationKey
|
|
@@ -32,6 +32,8 @@ export function useUpdateContextMutation(
|
|
|
32
32
|
await Promise.all([
|
|
33
33
|
queryClient.invalidateQueries({ queryKey: contextKeys.all() }),
|
|
34
34
|
queryClient.invalidateQueries({ queryKey: cartKeys.get() }),
|
|
35
|
+
queryClient.invalidateQueries({ queryKey: paymentKeys.lists() }),
|
|
36
|
+
queryClient.invalidateQueries({ queryKey: shippingKeys.lists() }),
|
|
35
37
|
])
|
|
36
38
|
|
|
37
39
|
await unref(unref(mutationOptions)?.onSuccess)?.(newContext, variables, context)
|