1
0
Fork 0

chore(events): add poker and ribbon event constants and notification labels

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Jason Fraley 2026-09-11 03:25:21 -04:00
parent cbbf1816f6
commit 91a3a38831
3 changed files with 11 additions and 0 deletions

View file

@ -55,6 +55,8 @@ export async function notifyUser(payload: PayloadType, input: NotifyInput): Prom
/** Short display label for a notification type, or the raw type when unknown. */ /** Short display label for a notification type, or the raw type when unknown. */
export function notificationLabel(type?: string | null): string { export function notificationLabel(type?: string | null): string {
switch (type) { switch (type) {
case "poker:force-ended":
return "Poker game ended";
case "market:offer": case "market:offer":
return "New offer"; return "New offer";
case "market:counter": case "market:counter":
@ -107,6 +109,10 @@ export function notificationLabel(type?: string | null): string {
return "Transfer completed"; return "Transfer completed";
case "assignment-transfer:cancelled": case "assignment-transfer:cancelled":
return "Transfer cancelled"; return "Transfer cancelled";
case "award:ribbon-approved":
return "Ribbon approved";
case "award:ribbon-rejected":
return "Ribbon not approved";
default: default:
return type ?? "Notification"; return type ?? "Notification";
} }

View file

@ -17,6 +17,7 @@ export const MUTEABLE_NOTIFICATION_TYPES = [
{ label: "Ticket assigned", value: "ticket:assigned" }, { label: "Ticket assigned", value: "ticket:assigned" },
{ label: "Ticket replies", value: "ticket:reply" }, { label: "Ticket replies", value: "ticket:reply" },
{ label: "Ticket status changes", value: "ticket:status" }, { label: "Ticket status changes", value: "ticket:status" },
{ label: "Poker", value: "poker:force-ended" },
] as const; ] as const;
export type MuteableNotificationType = (typeof MUTEABLE_NOTIFICATION_TYPES)[number]["value"]; export type MuteableNotificationType = (typeof MUTEABLE_NOTIFICATION_TYPES)[number]["value"];
export const MUTEABLE_NOTIFICATION_VALUES = MUTEABLE_NOTIFICATION_TYPES.map((t) => t.value); export const MUTEABLE_NOTIFICATION_VALUES = MUTEABLE_NOTIFICATION_TYPES.map((t) => t.value);

View file

@ -77,6 +77,7 @@ export const EventTypes = {
MinigameRadioTraffic: "minigame:radio-traffic", MinigameRadioTraffic: "minigame:radio-traffic",
MinigameAimTrainer: "minigame:aim-trainer", MinigameAimTrainer: "minigame:aim-trainer",
MinigameOpordRecall: "minigame:opord-recall", MinigameOpordRecall: "minigame:opord-recall",
MinigamePoker: "minigame:poker",
MinigameCustomEodCreate: "minigame:custom-eod-create", MinigameCustomEodCreate: "minigame:custom-eod-create",
MinigameCustomEodEdit: "minigame:custom-eod-edit", MinigameCustomEodEdit: "minigame:custom-eod-edit",
MinigameCustomEodDelete: "minigame:custom-eod-delete", MinigameCustomEodDelete: "minigame:custom-eod-delete",
@ -130,6 +131,9 @@ export const EventTypes = {
// Awards // Awards
AwardGrant: "award:grant", AwardGrant: "award:grant",
AwardRibbonSubmitted: "award:ribbon-submitted",
AwardRibbonApproved: "award:ribbon-approved",
AwardRibbonRejected: "award:ribbon-rejected",
// Missions // Missions
MissionAutoComplete: "mission:auto-complete", MissionAutoComplete: "mission:auto-complete",