@medusajs/product 0.4.0-snapshot-20240429113131 → 1.0.0-rc-20241003153304

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/README.md +2 -4
  2. package/dist/index.d.ts +6 -7
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +6 -24
  5. package/dist/index.js.map +1 -0
  6. package/dist/joiner-config.d.ts +2 -16
  7. package/dist/joiner-config.d.ts.map +1 -0
  8. package/dist/joiner-config.js +23 -77
  9. package/dist/joiner-config.js.map +1 -0
  10. package/dist/migrations/InitialSetup20240401153642.d.ts +2 -1
  11. package/dist/migrations/InitialSetup20240401153642.d.ts.map +1 -0
  12. package/dist/migrations/InitialSetup20240401153642.js +3 -2
  13. package/dist/migrations/InitialSetup20240401153642.js.map +1 -0
  14. package/dist/migrations/Migration20240601111544.d.ts +6 -0
  15. package/dist/migrations/Migration20240601111544.d.ts.map +1 -0
  16. package/dist/migrations/Migration20240601111544.js +16 -0
  17. package/dist/migrations/Migration20240601111544.js.map +1 -0
  18. package/dist/migrations/Migration202408271511.d.ts +6 -0
  19. package/dist/migrations/Migration202408271511.d.ts.map +1 -0
  20. package/dist/migrations/Migration202408271511.js +14 -0
  21. package/dist/migrations/Migration202408271511.js.map +1 -0
  22. package/dist/models/index.d.ts +1 -0
  23. package/dist/models/index.d.ts.map +1 -0
  24. package/dist/models/index.js +1 -0
  25. package/dist/models/index.js.map +1 -0
  26. package/dist/models/product-category.d.ts +3 -1
  27. package/dist/models/product-category.d.ts.map +1 -0
  28. package/dist/models/product-category.js +18 -18
  29. package/dist/models/product-category.js.map +1 -0
  30. package/dist/models/product-collection.d.ts +1 -0
  31. package/dist/models/product-collection.d.ts.map +1 -0
  32. package/dist/models/product-collection.js +2 -1
  33. package/dist/models/product-collection.js.map +1 -0
  34. package/dist/models/product-image.d.ts +1 -0
  35. package/dist/models/product-image.d.ts.map +1 -0
  36. package/dist/models/product-image.js +2 -1
  37. package/dist/models/product-image.js.map +1 -0
  38. package/dist/models/product-option-value.d.ts +1 -0
  39. package/dist/models/product-option-value.d.ts.map +1 -0
  40. package/dist/models/product-option-value.js +3 -2
  41. package/dist/models/product-option-value.js.map +1 -0
  42. package/dist/models/product-option.d.ts +1 -0
  43. package/dist/models/product-option.d.ts.map +1 -0
  44. package/dist/models/product-option.js +3 -2
  45. package/dist/models/product-option.js.map +1 -0
  46. package/dist/models/product-tag.d.ts +1 -0
  47. package/dist/models/product-tag.d.ts.map +1 -0
  48. package/dist/models/product-tag.js +2 -1
  49. package/dist/models/product-tag.js.map +1 -0
  50. package/dist/models/product-type.d.ts +1 -0
  51. package/dist/models/product-type.d.ts.map +1 -0
  52. package/dist/models/product-type.js +2 -1
  53. package/dist/models/product-type.js.map +1 -0
  54. package/dist/models/product-variant.d.ts +1 -1
  55. package/dist/models/product-variant.d.ts.map +1 -0
  56. package/dist/models/product-variant.js +4 -17
  57. package/dist/models/product-variant.js.map +1 -0
  58. package/dist/models/product.d.ts +2 -1
  59. package/dist/models/product.d.ts.map +1 -0
  60. package/dist/models/product.js +5 -4
  61. package/dist/models/product.js.map +1 -0
  62. package/dist/repositories/index.d.ts +1 -1
  63. package/dist/repositories/index.d.ts.map +1 -0
  64. package/dist/repositories/index.js +2 -3
  65. package/dist/repositories/index.js.map +1 -0
  66. package/dist/repositories/product-category.d.ts +602 -20
  67. package/dist/repositories/product-category.d.ts.map +1 -0
  68. package/dist/repositories/product-category.js +273 -210
  69. package/dist/repositories/product-category.js.map +1 -0
  70. package/dist/repositories/product.d.ts +3 -2
  71. package/dist/repositories/product.d.ts.map +1 -0
  72. package/dist/repositories/product.js +2 -1
  73. package/dist/repositories/product.js.map +1 -0
  74. package/dist/schema/index.d.ts +3 -0
  75. package/dist/schema/index.d.ts.map +1 -0
  76. package/dist/schema/index.js +151 -0
  77. package/dist/schema/index.js.map +1 -0
  78. package/dist/services/index.d.ts +1 -1
  79. package/dist/services/index.d.ts.map +1 -0
  80. package/dist/services/index.js +2 -3
  81. package/dist/services/index.js.map +1 -0
  82. package/dist/services/product-category.d.ts +12 -8
  83. package/dist/services/product-category.d.ts.map +1 -0
  84. package/dist/services/product-category.js +38 -14
  85. package/dist/services/product-category.js.map +1 -0
  86. package/dist/services/product-module-service.d.ts +85 -79
  87. package/dist/services/product-module-service.d.ts.map +1 -0
  88. package/dist/services/product-module-service.js +364 -200
  89. package/dist/services/product-module-service.js.map +1 -0
  90. package/dist/tsconfig.tsbuildinfo +1 -0
  91. package/dist/types/index.d.ts +9 -2
  92. package/dist/types/index.d.ts.map +1 -0
  93. package/dist/types/index.js +1 -0
  94. package/dist/types/index.js.map +1 -0
  95. package/dist/utils/events.d.ts +147 -0
  96. package/dist/utils/events.d.ts.map +1 -0
  97. package/dist/utils/events.js +115 -0
  98. package/dist/utils/events.js.map +1 -0
  99. package/dist/utils/index.d.ts +2 -2
  100. package/dist/utils/index.d.ts.map +1 -0
  101. package/dist/utils/index.js +16 -9
  102. package/dist/utils/index.js.map +1 -0
  103. package/package.json +26 -29
  104. package/dist/initialize/index.d.ts +0 -4
  105. package/dist/initialize/index.js +0 -17
  106. package/dist/loaders/connection.d.ts +0 -4
  107. package/dist/loaders/connection.js +0 -40
  108. package/dist/loaders/container.d.ts +0 -2
  109. package/dist/loaders/container.js +0 -34
  110. package/dist/loaders/index.d.ts +0 -2
  111. package/dist/loaders/index.js +0 -18
  112. package/dist/module-definition.d.ts +0 -4
  113. package/dist/module-definition.js +0 -50
  114. package/dist/scripts/bin/run-seed.d.ts +0 -3
  115. package/dist/scripts/bin/run-seed.js +0 -52
  116. package/dist/scripts/seed-utils.d.ts +0 -5
  117. package/dist/scripts/seed-utils.js +0 -40
  118. package/dist/services/product.d.ts +0 -21
  119. package/dist/services/product.js +0 -63
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const utils_1 = require("@medusajs/utils");
15
+ const utils_1 = require("@medusajs/framework/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
17
  const index_1 = require("./index");
18
18
  const product_option_value_1 = __importDefault(require("./product-option-value"));
@@ -31,7 +31,7 @@ let ProductOption = class ProductOption {
31
31
  }
32
32
  onInit() {
33
33
  this.id = (0, utils_1.generateEntityId)(this.id, "opt");
34
- this.product_id ?? (this.product_id = this.product?.id ?? null);
34
+ this.product_id ??= this.product?.id ?? null;
35
35
  }
36
36
  };
