@medusajs/link-modules 0.2.12-preview-20240516120630 → 0.2.12-preview-20240517180500
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",
|
@@ -28,3 +28,4 @@ __exportStar(require("./readonly"), exports);
|
|
28
28
|
__exportStar(require("./region-payment-provider"), exports);
|
29
29
|
__exportStar(require("./sales-channel-location"), exports);
|
30
30
|
__exportStar(require("./shipping-option-price-set"), exports);
|
31
|
+
__exportStar(require("./order-fulfillment"), exports);
|
@@ -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: "orderful",
|
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-preview-
|
3
|
+
"version": "0.2.12-preview-20240517180500",
|
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-preview-
|
43
|
-
"@medusajs/types": "1.12.0-preview-
|
44
|
-
"@medusajs/utils": "1.12.0-preview-
|
42
|
+
"@medusajs/modules-sdk": "1.13.0-preview-20240517180500",
|
43
|
+
"@medusajs/types": "1.12.0-preview-20240517180500",
|
44
|
+
"@medusajs/utils": "1.12.0-preview-20240517180500",
|
45
45
|
"@mikro-orm/core": "5.9.7",
|
46
46
|
"@mikro-orm/postgresql": "5.9.7",
|
47
47
|
"awilix": "^8.0.0"
|