screeps-api
    Preparing search index...

    Interface UserCodeEventData

    Payload of a UserCodeEvent

    interface UserCodeEventData {
        branch: string;
        data: unknown;
        hash: number;
        id?: string;
        modules: UserCodeModules;
        path: string;
        timestamp: number;
        type: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    branch: string

    Name of the updated branch

    data: unknown

    The event payload. Extensions of this interface should specify a more precise type.

    hash: number

    A hash of the code base. The hashing algorithm is unknown.

    id?: string

    ID of the entity the event is reporting on. Undefined when type is server.

    Examples:

    • User ID for user events
    • Room name (shard0/W0N0, W0N0, etc) for room events

    The updated code

    path: string

    When non-empty, indicates that the event concerns a property or aspect of type.

    Examples:

    • /resources for user-type events indicates an update to resource counts
    timestamp: number

    "Last modified" UNIX timestamp (in milliseconds)

    type: string