@medusajs/link-modules 0.2.12-snapshot-20240516091433 → 0.2.12-snapshot-20240520151134

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,9 @@ exports.LocationFulfillmentSet = {
50
50
  },
51
51
  {
52
52
  serviceName: modules_sdk_1.Modules.FULFILLMENT,
53
+ fieldAlias: {
54
+ location: "locations_link.location",
55
+ },
53
56
  relationship: {
54
57
  serviceName: utils_1.LINKS.LocationFulfillmentSet,
55
58
  primaryKey: "fulfillment_set_id",
@@ -9,6 +9,8 @@ export * from "./product-variant-inventory-item";
9
9
  export * from "./product-variant-price-set";
10
10
  export * from "./publishable-api-key-sales-channel";
11
11
  export * from "./readonly";
12
+ export * from "./order-fulfillment";
12
13
  export * from "./region-payment-provider";
13
14
  export * from "./sales-channel-location";
14
15
  export * from "./shipping-option-price-set";
16
+ export * from "./order-fulfillment";
@@ -25,6 +25,8 @@ __exportStar(require("./product-variant-inventory-item"), exports);
25
25
  __exportStar(require("./product-variant-price-set"), exports);
26
26
  __exportStar(require("./publishable-api-key-sales-channel"), exports);
27
27
  __exportStar(require("./readonly"), exports);
28
+ __exportStar(require("./order-fulfillment"), exports);
28
29
  __exportStar(require("./region-payment-provider"), exports);
29
30
  __exportStar(require("./sales-channel-location"), exports);
30
31
  __exportStar(require("./shipping-option-price-set"), exports);
32
+ __exportStar(require("./order-fulfillment"), exports);
@@ -0,0 +1,2 @@
1
+ import { ModuleJoinerConfig } from "@medusajs/types";
2
+ export declare const OrderFulfillment: ModuleJoinerConfig;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderFulfillment = void 0;
4
+ const modules_sdk_1 = require("@medusajs/modules-sdk");
5
+ const utils_1 = require("@medusajs/utils");
6
+ exports.OrderFulfillment = {
7
+ serviceName: utils_1.LINKS.OrderFulfillment,
8
+ isLink: true,
9
+ databaseConfig: {
10
+ tableName: "order_fulfillment",
11
+ idPrefix: "ordful",
12
+ },
13
+ alias: [
14
+ {
15
+ name: ["order_fulfillment", "order_fulfillments"],
16
+ args: {
17
+ entity: "LinkOrderFulfillment",
18
+ },
19
+ },
20
+ ],
21
+ primaryKeys: ["id", "order_id", "fulfillment_id"],
22
+ relationships: [
23
+ {
24
+ serviceName: modules_sdk_1.Modules.ORDER,
25
+ primaryKey: "id",
26
+ foreignKey: "order_id",
27
+ alias: "order",
28
+ },
29
+ {
30
+ serviceName: modules_sdk_1.Modules.FULFILLMENT,
31
+ primaryKey: "id",
32
+ foreignKey: "fulfillment_id",
33
+ alias: "fulfillments",
34
+ args: {
35
+ // TODO: We are not suppose to know the module implementation here, wait for later to think about inferring it
36
+ methodSuffix: "Fulfillments",
37
+ },
38
+ },
39
+ ],
40
+ extends: [
41
+ {
42
+ serviceName: modules_sdk_1.Modules.ORDER,
43
+ fieldAlias: {
44
+ fulfillments: "fulfillment_link.fulfillments",
45
+ },
46
+ relationship: {
47
+ serviceName: utils_1.LINKS.OrderFulfillment,
48
+ primaryKey: "order_id",
49
+ foreignKey: "id",
50
+ alias: "fulfillment_link",
51
+ isList: true,
52
+ },
53
+ },
54
+ {
55
+ serviceName: modules_sdk_1.Modules.FULFILLMENT,
56
+ relationship: {
57
+ serviceName: utils_1.LINKS.OrderFulfillment,
58
+ primaryKey: "fulfillment_id",
59
+ foreignKey: "id",
60
+ alias: "order_link",
61
+ },
62
+ },
63
+ ],
64
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/link-modules",
3
- "version": "0.2.12-snapshot-20240516091433",
3
+ "version": "0.2.12-snapshot-20240520151134",
4
4
  "description": "Medusa Default Link Modules Package and Definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,9 +39,9 @@
39
39
  "typescript": "^5.1.6"
40
40
  },
41
41
  "dependencies": {
42
- "@medusajs/modules-sdk": "1.13.0-snapshot-20240516091433",
43
- "@medusajs/types": "1.12.0-snapshot-20240516091433",
44
- "@medusajs/utils": "1.12.0-snapshot-20240516091433",
42
+ "@medusajs/modules-sdk": "1.13.0-snapshot-20240520151134",
43
+ "@medusajs/types": "1.12.0-snapshot-20240520151134",
44
+ "@medusajs/utils": "1.12.0-snapshot-20240520151134",
45
45
  "@mikro-orm/core": "5.9.7",
46
46
  "@mikro-orm/postgresql": "5.9.7",
47
47
  "awilix": "^8.0.0"