37
37
  __decorate([
@@ -104,3 +104,4 @@ ProductOption = __decorate([
104
104
  (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
105
105
  ], ProductOption);
106
106
  exports.default = ProductOption;
107
+ //# sourceMappingURL=product-option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-option.js","sourceRoot":"","sources":["../../src/models/product-option.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAKkC;AAClC,0CAYwB;AACxB,mCAAiC;AACjC,kFAAuD;AAEvD,MAAM,6BAA6B,GAAG,oCAAoC,CAAA;AAC1E,MAAM,kCAAkC,GAAG,IAAA,sCAA8B,EAAC;IACxE,IAAI,EAAE,6BAA6B;IACnC,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,kCAAkC,CAAC,aAAa,EAAE,CAAA;AAGlD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAAnB;QA0BE,WAAM,GAAG,IAAI,iBAAU,CAAqB,IAAI,CAAC,CAAA;IA8BnD,CAAC;IAJC,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;QAC1C,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,CAAA;IAC9C,CAAC;CAC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,EAAC,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;IAChD,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;iDAAA;AAIjB;IAFC,IAAA,aAAM,GAAE;IACR,IAAA,mBAAY,GAAE;;;;2CAId;AAvDG,aAAa;IAFlB,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACvC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC9C,aAAa,CAwDlB;AAED,kBAAe,aAAa,CAAA"}
@@ -11,3 +11,4 @@ declare class ProductTag {
11
11
  onInit(): void;
12
12
  }
13
13
  export default ProductTag;
14
+ //# sourceMappingURL=product-tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-tag.d.ts","sourceRoot":"","sources":["../../src/models/product-tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAQX,MAAM,iBAAiB,CAAA;AAQxB,OAAO,OAAO,MAAM,WAAW,CAAA;AAY/B,cAEM,UAAU;IAEd,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAOzC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,CAAC,EAAE,IAAI,CAAA;IAGjB,QAAQ,8BAAgC;IAIxC,MAAM;CAGP;AAED,eAAe,UAAU,CAAA"}
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const core_1 = require("@mikro-orm/core");
16
- const utils_1 = require("@medusajs/utils");
16
+ const utils_1 = require("@medusajs/framework/utils");
17
17
  const product_1 = __importDefault(require("./product"));
18
18
  const tagValueIndexName = "IDX_tag_value_unique";
19
19
  const tagValueIndexStatement = (0, utils_1.createPsqlIndexStatementHelper)({
@@ -83,3 +83,4 @@ ProductTag = __decorate([
83
83
  (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
84
84
  ], ProductTag);
85
85
  exports.default = ProductTag;
86
+ //# sourceMappingURL=product-tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-tag.js","sourceRoot":"","sources":["../../src/models/product-tag.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0CAUwB;AAExB,qDAKkC;AAClC,wDAA+B;AAE/B,MAAM,iBAAiB,GAAG,sBAAsB,CAAA;AAChD,MAAM,sBAAsB,GAAG,IAAA,sCAA8B,EAAC;IAC5D,IAAI,EAAE,iBAAiB;IACvB,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,sBAAsB,CAAC,aAAa,EAAE,CAAA;AAGtC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QA+BE,aAAQ,GAAG,IAAI,iBAAU,CAAU,IAAI,CAAC,CAAA;IAO1C,CAAC;IAHC,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACF,CAAA;AApCC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;sCACxB;AAIX;IAFC,IAAA,kBAAU,GAAE;IACZ,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;yCACpB;AAGb;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACT;AAOzC;IALC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;8CAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;8CAAA;AAIhB;IAFC,IAAA,YAAK,EAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC;IAC7C,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;8CAAA;AAGjB;IADC,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,iBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;;4CACb;AAIxC;IAFC,IAAA,aAAM,GAAE;IACR,IAAA,mBAAY,GAAE;;;;wCAGd;AArCG,UAAU;IAFf,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;IACpC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC9C,UAAU,CAsCf;AAED,kBAAe,UAAU,CAAA"}
@@ -8,3 +8,4 @@ declare class ProductType {
8
8
  onInit(): void;
9
9
  }
10
10
  export default ProductType;
11
+ //# sourceMappingURL=product-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-type.d.ts","sourceRoot":"","sources":["../../src/models/product-type.ts"],"names":[],"mappings":"AA2BA,cAEM,WAAW;IAEf,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAOzC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,CAAC,EAAE,IAAI,CAAA;IAIjB,MAAM;CAGP;AAED,eAAe,WAAW,CAAA"}
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const core_1 = require("@mikro-orm/core");
13
- const utils_1 = require("@medusajs/utils");
13
+ const utils_1 = require("@medusajs/framework/utils");
14
14
  const typeValueIndexName = "IDX_type_value_unique";
15
15
  const typeValueIndexStatement = (0, utils_1.createPsqlIndexStatementHelper)({
16
16
  name: typeValueIndexName,
@@ -72,3 +72,4 @@ ProductType = __decorate([
72
72
  (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
73
73
  ], ProductType);
74
74
  exports.default = ProductType;
75
+ //# sourceMappingURL=product-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-type.js","sourceRoot":"","sources":["../../src/models/product-type.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0CAQwB;AAExB,qDAKkC;AAElC,MAAM,kBAAkB,GAAG,uBAAuB,CAAA;AAClD,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,IAAI,EAAE,kBAAkB;IACxB,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,uBAAuB,CAAC,aAAa,EAAE,CAAA;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAgCf,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACF,CAAA;AAjCC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;uCACxB;AAIX;IAFC,IAAA,kBAAU,GAAE;IACZ,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;0CACpB;AAGb;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAOzC;IALC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAIhB;IAFC,IAAA,YAAK,EAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;IAC9C,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;+CAAA;AAIjB;IAFC,IAAA,aAAM,GAAE;IACR,IAAA,mBAAY,GAAE;;;;yCAGd;AAlCG,WAAW;IAFhB,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;IACrC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC9C,WAAW,CAmChB;AAED,kBAAe,WAAW,CAAA"}
@@ -7,7 +7,6 @@ declare class ProductVariant {
7
7
  barcode?: string | null;
8
8
  ean?: string | null;
9
9
  upc?: string | null;
10
- inventory_quantity?: number;
11
10
  allow_backorder?: boolean;
12
11
  manage_inventory?: boolean;
13
12
  hs_code?: string | null;
@@ -29,3 +28,4 @@ declare class ProductVariant {
29
28
  onInit(): void;
30
29
  }
31
30
  export default ProductVariant;
31
+ //# sourceMappingURL=product-variant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-variant.d.ts","sourceRoot":"","sources":["../../src/models/product-variant.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,UAAU,EASX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAoDrD,cAEM,cAAc;IAElB,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,EAAE,MAAM,CAAA;IAIb,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAInB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAIvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAInB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGnB,eAAe,CAAC,EAAE,OAAO,CAAQ;IAGjC,gBAAgB,CAAC,EAAE,OAAO,CAAO;IAGjC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAG9B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAGrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAOzC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAS5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAMzB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IAQvB,OAAO,yCAA2C;IAOlD,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,CAAC,EAAE,IAAI,CAAA;IAIjB,MAAM;CAIP;AAED,eAAe,cAAc,CAAA"}
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const utils_1 = require("@medusajs/utils");
12
+ const utils_1 = require("@medusajs/framework/utils");
13
13
  const core_1 = require("@mikro-orm/core");
14
14
  const _models_1 = require(".");
15
15
  const variantSkuIndexName = "IDX_product_variant_sku_unique";
@@ -59,18 +59,13 @@ variantEanIndexStatement.MikroORMIndex();
59
59
  variantUpcIndexStatement.MikroORMIndex();
60
60
  let ProductVariant = class ProductVariant {
61
61
  constructor() {
62
- // TODO: replace with BigNumber
63
- // Note: Upon serialization, this turns to a string. This is on purpose, because you would loose
64
- // precision if you cast numeric to JS number, as JS number is a float.
65
- // Ref: https://github.com/mikro-orm/mikro-orm/issues/2295
66
- this.inventory_quantity = 100;
67
62
  this.allow_backorder = false;
68
63
  this.manage_inventory = true;
69
64
  this.options = new core_1.Collection(this);
70
65
  }
71
66
  onInit() {
72
67
  this.id = (0, utils_1.generateEntityId)(this.id, "variant");
73
- this.product_id ?? (this.product_id = this.product?.id ?? null);
68
+ this.product_id ??= this.product?.id ?? null;
74
69
  }
75
70
  };
76
71
  __decorate([
@@ -102,14 +97,6 @@ __decorate([
102
97
  (0, core_1.Property)({ columnType: "text", nullable: true }),
103
98
  __metadata("design:type", Object)
104
99
  ], ProductVariant.prototype, "upc", void 0);
105
- __decorate([
106
- (0, core_1.Property)({
107
- columnType: "numeric",
108
- default: 100,
109
- serializer: utils_1.optionalNumericSerializer,
110
- }),
111
- __metadata("design:type", Number)
112
- ], ProductVariant.prototype, "inventory_quantity", void 0);
113
100
  __decorate([
114
101
  (0, core_1.Property)({ columnType: "boolean", default: false }),
115
102
  __metadata("design:type", Boolean)
@@ -156,10 +143,9 @@ __decorate([
156
143
  ], ProductVariant.prototype, "metadata", void 0);
157
144
  __decorate([
158
145
  (0, core_1.Property)({
159
- columnType: "numeric",
146
+ columnType: "integer",
160
147
  nullable: true,
161
148
  default: 0,
162
- serializer: utils_1.optionalNumericSerializer,
163
149
  }),
164
150
  __metadata("design:type", Object)
165
151
  ], ProductVariant.prototype, "variant_rank", void 0);
@@ -223,3 +209,4 @@ ProductVariant = __decorate([
223
209
  (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
224
210
  ], ProductVariant);
225
211
  exports.default = ProductVariant;
212
+ //# sourceMappingURL=product-variant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-variant.js","sourceRoot":"","sources":["../../src/models/product-variant.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qDAKkC;AAClC,0CAWwB;AACxB,qCAAqD;AAErD,MAAM,mBAAmB,GAAG,gCAAgC,CAAA;AAC5D,MAAM,wBAAwB,GAAG,IAAA,sCAA8B,EAAC;IAC9D,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,MAAM,uBAAuB,GAAG,oCAAoC,CAAA;AACpE,MAAM,4BAA4B,GAAG,IAAA,sCAA8B,EAAC;IAClE,IAAI,EAAE,uBAAuB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,gCAAgC,CAAA;AAC5D,MAAM,wBAAwB,GAAG,IAAA,sCAA8B,EAAC;IAC9D,IAAI,EAAE,mBAAmB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eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;kDAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;kDAAA;AAIhB;IAFC,IAAA,YAAK,EAAC,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC;IACjD,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;kDAAA;AAIjB;IAFC,IAAA,aAAM,GAAE;IACR,IAAA,mBAAY,GAAE;;;;4CAId;AA/GG,cAAc;IAFnB,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IACxC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC9C,cAAc,CAgHnB;AAED,kBAAe,cAAc,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Collection } from "@mikro-orm/core";
2
- import { ProductUtils } from "@medusajs/utils";
2
+ import { ProductUtils } from "@medusajs/framework/utils";
3
3
  import ProductCategory from "./product-category";
4
4
  import ProductCollection from "./product-collection";
5
5
  import ProductImage from "./product-image";
@@ -42,3 +42,4 @@ declare class Product {
42
42
  onInit(): void;
43
43
  }
44
44
  export default Product;
45
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/models/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAWX,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAIL,YAAY,EAG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GAAG,IAAI,CAAA;IAOxB,IAAI,iCAAmC;IAQvC,MAAM,mCAAqC;IAM3C,UAAU,sCAAwC;IAGlD,YAAY,EAAE,OAAO,CAAA;IAGrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAO3B,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,CAAC,EAAE,IAAI,CAAA;IAGjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAIzC,MAAM;CASP;AAED,eAAe,OAAO,CAAA"}
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const core_1 = require("@mikro-orm/core");
16
- const utils_1 = require("@medusajs/utils");
16
+ const utils_1 = require("@medusajs/framework/utils");
17
17
  const product_category_1 = __importDefault(require("./product-category"));
18
18
  const product_collection_1 = __importDefault(require("./product-collection"));
19
19
  const product_image_1 = __importDefault(require("./product-image"));
@@ -58,10 +58,10 @@ let Product = class Product {
58
58
  }
59
59
  onInit() {
60
60
  this.id = (0, utils_1.generateEntityId)(this.id, "prod");
61
- this.type_id ?? (this.type_id = this.type?.id ?? null);
62
- this.collection_id ?? (this.collection_id = this.collection?.id ?? null);
61
+ this.type_id ??= this.type?.id ?? null;
62
+ this.collection_id ??= this.collection?.id ?? null;
63
63
  if (!this.handle && this.title) {
64
- this.handle = (0, utils_1.kebabCase)(this.title);
64
+ this.handle = (0, utils_1.toHandle)(this.title);
65
65
  }
66
66
  }
67
67
  };
@@ -254,3 +254,4 @@ Product = __decorate([
254
254
  (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
255
255
  ], Product);
256
256
  exports.default = Product;
257
+ //# sourceMappingURL=product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/models/product.ts"],"names":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C,OAAO,CA8JZ;AAED,kBAAe,OAAO,CAAA"}
@@ -1,3 +1,3 @@
1
- export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils";
2
1
  export { ProductRepository } from "./product";
3
2
  export { ProductCategoryRepository } from "./product-category";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductCategoryRepository = exports.ProductRepository = exports.BaseRepository = void 0;
4
- var utils_1 = require("@medusajs/utils");
5
- Object.defineProperty(exports, "BaseRepository", { enumerable: true, get: function () { return utils_1.MikroOrmBaseRepository; } });
3
+ exports.ProductCategoryRepository = exports.ProductRepository = void 0;
6
4
  var product_1 = require("./product");
7
5
  Object.defineProperty(exports, "ProductRepository", { enumerable: true, get: function () { return product_1.ProductRepository; } });
8
6
  var product_category_1 = require("./product-category");
9
7
  Object.defineProperty(exports, "ProductCategoryRepository", { enumerable: true, get: function () { return product_category_1.ProductCategoryRepository; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;AAAA,qCAA6C;AAApC,4GAAA,iBAAiB,OAAA;AAC1B,uDAA8D;AAArD,6HAAA,yBAAyB,OAAA"}