refactor(firebase-config): update wrapper to latest release 2.0.0 (#3027)

* Remove deprecated namespace parameter

* Update for cordova-plugin-firebase-config@2.0.0
This commit is contained in:
Adam Duren 2019-05-26 22:20:12 -07:00 committed by Daniel Sogl
parent c5a9d0d258
commit 7588eaf9fd

View File

@ -28,18 +28,38 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
plugin: 'cordova-plugin-firebase-config', plugin: 'cordova-plugin-firebase-config',
pluginRef: 'cordova.plugins.firebase.config', pluginRef: 'cordova.plugins.firebase.config',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-config', repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-config',
platforms: ['Android', 'iOS'] platforms: ['Android', 'iOS'],
}) })
@Injectable() @Injectable()
export class FirebaseConfig extends IonicNativePlugin { export class FirebaseConfig extends IonicNativePlugin {
/** /**
* Fetches remote config values with appropriate TTL and then activates them. * Starts fetching configs, adhering to the specified minimum fetch interval.
* *
* @param {number} ttlSeconds * @param {number} expirationDuration
* @returns {Promise<null>} * @returns {Promise<null>}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
update(ttlSeconds: number): Promise<null> { fetch(expirationDuration?: number): Promise<null> {
return;
}
/**
* Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect.
*
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
activate(): Promise<null> {
return;
}
/**
* Asynchronously fetches and then activates the fetched configs.
*
* @returns {Promise<null>}
*/
@Cordova({ sync: true })
fetchAndActivate(): Promise<null> {
return; return;
} }
@ -47,11 +67,10 @@ export class FirebaseConfig extends IonicNativePlugin {
* Fetches a boolean configuration value from RemoteConfig * Fetches a boolean configuration value from RemoteConfig
* *
* @param {string} key * @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
getBoolean(key: string, namespace?: string): Promise<boolean> { getBoolean(key: string): Promise<boolean> {
return; return;
} }
@ -59,11 +78,10 @@ export class FirebaseConfig extends IonicNativePlugin {
* Fetches a string configuration value from RemoteConfig * Fetches a string configuration value from RemoteConfig
* *
* @param {string} key * @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
getString(key: string, namespace?: string): Promise<string> { getString(key: string): Promise<string> {
return; return;
} }
@ -71,11 +89,10 @@ export class FirebaseConfig extends IonicNativePlugin {
* Fetches a numeric configuration value from RemoteConfig * Fetches a numeric configuration value from RemoteConfig
* *
* @param {string} key * @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
getNumber(key: string, namespace?: string): Promise<number> { getNumber(key: string): Promise<number> {
return; return;
} }
@ -83,11 +100,10 @@ export class FirebaseConfig extends IonicNativePlugin {
* Fetches an array of bytes configuration value from RemoteConfig * Fetches an array of bytes configuration value from RemoteConfig
* *
* @param {string} key * @param {string} key
* @param {string} [namespace]
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
getBytes(key: string, namespace?: string): Promise<any[]> { getBytes(key: string): Promise<any[]> {
return; return;
} }
} }