@graphcommerce/algolia-personalization 9.0.0-canary.98 → 9.0.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.
package/CHANGELOG.md CHANGED
@@ -1,32 +1,50 @@
1
1
  # @graphcommerce/algolia-personalization
2
2
 
3
- ## 9.0.0-canary.98
3
+ ## 9.0.0
4
4
 
5
- ## 9.0.0-canary.97
5
+ ### Minor Changes
6
+
7
+ - [#2377](https://github.com/graphcommerce-org/graphcommerce/pull/2377) [`56fcc45`](https://github.com/graphcommerce-org/graphcommerce/commit/56fcc45b60e43574c64fcdd7b02f8062d677e250) - Integrated algolia personalisation and algolia analytics into GraphQL Mesh. Built user profiles and gives user personalised results. Keep track of the user data and view in algolia analytics dashboard. ([@Renzovh](https://github.com/Renzovh))
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2452](https://github.com/graphcommerce-org/graphcommerce/pull/2452) [`5dfd3b2`](https://github.com/graphcommerce-org/graphcommerce/commit/5dfd3b201255ef35263485d04153d37bb7e4fe67) - Renamed useInContextQuery to usePrivateQuery ([@paales](https://github.com/paales))
12
+
13
+ ## 9.0.0-canary.118
14
+
15
+ ## 9.0.0-canary.117
16
+
17
+ ## 9.0.0-canary.116
18
+
19
+ ### Patch Changes
20
+
21
+ - [#2452](https://github.com/graphcommerce-org/graphcommerce/pull/2452) [`5dfd3b2`](https://github.com/graphcommerce-org/graphcommerce/commit/5dfd3b201255ef35263485d04153d37bb7e4fe67) - Renamed useInContextQuery to usePrivateQuery ([@paales](https://github.com/paales))
22
+
23
+ ## 9.0.0-canary.115
6
24
 
7
- ## 9.0.0-canary.96
25
+ ## 9.0.0-canary.114
8
26
 
9
- ## 9.0.0-canary.95
27
+ ## 9.0.0-canary.113
10
28
 
11
- ## 9.0.0-canary.94
29
+ ## 9.0.0-canary.112
12
30
 
13
- ## 9.0.0-canary.93
31
+ ## 9.0.0-canary.111
14
32
 
15
- ## 9.0.0-canary.92
33
+ ## 9.0.0-canary.110
16
34
 
17
- ## 9.0.0-canary.91
35
+ ## 9.0.0-canary.109
18
36
 
19
- ## 9.0.0-canary.90
37
+ ## 9.0.0-canary.108
20
38
 
21
- ## 9.0.0-canary.89
39
+ ## 9.0.0-canary.107
22
40
 
23
- ## 9.0.0-canary.88
41
+ ## 9.0.0-canary.106
24
42
 
25
- ## 9.0.0-canary.87
43
+ ## 9.0.0-canary.105
26
44
 
27
- ## 9.0.0-canary.86
45
+ ## 9.0.0-canary.104
28
46
 
29
- ## 9.0.0-canary.85
47
+ ## 9.0.0-canary.103
30
48
 
31
49
  ## 9.0.0-canary.84
32
50
 
@@ -1,4 +1,4 @@
1
- import { MeshContext } from '@graphcommerce/graphql-mesh'
1
+ import type { MeshContext } from '@graphcommerce/graphql-mesh'
2
2
  // eslint-disable-next-line import/no-extraneous-dependencies
3
3
  import { parse } from 'cookie'
4
4
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/algolia-personalization",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.98",
5
+ "version": "9.0.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -15,19 +15,19 @@
15
15
  "generate": "tsx scripts/generate-insights-spec.mts"
16
16
  },
17
17
  "peerDependencies": {
18
- "@graphcommerce/algolia-insights": "^9.0.0-canary.98",
19
- "@graphcommerce/algolia-products": "^9.0.0-canary.98",
20
- "@graphcommerce/google-datalayer": "^9.0.0-canary.98",
21
- "@graphcommerce/graphql": "^9.0.0-canary.98",
22
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.98",
23
- "@graphcommerce/magento-customer": "^9.0.0-canary.98",
24
- "@graphcommerce/magento-product": "^9.0.0-canary.98",
25
- "@graphcommerce/next-config": "^9.0.0-canary.98",
26
- "@graphcommerce/next-ui": "^9.0.0-canary.98",
18
+ "@graphcommerce/algolia-insights": "^9.0.0",
19
+ "@graphcommerce/algolia-products": "^9.0.0",
20
+ "@graphcommerce/google-datalayer": "^9.0.0",
21
+ "@graphcommerce/graphql": "^9.0.0",
22
+ "@graphcommerce/graphql-mesh": "^9.0.0",
23
+ "@graphcommerce/magento-customer": "^9.0.0",
24
+ "@graphcommerce/magento-product": "^9.0.0",
25
+ "@graphcommerce/next-config": "^9.0.0",
26
+ "@graphcommerce/next-ui": "^9.0.0",
27
27
  "react": "^18.2.0"
28
28
  },
29
29
  "devDependencies": {
30
- "graphql": "^16.0.0",
31
- "tsx": "^4.16.2"
30
+ "graphql": "^16.10.0",
31
+ "tsx": "^4.19.2"
32
32
  }
33
33
  }
