@scayle/storefront-core 7.39.1 → 7.40.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 +12 -0
- package/dist/rpc/methods/user.cjs +8 -8
- package/dist/rpc/methods/user.mjs +8 -8
- package/dist/types/bapi/campaign.cjs +1 -0
- package/dist/types/bapi/campaign.d.ts +1 -0
- package/dist/types/bapi/campaign.mjs +0 -0
- package/dist/types/index.cjs +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.mjs +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -38,14 +38,14 @@ const refreshUser = exports.refreshUser = async function refreshUser2(context) {
|
|
|
38
38
|
const client = new _customer.CustomerAPIClient(context);
|
|
39
39
|
try {
|
|
40
40
|
const user = await client.getMe(shopId);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
if (!user.authentication) {
|
|
42
|
+
user.authentication = {
|
|
43
|
+
type: "idp"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
user.authentication.storefrontAccessToken = accessToken;
|
|
47
|
+
user.loginShopId = shopId;
|
|
48
|
+
context.updateUser(user);
|
|
49
49
|
return {
|
|
50
50
|
user
|
|
51
51
|
};
|
|
@@ -25,14 +25,14 @@ const refreshUser = async function refreshUser2(context) {
|
|
|
25
25
|
const client = new CustomerAPIClient(context);
|
|
26
26
|
try {
|
|
27
27
|
const user = await client.getMe(shopId);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
if (!user.authentication) {
|
|
29
|
+
user.authentication = {
|
|
30
|
+
type: "idp"
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
user.authentication.storefrontAccessToken = accessToken;
|
|
34
|
+
user.loginShopId = shopId;
|
|
35
|
+
context.updateUser(user);
|
|
36
36
|
return { user };
|
|
37
37
|
} catch {
|
|
38
38
|
await context.destroySession();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Campaign } from '@aboutyou/backbone/types/campaign';
|
|
File without changes
|
package/dist/types/index.cjs
CHANGED
|
@@ -91,6 +91,17 @@ Object.keys(_brand).forEach(function (key) {
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
|
+
var _campaign = require("./bapi/campaign.cjs");
|
|
95
|
+
Object.keys(_campaign).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _campaign[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _campaign[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
94
105
|
var _category = require("./bapi/category.cjs");
|
|
95
106
|
Object.keys(_category).forEach(function (key) {
|
|
96
107
|
if (key === "default" || key === "__esModule") return;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './api/auth';
|
|
|
7
7
|
export type { BapiClient } from '@aboutyou/backbone';
|
|
8
8
|
export * from './bapi/basket';
|
|
9
9
|
export * from './bapi/brand';
|
|
10
|
+
export * from './bapi/campaign';
|
|
10
11
|
export * from './bapi/category';
|
|
11
12
|
export * from './bapi/filter';
|
|
12
13
|
export * from './bapi/navigation';
|
package/dist/types/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./api/context.mjs";
|
|
|
6
6
|
export * from "./api/auth.mjs";
|
|
7
7
|
export * from "./bapi/basket.mjs";
|
|
8
8
|
export * from "./bapi/brand.mjs";
|
|
9
|
+
export * from "./bapi/campaign.mjs";
|
|
9
10
|
export * from "./bapi/category.mjs";
|
|
10
11
|
export * from "./bapi/filter.mjs";
|
|
11
12
|
export * from "./bapi/navigation.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.40.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@aboutyou/backbone": "16.1.1",
|
|
63
63
|
"crypto-js": "4.2.0",
|
|
64
|
-
"jose": "5.2.
|
|
64
|
+
"jose": "5.2.2",
|
|
65
65
|
"radash": "11.0.0",
|
|
66
66
|
"slugify": "1.6.6",
|
|
67
67
|
"ufo": "1.4.0",
|