UNPKG

bapig

Version:

Welcome to BAPIG, a powerful backend solution designed to streamline your development process. With over 40 built-in functionalities, BAPIG simplifies CRUD operations, facilitates authentication and encryption, handles communication tasks, and much more.

73 lines (72 loc) 2.64 kB
/// <reference types="node" /> /// <reference types="node" /> /// <reference types="node" /> import os from 'os'; import { encryption } from '../types'; /** * Convert a string or boolean value to a boolean. * @param value - The value to convert. * @returns The converted boolean value. */ export declare const convertToBoolean: (value: string | boolean) => boolean; /** * Convert a value to an object. * @param value - The value to convert. * @returns The converted object. */ export declare const convertToObject: (value: any) => object; /** * Convert a value to an array. * @param value - The value to convert. * @returns The converted array. */ export declare const convertToArray: (value: any) => any[]; export declare const env: NodeJS.ProcessEnv; export declare const hasEnableEncryption: boolean; export declare const apiKey: string; export declare const application: string; export declare const username: string; export declare const emailHostName: string; export declare const userEmailAddress: string; export declare const emailPortNumber: number; export declare const userEmailAddressPassword: string; export declare const webpushPublicKey: string; export declare const webpushPrivateKey: string; export declare const projectDirectory: string; export declare const staticFilesDirectory: string; export declare const uploadingDirectory: string; export declare const modelsDirectory: string; /** * Encrypt data using the configured algorithm and key. * @param data - The data to encrypt. * @returns The encrypted data. */ export declare function encrypt(data: any): encryption; /** * Decrypt data using the configured algorithm and key. * @param data - The encrypted data. * @returns The decrypted data. */ export declare function decrypt(data: encryption): any; /** * Decrypt data and parse it as a query string. * @param data - The encrypted data. * @returns The decrypted and parsed query parameters. */ export declare function decryptQuery(data: encryption): any; export declare const deviceUsername: string; export declare const deviceHostname: string; export declare const architecture: string; export declare const numberOfCPUs: number; export declare const address: NodeJS.Dict<os.NetworkInterfaceInfo[]>; /** * Generate a random initialization vector. * @returns The generated initialization vector. */ export declare const generateIV: () => string; /** * Generate a random encryption key. * @returns The generated encryption key. */ export declare const generateKey: () => string; export { print } from "./print";