@react-native-firebase/installations 25.1.0 → 26.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/RNFBInstallations.podspec +7 -6
  3. package/android/build.gradle +19 -0
  4. package/android/src/main/java/io/invertase/firebase/installations/{ReactNativeFirebaseInstallationsModule.java → NativeRNFBTurboInstallations.java} +34 -28
  5. package/android/src/main/java/io/invertase/firebase/installations/ReactNativeFirebaseInstallationsPackage.java +1 -1
  6. package/android/src/main/java/io/invertase/firebase/installations/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboInstallationsSpec.java +46 -0
  7. package/android/src/main/java/io/invertase/firebase/installations/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules-generated.cpp +44 -0
  9. package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules.h +31 -0
  10. package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
  11. package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI.h +89 -0
  12. package/dist/module/index.js +81 -6
  13. package/dist/module/index.js.map +1 -1
  14. package/dist/module/version.js +1 -1
  15. package/dist/typescript/lib/index.d.ts +35 -5
  16. package/dist/typescript/lib/index.d.ts.map +1 -1
  17. package/dist/typescript/lib/types/internal.d.ts +8 -9
  18. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  19. package/dist/typescript/lib/version.d.ts +1 -1
  20. package/ios/RNFBInstallations/RNFBInstallationsModule.h +3 -3
  21. package/ios/RNFBInstallations/{RNFBInstallationsModule.m → RNFBInstallationsModule.mm} +24 -23
  22. package/ios/RNFBInstallations.xcodeproj/project.pbxproj +8 -8
  23. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  24. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  25. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  26. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  27. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  28. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  29. package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules-generated.mm +53 -0
  30. package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules.h +71 -0
  31. package/ios/generated/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
  32. package/ios/generated/RNFBInstallationsTurboModulesJSI.h +89 -0
  33. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  34. package/lib/index.ts +111 -8
  35. package/lib/types/internal.ts +10 -15
  36. package/lib/version.ts +1 -1
  37. package/package.json +22 -4
  38. package/react-native.config.js +10 -0
  39. package/specs/NativeRNFBTurboInstallations.ts +10 -0
  40. package/typedoc.json +1 -1
  41. package/dist/module/modular.js +0 -68
  42. package/dist/module/modular.js.map +0 -1
  43. package/dist/module/namespaced.js +0 -72
  44. package/dist/module/namespaced.js.map +0 -1
  45. package/dist/module/types/namespaced.js +0 -33
  46. package/dist/module/types/namespaced.js.map +0 -1
  47. package/dist/typescript/lib/modular.d.ts +0 -25
  48. package/dist/typescript/lib/modular.d.ts.map +0 -1
  49. package/dist/typescript/lib/namespaced.d.ts +0 -12
  50. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  51. package/dist/typescript/lib/types/namespaced.d.ts +0 -77
  52. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  53. package/lib/modular.ts +0 -80
  54. package/lib/namespaced.ts +0 -100
  55. package/lib/types/namespaced.ts +0 -112
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ version = "0.78.3"
7
+ source = { :git => 'https://github.com/facebook/react-native.git' }
8
+ if version == '1000.0.0'
9
+ # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
+ source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
+ else
12
+ source[:tag] = "v#{version}"
13
+ end
14
+
15
+ Pod::Spec.new do |s|
16
+ s.name = "ReactAppDependencyProvider"
17
+ s.version = version
18
+ s.summary = "The third party dependency provider for the app"
19
+ s.homepage = "https://reactnative.dev/"
20
+ s.documentation_url = "https://reactnative.dev/"
21
+ s.license = "MIT"
22
+ s.author = "Meta Platforms, Inc. and its affiliates"
23
+ s.platforms = min_supported_versions
24
+ s.source = source
25
+ s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
+
27
+ # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
+ s.pod_target_xcconfig = {
29
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
+ "DEFINES_MODULE" => "YES"
31
+ }
32
+
33
+ s.dependency "ReactCodegen"
34
+ end
package/lib/index.ts CHANGED
@@ -15,13 +15,116 @@
15
15
  *
16
16
  */
17
17
 
