@intuitionrobotics/firebase 0.41.69 → 0.41.70

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 (48) hide show
  1. package/app-backend/FirebaseModule.js +46 -63
  2. package/app-backend/FirebaseModule.js.map +1 -1
  3. package/app-backend/auth/FirebaseBaseWrapper.d.ts +2 -2
  4. package/app-backend/auth/FirebaseBaseWrapper.js +8 -24
  5. package/app-backend/auth/FirebaseBaseWrapper.js.map +1 -1
  6. package/app-backend/auth/FirebaseSession_Admin.d.ts +4 -6
  7. package/app-backend/auth/FirebaseSession_Admin.js +21 -37
  8. package/app-backend/auth/FirebaseSession_Admin.js.map +1 -1
  9. package/app-backend/auth/firebase-session.d.ts +2 -7
  10. package/app-backend/auth/firebase-session.js +22 -42
  11. package/app-backend/auth/firebase-session.js.map +1 -1
  12. package/app-backend/database/DatabaseWrapper.d.ts +1 -1
  13. package/app-backend/database/DatabaseWrapper.js +91 -195
  14. package/app-backend/database/DatabaseWrapper.js.map +1 -1
  15. package/app-backend/firestore/FirestoreCollection.js +92 -216
  16. package/app-backend/firestore/FirestoreCollection.js.map +1 -1
  17. package/app-backend/firestore/FirestoreInterface.js +30 -34
  18. package/app-backend/firestore/FirestoreInterface.js.map +1 -1
  19. package/app-backend/firestore/FirestoreTransaction.js +125 -321
  20. package/app-backend/firestore/FirestoreTransaction.js.map +1 -1
  21. package/app-backend/firestore/FirestoreWrapper.d.ts +1 -1
  22. package/app-backend/firestore/FirestoreWrapper.js +25 -72
  23. package/app-backend/firestore/FirestoreWrapper.js.map +1 -1
  24. package/app-backend/functions/firebase-function.js +178 -327
  25. package/app-backend/functions/firebase-function.js.map +1 -1
  26. package/app-backend/push/PushMessagesWrapper.d.ts +1 -1
  27. package/app-backend/push/PushMessagesWrapper.js +31 -86
  28. package/app-backend/push/PushMessagesWrapper.js.map +1 -1
  29. package/app-backend/storage/StorageWrapper.d.ts +2 -2
  30. package/app-backend/storage/StorageWrapper.js +166 -347
  31. package/app-backend/storage/StorageWrapper.js.map +1 -1
  32. package/app-frontend/FirebaseModule.js +81 -169
  33. package/app-frontend/FirebaseModule.js.map +1 -1
  34. package/app-frontend/analytics/AnalyticsModule.js +17 -68
  35. package/app-frontend/analytics/AnalyticsModule.js.map +1 -1
  36. package/app-frontend/analytics/AnalyticsWrapper.js +17 -33
  37. package/app-frontend/analytics/AnalyticsWrapper.js.map +1 -1
  38. package/app-frontend/auth/FirebaseSession.js +33 -80
  39. package/app-frontend/auth/FirebaseSession.js.map +1 -1
  40. package/app-frontend/auth/SwFirebaseSession.js +11 -27
  41. package/app-frontend/auth/SwFirebaseSession.js.map +1 -1
  42. package/app-frontend/database/DatabaseWrapper.js +64 -148
  43. package/app-frontend/database/DatabaseWrapper.js.map +1 -1
  44. package/app-frontend/messaging/MessagingWrapper.js +16 -68
  45. package/app-frontend/messaging/MessagingWrapper.js.map +1 -1
  46. package/app-frontend/messaging/SwMessagingWrapper.js +11 -28
  47. package/app-frontend/messaging/SwMessagingWrapper.js.map +1 -1
  48. package/package.json +6 -6
@@ -16,19 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- var __extends = (this && this.__extends) || (function () {
20
- var extendStatics = function (d, b) {
21
- extendStatics = Object.setPrototypeOf ||
22
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24
- return extendStatics(d, b);
25
- };
26
- return function (d, b) {
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- };
31
- })();
32
19
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
20
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
21
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -38,74 +25,40 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
38
25
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39
26
  });
40
27
  };
41
- var __generator = (this && this.__generator) || function (thisArg, body) {
42
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
- function verb(n) { return function (v) { return step([n, v]); }; }
45
- function step(op) {
46
- if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
48
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
- if (y = 0, t) op = [op[0] & 2, t.value];
50
- switch (op[0]) {
51
- case 0: case 1: t = op; break;
52
- case 4: _.label++; return { value: op[1], done: false };
53
- case 5: _.label++; y = op[1]; op = [0]; continue;
54
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
- default:
56
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
- if (t[2]) _.ops.pop();
61
- _.trys.pop(); continue;
62
- }
63
- op = body.call(thisArg, _);
64
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
- }
67
- };
68
28
  Object.defineProperty(exports, "__esModule", { value: true });
