@faststore/api 2.1.38 → 2.1.66
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/api.cjs.development.js +10 -6
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +10 -6
- package/dist/api.esm.js.map +1 -1
- package/dist/platforms/vtex/clients/commerce/types/Session.d.ts +5 -0
- package/package.json +4 -4
- package/src/platforms/vtex/clients/commerce/index.ts +4 -0
- package/src/platforms/vtex/clients/commerce/types/Session.ts +6 -0
- package/src/platforms/vtex/resolvers/validateCart.ts +1 -2
|
@@ -6,6 +6,7 @@ export interface Namespaces {
|
|
|
6
6
|
profile?: Profile;
|
|
7
7
|
store?: Store;
|
|
8
8
|
checkout?: Checkout;
|
|
9
|
+
public?: Public;
|
|
9
10
|
}
|
|
10
11
|
export interface Value {
|
|
11
12
|
value: string;
|
|
@@ -26,3 +27,7 @@ export interface Profile {
|
|
|
26
27
|
export interface Checkout {
|
|
27
28
|
orderFormId?: Value;
|
|
28
29
|
}
|
|
30
|
+
export interface Public {
|
|
31
|
+
orderFormId?: Value;
|
|
32
|
+
items?: Value;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.66",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@envelop/core": "^2.6.0",
|
|
39
|
-
"@faststore/eslint-config": "^2.1.
|
|
40
|
-
"@faststore/shared": "^2.1.
|
|
39
|
+
"@faststore/eslint-config": "^2.1.53",
|
|
40
|
+
"@faststore/shared": "^2.1.53",
|
|
41
41
|
"@graphql-codegen/cli": "2.2.0",
|
|
42
42
|
"@graphql-codegen/typescript": "2.2.2",
|
|
43
43
|
"@types/express": "^4.17.16",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"@envelop/core": "^1 || ^2",
|
|
57
57
|
"graphql": "^15.6.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "a88fa12d654e7145278b839345efbf75e43e0228"
|
|
60
60
|
}
|
|
@@ -7,6 +7,7 @@ export interface Namespaces {
|
|
|
7
7
|
profile?: Profile
|
|
8
8
|
store?: Store
|
|
9
9
|
checkout?: Checkout
|
|
10
|
+
public?: Public
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export interface Value {
|
|
@@ -31,3 +32,8 @@ export interface Profile {
|
|
|
31
32
|
export interface Checkout {
|
|
32
33
|
orderFormId?: Value
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
export interface Public {
|
|
37
|
+
orderFormId?: Value
|
|
38
|
+
items?: Value
|
|
39
|
+
}
|
|
@@ -213,7 +213,7 @@ async function getOrderNumberFromSession(
|
|
|
213
213
|
|
|
214
214
|
if (cookieSession) {
|
|
215
215
|
const { namespaces } = await commerce.getSessionOrder()
|
|
216
|
-
return namespaces.
|
|
216
|
+
return namespaces.public?.orderFormId?.value ?? undefined
|
|
217
217
|
}
|
|
218
218
|
return
|
|
219
219
|
}
|
|
@@ -325,7 +325,6 @@ export const validateCart = async (
|
|
|
325
325
|
headers,
|
|
326
326
|
commerce
|
|
327
327
|
)
|
|
328
|
-
|
|
329
328
|
const orderNumber = orderNumberFromSession ?? orderNumberFromCart ?? ''
|
|
330
329
|
|
|
331
330
|
// Step1: Get OrderForm from VTEX Commerce
|