Interface ActionheroConfigInterface

interface ActionheroConfigInterface {
    errors: {
        _toExpand: boolean;
        connectionAlreadyInRoom: ((connection, room) => string);
        connectionNotInRoom: ((connection, room) => string);
        connectionRoomAndMessage: ((connection) => string);
        connectionRoomExists: ((room) => string);
        connectionRoomHasBeenDeleted: ((room) => string);
        connectionRoomNotExist: ((room) => string);
        connectionRoomRequired: (() => string);
        fileNotFound: ((connection) => string);
        fileNotProvided: ((connection) => string);
        fileReadError: ((connection, error) => string);
        invalidParams: ((data, validationErrors) => string | Error);
        missingParams: ((data, missingParams) => string);
        reportUnknownActions: boolean;
        serializers: {
            actionProcessor: ((error) => {
                errorFields: {
                    error: string;
                };
                logLevel: ActionheroLogLevel;
            });
            servers: {
                specHelper: ((error) => string | ErrnoException);
                web: ((error) => string | ErrnoException);
                websocket: ((error) => string | ErrnoException);
            };
        };
        serverShuttingDown: ((data) => string);
        tooManyPendingActions: ((data) => string);
        unknownAction: ((data) => string);
        unsupportedServerType: ((data) => string);
        verbNotAllowed: ((connection, verb) => string);
        verbNotFound: ((connection, verb) => string);
        genericError(data, error): Promise<ErrnoException>;
    };
    general: {
        apiVersion: string;
        cachePrefix: string;
        channel: string;
        cliIncludeInternal: boolean;
        defaultMiddlewarePriority: number;
        directoryFileType: string;
        disableParamScrubbing: boolean;
        enableResponseLogging: boolean;
        enforceConnectionProperties: boolean;
        fileRequestLogLevel: ActionheroLogLevel;
        filteredParams: string[] | (() => string[]);
        filteredResponse: string[] | (() => string[]);
        id: string;
        lockDuration: number;
        lockPrefix: string;
        missingParamChecks: string[];
        paths: {
            action: string[];
            cli: string[];
            dist: string;
            initializer: string[];
            log: string[];
            pid: string[];
            plugin: string[];
            public: string[];
            server: string[];
            src: string;
            task: string[];
            test: string[];
        };
        rpcTimeout: number;
        serverName: string;
        serverToken: string;
        simultaneousActions: number;
        startingChatRooms: Record<string, Record<string, any>>;
        welcomeMessage: string;
    };
    logger: {
        loggers: ActionheroConfigLoggerBuilderArray;
        maxLogArrayLength: number;
        maxLogStringLength: number;
    };
    plugins: PluginConfig;
    redis: {
        _toExpand: boolean;
        client: {
            args: {
                db: number;
                host: string;
                password: string;
                port: string | number;
                retryStrategy: ((times) => number);
                tls: {
                    rejectUnauthorized: boolean;
                };
            }[];
            buildNew: boolean;
            konstructor: any;
        };
        scanCount: number;
        stopTimeout: number;
        subscriber: {
            args: {
                db: number;
                host: string;
                password: string;
                port: string | number;
                retryStrategy: ((times) => number);
                tls: {
                    rejectUnauthorized: boolean;
                };
            }[];
            buildNew: boolean;
            konstructor: any;
        };
        tasks: {
            args: {
                db: number;
                host: string;
                password: string;
                port: string | number;
                retryStrategy: ((times) => number);
                tls: {
                    rejectUnauthorized: boolean;
                };
            }[];
            buildNew: boolean;
            konstructor: any;
        };
    };
    routes: Partial<Record<"all" | "head" | "get" | "patch" | "post" | "put" | "delete", RouteType[]>>;
    tasks: {
        _toExpand: boolean;
        checkTimeout: number;
        connectionOptions: {
            tasks: {};
        };
        maxEventLoopDelay: number;
        maxTaskProcessors: number;
        minTaskProcessors: number;
        queues: string[] | (() => Promise<string[]>);
        resque_overrides: {
            multiWorker: MultiWorker;
            queue: Queue;
            scheduler: Scheduler;
        };
        retryStuckJobs: boolean;
        scheduler: boolean;
        schedulerLogging: {
            end: ActionheroLogLevel;
            enqueue: ActionheroLogLevel;
            poll: ActionheroLogLevel;
            reEnqueue: ActionheroLogLevel;
            start: ActionheroLogLevel;
            transferred_job: ActionheroLogLevel;
            working_timestamp: ActionheroLogLevel;
        };
        stuckWorkerTimeout: number;
        timeout: number;
        workerLogging: {
            cleaning_worker: ActionheroLogLevel;
            end: ActionheroLogLevel;
            failure: ActionheroLogLevel;
            internalError: ActionheroLogLevel;
            job: ActionheroLogLevel;
            multiWorkerAction: ActionheroLogLevel;
            pause: ActionheroLogLevel;
            poll: ActionheroLogLevel;
            reEnqueue: ActionheroLogLevel;
            start: ActionheroLogLevel;
            success: ActionheroLogLevel;
        };
    };
    web: {
        allowedRequestHosts: string[];
        automaticRoutes: string[];
        bindIP: string;
        bootAttempts: number;
        compress: boolean;
        defaultErrorStatusCode: number;
        enableEtag: boolean;
        enabled: boolean;
        fingerprintOptions: {
            cookieKey: string;
            onlyStaticElements: boolean;
            settings: {
                expires: number;
                path: string;
            };
            toSetCookie: boolean;
        };
        flatFileCacheDuration: number;
        formOptions: Options;
        httpHeaders: {
            Access-Control-Allow-Headers: string;
            Access-Control-Allow-Methods: string;
            Access-Control-Allow-Origin: string;
            Strict-Transport-Security: string;
            X-Powered-By: string;
        };
        metadataOptions: {
            requesterInformation: boolean;
            serverInformation: boolean;
        };
        padding: number;
        port: string | number;
        queryParseOptions: {};
        returnErrorCodes: boolean;
        rootEndpointType: string;
        saveRawBody: boolean;
        secure: boolean;
        serverOptions: {};
        urlPathForActions: string;
        urlPathForFiles: string;
    };
    websocket: {
        client: {
            apiPath: string;
            cookieKey: string;
        };
        clientJsName: string;
        clientJsPath: string;
        clientUrl: string;
        destroyClientsOnShutdown: boolean;
        enabled: boolean;
        server: {};
    };
    [key: string]: Record<string, unknown>;
}

