import { Facebook } from '@ionic-native/facebook' ; export interface FacebookLoginResponse { status : string ; authResponse : { session_key : boolean ; accessToken : string ; expiresIn : number ; sig : string ; secret : string ; userID : string ; } ; } export class FacebookMock extends Facebook { EVENTS : { EVENT_NAME_ACTIVATED_APP : 'fb_mobile_activate_app' ; EVENT_NAME_DEACTIVATED_APP : 'fb_mobile_deactivate_app' ; EVENT_NAME_SESSION_INTERRUPTIONS : 'fb_mobile_app_interruptions' ; EVENT_NAME_TIME_BETWEEN_SESSIONS : 'fb_mobile_time_between_sessions' ; EVENT_NAME_COMPLETED_REGISTRATION : 'fb_mobile_complete_registration' ; EVENT_NAME_VIEWED_CONTENT : 'fb_mobile_content_view' ; EVENT_NAME_SEARCHED : 'fb_mobile_search' ; EVENT_NAME_RATED : 'fb_mobile_rate' ; EVENT_NAME_COMPLETED_TUTORIAL : 'fb_mobile_tutorial_completion' ; EVENT_NAME_PUSH_TOKEN_OBTAINED : 'fb_mobile_obtain_push_token' ; EVENT_NAME_ADDED_TO_CART : 'fb_mobile_add_to_cart' ; EVENT_NAME_ADDED_TO_WISHLIST : 'fb_mobile_add_to_wishlist' ; EVENT_NAME_INITIATED_CHECKOUT : 'fb_mobile_initiated_checkout' ; EVENT_NAME_ADDED_PAYMENT_INFO : 'fb_mobile_add_payment_info' ; EVENT_NAME_PURCHASED : 'fb_mobile_purchase' ; EVENT_NAME_ACHIEVED_LEVEL : 'fb_mobile_level_achieved' ; EVENT_NAME_UNLOCKED_ACHIEVEMENT : 'fb_mobile_achievement_unlocked' ; EVENT_NAME_SPENT_CREDITS : 'fb_mobile_spent_credits' ; EVENT_PARAM_CURRENCY : 'fb_currency' ; EVENT_PARAM_REGISTRATION_METHOD : 'fb_registration_method' ; EVENT_PARAM_CONTENT_TYPE : 'fb_content_type' ; EVENT_PARAM_CONTENT_ID : 'fb_content_id' ; EVENT_PARAM_SEARCH_STRING : 'fb_search_string' ; EVENT_PARAM_SUCCESS : 'fb_success' ; EVENT_PARAM_MAX_RATING_VALUE : 'fb_max_rating_value' ; EVENT_PARAM_PAYMENT_INFO_AVAILABLE : 'fb_payment_info_available' ; EVENT_PARAM_NUM_ITEMS : 'fb_num_items' ; EVENT_PARAM_LEVEL : 'fb_level' ; EVENT_PARAM_DESCRIPTION : 'fb_description' ; EVENT_PARAM_SOURCE_APPLICATION : 'fb_mobile_launch_source' ; EVENT_PARAM_VALUE_YES : '1' ; EVENT_PARAM_VALUE_NO : '0' ; } ; param { number } appId param { string } version returns { Promise < any > } browserInit ( appId , version ? ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { string [ ] } permissions returns { Promise < FacebookLoginResponse > } login ( permissions ) { let response ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } logout ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } getLoginStatus ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < string > } getAccessToken ( ) { return new Promise ( ( resolve , reject ) => { resolve ( '' ) ; } ) ; } ; param { Object } options returns { Promise < any > } showDialog ( options ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { string } requestPath param { string [ ] } permissions returns { Promise < any > } api ( requestPath , permissions ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { string } name param { Object } params param { number } valueToSum returns { Promise < any > } logEvent ( name , params ? , valueToSum ? ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { number } value param { string } currency returns { Promise < any > } logPurchase ( value , currency ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param options param { string } options . url param { string } options . picture returns { Promise < any > } appInvite ( options ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }