@infrab4a/connect 0.9.8 → 0.9.10
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 +17 -3
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/domain/catalog/models/variant.js +1 -1
- package/esm2015/lib/domain/users/services/authentication.service.js +1 -1
- package/esm2015/lib/infra/firebase/auth/authentication-firebase-auth.service.js +7 -1
- package/esm2015/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +4 -3
- package/fesm2015/infrab4a-connect.js +9 -2
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/lib/domain/catalog/models/variant.d.ts +2 -0
- package/lib/domain/users/services/authentication.service.d.ts +2 -0
- package/lib/infra/firebase/auth/authentication-firebase-auth.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1364,14 +1364,15 @@
|
|
|
1364
1364
|
CreateFirestore.prototype.save = function (data) {
|
|
1365
1365
|
var _a;
|
|
1366
1366
|
return __awaiter(this, void 0, void 0, function () {
|
|
1367
|
-
var id, docRef;
|
|
1367
|
+
var id, collectionPath, docRef;
|
|
1368
1368
|
return __generator(this, function (_b) {
|
|
1369
1369
|
switch (_b.label) {
|
|
1370
1370
|
case 0:
|
|
1371
1371
|
id = (_a = data[data.identifierFields().shift()]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
1372
|
+
collectionPath = this.buildCollectionPathForAdd(data);
|
|
1372
1373
|
if (lodash.isEmpty(id))
|
|
1373
|
-
return [2 /*return*/, this.collection(
|
|
1374
|
-
docRef = this.collection().doc(id);
|
|
1374
|
+
return [2 /*return*/, this.collection(collectionPath).add(data)];
|
|
1375
|
+
docRef = this.collection(collectionPath).doc(id);
|
|
1375
1376
|
return [4 /*yield*/, docRef.set(data)];
|
|
1376
1377
|
case 1:
|
|
1377
1378
|
_b.sent();
|
|
@@ -2013,6 +2014,19 @@
|
|
|
2013
2014
|
});
|
|
2014
2015
|
});
|
|
2015
2016
|
};
|
|
2017
|
+
AuthenticationFirebaseAuthService.prototype.signInAnonymously = function () {
|
|
2018
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2019
|
+
var auth;
|
|
2020
|
+
return __generator(this, function (_a) {
|
|
2021
|
+
switch (_a.label) {
|
|
2022
|
+
case 0: return [4 /*yield*/, this.firebaseAuth.signInAnonymously()];
|
|
2023
|
+
case 1:
|
|
2024
|
+
auth = _a.sent();
|
|
2025
|
+
return [2 /*return*/, auth.user];
|
|
2026
|
+
}
|
|
2027
|
+
});
|
|
2028
|
+
});
|
|
2029
|
+
};
|
|
2016
2030
|
return AuthenticationFirebaseAuthService;
|
|
2017
2031
|
}());
|
|
2018
2032
|
|