@scayle/storefront-nuxt 7.68.1 → 7.69.1
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/CHANGELOG.md +18 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/composables/storefront/useBasket.d.ts +11 -11
- package/dist/runtime/composables/storefront/useBrand.d.ts +1 -1
- package/dist/runtime/composables/storefront/useBrands.d.ts +1 -1
- package/dist/runtime/composables/storefront/useCategories.d.ts +4 -4
- package/dist/runtime/composables/storefront/useCategoryById.d.ts +1 -1
- package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +1 -1
- package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/useFacet.d.ts +14 -5
- package/dist/runtime/composables/storefront/useFilters.d.ts +1 -1
- package/dist/runtime/composables/storefront/useNavigationTree.d.ts +1 -1
- package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +1 -1
- package/dist/runtime/composables/storefront/useProduct.d.ts +1 -1
- package/dist/runtime/composables/storefront/useProducts.d.ts +11 -2
- package/dist/runtime/composables/storefront/useProductsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +1 -1
- package/dist/runtime/composables/storefront/usePromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +1 -1
- package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +1 -1
- package/dist/runtime/composables/storefront/useVariant.d.ts +1 -1
- package/dist/runtime/context.mjs +10 -5
- package/dist/runtime/server/middleware/redirects.mjs +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.69.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @scayle/storefront-core@7.50.1
|
|
9
|
+
|
|
10
|
+
## 7.69.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Upgraded to `@scayle/storefront-api@v17.0.0` and replaced `@aboutyou/backbone`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @scayle/storefront-core@7.50.0
|
|
20
|
+
|
|
3
21
|
## 7.68.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -6,11 +6,11 @@ type UseBasketOptions = Partial<{
|
|
|
6
6
|
key: string;
|
|
7
7
|
}>;
|
|
8
8
|
export declare function useBasket({ params, key, }?: UseBasketOptions): Promise<{
|
|
9
|
-
data: import("vue").Ref<BasketResponseData<import("@scayle/storefront-
|
|
10
|
-
items: import("vue").ComputedRef<import("@scayle/storefront-
|
|
11
|
-
cost: import("vue").ComputedRef<import("@scayle/storefront-
|
|
12
|
-
key: import("vue").ComputedRef<import("@
|
|
13
|
-
packages: import("vue").ComputedRef<import("@
|
|
9
|
+
data: import("vue").Ref<BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant> | undefined>;
|
|
10
|
+
items: import("vue").ComputedRef<import("@scayle/storefront-api").BasketItem<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>[] | undefined>;
|
|
11
|
+
cost: import("vue").ComputedRef<import("@scayle/storefront-api").BasketTotalPrice | undefined>;
|
|
12
|
+
key: import("vue").ComputedRef<import("@scayle/storefront-api").BasketKey | undefined>;
|
|
13
|
+
packages: import("vue").ComputedRef<import("@scayle/storefront-api").BasketPackageInformation[] | undefined>;
|
|
14
14
|
shippingDates: import("vue").ComputedRef<(string | null)[] | undefined>;
|
|
15
15
|
isEmpty: import("vue").ComputedRef<boolean>;
|
|
16
16
|
fetching: import("vue").Ref<boolean>;
|
|
@@ -30,12 +30,12 @@ export declare function useBasket({ params, key, }?: UseBasketOptions): Promise<
|
|
|
30
30
|
} | {
|
|
31
31
|
productId: number;
|
|
32
32
|
}) => boolean;
|
|
33
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-
|
|
33
|
+
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[]>;
|
|
34
34
|
findItem: (item: {
|
|
35
35
|
variantId: number;
|
|
36
36
|
} | {
|
|
37
37
|
productId: number;
|
|
38
|
-
}) => import("@scayle/storefront-
|
|
38
|
+
}) => import("@scayle/storefront-api").BasketItem<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant> | undefined;
|
|
39
39
|
generateBasketKey: ({ keyTemplate, hashAlgorithm, shopId, userId, log, }: {
|
|
40
40
|
keyTemplate: string;
|
|
41
41
|
hashAlgorithm: import("@scayle/storefront-core").HashAlgorithm;
|
|
@@ -49,14 +49,14 @@ export declare function useBasket({ params, key, }?: UseBasketOptions): Promise<
|
|
|
49
49
|
}) => Promise<{
|
|
50
50
|
type: "failure";
|
|
51
51
|
statusCode: number;
|
|
52
|
-
basket: BasketResponseData<import("@scayle/storefront-
|
|
52
|
+
basket: BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
53
53
|
} | {
|
|
54
54
|
readonly type: "success";
|
|
55
|
-
readonly basket: BasketResponseData<import("@scayle/storefront-
|
|
55
|
+
readonly basket: BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
56
56
|
} | {
|
|
57
57
|
readonly type: "failure";
|
|
58
|
-
readonly basket: BasketResponseData<import("@scayle/storefront-
|
|
59
|
-
readonly errors: import("@
|
|
58
|
+
readonly basket: BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
59
|
+
readonly errors: import("@scayle/storefront-api").AddOrUpdateItemError[];
|
|
60
60
|
} | undefined>;
|
|
61
61
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null>;
|
|
62
62
|
status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useBrand({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Brand | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useBrands({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").BrandsEndpointResponseData | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -8,16 +8,16 @@ type Options = Partial<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useCategories({ params, options, key, }?: Options): Promise<{
|
|
10
10
|
data: import("vue").Ref<{
|
|
11
|
-
categories: import("@scayle/storefront-
|
|
11
|
+
categories: import("@scayle/storefront-api").Category[];
|
|
12
12
|
activeNode: undefined;
|
|
13
13
|
} | {
|
|
14
|
-
categories: import("@scayle/storefront-
|
|
15
|
-
activeNode: import("@scayle/storefront-
|
|
14
|
+
categories: import("@scayle/storefront-api").Category;
|
|
15
|
+
activeNode: import("@scayle/storefront-api").Category;
|
|
16
16
|
} | undefined>;
|
|
17
17
|
fetching: import("vue").Ref<boolean>;
|
|
18
18
|
fetch: () => Promise<void>;
|
|
19
19
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
20
20
|
status: import("vue").Ref<import("../core/useRpc").Status>;
|
|
21
|
-
getCategoryById: (id: number, includeHidden?: true) => Promise<import("@scayle/storefront-
|
|
21
|
+
getCategoryById: (id: number, includeHidden?: true) => Promise<import("@scayle/storefront-api").Category>;
|
|
22
22
|
}>;
|
|
23
23
|
export {};
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useCategoryById({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Category | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = {
|
|
|
7
7
|
key: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function useCategoryByPath({ params, options, key, }: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Category | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useCurrentPromotions({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").PromotionsEndpointResponseData | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -14,7 +14,7 @@ type Options = Partial<{
|
|
|
14
14
|
key: string;
|
|
15
15
|
}>;
|
|
16
16
|
export declare function useFacet({ key, params, }?: Options): Promise<{
|
|
17
|
-
filters: import("vue").ComputedRef<import("@
|
|
17
|
+
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
18
18
|
filtersFetching: import("vue").Ref<boolean>;
|
|
19
19
|
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
20
20
|
filterStatus: import("vue").Ref<import("../core/useRpc").Status>;
|
|
@@ -26,14 +26,23 @@ export declare function useFacet({ key, params, }?: Options): Promise<{
|
|
|
26
26
|
productCountFetching: import("vue").Ref<boolean>;
|
|
27
27
|
productCountError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
28
28
|
productCountStatus: import("vue").Ref<import("../core/useRpc").Status>;
|
|
29
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-
|
|
30
|
-
pagination: import("vue").ComputedRef<
|
|
29
|
+
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
30
|
+
pagination: import("vue").ComputedRef<{
|
|
31
|
+
current: number;
|
|
32
|
+
total: number;
|
|
33
|
+
perPage: number;
|
|
34
|
+
page: number;
|
|
35
|
+
first: number;
|
|
36
|
+
prev: number;
|
|
37
|
+
next: number;
|
|
38
|
+
last: number;
|
|
39
|
+
} | undefined>;
|
|
31
40
|
productsFetching: import("vue").Ref<boolean>;
|
|
32
41
|
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
33
42
|
productError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
34
43
|
productStatus: import("vue").Ref<import("../core/useRpc").Status>;
|
|
35
|
-
categories: import("vue").ComputedRef<import("@scayle/storefront-
|
|
36
|
-
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-
|
|
44
|
+
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
45
|
+
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
37
46
|
categoriesFetching: import("vue").Ref<boolean>;
|
|
38
47
|
categoriesError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
39
48
|
categoriesStatus: import("vue").Ref<import("../core/useRpc").Status>;
|
|
@@ -8,7 +8,7 @@ type Options = Partial<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useFilters({ params, options, key, }?: Options): Promise<{
|
|
10
10
|
data: import("vue").Ref<{
|
|
11
|
-
filters: import("@
|
|
11
|
+
filters: import("@scayle/storefront-api").FiltersEndpointResponseData;
|
|
12
12
|
unfilteredCount: number;
|
|
13
13
|
} | undefined>;
|
|
14
14
|
fetching: import("vue").Ref<boolean>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useNavigationTree({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").NavigationTree | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useNavigationTrees({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").NavigationAllEndpointResponseData | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useProduct({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Product | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -8,8 +8,17 @@ type Options = Partial<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useProducts({ params, options, key, }?: Options): Promise<{
|
|
10
10
|
data: import("vue").Ref<{
|
|
11
|
-
products: import("@scayle/storefront-
|
|
12
|
-
pagination:
|
|
11
|
+
products: import("@scayle/storefront-api").Product[];
|
|
12
|
+
pagination: {
|
|
13
|
+
current: number;
|
|
14
|
+
total: number;
|
|
15
|
+
perPage: number;
|
|
16
|
+
page: number;
|
|
17
|
+
first: number;
|
|
18
|
+
prev: number;
|
|
19
|
+
next: number;
|
|
20
|
+
last: number;
|
|
21
|
+
};
|
|
13
22
|
} | undefined>;
|
|
14
23
|
fetching: import("vue").Ref<boolean>;
|
|
15
24
|
fetch: () => Promise<void>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useProductsByIds({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Product[] | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useProductsByReferenceKeys({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").Product[] | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function usePromotions({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").PromotionsEndpointResponseData | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function usePromotionsByIds({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@scayle/storefront-
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").PromotionsEndpointResponseData | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -4,7 +4,7 @@ type Options = Partial<{
|
|
|
4
4
|
key: string;
|
|
5
5
|
}>;
|
|
6
6
|
export declare function useShopConfiguration({ options, key, }?: Options): Promise<{
|
|
7
|
-
data: import("vue").Ref<import("@
|
|
7
|
+
data: import("vue").Ref<import("@scayle/storefront-api").ShopConfigurationResponseData | undefined>;
|
|
8
8
|
fetching: import("vue").Ref<boolean>;
|
|
9
9
|
fetch: () => Promise<void>;
|
|
10
10
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
|
@@ -11,5 +11,5 @@ export declare const useStorefrontSearch: (searchQuery: Ref<string>, { params, k
|
|
|
11
11
|
pending: import("vue").Ref<boolean>;
|
|
12
12
|
resetSearch: () => void;
|
|
13
13
|
getSearchSuggestions: () => Promise<void>;
|
|
14
|
-
resolveSearch: () => Promise<import("@scayle/storefront-
|
|
14
|
+
resolveSearch: () => Promise<import("@scayle/storefront-api").SearchEntity | null | undefined>;
|
|
15
15
|
};
|
|
@@ -7,7 +7,7 @@ type Options = Partial<{
|
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function useVariant({ params, options, key, }?: Options): Promise<{
|
|
10
|
-
data: import("vue").Ref<import("@
|
|
10
|
+
data: import("vue").Ref<import("@scayle/storefront-api").VariantDetail[] | undefined>;
|
|
11
11
|
fetching: import("vue").Ref<boolean>;
|
|
12
12
|
fetch: () => Promise<void>;
|
|
13
13
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
|
package/dist/runtime/context.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { getRequestIP, getRequestHeaders } from "h3";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Cached,
|
|
4
|
+
createAndPurifyHeaders,
|
|
5
|
+
StorefrontAPIClient
|
|
6
|
+
} from "@scayle/storefront-core";
|
|
4
7
|
import {
|
|
5
8
|
generateBasketKey,
|
|
6
9
|
generateWishlistKey
|
|
@@ -80,11 +83,13 @@ export const buildContext = async (context) => {
|
|
|
80
83
|
const idpConfig = $shopConfig.idp ?? $storefront.idp;
|
|
81
84
|
const baseContext = {
|
|
82
85
|
cached: new Cached($cache, $log, "", $storefront.cache?.enabled ?? true).execute,
|
|
83
|
-
bapiClient:
|
|
86
|
+
bapiClient: new StorefrontAPIClient({
|
|
84
87
|
host: bapiConfig.host,
|
|
85
88
|
shopId: $shopConfig.shopId,
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
auth: {
|
|
90
|
+
type: "token",
|
|
91
|
+
token: bapiConfig.token
|
|
92
|
+
}
|
|
88
93
|
}),
|
|
89
94
|
auth: {
|
|
90
95
|
resetPasswordUrl: $shopConfig.auth?.resetPasswordUrl
|
|
@@ -5,7 +5,7 @@ import { useRuntimeConfig } from "#imports";
|
|
|
5
5
|
const REDIS_REDIRECT_PREFIX = ":REDIRECT";
|
|
6
6
|
const REDIRECT_NOT_SET = "REDIRECT_NOT_SET";
|
|
7
7
|
const REDIRECT_CACHE_TTL = 120;
|
|
8
|
-
async function fetchRedirectWithCache(sourceUrl,
|
|
8
|
+
async function fetchRedirectWithCache(sourceUrl, storefrontAPIClient, redirectCache, log) {
|
|
9
9
|
const cachedResult = await redirectCache.get(sourceUrl);
|
|
10
10
|
if (cachedResult) {
|
|
11
11
|
if (cachedResult === REDIRECT_NOT_SET) {
|
|
@@ -16,7 +16,7 @@ async function fetchRedirectWithCache(sourceUrl, bapiClient, redirectCache, log)
|
|
|
16
16
|
log.debug("No cached result for redirect; querying BAPI");
|
|
17
17
|
let bapiResult;
|
|
18
18
|
try {
|
|
19
|
-
bapiResult = await
|
|
19
|
+
bapiResult = await storefrontAPIClient.redirects.post(sourceUrl);
|
|
20
20
|
} catch (error) {
|
|
21
21
|
log.error(
|
|
22
22
|
`Error: Failed to fetch redirects ... ${error} for sourceURL: ${sourceUrl}`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.69.1",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@nuxt/kit": "3.11.1",
|
|
64
64
|
"@opentelemetry/api": "1.8.0",
|
|
65
65
|
"@scayle/h3-session": "0.4.0",
|
|
66
|
-
"@scayle/storefront-core": "7.
|
|
66
|
+
"@scayle/storefront-core": "7.50.1",
|
|
67
67
|
"@scayle/unstorage-compression-driver": "0.1.3",
|
|
68
68
|
"@vueuse/core": "10.9.0",
|
|
69
69
|
"consola": "3.2.3",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"@nuxt/eslint": "0.3.12",
|
|
84
84
|
"@nuxt/module-builder": "0.5.5",
|
|
85
85
|
"@nuxt/schema": "3.11.1",
|
|
86
|
-
"@nuxt/test-utils": "3.
|
|
87
|
-
"@scayle/eslint-config-storefront": "4.
|
|
86
|
+
"@nuxt/test-utils": "3.13.0",
|
|
87
|
+
"@scayle/eslint-config-storefront": "4.2.0",
|
|
88
88
|
"@scayle/eslint-plugin-vue-composable": "0.1.1",
|
|
89
89
|
"@types/node": "20.12.12",
|
|
90
90
|
"dprint": "0.45.1",
|