@graphcommerce/algolia-personalization 9.0.0-canary.99 → 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,34 +1,50 @@
1
1
  # @graphcommerce/algolia-personalization
2
2
 
3
- ## 9.0.0-canary.99
3
+ ## 9.0.0
4
4
 
5
- ## 9.0.0-canary.98
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))
6
22
 
7
- ## 9.0.0-canary.97
23
+ ## 9.0.0-canary.115
8
24
 
9
- ## 9.0.0-canary.96
25
+ ## 9.0.0-canary.114
10
26
 
11
- ## 9.0.0-canary.95
27
+ ## 9.0.0-canary.113
12
28
 
13
- ## 9.0.0-canary.94
29
+ ## 9.0.0-canary.112
14
30
 
15
- ## 9.0.0-canary.93
31
+ ## 9.0.0-canary.111
16
32
 
17
- ## 9.0.0-canary.92
33
+ ## 9.0.0-canary.110
18
34
 
19
- ## 9.0.0-canary.91
35
+ ## 9.0.0-canary.109
20
36
 
21
- ## 9.0.0-canary.90
37
+ ## 9.0.0-canary.108
22
38
 
23
- ## 9.0.0-canary.89
39
+ ## 9.0.0-canary.107
24
40
 
25
- ## 9.0.0-canary.88
41
+ ## 9.0.0-canary.106
26
42
 
27
- ## 9.0.0-canary.87
43
+ ## 9.0.0-canary.105
28
44
 
29
- ## 9.0.0-canary.86
45
+ ## 9.0.0-canary.104
30
46
 
31
- ## 9.0.0-canary.85
47
+ ## 9.0.0-canary.103
32
48
 
33
49
  ## 9.0.0-canary.84
34
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.99",
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.99",
19
- "@graphcommerce/algolia-products": "^9.0.0-canary.99",
20
- "@graphcommerce/google-datalayer": "^9.0.0-canary.99",
21
- "@graphcommerce/graphql": "^9.0.0-canary.99",
22
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.99",
23
- "@graphcommerce/magento-customer": "^9.0.0-canary.99",
24
- "@graphcommerce/magento-product": "^9.0.0-canary.99",
25
- "@graphcommerce/next-config": "^9.0.0-canary.99",
26
- "@graphcommerce/next-ui": "^9.0.0-canary.99",
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
  }