tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
52 lines • 2.31 kB
text/typescript
export default firebaseObject;
declare namespace firebaseObject {
/**
* Retrieves a Firebase app by its identifier.
*
* @param {string|number} value - The app identifier to retrieve.
* @returns {Object|null} The Firebase app or `null` if not found.
*/
export function get(value: string | number): Object | null;
export { AuthSystem as cookieSession };
export { domainRedirect };
export { database };
export { dbEscape as escape };
export { mySQL as mysql };
export { getDBAsync };
export { getDBValue };
export { getDBData };
export { transactionDBAsync };
export { databaseEscape };
export let logger: Record<string, any>;
export { isEmulator };
/**
* Starts Firebase modules based on the provided configuration.
* Initializes services such as Database, Auth, Firestore, etc.
*
* @param {string} value - The Firebase app ID.
* @param {Record<string, any>} item - Configuration for the Firebase app and services to initialize.
* @returns {boolean} `true` if the modules were successfully started, `false` otherwise.
*/
export function startModule(value: string, item: Record<string, any>): boolean;
/**
* Starts the Firebase app and initializes required services.
*
* @param {Record<string, any>} admin - The Firebase Admin SDK.
* @param {Record<string, any>} item - Configuration containing app details and options.
* @param {Record<string, any>} data - Additional data to initialize the app.
* @throws {Error} Throws an error if the Firebase file is not found or if the app ID is missing.
*/
export function start(admin: Record<string, any>, item: Record<string, any>, data: Record<string, any>): void;
}
import AuthSystem from './cookieSession.mjs';
import domainRedirect from './domainRedirect.mjs';
import database from './database/index.mjs';
import * as dbEscape from './escape.mjs';
import mySQL from './mySQL.mjs';
import getDBAsync from './getDBAsync.mjs';
import getDBValue from './getDBValue.mjs';
import getDBData from './getDBData.mjs';
import transactionDBAsync from './transactionDBAsync.mjs';
import databaseEscape from './databaseEscape.mjs';
import isEmulator from './isEmulator.mjs';
//# sourceMappingURL=index.d.mts.map