@@ -188,24 +188,12 @@ interface RNChannelIO extends Pick<ChannelModuleType,
188
188
| 'resetPage'
189
189
| 'setAppearance'
190
190
| 'hidePopup' > {
191
- show : ( animated : boolean ) => void ;
192
- hide : ( animated : boolean ) => void ;
193
- open : ( animated : boolean ) => void ;
194
- close : ( animated : boolean ) => void ;
195
- handlePushNotification : ( userInfo : Record < string , any > ) => Promise < void > ;
196
- onChangeBadge : ( cb ?: ( unread : number , alert : number ) => void ) => void ;
197
191
onBadgeChanged : ( cb ?: ( unread : number , alert : number ) => void ) => void ;
198
- onReceivePush : ( cb ?: ( popup : PopupData ) => void ) => void ;
199
192
onPopupDataReceived : ( cb ?: ( popup : PopupData ) => void ) => void ;
200
- onClickChatLink : ( handle : boolean , cb ?: ( url : string ) => void ) => void ;
201
193
onUrlClicked : ( cb ?: ( url : string , next : ( ) => void ) => void ) => void ;
202
- onChangeProfile : ( cb ?: ( ) => void ) => void ;
203
- onProfileChanged : ( cb ?: ( data : Record < string , any > ) => void ) => void ;
204
194
onFollowUpChanged : ( cb ?: ( data : Record < string , any > ) => void ) => void ;
205
195
onPushNotificationClicked : ( cb ?: ( chatId : string , next : ( ) => void ) => void ) => void ;
206
- willShowMessenger : ( cb ?: ( ) => void ) => void ;
207
196
onShowMessenger : ( cb ?: ( ) => void ) => void ;
208
- willHideMessenger : ( cb ?: ( ) => void ) => void ;
209
197
onHideMessenger : ( cb ?: ( ) => void ) => void ;
210
198
onChatCreated : ( cb ?: ( chatId : string ) => void ) => void ;
211
199
}
@@ -275,57 +263,21 @@ export const ChannelIO: RNChannelIO = {
275
263
ChannelModule . shutdown ( ) ;
276
264
} ,
277
265
278
- /**
279
- * @deprecated
280
- * Show `ChannelIO` button
281
- * @param {Boolean } aniamted Animate the launcher if true
282
- */
283
- show : ( animated : boolean ) => {
284
- console . log ( 'ChannelIO' , 'ChannelIO.show(animated) is deprecated. Please use ChannelIO.showChannelButton()' )
285
- ChannelModule . showChannelButton ( )
286
- } ,
287
266
/**
288
267
* Show `ChannelIO` button
289
268
*/
290
269
showChannelButton : ( ) => ChannelModule . showChannelButton ( ) ,
291
270
292
- /**
293
- * @deprecated
294
- * Hide `ChannelIO` button
295
- * @param {Boolean } aniamted Animate the launcher if true
296
- */
297
- hide : ( animated : boolean ) => {
298
- console . log ( 'ChannelIO' , 'ChannelIO.hide(animated) is deprecated. Please use ChannelIO.hideChannelButton()' )
299
- ChannelModule . hideChannelButton ( )
300
- } ,
301
271
/**
302
272
* Hide `ChannelIO` button
303
273
*/
304
274
hideChannelButton : ( ) => ChannelModule . hideChannelButton ( ) ,
305
275
306
- /**
307
- * @deprecated
308
- * Open `ChannelIO` messenger
309
- * @param {Boolean } aniamted Animate messenger if true
310
- */
311
- open : ( animated : boolean ) => {
312
- console . log ( 'ChannelIO' , 'ChannelIO.open(animated) is deprecated. Please use ChannelIO.showMessenger()' )
313
- ChannelModule . showMessenger ( )
314
- } ,
315
276
/**
316
277
* Show `ChannelIO` messenger
317
278
*/
318
279
showMessenger : ( ) => ChannelModule . showMessenger ( ) ,
319
280
320
- /**
321
- * @deprecated
322
- * Close `ChannelIO` messenger
323
- * @param {Boolean } Animate messenger if true
324
- */
325
- close : ( animated : boolean ) => {
326
- console . log ( 'ChannelIO' , 'ChannelIO.close(animated) is deprecated. Please use ChannelIO.hideMessenger()' )
327
- ChannelModule . hideMessenger ( )
328
- } ,
329
281
/**
330
282
* Hide `ChannelIO` messenger
331
283
*/
@@ -418,15 +370,6 @@ export const ChannelIO: RNChannelIO = {
418
370
*/
419
371
isChannelPushNotification : async ( userInfo : Record < string , any > ) => ChannelModule . isChannelPushNotification ( userInfo ) ,
420
372
421
- /**
422
- * @deprecated
423
- * Handle `ChannelIO` push notification
424
- * @param {Object } userInfo userInfo part from push data
425
- */
426
- handlePushNotification : async ( userInfo : Record < string , any > ) => {
427
- console . log ( 'ChannelIO' , 'ChannelIO.handlePushNotification(userInfo) is deprecated. Please use ChannelIO.receivePushNotification(userInfo)' )
428
- ChannelModule . receivePushNotification ( userInfo )
429
- } ,
430
373
/**
431
374
* Receive `ChannelIO` push notification
432
375
* @param {Object } userInfo userInfo part from push data
@@ -483,23 +426,6 @@ export const ChannelIO: RNChannelIO = {
483
426
*/
484
427
hidePopup : ( ) => ChannelModule . hidePopup ( ) ,
485
428
486
- /**
487
- * @deprecated
488
- * Event listener that triggers when badge count has been changed
489
- * @param {Function } cb a callback function that takes a integer badge count as parameter
490
- */
491
- onChangeBadge : ( cb ?: ( unread : number , alert : number ) => void ) => {
492
- console . log ( 'ChannelIO' , 'ChannelIO.onChangeBadge(cb) is deprecated. Please use ChannelIO.onBadgeChanged(cb)' )
493
- if ( cb ) {
494
- const subscription = ChannelEventEmitter ?. addListener ( ChannelModule . Event . ON_BADGE_CHANGED , ( data ) => {
495
- cb ( data . unread , data . alert ) ;
496
- } ) ;
497
- replaceSubscriber ( ChannelModule . Event . ON_BADGE_CHANGED , subscription ) ;
498
- } else {
499
- replaceSubscriber ( ChannelModule . Event . ON_BADGE_CHANGED , null ) ;
500
- }
501
-
502
- } ,
503
429
/**
504
430
* Event listener that triggers when badge count has been changed
505
431
* @param {Function } cb a callback function that takes a integer badge count as parameter
@@ -515,22 +441,6 @@ export const ChannelIO: RNChannelIO = {
515
441
}
516
442
} ,
517
443
518
- /**
519
- * @deprecated
520
- * Event listener that triggers when in-app popup has been arrived
521
- * @param {Function } cb a callback function that takes a object popup data as parameter
522
- */
523
- onReceivePush : ( cb ?: ( popup : PopupData ) => void ) => {
524
- console . log ( 'ChannelIO' , 'ChannelIO.onReceivePush(cb) is deprecated. Please use ChannelIO.onPopupDataReceived(cb)' )
525
- if ( cb ) {
526
- const subscription = ChannelEventEmitter ?. addListener ( ChannelModule . Event . ON_POPUP_DATA_RECEIVED , ( data ) => {
527
- cb ( data . popup ) ;
528
- } ) ;
529
- replaceSubscriber ( ChannelModule . Event . ON_POPUP_DATA_RECEIVED , subscription ) ;
530
- } else {
531
- replaceSubscriber ( ChannelModule . Event . ON_POPUP_DATA_RECEIVED , null ) ;
532
- }
533
- } ,
534
444
/**
535
445
* Event listener that triggers when in-app popup has been arrived
536
446
* @param {Function } cb a callback function that takes a object popup data as parameter
@@ -546,25 +456,6 @@ export const ChannelIO: RNChannelIO = {
546
456
}
547
457
} ,
548
458
549
- /**
550
- * @deprecated
551
- * Event listener that triggers when a link has been clicked by a user
552
- * @param {Boolean } handle True if you want to handle a link, otherwise false
553
- * @param {Function } cb a callback function that takes a string url as parameter
554
- */
555
- onClickChatLink : ( handle : boolean , cb ?: ( url : string ) => void ) => {
556
- console . log ( 'ChannelIO' , 'ChannelIO.onClickChatLink(handle, cb) is deprecated. Please use ChannelIO.onUrlClicked(cb)' )
557
- if ( cb ) {
558
- replaceSubscriber ( ChannelModule . Event . ON_URL_CLICKED , ( data ) => {
559
- if ( ! handle ) {
560
- ChannelModule . handleUrlClicked ( data . url ) ;
561
- }
562
- cb ( data . url ) ;
563
- } ) ;
564
- } else {
565
- replaceSubscriber ( ChannelModule . Event . ON_URL_CLICKED , null ) ;
566
- }
567
- } ,
568
459
/**
569
460
* Event listener that triggers when a url has been clicked by a user
570
461
* @param {Function } cb a callback function that takes a string url as parameter
@@ -580,23 +471,7 @@ export const ChannelIO: RNChannelIO = {
580
471
} else {
581
472
replaceSubscriber ( ChannelModule . Event . ON_URL_CLICKED , null ) ;
582
473
}
583
- } ,
584
-
585
- /**
586
- * @deprecated
587
- * 'onChangeProfile' is deprecated. Please use 'onFollowUpChanged'.
588
- */
589
- onChangeProfile : ( cb ?: ( ) => void ) => {
590
- console . warn ( "'onChangeProfile' is deprecated. Please use 'onFollowUpChanged'." )
591
- } ,
592
-
593
- /**
594
- * @deprecated
595
- * 'onProfileChanged' is deprecated. Please use 'onFollowUpChanged'.
596
- */
597
- onProfileChanged : ( cb ?: ( data : Record < string , any > ) => void ) => {
598
- console . warn ( "'onProfileChanged' is deprecated. Please use 'onFollowUpChanged'." )
599
- } ,
474
+ } ,
600
475
601
476
/**
602
477
* Event listener that triggers when guest profile is updated
@@ -638,20 +513,6 @@ export const ChannelIO: RNChannelIO = {
638
513
}
639
514
} ,
640
515
641
- /**
642
- * @deprecated
643
- * Event listener that triggers when `ChannelIO` messenger is about to display
644
- * @param {Function } cb a callback function
645
- */
646
- willShowMessenger : ( cb ?: ( ) => void ) => {
647
- console . log ( 'ChannelIO' , 'ChannelIO.willShowMessenger(cb) is deprecated. Please use ChannelIO.onShowMessenger(cb)' )
648
- if ( cb ) {
649
- const subscription = ChannelEventEmitter ?. addListener ( ChannelModule . Event . ON_SHOW_MESSENGER , cb ) ;
650
- replaceSubscriber ( ChannelModule . Event . ON_SHOW_MESSENGER , subscription ) ;
651
- } else {
652
- replaceSubscriber ( ChannelModule . Event . ON_SHOW_MESSENGER , null ) ;
653
- }
654
- } ,
655
516
/**
656
517
* Event listener that triggers when `ChannelIO` messenger is about to display
657
518
* @param {Function } cb a callback function
@@ -665,20 +526,6 @@ export const ChannelIO: RNChannelIO = {
665
526
}
666
527
} ,
667
528
668
- /**
669
- * @deprecated
670
- * Event listener that triggers when `ChannelIO` messenger is about to dismiss
671
- * @param {Function } cb a callback function
672
- */
673
- willHideMessenger : ( cb ?: ( ) => void ) => {
674
- console . log ( 'ChannelIO' , 'ChannelIO.willHideMessenger(cb) is deprecated. Please use ChannelIO.onHideMessenger(cb)' )
675
- if ( cb ) {
676
- const subscription = ChannelEventEmitter ?. addListener ( ChannelModule . Event . ON_HIDE_MESSENGER , cb ) ;
677
- replaceSubscriber ( ChannelModule . Event . ON_HIDE_MESSENGER , subscription ) ;
678
- } else {
679
- replaceSubscriber ( ChannelModule . Event . ON_HIDE_MESSENGER , null ) ;
680
- }
681
- } ,
682
529
/**
683
530
* Event listener that triggers when `ChannelIO` messenger is about to dismiss
684
531
* @param {Function } cb a callback function
0 commit comments