Takaro - v0.4.9
    Preparing search index...

    Class BaseTakaroEvent<T>

    Generic Data Transfer Object, used widely in Takaro to pass data back and forth between components Allows validation of properties when instantiated and JSON (de)serialization

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    msg: string
    timestamp: string = ...
    type: ValueOf<
        {
            COMMAND_EXECUTED: "command-executed";
            COMMAND_EXECUTION_DENIED: "command-execution-denied";
            CRONJOB_EXECUTED: "cronjob-executed";
            CURRENCY_ADDED: "currency-added";
            CURRENCY_DEDUCTED: "currency-deducted";
            CURRENCY_RESET_ALL: "currency-reset-all";
            GAMESERVER_CREATED: "gameserver-created";
            GAMESERVER_DELETED: "gameserver-deleted";
            GAMESERVER_UPDATED: "gameserver-updated";
            HOOK_EXECUTED: "hook-executed";
            MODULE_CREATED: "module-created";
            MODULE_DELETED: "module-deleted";
            MODULE_INSTALLED: "module-installed";
            MODULE_UNINSTALLED: "module-uninstalled";
            MODULE_UPDATED: "module-updated";
            PLAYER_BANNED: "player-banned";
            PLAYER_CREATED: "player-created";
            PLAYER_DELETED: "player-deleted";
            PLAYER_LINKED: "player-linked";
            PLAYER_NEW_IP_DETECTED: "player-new-ip-detected";
            PLAYER_NEW_NAME_DETECTED: "player-new-name-detected";
            PLAYER_UNBANNED: "player-unbanned";
            ROLE_ASSIGNED: "role-assigned";
            ROLE_CREATED: "role-created";
            ROLE_DELETED: "role-deleted";
            ROLE_REMOVED: "role-removed";
            ROLE_UPDATED: "role-updated";
            SERVER_STATUS_CHANGED: "server-status-changed";
            SETTINGS_SET: "settings-set";
            SHOP_LISTING_CREATED: "shop-listing-created";
            SHOP_LISTING_DELETED: "shop-listing-deleted";
            SHOP_LISTING_UPDATED: "shop-listing-updated";
            SHOP_ORDER_CREATED: "shop-order-created";
            SHOP_ORDER_DELIVERY_FAILED: "shop-order-delivery-failed";
            SHOP_ORDER_STATUS_CHANGED: "shop-order-status-changed";
        },
    >

    Methods

    • Parameters

      • OptionaloptionOverrides: ClassTransformOptions

      Returns Record<string, any>

    • Validates the DTO instance

      Parameters

      • OptionalextraOpts: ValidatorOptions

      Returns Promise<void>

      if validation fails