@devtion/actions
Version:
A set of actions and helpers for CLI commands
38 lines • 2.19 kB
TypeScript
import { FirebaseApp, FirebaseOptions } from "firebase/app";
import { Firestore } from "firebase/firestore";
import { Functions } from "firebase/functions";
import { AWSVariables, FirebaseServices } from "../types/index";
/**
* This method initialize a Firebase app if no other app has already been initialized.
* @param options <FirebaseOptions> - an object w/ every necessary Firebase option to init app.
* @returns <FirebaseApp> - the initialized Firebase app object.
*/
export declare const initializeFirebaseApp: (options: FirebaseOptions) => FirebaseApp;
/**
* This method returns the Firestore database instance associated to the given Firebase application.
* @param app <FirebaseApp> - the Firebase application.
* @returns <Firestore> - the Firebase Firestore associated to the application.
*/
export declare const getFirestoreDatabase: (app: FirebaseApp) => Firestore;
/**
* This method returns the Cloud Functions instance associated to the given Firebase application.
* @param app <FirebaseApp> - the Firebase application.
* @returns <Functions> - the Cloud Functions associated to the application.
*/
export declare const getFirebaseFunctions: (app: FirebaseApp) => Functions;
/**
* Retrieve the configuration variables for the AWS services (S3, EC2).
* @returns <AWSVariables> - the values of the AWS services configuration variables.
*/
export declare const getAWSVariables: () => AWSVariables;
/**
* Return the core Firebase services instances (App, Database, Functions).
* @param apiKey <string> - the API key specified in the application config.
* @param authDomain <string> - the authDomain string specified in the application config.
* @param projectId <string> - the projectId specified in the application config.
* @param messagingSenderId <string> - the messagingSenderId specified in the application config.
* @param appId <string> - the appId specified in the application config.
* @returns <Promise<FirebaseServices>>
*/
export declare const initializeFirebaseCoreServices: (apiKey: string, authDomain: string, projectId: string, messagingSenderId: string, appId: string) => Promise<FirebaseServices>;
//# sourceMappingURL=services.d.ts.map