@medusajs/link-modules 0.2.11 → 0.2.12-snapshot-20240503181318

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
1
  import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const FulfillmentSetLocation: ModuleJoinerConfig;
2
+ export declare const LocationFulfillmentSet: ModuleJoinerConfig;
@@ -1,56 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FulfillmentSetLocation = void 0;
3
+ exports.LocationFulfillmentSet = void 0;
4
4
  const modules_sdk_1 = require("@medusajs/modules-sdk");
5
5
  const utils_1 = require("@medusajs/utils");
6
- exports.FulfillmentSetLocation = {
7
- serviceName: utils_1.LINKS.FulfillmentSetLocation,
6
+ exports.LocationFulfillmentSet = {
7
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
8
8
  isLink: true,
9
9
  databaseConfig: {
10
- tableName: "fulfillment_set_location",
11
- idPrefix: "fsloc",
10
+ tableName: "location_fulfillment_set",
11
+ idPrefix: "locfs",
12
12
  },
13
13
  alias: [
14
14
  {
15
- name: ["fulfillment_set_location", "fulfillment_set_locations"],
15
+ name: ["location_fulfillment_set", "location_fulfillment_sets"],
16
16
  args: {
17
- entity: "LinkFulfillmentSetLocation",
17
+ entity: "LinkLocationFulfillmentSet",
18
18
  },
19
19
  },
20
20
  ],
21
- primaryKeys: ["id", "fulfillment_set_id", "stock_location_id"],
21
+ primaryKeys: ["id", "stock_location_id", "fulfillment_set_id"],
22
22
  relationships: [
23
- {
24
- serviceName: modules_sdk_1.Modules.FULFILLMENT,
25
- primaryKey: "id",
26
- foreignKey: "fulfillment_set_id",
27
- alias: "fulfillment_set",
28
- },
29
23
  {
30
24
  serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
31
25
  primaryKey: "id",
32
26
  foreignKey: "stock_location_id",
33
27
  alias: "location",
34
28
  },
35
- ],
36
- extends: [
37
29
  {
38
30
  serviceName: modules_sdk_1.Modules.FULFILLMENT,
39
- fieldAlias: {
40
- stock_locations: "locations_link.location",
41
- },
42
- relationship: {
43
- serviceName: utils_1.LINKS.FulfillmentSetLocation,
44
- primaryKey: "fulfillment_set_id",
45
- foreignKey: "id",
46
- alias: "locations_link",
47
- isList: true,
48
- },
31
+ primaryKey: "id",
32
+ foreignKey: "fulfillment_set_id",
33
+ alias: "fulfillment_set",
34
+ deleteCascade: true,
49
35
  },
36
+ ],
37
+ extends: [
50
38
  {
51
39
  serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
52
40
  relationship: {
53
- serviceName: utils_1.LINKS.FulfillmentSetLocation,
41
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
54
42
  primaryKey: "stock_location_id",
55
43
  foreignKey: "id",
56
44
  alias: "fulfillment_set_link",
@@ -60,5 +48,14 @@ exports.FulfillmentSetLocation = {
60
48
  fulfillment_sets: "fulfillment_set_link.fulfillment_set",
61
49
  },
62
50
  },
51
+ {
52
+ serviceName: modules_sdk_1.Modules.FULFILLMENT,
53
+ relationship: {
54
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
55
+ primaryKey: "fulfillment_set_id",
56
+ foreignKey: "id",
57
+ alias: "locations_link",
58
+ },
59
+ },
63
60
  ],
64
61
  };
@@ -3,8 +3,8 @@ export * from "./cart-payment-collection";
3
3
  export * from "./cart-promotion";
4
4
  export * from "./cart-region";
5
5
  export * from "./cart-sales-channel";
6
- export * from "./fulfillment-set-location";
7
6
  export * from "./inventory-level-stock-location";
7
+ export * from "./location-fulfillment-set";
8
8
  export * from "./order-customer";
9
9
  export * from "./order-promotion";
10
10
  export * from "./order-region";
@@ -19,8 +19,8 @@ __exportStar(require("./cart-payment-collection"), exports);
19
19
  __exportStar(require("./cart-promotion"), exports);
20
20
  __exportStar(require("./cart-region"), exports);
21
21
  __exportStar(require("./cart-sales-channel"), exports);
22
- __exportStar(require("./fulfillment-set-location"), exports);
23
22
  __exportStar(require("./inventory-level-stock-location"), exports);
23
+ __exportStar(require("./location-fulfillment-set"), exports);
24
24
  __exportStar(require("./order-customer"), exports);
25
25
  __exportStar(require("./order-promotion"), exports);
26
26
  __exportStar(require("./order-region"), exports);
@@ -0,0 +1,2 @@
1
+ import { ModuleJoinerConfig } from "@medusajs/types";
2
+ export declare const LocationFulfillmentSet: ModuleJoinerConfig;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocationFulfillmentSet = void 0;
4
+ const modules_sdk_1 = require("@medusajs/modules-sdk");
5
+ const utils_1 = require("@medusajs/utils");
6
+ exports.LocationFulfillmentSet = {
7
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
8
+ isLink: true,
9
+ databaseConfig: {
10
+ tableName: "location_fulfillment_set",
11
+ idPrefix: "locfs",
12
+ },
13
+ alias: [
14
+ {
15
+ name: ["location_fulfillment_set", "location_fulfillment_sets"],
16
+ args: {
17
+ entity: "LinkLocationFulfillmentSet",
18
+ },
19
+ },
20
+ ],
21
+ primaryKeys: ["id", "stock_location_id", "fulfillment_set_id"],
22
+ relationships: [
23
+ {
24
+ serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
25
+ primaryKey: "id",
26
+ foreignKey: "stock_location_id",
27
+ alias: "location",
28
+ },
29
+ {
30
+ serviceName: modules_sdk_1.Modules.FULFILLMENT,
31
+ primaryKey: "id",
32
+ foreignKey: "fulfillment_set_id",
33
+ alias: "fulfillment_set",
34
+ deleteCascade: true,
35
+ },
36
+ ],
37
+ extends: [
38
+ {
39
+ serviceName: modules_sdk_1.Modules.STOCK_LOCATION,
40
+ relationship: {
41
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
42
+ primaryKey: "stock_location_id",
43
+ foreignKey: "id",
44
+ alias: "fulfillment_set_link",
45
+ isList: true,
46
+ },
47
+ fieldAlias: {
48
+ fulfillment_sets: "fulfillment_set_link.fulfillment_set",
49
+ },
50
+ },
51
+ {
52
+ serviceName: modules_sdk_1.Modules.FULFILLMENT,
53
+ relationship: {
54
+ serviceName: utils_1.LINKS.LocationFulfillmentSet,
55
+ primaryKey: "fulfillment_set_id",
56
+ foreignKey: "id",
57
+ alias: "locations_link",
58
+ },
59
+ },
60
+ ],
61
+ };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductVariantInventoryItem = void 0;
4
- const utils_1 = require("@medusajs/utils");
5
4
  const modules_sdk_1 = require("@medusajs/modules-sdk");
5
+ const utils_1 = require("@medusajs/utils");
6
6
  exports.ProductVariantInventoryItem = {
7
7
  serviceName: utils_1.LINKS.ProductVariantInventoryItem,
8
8
  isLink: true,
@@ -49,6 +49,9 @@ exports.ProductVariantInventoryItem = {
49
49
  extends: [
50
50
  {
51
51
  serviceName: modules_sdk_1.Modules.PRODUCT,
52
+ fieldAlias: {
53
+ inventory: "inventory_items.inventory",
54
+ },
52
55
  relationship: {
53
56
  serviceName: utils_1.LINKS.ProductVariantInventoryItem,
54
57
  primaryKey: "variant_id",
@@ -44,6 +44,7 @@ exports.ProductVariantPriceSet = {
44
44
  serviceName: modules_sdk_1.Modules.PRODUCT,
45
45
  fieldAlias: {
46
46
  price_set: "price_set_link.price_set",
47
+ prices: "price_set_link.price_set.prices",
47
48
  calculated_price: {
48
49
  path: "price_set_link.price_set.calculated_price",
49
50
  forwardArgumentsOnPath: ["price_set_link.price_set"],
@@ -15,9 +15,7 @@ export declare function getLinkRepository(model: EntitySchema): {
15
15
  findAndCount(options?: import("@medusajs/types").FindOptions<object> | undefined, context?: Context | undefined): Promise<[object[], number]>;
16
16
  upsert(data: unknown[], context?: Context | undefined): Promise<object[]>;
17
17
  upsertWithReplace(data: unknown[], config?: import("@medusajs/types").UpsertWithReplaceConfig<object> | undefined, context?: Context | undefined): Promise<object[]>;
18
- softDelete(idsOrFilter: string[] | {
19
- [x: string]: any;
20
- }, sharedContext?: Context | undefined): Promise<[object[], Record<string, unknown[]>]>;
18
+ softDelete(filters: string | string[] | (object & import("@medusajs/types").BaseFilterable<object>) | (object & import("@medusajs/types").BaseFilterable<object>)[], sharedContext?: Context | undefined): Promise<[object[], Record<string, unknown[]>]>;
21
19
  restore(idsOrFilter: string[] | {
22
20
  [x: string]: any;
23
21
  }, sharedContext?: Context | undefined): Promise<[object[], Record<string, unknown[]>]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/link-modules",
3
- "version": "0.2.11",
3
+ "version": "0.2.12-snapshot-20240503181318",
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.11",
43
- "@medusajs/types": "^1.11.16",
44
- "@medusajs/utils": "^1.11.9",
42
+ "@medusajs/modules-sdk": "1.12.12-snapshot-20240503181318",
43
+ "@medusajs/types": "1.11.17-snapshot-20240503181318",
44
+ "@medusajs/utils": "1.11.10-snapshot-20240503181318",
45
45
  "@mikro-orm/core": "5.9.7",
46
46
  "@mikro-orm/postgresql": "5.9.7",
47
47
  "awilix": "^8.0.0"