@reactionary/source 0.3.4 → 0.3.5

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reactionary/examples-node",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
7
- "@reactionary/core": "0.3.4",
8
- "@reactionary/provider-commercetools": "0.3.4",
9
- "@reactionary/provider-algolia": "0.3.4",
10
- "@reactionary/provider-medusa": "0.3.4",
11
- "@reactionary/provider-meilisearch": "0.3.4"
7
+ "@reactionary/core": "0.3.5",
8
+ "@reactionary/provider-commercetools": "0.3.5",
9
+ "@reactionary/provider-algolia": "0.3.5",
10
+ "@reactionary/provider-medusa": "0.3.5",
11
+ "@reactionary/provider-meilisearch": "0.3.5"
12
12
  },
13
13
  "type": "module"
14
14
  }
@@ -76,6 +76,8 @@ describe.each([PrimaryProvider.MEILISEARCH])(
76
76
  }
77
77
 
78
78
  expect(result.value.length).toBeGreaterThan(0);
79
+ expect(result.value[0].product.key).toBeDefined();
80
+ expect(result.value[0].recommendationIdentifier.key).toBeDefined();
79
81
  });
80
82
 
81
83
  it('should return an empty result for an unknown sku', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/source",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -12,7 +12,7 @@ import { MeiliSearch, type Hits, type RecordAny, type SearchParams, type SearchR
12
12
  import type { MeilisearchConfiguration } from '../schema/configuration.schema.js';
13
13
 
14
14
  interface MeilisearchRecommendHit {
15
- id: string;
15
+ objectID: string;
16
16
  }
17
17
 
18
18
  /**
@@ -78,11 +78,11 @@ export class MeilisearchProductRecommendationsProvider extends ProductRecommenda
78
78
  protected parseRecommendations(recommendation: SearchResponse<MeilisearchRecommendHit>, algorithm: string): ProductRecommendation[] {
79
79
  return recommendation.hits.map((hit) => ({
80
80
  recommendationIdentifier: {
81
- key: hit.id,
81
+ key: hit.objectID,
82
82
  algorithm,
83
83
  },
84
84
  product: {
85
- key: hit.id,
85
+ key: hit.objectID,
86
86
  },
87
87
  }));
88
88
  }