Ctrl K
ComunidadGuías…

global.d.ts

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
type EmailTransport = 'smtp' | 'sendmail';

type KresusProcess = {
    defaultUser: {
        id: number;
        login: string;
        isAdmin: boolean;
    };
    providedUserId: number;
    userLoginHttpHeader: string;
    dataDir: string;
    port: number;
    host: string;
    serverTimeout: number;
    pythonExec: string;
    urlPrefix: string;
    salt: string | null;
    forceDemoMode: boolean;
    woobDir: string | null;
    woobSourcesList: string | null;
    emailTransport: EmailTransport | null;
    emailSendmailBin: string | null;
    emailFrom: string | null;
    smtpHost: string | null;
    smtpPort: number | null;
    smtpUser: string | null;
    smtpPassword: string | null;
    smtpForceTLS: boolean;
    smtpRejectUnauthorizedTLS: boolean;
    appriseApiBaseUrl: string | null;
    basicAuth: { [username: string]: string };
    logFilePath: string;
    dbType: string;
    dbLog: 'error'[] | boolean;
    sqlitePath: string | null;
    dbHost: string | null;
    dbPort: number | null;
    dbUsername: string | null;
    dbPassword: string | null;
    dbName: string;
};

declare namespace NodeJS {
    interface Process {
        kresus: KresusProcess;
    }
}

// Extend express Request interface to allow a "user" variable for preloads.
declare namespace Express {
    export interface Request {
        user?: {
            id?: number;
        };
    }
}

declare module 'ospath' {
    export function home(): string;
}

declare module 'ofx-js' {
    type RecursiveData =
        | {
              [key: string]: RecursiveData;
          }
        | number
        | string;

    export function parse(content: string): Promise<RecursiveData>;
}

declare module 'regex-escape' {
    export default function (_: string): string;
}