@intuitionrobotics/firebase 0.47.59 → 1.0.0

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 (192) hide show
  1. package/LICENSE +3 -0
  2. package/{app-backend → dist/app-backend}/FirebaseModule.d.ts +3 -2
  3. package/dist/app-backend/FirebaseModule.d.ts.map +1 -0
  4. package/{app-backend → dist/app-backend}/FirebaseModule.js +17 -19
  5. package/dist/app-backend/FirebaseModule.js.map +1 -0
  6. package/{app-backend → dist/app-backend}/auth/FirebaseBaseWrapper.d.ts +2 -1
  7. package/dist/app-backend/auth/FirebaseBaseWrapper.d.ts.map +1 -0
  8. package/{app-backend → dist/app-backend}/auth/FirebaseBaseWrapper.js +4 -6
  9. package/dist/app-backend/auth/FirebaseBaseWrapper.js.map +1 -0
  10. package/{app-backend → dist/app-backend}/auth/FirebaseSession_Admin.d.ts +4 -3
  11. package/dist/app-backend/auth/FirebaseSession_Admin.d.ts.map +1 -0
  12. package/{app-backend → dist/app-backend}/auth/FirebaseSession_Admin.js +13 -16
  13. package/dist/app-backend/auth/FirebaseSession_Admin.js.map +1 -0
  14. package/dist/app-backend/auth/FirebaseSession_UserPassword.d.ts +2 -0
  15. package/dist/app-backend/auth/FirebaseSession_UserPassword.d.ts.map +1 -0
  16. package/{app-backend → dist/app-backend}/auth/FirebaseSession_UserPassword.js +2 -2
  17. package/{app-backend → dist/app-backend}/auth/FirebaseSession_UserPassword.js.map +1 -1
  18. package/{app-backend → dist/app-backend}/auth/firebase-session.d.ts +6 -5
  19. package/dist/app-backend/auth/firebase-session.d.ts.map +1 -0
  20. package/{app-backend → dist/app-backend}/auth/firebase-session.js +19 -14
  21. package/dist/app-backend/auth/firebase-session.js.map +1 -0
  22. package/{app-backend → dist/app-backend}/database/DatabaseWrapper.d.ts +7 -6
  23. package/dist/app-backend/database/DatabaseWrapper.d.ts.map +1 -0
  24. package/dist/app-backend/database/DatabaseWrapper.js +101 -0
  25. package/dist/app-backend/database/DatabaseWrapper.js.map +1 -0
  26. package/{app-backend → dist/app-backend}/database/types.d.ts +1 -0
  27. package/dist/app-backend/database/types.d.ts.map +1 -0
  28. package/{app-frontend → dist/app-backend}/database/types.js +1 -2
  29. package/{app-backend → dist/app-backend}/database/types.js.map +1 -1
  30. package/{app-backend → dist/app-backend}/firestore/FirestoreCollection.d.ts +12 -10
  31. package/dist/app-backend/firestore/FirestoreCollection.d.ts.map +1 -0
  32. package/dist/app-backend/firestore/FirestoreCollection.js +133 -0
  33. package/dist/app-backend/firestore/FirestoreCollection.js.map +1 -0
  34. package/{app-backend → dist/app-backend}/firestore/FirestoreInterface.d.ts +4 -3
  35. package/dist/app-backend/firestore/FirestoreInterface.d.ts.map +1 -0
  36. package/{app-backend → dist/app-backend}/firestore/FirestoreInterface.js +13 -14
  37. package/dist/app-backend/firestore/FirestoreInterface.js.map +1 -0
  38. package/{app-backend → dist/app-backend}/firestore/FirestoreTransaction.d.ts +5 -4
  39. package/dist/app-backend/firestore/FirestoreTransaction.d.ts.map +1 -0
  40. package/dist/app-backend/firestore/FirestoreTransaction.js +152 -0
  41. package/dist/app-backend/firestore/FirestoreTransaction.js.map +1 -0
  42. package/{app-backend → dist/app-backend}/firestore/FirestoreV2Collection.d.ts +3 -3
  43. package/dist/app-backend/firestore/FirestoreV2Collection.d.ts.map +1 -0
  44. package/{app-backend → dist/app-backend}/firestore/FirestoreV2Collection.js +4 -7
  45. package/dist/app-backend/firestore/FirestoreV2Collection.js.map +1 -0
  46. package/{app-backend → dist/app-backend}/firestore/FirestoreWrapper.d.ts +7 -6
  47. package/dist/app-backend/firestore/FirestoreWrapper.d.ts.map +1 -0
  48. package/dist/app-backend/firestore/FirestoreWrapper.js +41 -0
  49. package/dist/app-backend/firestore/FirestoreWrapper.js.map +1 -0
  50. package/{app-backend → dist/app-backend}/firestore/types.d.ts +1 -0
  51. package/dist/app-backend/firestore/types.d.ts.map +1 -0
  52. package/{app-backend → dist/app-backend}/firestore/types.js +1 -2
  53. package/dist/app-backend/firestore/types.js.map +1 -0
  54. package/{app-backend → dist/app-backend}/functions/firebase-function.d.ts +8 -7
  55. package/dist/app-backend/functions/firebase-function.d.ts.map +1 -0
  56. package/dist/app-backend/functions/firebase-function.js +350 -0
  57. package/dist/app-backend/functions/firebase-function.js.map +1 -0
  58. package/{app-backend → dist/app-backend}/push/PushMessagesWrapper.d.ts +5 -4
  59. package/dist/app-backend/push/PushMessagesWrapper.d.ts.map +1 -0
  60. package/dist/app-backend/push/PushMessagesWrapper.js +48 -0
  61. package/dist/app-backend/push/PushMessagesWrapper.js.map +1 -0
  62. package/{app-backend → dist/app-backend}/push/types.d.ts +1 -0
  63. package/dist/app-backend/push/types.d.ts.map +1 -0
  64. package/{app-backend/database → dist/app-backend/push}/types.js +1 -2
  65. package/{app-backend → dist/app-backend}/push/types.js.map +1 -1
  66. package/{app-backend → dist/app-backend}/storage/StorageWrapper.d.ts +5 -4
  67. package/dist/app-backend/storage/StorageWrapper.d.ts.map +1 -0
  68. package/dist/app-backend/storage/StorageWrapper.js +196 -0
  69. package/dist/app-backend/storage/StorageWrapper.js.map +1 -0
  70. package/{app-backend → dist/app-backend}/storage/types.d.ts +2 -1
  71. package/dist/app-backend/storage/types.d.ts.map +1 -0
  72. package/dist/app-backend/storage/types.js +20 -0
  73. package/{app-backend → dist/app-backend}/storage/types.js.map +1 -1
  74. package/{app-frontend → dist/app-frontend}/FirebaseModule.d.ts +4 -3
  75. package/dist/app-frontend/FirebaseModule.d.ts.map +1 -0
  76. package/dist/app-frontend/FirebaseModule.js +85 -0
  77. package/dist/app-frontend/FirebaseModule.js.map +1 -0
  78. package/{app-frontend → dist/app-frontend}/analytics/AnalyticsModule.d.ts +1 -0
  79. package/dist/app-frontend/analytics/AnalyticsModule.d.ts.map +1 -0
  80. package/dist/app-frontend/analytics/AnalyticsModule.js +46 -0
  81. package/dist/app-frontend/analytics/AnalyticsModule.js.map +1 -0
  82. package/{app-frontend → dist/app-frontend}/analytics/AnalyticsWrapper.d.ts +5 -4
  83. package/dist/app-frontend/analytics/AnalyticsWrapper.d.ts.map +1 -0
  84. package/dist/app-frontend/analytics/AnalyticsWrapper.js +27 -0
  85. package/dist/app-frontend/analytics/AnalyticsWrapper.js.map +1 -0
  86. package/{app-frontend → dist/app-frontend}/analytics/types.d.ts +2 -1
  87. package/dist/app-frontend/analytics/types.d.ts.map +1 -0
  88. package/dist/app-frontend/analytics/types.js +2 -0
  89. package/{app-frontend → dist/app-frontend}/analytics/types.js.map +1 -1
  90. package/dist/app-frontend/auth/FirebaseSession.d.ts +32 -0
  91. package/dist/app-frontend/auth/FirebaseSession.d.ts.map +1 -0
  92. package/dist/app-frontend/auth/FirebaseSession.js +72 -0
  93. package/dist/app-frontend/auth/FirebaseSession.js.map +1 -0
  94. package/{app-frontend → dist/app-frontend}/auth/SwFirebaseSession.d.ts +4 -4
  95. package/dist/app-frontend/auth/SwFirebaseSession.d.ts.map +1 -0
  96. package/dist/app-frontend/auth/SwFirebaseSession.js +21 -0
  97. package/dist/app-frontend/auth/SwFirebaseSession.js.map +1 -0
  98. package/{app-frontend → dist/app-frontend}/database/DatabaseWrapper.d.ts +6 -5
  99. package/dist/app-frontend/database/DatabaseWrapper.d.ts.map +1 -0
  100. package/dist/app-frontend/database/DatabaseWrapper.js +90 -0
  101. package/dist/app-frontend/database/DatabaseWrapper.js.map +1 -0
  102. package/{app-frontend → dist/app-frontend}/database/types.d.ts +1 -0
  103. package/dist/app-frontend/database/types.d.ts.map +1 -0
  104. package/{app-backend/storage → dist/app-frontend/database}/types.js +1 -2
  105. package/{app-frontend → dist/app-frontend}/database/types.js.map +1 -1
  106. package/{app-frontend → dist/app-frontend}/messaging/MessagingWrapper.d.ts +3 -2
  107. package/dist/app-frontend/messaging/MessagingWrapper.d.ts.map +1 -0
  108. package/dist/app-frontend/messaging/MessagingWrapper.js +42 -0
  109. package/dist/app-frontend/messaging/MessagingWrapper.js.map +1 -0
  110. package/{app-frontend → dist/app-frontend}/messaging/SwMessagingWrapper.d.ts +3 -2
  111. package/dist/app-frontend/messaging/SwMessagingWrapper.d.ts.map +1 -0
  112. package/{app-frontend → dist/app-frontend}/messaging/SwMessagingWrapper.js +6 -8
  113. package/dist/app-frontend/messaging/SwMessagingWrapper.js.map +1 -0
  114. package/dist/app-frontend/messaging/types.d.ts +4 -0
  115. package/dist/app-frontend/messaging/types.d.ts.map +1 -0
  116. package/{app-backend/push → dist/app-frontend/messaging}/types.js +1 -2
  117. package/{app-frontend → dist/app-frontend}/messaging/types.js.map +1 -1
  118. package/dist/backend-functions.d.ts +2 -0
  119. package/dist/backend-functions.d.ts.map +1 -0
  120. package/dist/backend-functions.js +19 -0
  121. package/{backend-functions.js.map → dist/backend-functions.js.map} +1 -1
  122. package/dist/backend.d.ts +14 -0
  123. package/dist/backend.d.ts.map +1 -0
  124. package/dist/backend.js +32 -0
  125. package/dist/backend.js.map +1 -0
  126. package/dist/frontend.d.ts +7 -0
  127. package/dist/frontend.d.ts.map +1 -0
  128. package/dist/frontend.js +14 -0
  129. package/dist/frontend.js.map +1 -0
  130. package/dist/index.d.ts +2 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +19 -0
  133. package/dist/index.js.map +1 -0
  134. package/{shared → dist/shared}/types.d.ts +4 -3
  135. package/dist/shared/types.d.ts.map +1 -0
  136. package/{shared → dist/shared}/types.js +2 -4
  137. package/dist/shared/types.js.map +1 -0
  138. package/dist/tsconfig.tsbuildinfo +1 -0
  139. package/package.json +67 -14
  140. package/app-backend/FirebaseModule.js.map +0 -1
  141. package/app-backend/auth/FirebaseBaseWrapper.js.map +0 -1
  142. package/app-backend/auth/FirebaseSession_Admin.js.map +0 -1
  143. package/app-backend/auth/FirebaseSession_UserPassword.d.ts +0 -0
  144. package/app-backend/auth/firebase-session.js.map +0 -1
  145. package/app-backend/database/DatabaseWrapper.js +0 -125
  146. package/app-backend/database/DatabaseWrapper.js.map +0 -1
  147. package/app-backend/firestore/FirestoreCollection.js +0 -175
  148. package/app-backend/firestore/FirestoreCollection.js.map +0 -1
  149. package/app-backend/firestore/FirestoreInterface.js.map +0 -1
  150. package/app-backend/firestore/FirestoreTransaction.js +0 -194
  151. package/app-backend/firestore/FirestoreTransaction.js.map +0 -1
  152. package/app-backend/firestore/FirestoreV2Collection.js.map +0 -1
  153. package/app-backend/firestore/FirestoreWrapper.js +0 -54
  154. package/app-backend/firestore/FirestoreWrapper.js.map +0 -1
  155. package/app-backend/firestore/types.js.map +0 -1
  156. package/app-backend/functions/firebase-function.js +0 -335
  157. package/app-backend/functions/firebase-function.js.map +0 -1
  158. package/app-backend/push/PushMessagesWrapper.js +0 -69
  159. package/app-backend/push/PushMessagesWrapper.js.map +0 -1
  160. package/app-backend/storage/StorageWrapper.js +0 -236
  161. package/app-backend/storage/StorageWrapper.js.map +0 -1
  162. package/app-frontend/FirebaseModule.js +0 -107
  163. package/app-frontend/FirebaseModule.js.map +0 -1
  164. package/app-frontend/analytics/AnalyticsModule.js +0 -56
  165. package/app-frontend/analytics/AnalyticsModule.js.map +0 -1
  166. package/app-frontend/analytics/AnalyticsWrapper.js +0 -29
  167. package/app-frontend/analytics/AnalyticsWrapper.js.map +0 -1
  168. package/app-frontend/analytics/types.js +0 -3
  169. package/app-frontend/auth/FirebaseSession.d.ts +0 -24
  170. package/app-frontend/auth/FirebaseSession.js +0 -72
  171. package/app-frontend/auth/FirebaseSession.js.map +0 -1
  172. package/app-frontend/auth/SwFirebaseSession.js +0 -23
  173. package/app-frontend/auth/SwFirebaseSession.js.map +0 -1
  174. package/app-frontend/database/DatabaseWrapper.js +0 -113
  175. package/app-frontend/database/DatabaseWrapper.js.map +0 -1
  176. package/app-frontend/messaging/MessagingWrapper.js +0 -53
  177. package/app-frontend/messaging/MessagingWrapper.js.map +0 -1
  178. package/app-frontend/messaging/SwMessagingWrapper.js.map +0 -1
  179. package/app-frontend/messaging/types.d.ts +0 -3
  180. package/app-frontend/messaging/types.js +0 -20
  181. package/backend-functions.d.ts +0 -1
  182. package/backend-functions.js +0 -35
  183. package/backend.d.ts +0 -13
  184. package/backend.js +0 -48
  185. package/backend.js.map +0 -1
  186. package/frontend.d.ts +0 -4
  187. package/frontend.js +0 -21
  188. package/frontend.js.map +0 -1
  189. package/index.d.ts +0 -1
  190. package/index.js +0 -35
  191. package/index.js.map +0 -1
  192. package/shared/types.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwFirebaseSession.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/auth/SwFirebaseSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oCAAoC,CAAC;AAE3E,qBAAa,iBAAkB,SAAQ,MAAM;IAC5C,GAAG,EAAG,WAAW,CAAC;IAElB,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;gBAE7B,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW;IAM3C,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAQjD"}
