@reactionary/medusa 0.9.13 → 0.9.15

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.
@@ -27,6 +27,13 @@ class MedusaOrderSearchCapability extends OrderSearchCapability {
27
27
  }
28
28
  config;
29
29
  factory;
30
+ /**
31
+ * This controls which fields are always included when fetching a cart
32
+ * You can override this in a subclass to add more fields as needed.
33
+ *
34
+ * example: this.includedFields = [includedFields, '+discounts.*'].join(',');
35
+ */
36
+ includedFields = ["+items.*", "+shipping_address", "+billing_address"].join(",");
30
37
  queryByTermPayload(payload) {
31
38
  const filters = {};
32
39
  if (payload.search.term) {
@@ -59,6 +66,7 @@ class MedusaOrderSearchCapability extends OrderSearchCapability {
59
66
  });
60
67
  return {
61
68
  status: statusFilter,
69
+ fields: this.includedFields,
62
70
  limit: payload.search.paginationOptions.pageSize,
63
71
  offset: (payload.search.paginationOptions.pageNumber - 1) * payload.search.paginationOptions.pageSize
64
72
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@reactionary/medusa",
3
- "version": "0.9.13",
3
+ "version": "0.9.15",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
8
  "@medusajs/js-sdk": "^2.13.3",
9
- "@reactionary/core": "0.9.13",
9
+ "@reactionary/core": "0.9.15",
10
10
  "debug": "^4.4.3",
11
11
  "@medusajs/types": "^2.13.3",
12
12
  "zod": "4.1.9"
@@ -7,6 +7,13 @@ export declare class MedusaOrderSearchCapability<TFactory extends OrderSearchFac
7
7
  medusaApi: MedusaAPI;
8
8
  protected config: MedusaConfiguration;
9
9
  protected factory: OrderSearchFactoryWithOutput<TFactory>;
10
+ /**
11
+ * This controls which fields are always included when fetching a cart
12
+ * You can override this in a subclass to add more fields as needed.
13
+ *
14
+ * example: this.includedFields = [includedFields, '+discounts.*'].join(',');
15
+ */
16
+ protected includedFields: string;
10
17
  constructor(config: MedusaConfiguration, cache: Cache, context: RequestContext, medusaApi: MedusaAPI, factory: OrderSearchFactoryWithOutput<TFactory>);
11
18
  protected queryByTermPayload(payload: OrderSearchQueryByTerm): any;
12
19
  queryByTerm(payload: OrderSearchQueryByTerm): Promise<Result<OrderSearchFactoryOutput<TFactory>>>;