@@ -15,120 +15,70 @@ import {
1515 BranchInitEvent ,
1616} from './definitions' ;
1717
18- export class BranchDeepLinksWeb
19- extends WebPlugin
20- implements BranchDeepLinksPlugin
21- {
18+ export class BranchDeepLinksWeb extends WebPlugin implements BranchDeepLinksPlugin {
2219 constructor ( ) {
23- super ( {
24- name : 'BranchDeepLinks' ,
25- platforms : [ 'web' ] ,
26- } ) ;
20+ super ( ) ;
2721 }
2822
2923 handleUrl ( _ : BranchUrlParams ) : Promise < void > {
30- return Promise . reject (
31- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
32- ) ;
24+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
3325 }
3426
3527 generateShortUrl ( _ : BranchShortUrlParams ) : Promise < BranchShortUrlResponse > {
36- return Promise . reject (
37- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
38- ) ;
28+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
3929 }
4030
4131 showShareSheet ( _ : BranchShowShareSheetParams ) : Promise < void > {
42- return Promise . reject (
43- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
44- ) ;
32+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
4533 }
4634
4735 getStandardEvents ( ) : Promise < { [ index : number ] : string } > {
48- return Promise . reject (
49- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
50- ) ;
36+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
5137 }
5238
53- sendBranchEvent ( _ : {
54- eventName : string ;
55- metaData : { [ key : string ] : any } ;
56- } ) : Promise < void > {
57- return Promise . reject (
58- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
59- ) ;
39+ sendBranchEvent ( _ : { eventName : string ; metaData : { [ key : string ] : any } } ) : Promise < void > {
40+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
6041 }
6142
6243 handleATTAuthorizationStatus ( _ : { status : number } ) : Promise < void > {
63- return Promise . reject (
64- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
65- ) ;
44+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
6645 }
6746
6847 disableTracking ( _ : { isEnabled : false } ) : Promise < BranchTrackingResponse > {
69- return Promise . reject (
70- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
71- ) ;
48+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
7249 }
7350
74- setIdentity ( _ : {
75- newIdentity : string ;
76- } ) : Promise < BranchReferringParamsResponse > {
77- return Promise . reject (
78- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
79- ) ;
51+ setIdentity ( _ : { newIdentity : string } ) : Promise < BranchReferringParamsResponse > {
52+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
8053 }
8154
8255 logout ( ) : Promise < BranchLoggedOutResponse > {
83- return Promise . reject (
84- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
85- ) ;
56+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
8657 }
8758
8859 getBranchQRCode ( _ : BranchQRCodeParams ) : Promise < BranchQRCodeResponse > {
89- return Promise . reject (
90- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
91- ) ;
60+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
9261 }
9362
9463 getLatestReferringParams ( ) : Promise < BranchReferringParamsResponse > {
95- return Promise . reject (
96- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
97- ) ;
64+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
9865 }
9966
10067 getFirstReferringParams ( ) : Promise < BranchReferringParamsResponse > {
101- return Promise . reject (
102- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
103- ) ;
68+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
10469 }
10570
10671 setDMAParamsForEEA ( _ : BranchDMAParams ) : Promise < void > {
107- return Promise . reject (
108- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
109- ) ;
72+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
11073 }
11174
11275 setConsumerProtectionAttributionLevel ( _ : { level : string } ) : Promise < void > {
113- return Promise . reject (
114- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
115- ) ;
116- }
117-
118- addListener (
119- _eventName : 'init' ,
120- _listenerFunc : ( event : BranchInitEvent ) => void ,
121- ) : Promise < PluginListenerHandle > ;
122- addListener (
123- _eventName : 'initError' ,
124- _listenerFunc : ( error : any ) => void ,
125- ) : Promise < PluginListenerHandle > ;
126- addListener (
127- _eventName : string ,
128- _listenerFunc : ( event : any ) => void ,
129- ) : Promise < PluginListenerHandle > {
130- return Promise . reject (
131- new Error ( 'BranchDeepLinks does not have web implementation' ) ,
132- ) ;
76+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
77+ }
78+
79+ addListener ( _eventName : 'init' , _listenerFunc : ( event : BranchInitEvent ) => void ) : Promise < PluginListenerHandle > ;
80+ addListener ( _eventName : 'initError' , _listenerFunc : ( error : any ) => void ) : Promise < PluginListenerHandle > ;
81+ addListener ( _eventName : string , _listenerFunc : ( event : any ) => void ) : Promise < PluginListenerHandle > {
82+ return Promise . reject ( new Error ( 'BranchDeepLinks does not have web implementation' ) ) ;
13383 }
13484}
0 commit comments