<commit_before>import { Plugin, Cordova } from './plugin';
import { Observable } from 'rxjs/Observable';

/**
 * @name Firebase
 * @description
 * This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
 *
 * @usage
 * ```
 * import { Firebase } from 'ionic-native';
 *
 * Firebase.getToken()
 *   .then(token => console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device
 *   .catch(error => console.error('Error getting token', error));
 *
 * Firebase.onTokenRefresh()
 *   .subscribe((token: string) => console.log(`Got a new token ${token}`));
 *
 * ```
 */
@Plugin({
  pluginName: 'Firebase',
  plugin: 'cordova-plugin-firebase',
  pluginRef: 'FirebasePlugin',
  repo: 'https://github.com/arnesson/cordova-plugin-firebase',
  platforms: ['Android', 'iOS']
})
export class Firebase {

  /**
   * Get the device token
   * @return {Promise<any>}
   */
  @Cordova()
  static getToken(): Promise<any> { return; }

  /**
   * Get notified when a token is refreshed
   * @return {Observable<any>}
   */
  @Cordova({
    observable: true
  })
  static onTokenRefresh(): Observable<any> { return; }

  /**
   * Get notified when the user opens a notification
   * @return {Observable<any>}
   */
  @Cordova({
    observable: true
  })
  static onNotificationOpen(): Observable<any> { return; }

  /**
   * Grant permission to recieve push notifications
   * @return {Promise<any>}
   */
  @Cordova({
    platforms: ['iOS']
  })
  static grantPermission(): Promise<any> { return; }

    /**
   * Check permission to recieve push notifications
   * @return {Promise<any>}
   */
  @Cordova({
    platforms: ['iOS']
  })
  static hasPermission(): Promise<any> { return; }

  /**
   * Set icon badge number. Set to 0 to clear the badge.
   * @param badgeNumber {number}
   * @return {Promise<any>}
   */
  @Cordova()
  static setBadgeNumber(badgeNumber: number): Promise<any> { return; }

  /**
   * Get icon badge number
   * @return {Promise<any>}
   */
  @Cordova()
  static getBadgeNumber(): Promise<any> { return; }

  /**
   * Subscribe to a topic
   * @param topic {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static subscribe(topic: string): Promise<any> { return; }

  /**
   * Unsubscribe from a topic
   * @param topic {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static unsubscribe(topic: string): Promise<any> { return; }

  /**
   * Log an event using Analytics
   * @param type {string}
   * @param data {Object}
   * @return {Promise<any>}
   */
  @Cordova()
  static logEvent(type: string, data: any): Promise<any> { return; }

  /**
   * Set a user id for use in Analytics
   * @param userId {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static setUserId(userId: string): Promise<any> { return; }

  /**
   * Set a user property for use in Analytics
   * @param name {string}
   * @param value {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static setUserProperty(name: string, value: string): Promise<any> { return; }

  /**
   * Fetch Remote Config parameter values for your app
   * @param cacheExpirationSeconds<commit_msg>feat(firebase): add new setScreenName method<commit_after>import { Plugin, Cordova } from './plugin';
import { Observable } from 'rxjs/Observable';

/**
 * @name Firebase
 * @description
 * This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
 *
 * @usage
 * ```
 * import { Firebase } from 'ionic-native';
 *
 * Firebase.getToken()
 *   .then(token => console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device
 *   .catch(error => console.error('Error getting token', error));
 *
 * Firebase.onTokenRefresh()
 *   .subscribe((token: string) => console.log(`Got a new token ${token}`));
 *
 * ```
 */
@Plugin({
  pluginName: 'Firebase',
  plugin: 'cordova-plugin-firebase',
  pluginRef: 'FirebasePlugin',
  repo: 'https://github.com/arnesson/cordova-plugin-firebase',
  platforms: ['Android', 'iOS']
})
export class Firebase {

  /**
   * Get the device token
   * @return {Promise<any>}
   */
  @Cordova()
  static getToken(): Promise<any> { return; }

  /**
   * Get notified when a token is refreshed
   * @return {Observable<any>}
   */
  @Cordova({
    observable: true
  })
  static onTokenRefresh(): Observable<any> { return; }

  /**
   * Get notified when the user opens a notification
   * @return {Observable<any>}
   */
  @Cordova({
    observable: true
  })
  static onNotificationOpen(): Observable<any> { return; }

  /**
   * Grant permission to recieve push notifications
   * @return {Promise<any>}
   */
  @Cordova({
    platforms: ['iOS']
  })
  static grantPermission(): Promise<any> { return; }

    /**
   * Check permission to recieve push notifications
   * @return {Promise<any>}
   */
  @Cordova({
    platforms: ['iOS']
  })
  static hasPermission(): Promise<any> { return; }

  /**
   * Set icon badge number. Set to 0 to clear the badge.
   * @param badgeNumber {number}
   * @return {Promise<any>}
   */
  @Cordova()
  static setBadgeNumber(badgeNumber: number): Promise<any> { return; }

  /**
   * Get icon badge number
   * @return {Promise<any>}
   */
  @Cordova()
  static getBadgeNumber(): Promise<any> { return; }

  /**
   * Subscribe to a topic
   * @param topic {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static subscribe(topic: string): Promise<any> { return; }

  /**
   * Unsubscribe from a topic
   * @param topic {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static unsubscribe(topic: string): Promise<any> { return; }

  /**
   * Log an event using Analytics
   * @param type {string}
   * @param data {Object}
   * @return {Promise<any>}
   */
  @Cordova()
  static logEvent(type: string, data: any): Promise<any> { return; }

  /**
   * Set the name of the current screen in Analytics
   * @param name {string} Screen name
   * @return {Promise<any>}
   */
  @Cordova()
  static setScreenName(name: string): Promise<any> { return; }

  /**
   * Set a user id for use in Analytics
   * @param userId {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static setUserId(userId: string): Promise<any> { return; }

  /**
   * Set a user property for use in Analytics
   * @param name {string}
   * @param value {string}
   * @return {Promise<any>}
   */
  @Cordova()
  static setUserProperty(name: string, value: string): Promise<any> { return; }

  /**
   * Fetch Remote Config parameter values for your app
   * @param cacheExpirationSeconds
{'fraction_non_alphanumeric': 0.1512022422186163, 'fraction_numerical': 0.0008850862959138516, 'mean_word_length': 3.315722469764481, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 59, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '83030', 'n_tokens_mistral': 2219, 'n_tokens_neox': 2166, 'n_words': 627}