yarn add @guadalavila/configuration
o
npm install --save @guadalavila/configuration
Se debe inicializar, enviando la configuración de Firebase.
import { configuration } from '@guadalavila/configuration';
const firebaseConfig = {
apiKey: 'apiKey',
authDomain: 'authDomain',
projectId: 'projectID',
storageBucket: 'storageBucket',
messagingSenderId: 'messagingSenderId',
appId: 'appId',
measurementId: 'measurementId',
};
configuration.initConfig(firebaseConfig);
Method | Return Type | Key |
---|---|---|
getUpdateExploreB2C() | Promise<string> |
UPDATE_EXPLORE_B2C |
getUpdateExploreB2B() | Promise<string> |
UPDATE_EXPLORE_B2B |
getUpdateAccount() | Promise<string> |
UPDATE_ACCOUNT |
getUpdateProfile() | Promise<string> |
UPDATE_PROFILE |
getUpdateSupport() | Promise<string> |
UPDATE_SUPPORT |
getTextSupport() | Promise<string> |
text_soporte |
getPortabilityEnabled() | Promise<boolean> |
portabilidad_enabled |
Devuelve el valor de UPDATE_EXPLORE_B2C
const value: string = await configuration.getUpdateExploreB2C(); // "20210813"
Devuelve el valor de UPDATE_EXPLORE_B2B
const value: string = await configuration.getUpdateExploreB2B(); // "20210813"
Devuelve el valor de UPDATE_ACCOUNT
const value: string = await configuration.getUpdateAccount(); // "20210810"
Devuelve el valor de UPDATE_PROFILE
const value: string = await configuration.getUpdateProfile(); // "20210811"
Devuelve el valor de UPDATE_SUPPORT
const value: string = await configuration.getUpdateSupport(); // "20210812"
Devuelve el valor de text_soporte
const value: string = await configuration.getTextSupport(); // "¿En qué te podemos ayudar hoy?"
Devuelve el valor de portabilidad_enabled
const value: boolean = await configuration.getUpdateExploreB2C(); // "true"