@graphcommerce/algolia-products 9.0.0-canary.101 → 9.0.0-canary.104
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 +3 -75
- package/link/customerGroupIdLink.ts +2 -1
- package/mesh/algoliaFacetsToAggregations.ts +3 -2
- package/mesh/algoliaHitToMagentoProduct.ts +1 -3
- package/mesh/getAttributeList.ts +1 -1
- package/mesh/getStoreConfig.ts +1 -1
- package/mesh/productFilterInputToAlgoliafacetFiltersInput.ts +4 -4
- package/mesh/resolvers.ts +4 -6
- package/mesh/sortOptions.ts +2 -2
- package/package.json +9 -9
- package/plugins/GraphQLProviderAlgoliaCustomerGroupId.tsx +1 -1
- package/plugins/magentoProductApplyAlgoliaEngine.ts +3 -3
- package/plugins/magentoSearchApplyAlgoliaEngine.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @graphcommerce/algolia-products
|
|
2
2
|
|
|
3
|
-
## 9.0.0-canary.
|
|
3
|
+
## 9.0.0-canary.104
|
|
4
|
+
|
|
5
|
+
## 9.0.0-canary.103
|
|
4
6
|
|
|
5
7
|
## 9.0.0-canary.100
|
|
6
8
|
|
|
@@ -8,98 +10,24 @@
|
|
|
8
10
|
|
|
9
11
|
- [#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
12
|
|
|
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
13
|
## 9.0.0-canary.84
|
|
42
14
|
|
|
43
15
|
### Minor Changes
|
|
44
16
|
|
|
45
17
|
- [#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
18
|
|
|
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
19
|
## 9.0.0-canary.67
|
|
80
20
|
|
|
81
21
|
### Patch Changes
|
|
82
22
|
|
|
83
23
|
- [#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
24
|
|
|
85
|
-
## 9.0.0-canary.66
|
|
86
|
-
|
|
87
|
-
## 9.0.0-canary.65
|
|
88
|
-
|
|
89
25
|
## 9.0.0-canary.64
|
|
90
26
|
|
|
91
27
|
### Patch Changes
|
|
92
28
|
|
|
93
29
|
- [#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
30
|
|
|
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
31
|
## 9.0.0-canary.59
|
|
104
32
|
|
|
105
33
|
### Minor Changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApolloCache
|
|
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
|
-
|
|
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,
|
package/mesh/getAttributeList.ts
CHANGED
|
@@ -19,7 +19,7 @@ export async function getAttributeList(context: MeshContext): Promise<AttributeL
|
|
|
19
19
|
entityType: 'CATALOG_PRODUCT',
|
|
20
20
|
filters: {},
|
|
21
21
|
},
|
|
22
|
-
selectionSet:
|
|
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'])
|
package/mesh/getStoreConfig.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
ProductAttributeFilterInput,
|
|
3
2
|
AlgolianumericFilters_Input,
|
|
3
|
+
ProductAttributeFilterInput,
|
|
4
4
|
} from '@graphcommerce/graphql-mesh'
|
|
5
5
|
import {
|
|
6
6
|
isFilterTypeEqual,
|
|
7
|
-
isFilterTypeRange,
|
|
8
7
|
isFilterTypeMatch,
|
|
8
|
+
isFilterTypeRange,
|
|
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
|
-
|
|
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 {
|
|
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'
|
package/mesh/sortOptions.ts
CHANGED
|
@@ -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.
|
|
5
|
+
"version": "9.0.0-canary.104",
|
|
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.
|
|
19
|
-
"@graphcommerce/graphql": "^9.0.0-canary.
|
|
20
|
-
"@graphcommerce/graphql-mesh": "^9.0.0-canary.
|
|
21
|
-
"@graphcommerce/magento-customer": "^9.0.0-canary.
|
|
22
|
-
"@graphcommerce/magento-product": "^9.0.0-canary.
|
|
23
|
-
"@graphcommerce/magento-search": "^9.0.0-canary.
|
|
24
|
-
"@graphcommerce/next-config": "^9.0.0-canary.
|
|
25
|
-
"@graphcommerce/next-ui": "^9.0.0-canary.
|
|
18
|
+
"@graphcommerce/google-datalayer": "^9.0.0-canary.104",
|
|
19
|
+
"@graphcommerce/graphql": "^9.0.0-canary.104",
|
|
20
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.104",
|
|
21
|
+
"@graphcommerce/magento-customer": "^9.0.0-canary.104",
|
|
22
|
+
"@graphcommerce/magento-product": "^9.0.0-canary.104",
|
|
23
|
+
"@graphcommerce/magento-search": "^9.0.0-canary.104",
|
|
24
|
+
"@graphcommerce/next-config": "^9.0.0-canary.104",
|
|
25
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.104",
|
|
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
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
useProductListApplyCategoryDefaults as useProductListApplyDefaults,
|
|
3
|
-
productListApplyCategoryDefaults as productListApplyDefaults,
|
|
4
2
|
categoryDefaultsToProductListFilters as defaultsToProductListFilters,
|
|
3
|
+
productListApplyCategoryDefaults as productListApplyDefaults,
|
|
4
|
+
useProductListApplyCategoryDefaults as useProductListApplyDefaults,
|
|
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 = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
useProductListApplySearchDefaults as useProductListApplyDefaults,
|
|
3
|
-
productListApplySearchDefaults as productListApplyDefaults,
|
|
4
2
|
searchDefaultsToProductListFilters as defaultsToProductListFilters,
|
|
3
|
+
productListApplySearchDefaults as productListApplyDefaults,
|
|
4
|
+
useProductListApplySearchDefaults as useProductListApplyDefaults,
|
|
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 = {
|