Indexable

[key: string]: Record<string, unknown>

Properties

errors: {
    _toExpand: boolean;
    connectionAlreadyInRoom: ((connection, room) => string);
    connectionNotInRoom: ((connection, room) => string);
    connectionRoomAndMessage: ((connection) => string);
    connectionRoomExists: ((room) => string);
    connectionRoomHasBeenDeleted: ((room) => string);
    connectionRoomNotExist: ((room) => string);
    connectionRoomRequired: (() => string);
    fileNotFound: ((connection) => string);
    fileNotProvided: ((connection) => string);
    fileReadError: ((connection, error) => string);
    invalidParams: ((data, validationErrors) => string | Error);
    missingParams: ((data, missingParams) => string);
    reportUnknownActions: boolean;
    serializers: {
        actionProcessor: ((error) => {
            errorFields: {
                error: string;
            };
            logLevel: ActionheroLogLevel;
        });
        servers: {
            specHelper: ((error) => string | ErrnoException);
            web: ((error) => string | ErrnoException);
            websocket: ((error) => string | ErrnoException);
        };
    };
    serverShuttingDown: ((data) => string);
    tooManyPendingActions: ((data) => string);
    unknownAction: ((data) => string);
    unsupportedServerType: ((data) => string);
    verbNotAllowed: ((connection, verb) => string);
    verbNotFound: ((connection, verb) => string);
    genericError(data, error): Promise<ErrnoException>;
}