69
29
  exports.FirestoreWrapper = void 0;
70
- var FirestoreCollection_1 = require("./FirestoreCollection");
71
- var FirebaseBaseWrapper_1 = require("../auth/FirebaseBaseWrapper");
72
- var firestore_1 = require("firebase-admin/firestore");
73
- var FirestoreWrapper = /** @class */ (function (_super) {
74
- __extends(FirestoreWrapper, _super);
75
- function FirestoreWrapper(firebaseSession) {
76
- var _this = _super.call(this, firebaseSession) || this;
77
- _this.collections = {};
78
- _this.firestore = firestore_1.getFirestore(firebaseSession.app);
79
- return _this;
30
+ const FirestoreCollection_1 = require("./FirestoreCollection");
31
+ const FirebaseBaseWrapper_1 = require("../auth/FirebaseBaseWrapper");
32
+ const firestore_1 = require("firebase-admin/firestore");
33
+ class FirestoreWrapper extends FirebaseBaseWrapper_1.FirebaseBaseWrapper {
34
+ constructor(firebaseSession) {
35
+ super(firebaseSession);
36
+ this.collections = {};
37
+ this.firestore = firestore_1.getFirestore(firebaseSession.app);
80
38
  }
81
- FirestoreWrapper.prototype.getCollection = function (name, externalFilterKeys) {
82
- var collection = this.collections[name];
39
+ getCollection(name, externalFilterKeys) {
40
+ const collection = this.collections[name];
83
41
  if (collection)
84
42
  return collection;
85
43
  return this.collections[name] = new FirestoreCollection_1.FirestoreCollection(name, this, externalFilterKeys);
86
- };
87
- FirestoreWrapper.prototype.listen = function (collection, doc) {
88
- collection.wrapper.firestore.doc(collection.name + "/" + doc).onSnapshot(function (_snapshot) {
44
+ }
45
+ listen(collection, doc) {
46
+ collection.wrapper.firestore.doc(`${collection.name}/${doc}`).onSnapshot(_snapshot => {
89
47
  console.log('recieved snapshot!');
90
48
  });
91
- };
92
- FirestoreWrapper.prototype.deleteCollection = function (name) {
93
- return __awaiter(this, void 0, void 0, function () {
94
- return __generator(this, function (_a) {
95
- return [2 /*return*/, this.getCollection(name).deleteAll()];
96
- });
49
+ }
50
+ deleteCollection(name) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ return this.getCollection(name).deleteAll();
97
53
  });
98
- };
99
- FirestoreWrapper.prototype.listCollections = function () {
100
- return __awaiter(this, void 0, void 0, function () {
101
- return __generator(this, function (_a) {
102
- if (!this.firestore.listCollections)
103
- return [2 /*return*/, []];
104
- return [2 /*return*/, this.firestore.listCollections()];
105
- });
54
+ }
55
+ listCollections() {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ if (!this.firestore.listCollections)
58
+ return [];
59
+ return this.firestore.listCollections();
106
60
  });
107
- };
108
- return FirestoreWrapper;
109
- }(FirebaseBaseWrapper_1.FirebaseBaseWrapper));
61
+ }
62
+ }
110
63
  exports.FirestoreWrapper = FirestoreWrapper;
111
64
  //# sourceMappingURL=FirestoreWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FirestoreWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreWrapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6DAA2D;AAO3D,mEAAgE;AAEhE,sDAAsD;AAEtD;IACS,oCAAmB;IAK3B,0BAAY,eAAqC;QAAjD,YACC,kBAAM,eAAe,CAAC,SAEtB;QALgB,iBAAW,GAA2D,EAAE,CAAC;QAIzF,KAAI,CAAC,SAAS,GAAG,wBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;;IACnD,CAAC;IAEM,wCAAa,GAApB,UAA0C,IAAY,EAAE,kBAAqC;QAC5F,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,UAAU;YACb,OAAO,UAAU,CAAC;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,yCAAmB,CAAO,IAAI,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAC/F,CAAC;IAEM,iCAAM,GAAb,UAAsC,UAAqC,EAAE,GAAW;QACvF,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAI,UAAU,CAAC,IAAI,SAAI,GAAK,CAAC,CAAC,UAAU,CAAC,UAAA,SAAS;YACjF,OAAO,CAAC,GAA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