@intuitionrobotics/firebase 0.41.67 → 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.
- package/app-backend/FirebaseModule.js +46 -63
- package/app-backend/FirebaseModule.js.map +1 -1
- package/app-backend/auth/FirebaseBaseWrapper.d.ts +2 -2
- package/app-backend/auth/FirebaseBaseWrapper.js +8 -24
- package/app-backend/auth/FirebaseBaseWrapper.js.map +1 -1
- package/app-backend/auth/FirebaseSession_Admin.d.ts +4 -6
- package/app-backend/auth/FirebaseSession_Admin.js +21 -37
- package/app-backend/auth/FirebaseSession_Admin.js.map +1 -1
- package/app-backend/auth/firebase-session.d.ts +2 -7
- package/app-backend/auth/firebase-session.js +22 -42
- package/app-backend/auth/firebase-session.js.map +1 -1
- package/app-backend/database/DatabaseWrapper.d.ts +1 -1
- package/app-backend/database/DatabaseWrapper.js +91 -195
- package/app-backend/database/DatabaseWrapper.js.map +1 -1
- package/app-backend/firestore/FirestoreCollection.js +92 -216
- package/app-backend/firestore/FirestoreCollection.js.map +1 -1
- package/app-backend/firestore/FirestoreInterface.js +30 -34
- package/app-backend/firestore/FirestoreInterface.js.map +1 -1
- package/app-backend/firestore/FirestoreTransaction.js +125 -321
- package/app-backend/firestore/FirestoreTransaction.js.map +1 -1
- package/app-backend/firestore/FirestoreWrapper.d.ts +1 -1
- package/app-backend/firestore/FirestoreWrapper.js +25 -72
- package/app-backend/firestore/FirestoreWrapper.js.map +1 -1
- package/app-backend/functions/firebase-function.js +178 -327
- package/app-backend/functions/firebase-function.js.map +1 -1
- package/app-backend/push/PushMessagesWrapper.d.ts +1 -1
- package/app-backend/push/PushMessagesWrapper.js +31 -86
- package/app-backend/push/PushMessagesWrapper.js.map +1 -1
- package/app-backend/storage/StorageWrapper.d.ts +2 -2
- package/app-backend/storage/StorageWrapper.js +166 -347
- package/app-backend/storage/StorageWrapper.js.map +1 -1
- package/app-frontend/FirebaseModule.js +81 -169
- package/app-frontend/FirebaseModule.js.map +1 -1
- package/app-frontend/analytics/AnalyticsModule.js +17 -68
- package/app-frontend/analytics/AnalyticsModule.js.map +1 -1
- package/app-frontend/analytics/AnalyticsWrapper.js +17 -33
- package/app-frontend/analytics/AnalyticsWrapper.js.map +1 -1
- package/app-frontend/auth/FirebaseSession.js +33 -80
- package/app-frontend/auth/FirebaseSession.js.map +1 -1
- package/app-frontend/auth/SwFirebaseSession.js +11 -27
- package/app-frontend/auth/SwFirebaseSession.js.map +1 -1
- package/app-frontend/database/DatabaseWrapper.js +64 -148
- package/app-frontend/database/DatabaseWrapper.js.map +1 -1
- package/app-frontend/messaging/MessagingWrapper.js +16 -68
- package/app-frontend/messaging/MessagingWrapper.js.map +1 -1
- package/app-frontend/messaging/SwMessagingWrapper.js +11 -28
- package/app-frontend/messaging/SwMessagingWrapper.js.map +1 -1
- 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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
return
|
|
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
|
-
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
return
|
|
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
|
-
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
return
|
|
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
|
-
|
|
101
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
return
|
|
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
|
-
|
|
108
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
-
return
|
|
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
|
-
|
|
115
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
-
return
|
|
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
|
-
|
|
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
|
|
1
|
+
{"version":3,"file":"PushMessagesWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/PushMessagesWrapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AASH,qEAAgE;AAGhE,wDAAsD;AAEtD,MAAa,mBACZ,SAAQ,yCAAmB;IAI3B,YAAY,eAA0C;QACrD,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,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<
|
|
43
|
+
delete(): Promise<any>;
|
|
44
44
|
private getSignedUrl;
|
|
45
45
|
makePublic(): Promise<MakeFilePublicResponse>;
|
|
46
46
|
setMetadata(metadata: FirebaseType_Metadata, options?: object): Promise<FirebaseType_Metadata>;
|