Type declaration

  • _toExpand: boolean
  • connectionAlreadyInRoom: ((connection, room) => string)
      • (connection, room): string
      • Parameters

        Returns string

  • connectionNotInRoom: ((connection, room) => string)
      • (connection, room): string
      • Parameters

        Returns string

  • connectionRoomAndMessage: ((connection) => string)
      • (connection): string
      • Parameters

        Returns string

  • connectionRoomExists: ((room) => string)
      • (room): string
      • Parameters

        • room: string

        Returns string

  • connectionRoomHasBeenDeleted: ((room) => string)
      • (room): string
      • Parameters

        • room: string

        Returns string

  • connectionRoomNotExist: ((room) => string)
      • (room): string
      • Parameters

        • room: string

        Returns string

  • connectionRoomRequired: (() => string)
      • (): string
      • Returns string

  • fileNotFound: ((connection) => string)
      • (connection): string
      • Parameters

        Returns string

  • fileNotProvided: ((connection) => string)
      • (connection): string
      • Parameters

        Returns string

  • fileReadError: ((connection, error) => string)
      • (connection, error): string
      • Parameters

        Returns string

  • invalidParams: ((data, validationErrors) => string | Error)
      • (data, validationErrors): string | Error
      • Parameters

        Returns string | Error

  • missingParams: ((data, missingParams) => string)
      • (data, missingParams): string
      • Parameters

        Returns string

  • reportUnknownActions: boolean
  • serializers: {
        actionProcessor: ((error) => {
            errorFields: {
                error: string;
            };
            logLevel: ActionheroLogLevel;
        });
        servers: {
            specHelper: ((error) => string | ErrnoException);
            web: ((error) => string | ErrnoException);
            websocket: ((error) => string | ErrnoException);
        };
    }
    • actionProcessor: ((error) => {
          errorFields: {
              error: string;
          };
          logLevel: ActionheroLogLevel;
      })
        • (error): {
              errorFields: {
                  error: string;
              };
              logLevel: ActionheroLogLevel;
          }
        • Parameters

          • error: ErrnoException

          Returns {
              errorFields: {
                  error: string;
              };
              logLevel: ActionheroLogLevel;
          }

    • servers: {
          specHelper: ((error) => string | ErrnoException);
          web: ((error) => string | ErrnoException);
          websocket: ((error) => string | ErrnoException);
      }
      • specHelper: ((error) => string | ErrnoException)
          • (error): string | ErrnoException
          • Parameters

            • error: ErrnoException

            Returns string | ErrnoException

      • web: ((error) => string | ErrnoException)
          • (error): string | ErrnoException
          • Parameters

            • error: ErrnoException

            Returns string | ErrnoException

      • websocket: ((error) => string | ErrnoException)
          • (error): string | ErrnoException
          • Parameters

            • error: ErrnoException

            Returns string | ErrnoException

  • serverShuttingDown: ((data) => string)
  • tooManyPendingActions: ((data) => string)
  • unknownAction: ((data) => string)
  • unsupportedServerType: ((data) => string)
  • verbNotAllowed: ((connection, verb) => string)
      • (connection, verb): string
      • Parameters

        Returns string

  • verbNotFound: ((connection, verb) => string)
      • (connection, verb): string
      • Parameters

        Returns string

  • genericError:function
    • Parameters

      Returns Promise<ErrnoException>

general: {
    apiVersion: string;
    cachePrefix: string;
    channel: string;
    cliIncludeInternal: boolean;
    defaultMiddlewarePriority: number;
    directoryFileType: string;
    disableParamScrubbing: boolean;
    enableResponseLogging: boolean;
    enforceConnectionProperties: boolean;
    fileRequestLogLevel: ActionheroLogLevel;
    filteredParams: string[] | (() => string[]);
    filteredResponse: string[] | (() => string[]);
    id: string;
    lockDuration: number;
    lockPrefix: string;
    missingParamChecks: string[];
    paths: {
        action: string[];
        cli: string[];
        dist: string;
        initializer: string[];
        log: string[];
        pid: string[];
        plugin: string[];
        public: string[];
        server: string[];
        src: string;
        task: string[];
        test: string[];
    };
    rpcTimeout: number;
    serverName: string;
    serverToken: string;
    simultaneousActions: number;
    startingChatRooms: Record<string, Record<string, any>>;
    welcomeMessage: string;
}