@@ -0,0 +1,21 @@
1
+ import { Logger } from "@intuitionrobotics/ts-common";
2
+ export class SwFirebaseSession extends Logger {
3
+ app;
4
+ sessionName;
5
+ messaging;
6
+ constructor(sessionName, app) {
7
+ super(`service worker firebase: ${sessionName}`);
8
+ this.sessionName = sessionName;
9
+ this.app = app;
10
+ }
11
+ async getMessaging() {
12
+ if (this.messaging)
13
+ return this.messaging;
14
+ const [messagingMod, wrapperMod] = await Promise.all([
15
+ import("firebase/messaging"),
16
+ import("../messaging/SwMessagingWrapper.js")
17
+ ]);
18
+ return this.messaging = new wrapperMod.SwMessagingWrapper(messagingMod.getMessaging(this.app));
19
+ }
20
+ }
21
+ //# sourceMappingURL=SwFirebaseSession.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwFirebaseSession.js","sourceRoot":"","sources":["../../../src/main/app-frontend/auth/SwFirebaseSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AAIpD,MAAM,OAAO,iBAAkB,SAAQ,MAAM;IAC5C,GAAG,CAAe;IAER,WAAW,CAAS;IACpB,SAAS,CAAsB;IAEzC,YAAY,WAAmB,EAAE,GAAgB;QAChD,KAAK,CAAC,4BAA4B,WAAW,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,YAAY;QACjB,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1C,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACpD,MAAM,CAAC,oBAAoB,CAAC;YAC5B,MAAM,CAAC,oCAAoC,CAAC;SAC5C,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,kBAAkB,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAChG,CAAC;CACD"}
@@ -1,17 +1,18 @@
1
1
  import { Logger } from "@intuitionrobotics/ts-common";
