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