@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,87 +25,45 @@ 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.PushMessagesWrapper = void 0;
70
- var FirebaseBaseWrapper_1 = require("../auth/FirebaseBaseWrapper");
71
- var messaging_1 = require("firebase-admin/messaging");
72
- var PushMessagesWrapper = /** @class */ (function (_super) {
73
- __extends(PushMessagesWrapper, _super);
74
- function PushMessagesWrapper(firebaseSession) {
75
- var _this = _super.call(this, firebaseSession) || this;
76
- _this.messaging = messaging_1.getMessaging(firebaseSession.app);
77
- return _this;
30
+ const FirebaseBaseWrapper_1 = require("../auth/FirebaseBaseWrapper");
31
+ const messaging_1 = require("firebase-admin/messaging");
32
+ class PushMessagesWrapper extends FirebaseBaseWrapper_1.FirebaseBaseWrapper {
33
+ constructor(firebaseSession) {
34
+ super(firebaseSession);
35
+ this.messaging = messaging_1.getMessaging(firebaseSession.app);
78
36
  }
79
- PushMessagesWrapper.prototype.send = function (message, dryRun) {
80
- return __awaiter(this, void 0, void 0, function () {
81
- return __generator(this, function (_a) {
82
- return [2 /*return*/, this.messaging.send(message, dryRun)];
83
- });
37
+ send(message, dryRun) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return this.messaging.send(message, dryRun);
84
40
  });
85
- };
86
- PushMessagesWrapper.prototype.sendAll = function (messages) {
87
- return __awaiter(this, void 0, void 0, function () {
88
- return __generator(this, function (_a) {
89
- return [2 /*return*/, this.messaging.sendAll(messages)];
90
- });
41
+ }
42
+ sendAll(messages) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return this.messaging.sendAll(messages);
91
45
  });
92
- };
93
- PushMessagesWrapper.prototype.sendMultiCast = function (tokens, data) {
94
- return __awaiter(this, void 0, void 0, function () {
95
- return __generator(this, function (_a) {
96
- return [2 /*return*/, this.messaging.sendMulticast({ data: data, tokens: tokens })];
97
- });
46
+ }
47
+ sendMultiCast(tokens, data) {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ return this.messaging.sendMulticast({ data, tokens });
98
50
  });
99
- };
100
- PushMessagesWrapper.prototype.sendToTopic = function (topic, data, dryRun) {
101
- return __awaiter(this, void 0, void 0, function () {
102
- return __generator(this, function (_a) {
103
- return [2 /*return*/, this.messaging.sendToTopic(topic, { data: data }, { dryRun: dryRun })];
104
- });
51
+ }
52
+ sendToTopic(topic, data, dryRun) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ return this.messaging.sendToTopic(topic, { data }, { dryRun });
105
55
  });
106
- };
107
- PushMessagesWrapper.prototype.subscribeToTopic = function (tokens, topic) {
108
- return __awaiter(this, void 0, void 0, function () {
109
- return __generator(this, function (_a) {
110
- return [2 /*return*/, this.messaging.subscribeToTopic(tokens, topic)];
111
- });
56
+ }
57
+ subscribeToTopic(tokens, topic) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ return this.messaging.subscribeToTopic(tokens, topic);
112
60
  });
113
- };
114
- PushMessagesWrapper.prototype.unsubscribeFromTopic = function (tokens, topic) {
115
- return __awaiter(this, void 0, void 0, function () {
116
- return __generator(this, function (_a) {
117
- return [2 /*return*/, this.messaging.unsubscribeFromTopic(tokens, topic)];
118
- });
61
+ }
62
+ unsubscribeFromTopic(tokens, topic) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ return this.messaging.unsubscribeFromTopic(tokens, topic);
119
65
  });
120
- };
121
- return PushMessagesWrapper;
122
- }(FirebaseBaseWrapper_1.FirebaseBaseWrapper));
66
+ }
67
+ }
123
68
  exports.PushMessagesWrapper = PushMessagesWrapper;
124
69
  //# sourceMappingURL=PushMessagesWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PushMessagesWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/PushMessagesWrapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASH,mEAAgE;AAGhE,sDAAsD;AAEtD;IACS,uCAAmB;IAI3B,6BAAY,eAAqC;QAAjD,YACC,kBAAM,eAAe,CAAC,SAEtB;QADA,KAAI,CAAC,SAAS,GAAG,wBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;;IACnD,CAAC;IAEK,kCAAI,GAAV,UAAW,O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AG,wBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IACnD,CAAC;IAEK,IAAI,CAAC,OAA6B,EAAE,MAAgB;;YACzD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;KAAA;IAEK,OAAO,CAAC,QAAgC;;YAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;IAEK,aAAa,CAAC,MAAgB,EAAE,IAAe;;YACpD,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;QACrD,CAAC;KAAA;IAEK,WAAW,CAAC,KAAa,EAAE,IAAe,EAAE,MAAgB;;YACjE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,CAAA;QAC3D,CAAC;KAAA;IAEK,gBAAgB,CAAC,MAAgB,EAAE,KAAa;;YACrD,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACtD,CAAC;KAAA;IAEK,oBAAoB,CAAC,MAAgB,EAAE,KAAa;;YACzD,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC1D,CAAC;KAAA;CACD;AAjCD,kDAiCC"}
@@ -5,7 +5,7 @@ import { FirebaseSession } from "../auth/firebase-session";
5
5
  import { FirebaseBaseWrapper } from "../auth/FirebaseBaseWrapper";
6
6
  export declare class StorageWrapper extends FirebaseBaseWrapper {
7
7
  private storage;
8
- constructor(firebaseSession: FirebaseSession<any>);
8
+ constructor(firebaseSession: FirebaseSession<any, any>);
9
9
  getOrCreateBucket(bucketName?: string): Promise<BucketWrapper>;
10
10
  }
11
11
  export declare class BucketWrapper {
@@ -40,7 +40,7 @@ export declare class FileWrapper {
40
40
  private copyImpl;
41
41
  private copyByStream;
42
42
  move(destination: string | BucketWrapper | FileWrapper): Promise<void>;
43
- delete(): Promise<[import("teeny-request").Response<any>] | undefined>;
43
+ delete(): Promise<any>;
44
44
  private getSignedUrl;
45
45
  makePublic(): Promise<MakeFilePublicResponse>;
46
46
  setMetadata(metadata: FirebaseType_Metadata, options?: object): Promise<FirebaseType_Metadata>;