@react-native-firebase/in-app-messaging 18.3.2 → 18.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- package/lib/index.js +2 -0
- package/lib/modular/index.d.ts +89 -0
- package/lib/modular/index.js +57 -0
- package/lib/version.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [18.5.0](https://github.com/invertase/react-native-firebase/compare/v18.4.0...v18.5.0) (2023-09-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @react-native-firebase/in-app-messaging
|
9
|
+
|
10
|
+
## [18.4.0](https://github.com/invertase/react-native-firebase/compare/v18.3.2...v18.4.0) (2023-09-11)
|
11
|
+
|
12
|
+
### Features
|
13
|
+
|
14
|
+
- **in-app-messaging:** Firebase V9 modular APIs ([#7306](https://github.com/invertase/react-native-firebase/issues/7306)) ([0149480](https://github.com/invertase/react-native-firebase/commit/0149480df3ec267c8b317d9034ff2a297bf2ce23))
|
15
|
+
|
6
16
|
## [18.3.2](https://github.com/invertase/react-native-firebase/compare/v18.3.1...v18.3.2) (2023-09-02)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @react-native-firebase/in-app-messaging
|
package/lib/index.js
CHANGED
@@ -0,0 +1,89 @@
|
|
1
|
+
import { FirebaseInAppMessagingTypes } from '..';
|
2
|
+
|
3
|
+
type FirebaseInAppMessaging = FirebaseInAppMessagingTypes.Module;
|
4
|
+
|
5
|
+
export declare function getInAppMessaging(): FirebaseInAppMessaging;
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Determines whether messages are suppressed or not.
|
9
|
+
*
|
10
|
+
* #### Example
|
11
|
+
*
|
12
|
+
* ```js
|
13
|
+
* const inAppMessaging = getInAppMessaging();
|
14
|
+
* const isSuppressed = isMessagesDisplaySuppressed(inAppMessaging);
|
15
|
+
* ```
|
16
|
+
*/
|
17
|
+
export declare function isMessagesDisplaySuppressed(
|
18
|
+
inAppMessaging: FirebaseInAppMessaging,
|
19
|
+
): boolean;
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Enable or disable suppression of Firebase In App Messaging messages.
|
23
|
+
*
|
24
|
+
* When enabled, no in app messages will be rendered until either you disable suppression, or the app restarts.
|
25
|
+
* This state is not persisted between app restarts.
|
26
|
+
*
|
27
|
+
* #### Example
|
28
|
+
*
|
29
|
+
* ```js
|
30
|
+
* // Suppress messages
|
31
|
+
* const inAppMessaging = getInAppMessaging();
|
32
|
+
* await setMessagesDisplaySuppressed(inAppMessaging, true);
|
33
|
+
* ```
|
34
|
+
*/
|
35
|
+
export declare function setMessagesDisplaySuppressed(
|
36
|
+
inAppMessaging: FirebaseInAppMessaging,
|
37
|
+
enabled: boolean,
|
38
|
+
): Promise<null>;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Determines whether automatic data collection is enabled or not.
|
42
|
+
*
|
43
|
+
* #### Example
|
44
|
+
*
|
45
|
+
* ```js
|
46
|
+
* const inAppMessaging = getInAppMessaging();
|
47
|
+
* const isDataCollectionEnabled = isAutomaticDataCollectionEnabled(inAppMessaging);
|
48
|
+
* ```
|
49
|
+
*/
|
50
|
+
export declare function isAutomaticDataCollectionEnabled(
|
51
|
+
inAppMessaging: FirebaseInAppMessaging,
|
52
|
+
): boolean;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Enable or disable automatic data collection for Firebase In-App Messaging.
|
56
|
+
*
|
57
|
+
* When enabled, generates a registration token on app startup if there is no valid one and generates a new token
|
58
|
+
* when it is deleted (which prevents `deleteInstanceId()` from stopping the periodic sending of data).
|
59
|
+
*
|
60
|
+
* This setting is persisted across app restarts and overrides the setting specified in your manifest/plist file.
|
61
|
+
*
|
62
|
+
* #### Example
|
63
|
+
*
|
64
|
+
* ```js
|
65
|
+
* // Disable data collection
|
66
|
+
* const inAppMessaging = getInAppMessaging();
|
67
|
+
* setAutomaticDataCollectionEnabled(inAppMessaging, false);
|
68
|
+
* ```
|
69
|
+
*/
|
70
|
+
export declare function setAutomaticDataCollectionEnabled(
|
71
|
+
inAppMessaging: FirebaseInAppMessaging,
|
72
|
+
enabled: boolean,
|
73
|
+
): Promise<null>;
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Trigger in-app messages programmatically
|
77
|
+
*
|
78
|
+
* #### Example
|
79
|
+
*
|
80
|
+
* ```js
|
81
|
+
* // Suppress messages
|
82
|
+
* const inAppMessaging = getInAppMessaging();
|
83
|
+
* await triggerEvent(inAppMessaging, "exampleTrigger");
|
84
|
+
* ```
|
85
|
+
*/
|
86
|
+
export declare function triggerEvent(
|
87
|
+
inAppMessaging: FirebaseInAppMessaging,
|
88
|
+
eventId: string,
|
89
|
+
): Promise<null>;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { firebase } from '..';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("..").FirebaseApp} FirebaseApp
|
5
|
+
* @typedef {import("..").FirebaseInAppMessagingTypes.Module} FirebaseInAppMessaging
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @returns {FirebaseInAppMessaging}
|
10
|
+
*/
|
11
|
+
export function getInAppMessaging() {
|
12
|
+
return firebase.inAppMessaging();
|
13
|
+
}
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @param {FirebaseInAppMessaging} inAppMessaging
|
17
|
+
* @returns {boolean}
|
18
|
+
*/
|
19
|
+
export function isMessagesDisplaySuppressed(inAppMessaging) {
|
20
|
+
return inAppMessaging.isMessagesDisplaySuppressed;
|
21
|
+
}
|
22
|
+
|
23
|
+
/**
|
24
|
+
*
|
25
|
+
* @param {FirebaseInAppMessaging} inAppMessaging
|
26
|
+
* @param {boolean} enabled
|
27
|
+
* @returns {Promise<null>}
|
28
|
+
*/
|
29
|
+
export function setMessagesDisplaySuppressed(inAppMessaging, enabled) {
|
30
|
+
return inAppMessaging.setMessagesDisplaySuppressed(enabled);
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @param {FirebaseInAppMessaging} inAppMessaging
|
35
|
+
* @returns {boolean}
|
36
|
+
*/
|
37
|
+
export function isAutomaticDataCollectionEnabled(inAppMessaging) {
|
38
|
+
return inAppMessaging.isAutomaticDataCollectionEnabled;
|
39
|
+
}
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @param {FirebaseInAppMessaging} inAppMessaging
|
43
|
+
* @param {boolean} enabled
|
44
|
+
* @returns {Promise<null>}
|
45
|
+
*/
|
46
|
+
export function setAutomaticDataCollectionEnabled(inAppMessaging, enabled) {
|
47
|
+
return inAppMessaging.setAutomaticDataCollectionEnabled(enabled);
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* @param {FirebaseInAppMessaging} inAppMessaging
|
52
|
+
* @param {string} eventId
|
53
|
+
* @returns {Promise<null>}
|
54
|
+
*/
|
55
|
+
export function triggerEvent(inAppMessaging, eventId) {
|
56
|
+
return inAppMessaging.triggerEvent(eventId);
|
57
|
+
}
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '18.
|
2
|
+
module.exports = '18.5.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/in-app-messaging",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.5.0",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "React Native Firebase - Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages that encourage them to use key app features. React Native Firebase provides support for both native Android & iOS integration with a simple JavaScript API.",
|
6
6
|
"main": "lib/index.js",
|
@@ -27,11 +27,11 @@
|
|
27
27
|
"inAppMessaging"
|
28
28
|
],
|
29
29
|
"peerDependencies": {
|
30
|
-
"@react-native-firebase/analytics": "18.
|
31
|
-
"@react-native-firebase/app": "18.
|
30
|
+
"@react-native-firebase/analytics": "18.5.0",
|
31
|
+
"@react-native-firebase/app": "18.5.0"
|
32
32
|
},
|
33
33
|
"publishConfig": {
|
34
34
|
"access": "public"
|
35
35
|
},
|
36
|
-
"gitHead": "
|
36
|
+
"gitHead": "c9b695aa8fd75d5a1d070ecbb6bb9ac4e9ff062e"
|
37
37
|
}
|