export declare const NO_ADMIN_EMAIL = -400100; export declare const TEST = -11; export declare const UNKNOWN = -12; export declare const PERMISSION_DENIED_ADMIN_ONLY = -10; export declare const NO_EMAIL = -50; export declare const NO_PASSWORD = -51; export declare const NO_NAME = -52; export declare const NO_UID = -53; export declare const UID_TOO_LONG = -54; export declare const UID_CANNOT_CONTAIN_SLASH = -55; export declare const TYPE_CHECK = -40010; export declare const NO_DOCUMENT_ID = -40025; export declare const DOCUMENT_ID_TOO_LONG = -40026; export declare const DOCUMENT_ID_CANNOT_CONTAIN_SLASH = -40027; export declare const WRONG_GENDER = -40061; export declare const WRONG_ROUTE = -40060; export declare const EMPTY_ROUTE = -40063; export declare const WRONG_METHOD = -40064; export declare const ANONYMOUS_CANNOT_EDIT_PROFILE = -40070; export declare const USER_ID_NOT_EXISTS_IN_USER_COLLECTION = -40020; export declare const MUST_BE_A_NUMBER = -400204; export declare const MUST_BE_AN_ARRAY = -400205; export declare const MUST_BE_AN_OBJECT = -400206; export declare const MUST_BE_A_BOOLEAN = -400207; export declare const MUST_BE_A_STRING = -400208; export declare const DOCUMENT_ID_DOES_NOT_EXISTS_FOR_GET = -40004; export declare const DOCUMENT_ID_DOES_NOT_EXISTS_FOR_GET_IN_TRANSACTION = -40006; export declare const DOCUMENT_ID_DOES_NOT_EXISTS_FOR_UPDATE = -40008; export declare const USER_NOT_LOGIN = -400210; export declare const NO_USER_DOCUMENT_ID = -400220; export declare const FAILED_TO_VERIFY_USER = -400230; export declare const FAILED_TO_CREATE_ANONYMOUS = -400232; export declare const SYSTEM_ALREADY_INSTALLED = -400240; export declare const COLLECTION_IS_NOT_SET = -400250; export declare const EMPTY_POST_BODY = -40301; export declare const NO_POST_ID = -40353; export declare const POST_ID_TOO_LONG = -40354; export declare const POST_ID_CANNOT_CONTAIN_SLASH = -40355; export declare const POST_ALREADY_EXISTS = -40357; export declare const ANONYMOUS_PASSWORD_IS_EMPTY = -40356; export declare const ANONYMOUS_WRONG_PASSWORD = -40357; export declare const NOT_YOUR_POST = -40358; export declare const NOT_OWNED_BY_ANONYMOUS = -40359; export declare const CATEGORY_ID_CANNOT_CONTAIN_SLASH = -40445; export declare const ANONYMOUS_CANNOT_CREATE_CATEGORY = -40449; export declare const CATEGORY_ALREADY_EXISTS = -40450; export declare const CATEGORY_ID_TOO_LONG = -40454; export declare const NO_CATEGORY_ID = -40460; export declare const WRONG_CATEGORY_ID = -40462; export declare const POST_CATEGORY_DOES_NOT_EXIST = -40464; export declare const FIREBASE_CODE = -40900; export declare const FIREBASE_AUTH_UID_ALREADY_EXISTS = -40901; export declare const FIREBASE_ID_TOKEN_EXPIRED = -40902; export declare const FIREBASE_FAILED_TO_DECODE_ID_TOKEN = -40905; export declare const FIREBASE_INVALID_PASSWORD = -40906; export declare const FIREBASE_DO_NOT_ACCEPT_UNDEFINED = -40907; export declare const SYSTEM_NOT_INSTALLED = -400501; export declare const DOCUMENT_ID_DOES_NOT_EXISTS_FOR_GET_SETTINGS_DOCUMENT = -400502; /** * * * @since 2018-02-26. `code` must be a number and it MUST be less than 0. * @desc `code` must be a number less than 0. * @desc When `Firestore` throws error, the error code is usually bigger than 0 and sometimes it is evena string like `auth/uid-already-exists`. * We will convert it into our ERROR CODE. * * @desc So, if the `code` is number and less than 0, then it's an error. otherwise. it's not an error. * * if `code` is one of below, it's not an error. * - a falsy value * - string * - number that is bigger than or equal to 0 * * @desc When `BACKEND_ERROR_OBJECT` is discussed, it means `Backend Error Object`. * While `Error Object` is stated, it means an Error Object that is any kind of error object. * - It can be a `Backend Error Object` or `Firebase Error Object` or `Javascript Error Object`. * * */ export interface BACKEND_ERROR_OBJECT { code: number; message?: string; } /** * Returns true if the input is an Error Object. * @desc It may be a Firebase erorr object or Simple Javascript error objct. * - Meaning, if `code` property exists and none falsy value, it returns true. * - This conflicts the concept of `BACKEND_ERROR_OBJECT`. * - the code of `BACKEND_ERROR_OBJECT` object can only hold number that is less than 0. * - while the code of Error Object can hold any value. number or string. * * @param o any value. May be an Error Object. * */ export declare function isErrorObject(o: any): boolean; /** * * Returns `BACKEND_ERROR_OBJECT` from a number or `Firebase error object`. * * @param code It may be a ERROR CODE or a `Error Object`. * * - If `Firestore Error Object` or `Javascript Error Object` was given, then it will be replaced as BACKEND_ERROR_OBJECT. * * @return * - If the input is falsy value return the input is retuerned as it is. * - if the input is not a number or Error Object, then the input is returned as it is. * - Otherwise, Backend Error Object is returned. */ export declare function obj(code: any, info?: object): BACKEND_ERROR_OBJECT;