18
- // Export modular/public types.
19
- export type * from './types/installations';
18
+ import { isIOS } from '@react-native-firebase/app/dist/module/common';
19
+ import {
20
+ FirebaseModule,
21
+ getOrCreateModularInstance,
22
+ } from '@react-native-firebase/app/dist/module/internal';
23
+ import type { ModuleConfig } from '@react-native-firebase/app/dist/module/internal';
24
+ import './types/internal';
25
+ import type { FirebaseApp } from '@react-native-firebase/app';
26
+ import type {
27
+ IdChangeCallbackFn,
28
+ IdChangeUnsubscribeFn,
29
+ Installations,
30
+ } from './types/installations';
31
+ import type { InstallationsInternal } from './types/internal';
32
+ import { version } from './version';
20
33
 
21
- // Export modular API functions.
22
- export * from './modular';
34
+ const nativeModuleName = 'NativeRNFBTurboInstallations';
23
35
 
24
- // Export namespaced API.
25
- export type { FirebaseInstallationsTypes } from './types/namespaced';
26
- export * from './namespaced';
27
- export { default } from './namespaced';
36
+ class FirebaseInstallationsModule extends FirebaseModule<typeof nativeModuleName> {
37
+ getId(): Promise<string> {
38
+ return this.native.getId();
39
+ }
40
+
41
+ getToken(forceRefresh?: boolean): Promise<string> {
42
+ if (!forceRefresh) {
43
+ return this.native.getToken(false);
44
+ } else {
45
+ return this.native.getToken(true);
46
+ }
47
+ }
48
+
49
+ delete(): Promise<void> {
50
+ return this.native.deleteInstallations();
51
+ }
52
+
53
+ onIdChange(): () => void {
54
+ if (isIOS) {
55
+ return () => {};
56
+ }
57
+
58
+ // TODO implement change listener on Android
59
+ return () => {};
60
+ }
61
+ }
62
+
63
+ const config: ModuleConfig = {
64
+ namespace: 'installations',
65
+ nativeModuleName,
66
+ nativeEvents: false, // TODO implement android id change listener: ['installations_id_changed'],
67
+ hasMultiAppSupport: true,
68
+ hasCustomUrlOrRegionSupport: false,
69
+ turboModule: true,
70
+ };
71
+
72
+ /**
73
+ * RN Firebase package version string exported from the modular entry point.
74
+ *
75
+ * The firebase-js-sdk does not export `SDK_VERSION` from `@firebase/installations`.
76
+ */
77
+ export const SDK_VERSION = version;
78
+
79
+ /**
80
+ * Returns the {@link Installations} instance for the default or given {@link FirebaseApp}.
81
+ *
82
+ * @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
83
+ * @returns The Installations service instance for that app.
84
+ */
85
+ export function getInstallations(app?: FirebaseApp): Installations {
86
+ return getOrCreateModularInstance(
87
+ FirebaseInstallationsModule,
88
+ config,
89
+ app,
90
+ ) as unknown as Installations;
91
+ }
92
+
93
+ /**
94
+ * Deletes the Firebase Installation and all associated data.
95
+ */
96
+ export function deleteInstallations(installations: Installations): Promise<void> {
97
+ return (installations as InstallationsInternal).delete();
98
+ }
99
+
100
+ /**
101
+ * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
102
+ */
103
+ export function getId(installations: Installations): Promise<string> {
104
+ return (installations as InstallationsInternal).getId();
105
+ }
106
+
107
+ /**
108
+ * Returns a Firebase Installations auth token, identifying the current Firebase Installation.
109
+ */
110
+ export function getToken(installations: Installations, forceRefresh?: boolean): Promise<string> {
111
+ return (installations as InstallationsInternal).getToken(forceRefresh);
112
+ }
113
+
114
+ /**
115
+ * Throw an error since react-native-firebase does not support this method.
116
+ *
117
+ * Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
118
+ */
119
+ export function onIdChange(
120
+ _installations: Installations,
121
+ _callback: IdChangeCallbackFn,
122
+ ): IdChangeUnsubscribeFn {
123
+ throw new Error('onIdChange() is unsupported by the React Native Firebase SDK.');
124
+ }
125
+
126
+ export type {
127
+ IdChangeCallbackFn,
128
+ IdChangeUnsubscribeFn,
129
+ Installations,
130
+ } from './types/installations';
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2016-present Invertase Limited & Contributors
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
5
+ * you may not use this library except in compliance with the License.
6
6
  * You may obtain a copy of the License at
7
7
  *
8
8
  * http://www.apache.org/licenses/LICENSE-2.0
@@ -17,26 +17,21 @@
17
17
 
18
18
  import type { Installations } from './installations';
19
19
 
