ngx-firebase 1.1.13 → 22.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.
- package/README.md +51 -11
- package/fesm2022/ngx-firebase.mjs +158 -0
- package/fesm2022/ngx-firebase.mjs.map +1 -0
- package/package.json +40 -30
- package/types/ngx-firebase.d.ts +55 -0
- package/bundles/ngx-firebase-capacitor.umd.js +0 -763
- package/bundles/ngx-firebase-capacitor.umd.js.map +0 -1
- package/bundles/ngx-firebase-capacitor.umd.min.js +0 -16
- package/bundles/ngx-firebase-capacitor.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-iap.umd.js +0 -718
- package/bundles/ngx-firebase-iap.umd.js.map +0 -1
- package/bundles/ngx-firebase-iap.umd.min.js +0 -2
- package/bundles/ngx-firebase-iap.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-ionic-auth-ui.umd.js +0 -2116
- package/bundles/ngx-firebase-ionic-auth-ui.umd.js.map +0 -1
- package/bundles/ngx-firebase-ionic-auth-ui.umd.min.js +0 -16
- package/bundles/ngx-firebase-ionic-auth-ui.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-ionic.umd.js +0 -979
- package/bundles/ngx-firebase-ionic.umd.js.map +0 -1
- package/bundles/ngx-firebase-ionic.umd.min.js +0 -16
- package/bundles/ngx-firebase-ionic.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-testing.umd.js +0 -801
- package/bundles/ngx-firebase-testing.umd.js.map +0 -1
- package/bundles/ngx-firebase-testing.umd.min.js +0 -2
- package/bundles/ngx-firebase-testing.umd.min.js.map +0 -1
- package/bundles/ngx-firebase.umd.js +0 -2299
- package/bundles/ngx-firebase.umd.js.map +0 -1
- package/bundles/ngx-firebase.umd.min.js +0 -2
- package/bundles/ngx-firebase.umd.min.js.map +0 -1
- package/capacitor/capacitor.module.d.ts +0 -9
- package/capacitor/interfaces/config.d.ts +0 -12
- package/capacitor/interfaces/index.d.ts +0 -1
- package/capacitor/ngx-firebase-capacitor.d.ts +0 -5
- package/capacitor/ngx-firebase-capacitor.metadata.json +0 -1
- package/capacitor/package.json +0 -25
- package/capacitor/public-api.d.ts +0 -3
- package/capacitor/services/analytics-firebase-capacitor.service.d.ts +0 -9
- package/capacitor/services/crashlytics-firebase-capacitor.service.d.ts +0 -8
- package/capacitor/services/credential-factory-capacitor.service.d.ts +0 -18
- package/capacitor/services/index.d.ts +0 -3
- package/esm2015/capacitor/capacitor.module.js +0 -78
- package/esm2015/capacitor/interfaces/config.js +0 -3
- package/esm2015/capacitor/interfaces/index.js +0 -2
- package/esm2015/capacitor/ngx-firebase-capacitor.js +0 -6
- package/esm2015/capacitor/public-api.js +0 -4
- package/esm2015/capacitor/services/analytics-firebase-capacitor.service.js +0 -43
- package/esm2015/capacitor/services/crashlytics-firebase-capacitor.service.js +0 -40
- package/esm2015/capacitor/services/credential-factory-capacitor.service.js +0 -182
- package/esm2015/capacitor/services/index.js +0 -4
- package/esm2015/iap/iap.module.js +0 -32
- package/esm2015/iap/interfaces/index.js +0 -5
- package/esm2015/iap/ngx-firebase-iap.js +0 -5
- package/esm2015/iap/public-api.js +0 -5
- package/esm2015/iap/services/iap.service.js +0 -317
- package/esm2015/iap/tokens/index.js +0 -4
- package/esm2015/ionic/animations/index.js +0 -30
- package/esm2015/ionic/components/avatar/avatar.component.js +0 -98
- package/esm2015/ionic/components/avatar/index.js +0 -2
- package/esm2015/ionic/components/index.js +0 -3
- package/esm2015/ionic/components/popover-menu/index.js +0 -3
- package/esm2015/ionic/components/popover-menu/interface.js +0 -2
- package/esm2015/ionic/components/popover-menu/popover-menu.component.js +0 -34
- package/esm2015/ionic/ionic.module.js +0 -46
- package/esm2015/ionic/ngx-firebase-ionic.js +0 -5
- package/esm2015/ionic/public-api.js +0 -5
- package/esm2015/ionic/services/alerts-ionic.service.js +0 -107
- package/esm2015/ionic/services/index.js +0 -6
- package/esm2015/ionic/services/legality-dialog-ionic.service.js +0 -85
- package/esm2015/ionic/services/loading-ionic.service.js +0 -46
- package/esm2015/ionic/services/picker-ionic.service.js +0 -44
- package/esm2015/ionic/services/toast-ionic.service.js +0 -49
- package/esm2015/ionic-auth-ui/animations/index.js +0 -30
- package/esm2015/ionic-auth-ui/components/email-confirmation/email-confirmation.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/email-field/email-field.component.js +0 -25
- package/esm2015/ionic-auth-ui/components/form-field/form-field.component.js +0 -82
- package/esm2015/ionic-auth-ui/components/index.js +0 -12
- package/esm2015/ionic-auth-ui/components/name-field/name-field.component.js +0 -30
- package/esm2015/ionic-auth-ui/components/or-divider/or-divider.component.js +0 -11
- package/esm2015/ionic-auth-ui/components/password-field/password-field.component.js +0 -138
- package/esm2015/ionic-auth-ui/components/password-field/passwordValidatorFunctions.js +0 -62
- package/esm2015/ionic-auth-ui/components/providers/providers.component.js +0 -70
- package/esm2015/ionic-auth-ui/components/reauthenticate/reauthenticate.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/register/register.component.js +0 -142
- package/esm2015/ionic-auth-ui/components/register-with-email/register-with-email.component.js +0 -60
- package/esm2015/ionic-auth-ui/components/register-with-email-popover/register-with-email-popover.component.js +0 -26
- package/esm2015/ionic-auth-ui/components/signin/signin.component.js +0 -92
- package/esm2015/ionic-auth-ui/components/terms-field/terms-field.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/user/user.component.js +0 -195
- package/esm2015/ionic-auth-ui/ionic-auth-ui.module.js +0 -92
- package/esm2015/ionic-auth-ui/ngx-firebase-ionic-auth-ui.js +0 -23
- package/esm2015/ionic-auth-ui/pages/index.js +0 -5
- package/esm2015/ionic-auth-ui/pages/register/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/register/register.page.js +0 -56
- package/esm2015/ionic-auth-ui/pages/signin/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/signin/signin.page.js +0 -78
- package/esm2015/ionic-auth-ui/pages/user/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/user/user.page.js +0 -11
- package/esm2015/ionic-auth-ui/pages/verifyemail/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/verifyemail/verifyemail.page.js +0 -85
- package/esm2015/ionic-auth-ui/public-api.js +0 -5
- package/esm2015/ngx-firebase.js +0 -6
- package/esm2015/public-api.js +0 -6
- package/esm2015/shared/guards/index.js +0 -3
- package/esm2015/shared/guards/logged-in.guard.js +0 -60
- package/esm2015/shared/guards/verify-email.guard.js +0 -41
- package/esm2015/shared/interfaces/accounts.enum.js +0 -9
- package/esm2015/shared/interfaces/authprovider.enum.js +0 -15
- package/esm2015/shared/interfaces/config.interface.js +0 -61
- package/esm2015/shared/interfaces/index.js +0 -8
- package/esm2015/shared/interfaces/main.interface.js +0 -7
- package/esm2015/shared/interfaces/providers.interface.js +0 -2
- package/esm2015/shared/interfaces/tokens.js +0 -19
- package/esm2015/shared/interfaces/ui-providers.interface.js +0 -2
- package/esm2015/shared/services/analytics.service.js +0 -24
- package/esm2015/shared/services/auth-process.service.js +0 -779
- package/esm2015/shared/services/crashlytics.service.js +0 -42
- package/esm2015/shared/services/device-info.service.js +0 -14
- package/esm2015/shared/services/firebase.service.js +0 -37
- package/esm2015/shared/services/firestore-sync.service.js +0 -60
- package/esm2015/shared/services/index.js +0 -10
- package/esm2015/shared/services/performance.service.js +0 -28
- package/esm2015/shared/services/remoteconfig.service.js +0 -49
- package/esm2015/shared/services/ui.service.js +0 -45
- package/esm2015/shared/shared.module.js +0 -175
- package/esm2015/shared/types/DisplayWidth.js +0 -9
- package/esm2015/shared/types/Location.js +0 -2
- package/esm2015/shared/types/ValueAccessorControlComponent.js +0 -85
- package/esm2015/shared/types/ValueAccessorValueComponent.js +0 -40
- package/esm2015/shared/types/index.js +0 -5
- package/esm2015/testing/fakeavatar.module.js +0 -22
- package/esm2015/testing/fakes/FakeAuthProcessService.js +0 -31
- package/esm2015/testing/fakes/FakeAvatarComponent.js +0 -13
- package/esm2015/testing/fakes/FakeFireService.js +0 -21
- package/esm2015/testing/fakes/FakeFirestoreSyncService.js +0 -11
- package/esm2015/testing/fakes/FakeIAPurchaseService.js +0 -11
- package/esm2015/testing/fakes/FakePickerService.js +0 -9
- package/esm2015/testing/fakes/FakeRemoteConfigService.js +0 -44
- package/esm2015/testing/fakes/FakeTranslateService.js +0 -21
- package/esm2015/testing/fakes/FakeUiService.js +0 -26
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireAuth.js +0 -30
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireFunctions.js +0 -17
- package/esm2015/testing/fakes/angular-fire/FakeAngularFirePerformance.js +0 -17
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireStorage.js +0 -8
- package/esm2015/testing/fakes/angular-fire/FakeAngularFirestore.js +0 -8
- package/esm2015/testing/fakes/angular-fire/FakeUserCredential.js +0 -18
- package/esm2015/testing/fakes/index.js +0 -19
- package/esm2015/testing/ngx-firebase-testing.js +0 -6
- package/esm2015/testing/public-api.js +0 -5
- package/esm2015/testing/test.module.js +0 -66
- package/esm2015/testing/utils/index.js +0 -17
- package/esm2015/testing/utils/patchConsole.js +0 -14
- package/fesm2015/ngx-firebase-capacitor.js +0 -328
- package/fesm2015/ngx-firebase-capacitor.js.map +0 -1
- package/fesm2015/ngx-firebase-iap.js +0 -354
- package/fesm2015/ngx-firebase-iap.js.map +0 -1
- package/fesm2015/ngx-firebase-ionic-auth-ui.js +0 -1482
- package/fesm2015/ngx-firebase-ionic-auth-ui.js.map +0 -1
- package/fesm2015/ngx-firebase-ionic.js +0 -495
- package/fesm2015/ngx-firebase-ionic.js.map +0 -1
- package/fesm2015/ngx-firebase-testing.js +0 -388
- package/fesm2015/ngx-firebase-testing.js.map +0 -1
- package/fesm2015/ngx-firebase.js +0 -1509
- package/fesm2015/ngx-firebase.js.map +0 -1
- package/iap/iap.module.d.ts +0 -5
- package/iap/interfaces/index.d.ts +0 -11
- package/iap/ngx-firebase-iap.d.ts +0 -4
- package/iap/ngx-firebase-iap.metadata.json +0 -1
- package/iap/package.json +0 -23
- package/iap/public-api.d.ts +0 -4
- package/iap/services/iap.service.d.ts +0 -47
- package/iap/tokens/index.d.ts +0 -3
- package/ionic/animations/index.d.ts +0 -1
- package/ionic/components/avatar/avatar.component.d.ts +0 -27
- package/ionic/components/avatar/index.d.ts +0 -1
- package/ionic/components/index.d.ts +0 -2
- package/ionic/components/popover-menu/index.d.ts +0 -2
- package/ionic/components/popover-menu/interface.d.ts +0 -6
- package/ionic/components/popover-menu/popover-menu.component.d.ts +0 -10
- package/ionic/ionic.module.d.ts +0 -2
- package/ionic/ngx-firebase-ionic.d.ts +0 -4
- package/ionic/ngx-firebase-ionic.metadata.json +0 -1
- package/ionic/package.json +0 -30
- package/ionic/public-api.d.ts +0 -4
- package/ionic/services/alerts-ionic.service.d.ts +0 -13
- package/ionic/services/index.d.ts +0 -5
- package/ionic/services/legality-dialog-ionic.service.d.ts +0 -10
- package/ionic/services/loading-ionic.service.d.ts +0 -17
- package/ionic/services/picker-ionic.service.d.ts +0 -9
- package/ionic/services/toast-ionic.service.d.ts +0 -11
- package/ionic-auth-ui/animations/index.d.ts +0 -1
- package/ionic-auth-ui/components/email-confirmation/email-confirmation.component.d.ts +0 -31
- package/ionic-auth-ui/components/email-field/email-field.component.d.ts +0 -7
- package/ionic-auth-ui/components/form-field/form-field.component.d.ts +0 -28
- package/ionic-auth-ui/components/index.d.ts +0 -11
- package/ionic-auth-ui/components/name-field/name-field.component.d.ts +0 -8
- package/ionic-auth-ui/components/or-divider/or-divider.component.d.ts +0 -2
- package/ionic-auth-ui/components/password-field/password-field.component.d.ts +0 -34
- package/ionic-auth-ui/components/password-field/passwordValidatorFunctions.d.ts +0 -4
- package/ionic-auth-ui/components/providers/providers.component.d.ts +0 -26
- package/ionic-auth-ui/components/reauthenticate/reauthenticate.component.d.ts +0 -30
- package/ionic-auth-ui/components/register/register.component.d.ts +0 -26
- package/ionic-auth-ui/components/register-with-email/register-with-email.component.d.ts +0 -24
- package/ionic-auth-ui/components/register-with-email-popover/register-with-email-popover.component.d.ts +0 -7
- package/ionic-auth-ui/components/signin/signin.component.d.ts +0 -28
- package/ionic-auth-ui/components/terms-field/terms-field.component.d.ts +0 -27
- package/ionic-auth-ui/components/user/user.component.d.ts +0 -45
- package/ionic-auth-ui/ionic-auth-ui.module.d.ts +0 -32
- package/ionic-auth-ui/ngx-firebase-ionic-auth-ui.d.ts +0 -22
- package/ionic-auth-ui/ngx-firebase-ionic-auth-ui.metadata.json +0 -1
- package/ionic-auth-ui/package.json +0 -30
- package/ionic-auth-ui/pages/index.d.ts +0 -4
- package/ionic-auth-ui/pages/register/index.d.ts +0 -1
- package/ionic-auth-ui/pages/register/register.page.d.ts +0 -16
- package/ionic-auth-ui/pages/signin/index.d.ts +0 -1
- package/ionic-auth-ui/pages/signin/signin.page.d.ts +0 -22
- package/ionic-auth-ui/pages/user/index.d.ts +0 -1
- package/ionic-auth-ui/pages/user/user.page.d.ts +0 -3
- package/ionic-auth-ui/pages/verifyemail/index.d.ts +0 -1
- package/ionic-auth-ui/pages/verifyemail/verifyemail.page.d.ts +0 -19
- package/ionic-auth-ui/public-api.d.ts +0 -4
- package/ngx-firebase.d.ts +0 -5
- package/ngx-firebase.metadata.json +0 -1
- package/public-api.d.ts +0 -5
- package/shared/guards/index.d.ts +0 -2
- package/shared/guards/logged-in.guard.d.ts +0 -13
- package/shared/guards/verify-email.guard.d.ts +0 -11
- package/shared/interfaces/accounts.enum.d.ts +0 -7
- package/shared/interfaces/authprovider.enum.d.ts +0 -13
- package/shared/interfaces/config.interface.d.ts +0 -63
- package/shared/interfaces/index.d.ts +0 -7
- package/shared/interfaces/main.interface.d.ts +0 -13
- package/shared/interfaces/providers.interface.d.ts +0 -70
- package/shared/interfaces/tokens.d.ts +0 -16
- package/shared/interfaces/ui-providers.interface.d.ts +0 -66
- package/shared/services/analytics.service.d.ts +0 -10
- package/shared/services/auth-process.service.d.ts +0 -197
- package/shared/services/crashlytics.service.d.ts +0 -11
- package/shared/services/device-info.service.d.ts +0 -3
- package/shared/services/firebase.service.d.ts +0 -16
- package/shared/services/firestore-sync.service.d.ts +0 -16
- package/shared/services/index.d.ts +0 -9
- package/shared/services/performance.service.d.ts +0 -12
- package/shared/services/remoteconfig.service.d.ts +0 -18
- package/shared/services/ui.service.d.ts +0 -22
- package/shared/shared.module.d.ts +0 -14
- package/shared/types/DisplayWidth.d.ts +0 -7
- package/shared/types/Location.d.ts +0 -8
- package/shared/types/ValueAccessorControlComponent.d.ts +0 -27
- package/shared/types/ValueAccessorValueComponent.d.ts +0 -19
- package/shared/types/index.d.ts +0 -4
- package/testing/fakeavatar.module.d.ts +0 -2
- package/testing/fakes/FakeAuthProcessService.d.ts +0 -28
- package/testing/fakes/FakeAvatarComponent.d.ts +0 -3
- package/testing/fakes/FakeFireService.d.ts +0 -20
- package/testing/fakes/FakeFirestoreSyncService.d.ts +0 -9
- package/testing/fakes/FakeIAPurchaseService.d.ts +0 -9
- package/testing/fakes/FakePickerService.d.ts +0 -6
- package/testing/fakes/FakeRemoteConfigService.d.ts +0 -19
- package/testing/fakes/FakeTranslateService.d.ts +0 -15
- package/testing/fakes/FakeUiService.d.ts +0 -25
- package/testing/fakes/angular-fire/FakeAngularFireAuth.d.ts +0 -52
- package/testing/fakes/angular-fire/FakeAngularFireFunctions.d.ts +0 -11
- package/testing/fakes/angular-fire/FakeAngularFirePerformance.d.ts +0 -10
- package/testing/fakes/angular-fire/FakeAngularFireStorage.d.ts +0 -5
- package/testing/fakes/angular-fire/FakeAngularFirestore.d.ts +0 -5
- package/testing/fakes/angular-fire/FakeUserCredential.d.ts +0 -9
- package/testing/fakes/index.d.ts +0 -16
- package/testing/ngx-firebase-testing.d.ts +0 -5
- package/testing/ngx-firebase-testing.metadata.json +0 -1
- package/testing/package.json +0 -29
- package/testing/public-api.d.ts +0 -4
- package/testing/test.module.d.ts +0 -4
- package/testing/utils/index.d.ts +0 -5
- package/testing/utils/patchConsole.d.ts +0 -4
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FirebaseAppConfig } from '@angular/fire';
|
|
2
|
-
import { ConfigTemplate } from '@angular/fire/remote-config';
|
|
3
|
-
import { AuthProvider } from './authprovider.enum';
|
|
4
|
-
export interface MalAuthUIConfig {
|
|
5
|
-
authGuardFallbackURL: string;
|
|
6
|
-
authGuardLoggedInURL: string;
|
|
7
|
-
authGuardVerifyEmailURL?: string;
|
|
8
|
-
enableFirestoreSync: boolean;
|
|
9
|
-
reSignInUrl: string;
|
|
10
|
-
toastMessageOnAuthSuccess: boolean | string;
|
|
11
|
-
toastMessageOnAuthError: boolean | string;
|
|
12
|
-
toastDefaultDurationMil: number;
|
|
13
|
-
logoUrl?: string;
|
|
14
|
-
tosUrl?: string;
|
|
15
|
-
privacyPolicyUrl?: string;
|
|
16
|
-
passwordMaxLength: number;
|
|
17
|
-
passwordMinLength: number;
|
|
18
|
-
passwordRequireLowercase: boolean;
|
|
19
|
-
passwordRequireUppercase: boolean;
|
|
20
|
-
passwordRequireSpecial: boolean;
|
|
21
|
-
passwordRequireNumbers: boolean;
|
|
22
|
-
nameMaxLength: number;
|
|
23
|
-
nameMinLength: number;
|
|
24
|
-
verifyEmailBackground?: string;
|
|
25
|
-
supportedProviders: AuthProvider.ALL | AuthProvider[];
|
|
26
|
-
guestEnabled: boolean;
|
|
27
|
-
allowAccountEdit: boolean;
|
|
28
|
-
allowAccountDelete: boolean;
|
|
29
|
-
allowAccountLogout: boolean;
|
|
30
|
-
guardProtectedRoutesUntilEmailIsVerified: boolean;
|
|
31
|
-
enableEmailVerification: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare enum MalServiceEnabled {
|
|
34
|
-
emulate = 2,
|
|
35
|
-
enabled = 1,
|
|
36
|
-
disabled = 0
|
|
37
|
-
}
|
|
38
|
-
export declare type UseEmulatorArguments = [string, number];
|
|
39
|
-
export interface MalServicesConifg {
|
|
40
|
-
firebaseAnalytics: boolean;
|
|
41
|
-
firebaseCrashlytics: boolean;
|
|
42
|
-
firebasePerformance: boolean;
|
|
43
|
-
firebaseRemoteConfig: boolean;
|
|
44
|
-
inAppPurchase: boolean;
|
|
45
|
-
firebaseAuth: true | UseEmulatorArguments;
|
|
46
|
-
firebaseFirestore: true | UseEmulatorArguments;
|
|
47
|
-
firebaseFunctions: true | UseEmulatorArguments;
|
|
48
|
-
firebaseRegion?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface MalUserProvidedConfig<T extends ConfigTemplate = ConfigTemplate> {
|
|
51
|
-
firebase: FirebaseAppConfig;
|
|
52
|
-
services?: Partial<MalServicesConifg>;
|
|
53
|
-
authUi?: Partial<MalAuthUIConfig>;
|
|
54
|
-
configDefaults?: T;
|
|
55
|
-
}
|
|
56
|
-
export interface MalSharedConfig<T extends ConfigTemplate = ConfigTemplate> {
|
|
57
|
-
firebase: FirebaseAppConfig;
|
|
58
|
-
services: MalServicesConifg;
|
|
59
|
-
authUi: MalAuthUIConfig;
|
|
60
|
-
configDefaults: T;
|
|
61
|
-
}
|
|
62
|
-
export declare const defaultAuthFirebaseUIConfig: Omit<MalSharedConfig, 'firebase' | 'configDefaults'>;
|
|
63
|
-
export declare function malSharedConfigFactory<T extends ConfigTemplate>(userProvidedConfig: MalUserProvidedConfig<T>): MalSharedConfig<T>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ICredentials {
|
|
2
|
-
email: string;
|
|
3
|
-
password: string;
|
|
4
|
-
}
|
|
5
|
-
export interface ISignInOptions {
|
|
6
|
-
displayName?: string;
|
|
7
|
-
credentials?: ICredentials;
|
|
8
|
-
skipTosCheck?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const PHONE_NUMBER_REGEX: RegExp;
|
|
11
|
-
export declare enum FirebaseErrorCodes {
|
|
12
|
-
requiresRecentLogin = "auth/requires-recent-login"
|
|
13
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { AuthProvider } from './authprovider.enum';
|
|
3
|
-
import { ICredentials } from './main.interface';
|
|
4
|
-
import { User, AuthProvider as FirebaseAuthProvider, AuthCredential } from '@firebase/auth-types';
|
|
5
|
-
export declare type IFirebaseProvider = IAnalyticsProvider & ICrashlyticsProvider & IPerformanceProvider;
|
|
6
|
-
export interface IAnalyticsProvider {
|
|
7
|
-
logEvent(name: string, params?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
setScreenName(screenName: string, screenClass?: string): Promise<void>;
|
|
11
|
-
setUserId(userId: string | null): void;
|
|
12
|
-
}
|
|
13
|
-
export interface ICrashlyticsProvider {
|
|
14
|
-
recordException(_options: iOSException | AndroidException): Promise<void>;
|
|
15
|
-
addLogMessage(message: string): Promise<void>;
|
|
16
|
-
setUserId(uid: string | null): void;
|
|
17
|
-
}
|
|
18
|
-
export interface ICredentialFactoryProvider {
|
|
19
|
-
isProviderSupported(provider: AuthProvider): Promise<boolean>;
|
|
20
|
-
getCredential(provider: AuthProvider): Promise<AuthCredential | null>;
|
|
21
|
-
signOut(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export interface IPerformanceProvider {
|
|
24
|
-
createTrace(label: string): Promise<IPerformanceTrace>;
|
|
25
|
-
}
|
|
26
|
-
export interface IPerformanceTrace {
|
|
27
|
-
start: () => void;
|
|
28
|
-
stop: () => void;
|
|
29
|
-
putAttribute: (key: string, value: any) => void;
|
|
30
|
-
}
|
|
31
|
-
export interface ContextOptions {
|
|
32
|
-
key: string;
|
|
33
|
-
value: string | number | boolean;
|
|
34
|
-
type: 'string' | 'long' | 'double' | 'boolean' | 'int' | 'float';
|
|
35
|
-
}
|
|
36
|
-
export interface iOSException {
|
|
37
|
-
code?: number;
|
|
38
|
-
domain?: string;
|
|
39
|
-
message: string;
|
|
40
|
-
}
|
|
41
|
-
export interface AndroidException {
|
|
42
|
-
message: string;
|
|
43
|
-
}
|
|
44
|
-
export interface IAuthProcessService {
|
|
45
|
-
listenToUserEvents(): void;
|
|
46
|
-
resetPassword(email: string): Promise<void>;
|
|
47
|
-
signInWith(provider: AuthProvider, credentials?: ICredentials): Promise<void>;
|
|
48
|
-
linkToProvider(provider: AuthProvider): Promise<void>;
|
|
49
|
-
signInOrLinkWithProvider(provider: AuthProvider): Promise<void>;
|
|
50
|
-
signUp(displayName: string, credentials: ICredentials): Promise<void>;
|
|
51
|
-
sendNewVerificationEmail(): Promise<void | never>;
|
|
52
|
-
signOut(): Promise<void>;
|
|
53
|
-
updateProfile(displayName: string, photoURL: string | null): Promise<void>;
|
|
54
|
-
getUserPhotoUrl(): Observable<string | null>;
|
|
55
|
-
getPhotoPath(image: string): string;
|
|
56
|
-
signInWithPhoneNumber(): Promise<void>;
|
|
57
|
-
reloadUserInfo(): Promise<void>;
|
|
58
|
-
getAuthProvider(provider: AuthProvider): FirebaseAuthProvider;
|
|
59
|
-
}
|
|
60
|
-
export interface IAuthHooksService {
|
|
61
|
-
prepareMergeSource?: {
|
|
62
|
-
(sourceUser: User): Promise<any>;
|
|
63
|
-
};
|
|
64
|
-
applyMergeToTarget?: {
|
|
65
|
-
(targetUser: User, context: any): Promise<void>;
|
|
66
|
-
};
|
|
67
|
-
beforeDelete?: {
|
|
68
|
-
(user: User): Promise<boolean>;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { MalSharedConfig, MalUserProvidedConfig } from './config.interface';
|
|
3
|
-
import { IAnalyticsProvider, IAuthHooksService, IAuthProcessService, ICrashlyticsProvider, ICredentialFactoryProvider } from './providers.interface';
|
|
4
|
-
import { ILoadingUIProvider, IAlertsUIProvider, IPickerUIProvider, IToastUIProvider, ILegalityDialogUIProvider } from './ui-providers.interface';
|
|
5
|
-
export declare const MalAnalyticsProviderToken: InjectionToken<IAnalyticsProvider>;
|
|
6
|
-
export declare const MalCrashlyticsProviderToken: InjectionToken<ICrashlyticsProvider>;
|
|
7
|
-
export declare const MalAuthServiceProviderToken: InjectionToken<IAuthProcessService>;
|
|
8
|
-
export declare const AuthHooksProviderToken: InjectionToken<IAuthHooksService>;
|
|
9
|
-
export declare const MalCredentialFactoryProviderToken: InjectionToken<ICredentialFactoryProvider>;
|
|
10
|
-
export declare const MalUserProvidedConfigToken: InjectionToken<MalUserProvidedConfig<import("@angular/fire/remote-config").ConfigTemplate>>;
|
|
11
|
-
export declare const MalSharedConfigToken: InjectionToken<MalSharedConfig<import("@angular/fire/remote-config").ConfigTemplate>>;
|
|
12
|
-
export declare const MalLoadingUIProviderToken: InjectionToken<ILoadingUIProvider>;
|
|
13
|
-
export declare const MalAlertsUIProviderToken: InjectionToken<IAlertsUIProvider>;
|
|
14
|
-
export declare const MalPickerUIProviderToken: InjectionToken<IPickerUIProvider>;
|
|
15
|
-
export declare const MalToastUIProviderToken: InjectionToken<IToastUIProvider>;
|
|
16
|
-
export declare const MalLegaliyDialogUIProiderToken: InjectionToken<ILegalityDialogUIProvider>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Observable, Subscription } from "rxjs";
|
|
2
|
-
export declare type IUIProvider = ILoadingUIProvider & IAlertsUIProvider & IToastUIProvider & ILegalityDialogUIProvider;
|
|
3
|
-
export interface ILoadingUIProvider {
|
|
4
|
-
createLoading(message?: string): Promise<ILoadingElem>;
|
|
5
|
-
watchLoading(source: Observable<boolean>, options?: {
|
|
6
|
-
debounce?: number;
|
|
7
|
-
message?: string;
|
|
8
|
-
timeoutMs?: number | null;
|
|
9
|
-
debug?: string;
|
|
10
|
-
}): Promise<Subscription>;
|
|
11
|
-
}
|
|
12
|
-
export interface ILoadingElem {
|
|
13
|
-
present(): Promise<void>;
|
|
14
|
-
dismiss(): Promise<any>;
|
|
15
|
-
}
|
|
16
|
-
export interface IAlertsUIProvider {
|
|
17
|
-
yesNoAlert(message: string, options?: IYesNoAlertOptions): Promise<boolean>;
|
|
18
|
-
okAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
19
|
-
errorAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
20
|
-
infoAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
21
|
-
textboxInputAlert(options: ITextAlertOptions): Promise<string | null>;
|
|
22
|
-
}
|
|
23
|
-
export interface ITextAlertOptions extends IOkAlertOptions {
|
|
24
|
-
okText?: string;
|
|
25
|
-
value?: string;
|
|
26
|
-
placeholder?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface IYesNoAlertOptions extends IOkAlertOptions {
|
|
29
|
-
defaultToNo?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface IOkAlertOptions {
|
|
32
|
-
header?: string;
|
|
33
|
-
subHeader?: string;
|
|
34
|
-
interpolateParams?: object;
|
|
35
|
-
}
|
|
36
|
-
export interface IPickerUIProvider {
|
|
37
|
-
picker<T>(options: IPickerServiceOptions): Promise<T | null>;
|
|
38
|
-
}
|
|
39
|
-
export interface IPickerServiceOptions {
|
|
40
|
-
title: string;
|
|
41
|
-
options: {
|
|
42
|
-
text: string;
|
|
43
|
-
value: any;
|
|
44
|
-
}[];
|
|
45
|
-
confirmText?: string;
|
|
46
|
-
cancelText?: string;
|
|
47
|
-
interpolateParams?: object;
|
|
48
|
-
}
|
|
49
|
-
export interface IToastUIProvider {
|
|
50
|
-
createToast(message: string, options?: IToastOptions): Promise<IToastElem>;
|
|
51
|
-
toast(message: string, options?: IToastOptions): Promise<void>;
|
|
52
|
-
errorToast(error: Error, messagePrefix?: string, options?: IToastOptions): Promise<void>;
|
|
53
|
-
}
|
|
54
|
-
export interface IToastElem {
|
|
55
|
-
present(): Promise<void>;
|
|
56
|
-
dismiss(): Promise<any>;
|
|
57
|
-
onDidDismiss(): Promise<any>;
|
|
58
|
-
}
|
|
59
|
-
export interface IToastOptions {
|
|
60
|
-
duration?: number;
|
|
61
|
-
interpolateParams?: object;
|
|
62
|
-
position?: 'middle' | 'top' | 'bottom';
|
|
63
|
-
}
|
|
64
|
-
export interface ILegalityDialogUIProvider {
|
|
65
|
-
confirmTos(): Promise<boolean | null>;
|
|
66
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IAnalyticsProvider } from '../interfaces';
|
|
2
|
-
export declare class AnalyticsService implements IAnalyticsProvider {
|
|
3
|
-
private analytics;
|
|
4
|
-
logEvent: (name: string, params?: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}) => Promise<void>;
|
|
7
|
-
setScreenName: (screenName: string, screenClass?: string) => Promise<void>;
|
|
8
|
-
setUserId: (userId: string | null) => void;
|
|
9
|
-
constructor(analytics: IAnalyticsProvider);
|
|
10
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import 'firebase/auth';
|
|
4
|
-
import { User, UserInfo, UserCredential } from '@firebase/auth-types';
|
|
5
|
-
import { AngularFireAuth } from '@angular/fire/auth';
|
|
6
|
-
import { FirestoreSyncService } from './firestore-sync.service';
|
|
7
|
-
import { MalSharedConfig, AuthProvider, ISignInOptions, IAuthHooksService, ICredentialFactoryProvider } from '../interfaces';
|
|
8
|
-
import { UiService } from './ui.service';
|
|
9
|
-
import { FirebaseService } from './firebase.service';
|
|
10
|
-
export declare class AuthProcessService {
|
|
11
|
-
config: MalSharedConfig;
|
|
12
|
-
hooksService: IAuthHooksService;
|
|
13
|
-
credFactory: ICredentialFactoryProvider;
|
|
14
|
-
private fireStoreService;
|
|
15
|
-
private afa;
|
|
16
|
-
private fire;
|
|
17
|
-
private ui;
|
|
18
|
-
readonly onErrorEmitter: EventEmitter<any>;
|
|
19
|
-
readonly onSignInEmitter: EventEmitter<User>;
|
|
20
|
-
readonly onRegisterEmitter: EventEmitter<User>;
|
|
21
|
-
readonly onSignOutEmitter: EventEmitter<void>;
|
|
22
|
-
readonly onUserUpdatedEmitter: EventEmitter<UserInfo>;
|
|
23
|
-
readonly onUserDeletedEmitter: EventEmitter<void>;
|
|
24
|
-
readonly showProfileDialog: EventEmitter<any>;
|
|
25
|
-
/**
|
|
26
|
-
* Useful to know about auth state even between reloads.
|
|
27
|
-
*
|
|
28
|
-
**/
|
|
29
|
-
private _user$;
|
|
30
|
-
get user(): User | null;
|
|
31
|
-
readonly user$: Observable<import("firebase").default.User>;
|
|
32
|
-
/**
|
|
33
|
-
* Useful to know about auth state even between reloads.
|
|
34
|
-
**/
|
|
35
|
-
private _authState$;
|
|
36
|
-
readonly authState$: Observable<import("firebase").default.User>;
|
|
37
|
-
/**
|
|
38
|
-
* Obersable for current user - that only emits when the uid changes
|
|
39
|
-
* Useful to reset session info when user changes.
|
|
40
|
-
*/
|
|
41
|
-
uid$: Observable<string | null>;
|
|
42
|
-
/**
|
|
43
|
-
* UserInterface helper observables - indicating what user actions are currently permitted and
|
|
44
|
-
* the current status of authentication.
|
|
45
|
-
*/
|
|
46
|
-
readonly isLoggedIn$: Observable<boolean>;
|
|
47
|
-
readonly isAnonymous$: Observable<boolean>;
|
|
48
|
-
readonly isNamedUser$: Observable<boolean>;
|
|
49
|
-
readonly isNotNamedUser$: Observable<boolean>;
|
|
50
|
-
readonly canEdit$: Observable<boolean>;
|
|
51
|
-
readonly canRegister$: Observable<boolean>;
|
|
52
|
-
readonly canSignIn$: Observable<boolean>;
|
|
53
|
-
readonly canSignInAsGuest$: Observable<boolean>;
|
|
54
|
-
readonly canSignOut$: Observable<boolean>;
|
|
55
|
-
/**
|
|
56
|
-
* Observable. Emits whenever currentUser signsOut
|
|
57
|
-
*/
|
|
58
|
-
readonly onSignOut$: Observable<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Observable emits whenever a new user signsIn
|
|
61
|
-
*/
|
|
62
|
-
readonly onSignIn$: Observable<User>;
|
|
63
|
-
/**
|
|
64
|
-
* Provides an array of authentication providers that are valid for the currently signed-in user
|
|
65
|
-
*/
|
|
66
|
-
get reauthenticateProviders$(): Observable<AuthProvider[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Triggers subscriber actions when the current user token is refreshed
|
|
69
|
-
*/
|
|
70
|
-
private readonly tokenRefreshed$;
|
|
71
|
-
constructor(config: MalSharedConfig, hooksService: IAuthHooksService, credFactory: ICredentialFactoryProvider, fireStoreService: FirestoreSyncService, afa: AngularFireAuth, // TODO should be private
|
|
72
|
-
fire: FirebaseService, ui: UiService);
|
|
73
|
-
/**
|
|
74
|
-
* Returns true if current platform is webplatform supported by @angular/fire
|
|
75
|
-
*/
|
|
76
|
-
get isWebPlatform(): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Indicates if the specified provider is supported on the current platform
|
|
79
|
-
*
|
|
80
|
-
* A provider is supported if it is configured to be so in authUi.supportProviders and either the platform is a webplatform
|
|
81
|
-
* (in which case @anguluar/fire will be used). Or the provider is supported by the injected credFactory (such as that provided by /capacitor).
|
|
82
|
-
*/
|
|
83
|
-
isProviderSupported(provider: AuthProvider): Promise<boolean>;
|
|
84
|
-
/**
|
|
85
|
-
* Refreshes the current user IdToken, and triggers the tokenRefreshed$ subject
|
|
86
|
-
*/
|
|
87
|
-
refreshToken(): Promise<void>;
|
|
88
|
-
/**
|
|
89
|
-
* Provides an observable that subscribes to the current user token and returns the value of the specified claim.
|
|
90
|
-
*
|
|
91
|
-
* @param claim Claim to be returned
|
|
92
|
-
* @returns Observable for: Value of claim within current user token || null (if not signed in) || undefined (if no such claim exists)
|
|
93
|
-
*/
|
|
94
|
-
selectCurrentUserClaim<T>(claim: string): Observable<T | null | undefined>;
|
|
95
|
-
/**
|
|
96
|
-
* Get the value for a custom claim for the current user (extracted from their ID token)
|
|
97
|
-
*
|
|
98
|
-
* @param claim Claim to be returned
|
|
99
|
-
* @returns Value of claim within current user token || null (if not signed in) || undefined (if no such claim exists)
|
|
100
|
-
*/
|
|
101
|
-
getCurrentUserClaim<T>(claim: string): Promise<T | null | undefined>;
|
|
102
|
-
/**
|
|
103
|
-
* Reset the password of currently authenticated user via email,
|
|
104
|
-
* Firebase sends an email to the user - and managed the reset process directly via google's hosted pages.
|
|
105
|
-
*
|
|
106
|
-
* @param email - the email to reset
|
|
107
|
-
*/
|
|
108
|
-
resetPassword(email: string): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* General sign in mechanism to authenticate the users with a firebase project
|
|
111
|
-
* using a traditional way, via username and password or by using an authentication provider
|
|
112
|
-
* like google, facebook, twitter and github
|
|
113
|
-
*
|
|
114
|
-
* [Current State -> Target State]
|
|
115
|
-
* Null -> Anon/named: OK
|
|
116
|
-
* Anon -> Anon: Throws Error
|
|
117
|
-
* Anon -> Named: Triggers MergeService
|
|
118
|
-
* Named -> Any: Throws Error
|
|
119
|
-
*
|
|
120
|
-
* @param provider - the provider to authenticate with (google, facebook, twitter, github)
|
|
121
|
-
* @param credentials optional email and password
|
|
122
|
-
*/
|
|
123
|
-
signInWith(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
124
|
-
/**
|
|
125
|
-
* Reauthenicate the current user - a recent authentication is required for some sensitive operations
|
|
126
|
-
* such as changing account details
|
|
127
|
-
*/
|
|
128
|
-
reauthenicateWithProvider(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
129
|
-
/**
|
|
130
|
-
* Link the current user to credentials from another auth provider.
|
|
131
|
-
*
|
|
132
|
-
* @param provider Provider to link.
|
|
133
|
-
*/
|
|
134
|
-
linkCurrentUserToProvider(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
135
|
-
/**
|
|
136
|
-
* Creates a firebase user account authenticated with the specified provider.
|
|
137
|
-
* If AuthProvider.EmailAndPassword is specified credentials and displayname must also be provided.
|
|
138
|
-
*/
|
|
139
|
-
registerWith(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
140
|
-
/**
|
|
141
|
-
* Authenticates the user using social provider.
|
|
142
|
-
*
|
|
143
|
-
* @param provider social auth provider
|
|
144
|
-
* @param options
|
|
145
|
-
* @returns user credentials || null if not signed in.
|
|
146
|
-
*/
|
|
147
|
-
private socialSignIn;
|
|
148
|
-
/**
|
|
149
|
-
* Present dialog and confirm the user agress to the privacy policy and terms of service (if either configured).
|
|
150
|
-
* If nether configured returns true;
|
|
151
|
-
*
|
|
152
|
-
* @returns True if either user agrees to TOS/PrivacyUrl || no TOS/PrivacyUrl configured.
|
|
153
|
-
*/
|
|
154
|
-
private confirmTos;
|
|
155
|
-
/**
|
|
156
|
-
* Send the currently authenticated user another verficiation email.
|
|
157
|
-
*/
|
|
158
|
-
sendNewVerificationEmail(): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* SignOut the currently authenticated user.
|
|
161
|
-
*/
|
|
162
|
-
signOut(): Promise<void>;
|
|
163
|
-
/**
|
|
164
|
-
* Update the details for the authenticated user of in the firebase authentication and sync with firestore.
|
|
165
|
-
*
|
|
166
|
-
* @param userInfo - UserInfo object containing those properties for which change is requried. Only provider
|
|
167
|
-
* the properties actually to be changed. Others should be ommitted.
|
|
168
|
-
*/
|
|
169
|
-
updateUserInfo(userInfo: Partial<UserInfo>): Promise<void>;
|
|
170
|
-
/**
|
|
171
|
-
* Extract UserInfo object from the User object
|
|
172
|
-
* If multiple providers are supplied these are amalgamated to create the most complete
|
|
173
|
-
* UserInfo object possible
|
|
174
|
-
*/
|
|
175
|
-
parseUserInfo(user: User): UserInfo;
|
|
176
|
-
/**
|
|
177
|
-
* Returns the UserPhotoUrl, or an appropraite placeholder if not provided
|
|
178
|
-
* ToDo - this would probably bet better inside a user-photo component
|
|
179
|
-
*/
|
|
180
|
-
getUserPhotoUrl(): Observable<string | null>;
|
|
181
|
-
/**
|
|
182
|
-
* Refresh user info. Can be useful for instance to get latest status regarding email verification.
|
|
183
|
-
*/
|
|
184
|
-
reloadUserInfo(): Promise<void>;
|
|
185
|
-
/**
|
|
186
|
-
* Deletes the current user
|
|
187
|
-
*/
|
|
188
|
-
deleteUser(): Promise<void>;
|
|
189
|
-
/**
|
|
190
|
-
* Logs the error and provides user error notifcation if appropriate
|
|
191
|
-
*/
|
|
192
|
-
handleError(error: any): Promise<void>;
|
|
193
|
-
/**
|
|
194
|
-
* Returns a firebase auth provider object for the specified provider
|
|
195
|
-
*/
|
|
196
|
-
private getAuthProvider;
|
|
197
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AndroidException, ICrashlyticsProvider, iOSException } from '../interfaces';
|
|
2
|
-
export declare class CrashlyticsService implements ICrashlyticsProvider {
|
|
3
|
-
private crashlyticsProvider;
|
|
4
|
-
private _recordException;
|
|
5
|
-
private _addLogMessage;
|
|
6
|
-
private _setUserId;
|
|
7
|
-
constructor(crashlyticsProvider: ICrashlyticsProvider);
|
|
8
|
-
setUserId(uid: string | null): void;
|
|
9
|
-
recordException(options: string | iOSException | AndroidException | Error): Promise<void>;
|
|
10
|
-
addLogMessage(message: string): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IFirebaseProvider } from '../interfaces';
|
|
2
|
-
import { AnalyticsService } from './analytics.service';
|
|
3
|
-
import { CrashlyticsService } from './crashlytics.service';
|
|
4
|
-
import { PerformanceService } from './performance.service';
|
|
5
|
-
export declare class FirebaseService implements IFirebaseProvider {
|
|
6
|
-
private crashlyticsService;
|
|
7
|
-
private analyticsService;
|
|
8
|
-
private performanceService;
|
|
9
|
-
recordException: any;
|
|
10
|
-
addLogMessage: any;
|
|
11
|
-
setScreenName: any;
|
|
12
|
-
logEvent: any;
|
|
13
|
-
createTrace: (label: string) => Promise<import("../interfaces").IPerformanceTrace>;
|
|
14
|
-
constructor(crashlyticsService: CrashlyticsService, analyticsService: AnalyticsService, performanceService: PerformanceService);
|
|
15
|
-
setUserId(userId: string | null): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AngularFirestore } from '@angular/fire/firestore';
|
|
2
|
-
import { UserInfo } from '@firebase/auth-types';
|
|
3
|
-
import { SetOptions } from '@firebase/firestore-types';
|
|
4
|
-
import { FirebaseService } from './firebase.service';
|
|
5
|
-
export interface UserProfile extends UserInfo {
|
|
6
|
-
acceptedTos: string | null;
|
|
7
|
-
}
|
|
8
|
-
export declare class FirestoreSyncService {
|
|
9
|
-
afs: AngularFirestore;
|
|
10
|
-
fire: FirebaseService;
|
|
11
|
-
constructor(afs: AngularFirestore, fire: FirebaseService);
|
|
12
|
-
getUserData(uid: string): Promise<UserProfile | null>;
|
|
13
|
-
private getUserDocRefByUID;
|
|
14
|
-
setUserData(uid: string, user: Partial<UserProfile>, options?: SetOptions): Promise<void>;
|
|
15
|
-
updateUserData(uid: string, user: Partial<UserProfile>): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './device-info.service';
|
|
2
|
-
export * from './remoteconfig.service';
|
|
3
|
-
export * from './analytics.service';
|
|
4
|
-
export * from './crashlytics.service';
|
|
5
|
-
export * from './performance.service';
|
|
6
|
-
export * from './firestore-sync.service';
|
|
7
|
-
export * from './auth-process.service';
|
|
8
|
-
export * from './firebase.service';
|
|
9
|
-
export * from './ui.service';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AngularFirePerformance } from '@angular/fire/performance';
|
|
2
|
-
import { IPerformanceTrace, IPerformanceProvider } from '../interfaces';
|
|
3
|
-
export declare class PerformanceTraceNoop implements IPerformanceTrace {
|
|
4
|
-
start(): void;
|
|
5
|
-
stop(): void;
|
|
6
|
-
putAttribute(key: string, value: any): void;
|
|
7
|
-
}
|
|
8
|
-
export declare class PerformanceService implements IPerformanceProvider {
|
|
9
|
-
dataCollectionEnabled: Promise<boolean>;
|
|
10
|
-
createTrace(label: string): Promise<IPerformanceTrace>;
|
|
11
|
-
constructor(performanceProvider: AngularFirePerformance);
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { AngularFireRemoteConfig } from '@angular/fire/remote-config';
|
|
3
|
-
import { Value } from '@firebase/remote-config-types';
|
|
4
|
-
export declare class RemoteConfigService {
|
|
5
|
-
private injector;
|
|
6
|
-
defaults: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
remoteConfig$: import("rxjs").Observable<{
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}>;
|
|
12
|
-
parameters: import("rxjs").Observable<any[]>;
|
|
13
|
-
getBoolean(key: string): Promise<boolean>;
|
|
14
|
-
getNumber(key: string): Promise<number>;
|
|
15
|
-
getString(key: string): Promise<string>;
|
|
16
|
-
getValue(key: string): Promise<Value>;
|
|
17
|
-
constructor(remoteConfigProvider: AngularFireRemoteConfig, injector: Injector);
|
|
18
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ILegalityDialogUIProvider, IAlertsUIProvider, ILoadingUIProvider, IToastUIProvider, IUIProvider } from '../interfaces';
|
|
2
|
-
import { FirebaseService } from './firebase.service';
|
|
3
|
-
export declare class UiService implements IUIProvider {
|
|
4
|
-
private toastService;
|
|
5
|
-
private alertService;
|
|
6
|
-
private loadingService;
|
|
7
|
-
private legalityDialog;
|
|
8
|
-
private fire;
|
|
9
|
-
toast: any;
|
|
10
|
-
createToast: any;
|
|
11
|
-
errorToast: any;
|
|
12
|
-
okAlert: any;
|
|
13
|
-
infoAlert: any;
|
|
14
|
-
errorAlert: any;
|
|
15
|
-
textboxInputAlert: any;
|
|
16
|
-
yesNoAlert: any;
|
|
17
|
-
createLoading: any;
|
|
18
|
-
watchLoading: any;
|
|
19
|
-
confirmTos: any;
|
|
20
|
-
constructor(toastService: IToastUIProvider, alertService: IAlertsUIProvider, loadingService: ILoadingUIProvider, legalityDialog: ILegalityDialogUIProvider, fire: FirebaseService);
|
|
21
|
-
logError(error: Error, messagePrefix?: string | null): void;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, NgZone } from '@angular/core';
|
|
2
|
-
import { MalSharedConfig, MalUserProvidedConfig, UseEmulatorArguments } from './interfaces';
|
|
3
|
-
import { FirebaseAppConfig, FirebaseApp, FirebaseOptions } from '@angular/fire';
|
|
4
|
-
import { AngularFireRemoteConfig, ConfigTemplate } from '@angular/fire/remote-config';
|
|
5
|
-
import { Settings as RemoteConfigSettings } from '@firebase/remote-config-types';
|
|
6
|
-
import { AngularFirePerformance } from '@angular/fire/performance';
|
|
7
|
-
export declare class MalSharedModule {
|
|
8
|
-
static forRoot(config: MalUserProvidedConfig, appNameFactory?: () => string | undefined): ModuleWithProviders<MalSharedModule>;
|
|
9
|
-
}
|
|
10
|
-
export declare function performanceProviderFactory(config: MalSharedConfig, app: FirebaseApp, dataCollectionEnabled: boolean, instrumentationEnabled: boolean, zone: NgZone, platformId: any): AngularFirePerformance | null;
|
|
11
|
-
export declare function remoteConfigFirebaseService(config: MalSharedConfig, options: FirebaseOptions, nameOrConfig: string | FirebaseAppConfig, settings: RemoteConfigSettings, defaultConfig: ConfigTemplate, zone: NgZone, platformId: any): AngularFireRemoteConfig | null;
|
|
12
|
-
export declare function authEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
13
|
-
export declare function firestoreEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
14
|
-
export declare function functionsEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, AfterViewInit, Injector, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, Validator, ValidationErrors, AbstractControl, FormControl, NgControl } from '@angular/forms';
|
|
3
|
-
import { ReplaySubject } from 'rxjs';
|
|
4
|
-
export declare class ValueAccessorControlComponent<T> implements ControlValueAccessor, Validator, OnInit, OnDestroy, AfterViewInit {
|
|
5
|
-
private injector;
|
|
6
|
-
private cdRef;
|
|
7
|
-
parentControl?: NgControl | null;
|
|
8
|
-
control?: FormControl;
|
|
9
|
-
private get _control();
|
|
10
|
-
protected destroy$: ReplaySubject<void>;
|
|
11
|
-
set value(val: T | undefined);
|
|
12
|
-
get value(): T | undefined;
|
|
13
|
-
valueChange: EventEmitter<T | undefined>;
|
|
14
|
-
constructor(injector: Injector, cdRef: ChangeDetectorRef);
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngAfterViewInit(): void;
|
|
17
|
-
ngOnDestroy(): void;
|
|
18
|
-
propagateChange: (val: T | undefined) => void;
|
|
19
|
-
propagateTouch: () => void;
|
|
20
|
-
propagateValidatorChange: () => void;
|
|
21
|
-
writeValue(value: T | undefined): void;
|
|
22
|
-
registerOnChange(fn: any): void;
|
|
23
|
-
registerOnTouched(fn: any): void;
|
|
24
|
-
registerOnValidatorChange(fn: () => void): void;
|
|
25
|
-
setDisabledState(isDisabled: boolean): void;
|
|
26
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
27
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, Validator, ValidationErrors, AbstractControl } from '@angular/forms';
|
|
3
|
-
declare type ValueAccessorHandler<T> = (_: T) => void;
|
|
4
|
-
declare type ValidatorChangeHandler = () => void;
|
|
5
|
-
export declare class ValueAccessorValueComponent<T> implements ControlValueAccessor, Validator {
|
|
6
|
-
get value(): T | undefined;
|
|
7
|
-
set value(val: T | undefined);
|
|
8
|
-
protected _value: T | undefined;
|
|
9
|
-
valueChange: EventEmitter<T>;
|
|
10
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
11
|
-
propagateChange: ValueAccessorHandler<T>;
|
|
12
|
-
propagateTouch: ValueAccessorHandler<T>;
|
|
13
|
-
propagateValidatorChange: ValidatorChangeHandler;
|
|
14
|
-
writeValue(value: T): void;
|
|
15
|
-
registerOnChange(fn: ValueAccessorHandler<T>): void;
|
|
16
|
-
registerOnTouched(fn: ValueAccessorHandler<T>): void;
|
|
17
|
-
registerOnValidatorChange(fn: ValidatorChangeHandler): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/shared/types/index.d.ts
DELETED