@infrab4a/connect 3.7.0-beta.0 → 3.7.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/bundles/infrab4a-connect.umd.js +33 -2
  2. package/bundles/infrab4a-connect.umd.js.map +1 -1
  3. package/domain/catalog/repositories/category.repository.d.ts +3 -3
  4. package/domain/shop-settings/models/index.d.ts +1 -0
  5. package/domain/shop-settings/models/shop-settings.d.ts +9 -0
  6. package/domain/shop-settings/models/types/index.d.ts +6 -1
  7. package/domain/shop-settings/models/types/shop-banner.type.d.ts +12 -0
  8. package/domain/shop-settings/models/types/shop-brands.type.d.ts +10 -0
  9. package/domain/shop-settings/models/types/shop-carousel.type.d.ts +5 -0
  10. package/domain/shop-settings/models/types/shop-collection.type.d.ts +9 -0
  11. package/domain/shop-settings/models/types/shop-section.type.d.ts +9 -0
  12. package/domain/shop-settings/repositories/index.d.ts +1 -0
  13. package/domain/shop-settings/repositories/shop-settings.repository.d.ts +4 -0
  14. package/esm2015/domain/catalog/repositories/category.repository.js +1 -1
  15. package/esm2015/domain/shop-settings/models/index.js +2 -1
  16. package/esm2015/domain/shop-settings/models/shop-settings.js +7 -0
  17. package/esm2015/domain/shop-settings/models/types/index.js +7 -2
  18. package/esm2015/domain/shop-settings/models/types/shop-banner.type.js +2 -0
  19. package/esm2015/domain/shop-settings/models/types/shop-brands.type.js +2 -0
  20. package/esm2015/domain/shop-settings/models/types/shop-carousel.type.js +2 -0
  21. package/esm2015/domain/shop-settings/models/types/shop-collection.type.js +2 -0
  22. package/esm2015/domain/shop-settings/models/types/shop-section.type.js +2 -0
  23. package/esm2015/domain/shop-settings/repositories/index.js +2 -1
  24. package/esm2015/domain/shop-settings/repositories/shop-settings.repository.js +2 -0
  25. package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +5 -3
  26. package/esm2015/infra/firebase/firestore/repositories/shop-settings/index.js +2 -1
  27. package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.js +12 -0
  28. package/fesm2015/infrab4a-connect.js +20 -3
  29. package/fesm2015/infrab4a-connect.js.map +1 -1
  30. package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +2 -1
  31. package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +1 -0
  32. package/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.d.ts +8 -0
  33. package/package.json +2 -2
@@ -1660,6 +1660,21 @@
1660
1660
  return ShopMenu;
1661
1661
  }(BaseModel));
1662
1662
 
1663
+ var ShopSettings = /** @class */ (function (_super) {
1664
+ __extends(ShopSettings, _super);
1665
+ function ShopSettings() {
1666
+ return _super !== null && _super.apply(this, arguments) || this;
1667
+ }
1668
+ Object.defineProperty(ShopSettings, "identifiersFields", {
1669
+ get: function () {
1670
+ return ['id'];
1671
+ },
1672
+ enumerable: false,
1673
+ configurable: true
1674
+ });
1675
+ return ShopSettings;
1676
+ }(BaseModel));
1677
+
1663
1678
  var InvalidArgumentError = /** @class */ (function (_super) {
1664
1679
  __extends(InvalidArgumentError, _super);
1665
1680
  function InvalidArgumentError(message) {
@@ -2553,7 +2568,7 @@
2553
2568
  })
2554
2569
  .catch(function (error) { return error; });
2555
2570
  };
2556
- CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit) {
2571
+ CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit, gender) {
2557
2572
  if (limit === void 0) { limit = 4; }
2558
2573
  return __awaiter(this, void 0, void 0, function () {
2559
2574
  var categorySnap, categories, homeSections;
@@ -2577,7 +2592,7 @@
2577
2592
  _a = {
2578
2593
  category: category
2579
2594
  };
2580
- return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true })];
2595
+ return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true, gender: gender })];
2581
2596
  case 1: return [2 /*return*/, (_a.products = _b.sent(),
2582
2597
  _a)];
2583
2598
  }
@@ -2618,6 +2633,8 @@
2618
2633
  query = _b.sent();
2619
2634
  if (options === null || options === void 0 ? void 0 : options.hasStock)
2620
2635
  query = query.where('stock.quantity', '>', 0);
2636
+ if (options === null || options === void 0 ? void 0 : options.gender)
2637
+ query = query.where('tags', 'array-contains', options === null || options === void 0 ? void 0 : options.gender);
2621
2638
  if (options === null || options === void 0 ? void 0 : options.limit)
2622
2639
  query = query.limit(options === null || options === void 0 ? void 0 : options.limit);
2623
2640
  return [4 /*yield*/, query.get()];
@@ -2952,6 +2969,18 @@
2952
2969
  return ShopMenuFirestoreRepository;
2953
2970
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2954
2971
 
2972
+ var ShopSettingsFirestoreRepository = /** @class */ (function (_super) {
2973
+ __extends(ShopSettingsFirestoreRepository, _super);
2974
+ function ShopSettingsFirestoreRepository(firestore) {
2975
+ var _this = _super.call(this) || this;
2976
+ _this.firestore = firestore;
2977
+ _this.collectionName = 'shopSettings';
2978
+ _this.model = ShopSettings;
2979
+ return _this;
2980
+ }
2981
+ return ShopSettingsFirestoreRepository;
2982
+ }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2983
+
2955
2984
  var AuthenticationFirebaseAuthService = /** @class */ (function () {
2956
2985
  function AuthenticationFirebaseAuthService(firebaseAuth) {
2957
2986
  this.firebaseAuth = firebaseAuth;
@@ -5492,6 +5521,8 @@
5492
5521
  exports.ShippingMethod = ShippingMethod;
5493
5522
  exports.ShopMenu = ShopMenu;
5494
5523
  exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
5524
+ exports.ShopSettings = ShopSettings;
5525
+ exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
5495
5526
  exports.SignOut = SignOut;
5496
5527
  exports.Subscription = Subscription;
5497
5528
  exports.SubscriptionEditionFirestoreRepository = SubscriptionEditionFirestoreRepository;