@medusajs/link-modules 0.2.12-snapshot-20240531102054 → 0.2.12-snapshot-20240701122250

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/definitions/cart-payment-collection.js +10 -5
  2. package/dist/definitions/cart-promotion.js +9 -4
  3. package/dist/definitions/fulfillment-set-location.js +10 -5
  4. package/dist/definitions/index.d.ts +2 -2
  5. package/dist/definitions/index.js +2 -2
  6. package/dist/definitions/order-cart.d.ts +2 -0
  7. package/dist/definitions/order-cart.js +67 -0
  8. package/dist/definitions/order-fulfillment.js +7 -5
  9. package/dist/definitions/order-payment-collection.js +10 -5
  10. package/dist/definitions/order-promotion.js +10 -5
  11. package/dist/definitions/product-sales-channel.js +10 -5
  12. package/dist/definitions/product-variant-inventory-item.js +10 -7
  13. package/dist/definitions/product-variant-price-set.js +8 -6
  14. package/dist/definitions/publishable-api-key-sales-channel.js +10 -5
  15. package/dist/definitions/readonly/cart-customer.js +11 -5
  16. package/dist/definitions/readonly/cart-product.js +11 -8
  17. package/dist/definitions/readonly/cart-region.js +11 -5
  18. package/dist/definitions/readonly/cart-sales-channel.js +11 -5
  19. package/dist/definitions/readonly/index.d.ts +1 -1
  20. package/dist/definitions/readonly/index.js +1 -1
  21. package/dist/definitions/readonly/inventory-level-stock-location.js +6 -3
  22. package/dist/definitions/readonly/line-item-adjustment-promotion.js +6 -3
  23. package/dist/definitions/readonly/order-customer.js +11 -5
  24. package/dist/definitions/readonly/order-product.js +11 -8
  25. package/dist/definitions/readonly/order-region.js +11 -5
  26. package/dist/definitions/readonly/order-sales-channel.js +11 -5
  27. package/dist/definitions/readonly/store-currency.d.ts +2 -0
  28. package/dist/definitions/readonly/store-currency.js +22 -0
  29. package/dist/definitions/region-payment-provider.js +7 -5
  30. package/dist/definitions/sales-channel-location.js +10 -5
  31. package/dist/definitions/shipping-option-price-set.js +7 -5
  32. package/dist/initialize/index.js +11 -1
  33. package/dist/repositories/link.d.ts +4 -1
  34. package/dist/services/dynamic-service-class.js +7 -0
  35. package/dist/services/link-module-service.js +24 -32
  36. package/package.json +6 -7
  37. package/dist/definitions/readonly/store-default-currency.d.ts +0 -2
  38. package/dist/definitions/readonly/store-default-currency.js +0 -19
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CartPaymentCollection = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.CartPaymentCollection = {
7
6
  serviceName: utils_1.LINKS.CartPaymentCollection,
@@ -21,21 +20,27 @@ exports.CartPaymentCollection = {
21
20
  primaryKeys: ["id", "cart_id", "payment_collection_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.CART,
23
+ serviceName: utils_1.Modules.CART,
25
24
  primaryKey: "id",
26
25
  foreignKey: "cart_id",
27
26
  alias: "cart",
27
+ args: {
28
+ methodSuffix: "Carts",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.PAYMENT,
32
+ serviceName: utils_1.Modules.PAYMENT,
31
33
  primaryKey: "id",
32
34
  foreignKey: "payment_collection_id",
33
35
  alias: "payment_collection",
36
+ args: {
37
+ methodSuffix: "PaymentCollections",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.CART,
43
+ serviceName: utils_1.Modules.CART,
39
44
  fieldAlias: {
40
45
  payment_collection: "payment_collection_link.payment_collection",
41
46
  },
@@ -47,7 +52,7 @@ exports.CartPaymentCollection = {
47
52
  },
48
53
  },
49
54
  {
50
- serviceName: modules_sdk_1.Modules.PAYMENT,
55
+ serviceName: utils_1.Modules.PAYMENT,
51
56
  fieldAlias: {
52
57
  cart: "cart_link.cart",
53
58
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CartPromotion = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.CartPromotion = {
7
6
  serviceName: utils_1.LINKS.CartPromotion,
@@ -21,21 +20,27 @@ exports.CartPromotion = {
21
20
  primaryKeys: ["id", "cart_id", "promotion_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.CART,
23
+ serviceName: utils_1.Modules.CART,
25
24
  primaryKey: "id",
26
25
  foreignKey: "cart_id",
27
26
  alias: "cart",
27
+ args: {
28
+ methodSuffix: "Carts",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.PROMOTION,
32
+ serviceName: utils_1.Modules.PROMOTION,
31
33
  primaryKey: "id",
32
34
  foreignKey: "promotion_id",
33
35
  alias: "promotions",
36
+ args: {
37
+ methodSuffix: "Promotions",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.CART,
43
+ serviceName: utils_1.Modules.CART,
39
44
  fieldAlias: {
40
45
  promotions: "cart_link.promotions",
41
46
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LocationFulfillmentSet = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.LocationFulfillmentSet = {
7
6
  serviceName: utils_1.LINKS.LocationFulfillmentSet,
@@ -21,22 +20,28 @@ exports.LocationFulfillmentSet = {
21
20
  primaryKeys: ["id", "stock_location_id", "fulfillment_set_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
23
+ serviceName: utils_1.Modules.STOCK_LOCATION,
25
24
  primaryKey: "id",
26
25
  foreignKey: "stock_location_id",
27
26
  alias: "location",
27
+ args: {
28
+ methodSuffix: "StockLocations",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.FULFILLMENT,
32
+ serviceName: utils_1.Modules.FULFILLMENT,
31
33
  primaryKey: "id",
32
34
  foreignKey: "fulfillment_set_id",
33
35
  alias: "fulfillment_set",
36
+ args: {
37
+ methodSuffix: "FulfillmentSets",
38
+ },
34
39
  deleteCascade: true,
35
40
  },
36
41
  ],
37
42
  extends: [
38
43
  {
39
- serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
44
+ serviceName: utils_1.Modules.STOCK_LOCATION,
40
45
  relationship: {
41
46
  serviceName: utils_1.LINKS.LocationFulfillmentSet,
42
47
  primaryKey: "stock_location_id",
@@ -49,7 +54,7 @@ exports.LocationFulfillmentSet = {
49
54
  },
50
55
  },
51
56
  {
52
- serviceName: modules_sdk_1.Modules.FULFILLMENT,
57
+ serviceName: utils_1.Modules.FULFILLMENT,
53
58
  fieldAlias: {
54
59
  location: "locations_link.location",
55
60
  },
@@ -1,6 +1,8 @@
1
1
  export * from "./cart-payment-collection";
2
2
  export * from "./cart-promotion";
3
3
  export * from "./fulfillment-set-location";
4
+ export * from "./order-cart";
5
+ export * from "./order-fulfillment";
4
6
  export * from "./order-payment-collection";
5
7
  export * from "./order-promotion";
6
8
  export * from "./product-sales-channel";
@@ -8,8 +10,6 @@ export * from "./product-variant-inventory-item";
8
10
  export * from "./product-variant-price-set";
9
11
  export * from "./publishable-api-key-sales-channel";
10
12
  export * from "./readonly";
11
- 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";
15
- export * from "./order-fulfillment";
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./cart-payment-collection"), exports);
18
18
  __exportStar(require("./cart-promotion"), exports);
19
19
  __exportStar(require("./fulfillment-set-location"), exports);
20
+ __exportStar(require("./order-cart"), exports);
21
+ __exportStar(require("./order-fulfillment"), exports);
20
22
  __exportStar(require("./order-payment-collection"), exports);
21
23
  __exportStar(require("./order-promotion"), exports);
22
24
  __exportStar(require("./product-sales-channel"), exports);
@@ -24,8 +26,6 @@ __exportStar(require("./product-variant-inventory-item"), exports);
24
26
  __exportStar(require("./product-variant-price-set"), exports);
25
27
  __exportStar(require("./publishable-api-key-sales-channel"), exports);
26
28
  __exportStar(require("./readonly"), exports);
27
- __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);
31
- __exportStar(require("./order-fulfillment"), exports);
@@ -0,0 +1,2 @@
1
+ import { ModuleJoinerConfig } from "@medusajs/types";
2
+ export declare const OrderCart: ModuleJoinerConfig;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderCart = void 0;
4
+ const utils_1 = require("@medusajs/utils");
5
+ exports.OrderCart = {
6
+ serviceName: utils_1.LINKS.OrderCart,
7
+ isLink: true,
8
+ databaseConfig: {
9
+ tableName: "order_cart",
10
+ idPrefix: "ordercart",
11
+ },
12
+ alias: [
13
+ {
14
+ name: ["order_cart", "order_carts"],
15
+ args: {
16
+ entity: "LinkOrderCart",
17
+ },
18
+ },
19
+ ],
20
+ primaryKeys: ["id", "order_id", "cart_id"],
21
+ relationships: [
22
+ {
23
+ serviceName: utils_1.Modules.ORDER,
24
+ primaryKey: "id",
25
+ foreignKey: "order_id",
26
+ alias: "order",
27
+ args: {
28
+ methodSuffix: "Orders",
29
+ },
30
+ },
31
+ {
32
+ serviceName: utils_1.Modules.CART,
33
+ primaryKey: "id",
34
+ foreignKey: "cart_id",
35
+ alias: "cart",
36
+ args: {
37
+ methodSuffix: "Carts",
38
+ },
39
+ },
40
+ ],
41
+ extends: [
42
+ {
43
+ serviceName: utils_1.Modules.ORDER,
44
+ fieldAlias: {
45
+ cart: "cart_link.cart",
46
+ },
47
+ relationship: {
48
+ serviceName: utils_1.LINKS.OrderCart,
49
+ primaryKey: "order_id",
50
+ foreignKey: "id",
51
+ alias: "cart_link",
52
+ },
53
+ },
54
+ {
55
+ serviceName: utils_1.Modules.CART,
56
+ fieldAlias: {
57
+ order: "order_link.order",
58
+ },
59
+ relationship: {
60
+ serviceName: utils_1.LINKS.OrderCart,
61
+ primaryKey: "cart_id",
62
+ foreignKey: "id",
63
+ alias: "order_link",
64
+ },
65
+ },
66
+ ],
67
+ };
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderFulfillment = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.OrderFulfillment = {
7
6
  serviceName: utils_1.LINKS.OrderFulfillment,
@@ -21,13 +20,16 @@ exports.OrderFulfillment = {
21
20
  primaryKeys: ["id", "order_id", "fulfillment_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.ORDER,
23
+ serviceName: utils_1.Modules.ORDER,
25
24
  primaryKey: "id",
26
25
  foreignKey: "order_id",
27
26
  alias: "order",
27
+ args: {
28
+ methodSuffix: "Orders",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.FULFILLMENT,
32
+ serviceName: utils_1.Modules.FULFILLMENT,
31
33
  primaryKey: "id",
32
34
  foreignKey: "fulfillment_id",
33
35
  alias: "fulfillments",
@@ -39,7 +41,7 @@ exports.OrderFulfillment = {
39
41
  ],
40
42
  extends: [
41
43
  {
42
- serviceName: modules_sdk_1.Modules.ORDER,
44
+ serviceName: utils_1.Modules.ORDER,
43
45
  fieldAlias: {
44
46
  fulfillments: "fulfillment_link.fulfillments",
45
47
  },
@@ -52,7 +54,7 @@ exports.OrderFulfillment = {
52
54
  },
53
55
  },
54
56
  {
55
- serviceName: modules_sdk_1.Modules.FULFILLMENT,
57
+ serviceName: utils_1.Modules.FULFILLMENT,
56
58
  relationship: {
57
59
  serviceName: utils_1.LINKS.OrderFulfillment,
58
60
  primaryKey: "fulfillment_id",
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderPaymentCollection = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.OrderPaymentCollection = {
7
6
  serviceName: utils_1.LINKS.OrderPaymentCollection,
@@ -21,21 +20,27 @@ exports.OrderPaymentCollection = {
21
20
  primaryKeys: ["id", "order_id", "payment_collection_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.ORDER,
23
+ serviceName: utils_1.Modules.ORDER,
25
24
  primaryKey: "id",
26
25
  foreignKey: "order_id",
27
26
  alias: "order",
27
+ args: {
28
+ methodSuffix: "Orders",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.PAYMENT,
32
+ serviceName: utils_1.Modules.PAYMENT,
31
33
  primaryKey: "id",
32
34
  foreignKey: "payment_collection_id",
33
35
  alias: "payment_collection",
36
+ args: {
37
+ methodSuffix: "PaymentCollections",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.ORDER,
43
+ serviceName: utils_1.Modules.ORDER,
39
44
  fieldAlias: {
40
45
  payment_collections: {
41
46
  path: "payment_collections_link.payment_collection",
@@ -50,7 +55,7 @@ exports.OrderPaymentCollection = {
50
55
  },
51
56
  },
52
57
  {
53
- serviceName: modules_sdk_1.Modules.PAYMENT,
58
+ serviceName: utils_1.Modules.PAYMENT,
54
59
  fieldAlias: {
55
60
  order: "order_link.order",
56
61
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderPromotion = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.OrderPromotion = {
7
6
  serviceName: utils_1.LINKS.OrderPromotion,
@@ -21,21 +20,27 @@ exports.OrderPromotion = {
21
20
  primaryKeys: ["id", "order_id", "promotion_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.ORDER,
23
+ serviceName: utils_1.Modules.ORDER,
25
24
  primaryKey: "id",
26
25
  foreignKey: "order_id",
27
26
  alias: "order",
27
+ args: {
28
+ methodSuffix: "Orders",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.PROMOTION,
32
+ serviceName: utils_1.Modules.PROMOTION,
31
33
  primaryKey: "id",
32
34
  foreignKey: "promotion_id",
33
35
  alias: "promotion",
36
+ args: {
37
+ methodSuffix: "Promotions",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.ORDER,
43
+ serviceName: utils_1.Modules.ORDER,
39
44
  fieldAlias: {
40
45
  promotion: "promotion_link.promotion",
41
46
  },
@@ -47,7 +52,7 @@ exports.OrderPromotion = {
47
52
  },
48
53
  },
49
54
  {
50
- serviceName: modules_sdk_1.Modules.PROMOTION,
55
+ serviceName: utils_1.Modules.PROMOTION,
51
56
  relationship: {
52
57
  serviceName: utils_1.LINKS.OrderPromotion,
53
58
  primaryKey: "promotion_id",
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductSalesChannel = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.ProductSalesChannel = {
7
6
  serviceName: utils_1.LINKS.ProductSalesChannel,
@@ -21,21 +20,27 @@ exports.ProductSalesChannel = {
21
20
  primaryKeys: ["id", "product_id", "sales_channel_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.PRODUCT,
23
+ serviceName: utils_1.Modules.PRODUCT,
25
24
  primaryKey: "id",
26
25
  foreignKey: "product_id",
27
26
  alias: "product",
27
+ args: {
28
+ methodSuffix: "Products",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
32
+ serviceName: utils_1.Modules.SALES_CHANNEL,
31
33
  primaryKey: "id",
32
34
  foreignKey: "sales_channel_id",
33
35
  alias: "sales_channel",
36
+ args: {
37
+ methodSuffix: "SalesChannels",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.PRODUCT,
43
+ serviceName: utils_1.Modules.PRODUCT,
39
44
  fieldAlias: {
40
45
  sales_channels: "sales_channels_link.sales_channel",
41
46
  },
@@ -48,7 +53,7 @@ exports.ProductSalesChannel = {
48
53
  },
49
54
  },
50
55
  {
51
- serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
56
+ serviceName: utils_1.Modules.SALES_CHANNEL,
52
57
  relationship: {
53
58
  serviceName: utils_1.LINKS.ProductSalesChannel,
54
59
  primaryKey: "sales_channel_id",
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductVariantInventoryItem = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.ProductVariantInventoryItem = {
7
6
  serviceName: utils_1.LINKS.ProductVariantInventoryItem,
@@ -30,25 +29,28 @@ exports.ProductVariantInventoryItem = {
30
29
  primaryKeys: ["id", "variant_id", "inventory_item_id"],
31
30
  relationships: [
32
31
  {
33
- serviceName: modules_sdk_1.Modules.PRODUCT,
32
+ serviceName: utils_1.Modules.PRODUCT,
34
33
  primaryKey: "id",
35
34
  foreignKey: "variant_id",
36
35
  alias: "variant",
37
36
  args: {
38
- methodSuffix: "Variants",
37
+ methodSuffix: "ProductVariants",
39
38
  },
40
39
  },
41
40
  {
42
- serviceName: modules_sdk_1.Modules.INVENTORY,
41
+ serviceName: utils_1.Modules.INVENTORY,
43
42
  primaryKey: "id",
44
43
  foreignKey: "inventory_item_id",
45
44
  alias: "inventory",
45
+ args: {
46
+ methodSuffix: "InventoryItems",
47
+ },
46
48
  deleteCascade: true,
47
49
  },
48
50
  ],
49
51
  extends: [
50
52
  {
51
- serviceName: modules_sdk_1.Modules.PRODUCT,
53
+ serviceName: utils_1.Modules.PRODUCT,
52
54
  fieldAlias: {
53
55
  inventory: "inventory_items.inventory",
54
56
  },
@@ -61,15 +63,16 @@ exports.ProductVariantInventoryItem = {
61
63
  },
62
64
  },
63
65
  {
64
- serviceName: modules_sdk_1.Modules.INVENTORY,
66
+ serviceName: utils_1.Modules.INVENTORY,
65
67
  fieldAlias: {
66
- variant: "variant_link.variant",
68
+ variants: "variant_link.variant",
67
69
  },
68
70
  relationship: {
69
71
  serviceName: utils_1.LINKS.ProductVariantInventoryItem,
70
72
  primaryKey: "inventory_item_id",
71
73
  foreignKey: "id",
72
74
  alias: "variant_link",
75
+ isList: true,
73
76
  },
74
77
  },
75
78
  ],
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductVariantPriceSet = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.ProductVariantPriceSet = {
7
6
  serviceName: utils_1.LINKS.ProductVariantPriceSet,
@@ -21,25 +20,28 @@ exports.ProductVariantPriceSet = {
21
20
  primaryKeys: ["id", "variant_id", "price_set_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.PRODUCT,
23
+ serviceName: utils_1.Modules.PRODUCT,
25
24
  primaryKey: "id",
26
25
  foreignKey: "variant_id",
27
26
  alias: "variant",
28
27
  args: {
29
- methodSuffix: "Variants",
28
+ methodSuffix: "ProductVariants",
30
29
  },
31
30
  },
32
31
  {
33
- serviceName: modules_sdk_1.Modules.PRICING,
32
+ serviceName: utils_1.Modules.PRICING,
34
33
  primaryKey: "id",
35
34
  foreignKey: "price_set_id",
36
35
  alias: "price_set",
36
+ args: {
37
+ methodSuffix: "PriceSets",
38
+ },
37
39
  deleteCascade: true,
38
40
  },
39
41
  ],
40
42
  extends: [
41
43
  {
42
- serviceName: modules_sdk_1.Modules.PRODUCT,
44
+ serviceName: utils_1.Modules.PRODUCT,
43
45
  fieldAlias: {
44
46
  price_set: "price_set_link.price_set",
45
47
  prices: "price_set_link.price_set.prices",
@@ -56,7 +58,7 @@ exports.ProductVariantPriceSet = {
56
58
  },
57
59
  },
58
60
  {
59
- serviceName: modules_sdk_1.Modules.PRICING,
61
+ serviceName: utils_1.Modules.PRICING,
60
62
  relationship: {
61
63
  serviceName: utils_1.LINKS.ProductVariantPriceSet,
62
64
  primaryKey: "price_set_id",
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PublishableApiKeySalesChannel = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
5
4
  const utils_1 = require("@medusajs/utils");
6
5
  exports.PublishableApiKeySalesChannel = {
7
6
  serviceName: utils_1.LINKS.PublishableApiKeySalesChannel,
@@ -21,21 +20,27 @@ exports.PublishableApiKeySalesChannel = {
21
20
  primaryKeys: ["id", "publishable_key_id", "sales_channel_id"],
22
21
  relationships: [
23
22
  {
24
- serviceName: modules_sdk_1.Modules.API_KEY,
23
+ serviceName: utils_1.Modules.API_KEY,
25
24
  primaryKey: "id",
26
25
  foreignKey: "publishable_key_id",
27
26
  alias: "api_key",
27
+ args: {
28
+ methodSuffix: "ApiKeys",
29
+ },
28
30
  },
29
31
  {
30
- serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
32
+ serviceName: utils_1.Modules.SALES_CHANNEL,
31
33
  primaryKey: "id",
32
34
  foreignKey: "sales_channel_id",
33
35
  alias: "sales_channel",
36
+ args: {
37
+ methodSuffix: "SalesChannels",
38
+ },
34
39
  },
35
40
  ],
36
41
  extends: [
37
42
  {
38
- serviceName: modules_sdk_1.Modules.API_KEY,
43
+ serviceName: utils_1.Modules.API_KEY,
39
44
  fieldAlias: {
40
45
  sales_channels: "sales_channels_link.sales_channel",
41
46
  },
@@ -48,7 +53,7 @@ exports.PublishableApiKeySalesChannel = {
48
53
  },
49
54
  },
50
55
  {
51
- serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
56
+ serviceName: utils_1.Modules.SALES_CHANNEL,
52
57
  fieldAlias: {
53
58
  publishable_api_keys: "api_keys_link.api_key",
54
59
  },
@@ -1,27 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CartCustomer = void 0;
4
- const modules_sdk_1 = require("@medusajs/modules-sdk");
4
+ const utils_1 = require("@medusajs/utils");
5
5
  exports.CartCustomer = {
6
6
  isLink: true,
7
7
  isReadOnlyLink: true,
8
8
  extends: [
9
9
  {
10
- serviceName: modules_sdk_1.Modules.CART,
10
+ serviceName: utils_1.Modules.CART,
11
11
  relationship: {
12
- serviceName: modules_sdk_1.Modules.CUSTOMER,
12
+ serviceName: utils_1.Modules.CUSTOMER,
13
13
  primaryKey: "id",
14
14
  foreignKey: "customer_id",
15
15
  alias: "customer",
16
+ args: {
17
+ methodSuffix: "Customers",
18
+ },
16
19
  },
17
20
  },
18
21
  {
19
- serviceName: modules_sdk_1.Modules.CUSTOMER,
22
+ serviceName: utils_1.Modules.CUSTOMER,
20
23
  relationship: {
21
- serviceName: modules_sdk_1.Modules.CART,
24
+ serviceName: utils_1.Modules.CART,
22
25
  primaryKey: "customer_id",
23
26
  foreignKey: "id",
24
27
  alias: "carts",
28
+ args: {
29
+ methodSuffix: "Carts",
30
+ },
25
31
  isList: true,
26
32
  },
27
33
  },