@faststore/api 1.12.8 → 1.12.12

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.
@@ -5,6 +5,7 @@ export declare type SearchEvent = {
5
5
  misspelled: boolean;
6
6
  match: number;
7
7
  operator: 'and' | 'or';
8
+ locale: string;
8
9
  session?: string;
9
10
  anonymous?: string;
10
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/api",
3
- "version": "1.12.8",
3
+ "version": "1.12.12",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -46,5 +46,5 @@
46
46
  "peerDependencies": {
47
47
  "graphql": "^15.6.0"
48
48
  },
49
- "gitHead": "52dd802b9e028d3860603e47387f250a24f264ce"
49
+ "gitHead": "9ef2cae11e8ae9458675d0fbfdcabe0eac0c8860"
50
50
  }
@@ -37,6 +37,7 @@ export type SearchEvent = {
37
37
  misspelled: boolean
38
38
  match: number
39
39
  operator: 'and' | 'or'
40
+ locale: string
40
41
  session?: string
41
42
  anonymous?: string
42
43
  }
@@ -50,10 +51,8 @@ export const SP = ({ account }: Options, _: Context) => {
50
51
  body: JSON.stringify({
51
52
  ...options,
52
53
  agent: '@faststore/api',
53
- anonymous: user.anonymous(),
54
- session: user.session(),
55
- // session: 'zZlNhqz1vFJP6iPG5Oqtt',
56
- // anonymous: 'Om1TNluGvgmSgU5OOTvkkd',
54
+ anonymous: user.anonymous(), // 'zZlNhqz1vFJP6iPG5Oqtt'
55
+ session: user.session(), // 'Om1TNluGvgmSgU5OOTvkkd'
57
56
  }),
58
57
  headers: {
59
58
  'content-type': 'application/json',
@@ -60,6 +60,7 @@ export const StoreSearchResult: Record<string, Resolver<Root>> = {
60
60
  misspelled: products.correction?.misspelled ?? false,
61
61
  match: products.recordsFiltered,
62
62
  operator: products.operator,
63
+ locale: ctx.storage.locale,
63
64
  }).catch(console.error)
64
65
  }
65
66