20
- /** Optional final argument passed by modular API wrappers (MODULAR_DEPRECATION_ARG). */
21
- export type InstallationsModularDeprecationArg = string;
22
-
23
- export interface InstallationsInternal extends Installations {
24
- delete(deprecationArg?: InstallationsModularDeprecationArg): Promise<void>;
25
- getId(deprecationArg?: InstallationsModularDeprecationArg): Promise<string>;
26
- getToken(
27
- forceRefresh?: boolean,
28
- deprecationArg?: InstallationsModularDeprecationArg,
29
- ): Promise<string>;
30
- }
31
-
32
20
  export interface RNFBInstallationsModule {
33
21
  getId(): Promise<string>;
34
22
  getToken(forceRefresh: boolean): Promise<string>;
35
- delete(): Promise<void>;
23
+ deleteInstallations(): Promise<void>;
36
24
  }
37
25
 
38
26
  declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
39
27
  interface ReactNativeFirebaseNativeModules {
40
- RNFBInstallationsModule: RNFBInstallationsModule;
28
+ NativeRNFBTurboInstallations: RNFBInstallationsModule;
41
29
  }
42
30
  }
31
+
32
+ export interface InstallationsInternal extends Installations {
33
+ getId(): Promise<string>;
34
+ getToken(forceRefresh?: boolean): Promise<string>;
35
+ delete(): Promise<void>;
36
+ readonly native: RNFBInstallationsModule;
37
+ }
package/lib/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '25.1.0';
2
+ export const version = '26.0.0';
package/package.json CHANGED
@@ -1,15 +1,32 @@
1
1
  {
2
2
  "name": "@react-native-firebase/installations",
3
- "version": "25.1.0",
3
+ "version": "26.0.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - Installations",
6
6
  "main": "./dist/module/index.js",
7
7
  "types": "./dist/typescript/lib/index.d.ts",
8
+ "codegenConfig": {
9
+ "name": "RNFBInstallationsTurboModules",
10
+ "type": "modules",
11
+ "jsSrcsDir": "specs",
12
+ "includesGeneratedCode": true,
13
+ "android": {
14
+ "javaPackageName": "io.invertase.firebase.installations"
15
+ },
16
+ "ios": {
17
+ "modulesProvider": {
18
+ "NativeRNFBTurboInstallations": "RNFBInstallationsModule"
19
+ }
20
+ }
21
+ },
8
22
  "scripts": {
9
23
  "build": "genversion --esm --semi lib/version.ts",
10
24
  "build:clean": "rimraf android/build && rimraf ios/build",
11
25
  "compile": "bob build",
12
- "prepare": "yarn run build && yarn compile"
26
+ "prepare": "yarn run build && yarn compile",
27
+ "codegen": "yarn android:codegen && yarn ios:codegen",
28
+ "android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/main/java/io/invertase/firebase/installations/generated",
29
+ "ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
13
30
  },
14
31
  "repository": {
15
32
  "type": "git",
@@ -23,13 +40,14 @@
23
40
  "installations"
24
41
  ],
25
42
  "peerDependencies": {
26
- "@react-native-firebase/app": "25.1.0"
43
+ "@react-native-firebase/app": "26.0.0"
27
44
  },
28
45
  "publishConfig": {
29
46
  "access": "public",
30
47
  "provenance": true
31
48
  },
32
49
  "devDependencies": {
50
+ "@react-native-firebase/app": "26.0.0",
33
51
  "react-native-builder-bob": "^0.40.13"
34
52
  },
35
53
  "exports": {
@@ -58,5 +76,5 @@
58
76
  ]
59
77
  ]
60
78
  },
61
- "gitHead": "e0a565d8a73a9b103d140ffacfb8876b30d8bdc5"
79
+ "gitHead": "2a360acb2aebdd39dd40e31be386b30697270626"
62
80
  }
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ cmakeListsPath:
6
+ './src/main/java/io/invertase/firebase/installations/generated/jni/CMakeLists.txt',
7
+ },
8
+ },
9
+ },
10
+ };
@@ -0,0 +1,10 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ deleteInstallations(appName: string): Promise<void>;
6
+ getId(appName: string): Promise<string>;
7
+ getToken(appName: string, forceRefresh: boolean): Promise<string>;
8
+ }
9
+
10
+ export default TurboModuleRegistry.getEnforcing<Spec>('NativeRNFBTurboInstallations');
package/typedoc.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "$schema": "https://typedoc.org/schema.json",
3
- "entryPoints": ["lib/modular.ts", "lib/types/installations.ts"],
3
+ "entryPoints": ["lib/index.ts", "lib/types/installations.ts"],
4
4
  "tsconfig": "tsconfig.json"
