@graphcommerce/algolia-products 9.0.0-canary.101 → 9.0.0-canary.103

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @graphcommerce/algolia-products
2
2
 
3
- ## 9.0.0-canary.101
3
+ ## 9.0.0-canary.103
4
4
 
5
5
  ## 9.0.0-canary.100
6
6
 
@@ -8,98 +8,24 @@
8
8
 
9
9
  - [#2417](https://github.com/graphcommerce-org/graphcommerce/pull/2417) [`743e7e2`](https://github.com/graphcommerce-org/graphcommerce/commit/743e7e275c8f0bfe32a5240c08eed92120085cc0) - Prevent errors by returning string instead of array ([@Renzovh](https://github.com/Renzovh))
10
10
 
11
- ## 9.0.0-canary.99
12
-
13
- ## 9.0.0-canary.98
14
-
15
- ## 9.0.0-canary.97
16
-
17
- ## 9.0.0-canary.96
18
-
19
- ## 9.0.0-canary.95
20
-
21
- ## 9.0.0-canary.94
22
-
23
- ## 9.0.0-canary.93
24
-
25
- ## 9.0.0-canary.92
26
-
27
- ## 9.0.0-canary.91
28
-
29
- ## 9.0.0-canary.90
30
-
31
- ## 9.0.0-canary.89
32
-
33
- ## 9.0.0-canary.88
34
-
35
- ## 9.0.0-canary.87
36
-
37
- ## 9.0.0-canary.86
38
-
39
- ## 9.0.0-canary.85
40
-
41
11
  ## 9.0.0-canary.84
42
12
 
43
13
  ### Minor Changes
44
14
 
45
15
  - [#2377](https://github.com/graphcommerce-org/graphcommerce/pull/2377) [`56fcc45`](https://github.com/graphcommerce-org/graphcommerce/commit/56fcc45b60e43574c64fcdd7b02f8062d677e250) - Integrated algolia product queries into graphql-mesh. Provides fast and accurate searches, that can be personalised via magento-algolia and its algolia dashboard ([@Renzovh](https://github.com/Renzovh))
46
16
 
47
- ## 9.0.0-canary.83
48
-
49
- ## 9.0.0-canary.82
50
-
51
- ## 9.0.0-canary.81
52
-
53
- ## 9.0.0-canary.80
54
-
55
- ## 9.0.0-canary.79
56
-
57
- ## 9.0.0-canary.78
58
-
59
- ## 9.0.0-canary.77
60
-
61
- ## 9.0.0-canary.76
62
-
63
- ## 9.0.0-canary.75
64
-
65
- ## 9.0.0-canary.74
66
-
67
- ## 9.0.0-canary.73
68
-
69
- ## 9.0.0-canary.72
70
-
71
- ## 9.0.0-canary.71
72
-
73
- ## 9.0.0-canary.70
74
-
75
- ## 9.0.0-canary.69
76
-
77
- ## 9.0.0-canary.68
78
-
79
17
  ## 9.0.0-canary.67
80
18
 
81
19
  ### Patch Changes
82
20
 
83
21
  - [#2336](https://github.com/graphcommerce-org/graphcommerce/pull/2336) [`95ce63c`](https://github.com/graphcommerce-org/graphcommerce/commit/95ce63cd32463835239ba959734cdaf1aa7f3f7b) - Added algolia search suggestions ([@Renzovh](https://github.com/Renzovh))
84
22
 
85
- ## 9.0.0-canary.66
86
-
87
- ## 9.0.0-canary.65
88
-
89
23
  ## 9.0.0-canary.64
90
24
 
91
25
  ### Patch Changes
92
26
 
93
27
  - [#2334](https://github.com/graphcommerce-org/graphcommerce/pull/2334) [`3140735`](https://github.com/graphcommerce-org/graphcommerce/commit/3140735a8a49f8bebcbfde4e581515884446e05d) - Added support for customer group pricing ([@Renzovh](https://github.com/Renzovh))
94
28
 
95
- ## 9.0.0-canary.63
96
-
97
- ## 9.0.0-canary.62
98
-
99
- ## 9.0.0-canary.61
100
-
101
- ## 9.0.0-canary.60
102
-
103
29
  ## 9.0.0-canary.59
104
30
 
105
31
  ### Minor Changes
@@ -1,4 +1,5 @@
1
- import { ApolloCache, setContext } from '@graphcommerce/graphql'
1
+ import type { ApolloCache } from '@graphcommerce/graphql'
2
+ import { setContext } from '@graphcommerce/graphql'
2
3
  import { CustomerDocument } from '@graphcommerce/magento-customer'
3
4
 
4
5
  declare module '@apollo/client' {
@@ -5,8 +5,8 @@ import type {
5
5
  CategoryResult,
6
6
  MeshContext,
7
7
  } from '@graphcommerce/graphql-mesh'
8
- import { AttributeList } from './getAttributeList'
9
- import { GetStoreConfigReturn } from './getStoreConfig'
8
+ import type { AttributeList } from './getAttributeList'
9
+ import type { GetStoreConfigReturn } from './getStoreConfig'
10
10
 
11
11
  type AlgoliaFacets = { [facetName: string]: AlgoliaFacetOption }
12
12
  type AlgoliaFacetOption = { [facetOption: string]: number }
@@ -109,6 +109,7 @@ export function algoliaPricesToPricesAggregations(pricesList: {
109
109
  return Object.values(pricesBucket)
110
110
  }
111
111
 
112
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
112
113
  function assertAlgoliaFacets(facets: any): facets is AlgoliaFacets {
113
114
  return true
114
115
  }
@@ -11,9 +11,7 @@ import type {
11
11
  ResolversParentTypes,
12
12
  ResolversTypes,
13
13
  } from '@graphcommerce/graphql-mesh'
14
- // eslint-disable-next-line import/no-extraneous-dependencies
15
- import { GraphQLResolveInfo } from 'graphql'
16
- import { GetStoreConfigReturn } from './getStoreConfig'
14
+ import type { GetStoreConfigReturn } from './getStoreConfig'
17
15
 
18
16
  export function assertAdditional(
19
17
  additional: unknown,
@@ -19,7 +19,7 @@ export async function getAttributeList(context: MeshContext): Promise<AttributeL
19
19
  entityType: 'CATALOG_PRODUCT',
20
20
  filters: {},
21
21
  },
22
- selectionSet: `{ items{ code label } }`,
22
+ selectionSet: '{ items{ code label } }',
23
23
  context,
24
24
  }).then((res) => res?.items)) as { label?: string; code: string }[]
25
25
  attributeListCache = filterNonNullableKeys(items, ['label'])
@@ -1,4 +1,4 @@
1
- import { MeshContext, Maybe, StoreConfig } from '@graphcommerce/graphql-mesh'
1
+ import type { MeshContext, Maybe, StoreConfig } from '@graphcommerce/graphql-mesh'
2
2
 
3
3
  export type GetStoreConfigReturn =
4
4
  | Maybe<
@@ -7,8 +7,8 @@ import {
7
7
  isFilterTypeRange,
8
8
  isFilterTypeMatch,
9
9
  } from '@graphcommerce/magento-product'
10
- import { InputMaybe } from '@graphcommerce/next-config'
11
- import { GetStoreConfigReturn } from './getStoreConfig'
10
+ import type { InputMaybe } from '@graphcommerce/next-config'
11
+ import type { GetStoreConfigReturn } from './getStoreConfig'
12
12
  import { nonNullable } from './utils'
13
13
 
14
14
  /**
package/mesh/resolvers.ts CHANGED
@@ -1,11 +1,9 @@
1
- import {
2
- AlgoliasearchResponse,
3
- hasSelectionSetPath,
4
- type Resolvers,
5
- } from '@graphcommerce/graphql-mesh'
1
+ import type { AlgoliasearchResponse, Resolvers } from '@graphcommerce/graphql-mesh'
2
+ import { hasSelectionSetPath } from '@graphcommerce/graphql-mesh'
6
3
  import type { GraphQLError, GraphQLResolveInfo } from 'graphql'
7
4
  import { algoliaFacetsToAggregations, getCategoryList } from './algoliaFacetsToAggregations'
8
- import { algoliaHitToMagentoProduct, ProductsItemsItem } from './algoliaHitToMagentoProduct'
5
+ import type { ProductsItemsItem } from './algoliaHitToMagentoProduct'
6
+ import { algoliaHitToMagentoProduct } from './algoliaHitToMagentoProduct'
9
7
  import { getAlgoliaSettings } from './getAlgoliaSettings'
10
8
  import { getAttributeList } from './getAttributeList'
11
9
  import { getGroupId } from './getGroupId'
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  AlgoliasettingsResponse,
3
3
  MeshContext,
4
4
  ProductAttributeSortInput,
@@ -6,7 +6,7 @@ import {
6
6
  SortField,
7
7
  } from '@graphcommerce/graphql-mesh'
8
8
  import { nonNullable } from '@graphcommerce/magento-customer'
9
- import { AttributeList } from './getAttributeList'
9
+ import type { AttributeList } from './getAttributeList'
10
10
  import { getIndexName } from './getIndexName'
11
11
 
12
12
  export type SortingOptions = Record<string, SortField & { dirs: SortEnum[] }>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/algolia-products",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.101",
5
+ "version": "9.0.0-canary.103",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -15,14 +15,14 @@
15
15
  "generate": "tsx scripts/generate-spec.mts"
16
16
  },
17
17
  "peerDependencies": {
18
- "@graphcommerce/google-datalayer": "^9.0.0-canary.101",
19
- "@graphcommerce/graphql": "^9.0.0-canary.101",
20
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.101",
21
- "@graphcommerce/magento-customer": "^9.0.0-canary.101",
22
- "@graphcommerce/magento-product": "^9.0.0-canary.101",
23
- "@graphcommerce/magento-search": "^9.0.0-canary.101",
24
- "@graphcommerce/next-config": "^9.0.0-canary.101",
25
- "@graphcommerce/next-ui": "^9.0.0-canary.101",
18
+ "@graphcommerce/google-datalayer": "^9.0.0-canary.103",
19
+ "@graphcommerce/graphql": "^9.0.0-canary.103",
20
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.103",
21
+ "@graphcommerce/magento-customer": "^9.0.0-canary.103",
22
+ "@graphcommerce/magento-product": "^9.0.0-canary.103",
23
+ "@graphcommerce/magento-search": "^9.0.0-canary.103",
24
+ "@graphcommerce/next-config": "^9.0.0-canary.103",
25
+ "@graphcommerce/next-ui": "^9.0.0-canary.103",
26
26
  "react": "^18.2.0"
27
27
  },
28
28
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { GraphQLProviderProps } from '@graphcommerce/graphql'
1
+ import type { GraphQLProviderProps } from '@graphcommerce/graphql'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { customerGroupIdLink } from '../link/customerGroupIdLink'
4
4
 
@@ -3,7 +3,7 @@ import type {
3
3
  productListApplyCategoryDefaults as productListApplyDefaults,
4
4
  categoryDefaultsToProductListFilters as defaultsToProductListFilters,
5
5
  } from '@graphcommerce/magento-product'
6
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
6
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
7
7
  import { applyEngineVariables } from '../utils/applyEngineVariable'
8
8
 
9
9
  export const config: PluginConfig = {
@@ -3,7 +3,7 @@ import type {
3
3
  productListApplySearchDefaults as productListApplyDefaults,
4
4
  searchDefaultsToProductListFilters as defaultsToProductListFilters,
5
5
  } from '@graphcommerce/magento-search'
6
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
6
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
7
7
  import { applyEngineVariables } from '../utils/applyEngineVariable'
8
8
 
9
9
  export const config: PluginConfig = {