react-native-firebase/lib/modules/iid/index.js

33 lines
672 B
JavaScript
Raw Normal View History

/**
* @flow
* Instance ID representation wrapper
*/
import ModuleBase from '../../utils/ModuleBase';
import { getNativeModule } from '../../utils/native';
import type App from '../core/app';
export const MODULE_NAME = 'RNFirebaseInstanceId';
2018-03-23 14:59:00 +00:00
export const NAMESPACE = 'iid';
export default class InstanceId extends ModuleBase {
constructor(app: App) {
super(app, {
hasShards: false,
moduleName: MODULE_NAME,
multiApp: false,
namespace: NAMESPACE,
});
}
delete(): Promise<void> {
return getNativeModule(this).delete();
}
get(): Promise<string> {
return getNativeModule(this).get();
}
}
export const statics = {};