Type declaration

  • apiVersion: string
  • cachePrefix: string
  • channel: string
  • cliIncludeInternal: boolean
  • defaultMiddlewarePriority: number
  • directoryFileType: string
  • disableParamScrubbing: boolean
  • enableResponseLogging: boolean
  • enforceConnectionProperties: boolean
  • fileRequestLogLevel: ActionheroLogLevel
  • filteredParams: string[] | (() => string[])
  • filteredResponse: string[] | (() => string[])
  • id: string
  • lockDuration: number
  • lockPrefix: string
  • missingParamChecks: string[]
  • paths: {
        action: string[];
        cli: string[];
        dist: string;
        initializer: string[];
        log: string[];
        pid: string[];
        plugin: string[];
        public: string[];
        server: string[];
        src: string;
        task: string[];
        test: string[];
    }
    • action: string[]
    • cli: string[]
    • dist: string
    • initializer: string[]
    • log: string[]
    • pid: string[]
    • plugin: string[]
    • public: string[]
    • server: string[]
    • src: string
    • task: string[]
    • test: string[]
  • rpcTimeout: number
  • serverName: string
  • serverToken: string
  • simultaneousActions: number
  • startingChatRooms: Record<string, Record<string, any>>
  • welcomeMessage: string
logger: {
    loggers: ActionheroConfigLoggerBuilderArray;
    maxLogArrayLength: number;
    maxLogStringLength: number;
}

Type declaration

  • loggers: ActionheroConfigLoggerBuilderArray
  • maxLogArrayLength: number
  • maxLogStringLength: number
plugins: PluginConfig
redis: {
    _toExpand: boolean;
    client: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    };
    scanCount: number;
    stopTimeout: number;
    subscriber: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    };
    tasks: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    };
}

Type declaration

  • _toExpand: boolean
  • client: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    }
    • args: {
          db: number;
          host: string;
          password: string;
          port: string | number;
          retryStrategy: ((times) => number);
          tls: {
              rejectUnauthorized: boolean;
          };
      }[]
    • buildNew: boolean
    • konstructor: any
  • scanCount: number
  • stopTimeout: number
  • subscriber: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    }
    • args: {
          db: number;
          host: string;
          password: string;
          port: string | number;
          retryStrategy: ((times) => number);
          tls: {
              rejectUnauthorized: boolean;
          };
      }[]
    • buildNew: boolean
    • konstructor: any
  • tasks: {
        args: {
            db: number;
            host: string;
            password: string;
            port: string | number;
            retryStrategy: ((times) => number);
            tls: {
                rejectUnauthorized: boolean;
            };
        }[];
        buildNew: boolean;
        konstructor: any;
    }
    • args: {
          db: number;
          host: string;
          password: string;
          port: string | number;
          retryStrategy: ((times) => number);
          tls: {
              rejectUnauthorized: boolean;
          };
      }[]
    • buildNew: boolean
    • konstructor: any
routes: Partial<Record<"all" | "head" | "get" | "patch" | "post" | "put" | "delete", RouteType[]>>
tasks: {
    _toExpand: boolean;
    checkTimeout: number;
    connectionOptions: {
        tasks: {};
    };
    maxEventLoopDelay: number;
    maxTaskProcessors: number;
    minTaskProcessors: number;
    queues: string[] | (() => Promise<string[]>);
    resque_overrides: {
        multiWorker: MultiWorker;
        queue: Queue;
        scheduler: Scheduler;
    };
    retryStuckJobs: boolean;
    scheduler: boolean;
    schedulerLogging: {
        end: ActionheroLogLevel;
        enqueue: ActionheroLogLevel;
        poll: ActionheroLogLevel;
        reEnqueue: ActionheroLogLevel;
        start: ActionheroLogLevel;
        transferred_job: ActionheroLogLevel;
        working_timestamp: ActionheroLogLevel;
    };
    stuckWorkerTimeout: number;
    timeout: number;
    workerLogging: {
        cleaning_worker: ActionheroLogLevel;
        end: ActionheroLogLevel;
        failure: ActionheroLogLevel;
        internalError: ActionheroLogLevel;
        job: ActionheroLogLevel;
        multiWorkerAction: ActionheroLogLevel;
        pause: ActionheroLogLevel;
        poll: ActionheroLogLevel;
        reEnqueue: ActionheroLogLevel;
        start: ActionheroLogLevel;
        success: ActionheroLogLevel;
    };
}

