@medusajs/link-modules 0.2.12 → 1.0.0-rc-20241001083650
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/definitions/cart-payment-collection.d.ts +2 -1
- package/dist/definitions/cart-payment-collection.d.ts.map +1 -0
- package/dist/definitions/cart-payment-collection.js +15 -9
- package/dist/definitions/cart-payment-collection.js.map +1 -0
- package/dist/definitions/cart-promotion.d.ts +2 -1
- package/dist/definitions/cart-promotion.d.ts.map +1 -0
- package/dist/definitions/cart-promotion.js +22 -18
- package/dist/definitions/cart-promotion.js.map +1 -0
- package/dist/definitions/fulfillment-provider-location.d.ts +3 -0
- package/dist/definitions/fulfillment-provider-location.d.ts.map +1 -0
- package/dist/definitions/fulfillment-provider-location.js +72 -0
- package/dist/definitions/fulfillment-provider-location.js.map +1 -0
- package/dist/definitions/fulfillment-set-location.d.ts +3 -2
- package/dist/definitions/fulfillment-set-location.d.ts.map +1 -0
- package/dist/definitions/fulfillment-set-location.js +42 -33
- package/dist/definitions/fulfillment-set-location.js.map +1 -0
- package/dist/definitions/index.d.ts +7 -9
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/index.js +7 -9
- package/dist/definitions/index.js.map +1 -0
- package/dist/definitions/order-cart.d.ts +3 -0
- package/dist/definitions/order-cart.d.ts.map +1 -0
- package/dist/definitions/order-cart.js +68 -0
- package/dist/definitions/order-cart.js.map +1 -0
- package/dist/definitions/order-claim-payment-collection.d.ts +3 -0
- package/dist/definitions/order-claim-payment-collection.d.ts.map +1 -0
- package/dist/definitions/order-claim-payment-collection.js +74 -0
- package/dist/definitions/order-claim-payment-collection.js.map +1 -0
- package/dist/definitions/order-exchange-payment-collection.d.ts +3 -0
- package/dist/definitions/order-exchange-payment-collection.d.ts.map +1 -0
- package/dist/definitions/order-exchange-payment-collection.js +74 -0
- package/dist/definitions/order-exchange-payment-collection.js.map +1 -0
- package/dist/definitions/order-fulfillment.d.ts +3 -0
- package/dist/definitions/order-fulfillment.d.ts.map +1 -0
- package/dist/definitions/order-fulfillment.js +72 -0
- package/dist/definitions/order-fulfillment.js.map +1 -0
- package/dist/definitions/order-payment-collection.d.ts +3 -0
- package/dist/definitions/order-payment-collection.d.ts.map +1 -0
- package/dist/definitions/order-payment-collection.js +72 -0
- package/dist/definitions/order-payment-collection.js.map +1 -0
- package/dist/definitions/order-promotion.d.ts +2 -1
- package/dist/definitions/order-promotion.d.ts.map +1 -0
- package/dist/definitions/order-promotion.js +20 -11
- package/dist/definitions/order-promotion.js.map +1 -0
- package/dist/definitions/order-return-fulfillment.d.ts +3 -0
- package/dist/definitions/order-return-fulfillment.d.ts.map +1 -0
- package/dist/definitions/order-return-fulfillment.js +69 -0
- package/dist/definitions/order-return-fulfillment.js.map +1 -0
- package/dist/definitions/product-sales-channel.d.ts +2 -1
- package/dist/definitions/product-sales-channel.d.ts.map +1 -0
- package/dist/definitions/product-sales-channel.js +18 -9
- package/dist/definitions/product-sales-channel.js.map +1 -0
- package/dist/definitions/product-variant-inventory-item.d.ts +2 -1
- package/dist/definitions/product-variant-inventory-item.d.ts.map +1 -0
- package/dist/definitions/product-variant-inventory-item.js +21 -11
- package/dist/definitions/product-variant-inventory-item.js.map +1 -0
- package/dist/definitions/product-variant-price-set.d.ts +2 -1
- package/dist/definitions/product-variant-price-set.d.ts.map +1 -0
- package/dist/definitions/product-variant-price-set.js +18 -12
- package/dist/definitions/product-variant-price-set.js.map +1 -0
- package/dist/definitions/publishable-api-key-sales-channel.d.ts +2 -1
- package/dist/definitions/publishable-api-key-sales-channel.d.ts.map +1 -0
- package/dist/definitions/publishable-api-key-sales-channel.js +22 -8
- package/dist/definitions/publishable-api-key-sales-channel.js.map +1 -0
- package/dist/definitions/readonly/cart-customer.d.ts +3 -0
- package/dist/definitions/readonly/cart-customer.d.ts.map +1 -0
- package/dist/definitions/{cart-customer.js → readonly/cart-customer.js} +14 -5
- package/dist/definitions/readonly/cart-customer.js.map +1 -0
- package/dist/definitions/readonly/cart-product.d.ts +3 -0
- package/dist/definitions/readonly/cart-product.d.ts.map +1 -0
- package/dist/definitions/readonly/cart-product.js +50 -0
- package/dist/definitions/readonly/cart-product.js.map +1 -0
- package/dist/definitions/readonly/cart-region.d.ts +3 -0
- package/dist/definitions/readonly/cart-region.d.ts.map +1 -0
- package/dist/definitions/{cart-region.js → readonly/cart-region.js} +14 -5
- package/dist/definitions/readonly/cart-region.js.map +1 -0
- package/dist/definitions/readonly/cart-sales-channel.d.ts +3 -0
- package/dist/definitions/readonly/cart-sales-channel.d.ts.map +1 -0
- package/dist/definitions/{cart-sales-channel.js → readonly/cart-sales-channel.js} +14 -5
- package/dist/definitions/readonly/cart-sales-channel.js.map +1 -0
- package/dist/definitions/readonly/index.d.ts +12 -0
- package/dist/definitions/readonly/index.d.ts.map +1 -0
- package/dist/definitions/readonly/index.js +28 -0
- package/dist/definitions/readonly/index.js.map +1 -0
- package/dist/definitions/readonly/inventory-level-stock-location.d.ts +3 -0
- package/dist/definitions/readonly/inventory-level-stock-location.d.ts.map +1 -0
- package/dist/definitions/{inventory-level-stock-location.js → readonly/inventory-level-stock-location.js} +8 -3
- package/dist/definitions/readonly/inventory-level-stock-location.js.map +1 -0
- package/dist/definitions/readonly/line-item-adjustment-promotion.d.ts +3 -0
- package/dist/definitions/readonly/line-item-adjustment-promotion.d.ts.map +1 -0
- package/dist/definitions/readonly/line-item-adjustment-promotion.js +24 -0
- package/dist/definitions/readonly/line-item-adjustment-promotion.js.map +1 -0
- package/dist/definitions/readonly/order-customer.d.ts +3 -0
- package/dist/definitions/readonly/order-customer.d.ts.map +1 -0
- package/dist/definitions/{order-customer.js → readonly/order-customer.js} +14 -5
- package/dist/definitions/readonly/order-customer.js.map +1 -0
- package/dist/definitions/readonly/order-product.d.ts +3 -0
- package/dist/definitions/readonly/order-product.d.ts.map +1 -0
- package/dist/definitions/readonly/order-product.js +51 -0
- package/dist/definitions/readonly/order-product.js.map +1 -0
- package/dist/definitions/readonly/order-region.d.ts +3 -0
- package/dist/definitions/readonly/order-region.d.ts.map +1 -0
- package/dist/definitions/{order-region.js → readonly/order-region.js} +14 -5
- package/dist/definitions/readonly/order-region.js.map +1 -0
- package/dist/definitions/readonly/order-sales-channel.d.ts +3 -0
- package/dist/definitions/readonly/order-sales-channel.d.ts.map +1 -0
- package/dist/definitions/readonly/order-sales-channel.js +38 -0
- package/dist/definitions/readonly/order-sales-channel.js.map +1 -0
- package/dist/definitions/readonly/store-currency.d.ts +3 -0
- package/dist/definitions/readonly/store-currency.d.ts.map +1 -0
- package/dist/definitions/readonly/store-currency.js +24 -0
- package/dist/definitions/readonly/store-currency.js.map +1 -0
- package/dist/definitions/region-payment-provider.d.ts +2 -1
- package/dist/definitions/region-payment-provider.d.ts.map +1 -0
- package/dist/definitions/region-payment-provider.js +20 -11
- package/dist/definitions/region-payment-provider.js.map +1 -0
- package/dist/definitions/sales-channel-location.d.ts +2 -1
- package/dist/definitions/sales-channel-location.d.ts.map +1 -0
- package/dist/definitions/sales-channel-location.js +23 -11
- package/dist/definitions/sales-channel-location.js.map +1 -0
- package/dist/definitions/shipping-option-price-set.d.ts +2 -1
- package/dist/definitions/shipping-option-price-set.d.ts.map +1 -0
- package/dist/definitions/shipping-option-price-set.js +12 -9
- package/dist/definitions/shipping-option-price-set.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -0
- package/dist/initialize/index.d.ts +13 -4
- package/dist/initialize/index.d.ts.map +1 -0
- package/dist/initialize/index.js +42 -28
- package/dist/initialize/index.js.map +1 -0
- package/dist/initialize/module-definition.d.ts +2 -1
- package/dist/initialize/module-definition.d.ts.map +1 -0
- package/dist/initialize/module-definition.js +2 -2
- package/dist/initialize/module-definition.js.map +1 -0
- package/dist/loaders/connection.d.ts +2 -1
- package/dist/loaders/connection.d.ts.map +1 -0
- package/dist/loaders/connection.js +3 -3
- package/dist/loaders/connection.js.map +1 -0
- package/dist/loaders/container.d.ts +2 -2
- package/dist/loaders/container.d.ts.map +1 -0
- package/dist/loaders/container.js +6 -7
- package/dist/loaders/container.js.map +1 -0
- package/dist/loaders/index.d.ts +2 -1
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/index.js +2 -2
- package/dist/loaders/index.js.map +1 -0
- package/dist/migration/index.d.ts +103 -2
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +341 -46
- package/dist/migration/index.js.map +1 -0
- package/dist/repositories/index.d.ts +2 -1
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +2 -1
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/link.d.ts +20 -20
- package/dist/repositories/link.d.ts.map +1 -0
- package/dist/repositories/link.js +3 -3
- package/dist/repositories/link.js.map +1 -0
- package/dist/services/dynamic-service-class.d.ts +2 -1
- package/dist/services/dynamic-service-class.d.ts.map +1 -0
- package/dist/services/dynamic-service-class.js +10 -3
- package/dist/services/dynamic-service-class.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/link-module-service.d.ts +5 -3
- package/dist/services/link-module-service.d.ts.map +1 -0
- package/dist/services/link-module-service.js +34 -41
- package/dist/services/link-module-service.js.map +1 -0
- package/dist/services/link.d.ts +2 -1
- package/dist/services/link.d.ts.map +1 -0
- package/dist/services/link.js +2 -1
- package/dist/services/link.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/compress-name.d.ts +2 -0
- package/dist/utils/compress-name.d.ts.map +1 -0
- package/dist/utils/compress-name.js +33 -0
- package/dist/utils/compress-name.js.map +1 -0
- package/dist/utils/generate-entity.d.ts +2 -1
- package/dist/utils/generate-entity.d.ts.map +1 -0
- package/dist/utils/generate-entity.js +6 -6
- package/dist/utils/generate-entity.js.map +1 -0
- package/dist/utils/generate-schema.d.ts +2 -1
- package/dist/utils/generate-schema.d.ts.map +1 -0
- package/dist/utils/generate-schema.js +76 -20
- package/dist/utils/generate-schema.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -6
- package/dist/utils/index.js.map +1 -0
- package/package.json +22 -15
- package/dist/definitions/cart-customer.d.ts +0 -2
- package/dist/definitions/cart-region.d.ts +0 -2
- package/dist/definitions/cart-sales-channel.d.ts +0 -2
- package/dist/definitions/inventory-level-stock-location.d.ts +0 -2
- package/dist/definitions/order-customer.d.ts +0 -2
- package/dist/definitions/order-region.d.ts +0 -2
- package/dist/definitions/order-sales-channel.d.ts +0 -2
- package/dist/definitions/order-sales-channel.js +0 -67
- package/dist/definitions/product-shipping-profile.d.ts +0 -2
- package/dist/definitions/product-shipping-profile.js +0 -61
- package/dist/definitions/store-default-currency.d.ts +0 -2
- package/dist/definitions/store-default-currency.js +0 -19
- package/dist/utils/compose-link-name.d.ts +0 -2
- package/dist/utils/compose-link-name.js +0 -12
@@ -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
|
-
};
|
@@ -1,61 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ProductShippingProfile = void 0;
|
4
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
-
const utils_1 = require("@medusajs/utils");
|
6
|
-
exports.ProductShippingProfile = {
|
7
|
-
serviceName: utils_1.LINKS.ProductShippingProfile,
|
8
|
-
isLink: true,
|
9
|
-
databaseConfig: {
|
10
|
-
tableName: "product_shipping_profile",
|
11
|
-
idPrefix: "psprof",
|
12
|
-
},
|
13
|
-
alias: [
|
14
|
-
{
|
15
|
-
name: "product_shipping_profile",
|
16
|
-
args: {
|
17
|
-
entity: "LinkProductShippingProfile",
|
18
|
-
},
|
19
|
-
},
|
20
|
-
],
|
21
|
-
primaryKeys: ["id", "product_id", "profile_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: "shippingProfileService",
|
31
|
-
isInternalService: true,
|
32
|
-
primaryKey: "id",
|
33
|
-
foreignKey: "profile_id",
|
34
|
-
alias: "profile",
|
35
|
-
},
|
36
|
-
],
|
37
|
-
extends: [
|
38
|
-
{
|
39
|
-
serviceName: modules_sdk_1.Modules.PRODUCT,
|
40
|
-
fieldAlias: {
|
41
|
-
profile: "shipping_profile.profile",
|
42
|
-
},
|
43
|
-
relationship: {
|
44
|
-
serviceName: utils_1.LINKS.ProductShippingProfile,
|
45
|
-
primaryKey: "product_id",
|
46
|
-
foreignKey: "id",
|
47
|
-
alias: "shipping_profile",
|
48
|
-
},
|
49
|
-
},
|
50
|
-
{
|
51
|
-
serviceName: "shippingProfileService",
|
52
|
-
relationship: {
|
53
|
-
serviceName: utils_1.LINKS.ProductShippingProfile,
|
54
|
-
isInternalService: true,
|
55
|
-
primaryKey: "profile_id",
|
56
|
-
foreignKey: "id",
|
57
|
-
alias: "product_link",
|
58
|
-
},
|
59
|
-
},
|
60
|
-
],
|
61
|
-
};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.StoreDefaultCurrency = void 0;
|
4
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
-
exports.StoreDefaultCurrency = {
|
6
|
-
isLink: true,
|
7
|
-
isReadOnlyLink: true,
|
8
|
-
extends: [
|
9
|
-
{
|
10
|
-
serviceName: modules_sdk_1.Modules.STORE,
|
11
|
-
relationship: {
|
12
|
-
serviceName: modules_sdk_1.Modules.CURRENCY,
|
13
|
-
primaryKey: "code",
|
14
|
-
foreignKey: "default_currency_code",
|
15
|
-
alias: "default_currency",
|
16
|
-
},
|
17
|
-
},
|
18
|
-
],
|
19
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.composeTableName = exports.composeLinkName = void 0;
|
4
|
-
const utils_1 = require("@medusajs/utils");
|
5
|
-
const composeLinkName = (...args) => {
|
6
|
-
return (0, utils_1.lowerCaseFirst)((0, utils_1.toPascalCase)((0, exports.composeTableName)(...args.concat("link"))));
|
7
|
-
};
|
8
|
-
exports.composeLinkName = composeLinkName;
|
9
|
-
const composeTableName = (...args) => {
|
10
|
-
return args.map((name) => name.replace(/(_id|Service)$/gi, "")).join("_");
|
11
|
-
};
|
12
|
-
exports.composeTableName = composeTableName;
|