2
- import { FirebaseType_DB } from "./types";
2
+ import { type FirebaseType_DB } from "./types.js";
3
3
  export declare class DatabaseWrapper extends Logger {
4
4
  private readonly database;
5
5
  constructor(database: FirebaseType_DB);
6
6
  get<T>(path: string): Promise<T | null>;
7
- listen<T>(path: string, callback: (value: T) => void): import("@firebase/database").Unsubscribe;
8
- listenWithError<T>(path: string, callback: (value: T) => void, errorCallback: (error: Error) => void, onlyOnce?: boolean): import("@firebase/database").Unsubscribe;
7
+ listen<T>(path: string, callback: (value: T) => void): import("firebase/database").Unsubscribe;
8
+ listenWithError<T>(path: string, callback: (value: T) => void, errorCallback: (error: Error) => void, onlyOnce?: boolean): import("firebase/database").Unsubscribe;
9
9
  private getRef;
10
10
  set<T>(path: string, value: T): Promise<void>;
11
11
  /** @deprecated */
12
12
  update<T extends object>(path: string, value: T): Promise<void>;
13
13
  patch<T extends object>(path: string, value: T): Promise<void>;
14
14
  /** @deprecated */
15
- remove<T>(path: string, assertionRegexp?: string): Promise<void>;
16
- delete<T>(path: string, assertionRegexp?: string): Promise<void>;
15
+ remove<_T>(path: string, assertionRegexp?: string): Promise<void>;
16
+ delete<_T>(path: string, assertionRegexp?: string): Promise<void>;
17
17
  }