Type declaration

web: {
    allowedRequestHosts: string[];
    automaticRoutes: string[];
    bindIP: string;
    bootAttempts: number;
    compress: boolean;
    defaultErrorStatusCode: number;
    enableEtag: boolean;
    enabled: boolean;
    fingerprintOptions: {
        cookieKey: string;
        onlyStaticElements: boolean;
        settings: {
            expires: number;
            path: string;
        };
        toSetCookie: boolean;
    };
    flatFileCacheDuration: number;
    formOptions: Options;
    httpHeaders: {
        Access-Control-Allow-Headers: string;
        Access-Control-Allow-Methods: string;
        Access-Control-Allow-Origin: string;
        Strict-Transport-Security: string;
        X-Powered-By: string;
    };
    metadataOptions: {
        requesterInformation: boolean;
        serverInformation: boolean;
    };
    padding: number;
    port: string | number;
    queryParseOptions: {};
    returnErrorCodes: boolean;
    rootEndpointType: string;
    saveRawBody: boolean;
    secure: boolean;
    serverOptions: {};
    urlPathForActions: string;
    urlPathForFiles: string;
}

Type declaration

  • allowedRequestHosts: string[]
  • automaticRoutes: string[]
  • bindIP: string
  • bootAttempts: number
  • compress: boolean
  • defaultErrorStatusCode: number
  • enableEtag: boolean
  • enabled: boolean
  • fingerprintOptions: {
        cookieKey: string;
        onlyStaticElements: boolean;
        settings: {
            expires: number;
            path: string;
        };
        toSetCookie: boolean;
    }
    • cookieKey: string
    • onlyStaticElements: boolean
    • settings: {
          expires: number;
          path: string;
      }
      • expires: number
      • path: string
    • toSetCookie: boolean
  • flatFileCacheDuration: number
  • formOptions: Options
  • httpHeaders: {
        Access-Control-Allow-Headers: string;
        Access-Control-Allow-Methods: string;
        Access-Control-Allow-Origin: string;
        Strict-Transport-Security: string;
        X-Powered-By: string;
    }
    • Access-Control-Allow-Headers: string
    • Access-Control-Allow-Methods: string
    • Access-Control-Allow-Origin: string
    • Strict-Transport-Security: string
    • X-Powered-By: string
  • metadataOptions: {
        requesterInformation: boolean;
        serverInformation: boolean;
    }
    • requesterInformation: boolean
    • serverInformation: boolean
  • padding: number
  • port: string | number
  • queryParseOptions: {}
    • returnErrorCodes: boolean
    • rootEndpointType: string
    • saveRawBody: boolean
    • secure: boolean
    • serverOptions: {}
      • urlPathForActions: string
      • urlPathForFiles: string
      websocket: {
          client: {
              apiPath: string;
              cookieKey: string;
          };
          clientJsName: string;
          clientJsPath: string;
          clientUrl: string;
          destroyClientsOnShutdown: boolean;
          enabled: boolean;
          server: {};
      }

      Type declaration

      • client: {
            apiPath: string;
            cookieKey: string;
        }
        • apiPath: string
        • cookieKey: string
      • clientJsName: string
      • clientJsPath: string
      • clientUrl: string
      • destroyClientsOnShutdown: boolean
      • enabled: boolean
      • server: {}