import { ESupportedLanguages, ETranslationNamespaces } from "../interfaces/index.js"; import mongoose from "mongoose"; import { GeneralError, OpenApiValidationError } from "./error.js"; import { TLoggingFunc } from "../logging/index.js"; import { BadRequest } from "express-openapi-validator/dist/framework/types.js"; import { TErrorLine } from "../utils/index.js"; export type TErrorType = Error | GeneralError | mongoose.MongooseError; export type TErrorCallback = (error: TErrorType) => never; export type TLoggerCallBack = (origin: TErrorLine, tenant: string | null) => TLoggingFunc; export type TTranslationError = GeneralError | OpenApiValidationError; export declare enum EErrorCodes { NOT_FOUND = 404, BAD_REQUEST = 400, NOT_AUTHORIZED = 401, INTERNAL = 500, REQUEST_LIMIT = 429, VERSION_CONFLICT = 409 } export declare enum EErrorTypeDescriptions { NOT_FOUND = "not_found", BAD_REQUEST = "bad_request", NOT_AUTHORIZED = "not_authorized", INTERNAL = "internal", REQUEST_LIMIT = "request_limit", VERSION_CONFLICT = "version_conflict" } export interface IErrorObject { type: EErrorTypeDescriptions; error: string[]; } export interface IUserTranslation { language: ESupportedLanguages; namespace: ETranslationNamespaces; key: string; } export declare function isOpenApiError(error: Error | BadRequest): error is BadRequest; export type TVersionConflictCheck = () => boolean; export declare function isVersionConflictError(error: Error | GeneralError): TVersionConflictCheck; //# sourceMappingURL=interfaces.d.ts.map