@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.
Files changed (212) hide show
  1. package/dist/definitions/cart-payment-collection.d.ts +2 -1
  2. package/dist/definitions/cart-payment-collection.d.ts.map +1 -0
  3. package/dist/definitions/cart-payment-collection.js +15 -9
  4. package/dist/definitions/cart-payment-collection.js.map +1 -0
  5. package/dist/definitions/cart-promotion.d.ts +2 -1
  6. package/dist/definitions/cart-promotion.d.ts.map +1 -0
  7. package/dist/definitions/cart-promotion.js +22 -18
  8. package/dist/definitions/cart-promotion.js.map +1 -0
  9. package/dist/definitions/fulfillment-provider-location.d.ts +3 -0
  10. package/dist/definitions/fulfillment-provider-location.d.ts.map +1 -0
  11. package/dist/definitions/fulfillment-provider-location.js +72 -0
  12. package/dist/definitions/fulfillment-provider-location.js.map +1 -0
  13. package/dist/definitions/fulfillment-set-location.d.ts +3 -2
  14. package/dist/definitions/fulfillment-set-location.d.ts.map +1 -0
  15. package/dist/definitions/fulfillment-set-location.js +42 -33
  16. package/dist/definitions/fulfillment-set-location.js.map +1 -0
  17. package/dist/definitions/index.d.ts +7 -9
  18. package/dist/definitions/index.d.ts.map +1 -0
  19. package/dist/definitions/index.js +7 -9
  20. package/dist/definitions/index.js.map +1 -0
  21. package/dist/definitions/order-cart.d.ts +3 -0
  22. package/dist/definitions/order-cart.d.ts.map +1 -0
  23. package/dist/definitions/order-cart.js +68 -0
  24. package/dist/definitions/order-cart.js.map +1 -0
  25. package/dist/definitions/order-claim-payment-collection.d.ts +3 -0
  26. package/dist/definitions/order-claim-payment-collection.d.ts.map +1 -0
  27. package/dist/definitions/order-claim-payment-collection.js +74 -0
  28. package/dist/definitions/order-claim-payment-collection.js.map +1 -0
  29. package/dist/definitions/order-exchange-payment-collection.d.ts +3 -0
  30. package/dist/definitions/order-exchange-payment-collection.d.ts.map +1 -0
  31. package/dist/definitions/order-exchange-payment-collection.js +74 -0
  32. package/dist/definitions/order-exchange-payment-collection.js.map +1 -0
  33. package/dist/definitions/order-fulfillment.d.ts +3 -0
  34. package/dist/definitions/order-fulfillment.d.ts.map +1 -0
  35. package/dist/definitions/order-fulfillment.js +72 -0
  36. package/dist/definitions/order-fulfillment.js.map +1 -0
  37. package/dist/definitions/order-payment-collection.d.ts +3 -0
  38. package/dist/definitions/order-payment-collection.d.ts.map +1 -0
  39. package/dist/definitions/order-payment-collection.js +72 -0
  40. package/dist/definitions/order-payment-collection.js.map +1 -0
  41. package/dist/definitions/order-promotion.d.ts +2 -1
  42. package/dist/definitions/order-promotion.d.ts.map +1 -0
  43. package/dist/definitions/order-promotion.js +20 -11
  44. package/dist/definitions/order-promotion.js.map +1 -0
  45. package/dist/definitions/order-return-fulfillment.d.ts +3 -0
  46. package/dist/definitions/order-return-fulfillment.d.ts.map +1 -0
  47. package/dist/definitions/order-return-fulfillment.js +69 -0
  48. package/dist/definitions/order-return-fulfillment.js.map +1 -0
  49. package/dist/definitions/product-sales-channel.d.ts +2 -1
  50. package/dist/definitions/product-sales-channel.d.ts.map +1 -0
  51. package/dist/definitions/product-sales-channel.js +18 -9
  52. package/dist/definitions/product-sales-channel.js.map +1 -0
  53. package/dist/definitions/product-variant-inventory-item.d.ts +2 -1
  54. package/dist/definitions/product-variant-inventory-item.d.ts.map +1 -0
  55. package/dist/definitions/product-variant-inventory-item.js +21 -11
  56. package/dist/definitions/product-variant-inventory-item.js.map +1 -0
  57. package/dist/definitions/product-variant-price-set.d.ts +2 -1
  58. package/dist/definitions/product-variant-price-set.d.ts.map +1 -0
  59. package/dist/definitions/product-variant-price-set.js +18 -12
  60. package/dist/definitions/product-variant-price-set.js.map +1 -0
  61. package/dist/definitions/publishable-api-key-sales-channel.d.ts +2 -1
  62. package/dist/definitions/publishable-api-key-sales-channel.d.ts.map +1 -0
  63. package/dist/definitions/publishable-api-key-sales-channel.js +22 -8
  64. package/dist/definitions/publishable-api-key-sales-channel.js.map +1 -0
  65. package/dist/definitions/readonly/cart-customer.d.ts +3 -0
  66. package/dist/definitions/readonly/cart-customer.d.ts.map +1 -0
  67. package/dist/definitions/{cart-customer.js → readonly/cart-customer.js} +14 -5
  68. package/dist/definitions/readonly/cart-customer.js.map +1 -0
  69. package/dist/definitions/readonly/cart-product.d.ts +3 -0
  70. package/dist/definitions/readonly/cart-product.d.ts.map +1 -0
  71. package/dist/definitions/readonly/cart-product.js +50 -0
  72. package/dist/definitions/readonly/cart-product.js.map +1 -0
  73. package/dist/definitions/readonly/cart-region.d.ts +3 -0
  74. package/dist/definitions/readonly/cart-region.d.ts.map +1 -0
  75. package/dist/definitions/{cart-region.js → readonly/cart-region.js} +14 -5
  76. package/dist/definitions/readonly/cart-region.js.map +1 -0
  77. package/dist/definitions/readonly/cart-sales-channel.d.ts +3 -0
  78. package/dist/definitions/readonly/cart-sales-channel.d.ts.map +1 -0
  79. package/dist/definitions/{cart-sales-channel.js → readonly/cart-sales-channel.js} +14 -5
  80. package/dist/definitions/readonly/cart-sales-channel.js.map +1 -0
  81. package/dist/definitions/readonly/index.d.ts +12 -0
  82. package/dist/definitions/readonly/index.d.ts.map +1 -0
  83. package/dist/definitions/readonly/index.js +28 -0
  84. package/dist/definitions/readonly/index.js.map +1 -0
  85. package/dist/definitions/readonly/inventory-level-stock-location.d.ts +3 -0
  86. package/dist/definitions/readonly/inventory-level-stock-location.d.ts.map +1 -0
  87. package/dist/definitions/{inventory-level-stock-location.js → readonly/inventory-level-stock-location.js} +8 -3
  88. package/dist/definitions/readonly/inventory-level-stock-location.js.map +1 -0
  89. package/dist/definitions/readonly/line-item-adjustment-promotion.d.ts +3 -0
  90. package/dist/definitions/readonly/line-item-adjustment-promotion.d.ts.map +1 -0
  91. package/dist/definitions/readonly/line-item-adjustment-promotion.js +24 -0
  92. package/dist/definitions/readonly/line-item-adjustment-promotion.js.map +1 -0
  93. package/dist/definitions/readonly/order-customer.d.ts +3 -0
  94. package/dist/definitions/readonly/order-customer.d.ts.map +1 -0
  95. package/dist/definitions/{order-customer.js → readonly/order-customer.js} +14 -5
  96. package/dist/definitions/readonly/order-customer.js.map +1 -0
  97. package/dist/definitions/readonly/order-product.d.ts +3 -0
  98. package/dist/definitions/readonly/order-product.d.ts.map +1 -0
  99. package/dist/definitions/readonly/order-product.js +51 -0
  100. package/dist/definitions/readonly/order-product.js.map +1 -0
  101. package/dist/definitions/readonly/order-region.d.ts +3 -0
  102. package/dist/definitions/readonly/order-region.d.ts.map +1 -0
  103. package/dist/definitions/{order-region.js → readonly/order-region.js} +14 -5
  104. package/dist/definitions/readonly/order-region.js.map +1 -0
  105. package/dist/definitions/readonly/order-sales-channel.d.ts +3 -0
  106. package/dist/definitions/readonly/order-sales-channel.d.ts.map +1 -0
  107. package/dist/definitions/readonly/order-sales-channel.js +38 -0
  108. package/dist/definitions/readonly/order-sales-channel.js.map +1 -0
  109. package/dist/definitions/readonly/store-currency.d.ts +3 -0
  110. package/dist/definitions/readonly/store-currency.d.ts.map +1 -0
  111. package/dist/definitions/readonly/store-currency.js +24 -0
  112. package/dist/definitions/readonly/store-currency.js.map +1 -0
  113. package/dist/definitions/region-payment-provider.d.ts +2 -1
  114. package/dist/definitions/region-payment-provider.d.ts.map +1 -0
  115. package/dist/definitions/region-payment-provider.js +20 -11
  116. package/dist/definitions/region-payment-provider.js.map +1 -0
  117. package/dist/definitions/sales-channel-location.d.ts +2 -1
  118. package/dist/definitions/sales-channel-location.d.ts.map +1 -0
  119. package/dist/definitions/sales-channel-location.js +23 -11
  120. package/dist/definitions/sales-channel-location.js.map +1 -0
  121. package/dist/definitions/shipping-option-price-set.d.ts +2 -1
  122. package/dist/definitions/shipping-option-price-set.d.ts.map +1 -0
  123. package/dist/definitions/shipping-option-price-set.js +12 -9
  124. package/dist/definitions/shipping-option-price-set.js.map +1 -0
  125. package/dist/index.d.ts +3 -2
  126. package/dist/index.d.ts.map +1 -0
  127. package/dist/index.js +3 -2
  128. package/dist/index.js.map +1 -0
  129. package/dist/initialize/index.d.ts +13 -4
  130. package/dist/initialize/index.d.ts.map +1 -0
  131. package/dist/initialize/index.js +42 -28
  132. package/dist/initialize/index.js.map +1 -0
  133. package/dist/initialize/module-definition.d.ts +2 -1
  134. package/dist/initialize/module-definition.d.ts.map +1 -0
  135. package/dist/initialize/module-definition.js +2 -2
  136. package/dist/initialize/module-definition.js.map +1 -0
  137. package/dist/loaders/connection.d.ts +2 -1
  138. package/dist/loaders/connection.d.ts.map +1 -0
  139. package/dist/loaders/connection.js +3 -3
  140. package/dist/loaders/connection.js.map +1 -0
  141. package/dist/loaders/container.d.ts +2 -2
  142. package/dist/loaders/container.d.ts.map +1 -0
  143. package/dist/loaders/container.js +6 -7
  144. package/dist/loaders/container.js.map +1 -0
  145. package/dist/loaders/index.d.ts +2 -1
  146. package/dist/loaders/index.d.ts.map +1 -0
  147. package/dist/loaders/index.js +2 -2
  148. package/dist/loaders/index.js.map +1 -0
  149. package/dist/migration/index.d.ts +103 -2
  150. package/dist/migration/index.d.ts.map +1 -0
  151. package/dist/migration/index.js +341 -46
  152. package/dist/migration/index.js.map +1 -0
  153. package/dist/repositories/index.d.ts +2 -1
  154. package/dist/repositories/index.d.ts.map +1 -0
  155. package/dist/repositories/index.js +2 -1
  156. package/dist/repositories/index.js.map +1 -0
  157. package/dist/repositories/link.d.ts +20 -20
  158. package/dist/repositories/link.d.ts.map +1 -0
  159. package/dist/repositories/link.js +3 -3
  160. package/dist/repositories/link.js.map +1 -0
  161. package/dist/services/dynamic-service-class.d.ts +2 -1
  162. package/dist/services/dynamic-service-class.d.ts.map +1 -0
  163. package/dist/services/dynamic-service-class.js +10 -3
  164. package/dist/services/dynamic-service-class.js.map +1 -0
  165. package/dist/services/index.d.ts +1 -0
  166. package/dist/services/index.d.ts.map +1 -0
  167. package/dist/services/index.js +1 -0
  168. package/dist/services/index.js.map +1 -0
  169. package/dist/services/link-module-service.d.ts +5 -3
  170. package/dist/services/link-module-service.d.ts.map +1 -0
  171. package/dist/services/link-module-service.js +34 -41
  172. package/dist/services/link-module-service.js.map +1 -0
  173. package/dist/services/link.d.ts +2 -1
  174. package/dist/services/link.d.ts.map +1 -0
  175. package/dist/services/link.js +2 -1
  176. package/dist/services/link.js.map +1 -0
  177. package/dist/tsconfig.tsbuildinfo +1 -0
  178. package/dist/types/index.d.ts +2 -1
  179. package/dist/types/index.d.ts.map +1 -0
  180. package/dist/types/index.js +1 -0
  181. package/dist/types/index.js.map +1 -0
  182. package/dist/utils/compress-name.d.ts +2 -0
  183. package/dist/utils/compress-name.d.ts.map +1 -0
  184. package/dist/utils/compress-name.js +33 -0
  185. package/dist/utils/compress-name.js.map +1 -0
  186. package/dist/utils/generate-entity.d.ts +2 -1
  187. package/dist/utils/generate-entity.d.ts.map +1 -0
  188. package/dist/utils/generate-entity.js +6 -6
  189. package/dist/utils/generate-entity.js.map +1 -0
  190. package/dist/utils/generate-schema.d.ts +2 -1
  191. package/dist/utils/generate-schema.d.ts.map +1 -0
  192. package/dist/utils/generate-schema.js +76 -20
  193. package/dist/utils/generate-schema.js.map +1 -0
  194. package/dist/utils/index.d.ts +1 -1
  195. package/dist/utils/index.d.ts.map +1 -0
  196. package/dist/utils/index.js +5 -6
  197. package/dist/utils/index.js.map +1 -0
  198. package/package.json +22 -15
  199. package/dist/definitions/cart-customer.d.ts +0 -2
  200. package/dist/definitions/cart-region.d.ts +0 -2
  201. package/dist/definitions/cart-sales-channel.d.ts +0 -2
  202. package/dist/definitions/inventory-level-stock-location.d.ts +0 -2
  203. package/dist/definitions/order-customer.d.ts +0 -2
  204. package/dist/definitions/order-region.d.ts +0 -2
  205. package/dist/definitions/order-sales-channel.d.ts +0 -2
  206. package/dist/definitions/order-sales-channel.js +0 -67
  207. package/dist/definitions/product-shipping-profile.d.ts +0 -2
  208. package/dist/definitions/product-shipping-profile.js +0 -61
  209. package/dist/definitions/store-default-currency.d.ts +0 -2
  210. package/dist/definitions/store-default-currency.js +0 -19
  211. package/dist/utils/compose-link-name.d.ts +0 -2
  212. package/dist/utils/compose-link-name.js +0 -12
@@ -1,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const InventoryLevelStockLocation: ModuleJoinerConfig;
@@ -1,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const OrderCustomer: ModuleJoinerConfig;
@@ -1,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const OrderRegion: ModuleJoinerConfig;
@@ -1,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const OrderSalesChannel: ModuleJoinerConfig;
@@ -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,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const ProductShippingProfile: ModuleJoinerConfig;
@@ -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,2 +0,0 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const StoreDefaultCurrency: ModuleJoinerConfig;
@@ -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,2 +0,0 @@
1
- export declare const composeLinkName: (...args: any[]) => string;
2
- export declare const composeTableName: (...args: any[]) => string;
@@ -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;