18
+ //# sourceMappingURL=DatabaseWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseWrapper.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/database/DatabaseWrapper.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEN,MAAM,EACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,YAAY,CAAC;AAUhD,qBAAa,eACZ,SAAQ,MAAM;IAEd,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;gBAE/B,QAAQ,EAAE,eAAe;IAMxB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAU7C,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI;IAQpD,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EAAE,QAAQ,UAAQ;IAM7H,OAAO,CAAC,MAAM,CAA8C;IAE/C,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAS1C,kBAAkB;IACL,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAK/C,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAQ3D,kBAAkB;IACL,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,GAAE,MAAmB;IAK7D,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,GAAE,MAAmB;CAa1E"}
@@ -0,0 +1,90 @@
1
+ /*
2
+ * Firebase is a simpler Typescript wrapper to all of firebase services.
3
+ *
4
+ * Copyright (C) 2020 Intuition Robotics
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ import { BadImplementationException, Logger } from "@intuitionrobotics/ts-common";
19
+ import {} from "./types.js";
20
+ // tslint:disable:no-import-side-effect
21
+ import { onValue, ref, remove, set, update } from "firebase/database";
22
+ export class DatabaseWrapper extends Logger {
23
+ database;
24
+ constructor(database) {
25
+ super();
26
+ this.database = database;
27
+ }
28
+ async get(path) {
29
+ return new Promise(async (resolve, reject) => {
30
+ onValue(this.getRef(path), snapshot => {
31
+ resolve(snapshot.val());
32
+ }, (error) => {
33
+ reject(error);
34
+ }, { onlyOnce: true });
35
+ });
36
+ }
37
+ listen(path, callback) {
38
+ return onValue(this.getRef(path), snapshot => {
39
+ callback(snapshot.val());
40
+ }, (error) => {
41
+ throw new BadImplementationException(`Error while getting value from path: ${path}`, error);
42
+ }, { onlyOnce: false });
43
+ }
44
+ listenWithError(path, callback, errorCallback, onlyOnce = false) {
45
+ return onValue(this.getRef(path), snapshot => {
46
+ callback(snapshot.val());
47
+ }, (error) => errorCallback(error), { onlyOnce });
48
+ }
49
+ getRef = (path) => ref(this.database, path);
50
+ async set(path, value) {
51
+ try {
52
+ await set(this.getRef(path), value);
53
+ }
54
+ catch (e) {
55
+ this.logError(`Error while setting value to path: ${path}`, e);
56
+ throw new BadImplementationException(`Error while setting value to path: ${path}`);
57
+ }
58
+ }
59
+ /** @deprecated */
60
+ async update(path, value) {
61
+ this.logWarning("update will be deprecated!! please use patch");
62
+ return this.patch(path, value);
63
+ }
64
+ async patch(path, value) {
65
+ try {
66
+ await update(this.getRef(path), value);
67
+ }
68
+ catch (_e) {
69
+ throw new BadImplementationException(`Error while updating value to path: ${path}`);
70
+ }
71
+ }
72
+ /** @deprecated */
73
+ async remove(path, assertionRegexp = "^/.*?/.*") {
74
+ this.logWarning("remove will be deprecated!! please use delete");
75
+ return this.delete(path, assertionRegexp);
76
+ }
77
+ async delete(path, assertionRegexp = "^/.*?/.*") {
78
+ if (!path)
79
+ throw new BadImplementationException(`Falsy value, path: '${path}'`);
80
+ if (!path.match(new RegExp(assertionRegexp)))
81
+ throw new BadImplementationException(`path: '${path}' does not match assertion: '${assertionRegexp}'`);
82
+ try {
83
+ await remove(this.getRef(path));
84
+ }
85
+ catch (_e) {
86
+ throw new BadImplementationException(`Error while removing path: ${path}`);
87
+ }
88
+ }
89
+ }
90
+ //# sourceMappingURL=DatabaseWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/database/DatabaseWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACN,0BAA0B,EAC1B,MAAM,EACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAsB,MAAM,YAAY,CAAC;AAChD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,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,MAAM,CAAK,IAAY,EAAE,kBAA0B,UAAU;QACzE,IAAI,CAAC,IAAI;YACR,MAAM,IAAI,0BAA0B,CAAC,uBAAuB,IAAI,GAAG,CAAC,CAAC;QAEtE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;YAC3C,MAAM,IAAI,0BAA0B,CAAC,UAAU,IAAI,iCAAiC,eAAe,GAAG,CAAC,CAAC;QAEzG,IAAI,CAAC;YACJ,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,0BAA0B,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;QAC5E,CAAC;IACF,CAAC;CACD"}
@@ -1,2 +1,3 @@
1
1
  import { Database } from "firebase/database";
