From 6419c9676fd22625355c5e81217ca6188977395f Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Sun, 16 Aug 2026 18:12:19 -0400 Subject: [PATCH] feat(helpdesk): add ticket event log wiring Add ticket:create/reply/status-change/assign event types, extend the emit targetCollection union, and register tickets in GameEventLogs target collections. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/collections/game/GameEventLogs.ts | 1 + src/utils/event-log/emit.ts | 2 +- src/utils/event-log/eventTypes.ts | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/collections/game/GameEventLogs.ts b/src/collections/game/GameEventLogs.ts index de70e87..d87a523 100644 --- a/src/collections/game/GameEventLogs.ts +++ b/src/collections/game/GameEventLogs.ts @@ -23,6 +23,7 @@ const TARGET_COLLECTIONS = [ { label: "Loadouts", value: "loadouts" }, { label: "Market Listings", value: "market-listings" }, { label: "Market Negotiations", value: "market-negotiations" }, + { label: "Tickets", value: "tickets" }, ] as const; export const GameEventLogs: CollectionConfig = { diff --git a/src/utils/event-log/emit.ts b/src/utils/event-log/emit.ts index b4587d1..46979f2 100644 --- a/src/utils/event-log/emit.ts +++ b/src/utils/event-log/emit.ts @@ -5,7 +5,7 @@ interface GameEventInput { message: string; actor?: number; structure?: number; - targetCollection?: "users" | "missions" | "maps" | "campaigns" | "factions" | "technologies" | "assets" | "resources" | "structures" | "vehicles" | "game-structures" | "game-vehicles" | "game-npcs" | "shipments" | "bank-accounts" | "bank-transactions" | "ledger-entries" | "locker-storages" | "loadouts" | "market-listings" | "market-negotiations"; + targetCollection?: "users" | "missions" | "maps" | "campaigns" | "factions" | "technologies" | "assets" | "resources" | "structures" | "vehicles" | "game-structures" | "game-vehicles" | "game-npcs" | "shipments" | "bank-accounts" | "bank-transactions" | "ledger-entries" | "locker-storages" | "loadouts" | "market-listings" | "market-negotiations" | "tickets"; targetId?: number; data?: Record; } diff --git a/src/utils/event-log/eventTypes.ts b/src/utils/event-log/eventTypes.ts index 7b4cc08..9c67f97 100644 --- a/src/utils/event-log/eventTypes.ts +++ b/src/utils/event-log/eventTypes.ts @@ -84,6 +84,12 @@ export const EventTypes = { // Attendance MissionAttendanceChange: "mission:attendance-change", + + // Helpdesk + TicketCreate: "ticket:create", + TicketReply: "ticket:reply", + TicketStatusChange: "ticket:status-change", + TicketAssign: "ticket:assign", } as const; export type EventType = (typeof EventTypes)[keyof typeof EventTypes];