@medusajs/link-modules 0.2.12-preview-20240505115807 → 0.2.12-preview-20240507182533
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/definitions/index.d.ts +2 -8
- package/dist/definitions/index.js +2 -8
- package/dist/definitions/order-promotion.js +5 -2
- package/dist/definitions/readonly/cart-product.d.ts +2 -0
- package/dist/definitions/readonly/cart-product.js +44 -0
- package/dist/definitions/readonly/index.d.ts +9 -0
- package/dist/definitions/readonly/index.js +25 -0
- package/dist/definitions/readonly/order-product.d.ts +2 -0
- package/dist/definitions/readonly/order-product.js +44 -0
- package/dist/definitions/readonly/order-sales-channel.js +29 -0
- package/package.json +4 -4
- package/dist/definitions/order-sales-channel.js +0 -67
- /package/dist/definitions/{cart-customer.d.ts → readonly/cart-customer.d.ts} +0 -0
- /package/dist/definitions/{cart-customer.js → readonly/cart-customer.js} +0 -0
- /package/dist/definitions/{cart-region.d.ts → readonly/cart-region.d.ts} +0 -0
- /package/dist/definitions/{cart-region.js → readonly/cart-region.js} +0 -0
- /package/dist/definitions/{cart-sales-channel.d.ts → readonly/cart-sales-channel.d.ts} +0 -0
- /package/dist/definitions/{cart-sales-channel.js → readonly/cart-sales-channel.js} +0 -0
- /package/dist/definitions/{inventory-level-stock-location.d.ts → readonly/inventory-level-stock-location.d.ts} +0 -0
- /package/dist/definitions/{inventory-level-stock-location.js → readonly/inventory-level-stock-location.js} +0 -0
- /package/dist/definitions/{order-customer.d.ts → readonly/order-customer.d.ts} +0 -0
- /package/dist/definitions/{order-customer.js → readonly/order-customer.js} +0 -0
- /package/dist/definitions/{order-sales-channel.d.ts → readonly/order-sales-channel.d.ts} +0 -0
- /package/dist/definitions/{store-default-currency.d.ts → readonly/store-default-currency.d.ts} +0 -0
- /package/dist/definitions/{store-default-currency.js → readonly/store-default-currency.js} +0 -0
@@ -1,20 +1,14 @@
|
|
1
|
-
export * from "./cart-customer";
|
2
1
|
export * from "./cart-payment-collection";
|
3
2
|
export * from "./cart-promotion";
|
4
|
-
export * from "./
|
5
|
-
export * from "./cart-sales-channel";
|
6
|
-
export * from "./inventory-level-stock-location";
|
7
|
-
export * from "./location-fulfillment-set";
|
8
|
-
export * from "./order-customer";
|
3
|
+
export * from "./fulfillment-set-location";
|
9
4
|
export * from "./order-promotion";
|
10
5
|
export * from "./order-region";
|
11
|
-
export * from "./order-sales-channel";
|
12
6
|
export * from "./product-sales-channel";
|
13
7
|
export * from "./product-shipping-profile";
|
14
8
|
export * from "./product-variant-inventory-item";
|
15
9
|
export * from "./product-variant-price-set";
|
16
10
|
export * from "./publishable-api-key-sales-channel";
|
11
|
+
export * from "./readonly";
|
17
12
|
export * from "./region-payment-provider";
|
18
13
|
export * from "./sales-channel-location";
|
19
14
|
export * from "./shipping-option-price-set";
|
20
|
-
export * from "./store-default-currency";
|
@@ -14,23 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./cart-customer"), exports);
|
18
17
|
__exportStar(require("./cart-payment-collection"), exports);
|
19
18
|
__exportStar(require("./cart-promotion"), exports);
|
20
|
-
__exportStar(require("./
|
21
|
-
__exportStar(require("./cart-sales-channel"), exports);
|
22
|
-
__exportStar(require("./inventory-level-stock-location"), exports);
|
23
|
-
__exportStar(require("./location-fulfillment-set"), exports);
|
24
|
-
__exportStar(require("./order-customer"), exports);
|
19
|
+
__exportStar(require("./fulfillment-set-location"), exports);
|
25
20
|
__exportStar(require("./order-promotion"), exports);
|
26
21
|
__exportStar(require("./order-region"), exports);
|
27
|
-
__exportStar(require("./order-sales-channel"), exports);
|
28
22
|
__exportStar(require("./product-sales-channel"), exports);
|
29
23
|
__exportStar(require("./product-shipping-profile"), exports);
|
30
24
|
__exportStar(require("./product-variant-inventory-item"), exports);
|
31
25
|
__exportStar(require("./product-variant-price-set"), exports);
|
32
26
|
__exportStar(require("./publishable-api-key-sales-channel"), exports);
|
27
|
+
__exportStar(require("./readonly"), exports);
|
33
28
|
__exportStar(require("./region-payment-provider"), exports);
|
34
29
|
__exportStar(require("./sales-channel-location"), exports);
|
35
30
|
__exportStar(require("./shipping-option-price-set"), exports);
|
36
|
-
__exportStar(require("./store-default-currency"), exports);
|
@@ -36,11 +36,14 @@ exports.OrderPromotion = {
|
|
36
36
|
extends: [
|
37
37
|
{
|
38
38
|
serviceName: modules_sdk_1.Modules.ORDER,
|
39
|
+
fieldAlias: {
|
40
|
+
promotion: "promotion_link.promotion",
|
41
|
+
},
|
39
42
|
relationship: {
|
40
43
|
serviceName: utils_1.LINKS.OrderPromotion,
|
41
44
|
primaryKey: "order_id",
|
42
45
|
foreignKey: "id",
|
43
|
-
alias: "
|
46
|
+
alias: "promotion_link",
|
44
47
|
},
|
45
48
|
},
|
46
49
|
{
|
@@ -49,7 +52,7 @@ exports.OrderPromotion = {
|
|
49
52
|
serviceName: utils_1.LINKS.OrderPromotion,
|
50
53
|
primaryKey: "promotion_id",
|
51
54
|
foreignKey: "id",
|
52
|
-
alias: "
|
55
|
+
alias: "order_link",
|
53
56
|
},
|
54
57
|
},
|
55
58
|
],
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CartProduct = void 0;
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
+
exports.CartProduct = {
|
6
|
+
isLink: true,
|
7
|
+
isReadOnlyLink: true,
|
8
|
+
extends: [
|
9
|
+
{
|
10
|
+
serviceName: modules_sdk_1.Modules.CART,
|
11
|
+
relationship: {
|
12
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
13
|
+
primaryKey: "id",
|
14
|
+
foreignKey: "items.product_id",
|
15
|
+
alias: "product",
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
serviceName: modules_sdk_1.Modules.CART,
|
20
|
+
relationship: {
|
21
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
22
|
+
primaryKey: "id",
|
23
|
+
foreignKey: "items.variant_id",
|
24
|
+
alias: "variant",
|
25
|
+
args: {
|
26
|
+
methodSuffix: "Variants",
|
27
|
+
},
|
28
|
+
},
|
29
|
+
},
|
30
|
+
{
|
31
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
32
|
+
relationship: {
|
33
|
+
serviceName: modules_sdk_1.Modules.CART,
|
34
|
+
primaryKey: "variant_id",
|
35
|
+
foreignKey: "id",
|
36
|
+
alias: "cart_items",
|
37
|
+
isList: true,
|
38
|
+
args: {
|
39
|
+
methodSuffix: "LineItems",
|
40
|
+
},
|
41
|
+
},
|
42
|
+
},
|
43
|
+
],
|
44
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export * from "./cart-customer";
|
2
|
+
export * from "./cart-product";
|
3
|
+
export * from "./cart-region";
|
4
|
+
export * from "./cart-sales-channel";
|
5
|
+
export * from "./inventory-level-stock-location";
|
6
|
+
export * from "./order-customer";
|
7
|
+
export * from "./order-product";
|
8
|
+
export * from "./order-sales-channel";
|
9
|
+
export * from "./store-default-currency";
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./cart-customer"), exports);
|
18
|
+
__exportStar(require("./cart-product"), exports);
|
19
|
+
__exportStar(require("./cart-region"), exports);
|
20
|
+
__exportStar(require("./cart-sales-channel"), exports);
|
21
|
+
__exportStar(require("./inventory-level-stock-location"), exports);
|
22
|
+
__exportStar(require("./order-customer"), exports);
|
23
|
+
__exportStar(require("./order-product"), exports);
|
24
|
+
__exportStar(require("./order-sales-channel"), exports);
|
25
|
+
__exportStar(require("./store-default-currency"), exports);
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OrderProduct = void 0;
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
+
exports.OrderProduct = {
|
6
|
+
isLink: true,
|
7
|
+
isReadOnlyLink: true,
|
8
|
+
extends: [
|
9
|
+
{
|
10
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
11
|
+
relationship: {
|
12
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
13
|
+
primaryKey: "id",
|
14
|
+
foreignKey: "items.product_id",
|
15
|
+
alias: "product",
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
20
|
+
relationship: {
|
21
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
22
|
+
primaryKey: "id",
|
23
|
+
foreignKey: "items.variant_id",
|
24
|
+
alias: "variant",
|
25
|
+
args: {
|
26
|
+
methodSuffix: "Variants",
|
27
|
+
},
|
28
|
+
},
|
29
|
+
},
|
30
|
+
{
|
31
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
32
|
+
relationship: {
|
33
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
34
|
+
primaryKey: "variant_id",
|
35
|
+
foreignKey: "id",
|
36
|
+
alias: "order_items",
|
37
|
+
isList: true,
|
38
|
+
args: {
|
39
|
+
methodSuffix: "LineItems",
|
40
|
+
},
|
41
|
+
},
|
42
|
+
},
|
43
|
+
],
|
44
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OrderSalesChannel = void 0;
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
+
exports.OrderSalesChannel = {
|
6
|
+
isLink: true,
|
7
|
+
isReadOnlyLink: true,
|
8
|
+
extends: [
|
9
|
+
{
|
10
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
11
|
+
relationship: {
|
12
|
+
serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
|
13
|
+
primaryKey: "id",
|
14
|
+
foreignKey: "sales_channel_id",
|
15
|
+
alias: "sales_channel",
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
|
20
|
+
relationship: {
|
21
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
22
|
+
primaryKey: "sales_channel_id",
|
23
|
+
foreignKey: "id",
|
24
|
+
alias: "orders",
|
25
|
+
isList: true,
|
26
|
+
},
|
27
|
+
},
|
28
|
+
],
|
29
|
+
};
|
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-20240507182533",
|
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.12.12-preview-
|
43
|
-
"@medusajs/types": "1.11.17-preview-
|
44
|
-
"@medusajs/utils": "1.11.10-preview-
|
42
|
+
"@medusajs/modules-sdk": "1.12.12-preview-20240507182533",
|
43
|
+
"@medusajs/types": "1.11.17-preview-20240507182533",
|
44
|
+
"@medusajs/utils": "1.11.10-preview-20240507182533",
|
45
45
|
"@mikro-orm/core": "5.9.7",
|
46
46
|
"@mikro-orm/postgresql": "5.9.7",
|
47
47
|
"awilix": "^8.0.0"
|
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.OrderSalesChannel = void 0;
|
4
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
-
const utils_1 = require("@medusajs/utils");
|
6
|
-
exports.OrderSalesChannel = {
|
7
|
-
serviceName: utils_1.LINKS.OrderSalesChannel,
|
8
|
-
isLink: true,
|
9
|
-
databaseConfig: {
|
10
|
-
tableName: "order_sales_channel",
|
11
|
-
idPrefix: "ordersc",
|
12
|
-
},
|
13
|
-
alias: [
|
14
|
-
{
|
15
|
-
name: "order_sales_channel",
|
16
|
-
},
|
17
|
-
{
|
18
|
-
name: "order_sales_channels",
|
19
|
-
},
|
20
|
-
],
|
21
|
-
primaryKeys: ["id", "order_id", "sales_channel_id"],
|
22
|
-
relationships: [
|
23
|
-
{
|
24
|
-
serviceName: modules_sdk_1.Modules.ORDER,
|
25
|
-
isInternalService: true,
|
26
|
-
primaryKey: "id",
|
27
|
-
foreignKey: "order_id",
|
28
|
-
alias: "order",
|
29
|
-
},
|
30
|
-
{
|
31
|
-
serviceName: "salesChannelService",
|
32
|
-
isInternalService: true,
|
33
|
-
primaryKey: "id",
|
34
|
-
foreignKey: "sales_channel_id",
|
35
|
-
alias: "sales_channel",
|
36
|
-
},
|
37
|
-
],
|
38
|
-
extends: [
|
39
|
-
{
|
40
|
-
serviceName: modules_sdk_1.Modules.ORDER,
|
41
|
-
fieldAlias: {
|
42
|
-
sales_channel: "sales_channel_link.sales_channel",
|
43
|
-
},
|
44
|
-
relationship: {
|
45
|
-
serviceName: utils_1.LINKS.OrderSalesChannel,
|
46
|
-
isInternalService: true,
|
47
|
-
primaryKey: "order_id",
|
48
|
-
foreignKey: "id",
|
49
|
-
alias: "sales_channel_link",
|
50
|
-
},
|
51
|
-
},
|
52
|
-
{
|
53
|
-
serviceName: "salesChannelService",
|
54
|
-
fieldAlias: {
|
55
|
-
orders: "order_link.order",
|
56
|
-
},
|
57
|
-
relationship: {
|
58
|
-
serviceName: utils_1.LINKS.OrderSalesChannel,
|
59
|
-
isInternalService: true,
|
60
|
-
primaryKey: "sales_channel_id",
|
61
|
-
foreignKey: "id",
|
62
|
-
alias: "order_link",
|
63
|
-
isList: true,
|
64
|
-
},
|
65
|
-
},
|
66
|
-
],
|
67
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/dist/definitions/{store-default-currency.d.ts → readonly/store-default-currency.d.ts}
RENAMED
File without changes
|
File without changes
|