@@ -402,7 +402,8 @@ declare module "countly-sdk-react-native-bridge" {
402402 export function disableLocation ( ) : string | void ;
403403
404404 /**
405- *
405+ * @deprecated use 'Countly.deviceId.getID' instead of 'Countly.getCurrentDeviceId'
406+ *
406407 * Get currently used device Id.
407408 * Should be called after Countly init
408409 *
@@ -411,6 +412,8 @@ declare module "countly-sdk-react-native-bridge" {
411412 export function getCurrentDeviceId ( ) : Promise < string > | string ;
412413
413414 /**
415+ * @deprecated use 'Countly.deviceId.getType' instead of 'Countly.getDeviceIDType'
416+ *
414417 * Get currently used device Id type.
415418 * Should be called after Countly init
416419 *
@@ -419,6 +422,8 @@ declare module "countly-sdk-react-native-bridge" {
419422 export function getDeviceIDType ( ) : Promise < DeviceIdType > | null ;
420423
421424 /**
425+ * @deprecated use 'Countly.deviceId.setID' instead of 'Countly.changeDeviceId'
426+ *
422427 * Change the current device id
423428 *
424429 * @param {string } newDeviceID id new device id
@@ -427,6 +432,34 @@ declare module "countly-sdk-react-native-bridge" {
427432 */
428433 export function changeDeviceId ( newDeviceID : string , onServer : boolean ) : string | void ;
429434
435+ namespace deviceId {
436+ /**
437+ *
438+ * Get currently used device ID.
439+ * Should be called after Countly init
440+ *
441+ * @returns {string | null } device ID or null
442+ */
443+ export function getID ( ) : Promise < string > | string ;
444+
445+ /**
446+ *
447+ * Get currently used device ID type.
448+ * Should be called after Countly init
449+ *
450+ * @return {DeviceIdType | null } deviceIdType or null
451+ */
452+ export function getType ( ) : Promise < DeviceIdType > | null ;
453+
454+ /**
455+ * Sets device ID according to the device ID Type.
456+ * If previous ID was Developer Supplied sets it without merge, otherwise with merge.
457+ *
458+ * @param {string } newDeviceID device ID to set
459+ */
460+ export function setID ( newDeviceID : string ) : void ;
461+ }
462+
430463 /**
431464 *
432465 * Set to "true" if you want HTTP POST to be used for all requests
0 commit comments