5
5
  }
@@ -1,68 +0,0 @@
1
- "use strict";
2
-
3
- /*
4
- * Copyright (c) 2016-present Invertase Limited & Contributors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this library except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- */
19
-
20
- import { getApp } from '@react-native-firebase/app';
21
- import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
22
- function withModularDeprecationArg(installations) {
23
- return installations;
24
- }
25
-
26
- /**
27
- * Returns an instance of Installations associated with the given FirebaseApp instance.
28
- */
29
- export function getInstallations(app) {
30
- if (app) {
31
- return getApp(app.name).installations();
32
- }
33
- return getApp().installations();
34
- }
35
-
36
- /**
37
- * Deletes the Firebase Installation and all associated data.
38
- */
39
- export function deleteInstallations(installations) {
40
- const internalInstallations = withModularDeprecationArg(installations);
41
- return internalInstallations.delete.call(internalInstallations, MODULAR_DEPRECATION_ARG);
42
- }
43
-
44
- /**
45
- * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
46
- */
47
- export function getId(installations) {
48
- const internalInstallations = withModularDeprecationArg(installations);
49
- return internalInstallations.getId.call(internalInstallations, MODULAR_DEPRECATION_ARG);
50
- }
51
-
52
- /**
53
- * Returns a Firebase Installations auth token, identifying the current Firebase Installation.
54
- */
55
- export function getToken(installations, forceRefresh) {
56
- const internalInstallations = withModularDeprecationArg(installations);
57
- return internalInstallations.getToken.call(internalInstallations, forceRefresh, MODULAR_DEPRECATION_ARG);
58
- }
59
-
60
- /**
61
- * Throw an error since react-native-firebase does not support this method.
62
- *
63
- * Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
64
- */
65
- export function onIdChange(_installations, _callback) {
66
- throw new Error('onIdChange() is unsupported by the React Native Firebase SDK.');
67
- }
68
- //# sourceMappingURL=modular.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApp","MODULAR_DEPRECATION_ARG","withModularDeprecationArg","installations","getInstallations","app","name","deleteInstallations","internalInstallations","delete","call","getId","getToken","forceRefresh","onIdChange","_installations","_callback","Error"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,uBAAuB,QAAQ,+CAA+C;AAQvF,SAASC,yBAAyBA,CAACC,aAA4B,EAAyB;EACtF,OAAOA,aAAa;AACtB;;AAEA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,GAAiB,EAAiB;EACjE,IAAIA,GAAG,EAAE;IACP,OAAOL,MAAM,CAACK,GAAG,CAACC,IAAI,CAAC,CAACH,aAAa,CAAC,CAAC;EACzC;EACA,OAAOH,MAAM,CAAC,CAAC,CAACG,aAAa,CAAC,CAAC;AACjC;;AAEA;AACA;AACA;AACA,OAAO,SAASI,mBAAmBA,CAACJ,aAA4B,EAAiB;EAC/E,MAAMK,qBAAqB,GAAGN,yBAAyB,CAACC,aAAa,CAAC;EACtE,OAAOK,qBAAqB,CAACC,MAAM,CAACC,IAAI,CAACF,qBAAqB,EAAEP,uBAAuB,CAAC;AAC1F;;AAEA;AACA;AACA;AACA,OAAO,SAASU,KAAKA,CAACR,aAA4B,EAAmB;EACnE,MAAMK,qBAAqB,GAAGN,yBAAyB,CAACC,aAAa,CAAC;EACtE,OAAOK,qBAAqB,CAACG,KAAK,CAACD,IAAI,CAACF,qBAAqB,EAAEP,uBAAuB,CAAC;AACzF;;AAEA;AACA;AACA;AACA,OAAO,SAASW,QAAQA,CAACT,aAA4B,EAAEU,YAAsB,EAAmB;EAC9F,MAAML,qBAAqB,GAAGN,yBAAyB,CAACC,aAAa,CAAC;EACtE,OAAOK,qBAAqB,CAACI,QAAQ,CAACF,IAAI,CACxCF,qBAAqB,EACrBK,YAAY,EACZZ,uBACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,UAAUA,CACxBC,cAA6B,EAC7BC,SAA6B,EACN;EACvB,MAAM,IAAIC,KAAK,CAAC,+DAA+D,CAAC;AAClF","ignoreList":[]}
@@ -1,72 +0,0 @@
1
- "use strict";
2
-
3
- /*
4
- * Copyright (c) 2016-present Invertase Limited & Contributors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this library except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- */
19
-
20
- import { isIOS } from '@react-native-firebase/app/dist/module/common';
21
- import { createModuleNamespace, FirebaseModule, getFirebaseRoot } from '@react-native-firebase/app/dist/module/internal';
22
- import { version } from "./version.js";
23
- const statics = {};
24
- const namespace = 'installations';
25
- const nativeModuleName = 'RNFBInstallationsModule';
26
- class FirebaseInstallationsModule extends FirebaseModule {
27
- getId() {
28
- return this.native.getId();
29
- }
30
- getToken(forceRefresh) {
31
- if (!forceRefresh) {
32
- return this.native.getToken(false);
33
- } else {
34
- return this.native.getToken(true);
35
- }
36
- }
37
- delete() {
38
- return this.native.delete();
39
- }
40
- onIdChange() {
41
- if (isIOS) {
42
- return () => {};
43
- }
44
-
45
- // TODO implement change listener on Android
46
- return () => {};
47
- }
48
- }
49
-
50
- // import { SDK_VERSION } from '@react-native-firebase/installations';
51
- export const SDK_VERSION = version;
52
-
53
- // import installations from '@react-native-firebase/installations';
54
- // installations().X(...);
55
- const installationsNamespace = createModuleNamespace({
56
- statics,
57
- version,
58
- namespace,
59
- nativeModuleName,
60
- nativeEvents: false,
61
- // TODO implement android id change listener: ['installations_id_changed'],
62
- hasMultiAppSupport: true,
63
- hasCustomUrlOrRegionSupport: false,
64
- ModuleClass: FirebaseInstallationsModule
65
- });
66
- export default installationsNamespace;
67
-
68
- // import installations, { firebase } from '@react-native-firebase/installations';
69
- // installations().X(...);
70
- // firebase.installations().X(...);
71
- export const firebase = getFirebaseRoot();
72
- //# sourceMappingURL=namespaced.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isIOS","createModuleNamespace","FirebaseModule","getFirebaseRoot","version","statics","namespace","nativeModuleName","FirebaseInstallationsModule","getId","native","getToken","forceRefresh","delete","onIdChange","SDK_VERSION","installationsNamespace","nativeEvents","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","firebase"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,+CAA+C;AACrE,SACEC,qBAAqB,EACrBC,cAAc,EACdC,eAAe,QACV,iDAAiD;AAGxD,SAASC,OAAO,QAAQ,cAAW;AAGnC,MAAMC,OAAO,GAAG,CAAC,CAAC;AAElB,MAAMC,SAAS,GAAG,eAAe;AACjC,MAAMC,gBAAgB,GAAG,yBAAyB;AAElD,MAAMC,2BAA2B,SAASN,cAAc,CAA0B;EAChFO,KAAKA,CAAA,EAAoB;IACvB,OAAO,IAAI,CAACC,MAAM,CAACD,KAAK,CAAC,CAAC;EAC5B;EAEAE,QAAQA,CAACC,YAAsB,EAAmB;IAChD,IAAI,CAACA,YAAY,EAAE;MACjB,OAAO,IAAI,CAACF,MAAM,CAACC,QAAQ,CAAC,KAAK,CAAC;IACpC,CAAC,MAAM;MACL,OAAO,IAAI,CAACD,MAAM,CAACC,QAAQ,CAAC,IAAI,CAAC;IACnC;EACF;EAEAE,MAAMA,CAAA,EAAkB;IACtB,OAAO,IAAI,CAACH,MAAM,CAACG,MAAM,CAAC,CAAC;EAC7B;EAEAC,UAAUA,CAAA,EAAe;IACvB,IAAId,KAAK,EAAE;MACT,OAAO,MAAM,CAAC,CAAC;IACjB;;IAEA;IACA,OAAO,MAAM,CAAC,CAAC;EACjB;AACF;;AAEA;AACA,OAAO,MAAMe,WAAW,GAAGX,OAAO;;AAElC;AACA;AACA,MAAMY,sBAAsB,GAAGf,qBAAqB,CAAC;EACnDI,OAAO;EACPD,OAAO;EACPE,SAAS;EACTC,gBAAgB;EAChBU,YAAY,EAAE,KAAK;EAAE;EACrBC,kBAAkB,EAAE,IAAI;EACxBC,2BAA2B,EAAE,KAAK;EAClCC,WAAW,EAAEZ;AACf,CAAC,CAAC;AAcF,eAAeQ,sBAAsB;;AAErC;AACA;AACA;AACA,OAAO,MAAMK,QAAQ,GACnBlB,eAAe,CAAC,CAKf","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- /*
4
- * Copyright (c) 2016-present Invertase Limited & Contributors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this library except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- */
19
- /**
20
- * Firebase Installations package for React Native.
21
- *
22
- * @firebase installations
23
- */
24
- /**
25
- * @deprecated Use the exported types directly instead.
26
- * FirebaseInstallationsTypes namespace is kept for backwards compatibility.
27
- */
28
- /* eslint-disable @typescript-eslint/no-namespace */
29
- export let FirebaseInstallationsTypes;
30
- /**
31
- * Attach namespace to `firebase.` and `FirebaseApp.`.
32
- */
33
- //# sourceMappingURL=namespaced.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FirebaseInstallationsTypes"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,WACiBA,0BAA0B;AAgE3C;AACA;AACA","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- import type { FirebaseApp } from '@react-native-firebase/app';
2
- import type { IdChangeCallbackFn, IdChangeUnsubscribeFn, Installations } from './types/installations';
3
- /**
4
- * Returns an instance of Installations associated with the given FirebaseApp instance.
5
- */
6
- export declare function getInstallations(app?: FirebaseApp): Installations;
7
- /**
8
- * Deletes the Firebase Installation and all associated data.
9
- */
10
- export declare function deleteInstallations(installations: Installations): Promise<void>;
11
- /**
12
- * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
13
- */
14
- export declare function getId(installations: Installations): Promise<string>;
15
- /**
16
- * Returns a Firebase Installations auth token, identifying the current Firebase Installation.
17
- */
18
- export declare function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
19
- /**
20
- * Throw an error since react-native-firebase does not support this method.
21
- *
22
- * Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
23
- */
24
- export declare function onIdChange(_installations: Installations, _callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
25
- //# sourceMappingURL=modular.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modular.d.ts","sourceRoot":"","sources":["../../../lib/modular.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAO/B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,aAAa,CAKjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAGnE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,cAAc,EAAE,aAAa,EAC7B,SAAS,EAAE,kBAAkB,GAC5B,qBAAqB,CAEvB"}
@@ -1,12 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
- import type { FirebaseInstallationsTypes } from './types/namespaced';
3
- export declare const SDK_VERSION = "25.1.0";
4
- type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseInstallationsTypes.Module, FirebaseInstallationsTypes.Statics> & {
5
- installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseInstallationsTypes.Module, FirebaseInstallationsTypes.Statics>;
6
- firebase: ReactNativeFirebase.Module;
7
- app(name?: string): ReactNativeFirebase.FirebaseApp;
8
- };
9
- declare const _default: InstallationsNamespace;
10
- export default _default;
11
- export declare const firebase: ReactNativeFirebase.FirebaseNamespacedExport<"installations", FirebaseInstallationsTypes.Module, FirebaseInstallationsTypes.Statics, false>;
12
- //# sourceMappingURL=namespaced.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../lib/namespaced.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAmCrE,eAAO,MAAM,WAAW,WAAU,CAAC;AAenC,KAAK,sBAAsB,GAAG,mBAAmB,CAAC,+BAA+B,CAC/E,0BAA0B,CAAC,MAAM,EACjC,0BAA0B,CAAC,OAAO,CACnC,GAAG;IACF,aAAa,EAAE,mBAAmB,CAAC,+BAA+B,CAChE,0BAA0B,CAAC,MAAM,EACjC,0BAA0B,CAAC,OAAO,CACnC,CAAC;IACF,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC;IACrC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC;CACrD,CAAC;wBAEkD,sBAAsB;AAA1E,wBAA2E;AAK3E,eAAO,MAAM,QAAQ,EACa,mBAAmB,CAAC,wBAAwB,CAC1E,eAAe,EACf,0BAA0B,CAAC,MAAM,EACjC,0BAA0B,CAAC,OAAO,EAClC,KAAK,CACN,CAAC"}
@@ -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"}