@reactionary/source 0.2.16 → 0.2.18

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.2.16",
3
+ "version": "0.2.18",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
7
- "@reactionary/core": "0.2.16",
8
- "@reactionary/provider-commercetools": "0.2.16",
9
- "@reactionary/provider-algolia": "0.2.16",
10
- "@reactionary/provider-medusa": "0.2.16",
11
- "@reactionary/provider-meilisearch": "0.2.16"
7
+ "@reactionary/core": "0.2.18",
8
+ "@reactionary/provider-commercetools": "0.2.18",
9
+ "@reactionary/provider-algolia": "0.2.18",
10
+ "@reactionary/provider-medusa": "0.2.18",
11
+ "@reactionary/provider-meilisearch": "0.2.18"
12
12
  },
13
13
  "type": "module"
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/source",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -71,7 +71,8 @@ export class CommercetoolsOrderSearchProvider extends OrderSearchProvider {
71
71
  }
72
72
 
73
73
  if (payload.search.user && payload.search.user.userId) {
74
- where.push(`customerId="${payload.search.user.userId}"`);
74
+
75
+ // where.push(`customerId="${payload.search.user.userId}"`);
75
76
  }
76
77
 
77
78
  if (payload.search.orderStatus) {
@@ -37,6 +37,7 @@ interface MeilisearchNativeOrderRecord {
37
37
  customerName: string;
38
38
  shippingAddress: MeilisearchNativeOrderAddress;
39
39
  orderDate: string;
40
+ orderDateTimestamp: number;
40
41
  orderStatus: string;
41
42
  inventoryStatus: string;
42
43
  totalAmount: number;
@@ -80,10 +81,10 @@ export class MeilisearchOrderSearchProvider extends OrderSearchProvider {
80
81
 
81
82
  // Add date range filters
82
83
  if (payload.search.startDate) {
83
- filters.push(`orderDate >= ${new Date(payload.search.startDate).getTime()}`);
84
+ filters.push(`orderDateTimestamp >= ${new Date(payload.search.startDate).getTime()}`);
84
85
  }
85
86
  if (payload.search.endDate) {
86
- filters.push(`orderDate <= ${new Date(payload.search.endDate).getTime()}`);
87
+ filters.push(`orderDateTimestamp <= ${new Date(payload.search.endDate).getTime()}`);
87
88
  }
88
89
 
89
90
 
@@ -100,6 +101,7 @@ export class MeilisearchOrderSearchProvider extends OrderSearchProvider {
100
101
  payload.search.paginationOptions.pageSize,
101
102
  limit: payload.search.paginationOptions.pageSize,
102
103
  filter: filters.length > 0 ? filters.join(' AND ') : undefined,
104
+ sort: ['orderDateTimestamp:desc'],
103
105
  };
104
106
 
105
107
  const remote = await index.search<MeilisearchNativeOrderRecord>(