@infrab4a/connect 0.1.0 → 0.2.1
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.
- package/bundles/infrab4a-connect.umd.js +37 -5
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/domain/catalog/models/enums/index.js +2 -0
- package/esm2015/lib/domain/catalog/models/index.js +3 -1
- package/esm2015/lib/domain/shopping/models/buy-2-win.js +7 -0
- package/esm2015/lib/domain/shopping/models/index.js +3 -1
- package/esm2015/lib/domain/shopping/repositories/buy-2-win.repository.js +2 -0
- package/esm2015/lib/domain/shopping/repositories/index.js +2 -1
- package/esm2015/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +7 -6
- package/esm2015/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +12 -0
- package/esm2015/lib/infra/firebase/firestore/repositories/shopping/index.js +2 -1
- package/fesm2015/infrab4a-connect.js +28 -6
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/lib/domain/catalog/models/enums/index.d.ts +1 -0
- package/lib/domain/catalog/models/index.d.ts +2 -0
- package/lib/domain/shopping/models/buy-2-win.d.ts +18 -0
- package/lib/domain/shopping/models/index.d.ts +2 -0
- package/lib/domain/shopping/repositories/buy-2-win.repository.d.ts +4 -0
- package/lib/domain/shopping/repositories/index.d.ts +1 -0
- package/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +48 -0
- package/lib/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -599,6 +599,12 @@
|
|
|
599
599
|
return SignOut;
|
|
600
600
|
}());
|
|
601
601
|
|
|
602
|
+
exports.Shops = void 0;
|
|
603
|
+
(function (Shops) {
|
|
604
|
+
Shops["MENSMARKET"] = "Men's Market";
|
|
605
|
+
Shops["GLAMSHOP"] = "Glamshop";
|
|
606
|
+
})(exports.Shops || (exports.Shops = {}));
|
|
607
|
+
|
|
602
608
|
var Category = /** @class */ (function (_super) {
|
|
603
609
|
__extends(Category, _super);
|
|
604
610
|
function Category() {
|
|
@@ -906,6 +912,17 @@
|
|
|
906
912
|
return SubscriptionPlan;
|
|
907
913
|
}(BaseModel));
|
|
908
914
|
|
|
915
|
+
var Buy2Win = /** @class */ (function (_super) {
|
|
916
|
+
__extends(Buy2Win, _super);
|
|
917
|
+
function Buy2Win() {
|
|
918
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
919
|
+
}
|
|
920
|
+
Buy2Win.prototype.identifierFields = function () {
|
|
921
|
+
return ['id'];
|
|
922
|
+
};
|
|
923
|
+
return Buy2Win;
|
|
924
|
+
}(BaseModel));
|
|
925
|
+
|
|
909
926
|
var InvalidArgumentError = /** @class */ (function (_super) {
|
|
910
927
|
__extends(InvalidArgumentError, _super);
|
|
911
928
|
function InvalidArgumentError(message) {
|
|
@@ -1022,12 +1039,13 @@
|
|
|
1022
1039
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1023
1040
|
_this.makeFirestoreWhere = function (queryReference, filter) { return Object.keys(filter).reduce(function (query, fieldName) { return _this.buildWhereSentence(query, fieldName, filter[fieldName]); }, queryReference); };
|
|
1024
1041
|
_this.buildWhereSentence = function (queryReference, fieldName, options) {
|
|
1042
|
+
if (_this.isSubCollection(_this) && fieldName === _this.parentIdField)
|
|
1043
|
+
return queryReference;
|
|
1025
1044
|
if (options.operator === exports.Where.LIKE) {
|
|
1026
1045
|
queryReference = queryReference.where(fieldName.toString(), '>=', options.value);
|
|
1027
1046
|
queryReference = queryReference.where(fieldName.toString(), '<=', options.value + "~");
|
|
1028
|
-
}
|
|
1029
|
-
if (_this.isSubCollection(_this) && fieldName === _this.parentIdField)
|
|
1030
1047
|
return queryReference;
|
|
1048
|
+
}
|
|
1031
1049
|
return queryReference.where(fieldName.toString(), options.operator, options.value);
|
|
1032
1050
|
};
|
|
1033
1051
|
return _this;
|
|
@@ -1066,12 +1084,12 @@
|
|
|
1066
1084
|
FindFirestore.prototype.defineLimits = function (query, filters, limits) {
|
|
1067
1085
|
if (limits === null || limits === void 0 ? void 0 : limits.offset) {
|
|
1068
1086
|
if (limits.offset instanceof this.model)
|
|
1069
|
-
query.startAfter(this.collection(this.buildCollectionPathForFind(filters)).doc(limits.offset[limits.offset.identifierFields().shift()]));
|
|
1087
|
+
query = query.startAfter(this.collection(this.buildCollectionPathForFind(filters)).doc(limits.offset[limits.offset.identifierFields().shift()]));
|
|
1070
1088
|
if (lodash.isNumber(limits.offset) || lodash.isString(limits.offset))
|
|
1071
|
-
query.startAt(limits.offset);
|
|
1089
|
+
query = query.startAt(limits.offset);
|
|
1072
1090
|
}
|
|
1073
1091
|
if (limits === null || limits === void 0 ? void 0 : limits.limit)
|
|
1074
|
-
query.limit(limits.limit);
|
|
1092
|
+
query = query.limit(limits.limit);
|
|
1075
1093
|
return query;
|
|
1076
1094
|
};
|
|
1077
1095
|
FindFirestore.prototype.calculateCount = function (data, limits) {
|
|
@@ -1458,6 +1476,18 @@
|
|
|
1458
1476
|
return SubscriptionPlanFirestoreRepository;
|
|
1459
1477
|
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
1460
1478
|
|
|
1479
|
+
var Buy2WinFirestoreRepository = /** @class */ (function (_super) {
|
|
1480
|
+
__extends(Buy2WinFirestoreRepository, _super);
|
|
1481
|
+
function Buy2WinFirestoreRepository(firestore) {
|
|
1482
|
+
var _this = _super.call(this) || this;
|
|
1483
|
+
_this.firestore = firestore;
|
|
1484
|
+
_this.collectionName = 'buy2win';
|
|
1485
|
+
_this.model = Buy2Win;
|
|
1486
|
+
return _this;
|
|
1487
|
+
}
|
|
1488
|
+
return Buy2WinFirestoreRepository;
|
|
1489
|
+
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
1490
|
+
|
|
1461
1491
|
var AuthenticationFirebaseAuthService = /** @class */ (function () {
|
|
1462
1492
|
function AuthenticationFirebaseAuthService(firebaseAuth) {
|
|
1463
1493
|
this.firebaseAuth = firebaseAuth;
|
|
@@ -1531,6 +1561,8 @@
|
|
|
1531
1561
|
exports.Base = Base;
|
|
1532
1562
|
exports.BaseModel = BaseModel;
|
|
1533
1563
|
exports.BeautyProfile = BeautyProfile;
|
|
1564
|
+
exports.Buy2Win = Buy2Win;
|
|
1565
|
+
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
1534
1566
|
exports.Category = Category;
|
|
1535
1567
|
exports.CategoryFirestoreRepository = CategoryFirestoreRepository;
|
|
1536
1568
|
exports.Checkout = Checkout;
|