Browse docs

Training

Read-only Training App lifecycle and notification events emitted to clients.

Events emitted by the server

Training lifecycle events are refresh and presentation signals. They do not grant permission and their payloads must be treated as read-only.

sky_jobs_base:training:updated

Emitted to online employees of the affected job after a successful mutation. The optional action field identifies the mutation that caused the refresh.

client.lua
AddEventHandler("sky_jobs_base:training:updated", function(change)
    local action = type(change) == "table" and change.action or "unknown"
    print("Training data changed:", action)
end)

sky_jobs_base:training:notification

Emitted to the affected employee for enrollment changes, waitlist promotion, session cancellation, reminders, and qualification issue or revocation. The built-in handler localizes the message and adds it to the tablet notification center.

Common payload fields include id, key, title, body, replacements, startsAt, kind, tone, and timestamp.

client.lua
AddEventHandler("sky_jobs_base:training:notification", function(notification)
    print("Training notification:", notification.key)
end)
These are server-to-client events, not a mutation API. Locally triggering them can only imitate a refresh or notification on that client; it cannot modify courses, enrollments, results, qualifications, or audit history.