@react-native-firebase/installations 25.1.0 → 26.1.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/CHANGELOG.md +21 -0
- package/RNFBInstallations.podspec +9 -7
- package/android/build.gradle +19 -0
- package/android/src/main/java/io/invertase/firebase/installations/{ReactNativeFirebaseInstallationsModule.java → NativeRNFBTurboInstallations.java} +34 -28
- package/android/src/main/java/io/invertase/firebase/installations/ReactNativeFirebaseInstallationsPackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/installations/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboInstallationsSpec.java +46 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules-generated.cpp +44 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI.h +89 -0
- package/dist/module/index.js +81 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/index.d.ts +35 -5
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +8 -9
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/ios/RNFBInstallations/RNFBInstallationsModule.h +3 -3
- package/ios/RNFBInstallations/{RNFBInstallationsModule.m → RNFBInstallationsModule.mm} +32 -25
- package/ios/RNFBInstallations.xcodeproj/project.pbxproj +8 -8
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules-generated.mm +53 -0
- package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules.h +71 -0
- package/ios/generated/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
- package/ios/generated/RNFBInstallationsTurboModulesJSI.h +89 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/index.ts +111 -8
- package/lib/types/internal.ts +10 -15
- package/lib/version.ts +1 -1
- package/package.json +22 -4
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboInstallations.ts +10 -0
- package/typedoc.json +1 -1
- package/dist/module/modular.js +0 -68
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -72
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -33
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -25
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -12
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -77
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/lib/modular.ts +0 -80
- package/lib/namespaced.ts +0 -100
- package/lib/types/namespaced.ts +0 -112
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
-
/**
|
|
3
|
-
* Firebase Installations package for React Native.
|
|
4
|
-
*
|
|
5
|
-
* @firebase installations
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use the exported types directly instead.
|
|
9
|
-
* FirebaseInstallationsTypes namespace is kept for backwards compatibility.
|
|
10
|
-
*/
|
|
11
|
-
export declare namespace FirebaseInstallationsTypes {
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Use the exported types directly instead.
|
|
14
|
-
*/
|
|
15
|
-
interface Statics {
|
|
16
|
-
SDK_VERSION: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The Firebase Installations service is available for the default app or a given app.
|
|
20
|
-
*
|
|
21
|
-
* @deprecated Use the exported types directly instead. FirebaseInstallationsTypes namespace is kept for backwards compatibility.
|
|
22
|
-
*/
|
|
23
|
-
interface Module extends ReactNativeFirebase.FirebaseModule {
|
|
24
|
-
/**
|
|
25
|
-
* The current `FirebaseApp` instance for this Firebase service.
|
|
26
|
-
*
|
|
27
|
-
* @deprecated Use the exported types directly instead.
|
|
28
|
-
*/
|
|
29
|
-
app: ReactNativeFirebase.FirebaseApp;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
|
|
32
|
-
*
|
|
33
|
-
* @deprecated Use `getId()` from the modular API instead.
|
|
34
|
-
*/
|
|
35
|
-
getId(): Promise<string>;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieves a valid installation auth token.
|
|
38
|
-
*
|
|
39
|
-
* @deprecated Use `getToken()` from the modular API instead.
|
|
40
|
-
*/
|
|
41
|
-
getToken(forceRefresh?: boolean): Promise<string>;
|
|
42
|
-
/**
|
|
43
|
-
* Deletes the Firebase Installation and all associated data from the Firebase backend.
|
|
44
|
-
*
|
|
45
|
-
* @deprecated Use `deleteInstallations()` from the modular API instead.
|
|
46
|
-
*/
|
|
47
|
-
delete(): Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Module, Statics> & {
|
|
50
|
-
installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Module, Statics>;
|
|
51
|
-
firebase: ReactNativeFirebase.Module;
|
|
52
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
declare const defaultExport: FirebaseInstallationsTypes.InstallationsNamespace;
|
|
56
|
-
export declare const firebase: ReactNativeFirebase.Module & {
|
|
57
|
-
installations: typeof defaultExport;
|
|
58
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp & {
|
|
59
|
-
installations(): FirebaseInstallationsTypes.Module;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export default defaultExport;
|
|
63
|
-
/**
|
|
64
|
-
* Attach namespace to `firebase.` and `FirebaseApp.`.
|
|
65
|
-
*/
|
|
66
|
-
declare module '@react-native-firebase/app' {
|
|
67
|
-
namespace ReactNativeFirebase {
|
|
68
|
-
import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
|
|
69
|
-
interface Module {
|
|
70
|
-
installations: FirebaseModuleWithStaticsAndApp<FirebaseInstallationsTypes.Module, FirebaseInstallationsTypes.Statics>;
|
|
71
|
-
}
|
|
72
|
-
interface FirebaseApp {
|
|
73
|
-
installations(): FirebaseInstallationsTypes.Module;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=namespaced.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../../lib/types/namespaced.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;GAIG;AACH;;;GAGG;AAEH,yBAAiB,0BAA0B,CAAC;IAC1C;;OAEG;IACH,UAAiB,OAAO;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB;IAED;;;;OAIG;IACH,UAAiB,MAAO,SAAQ,mBAAmB,CAAC,cAAc;QAChE;;;;WAIG;QACH,GAAG,EAAE,mBAAmB,CAAC,WAAW,CAAC;QAErC;;;;WAIG;QACH,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QAEzB;;;;WAIG;QACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAElD;;;;WAIG;QACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KACzB;IAED,KAAY,sBAAsB,GAAG,mBAAmB,CAAC,+BAA+B,CACtF,MAAM,EACN,OAAO,CACR,GAAG;QACF,aAAa,EAAE,mBAAmB,CAAC,+BAA+B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpF,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC;QACrC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC;KACrD,CAAC;CACH;AAED,OAAO,CAAC,MAAM,aAAa,EAAE,0BAA0B,CAAC,sBAAsB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,mBAAmB,CAAC,MAAM,GAAG;IAC1D,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,GAAG,CACD,IAAI,CAAC,EAAE,MAAM,GACZ,mBAAmB,CAAC,WAAW,GAAG;QAAE,aAAa,IAAI,0BAA0B,CAAC,MAAM,CAAA;KAAE,CAAC;CAC7F,CAAC;AAEF,eAAe,aAAa,CAAC;AAE7B;;GAEG;AACH,OAAO,QAAQ,4BAA4B,CAAC;IAC1C,UAAU,mBAAmB,CAAC;QAC5B,OAAO,+BAA+B,GAAG,mBAAmB,CAAC,+BAA+B,CAAC;QAE7F,UAAU,MAAM;YACd,aAAa,EAAE,+BAA+B,CAC5C,0BAA0B,CAAC,MAAM,EACjC,0BAA0B,CAAC,OAAO,CACnC,CAAC;SACH;QAED,UAAU,WAAW;YACnB,aAAa,IAAI,0BAA0B,CAAC,MAAM,CAAC;SACpD;KACF;CACF"}
|
package/lib/modular.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this library except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { getApp } from '@react-native-firebase/app';
|
|
19
|
-
import type { FirebaseApp } from '@react-native-firebase/app';
|
|
20
|
-
import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
|
|
21
|
-
import type {
|
|
22
|
-
IdChangeCallbackFn,
|
|
23
|
-
IdChangeUnsubscribeFn,
|
|
24
|
-
Installations,
|
|
25
|
-
} from './types/installations';
|
|
26
|
-
import type { InstallationsInternal } from './types/internal';
|
|
27
|
-
|
|
28
|
-
function withModularDeprecationArg(installations: Installations): InstallationsInternal {
|
|
29
|
-
return installations as InstallationsInternal;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Returns an instance of Installations associated with the given FirebaseApp instance.
|
|
34
|
-
*/
|
|
35
|
-
export function getInstallations(app?: FirebaseApp): Installations {
|
|
36
|
-
if (app) {
|
|
37
|
-
return getApp(app.name).installations();
|
|
38
|
-
}
|
|
39
|
-
return getApp().installations();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Deletes the Firebase Installation and all associated data.
|
|
44
|
-
*/
|
|
45
|
-
export function deleteInstallations(installations: Installations): Promise<void> {
|
|
46
|
-
const internalInstallations = withModularDeprecationArg(installations);
|
|
47
|
-
return internalInstallations.delete.call(internalInstallations, MODULAR_DEPRECATION_ARG);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
|
|
52
|
-
*/
|
|
53
|
-
export function getId(installations: Installations): Promise<string> {
|
|
54
|
-
const internalInstallations = withModularDeprecationArg(installations);
|
|
55
|
-
return internalInstallations.getId.call(internalInstallations, MODULAR_DEPRECATION_ARG);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Returns a Firebase Installations auth token, identifying the current Firebase Installation.
|
|
60
|
-
*/
|
|
61
|
-
export function getToken(installations: Installations, forceRefresh?: boolean): Promise<string> {
|
|
62
|
-
const internalInstallations = withModularDeprecationArg(installations);
|
|
63
|
-
return internalInstallations.getToken.call(
|
|
64
|
-
internalInstallations,
|
|
65
|
-
forceRefresh,
|
|
66
|
-
MODULAR_DEPRECATION_ARG,
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Throw an error since react-native-firebase does not support this method.
|
|
72
|
-
*
|
|
73
|
-
* Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
|
|
74
|
-
*/
|
|
75
|
-
export function onIdChange(
|
|
76
|
-
_installations: Installations,
|
|
77
|
-
_callback: IdChangeCallbackFn,
|
|
78
|
-
): IdChangeUnsubscribeFn {
|
|
79
|
-
throw new Error('onIdChange() is unsupported by the React Native Firebase SDK.');
|
|
80
|
-
}
|
package/lib/namespaced.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this library except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { isIOS } from '@react-native-firebase/app/dist/module/common';
|
|
19
|
-
import {
|
|
20
|
-
createModuleNamespace,
|
|
21
|
-
FirebaseModule,
|
|
22
|
-
getFirebaseRoot,
|
|
23
|
-
} from '@react-native-firebase/app/dist/module/internal';
|
|
24
|
-
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
25
|
-
|
|
26
|
-
import { version } from './version';
|
|
27
|
-
import type { FirebaseInstallationsTypes } from './types/namespaced';
|
|
28
|
-
|
|
29
|
-
const statics = {};
|
|
30
|
-
|
|
31
|
-
const namespace = 'installations';
|
|
32
|
-
const nativeModuleName = 'RNFBInstallationsModule';
|
|
33
|
-
|
|
34
|
-
class FirebaseInstallationsModule extends FirebaseModule<typeof nativeModuleName> {
|
|
35
|
-
getId(): Promise<string> {
|
|
36
|
-
return this.native.getId();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
getToken(forceRefresh?: boolean): Promise<string> {
|
|
40
|
-
if (!forceRefresh) {
|
|
41
|
-
return this.native.getToken(false);
|
|
42
|
-
} else {
|
|
43
|
-
return this.native.getToken(true);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
delete(): Promise<void> {
|
|
48
|
-
return this.native.delete();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
onIdChange(): () => void {
|
|
52
|
-
if (isIOS) {
|
|
53
|
-
return () => {};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// TODO implement change listener on Android
|
|
57
|
-
return () => {};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// import { SDK_VERSION } from '@react-native-firebase/installations';
|
|
62
|
-
export const SDK_VERSION = version;
|
|
63
|
-
|
|
64
|
-
// import installations from '@react-native-firebase/installations';
|
|
65
|
-
// installations().X(...);
|
|
66
|
-
const installationsNamespace = createModuleNamespace({
|
|
67
|
-
statics,
|
|
68
|
-
version,
|
|
69
|
-
namespace,
|
|
70
|
-
nativeModuleName,
|
|
71
|
-
nativeEvents: false, // TODO implement android id change listener: ['installations_id_changed'],
|
|
72
|
-
hasMultiAppSupport: true,
|
|
73
|
-
hasCustomUrlOrRegionSupport: false,
|
|
74
|
-
ModuleClass: FirebaseInstallationsModule,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
|
|
78
|
-
FirebaseInstallationsTypes.Module,
|
|
79
|
-
FirebaseInstallationsTypes.Statics
|
|
80
|
-
> & {
|
|
81
|
-
installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
|
|
82
|
-
FirebaseInstallationsTypes.Module,
|
|
83
|
-
FirebaseInstallationsTypes.Statics
|
|
84
|
-
>;
|
|
85
|
-
firebase: ReactNativeFirebase.Module;
|
|
86
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export default installationsNamespace as unknown as InstallationsNamespace;
|
|
90
|
-
|
|
91
|
-
// import installations, { firebase } from '@react-native-firebase/installations';
|
|
92
|
-
// installations().X(...);
|
|
93
|
-
// firebase.installations().X(...);
|
|
94
|
-
export const firebase =
|
|
95
|
-
getFirebaseRoot() as unknown as ReactNativeFirebase.FirebaseNamespacedExport<
|
|
96
|
-
'installations',
|
|
97
|
-
FirebaseInstallationsTypes.Module,
|
|
98
|
-
FirebaseInstallationsTypes.Statics,
|
|
99
|
-
false
|
|
100
|
-
>;
|
package/lib/types/namespaced.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this library except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Firebase Installations package for React Native.
|
|
22
|
-
*
|
|
23
|
-
* @firebase installations
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use the exported types directly instead.
|
|
27
|
-
* FirebaseInstallationsTypes namespace is kept for backwards compatibility.
|
|
28
|
-
*/
|
|
29
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
30
|
-
export namespace FirebaseInstallationsTypes {
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use the exported types directly instead.
|
|
33
|
-
*/
|
|
34
|
-
export interface Statics {
|
|
35
|
-
SDK_VERSION: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The Firebase Installations service is available for the default app or a given app.
|
|
40
|
-
*
|
|
41
|
-
* @deprecated Use the exported types directly instead. FirebaseInstallationsTypes namespace is kept for backwards compatibility.
|
|
42
|
-
*/
|
|
43
|
-
export interface Module extends ReactNativeFirebase.FirebaseModule {
|
|
44
|
-
/**
|
|
45
|
-
* The current `FirebaseApp` instance for this Firebase service.
|
|
46
|
-
*
|
|
47
|
-
* @deprecated Use the exported types directly instead.
|
|
48
|
-
*/
|
|
49
|
-
app: ReactNativeFirebase.FirebaseApp;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
|
|
53
|
-
*
|
|
54
|
-
* @deprecated Use `getId()` from the modular API instead.
|
|
55
|
-
*/
|
|
56
|
-
getId(): Promise<string>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves a valid installation auth token.
|
|
60
|
-
*
|
|
61
|
-
* @deprecated Use `getToken()` from the modular API instead.
|
|
62
|
-
*/
|
|
63
|
-
getToken(forceRefresh?: boolean): Promise<string>;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Deletes the Firebase Installation and all associated data from the Firebase backend.
|
|
67
|
-
*
|
|
68
|
-
* @deprecated Use `deleteInstallations()` from the modular API instead.
|
|
69
|
-
*/
|
|
70
|
-
delete(): Promise<void>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
|
|
74
|
-
Module,
|
|
75
|
-
Statics
|
|
76
|
-
> & {
|
|
77
|
-
installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Module, Statics>;
|
|
78
|
-
firebase: ReactNativeFirebase.Module;
|
|
79
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
declare const defaultExport: FirebaseInstallationsTypes.InstallationsNamespace;
|
|
84
|
-
|
|
85
|
-
export declare const firebase: ReactNativeFirebase.Module & {
|
|
86
|
-
installations: typeof defaultExport;
|
|
87
|
-
app(
|
|
88
|
-
name?: string,
|
|
89
|
-
): ReactNativeFirebase.FirebaseApp & { installations(): FirebaseInstallationsTypes.Module };
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export default defaultExport;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Attach namespace to `firebase.` and `FirebaseApp.`.
|
|
96
|
-
*/
|
|
97
|
-
declare module '@react-native-firebase/app' {
|
|
98
|
-
namespace ReactNativeFirebase {
|
|
99
|
-
import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
|
|
100
|
-
|
|
101
|
-
interface Module {
|
|
102
|
-
installations: FirebaseModuleWithStaticsAndApp<
|
|
103
|
-
FirebaseInstallationsTypes.Module,
|
|
104
|
-
FirebaseInstallationsTypes.Statics
|
|
105
|
-
>;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface FirebaseApp {
|
|
109
|
-
installations(): FirebaseInstallationsTypes.Module;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|