@smartface/plugin-firebase
Version:
Smartface Firebase Plugin for Smartface Native Framework
152 lines • 4.21 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var Auth_1 = __importDefault(require("../Auth"));
// @ts-ignore
var androidconfig_1 = __importDefault(require("@smartface/native/util/Android/androidconfig"));
/**
* @classdesc App
* @class
*/
var App = /** @class */ (function () {
function App(nativeFirebaseApp) {
var _this = this;
this.android = {};
/**
* Gets the Auth service for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.auth = function () {
if (!androidconfig_1.default.isEmulator) {
return new Auth_1.default(_this);
}
};
/**
* Gets the Name for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getName = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getName();
}
};
/**
* Gets the getApiKey for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getApiKey = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getOptions().getApiKey();
}
};
/**
* Gets the getApplicationId for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getApplicationId = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getOptions().getApplicationId();
}
};
/**
* Gets the getDatabaseUrl for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getDatabaseUrl = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getOptions().getDatabaseUrl();
}
};
/**
* Gets the getGcmSenderId for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getGcmSenderId = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getOptions().getGcmSenderId();
}
};
/**
* Gets the getStorageBucket for the current app.
*
* @method
* @android
* @ios
* @since 0.1
*/
this.getStorageBucket = function () {
if (!androidconfig_1.default.isEmulator) {
return _this.nativeObject.getOptions().getStorageBucket();
}
};
this.nativeObject = nativeFirebaseApp;
this.ios = {
/**-
* Delete current app,
*
* @method delete
* @ios
* @since 0.1
*/
delete: function () { },
/**
* Gets the getBundleId for the current app.
*
* @method getBundleId
* @return {String}
* @ios
* @since 0.1
*/
getBundleId: function () { },
/**
* Gets the getClientId for the current app.
*
* @method getClientId
* @return {String}
* @ios
* @since 0.1
*/
getClientId: function () { },
/**
* Gets the getTrackingId for the current app.
*
* @method getTrackingId
* @return {String}
* @ios
* @since 0.1
*/
getTrackingId: function () { }
};
}
App.ios = {};
return App;
}());
exports.default = App;
module.exports = App;
//# sourceMappingURL=app-Android.js.map