@@ -1,9 +1,9 @@
1
1
  import { ALGOLIA_USER_TOKEN_COOKIE_NAME } from '@graphcommerce/algolia-insights'
2
2
  import {
3
- type getInContextInput as getInContextInputType,
4
- type useInContextInput as useInContextInputType,
3
+ type getPrivateQueryContext as getPrivateQueryContextType,
4
+ type usePrivateQueryContext as usePrivateQueryContextType,
5
5
  } from '@graphcommerce/graphql'
6
- import type { InContextInput } from '@graphcommerce/graphql-mesh'
6
+ import type { PrivateContext } from '@graphcommerce/graphql-mesh'
7
7
  import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
8
8
  import { cookie } from '@graphcommerce/next-ui'
9
9
 
@@ -12,7 +12,7 @@ export const config: PluginConfig = {
12
12
  module: '@graphcommerce/graphql',
13
13
  }
14
14
 
15
- export const getInContextInput: FunctionPlugin<typeof getInContextInputType> = (
15
+ export const getPrivateQueryContext: FunctionPlugin<typeof getPrivateQueryContextType> = (
16
16
  prev,
17
17
  client,
18
18
  ...args
@@ -20,10 +20,13 @@ export const getInContextInput: FunctionPlugin<typeof getInContextInputType> = (
20
20
  const algoliaUserToken = cookie(ALGOLIA_USER_TOKEN_COOKIE_NAME)
21
21
  const res = prev(client, ...args)
22
22
  if (!algoliaUserToken) return res
23
- return { ...res, algoliaUserToken } satisfies InContextInput
23
+ return { ...res, algoliaUserToken } satisfies PrivateContext
24
24
  }
25
25
 
26
- export const useInContextInput: FunctionPlugin<typeof useInContextInputType> = (prev, ...args) => {
26
+ export const usePrivateQueryContext: FunctionPlugin<typeof usePrivateQueryContextType> = (
27
+ prev,
28
+ ...args
29
+ ) => {
27
30
  const algoliaUserToken = cookie(ALGOLIA_USER_TOKEN_COOKIE_NAME)
28
31
  const res = prev(...args)
29
32
  if (!algoliaUserToken) return res
@@ -1,5 +1,5 @@
1
1
  import type { getSearchResultsInput as getSearchResultsInputType } from '@graphcommerce/algolia-products'
2
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
2
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
3
3
  import { getUserToken } from '../mesh/getUserToken'
4
4
 
5
5
  export const config: PluginConfig = {
@@ -1,5 +1,5 @@
1
1
  import type { getSearchSuggestionsInput as getSearchSuggestionsInputType } from '@graphcommerce/algolia-products'
2
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
2
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
3
3
  import { getUserToken } from '../mesh/getUserToken'
4
4
 
5
5
  export const config: PluginConfig = {
@@ -1,3 +1,3 @@
1
- input InContextInput {
1
+ input PrivateContext {
2
2
  algoliaUserToken: String
3
3
  }
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "exclude": ["**/node_modules", "**/.*/"],
3
3
  "include": ["**/*.ts", "**/*.tsx"],
4
- "extends": "@graphcommerce/typescript-config-pwa/nextjs.json",
4
+ "extends": "@graphcommerce/typescript-config-pwa/nextjs.json"
5
5
  }