11interface Segmentation {
2- [ key : string ] : number | string | boolean ;
2+ [ key : string ] : number | string | boolean | ( number | string | boolean ) [ ] ;
33}
44
55interface CountlyEventOptions {
@@ -89,6 +89,29 @@ declare module "countly-sdk-react-native-bridge" {
8989 * Countly Feedback Module
9090 */
9191 namespace feedback {
92+
93+ /**
94+ * Shows the first available NPS widget that meets the criteria.
95+ * @param {String } [nameIDorTag] - name, id, or tag of the widget to show (optional)
96+ * @param {callback } [widgetClosedCallback] - called when the widget is closed (optional)
97+ */
98+ export function showNPS ( nameIDorTag ?: string , widgetClosedCallback ?: WidgetCallback ) : void ;
99+
100+ /**
101+ * Shows the first available survey widget that meets the criteria.
102+ * @param {String } [nameIDorTag] - name, id, or tag of the widget to show (optional)
103+ * @param {callback } [widgetClosedCallback] - called when the widget is closed (optional)
104+ */
105+ export function showSurvey ( nameIDorTag ?: string , widgetClosedCallback ?: WidgetCallback ) : void ;
106+
107+ /**
108+ * Shows the first available rating widget that meets the criteria.
109+ * @param {String } [nameIDorTag] - name, id, or tag of the widget to show (optional)
110+ * @param {callback } [widgetClosedCallback] - called when the widget is closed (optional)
111+ */
112+ export function showRating ( nameIDorTag ?: string , widgetClosedCallback ?: WidgetCallback ) : void ;
113+
114+
92115 /**
93116 * Get a list of available feedback widgets as an array of objects.
94117 * @param {FeedbackWidgetCallback } [onFinished] - returns (retrievedWidgets, error). This parameter is optional.
@@ -106,7 +129,7 @@ declare module "countly-sdk-react-native-bridge" {
106129 *
107130 * @return {ErrorObject } object {error: string or null}
108131 */
109- export function presentFeedbackWidget ( feedbackWidget : FeedbackWidget , closeButtonText : string , widgetShownCallback : callback , widgetClosedCallback : callback ) : ErrorObject ;
132+ export function presentFeedbackWidget ( feedbackWidget : FeedbackWidget , closeButtonText : string , widgetShownCallback : WidgetCallback , widgetClosedCallback : WidgetCallback ) : ErrorObject ;
110133
111134 /**
112135 * Get a feedback widget's data as an object.
@@ -176,6 +199,21 @@ declare module "countly-sdk-react-native-bridge" {
176199 export function cancelEvent ( eventName : string ) : void ;
177200 }
178201
202+ /**
203+ * Countly Content Module
204+ */
205+ namespace content {
206+ /**
207+ * Opt in user for the content fetching and updates
208+ */
209+ export function enterContentZone ( ) : void ;
210+
211+ /**
212+ * Opt out user from the content fetching and updates
213+ */
214+ export function exitContentZone ( ) : void ;
215+ }
216+
179217 /**
180218 * Initialize Countly
181219 *
@@ -387,7 +425,8 @@ declare module "countly-sdk-react-native-bridge" {
387425 export function disableLocation ( ) : string | void ;
388426
389427 /**
390- *
428+ * @deprecated use 'Countly.deviceId.getID' instead of 'Countly.getCurrentDeviceId'
429+ *
391430 * Get currently used device Id.
392431 * Should be called after Countly init
393432 *
@@ -396,6 +435,8 @@ declare module "countly-sdk-react-native-bridge" {
396435 export function getCurrentDeviceId ( ) : Promise < string > | string ;
397436
398437 /**
438+ * @deprecated use 'Countly.deviceId.getType' instead of 'Countly.getDeviceIDType'
439+ *
399440 * Get currently used device Id type.
400441 * Should be called after Countly init
401442 *
@@ -404,6 +445,8 @@ declare module "countly-sdk-react-native-bridge" {
404445 export function getDeviceIDType ( ) : Promise < DeviceIdType > | null ;
405446
406447 /**
448+ * @deprecated use 'Countly.deviceId.setID' instead of 'Countly.changeDeviceId'
449+ *
407450 * Change the current device id
408451 *
409452 * @param {string } newDeviceID id new device id
@@ -412,6 +455,34 @@ declare module "countly-sdk-react-native-bridge" {
412455 */
413456 export function changeDeviceId ( newDeviceID : string , onServer : boolean ) : string | void ;
414457
458+ namespace deviceId {
459+ /**
460+ *
461+ * Get currently used device ID.
462+ * Should be called after Countly init
463+ *
464+ * @returns {string | null } device ID or null
465+ */
466+ export function getID ( ) : Promise < string > | string ;
467+
468+ /**
469+ *
470+ * Get currently used device ID type.
471+ * Should be called after Countly init
472+ *
473+ * @return {DeviceIdType | null } deviceIdType or null
474+ */
475+ export function getType ( ) : Promise < DeviceIdType > | null ;
476+
477+ /**
478+ * Sets device ID according to the device ID Type.
479+ * If previous ID was Developer Supplied sets it without merge, otherwise with merge.
480+ *
481+ * @param {string } newDeviceID device ID to set
482+ */
483+ export function setID ( newDeviceID : string ) : void ;
484+ }
485+
415486 /**
416487 *
417488 * Set to "true" if you want HTTP POST to be used for all requests
@@ -1097,6 +1168,32 @@ declare module "countly-sdk-react-native-bridge" {
10971168}
10981169
10991170declare module "countly-sdk-react-native-bridge/CountlyConfig" {
1171+ interface experimental {
1172+ /**
1173+ * Enables previous name recording for views and events
1174+ */
1175+ enablePreviousNameRecording ( ) : this;
1176+
1177+ /**
1178+ * Enables app visibility tracking with events.
1179+ */
1180+ enableVisibilityTracking ( ) : this;
1181+ }
1182+
1183+ interface content {
1184+ /**
1185+ *
1186+ * @param zoneTimerInterval - the interval in seconds to check for new content
1187+ */
1188+ setZoneTimerInterval ( zoneTimerInterval : number ) : this;
1189+
1190+ /**
1191+ *
1192+ * @param callback - callback to be called when new content is available
1193+ */
1194+ setGlobalContentCallback ( callback : Function ) : this;
1195+ }
1196+
11001197 /**
11011198 *
11021199 * This class holds APM specific configurations to be used with
@@ -1189,6 +1286,16 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
11891286 */
11901287 sdkInternalLimits : CountlyConfigSDKInternalLimits ;
11911288
1289+ /**
1290+ * getter for experimental features
1291+ */
1292+ experimental : experimental ;
1293+
1294+ /**
1295+ * getter for content features
1296+ */
1297+ content : content ;
1298+
11921299 /**
11931300 * Method to set the server url
11941301 *
0 commit comments