@infrab4a/connect 0.4.7-beta.3 → 0.4.8

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.
@@ -1532,6 +1532,23 @@
1532
1532
  _this.model = Product;
1533
1533
  return _this;
1534
1534
  }
1535
+ ProductFirestoreRepository.prototype.getBySlug = function (slug, shop) {
1536
+ var _a;
1537
+ return __awaiter(this, void 0, void 0, function () {
1538
+ var result;
1539
+ return __generator(this, function (_b) {
1540
+ switch (_b.label) {
1541
+ case 0: return [4 /*yield*/, this.find([
1542
+ { slug: { operator: exports.Where.EQUALS, value: slug } },
1543
+ { shopAvailability: { operator: exports.Where.IN, value: [shop] } },
1544
+ ])];
1545
+ case 1:
1546
+ result = _b.sent();
1547
+ return [2 /*return*/, (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.shift()];
1548
+ }
1549
+ });
1550
+ });
1551
+ };
1535
1552
  return ProductFirestoreRepository;
1536
1553
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
1537
1554