@blackcode_sa/metaestetics-api 1.6.17 → 1.6.18
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/dist/admin/index.js +1 -3
- package/dist/admin/index.mjs +1 -3
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +22 -18
- package/dist/index.mjs +11 -7
- package/package.json +1 -1
- package/src/admin/aggregation/appointment/appointment.aggregation.service.ts +0 -2
- package/src/admin/users/user-profile.admin.ts +404 -0
- package/src/config/firebase.ts +17 -1
- package/src/services/auth.v2.service.ts +959 -0
- package/src/services/user.v2.service.ts +466 -0
package/src/config/firebase.ts
CHANGED
|
@@ -3,12 +3,16 @@ import { Firestore, getFirestore } from "firebase/firestore";
|
|
|
3
3
|
import { Auth, getAuth } from "firebase/auth";
|
|
4
4
|
import { Analytics, getAnalytics } from "firebase/analytics";
|
|
5
5
|
import { Platform } from "react-native";
|
|
6
|
+
import { FirebaseStorage, getStorage } from "firebase/storage";
|
|
7
|
+
import { Functions, getFunctions } from "firebase/functions";
|
|
6
8
|
|
|
7
9
|
interface FirebaseInstance {
|
|
8
10
|
app: FirebaseApp;
|
|
9
11
|
db: Firestore;
|
|
10
12
|
auth: Auth;
|
|
11
13
|
analytics: Analytics | null;
|
|
14
|
+
storage: FirebaseStorage;
|
|
15
|
+
functions: Functions;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
let firebaseInstance: FirebaseInstance | null = null;
|
|
@@ -26,13 +30,15 @@ export const initializeFirebase = (config: {
|
|
|
26
30
|
const app = initializeApp(config);
|
|
27
31
|
const db = getFirestore(app);
|
|
28
32
|
const auth = getAuth(app);
|
|
33
|
+
const storage = getStorage(app);
|
|
34
|
+
const functions = getFunctions(app);
|
|
29
35
|
|
|
30
36
|
let analytics = null;
|
|
31
37
|
if (typeof window !== "undefined" && Platform.OS === "web") {
|
|
32
38
|
analytics = getAnalytics(app);
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
firebaseInstance = { app, db, auth, analytics };
|
|
41
|
+
firebaseInstance = { app, db, auth, analytics, storage, functions };
|
|
36
42
|
}
|
|
37
43
|
return firebaseInstance;
|
|
38
44
|
};
|
|
@@ -60,3 +66,13 @@ export const getFirebaseApp = async (): Promise<FirebaseApp> => {
|
|
|
60
66
|
const instance = await getFirebaseInstance();
|
|
61
67
|
return instance.app;
|
|
62
68
|
};
|
|
69
|
+
|
|
70
|
+
export const getFirebaseStorage = async (): Promise<FirebaseStorage> => {
|
|
71
|
+
const instance = await getFirebaseInstance();
|
|
72
|
+
return instance.storage;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const getFirebaseFunctions = async (): Promise<Functions> => {
|
|
76
|
+
const instance = await getFirebaseInstance();
|
|
77
|
+
return instance.functions;
|
|
78
|
+
};
|