@chem-po/firebase-native 0.0.16 → 0.0.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/README.md +215 -0
- package/lib/commonjs/adapter/auth.js +431 -0
- package/lib/commonjs/adapter/auth.js.map +1 -0
- package/lib/commonjs/adapter/db.js +103 -0
- package/lib/commonjs/adapter/db.js.map +1 -0
- package/lib/commonjs/adapter/index.js +16 -0
- package/lib/commonjs/adapter/index.js.map +1 -0
- package/lib/commonjs/adapter/storage.js +52 -0
- package/lib/commonjs/adapter/storage.js.map +1 -0
- package/lib/commonjs/auth/functions.js +11 -0
- package/lib/commonjs/auth/functions.js.map +1 -0
- package/lib/commonjs/auth/index.js +17 -0
- package/lib/commonjs/auth/index.js.map +1 -0
- package/lib/commonjs/components/AuthenticatorVerify.js +90 -0
- package/lib/commonjs/components/AuthenticatorVerify.js.map +1 -0
- package/lib/commonjs/components/FirebaseSignIn.js +196 -0
- package/lib/commonjs/components/FirebaseSignIn.js.map +1 -0
- package/lib/commonjs/components/PhoneVerify.js +123 -0
- package/lib/commonjs/components/PhoneVerify.js.map +1 -0
- package/lib/commonjs/components/TwoFactorAuthModal.js +118 -0
- package/lib/commonjs/components/TwoFactorAuthModal.js.map +1 -0
- package/lib/commonjs/components/index.js +28 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/contexts/FirebaseContext.js +48 -0
- package/lib/commonjs/contexts/FirebaseContext.js.map +1 -0
- package/lib/commonjs/contexts/index.js +17 -0
- package/lib/commonjs/contexts/index.js.map +1 -0
- package/lib/commonjs/db/index.js +17 -0
- package/lib/commonjs/db/index.js.map +1 -0
- package/lib/commonjs/db/utils.js +120 -0
- package/lib/commonjs/db/utils.js.map +1 -0
- package/lib/commonjs/hooks/backend.js +12 -0
- package/lib/commonjs/hooks/backend.js.map +1 -0
- package/lib/commonjs/hooks/index.js +17 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useAuthenticatorVerify.js +52 -0
- package/lib/commonjs/hooks/useAuthenticatorVerify.js.map +1 -0
- package/lib/commonjs/hooks/usePhoneVerify.js +83 -0
- package/lib/commonjs/hooks/usePhoneVerify.js.map +1 -0
- package/lib/commonjs/icons/Google.js +29 -0
- package/lib/commonjs/icons/Google.js.map +1 -0
- package/lib/commonjs/index.js +105 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/storage/index.js +17 -0
- package/lib/commonjs/storage/index.js.map +1 -0
- package/lib/commonjs/storage/utils.js +37 -0
- package/lib/commonjs/storage/utils.js.map +1 -0
- package/lib/commonjs/types/adapter.js +6 -0
- package/lib/commonjs/types/adapter.js.map +1 -0
- package/lib/commonjs/types/auth.js +6 -0
- package/lib/commonjs/types/auth.js.map +1 -0
- package/lib/commonjs/types/db.js +6 -0
- package/lib/commonjs/types/db.js.map +1 -0
- package/lib/commonjs/types/functions.js +6 -0
- package/lib/commonjs/types/functions.js.map +1 -0
- package/lib/commonjs/types/index.js +6 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/storage.js +6 -0
- package/lib/commonjs/types/storage.js.map +1 -0
- package/lib/commonjs/utils/validation.js +71 -0
- package/lib/commonjs/utils/validation.js.map +1 -0
- package/lib/module/adapter/auth.js +424 -0
- package/lib/module/adapter/auth.js.map +1 -0
- package/lib/module/adapter/db.js +96 -0
- package/lib/module/adapter/db.js.map +1 -0
- package/lib/module/adapter/index.js +9 -0
- package/lib/module/adapter/index.js.map +1 -0
- package/lib/module/adapter/storage.js +45 -0
- package/lib/module/adapter/storage.js.map +1 -0
- package/lib/module/auth/functions.js +3 -0
- package/lib/module/auth/functions.js.map +1 -0
- package/lib/module/auth/index.js +2 -0
- package/lib/module/auth/index.js.map +1 -0
- package/lib/module/components/AuthenticatorVerify.js +82 -0
- package/lib/module/components/AuthenticatorVerify.js.map +1 -0
- package/lib/module/components/FirebaseSignIn.js +187 -0
- package/lib/module/components/FirebaseSignIn.js.map +1 -0
- package/lib/module/components/PhoneVerify.js +116 -0
- package/lib/module/components/PhoneVerify.js.map +1 -0
- package/lib/module/components/TwoFactorAuthModal.js +110 -0
- package/lib/module/components/TwoFactorAuthModal.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/contexts/FirebaseContext.js +39 -0
- package/lib/module/contexts/FirebaseContext.js.map +1 -0
- package/lib/module/contexts/index.js +2 -0
- package/lib/module/contexts/index.js.map +1 -0
- package/lib/module/db/index.js +2 -0
- package/lib/module/db/index.js.map +1 -0
- package/lib/module/db/utils.js +111 -0
- package/lib/module/db/utils.js.map +1 -0
- package/lib/module/hooks/backend.js +5 -0
- package/lib/module/hooks/backend.js.map +1 -0
- package/lib/module/hooks/index.js +2 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useAuthenticatorVerify.js +45 -0
- package/lib/module/hooks/useAuthenticatorVerify.js.map +1 -0
- package/lib/module/hooks/usePhoneVerify.js +76 -0
- package/lib/module/hooks/usePhoneVerify.js.map +1 -0
- package/lib/module/icons/Google.js +22 -0
- package/lib/module/icons/Google.js.map +1 -0
- package/lib/module/index.js +10 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/storage/index.js +2 -0
- package/lib/module/storage/index.js.map +1 -0
- package/lib/module/storage/utils.js +30 -0
- package/lib/module/storage/utils.js.map +1 -0
- package/lib/module/types/adapter.js +2 -0
- package/lib/module/types/adapter.js.map +1 -0
- package/lib/module/types/auth.js +2 -0
- package/lib/module/types/auth.js.map +1 -0
- package/lib/module/types/db.js +2 -0
- package/lib/module/types/db.js.map +1 -0
- package/lib/module/types/functions.js +2 -0
- package/lib/module/types/functions.js.map +1 -0
- package/lib/module/types/index.js +2 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/storage.js +2 -0
- package/lib/module/types/storage.js.map +1 -0
- package/lib/module/utils/validation.js +62 -0
- package/lib/module/utils/validation.js.map +1 -0
- package/lib/typescript/adapter/auth.d.ts +7 -0
- package/lib/typescript/adapter/auth.d.ts.map +1 -0
- package/lib/typescript/adapter/db.d.ts +5 -0
- package/lib/typescript/adapter/db.d.ts.map +1 -0
- package/lib/typescript/adapter/index.d.ts +9 -0
- package/lib/typescript/adapter/index.d.ts.map +1 -0
- package/lib/typescript/adapter/storage.d.ts +4 -0
- package/lib/typescript/adapter/storage.d.ts.map +1 -0
- package/lib/typescript/auth/functions.d.ts +4 -0
- package/lib/typescript/auth/functions.d.ts.map +1 -0
- package/lib/typescript/auth/index.d.ts +2 -0
- package/lib/typescript/auth/index.d.ts.map +1 -0
- package/lib/typescript/components/AuthenticatorVerify.d.ts +3 -0
- package/lib/typescript/components/AuthenticatorVerify.d.ts.map +1 -0
- package/lib/typescript/components/FirebaseSignIn.d.ts +6 -0
- package/lib/typescript/components/FirebaseSignIn.d.ts.map +1 -0
- package/lib/typescript/components/PhoneVerify.d.ts +6 -0
- package/lib/typescript/components/PhoneVerify.d.ts.map +1 -0
- package/lib/typescript/components/TwoFactorAuthModal.d.ts +3 -0
- package/lib/typescript/components/TwoFactorAuthModal.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +3 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/contexts/FirebaseContext.d.ts +9 -0
- package/lib/typescript/contexts/FirebaseContext.d.ts.map +1 -0
- package/lib/typescript/contexts/index.d.ts +2 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -0
- package/lib/typescript/db/index.d.ts +2 -0
- package/lib/typescript/db/index.d.ts.map +1 -0
- package/lib/typescript/db/utils.d.ts +6 -0
- package/lib/typescript/db/utils.d.ts.map +1 -0
- package/lib/typescript/hooks/backend.d.ts +2 -0
- package/lib/typescript/hooks/backend.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useAuthenticatorVerify.d.ts +8 -0
- package/lib/typescript/hooks/useAuthenticatorVerify.d.ts.map +1 -0
- package/lib/typescript/hooks/usePhoneVerify.d.ts +9 -0
- package/lib/typescript/hooks/usePhoneVerify.d.ts.map +1 -0
- package/lib/typescript/icons/Google.d.ts +5 -0
- package/lib/typescript/icons/Google.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +10 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/storage/index.d.ts +2 -0
- package/lib/typescript/storage/index.d.ts.map +1 -0
- package/lib/typescript/storage/utils.d.ts +4 -0
- package/lib/typescript/storage/utils.d.ts.map +1 -0
- package/lib/typescript/types/adapter.d.ts +6 -0
- package/lib/typescript/types/adapter.d.ts.map +1 -0
- package/lib/typescript/types/auth.d.ts +12 -0
- package/lib/typescript/types/auth.d.ts.map +1 -0
- package/lib/typescript/types/db.d.ts +8 -0
- package/lib/typescript/types/db.d.ts.map +1 -0
- package/lib/typescript/types/functions.d.ts +3 -0
- package/lib/typescript/types/functions.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +24 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/types/storage.d.ts +3 -0
- package/lib/typescript/types/storage.d.ts.map +1 -0
- package/lib/typescript/utils/validation.d.ts +21 -0
- package/lib/typescript/utils/validation.d.ts.map +1 -0
- package/package.json +29 -12
- package/src/adapter/auth.ts +474 -0
- package/src/adapter/db.ts +146 -0
- package/src/adapter/index.ts +30 -0
- package/src/adapter/storage.ts +58 -0
- package/src/auth/functions.ts +7 -0
- package/src/auth/index.ts +1 -0
- package/src/components/AuthenticatorVerify.tsx +75 -0
- package/src/components/FirebaseSignIn.tsx +187 -0
- package/src/components/PhoneVerify.tsx +102 -0
- package/src/components/TwoFactorAuthModal.tsx +133 -0
- package/src/components/index.ts +2 -0
- package/src/contexts/FirebaseContext.tsx +54 -0
- package/src/contexts/index.ts +1 -0
- package/src/db/index.ts +1 -0
- package/src/db/utils.ts +142 -0
- package/src/hooks/backend.ts +4 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useAuthenticatorVerify.ts +45 -0
- package/src/hooks/usePhoneVerify.ts +76 -0
- package/src/icons/Google.tsx +24 -0
- package/src/index.ts +9 -0
- package/src/storage/index.ts +1 -0
- package/src/storage/utils.ts +29 -0
- package/src/types/adapter.ts +13 -0
- package/src/types/auth.ts +13 -0
- package/src/types/db.ts +10 -0
- package/src/types/functions.ts +3 -0
- package/src/types/index.ts +26 -0
- package/src/types/storage.ts +3 -0
- package/src/utils/validation.ts +85 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnyObject, BaseQuery } from '@chem-po/core';
|
|
2
|
+
import { Firestore, FirestoreBaseQuery, FirestoreCursor, FirestoreQuery } from '../types/db';
|
|
3
|
+
export declare const toFirestoreQuery: <T extends AnyObject>(db: Firestore, baseQuery: FirestoreBaseQuery<T>) => FirestoreQuery<T>;
|
|
4
|
+
export declare const toCursorQuery: <T extends AnyObject>(db: Firestore, baseQuery: FirestoreBaseQuery<T>, cursor: FirestoreCursor | null) => FirestoreQuery<T>;
|
|
5
|
+
export declare const toFirestoreQueries: <T extends AnyObject>(db: Firestore, baseQuery: BaseQuery<T>, cursors: Array<FirestoreCursor | null> | null) => Array<FirestoreQuery<T>>;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/db/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0C,MAAM,eAAe,CAAA;AAU5F,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5F,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,SAAS,EAClD,IAAI,SAAS,EACb,WAAW,kBAAkB,CAAC,CAAC,CAAC,KAC/B,cAAc,CAAC,CAAC,CAyClB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,SAAS,EAC/C,IAAI,SAAS,EACb,WAAW,kBAAkB,CAAC,CAAC,CAAC,EAChC,QAAQ,eAAe,GAAG,IAAI,KAC7B,cAAc,CAAC,CAAC,CAiClB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,SAAS,EACpD,IAAI,SAAS,EACb,WAAW,SAAS,CAAC,CAAC,CAAC,EACvB,SAAS,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,IAAI,KAC5C,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAwCzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/hooks/backend.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,mDAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useAuthenticatorVerify: () => {
|
|
2
|
+
code: string;
|
|
3
|
+
setCode: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
4
|
+
verifying: boolean;
|
|
5
|
+
error: string;
|
|
6
|
+
handleVerify: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useAuthenticatorVerify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuthenticatorVerify.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuthenticatorVerify.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;;;;;CAuClC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhoneEnrollmentFactor } from '@chem-po/core';
|
|
2
|
+
export declare const usePhoneVerify: (factor: PhoneEnrollmentFactor, automaticallySendSmsCode: boolean) => {
|
|
3
|
+
code: string;
|
|
4
|
+
setCode: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
5
|
+
verifying: boolean;
|
|
6
|
+
error: string;
|
|
7
|
+
handleVerify: () => void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=usePhoneVerify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePhoneVerify.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePhoneVerify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAKrD,eAAO,MAAM,cAAc,GAAI,QAAQ,qBAAqB,EAAE,0BAA0B,OAAO;;;;;;CAsE9F,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["../../../src/icons/Google.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAY,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,QAAA,MAAM,SAAS,GAAI,OAAO,QAAQ,sBAmBjC,CAAA;AACD,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './adapter';
|
|
2
|
+
export * from './auth';
|
|
3
|
+
export * from './components';
|
|
4
|
+
export * from './contexts';
|
|
5
|
+
export * from './db';
|
|
6
|
+
export * from './hooks';
|
|
7
|
+
export * from './storage';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './utils/validation';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FileValue, LocalFileValue, OnUploadProgress } from '@chem-po/core';
|
|
2
|
+
import { FirebaseStorageTypes } from '@react-native-firebase/storage';
|
|
3
|
+
export declare const uploadFileValue: (storage: FirebaseStorageTypes.Module, path: string, file: LocalFileValue | FileValue | null | undefined, onUploadProgress: OnUploadProgress) => Promise<FileValue | null>;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gCAAgC,CAAA;AAExF,eAAO,MAAM,eAAe,GAC1B,SAAS,oBAAoB,CAAC,MAAM,EACpC,MAAM,MAAM,EACZ,MAAM,cAAc,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,EACnD,kBAAkB,gBAAgB,KACjC,OAAO,CAAC,SAAS,GAAG,IAAI,CAoB1B,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BackendAdapterInterface, BaseAuthProvider } from '@chem-po/core';
|
|
2
|
+
import { FirebaseStorageTypes } from '@react-native-firebase/storage';
|
|
3
|
+
import { EmailPasswordLogin, User } from './auth';
|
|
4
|
+
import { FirestoreCursor } from './db';
|
|
5
|
+
export type FirebaseBackendAdapter<AuthProvider extends BaseAuthProvider> = BackendAdapterInterface<AuthProvider, User, EmailPasswordLogin, FirestoreCursor, Blob, FirebaseStorageTypes.FullMetadata>;
|
|
6
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/types/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAEtC,MAAM,MAAM,sBAAsB,CAAC,YAAY,SAAS,gBAAgB,IAAI,uBAAuB,CACjG,YAAY,EACZ,IAAI,EACJ,kBAAkB,EAClB,eAAe,EACf,IAAI,EACJ,oBAAoB,CAAC,YAAY,CAClC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseUserRole } from '@chem-po/core';
|
|
2
|
+
import { getAuth } from '@react-native-firebase/auth';
|
|
3
|
+
export type Auth = ReturnType<typeof getAuth>;
|
|
4
|
+
export interface User {
|
|
5
|
+
uid: string;
|
|
6
|
+
role: BaseUserRole;
|
|
7
|
+
}
|
|
8
|
+
export interface EmailPasswordLogin {
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/types/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAErD,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAC7C,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnyObject, BaseQuery, OnItemsData } from '@chem-po/core';
|
|
2
|
+
import { FirebaseFirestoreTypes } from '@react-native-firebase/firestore';
|
|
3
|
+
export type Firestore = FirebaseFirestoreTypes.Module;
|
|
4
|
+
export type FirestoreCursor = FirebaseFirestoreTypes.QueryDocumentSnapshot;
|
|
5
|
+
export type FirestoreBaseQuery<T extends AnyObject> = BaseQuery<T, FirestoreCursor>;
|
|
6
|
+
export type FirestoreQuery<T extends AnyObject> = FirebaseFirestoreTypes.Query<T>;
|
|
7
|
+
export type FirestoreOnItemsData<T extends AnyObject> = OnItemsData<T, FirestoreCursor>;
|
|
8
|
+
//# sourceMappingURL=db.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../src/types/db.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,MAAM,MAAM,SAAS,GAAG,sBAAsB,CAAC,MAAM,CAAA;AACrD,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,qBAAqB,CAAA;AAC1E,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,SAAS,IAAI,SAAS,CAAC,CAAC,EAAE,eAAe,CAAC,CAAA;AACnF,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAEjF,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI,WAAW,CAAC,CAAC,EAAE,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/types/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAE/D,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
+
import { FirebaseAuthTypes } from '@react-native-firebase/auth';
|
|
3
|
+
import { FirebaseFirestoreTypes } from '@react-native-firebase/firestore';
|
|
4
|
+
import { FirebaseStorageTypes } from '@react-native-firebase/storage';
|
|
5
|
+
export type FirebaseAuth = FirebaseAuthTypes.Module;
|
|
6
|
+
export type FirebaseFirestore = FirebaseFirestoreTypes.Module;
|
|
7
|
+
export type FirebaseStorage = FirebaseStorageTypes.Module;
|
|
8
|
+
export interface FirebaseConfig {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
authDomain: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
storageBucket: string;
|
|
13
|
+
messagingSenderId: string;
|
|
14
|
+
appId: string;
|
|
15
|
+
measurementId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FirebaseContextValue {
|
|
18
|
+
loading: boolean;
|
|
19
|
+
app: ReactNativeFirebase.FirebaseApp | null;
|
|
20
|
+
auth: FirebaseAuth;
|
|
21
|
+
firestore: FirebaseFirestore;
|
|
22
|
+
storage: FirebaseStorage;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAErE,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,MAAM,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,MAAM,CAAA;AAEzD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAA;IAC3C,IAAI,EAAE,YAAY,CAAA;IAClB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,eAAe,CAAA;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/types/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAE3D,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseAuthProvider } from '@chem-po/core';
|
|
2
|
+
interface ValidationResult {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
errors: string[];
|
|
5
|
+
warnings: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Validates Firebase authentication configuration to help identify common setup issues
|
|
9
|
+
*/
|
|
10
|
+
export declare const validateAuthConfiguration: (providers: BaseAuthProvider[]) => ValidationResult;
|
|
11
|
+
/**
|
|
12
|
+
* Logs validation results with appropriate console methods
|
|
13
|
+
*/
|
|
14
|
+
export declare const logValidationResults: (result: ValidationResult, packageName?: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Validates and logs Firebase auth configuration
|
|
17
|
+
* Call this during development to identify setup issues early
|
|
18
|
+
*/
|
|
19
|
+
export declare const validateAndLogAuthConfig: (providers: BaseAuthProvider[]) => ValidationResult;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,eAAe,CAAA;AAEpE,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,WAAW,gBAAgB,EAAE,KAAG,gBAyCzE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,gBAAgB,EACxB,oBAAwC,SAezC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,gBAAgB,EAAE,qBAIrE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chem-po/firebase-native",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"author": "Elan Canfield",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"version": "0.0.18",
|
|
6
|
+
"main": "lib/commonjs/index.js",
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"source": "src/index.ts",
|
|
6
9
|
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
10
|
+
"access": "public",
|
|
11
|
+
"react-native": "src/index.ts"
|
|
8
12
|
},
|
|
9
13
|
"sideEffects": false,
|
|
10
14
|
"keywords": [],
|
|
11
15
|
"files": [
|
|
12
|
-
"
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"cpp",
|
|
20
|
+
"*.podspec",
|
|
21
|
+
"!lib/typescript/example",
|
|
22
|
+
"!ios/build",
|
|
23
|
+
"!android/build",
|
|
24
|
+
"!android/gradle",
|
|
25
|
+
"!android/gradlew",
|
|
26
|
+
"!android/gradlew.bat",
|
|
27
|
+
"!android/local.properties",
|
|
28
|
+
"!**/__tests__",
|
|
29
|
+
"!**/__fixtures__",
|
|
30
|
+
"!**/__mocks__",
|
|
31
|
+
"!**/.*"
|
|
13
32
|
],
|
|
14
|
-
"author": "",
|
|
15
|
-
"license": "ISC",
|
|
16
33
|
"dependencies": {
|
|
17
34
|
"@react-native-google-signin/google-signin": "^14.0.1",
|
|
18
35
|
"@react-native-firebase/app": "^22.2.0",
|
|
@@ -26,9 +43,9 @@
|
|
|
26
43
|
"react-native-paper": "^5.14.3",
|
|
27
44
|
"react-native-svg": "15.11.2",
|
|
28
45
|
"zustand": "^4.3.3",
|
|
29
|
-
"@chem-po/
|
|
30
|
-
"@chem-po/
|
|
31
|
-
"@chem-po/react": "0.0.
|
|
46
|
+
"@chem-po/react": "0.0.18",
|
|
47
|
+
"@chem-po/core": "0.0.18",
|
|
48
|
+
"@chem-po/react-native": "0.0.18"
|
|
32
49
|
},
|
|
33
50
|
"devDependencies": {
|
|
34
51
|
"@babel/core": "^7.26.0",
|
|
@@ -69,7 +86,7 @@
|
|
|
69
86
|
"lint": "pnpm type-check && eslint . --fix",
|
|
70
87
|
"build": "bob build",
|
|
71
88
|
"prebuild": "pnpm lint",
|
|
72
|
-
"clean": "rm -rf
|
|
89
|
+
"clean": "rm -rf lib"
|
|
73
90
|
},
|
|
74
|
-
"module": "
|
|
91
|
+
"module": "lib/module/index.js"
|
|
75
92
|
}
|