@faststore/api 2.0.49-alpha.0 → 2.0.59-alpha.0

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.
@@ -1,4 +1,4 @@
1
- import type { Context, Options } from '../../index';
1
+ import type { Context, Options } from '../../';
2
2
  import type { SelectedFacet } from '../../utils/facets';
3
3
  import type { Facet, FacetValueBoolean, FacetSearchResult } from './types/FacetSearchResult';
4
4
  import type { ProductSearchResult, Suggestion } from './types/ProductSearchResult';
@@ -1,4 +1,4 @@
1
- import type { Options, Context } from '../../index';
1
+ import type { Options, Context } from '../../';
2
2
  export declare type SearchEvent = {
3
3
  type: 'search.query';
4
4
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/api",
3
- "version": "2.0.49-alpha.0",
3
+ "version": "2.0.59-alpha.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -34,6 +34,7 @@
34
34
  "@faststore/shared": "^2.0.49-alpha.0",
35
35
  "@graphql-codegen/cli": "2.2.0",
36
36
  "@graphql-codegen/typescript": "2.2.2",
37
+ "@types/express": "^4.17.16",
37
38
  "concurrently": "^6.2.1",
38
39
  "eslint": "7.32.0",
39
40
  "express": "^4.17.3",
@@ -48,5 +49,5 @@
48
49
  "peerDependencies": {
49
50
  "graphql": "^15.6.0"
50
51
  },
51
- "gitHead": "7046452f096b9b7e33b10db94e0213c3f10f91b5"
52
+ "gitHead": "c77d8db1934c7d2c6f7ae9cc8a166477edbfae01"
52
53
  }
@@ -1,6 +1,6 @@
1
1
  import { fetchAPI } from '../fetch'
2
2
  import type { IStoreSelectedFacet } from '../../../../__generated__/schema'
3
- import type { Context, Options } from '../../index'
3
+ import type { Context, Options } from '../../'
4
4
  import type { SelectedFacet } from '../../utils/facets'
5
5
  import type {
6
6
  Facet,
@@ -67,7 +67,9 @@ export const IntelligentSearch = (
67
67
 
68
68
  const getRegionFacet = (): IStoreSelectedFacet | null => {
69
69
  const { regionId, seller } = ctx.storage.channel
70
- const sellerRegionId = seller ? Buffer.from(`SW#${seller}`).toString('base64') : null
70
+ const sellerRegionId = seller
71
+ ? Buffer.from(`SW#${seller}`).toString('base64')
72
+ : null
71
73
  const facet = sellerRegionId ?? regionId
72
74
 
73
75
  if (!facet) {
@@ -3,7 +3,7 @@
3
3
  * More info at: https://www.notion.so/vtexhandbook/Event-API-Documentation-48eee26730cf4d7f80f8fd7262231f84
4
4
  */
5
5
  import { fetchAPI } from '../fetch'
6
- import type { Options, Context } from '../../index'
6
+ import type { Options, Context } from '../../'
7
7
 
8
8
  const THIRTY_MINUTES_S = 30 * 60
9
9
  const ONE_YEAR_S = 365 * 24 * 3600