2
2
  export type FirebaseType_DB = Database;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/database/types.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAA;AAC1C,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /*
3
2
  * Firebase is a simpler Typescript wrapper to all of firebase services.
4
3
  *
@@ -16,5 +15,5 @@
16
15
  * See the License for the specific language governing permissions and
17
16
  * limitations under the License.
18
17
  */
19
- Object.defineProperty(exports, "__esModule", { value: true });
18
+ import { Database } from "firebase/database";
20
19
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-frontend/database/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-frontend/database/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Logger } from "@intuitionrobotics/ts-common";
2
- import { FirebaseType_Messaging, FirebaseType_Unsubscribe } from "./types";
3
- import { GetTokenOptions, MessagePayload, NextFn, Observer } from "firebase/messaging";
2
+ import { type FirebaseType_Messaging, type FirebaseType_Unsubscribe } from "./types.js";
3
+ import { type GetTokenOptions, type MessagePayload, type NextFn, type Observer } from "firebase/messaging";
4
4
  export declare class MessagingWrapper extends Logger {
5
5
  private readonly messaging;
6
6
  private callback?;
@@ -9,3 +9,4 @@ export declare class MessagingWrapper extends Logger {
9
9
  getToken(options?: GetTokenOptions): Promise<string>;
10
10
  onMessage(callback: NextFn<MessagePayload> | Observer<MessagePayload>): FirebaseType_Unsubscribe | void;
11
11
  }
12
+ //# sourceMappingURL=MessagingWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessagingWrapper.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/MessagingWrapper.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAC,KAAK,sBAAsB,EAAE,KAAK,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACtF,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAE9H,qBAAa,gBACZ,SAAQ,MAAM;IAEd,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,QAAQ,CAAC,CAAoD;IACrE,OAAO,CAAC,KAAK,CAAC,CAAS;gBAEX,SAAS,EAAE,sBAAsB;IAKvC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ1D,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,wBAAwB,GAAG,IAAI;CAOvG"}
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Firebase is a simpler Typescript wrapper to all of firebase services.
3
+ *
4
+ * Copyright (C) 2020 Intuition Robotics
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ import { Logger } from "@intuitionrobotics/ts-common";
19
+ import {} from "./types.js";
20
+ import { getToken, onMessage } from "firebase/messaging";
21
+ export class MessagingWrapper extends Logger {
22
+ messaging;
23
+ callback;
24
+ token;
25
+ constructor(messaging) {
26
+ super();
27
+ this.messaging = messaging;
28
+ }
29
+ async getToken(options) {
30
+ this.token = await getToken(this.messaging, options);
31
+ if (this.callback)
32
+ this.onMessage(this.callback);
33
+ return this.token;
34
+ }
35
+ onMessage(callback) {
36
+ this.callback = callback;
37
+ if (!this.token)
38
+ return;
39
+ return onMessage(this.messaging, callback);
40
+ }
41
+ }
42
+ //# sourceMappingURL=MessagingWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessagingWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/MessagingWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAA4D,MAAM,YAAY,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAyE,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE9H,MAAM,OAAO,gBACZ,SAAQ,MAAM;IAEG,SAAS,CAAyB;IAC3C,QAAQ,CAAqD;IAC7D,KAAK,CAAU;IAEvB,YAAY,SAAiC;QAC5C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAyB;QACvC,IAAI,CAAC,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAC,OAAO,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,QAAQ;YAChB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,SAAS,CAAC,QAA2D;QACpE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK;YACd,OAAO;QAER,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;CACD"}
@@ -1,7 +1,8 @@
1
1
  import { Logger } from "@intuitionrobotics/ts-common";
2
- import { FirebaseType_Messaging } from "./types";
2
+ import { type FirebaseType_Messaging } from "./types.js";
3
3
  export declare class SwMessagingWrapper extends Logger {
4
4
  private readonly messaging;
5
5
  constructor(messaging: FirebaseType_Messaging);
6
- onBackgroundMessage(callback: (payload: any) => void): void | import("@firebase/util").Unsubscribe;
6
+ onBackgroundMessage(callback: (payload: any) => void): void | import("firebase/messaging/sw").Unsubscribe;
7
7
  }
8
+ //# sourceMappingURL=SwMessagingWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwMessagingWrapper.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/SwMessagingWrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAC,KAAK,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAGvD,qBAAa,kBACZ,SAAQ,MAAM;IAEd,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;gBAEvC,SAAS,EAAE,sBAAsB;IAK7C,mBAAmB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI;CAcpD"}
@@ -1,9 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwMessagingWrapper = void 0;
4
- const ts_common_1 = require("@intuitionrobotics/ts-common");
5
- const sw_1 = require("firebase/messaging/sw");
6
- class SwMessagingWrapper extends ts_common_1.Logger {
1
+ import { Logger } from "@intuitionrobotics/ts-common";
2
+ import {} from "./types.js";
3
+ import { onBackgroundMessage } from "firebase/messaging/sw";
4
+ export class SwMessagingWrapper extends Logger {
5
+ messaging;
7
6
  constructor(messaging) {
8
7
  super();
9
8
  this.messaging = messaging;
@@ -14,12 +13,11 @@ class SwMessagingWrapper extends ts_common_1.Logger {
14
13
  if (!self || !("ServiceWorkerGlobalScope" in self))
15
14
  return this.logWarning("Not a service worker context");
16
15
  this.logInfo("This is a service worker context");
17
- return (0, sw_1.onBackgroundMessage)(this.messaging, {
16
+ return onBackgroundMessage(this.messaging, {
18
17
  next: callback,
19
18
  error: error => this.logWarning(error),
20
19
  complete: () => this.logInfo("Successfully set on background messaging")
21
20
  });
22
21
  }
23
22
  }
24
- exports.SwMessagingWrapper = SwMessagingWrapper;
25
23
  //# sourceMappingURL=SwMessagingWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwMessagingWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/SwMessagingWrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAA6B,MAAM,YAAY,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,OAAO,kBACZ,SAAQ,MAAM;IAEG,SAAS,CAAyB;IAEnD,YAAY,SAAiC;QAC5C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,mBAAmB,CAAC,QAAgC;QACnD,sIAAsI;QACtI,sIAAsI;QACtI,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,0BAA0B,IAAI,IAAI,CAAC;YACjD,OAAO,IAAI,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;QAExD,IAAI,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE;YAC1C,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;YACtC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,0CAA0C,CAAC;SACxE,CAAC,CAAC;IACJ,CAAC;CAED"}
@@ -0,0 +1,4 @@
1
+ import { type Messaging, type Unsubscribe } from "firebase/messaging";
2
+ export type FirebaseType_Messaging = Messaging;
3
+ export type FirebaseType_Unsubscribe = Unsubscribe;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/types.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAEpE,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAA;AAC9C,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /*
3
2
  * Firebase is a simpler Typescript wrapper to all of firebase services.
4
3
  *
@@ -16,5 +15,5 @@
16
15
  * See the License for the specific language governing permissions and
17
16
  * limitations under the License.
18
17
  */
19
- Object.defineProperty(exports, "__esModule", { value: true });
18
+ import {} from "firebase/messaging";
20
19
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-frontend/messaging/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAkC,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./app-backend/functions/firebase-function.js";
2
+ //# sourceMappingURL=backend-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-functions.d.ts","sourceRoot":"","sources":["../src/main/backend-functions.ts"],"names":[],"mappings":"AAkBA,cAAc,8CAA8C,CAAC"}
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Firebase is a simpler Typescript wrapper to all of firebase services.
3
+ *
4
+ * Copyright (C) 2020 Intuition Robotics
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ export * from "./app-backend/functions/firebase-function.js";
19
+ //# sourceMappingURL=backend-functions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend-functions.js","sourceRoot":"","sources":["../src/main/backend-functions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;AAEH,4EAA0D"}
1
+ {"version":3,"file":"backend-functions.js","sourceRoot":"","sources":["../src/main/backend-functions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,8CAA8C,CAAC"}
@@ -0,0 +1,14 @@
1
+ export * from "./app-backend/auth/firebase-session.js";
2
+ export * from "./app-backend/auth/FirebaseSession_Admin.js";
3
+ export * from "./app-backend/FirebaseModule.js";
4
+ export * from "./app-backend/firestore/FirestoreInterface.js";
5
+ export * from "./app-backend/firestore/FirestoreCollection.js";
6
+ export * from "./app-backend/firestore/FirestoreTransaction.js";
7
+ export * from "./app-backend/firestore/FirestoreWrapper.js";
8
+ export * from "./app-backend/firestore/types.js";
9
+ export * from "./app-backend/database/DatabaseWrapper.js";
10
+ export * from "./app-backend/storage/types.js";
11
+ export * from "./app-backend/storage/StorageWrapper.js";
12
+ export * from "./app-backend/push/PushMessagesWrapper.js";
13
+ export * from "./app-backend/push/types.js";
14
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/main/backend.ts"],"names":[],"mappings":"AAkBA,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Firebase is a simpler Typescript wrapper to all of firebase services.
3
+ *
4
+ * Copyright (C) 2020 Intuition Robotics
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ export * from "./app-backend/auth/firebase-session.js";
19
+ export * from "./app-backend/auth/FirebaseSession_Admin.js";
20
+ // export * from "./app-backend/auth/FirebaseSession_UserPassword.js";
21
+ export * from "./app-backend/FirebaseModule.js";
22
+ export * from "./app-backend/firestore/FirestoreInterface.js";
23
+ export * from "./app-backend/firestore/FirestoreCollection.js";
24
+ export * from "./app-backend/firestore/FirestoreTransaction.js";
25
+ export * from "./app-backend/firestore/FirestoreWrapper.js";
26
+ export * from "./app-backend/firestore/types.js";
27
+ export * from "./app-backend/database/DatabaseWrapper.js";
28
+ export * from "./app-backend/storage/types.js";
29
+ export * from "./app-backend/storage/StorageWrapper.js";
30
+ export * from "./app-backend/push/PushMessagesWrapper.js";
31
+ export * from "./app-backend/push/types.js";
32
+ //# sourceMappingURL=backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/main/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,sEAAsE;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { FirebaseModule, FirebaseModule_Class } from "./app-frontend/FirebaseModule.js";
2
+ export { FirebaseSession } from "./app-frontend/auth/FirebaseSession.js";
3
+ export { SwFirebaseSession } from "./app-frontend/auth/SwFirebaseSession.js";
4
+ export type { MessagingWrapper } from "./app-frontend/messaging/MessagingWrapper.js";
5
+ export type { AnalyticsWrapper } from "./app-frontend/analytics/AnalyticsWrapper.js";
6
+ export type { DatabaseWrapper } from "./app-frontend/database/DatabaseWrapper.js";
7
+ //# sourceMappingURL=frontend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/main/frontend.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAC,eAAe,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAE3E,YAAY,EAAC,gBAAgB,EAAC,MAAM,8CAA8C,CAAC;AACnF,YAAY,EAAC,gBAAgB,EAAC,MAAM,8CAA8C,CAAC;AACnF,YAAY,EAAC,eAAe,EAAC,MAAM,4CAA4C,CAAC"}
@@ -0,0 +1,14 @@
1
+ // Frontend barrel — kept lean so that consumers who only need FirebaseModule
2
+ // don't pay for firebase/auth, firebase/messaging, firebase/analytics, etc.
3
+ //
4
+ // Heavy service-specific wrappers are exported as TYPE-ONLY here. Consumers
5
+ // that need the runtime classes must import them from the explicit subpath:
6
+ //
7
+ // import {MessagingWrapper} from "@intuitionrobotics/firebase/app-frontend/messaging/MessagingWrapper";
8
+ // import {AnalyticsWrapper} from "@intuitionrobotics/firebase/app-frontend/analytics/AnalyticsWrapper";
9
+ // import {DatabaseWrapper} from "@intuitionrobotics/firebase/app-frontend/database/DatabaseWrapper";
10
+ // import {FirebaseAnalyticsModule} from "@intuitionrobotics/firebase/app-frontend/analytics/AnalyticsModule";
11
+ export { FirebaseModule, FirebaseModule_Class } from "./app-frontend/FirebaseModule.js";
12
+ export { FirebaseSession } from "./app-frontend/auth/FirebaseSession.js";
13
+ export { SwFirebaseSession } from "./app-frontend/auth/SwFirebaseSession.js";
14
+ //# sourceMappingURL=frontend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.js","sourceRoot":"","sources":["../src/main/frontend.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,EAAE;AACF,+GAA+G;AAC/G,+GAA+G;AAC/G,6GAA6G;AAC7G,gHAAgH;AAEhH,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAC,eAAe,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./shared/types.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"AAkBA,cAAc,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Firebase is a simpler Typescript wrapper to all of firebase services.
3
+ *
4
+ * Copyright (C) 2020 Intuition Robotics
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ export * from "./shared/types.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { RequireOptionals, MandatoryKeys } from "@intuitionrobotics/ts-common";
1
+ import { type RequireOptionals, type MandatoryKeys } from "@intuitionrobotics/ts-common";
2
2
  export type Firebase_Message = {
3
3
  token?: string;
4
4
  topic?: string;
@@ -26,9 +26,9 @@ export type QueryComparator<T> = {
26
26
  } | {
27
27
  $aca: T extends (infer I)[] ? I[] : never;
28
28
  } | {
29
- $nin: T extends (infer I)[] ? never : T[];
29
+ $nin: T extends (infer _I)[] ? never : T[];
30
30
  } | {
31
- $in: T extends (infer I)[] ? never : T[];
31
+ $in: T extends (infer _I)[] ? never : T[];
32
32
  } | {
33
33
  $gt: number;
34
34
  } | {
@@ -68,3 +68,4 @@ export type FirebaseProjectCollections = {
68
68
  collections: string[];
69
69
  };
70
70
  export {};
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/main/shared/types.ts"],"names":[],"mappings":"AAkBA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnE;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAA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@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /*
3
2
  * Firebase is a simpler Typescript wrapper to all of firebase services.
4
3
  *
@@ -16,9 +15,8 @@
16
15
  * See the License for the specific language governing permissions and
17
16
  * limitations under the License.
18
17
  */
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.ComparatorMap = void 0;
21
- exports.ComparatorMap = {
18
+ import {} from "@intuitionrobotics/ts-common";
19
+ export const ComparatorMap = {
22
20
  $nin: "not-in",
23
21
  $in: "in",
24
22
  $ac: "array-contains",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/main/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAGN,MAAM,8BAA8B,CAAC;AAyCtC,MAAM,CAAC,MAAM,aAAa,GAAsD;IAC/E,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,gBAAgB;IACrB,IAAI,EAAE,oBAAoB;IAC1B,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;CACV,CAAC"}