@medusajs/link-modules 0.2.5 → 0.2.6-next-20240108145510
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.
- package/dist/definitions/cart-sales-channel.d.ts +2 -0
- package/dist/definitions/cart-sales-channel.js +66 -0
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.js +4 -0
- package/dist/definitions/order-sales-channel.d.ts +2 -0
- package/dist/definitions/order-sales-channel.js +66 -0
- package/dist/definitions/product-sales-channel.d.ts +2 -0
- package/dist/definitions/product-sales-channel.js +63 -0
- package/dist/definitions/publishable-api-key-sales-channel.d.ts +2 -0
- package/dist/definitions/publishable-api-key-sales-channel.js +64 -0
- package/dist/links.d.ts +4 -0
- package/dist/links.js +4 -0
- package/package.json +6 -6
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CartSalesChannel = void 0;
|
|
4
|
+
const links_1 = require("../links");
|
|
5
|
+
exports.CartSalesChannel = {
|
|
6
|
+
serviceName: links_1.LINKS.CartSalesChannel,
|
|
7
|
+
isLink: true,
|
|
8
|
+
databaseConfig: {
|
|
9
|
+
tableName: "cart_sales_channel",
|
|
10
|
+
idPrefix: "cartsc",
|
|
11
|
+
},
|
|
12
|
+
alias: [
|
|
13
|
+
{
|
|
14
|
+
name: "cart_sales_channel",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "cart_sales_channels",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
primaryKeys: ["id", "cart_id", "sales_channel_id"],
|
|
21
|
+
relationships: [
|
|
22
|
+
{
|
|
23
|
+
serviceName: "cartService",
|
|
24
|
+
isInternalService: true,
|
|
25
|
+
primaryKey: "id",
|
|
26
|
+
foreignKey: "cart_id",
|
|
27
|
+
alias: "cart",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
serviceName: "salesChannelService",
|
|
31
|
+
isInternalService: true,
|
|
32
|
+
primaryKey: "id",
|
|
33
|
+
foreignKey: "sales_channel_id",
|
|
34
|
+
alias: "sales_channel",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
extends: [
|
|
38
|
+
{
|
|
39
|
+
serviceName: "cartService",
|
|
40
|
+
fieldAlias: {
|
|
41
|
+
sales_channel: "sales_channel_link.sales_channel",
|
|
42
|
+
},
|
|
43
|
+
relationship: {
|
|
44
|
+
serviceName: links_1.LINKS.CartSalesChannel,
|
|
45
|
+
isInternalService: true,
|
|
46
|
+
primaryKey: "cart_id",
|
|
47
|
+
foreignKey: "id",
|
|
48
|
+
alias: "sales_channel_link",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
serviceName: "salesChannelService",
|
|
53
|
+
fieldAlias: {
|
|
54
|
+
carts: "cart_link.cart",
|
|
55
|
+
},
|
|
56
|
+
relationship: {
|
|
57
|
+
serviceName: links_1.LINKS.CartSalesChannel,
|
|
58
|
+
isInternalService: true,
|
|
59
|
+
primaryKey: "sales_channel_id",
|
|
60
|
+
foreignKey: "id",
|
|
61
|
+
alias: "cart_link",
|
|
62
|
+
isList: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
};
|
|
@@ -2,3 +2,7 @@ export * from "./inventory-level-stock-location";
|
|
|
2
2
|
export * from "./product-variant-inventory-item";
|
|
3
3
|
export * from "./product-variant-price-set";
|
|
4
4
|
export * from "./product-shipping-profile";
|
|
5
|
+
export * from "./product-sales-channel";
|
|
6
|
+
export * from "./cart-sales-channel";
|
|
7
|
+
export * from "./order-sales-channel";
|
|
8
|
+
export * from "./publishable-api-key-sales-channel";
|
|
@@ -18,3 +18,7 @@ __exportStar(require("./inventory-level-stock-location"), exports);
|
|
|
18
18
|
__exportStar(require("./product-variant-inventory-item"), exports);
|
|
19
19
|
__exportStar(require("./product-variant-price-set"), exports);
|
|
20
20
|
__exportStar(require("./product-shipping-profile"), exports);
|
|
21
|
+
__exportStar(require("./product-sales-channel"), exports);
|
|
22
|
+
__exportStar(require("./cart-sales-channel"), exports);
|
|
23
|
+
__exportStar(require("./order-sales-channel"), exports);
|
|
24
|
+
__exportStar(require("./publishable-api-key-sales-channel"), exports);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderSalesChannel = void 0;
|
|
4
|
+
const links_1 = require("../links");
|
|
5
|
+
exports.OrderSalesChannel = {
|
|
6
|
+
serviceName: links_1.LINKS.OrderSalesChannel,
|
|
7
|
+
isLink: true,
|
|
8
|
+
databaseConfig: {
|
|
9
|
+
tableName: "order_sales_channel",
|
|
10
|
+
idPrefix: "ordersc",
|
|
11
|
+
},
|
|
12
|
+
alias: [
|
|
13
|
+
{
|
|
14
|
+
name: "order_sales_channel",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "order_sales_channels",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
primaryKeys: ["id", "order_id", "sales_channel_id"],
|
|
21
|
+
relationships: [
|
|
22
|
+
{
|
|
23
|
+
serviceName: "orderService",
|
|
24
|
+
isInternalService: true,
|
|
25
|
+
primaryKey: "id",
|
|
26
|
+
foreignKey: "order_id",
|
|
27
|
+
alias: "order",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
serviceName: "salesChannelService",
|
|
31
|
+
isInternalService: true,
|
|
32
|
+
primaryKey: "id",
|
|
33
|
+
foreignKey: "sales_channel_id",
|
|
34
|
+
alias: "sales_channel",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
extends: [
|
|
38
|
+
{
|
|
39
|
+
serviceName: "orderService",
|
|
40
|
+
fieldAlias: {
|
|
41
|
+
sales_channel: "sales_channel_link.sales_channel",
|
|
42
|
+
},
|
|
43
|
+
relationship: {
|
|
44
|
+
serviceName: links_1.LINKS.OrderSalesChannel,
|
|
45
|
+
isInternalService: true,
|
|
46
|
+
primaryKey: "order_id",
|
|
47
|
+
foreignKey: "id",
|
|
48
|
+
alias: "sales_channel_link",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
serviceName: "salesChannelService",
|
|
53
|
+
fieldAlias: {
|
|
54
|
+
orders: "order_link.order",
|
|
55
|
+
},
|
|
56
|
+
relationship: {
|
|
57
|
+
serviceName: links_1.LINKS.OrderSalesChannel,
|
|
58
|
+
isInternalService: true,
|
|
59
|
+
primaryKey: "sales_channel_id",
|
|
60
|
+
foreignKey: "id",
|
|
61
|
+
alias: "order_link",
|
|
62
|
+
isList: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductSalesChannel = void 0;
|
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
|
5
|
+
const links_1 = require("../links");
|
|
6
|
+
exports.ProductSalesChannel = {
|
|
7
|
+
serviceName: links_1.LINKS.ProductSalesChannel,
|
|
8
|
+
isLink: true,
|
|
9
|
+
databaseConfig: {
|
|
10
|
+
tableName: "product_sales_channel",
|
|
11
|
+
idPrefix: "prodsc",
|
|
12
|
+
},
|
|
13
|
+
alias: [
|
|
14
|
+
{
|
|
15
|
+
name: "product_sales_channel",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "product_sales_channels",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
primaryKeys: ["id", "product_id", "sales_channel_id"],
|
|
22
|
+
relationships: [
|
|
23
|
+
{
|
|
24
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
|
25
|
+
primaryKey: "id",
|
|
26
|
+
foreignKey: "product_id",
|
|
27
|
+
alias: "product",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
serviceName: "salesChannelService",
|
|
31
|
+
isInternalService: true,
|
|
32
|
+
primaryKey: "id",
|
|
33
|
+
foreignKey: "sales_channel_id",
|
|
34
|
+
alias: "sales_channel",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
extends: [
|
|
38
|
+
{
|
|
39
|
+
serviceName: modules_sdk_1.Modules.PRODUCT,
|
|
40
|
+
fieldAlias: {
|
|
41
|
+
sales_channels: "sales_channels_link.sales_channel",
|
|
42
|
+
},
|
|
43
|
+
relationship: {
|
|
44
|
+
serviceName: links_1.LINKS.ProductSalesChannel,
|
|
45
|
+
primaryKey: "product_id",
|
|
46
|
+
foreignKey: "id",
|
|
47
|
+
alias: "sales_channels_link",
|
|
48
|
+
isList: true,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
serviceName: "salesChannelService",
|
|
53
|
+
relationship: {
|
|
54
|
+
serviceName: links_1.LINKS.ProductSalesChannel,
|
|
55
|
+
isInternalService: true,
|
|
56
|
+
primaryKey: "sales_channel_id",
|
|
57
|
+
foreignKey: "id",
|
|
58
|
+
alias: "products_link",
|
|
59
|
+
isList: true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublishableApiKeySalesChannel = void 0;
|
|
4
|
+
const links_1 = require("../links");
|
|
5
|
+
exports.PublishableApiKeySalesChannel = {
|
|
6
|
+
serviceName: links_1.LINKS.PublishableApiKeySalesChannel,
|
|
7
|
+
isLink: true,
|
|
8
|
+
databaseConfig: {
|
|
9
|
+
tableName: "publishable_api_key_sales_channel",
|
|
10
|
+
idPrefix: "pksc",
|
|
11
|
+
},
|
|
12
|
+
alias: [
|
|
13
|
+
{
|
|
14
|
+
name: "publishable_api_key_sales_channel",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "publishable_api_key_sales_channels",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
primaryKeys: ["id", "publishable_key_id", "sales_channel_id"],
|
|
21
|
+
relationships: [
|
|
22
|
+
{
|
|
23
|
+
serviceName: "publishableApiKeyService",
|
|
24
|
+
isInternalService: true,
|
|
25
|
+
primaryKey: "id",
|
|
26
|
+
foreignKey: "publishable_key_id",
|
|
27
|
+
alias: "publishable_key",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
serviceName: "salesChannelService",
|
|
31
|
+
isInternalService: true,
|
|
32
|
+
primaryKey: "id",
|
|
33
|
+
foreignKey: "sales_channel_id",
|
|
34
|
+
alias: "sales_channel",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
extends: [
|
|
38
|
+
{
|
|
39
|
+
serviceName: "publishableApiKeyService",
|
|
40
|
+
fieldAlias: {
|
|
41
|
+
sales_channels: "sales_channels_link.sales_channel",
|
|
42
|
+
},
|
|
43
|
+
relationship: {
|
|
44
|
+
serviceName: links_1.LINKS.PublishableApiKeySalesChannel,
|
|
45
|
+
isInternalService: true,
|
|
46
|
+
primaryKey: "publishable_key_id",
|
|
47
|
+
foreignKey: "id",
|
|
48
|
+
alias: "sales_channels_link",
|
|
49
|
+
isList: true,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
serviceName: "salesChannelService",
|
|
54
|
+
relationship: {
|
|
55
|
+
serviceName: links_1.LINKS.PublishableApiKeySalesChannel,
|
|
56
|
+
isInternalService: true,
|
|
57
|
+
primaryKey: "sales_channel_id",
|
|
58
|
+
foreignKey: "id",
|
|
59
|
+
alias: "publishable_keys_link",
|
|
60
|
+
isList: true,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
package/dist/links.d.ts
CHANGED
|
@@ -2,4 +2,8 @@ export declare const LINKS: {
|
|
|
2
2
|
ProductVariantInventoryItem: string;
|
|
3
3
|
ProductVariantPriceSet: string;
|
|
4
4
|
ProductShippingProfile: string;
|
|
5
|
+
ProductSalesChannel: string;
|
|
6
|
+
CartSalesChannel: string;
|
|
7
|
+
OrderSalesChannel: string;
|
|
8
|
+
PublishableApiKeySalesChannel: string;
|
|
5
9
|
};
|
package/dist/links.js
CHANGED
|
@@ -8,4 +8,8 @@ exports.LINKS = {
|
|
|
8
8
|
ProductVariantPriceSet: (0, utils_1.composeLinkName)(modules_sdk_1.Modules.PRODUCT, "variant_id", modules_sdk_1.Modules.PRICING, "price_set_id"),
|
|
9
9
|
// Internal services
|
|
10
10
|
ProductShippingProfile: (0, utils_1.composeLinkName)(modules_sdk_1.Modules.PRODUCT, "variant_id", "shippingProfileService", "profile_id"),
|
|
11
|
+
ProductSalesChannel: (0, utils_1.composeLinkName)(modules_sdk_1.Modules.PRODUCT, "product_id", "salesChannelService", "sales_channel_id"),
|
|
12
|
+
CartSalesChannel: (0, utils_1.composeLinkName)("cartService", "cart_id", "salesChannelService", "sales_channel_id"),
|
|
13
|
+
OrderSalesChannel: (0, utils_1.composeLinkName)("orderService", "order_id", "salesChannelService", "sales_channel_id"),
|
|
14
|
+
PublishableApiKeySalesChannel: (0, utils_1.composeLinkName)("publishableApiKeyService", "publishable_key_id", "salesChannelService", "sales_channel_id"),
|
|
11
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/link-modules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6-next-20240108145510",
|
|
4
4
|
"description": "Medusa Default Link Modules Package and Definitions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"typescript": "^5.1.6"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@medusajs/modules-sdk": "
|
|
43
|
-
"@medusajs/types": "
|
|
44
|
-
"@medusajs/utils": "
|
|
45
|
-
"@mikro-orm/core": "5.7
|
|
46
|
-
"@mikro-orm/postgresql": "5.7
|
|
42
|
+
"@medusajs/modules-sdk": "1.12.6-next-20240108145510",
|
|
43
|
+
"@medusajs/types": "1.11.10-next-20240108145510",
|
|
44
|
+
"@medusajs/utils": "1.11.3-next-20240108145510",
|
|
45
|
+
"@mikro-orm/core": "5.9.7",
|
|
46
|
+
"@mikro-orm/postgresql": "5.9.7",
|
|
47
47
|
"awilix": "^8.0.0"
|
|
48
48
|
}
|
|
49
49
|
}
|