@go-labs-sg/event-tech 1.26.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10581,17 +10581,17 @@ var MAX_EVENT_IMAGE_UPLOAD_BYTES = 25 * 1024 * 1024, MAX_EVENT_VIDEO_UPLOAD_BYTE
10581
10581
  }, "runPassportCommand");
10582
10582
  import { readFile as readFile6, writeFile } from "fs/promises";
10583
10583
  import { basename as basename4 } from "path";
10584
- var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAFF_REDEMPTION_SHIFT_MAX = 8, STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX = 20, STAFF_REDEMPTION_ALLOWANCE_MAX = 20, STAFF_REDEMPTION_QUANTITY_MAX = 1e5, STAFF_REDEMPTION_REASON_MAX = 500, STAFF_REDEMPTION_ROLLOVER_REASON_MAX = 300, STAFF_REDEMPTION_ROLLOVER_LIST_DEFAULT = 20, STAFF_REDEMPTION_ROLLOVER_LIST_MAX = 50, STAFF_REDEMPTION_PAGE_MAX = 100, STAFF_REDEMPTION_CLAIM_ITEMS_MAX = 20, STAFF_REDEMPTION_ITEM_RULES = ["ONE_FROM_EACH_GROUP", "AT_MOST_ONE_PER_GROUP", "AT_MOST_ONE_PER_GROUP_OR_NONE"], STAFF_REDEMPTION_WRONG_SITE_RULES = ["REFUSE", "SERVE_FROM_COUNTER"], STAFF_REDEMPTION_SESSION_RULES = ["OWN_SHIFT", "ANY_OPEN_SESSION"], STAFF_REDEMPTION_DRAW_POLICIES = ["REMAINING_HEADCOUNT", "FIXED_RATE"], STAFF_REDEMPTION_COUNTER_ORDERS = ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"], STAFF_REDEMPTION_ARCHIVABLE = ["site", "session", "itemGroup", "item", "prize", "rosterEntry"], idSchema = string2().min(1).max(64), nameSchema = string2().trim().min(1).max(STAFF_REDEMPTION_NAME_MAX), orderSchema = number2().int().min(0).max(1e4), quantitySchema = number2().int().min(0).max(STAFF_REDEMPTION_QUANTITY_MAX), reasonSchema = string2().trim().min(1).max(STAFF_REDEMPTION_REASON_MAX), staffRedemptionShiftSchema = string2().trim().min(1).max(STAFF_REDEMPTION_SHIFT_MAX).transform((value) => value.toUpperCase()).refine((value) => new __cliRegExp("^[A-Z0-9]+$", "").test(value), { message: "Use letters and digits only." }), staffRedemptionEmployeeIdSchema = string2().trim().min(1).max(STAFF_REDEMPTION_EMPLOYEE_ID_MAX), staffRedemptionClientRequestIdSchema = uuid2(), staffRedemptionEventIdSchema = object({ eventId: idSchema }).strict(), staffRedemptionSiteIdSchema = staffRedemptionEventIdSchema.extend({ siteId: idSchema }).strict(), updateStaffRedemptionSettingsSchema = staffRedemptionEventIdSchema.extend({ eligibleShifts: array(staffRedemptionShiftSchema).min(1).max(STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX).optional(), itemRule: _enum(STAFF_REDEMPTION_ITEM_RULES).optional(), wrongSite: _enum(STAFF_REDEMPTION_WRONG_SITE_RULES).optional(), sessionRule: _enum(STAFF_REDEMPTION_SESSION_RULES).optional(), drawPolicy: _enum(STAFF_REDEMPTION_DRAW_POLICIES).optional(), fixedWinRatePercent: number2().min(0).max(100).optional(), counterOrder: _enum(STAFF_REDEMPTION_COUNTER_ORDERS).optional(), overrideReason: reasonSchema.optional() }).strict(), upsertStaffRedemptionSiteSchema = staffRedemptionEventIdSchema.extend({ siteId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), setStaffRedemptionCrewPasswordSchema = staffRedemptionSiteIdSchema.extend({ password: stationStaffPasswordSchema }).strict(), signInToStaffRedemptionCrewSchema = staffRedemptionSiteIdSchema.extend({ password: string2().min(1).max(128) }).strict(), upsertStaffRedemptionSessionSchema = staffRedemptionEventIdSchema.extend({ sessionId: idSchema.optional(), name: nameSchema, shift: staffRedemptionShiftSchema, startsAt: exports_coerce.date().nullable().default(null), endsAt: exports_coerce.date().nullable().default(null) }).strict().refine((input) => input.startsAt === null || input.endsAt === null || input.endsAt > input.startsAt, { message: "The session must end after it starts.", path: ["endsAt"] }), setStaffRedemptionSlotSchema = staffRedemptionEventIdSchema.extend({ sessionId: idSchema, siteId: idSchema, setQuantity: quantitySchema }).strict(), rolloverSessionsShape = { fromSessionId: idSchema.describe("Session whose leftover sets and prizes move out (id from setup get). Must belong to this event and not be archived."), toSessionId: idSchema.describe("Session that receives them (id from setup get). Must differ from fromSessionId, belong to this event and not be archived.") }, rolloverReasonSchema = __name2((description) => string2().trim().min(1).max(STAFF_REDEMPTION_ROLLOVER_REASON_MAX).describe(description), "rolloverReasonSchema"), staffRedemptionRolloverPreviewSchema = staffRedemptionEventIdSchema.extend(rolloverSessionsShape).strict(), rolloverStaffRedemptionStockSchema = staffRedemptionEventIdSchema.extend({ ...rolloverSessionsShape, sets: boolean2().default(!0).describe("Move the leftover sets (set quantity minus active, not voided, redemptions) of each site. Defaults to true."), prizes: boolean2().default(!0).describe("Move the leftover prizes (stock minus prizes drawn and not released) of each site. Defaults to true."), reason: rolloverReasonSchema("Why the leftovers move (1 to 300 characters). Recorded in the activity log.") }).strict().refine((input) => input.sets || input.prizes, { message: "Choose sets, prizes or both.", path: ["sets"] }), staffRedemptionRolloversSchema = staffRedemptionEventIdSchema.extend({ limit: number2().int().min(1).max(STAFF_REDEMPTION_ROLLOVER_LIST_MAX).default(STAFF_REDEMPTION_ROLLOVER_LIST_DEFAULT).describe("How many rollovers to return, newest first (1 to 50). Defaults to 20.") }).strict(), undoStaffRedemptionRolloverSchema = staffRedemptionEventIdSchema.extend({ rolloverId: idSchema.describe("Id of the rollover to undo (id from rollover list). Must belong to this event and not be undone already."), reason: rolloverReasonSchema("Why the rollover is undone (1 to 300 characters). Recorded in the activity log.") }).strict(), upsertStaffRedemptionItemGroupSchema = staffRedemptionEventIdSchema.extend({ groupId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), upsertStaffRedemptionItemSchema = staffRedemptionEventIdSchema.extend({ itemId: idSchema.optional(), groupId: idSchema, name: nameSchema, order: orderSchema.optional() }).strict(), upsertStaffRedemptionPrizeSchema = staffRedemptionEventIdSchema.extend({ prizeId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), setStaffRedemptionPrizeStockSchema = staffRedemptionEventIdSchema.extend({ slotId: idSchema, prizeId: idSchema, quantity: quantitySchema, reason: reasonSchema.optional() }).strict(), setStaffRedemptionArchivedSchema = staffRedemptionEventIdSchema.extend({ entity: _enum(STAFF_REDEMPTION_ARCHIVABLE), id: idSchema, archived: boolean2() }).strict(), upsertStaffRedemptionRosterEntrySchema = staffRedemptionEventIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema, name: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), siteName: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), shift: staffRedemptionShiftSchema.nullable(), workShift: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), allowance: number2().int().min(0).max(STAFF_REDEMPTION_ALLOWANCE_MAX).optional() }).strict(), rosterFiltersShape = { search: string2().trim().max(200).optional(), siteId: idSchema.optional(), shift: staffRedemptionShiftSchema.optional(), archived: _enum(["active", "archived", "all"]).default("active"), collected: _enum([
10585
- "any",
10586
- "collected",
10587
- "not-collected"
10588
- ]).default("any") }, staffRedemptionRosterListSchema = staffRedemptionEventIdSchema.extend({ ...rosterFiltersShape, limit: number2().int().min(1).max(STAFF_REDEMPTION_PAGE_MAX).default(25), cursor: string2().min(1).max(8192).nullish(), direction: literal("forward").optional() }).strict(), staffRedemptionRosterCountsSchema = staffRedemptionEventIdSchema.extend(rosterFiltersShape).strict(), lookupStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema }).strict(), claimItemIdsSchema = array(idSchema).max(STAFF_REDEMPTION_CLAIM_ITEMS_MAX).refine((ids) => new Set(ids).size === ids.length, { message: "Pick each item once." }), redeemStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema, clientRequestId: staffRedemptionClientRequestIdSchema, itemIds: claimItemIdsSchema }).strict(), recordStaffRedemptionClaimItemsSchema = staffRedemptionSiteIdSchema.extend({ claimId: idSchema, itemIds: claimItemIdsSchema }).strict(), STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES = [
10589
- "mine",
10590
- "site"
10591
- ], staffRedemptionCounterClaimsSchema = staffRedemptionSiteIdSchema.extend({ limit: number2().int().min(1).max(50).default(20), scope: _enum(STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES).default("mine"), status: _enum(["all", "items-pending"]).default("all") }).strict(), STAFF_REDEMPTION_CLAIM_STATUSES = ["active", "items-pending", "voided", "all"], claimFiltersShape = { search: string2().trim().max(200).optional(), siteId: idSchema.optional(), sessionId: idSchema.optional(), status: _enum(STAFF_REDEMPTION_CLAIM_STATUSES).default("all") }, staffRedemptionClaimListSchema = staffRedemptionEventIdSchema.extend({ ...claimFiltersShape, limit: number2().int().min(1).max(STAFF_REDEMPTION_PAGE_MAX).default(25), cursor: string2().min(1).max(8192).nullish(), direction: literal("forward").optional() }).strict(), staffRedemptionClaimCountsSchema = staffRedemptionEventIdSchema.extend(claimFiltersShape).strict(), voidStaffRedemptionClaimSchema = staffRedemptionEventIdSchema.extend({ claimId: idSchema, reason: reasonSchema }).strict(), releaseStaffRedemptionDrawSchema = staffRedemptionEventIdSchema.extend({ drawId: idSchema, reason: reasonSchema, allowWhileClaimActive: boolean2().optional().describe("Override: release the draw even though an active (not voided) redemption still shows it, for a redemption that stays recorded (for example a paper entry with no spin). Omit to refuse while any active redemption uses the draw.") }).strict(), staffRedemptionExportSchema = staffRedemptionEventIdSchema.extend(claimFiltersShape).strict(), STAFF_REDEMPTION_ROSTER_IMPORT_MAX = 2e4, staffRedemptionRosterImportRowSchema = object({ row: number2().int().min(1), employeeId: string2().max(1e3), name: string2().max(1e3).nullable(), siteName: string2().max(1e3).nullable(), shift: string2().max(1e3).nullable(), workShift: string2().max(1e3).nullable(), allowance: string2().max(1e3).nullable() }).strict(), importStaffRedemptionRosterSchema = staffRedemptionEventIdSchema.extend({ rows: array(staffRedemptionRosterImportRowSchema).min(1).max(STAFF_REDEMPTION_ROSTER_IMPORT_MAX, "A roster can have at most ".concat(
10592
- STAFF_REDEMPTION_ROSTER_IMPORT_MAX,
10593
- " rows."
10594
- )), archiveMissing: boolean2().default(!1) }).strict(), HEADER_PATTERNS = { employeeId: new __cliRegExp("^(employee|staff|worker)\\s*(id|no|number)$|^(emp|staff)\\s*id$", "i"), name: new __cliRegExp("^(worker|name|full\\s*name|employee\\s*name|staff\\s*name)$", "i"), siteName: new __cliRegExp("^(site|location|fab)$", "i"), shift: new __cliRegExp("^shift$", "i"), workShift: new __cliRegExp("^work\\s*shift$", "i"), allowance: new __cliRegExp("^(allowance|sets|entitlement|balance)$", "i") }, guessStaffRedemptionRosterMapping = __name2((header) => {
10584
+ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAFF_REDEMPTION_SHIFT_MAX = 8, STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX = 20, STAFF_REDEMPTION_ALLOWANCE_MAX = 20, STAFF_REDEMPTION_QUANTITY_MAX = 1e5, STAFF_REDEMPTION_REASON_MAX = 500, STAFF_REDEMPTION_ROLLOVER_REASON_MAX = 300, STAFF_REDEMPTION_ROLLOVER_LIST_DEFAULT = 20, STAFF_REDEMPTION_ROLLOVER_LIST_MAX = 50, STAFF_REDEMPTION_PAGE_MAX = 100, STAFF_REDEMPTION_CLAIM_ITEMS_MAX = 20, STAFF_REDEMPTION_ITEM_RULES = ["ONE_FROM_EACH_GROUP", "AT_MOST_ONE_PER_GROUP", "AT_MOST_ONE_PER_GROUP_OR_NONE"], STAFF_REDEMPTION_WRONG_SITE_RULES = ["REFUSE", "SERVE_FROM_COUNTER"], STAFF_REDEMPTION_SESSION_RULES = ["OWN_SHIFT", "ANY_OPEN_SESSION"], STAFF_REDEMPTION_DRAW_POLICIES = ["REMAINING_HEADCOUNT", "FIXED_RATE"], STAFF_REDEMPTION_COUNTER_ORDERS = ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"], STAFF_REDEMPTION_ARCHIVABLE = ["site", "session", "itemGroup", "item", "prize", "rosterEntry"], idSchema = string2().min(1).max(64), nameSchema = string2().trim().min(1).max(STAFF_REDEMPTION_NAME_MAX), orderSchema = number2().int().min(0).max(1e4), quantitySchema = number2().int().min(0).max(STAFF_REDEMPTION_QUANTITY_MAX), reasonSchema = string2().trim().min(1).max(STAFF_REDEMPTION_REASON_MAX), staffRedemptionShiftSchema = string2().trim().min(1).max(STAFF_REDEMPTION_SHIFT_MAX).transform((value) => value.toUpperCase()).refine((value) => new __cliRegExp("^[A-Z0-9]+$", "").test(value), { message: "Use letters and digits only." }), staffRedemptionEmployeeIdSchema = string2().trim().min(1).max(STAFF_REDEMPTION_EMPLOYEE_ID_MAX), staffRedemptionClientRequestIdSchema = uuid2(), staffRedemptionEventIdSchema = object({ eventId: idSchema }).strict(), staffRedemptionSiteIdSchema = staffRedemptionEventIdSchema.extend({ siteId: idSchema }).strict(), STAFF_REDEMPTION_STAFF_ID_LABEL_MAX = PASSPORT_STAFF_ID_LABEL_MAX, STAFF_REDEMPTION_WRONG_SITE_MESSAGE_MAX = 300, STAFF_REDEMPTION_LAST_NAME_MAX = STAFF_REDEMPTION_NAME_MAX, staffRedemptionLoginMethodsSchema = object({ emailOtp: boolean2(), google: boolean2(), guest: boolean2(), staffId: boolean2().default(!1), staffIdRequiresLastName: boolean2().default(!0) }).strict(), customTextOrNull = __name2((max) => union([_null3(), string2().trim().max(max).transform((value) => value === "" ? null : value)]), "customTextOrNull"), lastNameSchema = string2().trim().min(1).max(STAFF_REDEMPTION_LAST_NAME_MAX).optional(), signInToStaffRedemptionEmployeeSchema = staffRedemptionEventIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema, lastName: lastNameSchema }).strict(), requestStaffRedemptionEmployeeEmailOtpSchema = staffRedemptionEventIdSchema.extend(
10585
+ { email: email2().trim().toLowerCase() }
10586
+ ).strict(), updateStaffRedemptionSettingsSchema = staffRedemptionEventIdSchema.extend({ eligibleShifts: array(staffRedemptionShiftSchema).min(1).max(STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX).optional(), itemRule: _enum(STAFF_REDEMPTION_ITEM_RULES).optional(), wrongSite: _enum(STAFF_REDEMPTION_WRONG_SITE_RULES).optional(), sessionRule: _enum(STAFF_REDEMPTION_SESSION_RULES).optional(), drawPolicy: _enum(STAFF_REDEMPTION_DRAW_POLICIES).optional(), fixedWinRatePercent: number2().min(0).max(100).optional(), counterOrder: _enum(STAFF_REDEMPTION_COUNTER_ORDERS).optional(), loginMethods: staffRedemptionLoginMethodsSchema.optional(), staffIdLabel: customTextOrNull(STAFF_REDEMPTION_STAFF_ID_LABEL_MAX).optional(), wrongSiteMessage: customTextOrNull(STAFF_REDEMPTION_WRONG_SITE_MESSAGE_MAX).optional(), overrideReason: reasonSchema.optional() }).strict(), upsertStaffRedemptionSiteSchema = staffRedemptionEventIdSchema.extend({ siteId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), setStaffRedemptionCrewPasswordSchema = staffRedemptionSiteIdSchema.extend({ password: stationStaffPasswordSchema }).strict(), signInToStaffRedemptionCrewSchema = staffRedemptionSiteIdSchema.extend({ password: string2().min(1).max(128) }).strict(), upsertStaffRedemptionSessionSchema = staffRedemptionEventIdSchema.extend({ sessionId: idSchema.optional(), name: nameSchema, shift: staffRedemptionShiftSchema, startsAt: exports_coerce.date().nullable().default(null), endsAt: exports_coerce.date().nullable().default(null) }).strict().refine((input) => input.startsAt === null || input.endsAt === null || input.endsAt > input.startsAt, { message: "The session must end after it starts.", path: ["endsAt"] }), setStaffRedemptionSlotSchema = staffRedemptionEventIdSchema.extend({ sessionId: idSchema, siteId: idSchema, setQuantity: quantitySchema }).strict(), rolloverSessionsShape = { fromSessionId: idSchema.describe("Session whose leftover sets and prizes move out (id from setup get). Must belong to this event and not be archived."), toSessionId: idSchema.describe("Session that receives them (id from setup get). Must differ from fromSessionId, belong to this event and not be archived.") }, rolloverReasonSchema = __name2((description) => string2().trim().min(1).max(STAFF_REDEMPTION_ROLLOVER_REASON_MAX).describe(description), "rolloverReasonSchema"), staffRedemptionRolloverPreviewSchema = staffRedemptionEventIdSchema.extend(rolloverSessionsShape).strict(), rolloverStaffRedemptionStockSchema = staffRedemptionEventIdSchema.extend({ ...rolloverSessionsShape, sets: boolean2().default(!0).describe("Move the leftover sets (set quantity minus active, not voided, redemptions) of each site. Defaults to true."), prizes: boolean2().default(!0).describe("Move the leftover prizes (stock minus prizes drawn and not released) of each site. Defaults to true."), reason: rolloverReasonSchema("Why the leftovers move (1 to 300 characters). Recorded in the activity log.") }).strict().refine((input) => input.sets || input.prizes, { message: "Choose sets, prizes or both.", path: ["sets"] }), staffRedemptionRolloversSchema = staffRedemptionEventIdSchema.extend({ limit: number2().int().min(1).max(STAFF_REDEMPTION_ROLLOVER_LIST_MAX).default(STAFF_REDEMPTION_ROLLOVER_LIST_DEFAULT).describe("How many rollovers to return, newest first (1 to 50). Defaults to 20.") }).strict(), undoStaffRedemptionRolloverSchema = staffRedemptionEventIdSchema.extend({ rolloverId: idSchema.describe("Id of the rollover to undo (id from rollover list). Must belong to this event and not be undone already."), reason: rolloverReasonSchema("Why the rollover is undone (1 to 300 characters). Recorded in the activity log.") }).strict(), upsertStaffRedemptionItemGroupSchema = staffRedemptionEventIdSchema.extend({ groupId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), upsertStaffRedemptionItemSchema = staffRedemptionEventIdSchema.extend({ itemId: idSchema.optional(), groupId: idSchema, name: nameSchema, order: orderSchema.optional() }).strict(), upsertStaffRedemptionPrizeSchema = staffRedemptionEventIdSchema.extend({ prizeId: idSchema.optional(), name: nameSchema, order: orderSchema.optional() }).strict(), setStaffRedemptionPrizeStockSchema = staffRedemptionEventIdSchema.extend({ slotId: idSchema, prizeId: idSchema, quantity: quantitySchema, reason: reasonSchema.optional() }).strict(), setStaffRedemptionArchivedSchema = staffRedemptionEventIdSchema.extend({ entity: _enum(STAFF_REDEMPTION_ARCHIVABLE), id: idSchema, archived: boolean2() }).strict(), upsertStaffRedemptionRosterEntrySchema = staffRedemptionEventIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema, name: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), siteName: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), shift: staffRedemptionShiftSchema.nullable(), workShift: string2().trim().max(STAFF_REDEMPTION_NAME_MAX).nullable(), allowance: number2().int().min(0).max(STAFF_REDEMPTION_ALLOWANCE_MAX).optional() }).strict(), rosterFiltersShape = {
10587
+ search: string2().trim().max(200).optional(),
10588
+ siteId: idSchema.optional(),
10589
+ shift: staffRedemptionShiftSchema.optional(),
10590
+ archived: _enum(["active", "archived", "all"]).default("active"),
10591
+ collected: _enum(["any", "collected", "not-collected"]).default("any")
10592
+ }, staffRedemptionRosterListSchema = staffRedemptionEventIdSchema.extend({ ...rosterFiltersShape, limit: number2().int().min(1).max(STAFF_REDEMPTION_PAGE_MAX).default(25), cursor: string2().min(1).max(8192).nullish(), direction: literal("forward").optional() }).strict(), staffRedemptionRosterCountsSchema = staffRedemptionEventIdSchema.extend(rosterFiltersShape).strict(), STAFF_REDEMPTION_EMPLOYEE_CODE_MAX = 512, lookupStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema.optional(), code: string2().trim().min(1).max(STAFF_REDEMPTION_EMPLOYEE_CODE_MAX).optional().describe("Employee QR code as scanned from the employee page. Give either employeeId or code.") }).strict().refine((input) => input.employeeId === void 0 != (input.code === void 0), { message: "Give either an Employee ID or a QR code.", path: ["employeeId"] }), claimItemIdsSchema = array(idSchema).max(STAFF_REDEMPTION_CLAIM_ITEMS_MAX).refine((ids) => new Set(
10593
+ ids
10594
+ ).size === ids.length, { message: "Pick each item once." }), redeemStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema, clientRequestId: staffRedemptionClientRequestIdSchema, itemIds: claimItemIdsSchema }).strict(), recordStaffRedemptionClaimItemsSchema = staffRedemptionSiteIdSchema.extend({ claimId: idSchema, itemIds: claimItemIdsSchema }).strict(), STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES = ["mine", "site"], staffRedemptionCounterClaimsSchema = staffRedemptionSiteIdSchema.extend({ limit: number2().int().min(1).max(50).default(20), scope: _enum(STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES).default("mine"), status: _enum(["all", "items-pending"]).default("all") }).strict(), STAFF_REDEMPTION_CLAIM_STATUSES = ["active", "items-pending", "voided", "all"], claimFiltersShape = { search: string2().trim().max(200).optional(), siteId: idSchema.optional(), sessionId: idSchema.optional(), status: _enum(STAFF_REDEMPTION_CLAIM_STATUSES).default("all") }, staffRedemptionClaimListSchema = staffRedemptionEventIdSchema.extend({ ...claimFiltersShape, limit: number2().int().min(1).max(STAFF_REDEMPTION_PAGE_MAX).default(25), cursor: string2().min(1).max(8192).nullish(), direction: literal("forward").optional() }).strict(), staffRedemptionClaimCountsSchema = staffRedemptionEventIdSchema.extend(claimFiltersShape).strict(), voidStaffRedemptionClaimSchema = staffRedemptionEventIdSchema.extend({ claimId: idSchema, reason: reasonSchema }).strict(), releaseStaffRedemptionDrawSchema = staffRedemptionEventIdSchema.extend({ drawId: idSchema, reason: reasonSchema, allowWhileClaimActive: boolean2().optional().describe("Override: release the draw even though an active (not voided) redemption still shows it, for a redemption that stays recorded (for example a paper entry with no spin). Omit to refuse while any active redemption uses the draw.") }).strict(), staffRedemptionExportSchema = staffRedemptionEventIdSchema.extend(claimFiltersShape).strict(), STAFF_REDEMPTION_ROSTER_IMPORT_MAX = 2e4, staffRedemptionRosterImportRowSchema = object({ row: number2().int().min(1), employeeId: string2().max(1e3), name: string2().max(1e3).nullable(), siteName: string2().max(1e3).nullable(), shift: string2().max(1e3).nullable(), workShift: string2().max(1e3).nullable(), allowance: string2().max(1e3).nullable() }).strict(), importStaffRedemptionRosterSchema = staffRedemptionEventIdSchema.extend({ rows: array(staffRedemptionRosterImportRowSchema).min(1).max(STAFF_REDEMPTION_ROSTER_IMPORT_MAX, "A roster can have at most ".concat(STAFF_REDEMPTION_ROSTER_IMPORT_MAX, " rows.")), archiveMissing: boolean2().default(!1) }).strict(), HEADER_PATTERNS = { employeeId: new __cliRegExp("^(employee|staff|worker)\\s*(id|no|number)$|^(emp|staff)\\s*id$", "i"), name: new __cliRegExp("^(worker|name|full\\s*name|employee\\s*name|staff\\s*name)$", "i"), siteName: new __cliRegExp("^(site|location|fab)$", "i"), shift: new __cliRegExp("^shift$", "i"), workShift: new __cliRegExp("^work\\s*shift$", "i"), allowance: new __cliRegExp("^(allowance|sets|entitlement|balance)$", "i") }, guessStaffRedemptionRosterMapping = __name2((header) => {
10595
10595
  const find = __name2((key) => {
10596
10596
  const index = header.findIndex((cell2) => HEADER_PATTERNS[key].test(cell2.trim()));
10597
10597
  return index === -1 ? null : index;
@@ -10603,7 +10603,13 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
10603
10603
  line.every((value) => !value?.trim()) || rows.push({ row: offset + 2, employeeId: line[mapping.employeeId] ?? "", name: cell2(line, mapping.name), siteName: cell2(line, mapping.siteName), shift: cell2(line, mapping.shift), workShift: cell2(line, mapping.workShift), allowance: cell2(line, mapping.allowance) });
10604
10604
  }), rows.length > STAFF_REDEMPTION_ROSTER_IMPORT_MAX) throw new Error("A roster can have at most ".concat(STAFF_REDEMPTION_ROSTER_IMPORT_MAX, " rows."));
10605
10605
  return rows;
10606
- }, "mapStaffRedemptionRosterTable"), optionalRosterColumns = [["name", "name-column"], ["siteName", "site-column"], ["shift", "shift-column"], ["workShift", "work-shift-column"], ["allowance", "allowance-column"]], rosterImportFlags = ["event-id", "file", "sheet", "employee-id-column", ...optionalRosterColumns.map(([, flag2]) => flag2), "archive-missing", "allow-state-change", "target"], exportFlags = ["event-id", "search", "site-id", "session-id", "status", "csv-file", "force"], headerIndex2 = __name2((headers, name) => {
10606
+ }, "mapStaffRedemptionRosterTable"), optionalRosterColumns = [
10607
+ ["name", "name-column"],
10608
+ ["siteName", "site-column"],
10609
+ ["shift", "shift-column"],
10610
+ ["workShift", "work-shift-column"],
10611
+ ["allowance", "allowance-column"]
10612
+ ], rosterImportFlags = ["event-id", "file", "sheet", "employee-id-column", ...optionalRosterColumns.map(([, flag2]) => flag2), "archive-missing", "allow-state-change", "target"], exportFlags = ["event-id", "search", "site-id", "session-id", "status", "csv-file", "force"], headerIndex2 = __name2((headers, name) => {
10607
10613
  const wanted = name.trim().toLowerCase(), index = headers.findIndex((header) => header.trim().toLowerCase() === wanted);
10608
10614
  if (index === -1) throw new CliUsageError('Column "'.concat(name, '" is not in the file. Headers: ').concat(headers.join(", "), "."));
10609
10615
  return index;
@@ -10634,10 +10640,7 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
10634
10640
  if (rows.length === 0) throw new CliUsageError("".concat(path2, " has a header but no data rows."));
10635
10641
  return { eventId, rows, archiveMissing: parsed.flags.get("archive-missing") === !0 };
10636
10642
  }, "prepareRosterImport"), exportFilters = __name2((parsed, eventId) => {
10637
- const checked = staffRedemptionExportSchema.safeParse({ eventId, search: getOptionalFlag(parsed, "search"), siteId: getOptionalFlag(parsed, "site-id"), sessionId: getOptionalFlag(parsed, "session-id"), status: getOptionalFlag(
10638
- parsed,
10639
- "status"
10640
- ) });
10643
+ const checked = staffRedemptionExportSchema.safeParse({ eventId, search: getOptionalFlag(parsed, "search"), siteId: getOptionalFlag(parsed, "site-id"), sessionId: getOptionalFlag(parsed, "session-id"), status: getOptionalFlag(parsed, "status") });
10641
10644
  if (!checked.success) {
10642
10645
  const issue2 = checked.error.issues[0], name = String(issue2?.path[0] ?? "filter");
10643
10646
  throw new CliUsageError(name === "status" ? "--status must be active, items-pending, voided or all." : "Invalid ".concat(name, ": ").concat(issue2?.message ?? "the value is invalid", "."));
@@ -10650,7 +10653,9 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
10650
10653
  const label = "".concat(item.groupName, ": ").concat(item.name);
10651
10654
  return item.quantity === 1 ? label : "".concat(label, " x").concat(item.quantity);
10652
10655
  }).join("; ")], ["Items recorded", (row) => row.itemsPending ? "no" : "yes"], ["Items recorded at", (row) => row.itemsRecordedAt?.toISOString() ?? null], ["Outcome", (row) => row.draw?.outcome ?? null], ["Prize", (row) => row.draw?.prize?.name ?? null], ["Operator kind", (row) => row.operatorKind], ["Voided at", (row) => row.voidedAt?.toISOString() ?? null], ["Void reason", (row) => row.voidReason], ["Draw released at", (row) => row.draw?.releasedAt?.toISOString() ?? null]], staffRedemptionClaimsToCsv = __name2((rows) => {
10653
- const lines = [csvColumns.map(([header]) => csvCell(header)).join(","), ...rows.map((row) => csvColumns.map(([, read]) => csvCell(read(row))).join(","))];
10656
+ const lines = [csvColumns.map(
10657
+ ([header]) => csvCell(header)
10658
+ ).join(","), ...rows.map((row) => csvColumns.map(([, read]) => csvCell(read(row))).join(","))];
10654
10659
  return "\uFEFF".concat(lines.join(`\r
10655
10660
  `), `\r
10656
10661
  `);
@@ -10689,350 +10694,278 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
10689
10694
  throw new CliUsageError("Unknown staff-redemption command. Run `et commands` for the registry commands and `et --help` for the rest.");
10690
10695
  }
10691
10696
  }, "runStaffRedemptionCommand"), command_manifest_default = [
10692
- { path: ["organization", "member", "list"], procedure: "organization.getOrganizationMembersById", operation: "query", summary: "List an organization's members and pending invitations (paged; expired links included until resent or canceled), with each invitation's stored emailDeliveryStatus.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" }, page: {
10693
- default: 1,
10694
- type: "integer",
10695
- exclusiveMinimum: 0,
10696
- maximum: 9007199254740991
10697
- }, perPage: { default: 10, type: "integer", minimum: 1, maximum: 100 }, search: { default: "", type: "string" } }, required: ["organizationId"] } },
10697
+ { path: ["organization", "member", "list"], procedure: "organization.getOrganizationMembersById", operation: "query", summary: "List an organization's members and pending invitations (paged; expired links included until resent or canceled), with each invitation's stored emailDeliveryStatus.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" }, page: { default: 1, type: "integer", exclusiveMinimum: 0, maximum: 9007199254740991 }, perPage: { default: 10, type: "integer", minimum: 1, maximum: 100 }, search: { default: "", type: "string" } }, required: ["organizationId"] } },
10698
10698
  { path: ["organization", "member", "list-all"], procedure: "organization.getMembersByOrganization", operation: "query", summary: "List every member of an organization without paging.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10699
- { path: ["organization", "member", "invite"], procedure: "organization.createOrganizationMember", operation: "mutation", summary: "Invite a member to an organization and email the invitation; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "email", dates: [], input: { type: "object", properties: {
10700
- email: { type: "string", format: "email", pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" },
10701
- organizationId: { type: "string", minLength: 1 },
10702
- organizationRole: { default: "MEMBER", type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] }
10703
- }, required: ["email", "organizationId"] } },
10704
- { path: ["organization", "member", "invitation-resend"], procedure: "organization.resendOrganizationMemberInvitation", operation: "mutation", summary: "Resend the invitation email to a pending legacy member invitation created before organization invitations; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 } }, required: ["organizationId", "memberId"] } },
10705
- { path: ["organization", "member", "remove"], procedure: "organization.deleteOrganizationMember", operation: "mutation", summary: "Remove a member (or leave with isLeaving) and revoke their event access.", effects: ["state-change"], target: "memberId", dates: [], input: { type: "object", properties: {
10699
+ { path: ["organization", "member", "invite"], procedure: "organization.createOrganizationMember", operation: "mutation", summary: "Invite a member to an organization and email the invitation; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "email", dates: [], input: { type: "object", properties: { email: { type: "string", format: "email", pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, organizationId: { type: "string", minLength: 1 }, organizationRole: { default: "MEMBER", type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] } }, required: ["email", "organizationId"] } },
10700
+ { path: ["organization", "member", "invitation-resend"], procedure: "organization.resendOrganizationMemberInvitation", operation: "mutation", summary: "Resend the invitation email to a pending legacy member invitation created before organization invitations; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "memberId", dates: [], input: { type: "object", properties: {
10706
10701
  organizationId: { type: "string", minLength: 1 },
10707
- memberId: { type: "string", minLength: 1 },
10708
- isLeaving: { default: !1, type: "boolean" }
10702
+ memberId: { type: "string", minLength: 1 }
10709
10703
  }, required: ["organizationId", "memberId"] } },
10704
+ { path: ["organization", "member", "remove"], procedure: "organization.deleteOrganizationMember", operation: "mutation", summary: "Remove a member (or leave with isLeaving) and revoke their event access.", effects: ["state-change"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 }, isLeaving: { default: !1, type: "boolean" } }, required: ["organizationId", "memberId"] } },
10710
10705
  { path: ["organization", "member", "role-update"], procedure: "organization.updateOrganizationMemberRole", operation: "mutation", summary: "Change an organization member's role.", effects: ["state-change"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 }, newRole: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] } }, required: ["organizationId", "memberId", "newRole"] } },
10711
10706
  { path: ["organization", "owner", "transfer"], procedure: "organization.transferOwnership", operation: "mutation", summary: "Transfer organization ownership to another active member.", effects: ["state-change"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 } }, required: ["organizationId", "memberId"] } },
10712
- {
10713
- path: ["organization", "invitation", "get"],
10714
- procedure: "organization.getInvitation",
10715
- operation: "query",
10716
- summary: "Get one event or organization access invitation by ID.",
10717
- effects: [],
10718
- dates: [],
10719
- input: { type: "object", properties: { invitationId: { type: "string", minLength: 1 } }, required: ["invitationId"] }
10720
- },
10707
+ { path: ["organization", "invitation", "get"], procedure: "organization.getInvitation", operation: "query", summary: "Get one event or organization access invitation by ID.", effects: [], dates: [], input: { type: "object", properties: { invitationId: { type: "string", minLength: 1 } }, required: ["invitationId"] } },
10721
10708
  { path: ["organization", "invitation", "list-mine"], procedure: "organization.getInvitedMemberships", operation: "query", summary: "List organization invitations addressed to the current user.", effects: [], dates: [], input: null },
10722
10709
  { path: ["organization", "invitation", "organization"], procedure: "organization.getInvitedOrganizationById", operation: "query", summary: "Get the organization behind an invitation addressed to the current user.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10723
- { path: ["organization", "invitation", "accept"], procedure: "organization.acceptInvitation", operation: "mutation", summary: "Accept the current user's invitation to an organization.", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: {
10724
- type: "string"
10725
- } }, required: ["organizationId"] } },
10710
+ { path: ["organization", "invitation", "accept"], procedure: "organization.acceptInvitation", operation: "mutation", summary: "Accept the current user's invitation to an organization.", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10726
10711
  { path: ["organization", "invitation", "reject"], procedure: "organization.rejectInvitation", operation: "mutation", summary: "Reject the current user's invitation to an organization.", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10727
10712
  { path: ["organization", "invitation", "accept-access"], procedure: "organization.acceptAccessInvitation", operation: "mutation", summary: "Accept an access invitation (organization or event staff) by invitation ID.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: { invitationId: { type: "string", minLength: 1 } }, required: ["invitationId"] } },
10728
- { path: ["organization", "invitation", "reject-access"], procedure: "organization.rejectAccessInvitation", operation: "mutation", summary: "Reject an access invitation by invitation ID.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: {
10729
- invitationId: { type: "string", minLength: 1 }
10730
- }, required: ["invitationId"] } },
10713
+ { path: ["organization", "invitation", "reject-access"], procedure: "organization.rejectAccessInvitation", operation: "mutation", summary: "Reject an access invitation by invitation ID.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: { invitationId: { type: "string", minLength: 1 } }, required: ["invitationId"] } },
10731
10714
  { path: ["organization", "invitation", "cancel"], procedure: "organization.cancelInvitation", operation: "mutation", summary: "Cancel a pending organization invitation.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, invitationId: { type: "string", minLength: 1 } }, required: ["organizationId", "invitationId"] } },
10732
10715
  { path: ["organization", "invitation", "resend"], procedure: "organization.resendInvitation", operation: "mutation", summary: "Replace a pending organization invitation (including an expired one) and email a fresh link; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "invitationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, invitationId: { type: "string", minLength: 1 } }, required: ["organizationId", "invitationId"] } },
10733
10716
  { path: ["organization", "update"], procedure: "organization.updateOrganizationById", operation: "mutation", summary: "Update organization details. name is required; omitted optional fields are unchanged.", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, name: { type: "string", minLength: 1 }, slug: { type: "string" }, description: { type: "string" }, website: { anyOf: [{ type: "string", format: "uri" }, { type: "string", const: "" }] }, email: { anyOf: [{ type: "string", format: "email", pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, { type: "string", const: "" }] }, allowedEventTypes: { type: "array", items: { type: "string", enum: ["POST_IT_NOTE", "PHOTO_WALL", "STORY_COLLECTION", "LUCKY_DRAW", "SCAVENGER_HUNT", "HUMAN_BINGO", "SIGNATURE_WALL", "GARDENS_BY_THE_BAY", "RATING_SYSTEM", "EVENT_PASSPORT", "STAFF_REDEMPTION"] } }, image: { type: ["string", "null"] } }, required: ["organizationId", "name"] } },
10734
10717
  { path: ["organization", "image", "update"], procedure: "organization.updateOrganizationImageById", operation: "mutation", summary: "Set the organization image to an uploaded key (see et upload, folder organization-images).", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string" }, image: { type: ["string", "null"] } }, required: ["organizationId", "image"] } },
10735
- { path: ["organization", "archive"], procedure: "organization.archiveOrganization", operation: "mutation", summary: "Archive an organization as its owner.", effects: ["state-change"], target: "organizationId", dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10718
+ {
10719
+ path: ["organization", "archive"],
10720
+ procedure: "organization.archiveOrganization",
10721
+ operation: "mutation",
10722
+ summary: "Archive an organization as its owner.",
10723
+ effects: ["state-change"],
10724
+ target: "organizationId",
10725
+ dates: [],
10726
+ input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] }
10727
+ },
10736
10728
  { path: ["organization", "access", "check"], procedure: "organization.checkOrganizationAccess", operation: "query", summary: "Check the current user's access to an organization.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10737
10729
  { path: ["organization", "dashboard"], procedure: "organization.getOrganizationDashboardStats", operation: "query", summary: "Get an organization's dashboard totals.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10738
10730
  { path: ["organization", "analytics"], procedure: "organization.getOrganizationEventAnalytics", operation: "query", summary: "Get per-event analytics for an organization.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10739
- { path: ["organization", "event-types"], procedure: "organization.getAllowedEventTypeByOrganizationId", operation: "query", summary: "List the event types an organization may create.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] } },
10731
+ {
10732
+ path: ["organization", "event-types"],
10733
+ procedure: "organization.getAllowedEventTypeByOrganizationId",
10734
+ operation: "query",
10735
+ summary: "List the event types an organization may create.",
10736
+ effects: [],
10737
+ dates: [],
10738
+ input: { type: "object", properties: { organizationId: { type: "string" } }, required: ["organizationId"] }
10739
+ },
10740
10740
  { path: ["organization", "onboarding"], procedure: "organization.getOnboardingState", operation: "query", summary: "Get the current user's onboarding state.", effects: [], dates: [], input: null },
10741
10741
  { path: ["admin", "organization", "list"], procedure: "admin.organization.getOrganizations", operation: "query", summary: "List every organization (paged, searchable) as a global admin.", effects: [], dates: [], input: { type: "object", properties: { archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 6, type: "number", minimum: 1, maximum: 100 }, search: { default: "", type: "string" } } } },
10742
10742
  { path: ["admin", "organization", "get"], procedure: "admin.organization.getOrganization", operation: "query", summary: "Get any organization by ID as a global admin.", effects: [], dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10743
- { path: ["admin", "organization", "members"], procedure: "admin.organization.getOrganizationMembers", operation: "query", summary: "List an organization's members as a global admin, plus pendingInvitations not yet accepted (expired links included; shown when status is ALL or PENDING, filtered by search and role).", effects: [], dates: [], input: { type: "object", properties: { organizationId: {
10744
- type: "string"
10745
- }, search: { default: "", type: "string" }, role: { default: "ALL", type: "string", enum: ["ALL", "ADMIN", "MEMBER"] }, status: { default: "ALL", type: "string", enum: ["ALL", "PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] } }, required: ["organizationId"] } },
10743
+ { path: ["admin", "organization", "members"], procedure: "admin.organization.getOrganizationMembers", operation: "query", summary: "List an organization's members as a global admin, plus pendingInvitations not yet accepted (expired links included; shown when status is ALL or PENDING, filtered by search and role).", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" }, search: { default: "", type: "string" }, role: { default: "ALL", type: "string", enum: ["ALL", "ADMIN", "MEMBER"] }, status: { default: "ALL", type: "string", enum: ["ALL", "PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] } }, required: ["organizationId"] } },
10746
10744
  { path: ["admin", "organization", "stats"], procedure: "organization.getOrganizationStats", operation: "query", summary: "Get platform-wide organization totals as a global admin.", effects: [], dates: [], input: null },
10747
10745
  { path: ["admin", "organization", "archive"], procedure: "admin.organization.archiveOrganization", operation: "mutation", summary: "Archive any organization as a global admin.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10748
- { path: ["admin", "organization", "restore"], procedure: "admin.organization.restoreOrganization", operation: "mutation", summary: "Restore an archived organization as a global admin.", effects: ["state-change"], target: "id", dates: [], input: {
10749
- type: "object",
10750
- properties: { id: { type: "string" } },
10751
- required: ["id"]
10752
- } },
10746
+ { path: ["admin", "organization", "restore"], procedure: "admin.organization.restoreOrganization", operation: "mutation", summary: "Restore an archived organization as a global admin.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10753
10747
  { path: ["admin", "event", "list"], procedure: "admin.event.getEvents", operation: "query", summary: "List an organization's events as a global admin.", effects: [], dates: [], input: { type: "object", properties: { organizationId: { type: "string" }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] }, limit: { default: 50, type: "number", minimum: 1, maximum: 100 }, offset: { default: 0, type: "number", minimum: 0 } }, required: ["organizationId"] } },
10754
10748
  { path: ["admin", "event", "get"], procedure: "admin.event.getEvent", operation: "query", summary: "Get any event by ID as a global admin.", effects: [], dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10755
- { path: ["admin", "member", "list"], procedure: "admin.member.getAllMembers", operation: "query", summary: "List organization members across every organization (paged; filter by search, organizationId, role, status, joinedFrom/joinedTo).", effects: [], dates: ["joinedFrom", "joinedTo"], input: { type: "object", properties: { search: {
10756
- type: "string",
10757
- maxLength: 200
10758
- }, organizationId: { type: "string", minLength: 1 }, role: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] }, status: { type: "string", enum: ["PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] }, joinedFrom: { type: "string", format: "date-time" }, joinedTo: { type: "string", format: "date-time" }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 2048 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, additionalProperties: !1 } },
10749
+ { path: ["admin", "member", "list"], procedure: "admin.member.getAllMembers", operation: "query", summary: "List organization members across every organization (paged; filter by search, organizationId, role, status, joinedFrom/joinedTo).", effects: [], dates: ["joinedFrom", "joinedTo"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, role: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] }, status: { type: "string", enum: ["PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] }, joinedFrom: { type: "string", format: "date-time" }, joinedTo: { type: "string", format: "date-time" }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 2048 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, additionalProperties: !1 } },
10759
10750
  { path: ["admin", "member", "count"], procedure: "admin.member.getMemberCounts", operation: "query", summary: "Count members matching the list filters, with role and status splits.", effects: [], dates: ["joinedFrom", "joinedTo"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, role: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] }, status: { type: "string", enum: ["PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] }, joinedFrom: { type: "string", format: "date-time" }, joinedTo: { type: "string", format: "date-time" } }, additionalProperties: !1 } },
10760
10751
  { path: ["admin", "member", "export"], procedure: "admin.member.exportMembers", operation: "query", summary: "Export every member matching the list filters (fails above 5,000 rows).", effects: [], dates: ["joinedFrom", "joinedTo"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, role: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] }, status: { type: "string", enum: ["PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"] }, joinedFrom: { type: "string", format: "date-time" }, joinedTo: { type: "string", format: "date-time" } }, additionalProperties: !1 } },
10761
10752
  { path: ["admin", "member", "role-update"], procedure: "admin.member.updateMemberRole", operation: "mutation", summary: "Change any organization member's role as a global admin.", effects: ["state-change"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 }, newRole: { type: "string", enum: ["OWNER", "ADMIN", "MEMBER"] } }, required: ["organizationId", "memberId", "newRole"] } },
10762
10753
  { path: ["admin", "member", "remove"], procedure: "admin.member.removeMember", operation: "mutation", summary: "Remove a member from an organization and delete their allowed-email entries.", effects: ["state-change", "delete"], target: "memberId", dates: [], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, memberId: { type: "string", minLength: 1 } }, required: ["organizationId", "memberId"] } },
10763
- { path: ["admin", "activity", "list"], procedure: "admin.activity.getAll", operation: "query", summary: "List organization and member activity-log events (paged; filter by search, organizationId, eventType, from/to).", effects: [], dates: ["from", "to"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, eventType: { type: "string", enum: [
10764
- "organization_provisioned",
10765
- "organization_updated",
10766
- "organization_archived",
10767
- "organization_restored",
10768
- "member_invited",
10769
- "member_joined",
10770
- "member_role_changed",
10771
- "member_invitation_rejected",
10772
- "member_left",
10773
- "member_removed",
10774
- "ownership_transferred"
10775
- ] }, from: { type: "string", format: "date-time" }, to: { type: "string", format: "date-time" }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 2048 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, additionalProperties: !1 } },
10754
+ { path: ["admin", "activity", "list"], procedure: "admin.activity.getAll", operation: "query", summary: "List organization and member activity-log events (paged; filter by search, organizationId, eventType, from/to).", effects: [], dates: ["from", "to"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, eventType: { type: "string", enum: ["organization_provisioned", "organization_updated", "organization_archived", "organization_restored", "member_invited", "member_joined", "member_role_changed", "member_invitation_rejected", "member_left", "member_removed", "ownership_transferred"] }, from: { type: "string", format: "date-time" }, to: { type: "string", format: "date-time" }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 2048 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, additionalProperties: !1 } },
10776
10755
  { path: ["admin", "activity", "count"], procedure: "admin.activity.getCounts", operation: "query", summary: "Count activity matching the filters, with 30-day daily and type splits.", effects: [], dates: ["from", "to"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, eventType: { type: "string", enum: ["organization_provisioned", "organization_updated", "organization_archived", "organization_restored", "member_invited", "member_joined", "member_role_changed", "member_invitation_rejected", "member_left", "member_removed", "ownership_transferred"] }, from: { type: "string", format: "date-time" }, to: { type: "string", format: "date-time" } }, additionalProperties: !1 } },
10777
10756
  { path: ["admin", "activity", "export"], procedure: "admin.activity.export", operation: "query", summary: "Export every activity event matching the filters (fails above 5,000 rows).", effects: [], dates: ["from", "to"], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, organizationId: { type: "string", minLength: 1 }, eventType: { type: "string", enum: ["organization_provisioned", "organization_updated", "organization_archived", "organization_restored", "member_invited", "member_joined", "member_role_changed", "member_invitation_rejected", "member_left", "member_removed", "ownership_transferred"] }, from: { type: "string", format: "date-time" }, to: { type: "string", format: "date-time" } }, additionalProperties: !1 } },
10778
10757
  { path: ["admin", "dashboard", "event-analytics"], procedure: "admin.dashboard.getEventAnalytics", operation: "query", summary: "Get platform event analytics as a global admin.", effects: [], dates: [], input: null },
10779
10758
  { path: ["admin", "user", "list"], procedure: "admin.user.getUsers", operation: "query", summary: "List users A to Z by name (paged; filter by search).", effects: [], dates: [], input: { type: "object", properties: { search: { type: "string", maxLength: 200 }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 2048 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, additionalProperties: !1 } },
10780
10759
  { path: ["admin", "user", "get"], procedure: "admin.user.getUserById", operation: "query", summary: "Get one user as a global admin.", effects: [], dates: [], input: { type: "object", properties: { userId: { type: "string", minLength: 1 } }, required: ["userId"] } },
10781
10760
  { path: ["admin", "user", "role-update"], procedure: "admin.user.updateSystemRole", operation: "mutation", summary: "Change a user's system role (ADMIN, USER, GUEST).", effects: ["state-change"], target: "userId", dates: [], input: { type: "object", properties: { role: { type: "string", enum: ["ADMIN", "USER", "GUEST"] }, userId: { type: "string", minLength: 1 } }, required: ["role", "userId"] } },
10782
- {
10783
- path: ["event", "access", "mine"],
10784
- procedure: "access.getMyEventAccess",
10785
- operation: "query",
10786
- summary: "Show the current user's role and permissions for an event.",
10787
- effects: [],
10788
- dates: [],
10789
- input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, allowArchived: { type: "boolean" } }, required: ["eventId", "organizationId"] }
10790
- },
10761
+ { path: ["event", "access", "mine"], procedure: "access.getMyEventAccess", operation: "query", summary: "Show the current user's role and permissions for an event.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, allowArchived: { type: "boolean" } }, required: ["eventId", "organizationId"] } },
10791
10762
  { path: ["event", "access", "my-assignments"], procedure: "access.listMyEventAssignments", operation: "query", summary: "List the current user's own event staff assignments in an organization (optionally one eventId), each with status ACTIVE, SCHEDULED, ENDED or REVOKED.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 } }, required: ["organizationId"] } },
10792
10763
  { path: ["event", "access", "list"], procedure: "access.listEventAssignments", operation: "query", summary: "List event staff assignments and pending staff invitations (expired links included until resent or revoked), with each invitation's stored emailDeliveryStatus.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId"] } },
10793
- { path: ["event", "access", "invite"], procedure: "access.inviteEventStaff", operation: "mutation", summary: "Invite event staff by email; roles include HELPDESK for Event Passport roster lookup and new entries only. Reports deliveryStatus and the stored emailDeliveryStatus. startsAt/expiresAt are ISO date-times or null; set expiresAt for temporary access.", effects: ["state-change", "email"], target: "email", dates: ["expiresAt", "startsAt"], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, canExport: { default: !1, type: "boolean" }, email: { type: "string" }, expiresAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, role: { type: "string", enum: ["MANAGER", "OPERATOR", "VIEWER", "HELPDESK"] }, startsAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] } }, required: [
10794
- "eventId",
10795
- "organizationId",
10796
- "email",
10797
- "role"
10798
- ] } },
10799
- { path: ["event", "access", "invitation-resend"], procedure: "access.resendEventStaffInvitation", operation: "mutation", summary: "Replace a pending event staff invitation (including an expired one) and email a fresh link; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "invitationId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, invitationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "invitationId"] } },
10800
- { path: ["event", "access", "invitation-revoke"], procedure: "access.revokeEventStaffInvitation", operation: "mutation", summary: "Revoke a pending event staff invitation.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, invitationId: { type: "string", minLength: 1 } }, required: [
10801
- "eventId",
10802
- "organizationId",
10803
- "invitationId"
10804
- ] } },
10805
- { path: ["event", "access", "assign"], procedure: "access.upsertEventAssignment", operation: "mutation", summary: "Create or update an existing user's event staff assignment. HELPDESK can look up the Event Passport roster and add new entries only; set expiresAt for temporary access.", effects: ["state-change"], target: "userId", dates: ["expiresAt", "startsAt"], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, canExport: { default: !1, type: "boolean" }, expiresAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, role: { type: "string", enum: ["MANAGER", "OPERATOR", "VIEWER", "HELPDESK"] }, startsAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, userId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "role", "userId"] } },
10806
- {
10807
- path: ["event", "access", "revoke"],
10808
- procedure: "access.revokeEventAssignment",
10809
- operation: "mutation",
10810
- summary: "Revoke a user's event staff assignment.",
10811
- effects: ["state-change"],
10812
- target: "userId",
10813
- dates: [],
10814
- input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, userId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "userId"] }
10815
- },
10764
+ { path: ["event", "access", "invite"], procedure: "access.inviteEventStaff", operation: "mutation", summary: "Invite event staff by email; roles include HELPDESK for Event Passport roster lookup and new entries only. Reports deliveryStatus and the stored emailDeliveryStatus. startsAt/expiresAt are ISO date-times or null; set expiresAt for temporary access.", effects: ["state-change", "email"], target: "email", dates: ["expiresAt", "startsAt"], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, canExport: { default: !1, type: "boolean" }, email: { type: "string" }, expiresAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, role: { type: "string", enum: ["MANAGER", "OPERATOR", "VIEWER", "HELPDESK"] }, startsAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] } }, required: ["eventId", "organizationId", "email", "role"] } },
10765
+ { path: ["event", "access", "invitation-resend"], procedure: "access.resendEventStaffInvitation", operation: "mutation", summary: "Replace a pending event staff invitation (including an expired one) and email a fresh link; reports deliveryStatus and the stored emailDeliveryStatus.", effects: ["state-change", "email"], target: "invitationId", dates: [], input: { type: "object", properties: {
10766
+ eventId: { type: "string", minLength: 1 },
10767
+ organizationId: { type: "string", minLength: 1 },
10768
+ invitationId: { type: "string", minLength: 1 }
10769
+ }, required: ["eventId", "organizationId", "invitationId"] } },
10770
+ { path: ["event", "access", "invitation-revoke"], procedure: "access.revokeEventStaffInvitation", operation: "mutation", summary: "Revoke a pending event staff invitation.", effects: ["state-change"], target: "invitationId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, invitationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "invitationId"] } },
10771
+ { path: ["event", "access", "assign"], procedure: "access.upsertEventAssignment", operation: "mutation", summary: "Create or update an existing user's event staff assignment. HELPDESK can look up the Event Passport roster and add new entries only; set expiresAt for temporary access.", effects: ["state-change"], target: "userId", dates: ["expiresAt", "startsAt"], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, canExport: {
10772
+ default: !1,
10773
+ type: "boolean"
10774
+ }, expiresAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, role: { type: "string", enum: ["MANAGER", "OPERATOR", "VIEWER", "HELPDESK"] }, startsAt: { anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, userId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "role", "userId"] } },
10775
+ { path: ["event", "access", "revoke"], procedure: "access.revokeEventAssignment", operation: "mutation", summary: "Revoke a user's event staff assignment.", effects: ["state-change"], target: "userId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 }, userId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId", "userId"] } },
10816
10776
  { path: ["activity", "list"], procedure: "activity.getByResource", operation: "query", summary: "List the activity log for an organization, event or other resource (cursor paged).", effects: [], dates: ["startAt", "endAt"], input: { type: "object", properties: { organizationId: { type: "string" }, resourceType: { type: "string", minLength: 1 }, resourceId: { type: "string", minLength: 1 }, eventId: { type: "string" }, includeEventChildren: { default: !1, type: "boolean" }, eventCategory: { type: "string", enum: ["ORGANIZATION", "MEMBER", "EVENT", "CONFIG", "SUBMISSION", "PARTICIPANT", "EXPORT", "SYSTEM"] }, actorUserId: { type: "string" }, startAt: { type: "string", format: "date-time" }, endAt: { type: "string", format: "date-time" }, cursor: { type: "string" }, limit: { default: 25, type: "number", minimum: 1, maximum: 50 } }, required: ["organizationId", "resourceType", "resourceId"] } },
10817
10777
  { path: ["event", "recent"], procedure: "event.getRecentEvents", operation: "query", summary: "List the events the current user opened most recently.", effects: [], dates: [], input: null },
10818
10778
  { path: ["event", "details"], procedure: "event.getEventById", operation: "query", summary: "Get an event's full details (description, tags, background, dates).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 } }, required: ["eventId"] } },
10819
10779
  { path: ["event", "update"], procedure: "event.updateEvent", operation: "mutation", summary: "Replace an event's details. Send every field from event details; dates are ISO.", effects: ["state-change"], target: "id", dates: ["eventDateRange.from", "eventDateRange.to"], input: { type: "object", properties: { organizationId: { type: "string", minLength: 1 }, name: { type: "string", minLength: 1, maxLength: 100 }, type: { type: "string", enum: ["POST_IT_NOTE", "PHOTO_WALL", "STORY_COLLECTION", "LUCKY_DRAW", "SCAVENGER_HUNT", "HUMAN_BINGO", "SIGNATURE_WALL", "GARDENS_BY_THE_BAY", "RATING_SYSTEM", "EVENT_PASSPORT", "STAFF_REDEMPTION"] }, descriptionDelta: {}, descriptionRichText: { anyOf: [{}, { type: "null" }] }, filtering: { type: "boolean" }, location: { type: "string", minLength: 1 }, eventDateRange: { type: "object", properties: { from: { type: "string", format: "date-time" }, to: { type: "string", format: "date-time" } }, required: ["from"] }, tags: { type: "array", items: { type: "string" } }, backgroundImageKey: { type: ["string", "null"] }, id: { type: "string", minLength: 1 } }, required: ["organizationId", "name", "type", "location", "eventDateRange", "id"] } },
10820
- { path: ["event", "status-update"], procedure: "event.updateEventStatus", operation: "mutation", summary: "Set an event's status (DRAFT, ONGOING, COMPLETED).", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, organizationId: { type: "string" }, status: { type: "string", enum: ["DRAFT", "ONGOING", "COMPLETED"] } }, required: ["eventId", "organizationId", "status"] } },
10821
- { path: ["event", "archive"], procedure: "event.archiveEvent", operation: "mutation", summary: "Archive an event.", effects: [
10822
- "state-change"
10823
- ], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId"] } },
10780
+ { path: [
10781
+ "event",
10782
+ "status-update"
10783
+ ], procedure: "event.updateEventStatus", operation: "mutation", summary: "Set an event's status (DRAFT, ONGOING, COMPLETED).", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, organizationId: { type: "string" }, status: { type: "string", enum: ["DRAFT", "ONGOING", "COMPLETED"] } }, required: ["eventId", "organizationId", "status"] } },
10784
+ { path: ["event", "archive"], procedure: "event.archiveEvent", operation: "mutation", summary: "Archive an event.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId"] } },
10824
10785
  { path: ["event", "restore"], procedure: "event.restoreEvent", operation: "mutation", summary: "Restore an archived event.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, organizationId: { type: "string", minLength: 1 } }, required: ["eventId", "organizationId"] } },
10825
10786
  { path: ["event", "duplicate"], procedure: "event.duplicateEvent", operation: "mutation", summary: "Duplicate an event and its setup into a new draft.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10826
- { path: ["event", "export"], procedure: "event.getEventDataToExport", operation: "query", summary: "Export an event's submissions and results.", effects: [], dates: [], input: {
10827
- type: "object",
10828
- properties: { eventId: { type: "string" } },
10829
- required: ["eventId"]
10830
- } },
10787
+ { path: ["event", "export"], procedure: "event.getEventDataToExport", operation: "query", summary: "Export an event's submissions and results.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10831
10788
  { path: ["event", "retired", "export"], procedure: "event.getRetiredEventExport", operation: "query", summary: "Export a retired Scavenger Hunt or Gardens by the Bay event (read-only): full setup and results with stable IDs, archived rows marked by archivedAt, and 1-hour signed media links. These types cannot be created or edited.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10832
10789
  { path: ["event", "background", "get"], procedure: "event.getEventBackgroundImage", operation: "query", summary: "Get an event's background image URL.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10833
10790
  { path: ["event", "story", "list"], procedure: "event.getStoryItemsByEventId", operation: "query", summary: "List Story Collection submissions (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, email: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 5, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10834
10791
  { path: ["event", "story", "archive"], procedure: "event.archiveStoryItems", operation: "mutation", summary: "Archive Story Collection submissions by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, ids: { type: "array", items: { type: "string" } } }, required: ["eventId", "ids"] } },
10835
- { path: ["lucky-draw", "passport-sync"], procedure: "event.luckyDraw.getPassportDrawSyncStatus", operation: "query", summary: "Show whether a Passport-linked draw roster is in sync.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 } }, required: ["eventId"] } },
10836
- { path: ["lucky-draw", "participants", "eligible"], procedure: "event.luckyDraw.getFilteredLuckyDrawParticipantsByEventId", operation: "query", summary: "List participants still eligible after domain/email filters and winners.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: [
10837
- "eventId"
10838
- ] } },
10792
+ {
10793
+ path: ["lucky-draw", "passport-sync"],
10794
+ procedure: "event.luckyDraw.getPassportDrawSyncStatus",
10795
+ operation: "query",
10796
+ summary: "Show whether a Passport-linked draw roster is in sync.",
10797
+ effects: [],
10798
+ dates: [],
10799
+ input: { type: "object", properties: { eventId: { type: "string", minLength: 1 } }, required: ["eventId"] }
10800
+ },
10801
+ { path: ["lucky-draw", "participants", "eligible"], procedure: "event.luckyDraw.getFilteredLuckyDrawParticipantsByEventId", operation: "query", summary: "List participants still eligible after domain/email filters and winners.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10839
10802
  { path: ["lucky-draw", "wheel", "participants"], procedure: "event.luckyDraw.getLuckyDrawWheelParticipantsByEventId", operation: "query", summary: "List the participants currently shown on the draw board.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10840
- { path: ["lucky-draw", "boards", "list"], procedure: "event.luckyDraw.getLuckyDrawItemsByEventId", operation: "query", summary: "List an event's lucky draw boards (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10803
+ { path: ["lucky-draw", "boards", "list"], procedure: "event.luckyDraw.getLuckyDrawItemsByEventId", operation: "query", summary: "List an event's lucky draw boards (paged).", effects: [], dates: [], input: {
10804
+ type: "object",
10805
+ properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } },
10806
+ required: ["eventId"]
10807
+ } },
10841
10808
  { path: ["lucky-draw", "winners", "list"], procedure: "event.luckyDraw.getLuckyDrawPrizesWinnerByEventId", operation: "query", summary: "List prizes with their winners.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10842
10809
  { path: ["lucky-draw", "winners", "accept"], procedure: "event.luckyDraw.acceptWinner", operation: "mutation", summary: "Assign a prize to a drawn participant.", effects: ["state-change"], target: "winnerLuckyDrawParticipantId", dates: [], input: { type: "object", properties: { winnerLuckyDrawParticipantId: { type: "string" }, winnerLuckyDrawPrizeId: { type: "string" } }, required: ["winnerLuckyDrawParticipantId", "winnerLuckyDrawPrizeId"] } },
10843
10810
  { path: ["lucky-draw", "winners", "remove"], procedure: "event.luckyDraw.removeLuckyDrawPrize", operation: "mutation", summary: "Take the prize back from a winning participant.", effects: ["state-change"], target: "participantId", dates: [], input: { type: "object", properties: { participantId: { type: "string" } }, required: ["participantId"] } },
10844
- { path: ["lucky-draw", "participants", "delete"], procedure: "event.luckyDraw.deleteLuckyDrawParticipant", operation: "mutation", summary: "Permanently delete participants by ID. --target is the comma-joined ids.", effects: ["state-change", "delete"], target: "ids", dates: [], input: { type: "object", properties: { eventId: {
10845
- type: "string"
10846
- }, ids: { type: "array", items: { type: "string" } } }, required: ["eventId", "ids"] } },
10811
+ { path: ["lucky-draw", "participants", "delete"], procedure: "event.luckyDraw.deleteLuckyDrawParticipant", operation: "mutation", summary: "Permanently delete participants by ID. --target is the comma-joined ids.", effects: ["state-change", "delete"], target: "ids", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, ids: { type: "array", items: { type: "string" } } }, required: ["eventId", "ids"] } },
10847
10812
  { path: ["passport", "lucky-draws"], procedure: "event.passport.getAvailableLuckyDraws", operation: "query", summary: "List lucky draw events a Passport can link to.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 } }, required: ["eventId"] } },
10848
10813
  { path: ["passport", "operator-metadata"], procedure: "event.passport.getPassportOperatorMetadata", operation: "query", summary: "Get the staff operator view metadata (stations, prizes, permissions).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 } }, required: ["eventId"] } },
10849
- { path: ["photo-wall", "items", "list"], procedure: "event.photoWall.getPhotoWallItemsByEventId", operation: "query", summary: "List Photo Wall photos (paged).", effects: [], dates: [], input: {
10850
- type: "object",
10851
- properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 5, type: "number", minimum: 1, maximum: 100 } },
10852
- required: ["eventId"]
10853
- } },
10814
+ { path: ["photo-wall", "items", "list"], procedure: "event.photoWall.getPhotoWallItemsByEventId", operation: "query", summary: "List Photo Wall photos (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 5, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10854
10815
  { path: ["photo-wall", "items", "archive"], procedure: "event.photoWall.archivePhotoWallItems", operation: "mutation", summary: "Archive Photo Wall photos by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, ids: { type: "array", items: { type: "string" } } }, required: ["eventId", "ids"] } },
10855
10816
  { path: ["photo-wall", "submissions", "list"], procedure: "event.photoWall.getPhotoWallSubmissionForApproval", operation: "query", summary: "List Photo Wall submissions for moderation (filter by state).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, state: { default: "PENDING", type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 6, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10856
10817
  { path: ["photo-wall", "submissions", "respond"], procedure: "event.photoWall.respondToPhotoWallSubmission", operation: "mutation", summary: "Approve or reject a Photo Wall submission.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, id: { type: "string" }, status: { type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] } }, required: ["eventId", "id", "status"] } },
10857
- { path: ["photo-wall", "display-link"], procedure: "event.photoWall.getPhotoWallDisplayLink", operation: "mutation", summary: "Get the Photo Wall display link, creating its access code on first use.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 128, pattern: "^[a-zA-Z0-9_-]+$" } }, required: ["eventId"] } },
10858
- { path: ["post-it", "notes", "list"], procedure: "event.postItNote.getPostItNotesByEventId", operation: "query", summary: "List approved Post-it Notes (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: [
10859
- "eventId"
10860
- ] } },
10861
- { path: ["post-it", "notes", "list-all"], procedure: "event.postItNote.getAllPostItNotesByEventId", operation: "query", summary: "List every Post-it Note for an event.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10862
- { path: ["post-it", "notes", "table"], procedure: "event.postItNote.getPostItNoteTable", operation: "query", summary: "List Post-it Notes in the admin table shape (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10863
- { path: ["post-it", "notes", "archive"], procedure: "event.postItNote.archivePostItNotes", operation: "mutation", summary: "Archive Post-it Notes by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: {
10818
+ { path: ["photo-wall", "display-link"], procedure: "event.photoWall.getPhotoWallDisplayLink", operation: "mutation", summary: "Get the Photo Wall display link, creating its access code on first use.", effects: ["state-change"], target: "eventId", dates: [], input: {
10864
10819
  type: "object",
10865
- properties: { eventId: { type: "string" }, ids: { type: "array", items: { type: "string" } } },
10866
- required: ["eventId", "ids"]
10820
+ properties: { eventId: { type: "string", minLength: 1, maxLength: 128, pattern: "^[a-zA-Z0-9_-]+$" } },
10821
+ required: ["eventId"]
10867
10822
  } },
10823
+ { path: ["post-it", "notes", "list"], procedure: "event.postItNote.getPostItNotesByEventId", operation: "query", summary: "List approved Post-it Notes (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10824
+ { path: ["post-it", "notes", "list-all"], procedure: "event.postItNote.getAllPostItNotesByEventId", operation: "query", summary: "List every Post-it Note for an event.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10825
+ { path: ["post-it", "notes", "table"], procedure: "event.postItNote.getPostItNoteTable", operation: "query", summary: "List Post-it Notes in the admin table shape (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: {
10826
+ type: "string"
10827
+ }, name: { type: "string" }, note: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10828
+ { path: ["post-it", "notes", "archive"], procedure: "event.postItNote.archivePostItNotes", operation: "mutation", summary: "Archive Post-it Notes by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, ids: { type: "array", items: { type: "string" } } }, required: ["eventId", "ids"] } },
10868
10829
  { path: ["post-it", "submissions", "list"], procedure: "event.postItNote.getPostItNoteSubmissionForApproval", operation: "query", summary: "List Post-it Note submissions for moderation.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, note: { type: "string" }, state: { type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 6, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10869
10830
  { path: ["post-it", "submissions", "respond"], procedure: "event.postItNote.respondToPostItNoteSubmission", operation: "mutation", summary: "Approve or reject a Post-it Note submission.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, id: { type: "string" }, status: { type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] } }, required: ["eventId", "id", "status"] } },
10870
10831
  { path: ["signature-wall", "config", "get"], procedure: "event.signatureWall.getSignatureWallByEventId", operation: "query", summary: "Get the Signature Wall config.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10871
10832
  { path: ["signature-wall", "config", "update"], procedure: "event.signatureWall.updateSignatureWallConfigs", operation: "mutation", summary: "Replace the Signature Wall config.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, config: { type: "object", properties: { backgroundColor: { type: "string" }, titleColor: { type: "string" }, titleFontSize: { type: "number" }, titleFont: { type: "string" }, title: { type: "string" }, cardBackgroundColor: { type: "string" }, cardBorderColor: { type: "string" }, nameColor: { type: "string" }, nameCardBackgroundColor: { type: "string" }, nameCardBorderColor: { type: "string" }, animationVideoKey: { type: ["string", "null"] }, signatureCounts: { type: "number" } }, required: ["backgroundColor", "titleColor", "titleFontSize", "titleFont", "title", "cardBackgroundColor", "cardBorderColor", "nameColor", "nameCardBackgroundColor", "nameCardBorderColor"] } }, required: ["eventId", "config"] } },
10872
10833
  { path: ["signature-wall", "signatures", "list"], procedure: "event.signatureWall.getSignatureTable", operation: "query", summary: "List signatures (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 } }, required: ["eventId"] } },
10873
10834
  { path: ["signature-wall", "signatures", "strokes"], procedure: "event.signatureWall.getSignatureStrokes", operation: "query", summary: "Get one signature's pen strokes (list rows omit them).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, signatureId: { type: "string" } }, required: ["eventId", "signatureId"] } },
10874
- { path: ["signature-wall", "signatures", "archive"], procedure: "event.signatureWall.archiveSignatures", operation: "mutation", summary: "Archive signatures by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: {
10875
- type: "object",
10876
- properties: { ids: { type: "array", items: { type: "string" } } },
10877
- required: ["ids"]
10878
- } },
10835
+ { path: ["signature-wall", "signatures", "archive"], procedure: "event.signatureWall.archiveSignatures", operation: "mutation", summary: "Archive signatures by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { ids: { type: "array", items: { type: "string" } } }, required: ["ids"] } },
10879
10836
  { path: ["rating", "config", "get"], procedure: "event.ratingSystem.getRatingSystemByEventId", operation: "query", summary: "Get the Rating System config.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10880
- { path: ["rating", "config", "update"], procedure: "event.ratingSystem.updateRatingSystemConfig", operation: "mutation", summary: "Replace the Rating System config.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, config: { type: "object", properties: { mobileBackgroundImageKey: { type: ["string", "null"] } } } }, required: ["eventId", "config"] } },
10837
+ { path: ["rating", "config", "update"], procedure: "event.ratingSystem.updateRatingSystemConfig", operation: "mutation", summary: "Replace the Rating System config.", effects: [
10838
+ "state-change"
10839
+ ], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, config: { type: "object", properties: { mobileBackgroundImageKey: { type: ["string", "null"] } } } }, required: ["eventId", "config"] } },
10881
10840
  { path: ["rating", "background", "get"], procedure: "event.ratingSystem.getRatingSystemBackgroundByEventId", operation: "query", summary: "Get the Rating System background images.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10882
10841
  { path: ["rating", "subjects", "list"], procedure: "event.ratingSystem.getRatingSubjects", operation: "query", summary: "List rating subjects with their scores.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10883
10842
  { path: ["rating", "subjects", "create"], procedure: "event.ratingSystem.createRatingSubject", operation: "mutation", summary: "Create a rating subject.", effects: ["state-change"], target: "ratingSystemId", dates: [], input: { type: "object", properties: { ratingSystemId: { type: "string" }, name: { type: "string", minLength: 1 }, description: { type: ["string", "null"] }, order: { default: 0, type: "integer", minimum: -9007199254740991, maximum: 9007199254740991 }, imageKey: { type: ["string", "null"] } }, required: ["ratingSystemId", "name"] } },
10884
- { path: ["rating", "subjects", "update"], procedure: "event.ratingSystem.updateRatingSubject", operation: "mutation", summary: "Update a rating subject.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: {
10885
- id: { type: "string" },
10886
- name: { type: "string", minLength: 1 },
10887
- description: { type: ["string", "null"] },
10888
- order: { type: "integer", minimum: -9007199254740991, maximum: 9007199254740991 },
10889
- imageKey: { type: ["string", "null"] }
10890
- }, required: ["id"] } },
10843
+ { path: ["rating", "subjects", "update"], procedure: "event.ratingSystem.updateRatingSubject", operation: "mutation", summary: "Update a rating subject.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" }, name: { type: "string", minLength: 1 }, description: { type: ["string", "null"] }, order: { type: "integer", minimum: -9007199254740991, maximum: 9007199254740991 }, imageKey: { type: ["string", "null"] } }, required: ["id"] } },
10891
10844
  { path: ["rating", "subjects", "archive"], procedure: "event.ratingSystem.archiveRatingSubject", operation: "mutation", summary: "Archive a rating subject.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10892
10845
  { path: ["human-bingo", "config", "get"], procedure: "event.humanBingo.getHumanBingoByEventId", operation: "query", summary: "Get the Human Bingo board and config.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10893
- { path: ["human-bingo", "config", "update"], procedure: "event.humanBingo.updateHumanBingoConfigs", operation: "mutation", summary: "Replace the Human Bingo config.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, config: { type: "object", properties: { textColor: { type: "string" }, titleFontSize: { type: "number" }, backgroundColor: { type: "string" }, backgroundImageKey: { type: ["string", "null"] }, nameCardTextColor: { type: "string" }, nameCardBackgroundColor: { type: "string" }, nameCardBorderColor: { type: "string" }, cardBackgroundColor: { type: "string" }, cardBorderColor: { type: "string" }, cardTextColor: { type: "string" }, numberOfParticipants: { type: "number" }, bingoCellDialogBackgroundColor: { type: "string" }, bingoCellDialogTextColor: { type: "string" }, bingoCellDialogButtonTextColor: { type: "string" }, bingoCellDialogButtonColor: { type: "string" }, bingoCellDialogUploadTextColor: { type: "string" }, bingoCellImageKey: { type: ["string", "null"] }, minRowsForBingo: { type: "number" }, infoTextColor: { type: "string" }, infoTextPosition: { type: "string" }, mobileBackgroundColor: { type: "string" }, mobileBackgroundImageKey: { type: ["string", "null"] }, loginTitle: { type: "string" }, loginDescription: { type: ["string", "null"] }, loginTitleColor: { type: "string" }, loginButtonColor: { type: "string" }, loginButtonTextColor: { type: "string" }, loginCardBackgroundColor: {
10894
- type: "string"
10895
- }, loginInputColor: { type: "string" }, leaderboardCardBackgroundColor: { type: "string" }, leaderboardCardTextColor: { type: "string" }, leaderboardBorderColor: { type: "string" } }, required: ["textColor", "titleFontSize", "backgroundColor", "nameCardTextColor", "nameCardBackgroundColor", "nameCardBorderColor", "cardBackgroundColor", "cardBorderColor", "cardTextColor", "numberOfParticipants", "bingoCellDialogBackgroundColor", "bingoCellDialogTextColor", "bingoCellDialogButtonTextColor", "bingoCellDialogButtonColor", "bingoCellDialogUploadTextColor", "minRowsForBingo", "infoTextColor", "infoTextPosition", "mobileBackgroundColor", "loginTitle", "loginTitleColor", "loginButtonColor", "loginButtonTextColor", "loginCardBackgroundColor", "loginInputColor", "leaderboardCardBackgroundColor", "leaderboardCardTextColor", "leaderboardBorderColor"] } }, required: ["eventId", "config"] } },
10846
+ { path: ["human-bingo", "config", "update"], procedure: "event.humanBingo.updateHumanBingoConfigs", operation: "mutation", summary: "Replace the Human Bingo config.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, config: { type: "object", properties: { textColor: { type: "string" }, titleFontSize: { type: "number" }, backgroundColor: { type: "string" }, backgroundImageKey: { type: ["string", "null"] }, nameCardTextColor: { type: "string" }, nameCardBackgroundColor: { type: "string" }, nameCardBorderColor: { type: "string" }, cardBackgroundColor: { type: "string" }, cardBorderColor: { type: "string" }, cardTextColor: { type: "string" }, numberOfParticipants: { type: "number" }, bingoCellDialogBackgroundColor: { type: "string" }, bingoCellDialogTextColor: { type: "string" }, bingoCellDialogButtonTextColor: { type: "string" }, bingoCellDialogButtonColor: { type: "string" }, bingoCellDialogUploadTextColor: { type: "string" }, bingoCellImageKey: { type: ["string", "null"] }, minRowsForBingo: { type: "number" }, infoTextColor: { type: "string" }, infoTextPosition: { type: "string" }, mobileBackgroundColor: { type: "string" }, mobileBackgroundImageKey: { type: ["string", "null"] }, loginTitle: { type: "string" }, loginDescription: { type: ["string", "null"] }, loginTitleColor: { type: "string" }, loginButtonColor: { type: "string" }, loginButtonTextColor: { type: "string" }, loginCardBackgroundColor: { type: "string" }, loginInputColor: { type: "string" }, leaderboardCardBackgroundColor: { type: "string" }, leaderboardCardTextColor: { type: "string" }, leaderboardBorderColor: { type: "string" } }, required: ["textColor", "titleFontSize", "backgroundColor", "nameCardTextColor", "nameCardBackgroundColor", "nameCardBorderColor", "cardBackgroundColor", "cardBorderColor", "cardTextColor", "numberOfParticipants", "bingoCellDialogBackgroundColor", "bingoCellDialogTextColor", "bingoCellDialogButtonTextColor", "bingoCellDialogButtonColor", "bingoCellDialogUploadTextColor", "minRowsForBingo", "infoTextColor", "infoTextPosition", "mobileBackgroundColor", "loginTitle", "loginTitleColor", "loginButtonColor", "loginButtonTextColor", "loginCardBackgroundColor", "loginInputColor", "leaderboardCardBackgroundColor", "leaderboardCardTextColor", "leaderboardBorderColor"] } }, required: ["eventId", "config"] } },
10896
10847
  { path: ["human-bingo", "background", "get"], procedure: "event.humanBingo.getHumanBingoBoardBackgroundByEventId", operation: "query", summary: "Get the Human Bingo board background images.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10897
10848
  { path: ["human-bingo", "items", "list"], procedure: "event.humanBingo.admin.getHumanBingoItemsByEventId", operation: "query", summary: "List Human Bingo items.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] } }, required: ["eventId"] } },
10898
- { path: ["human-bingo", "items", "table"], procedure: "event.humanBingo.admin.getHumanBingoItemsTable", operation: "query", summary: "List Human Bingo items in the admin table shape (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] } }, required: ["eventId"] } },
10849
+ { path: [
10850
+ "human-bingo",
10851
+ "items",
10852
+ "table"
10853
+ ], procedure: "event.humanBingo.admin.getHumanBingoItemsTable", operation: "query", summary: "List Human Bingo items in the admin table shape (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] } }, required: ["eventId"] } },
10899
10854
  { path: ["human-bingo", "items", "replace"], procedure: "event.humanBingo.admin.createHumanBingoItems", operation: "mutation", summary: "Replace every Human Bingo item: existing items are deleted first.", effects: ["state-change", "delete"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1 }, items: { type: "array", items: { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 200 }, description: { type: "string", maxLength: 500 }, type: { default: "PHOTO_UPLOAD", type: "string", enum: ["SINGLE_SELECT", "TEXT_INPUT", "PHOTO_UPLOAD", "VIDEO_UPLOAD"] }, options: { default: [], maxItems: 20, type: "array", items: { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 100 }, isCorrect: { default: !1, type: "boolean" } }, required: ["name"] } }, correctAnswer: { type: "string", maxLength: 100 } }, required: ["name"] } } }, required: ["eventId", "items"] } },
10900
- {
10901
- path: ["human-bingo", "items", "update"],
10902
- procedure: "event.humanBingo.admin.editHumanBingoItems",
10903
- operation: "mutation",
10904
- summary: "Update one Human Bingo item.",
10905
- effects: ["state-change"],
10906
- target: "id",
10907
- dates: [],
10908
- input: { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 200 }, description: { type: "string", maxLength: 500 }, type: { default: "PHOTO_UPLOAD", type: "string", enum: ["SINGLE_SELECT", "TEXT_INPUT", "PHOTO_UPLOAD", "VIDEO_UPLOAD"] }, options: { default: [], maxItems: 20, type: "array", items: { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 100 }, isCorrect: { default: !1, type: "boolean" } }, required: ["name"] } }, correctAnswer: { type: "string", maxLength: 100 }, id: { type: "string", minLength: 1 } }, required: ["name", "id"] }
10909
- },
10855
+ { path: ["human-bingo", "items", "update"], procedure: "event.humanBingo.admin.editHumanBingoItems", operation: "mutation", summary: "Update one Human Bingo item.", effects: ["state-change"], target: "id", dates: [], input: {
10856
+ type: "object",
10857
+ properties: { name: { type: "string", minLength: 1, maxLength: 200 }, description: { type: "string", maxLength: 500 }, type: { default: "PHOTO_UPLOAD", type: "string", enum: ["SINGLE_SELECT", "TEXT_INPUT", "PHOTO_UPLOAD", "VIDEO_UPLOAD"] }, options: { default: [], maxItems: 20, type: "array", items: { type: "object", properties: { name: { type: "string", minLength: 1, maxLength: 100 }, isCorrect: { default: !1, type: "boolean" } }, required: ["name"] } }, correctAnswer: { type: "string", maxLength: 100 }, id: { type: "string", minLength: 1 } },
10858
+ required: ["name", "id"]
10859
+ } },
10910
10860
  { path: ["human-bingo", "items", "archive"], procedure: "event.humanBingo.admin.archiveHumanBingoItem", operation: "mutation", summary: "Archive one Human Bingo item.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10911
- { path: ["human-bingo", "items", "archive-many"], procedure: "event.humanBingo.admin.archiveManyHumanBingoItems", operation: "mutation", summary: "Archive Human Bingo items by ID. --target is the comma-joined ids.", effects: [
10912
- "state-change"
10913
- ], target: "ids", dates: [], input: { type: "object", properties: { ids: { type: "array", items: { type: "string" } } }, required: ["ids"] } },
10861
+ { path: ["human-bingo", "items", "archive-many"], procedure: "event.humanBingo.admin.archiveManyHumanBingoItems", operation: "mutation", summary: "Archive Human Bingo items by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { ids: { type: "array", items: { type: "string" } } }, required: ["ids"] } },
10914
10862
  { path: ["human-bingo", "items", "restore"], procedure: "event.humanBingo.admin.restoreHumanBingoItem", operation: "mutation", summary: "Restore an archived Human Bingo item.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } },
10915
10863
  { path: ["human-bingo", "leaderboard"], procedure: "event.humanBingo.admin.getLeaderboard", operation: "query", summary: "Get the completed-card leaderboard (eventRoomId is the Human Bingo ID).", effects: [], dates: [], input: { type: "object", properties: { eventRoomId: { type: "string" } }, required: ["eventRoomId"] } },
10916
10864
  { path: ["human-bingo", "participants", "leaderboard"], procedure: "event.humanBingo.admin.getParticipantLeaderboard", operation: "query", summary: "Get the participant leaderboard.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
10917
10865
  { path: ["human-bingo", "participants", "list"], procedure: "event.humanBingo.admin.getParticipantsByEvent", operation: "query", summary: "List Human Bingo participants.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] } }, required: ["eventId"] } },
10918
10866
  { path: ["human-bingo", "participants", "table"], procedure: "event.humanBingo.admin.getParticipantsTable", operation: "query", summary: "List Human Bingo participants in the admin table shape (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, name: { type: "string" }, page: { default: 1, type: "number", minimum: 1 }, perPage: { default: 10, type: "number", minimum: 1, maximum: 100 }, archiveStatus: { default: "active", type: "string", enum: ["active", "archived", "all"] } }, required: ["eventId"] } },
10919
- {
10920
- path: ["human-bingo", "participants", "card"],
10921
- procedure: "event.humanBingo.admin.getParticipantBingoCard",
10922
- operation: "query",
10923
- summary: "Get one participant's bingo card.",
10924
- effects: [],
10925
- dates: [],
10926
- input: { type: "object", properties: { eventId: { type: "string" }, participantId: { type: "string" } }, required: ["eventId", "participantId"] }
10927
- },
10867
+ { path: ["human-bingo", "participants", "card"], procedure: "event.humanBingo.admin.getParticipantBingoCard", operation: "query", summary: "Get one participant's bingo card.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, participantId: { type: "string" } }, required: ["eventId", "participantId"] } },
10928
10868
  { path: ["human-bingo", "participants", "ban"], procedure: "event.humanBingo.admin.updateParticipantBanStatus", operation: "mutation", summary: "Ban or unban a participant.", effects: ["state-change"], target: "participantId", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, participantId: { type: "string" }, banned: { type: "boolean" } }, required: ["eventId", "participantId", "banned"] } },
10929
10869
  { path: ["human-bingo", "participants", "archive"], procedure: "event.humanBingo.admin.archiveHumanBingoParticipants", operation: "mutation", summary: "Archive participants by ID. --target is the comma-joined ids.", effects: ["state-change"], target: "ids", dates: [], input: { type: "object", properties: { ids: { type: "array", items: { type: "string" } } }, required: ["ids"] } },
10930
10870
  { path: ["human-bingo", "participants", "restore"], procedure: "event.humanBingo.admin.restoreHumanBingoParticipants", operation: "mutation", summary: "Restore participants; cards that no longer match the board are deleted and rebuilt.", effects: ["state-change", "delete"], target: "ids", dates: [], input: { type: "object", properties: { ids: { type: "array", items: { type: "string" } } }, required: ["ids"] } },
10931
10871
  { path: ["human-bingo", "submissions", "list"], procedure: "event.humanBingo.admin.getSubmissions", operation: "query", summary: "List Human Bingo submissions (paged).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, page: { type: "number", minimum: 1 }, cursor: { type: "number", minimum: 1 }, perPage: { default: 6, type: "number", minimum: 1, maximum: 50 }, direction: { type: "string", enum: ["forward", "backward"] } }, required: ["eventId"] } },
10932
- { path: ["human-bingo", "submissions", "pending"], procedure: "event.humanBingo.admin.getHumanBingoSubmissionsForApproval", operation: "query", summary: "List Human Bingo submissions for moderation (filter by state).", effects: [], dates: [], input: { type: "object", properties: {
10872
+ { path: ["human-bingo", "submissions", "pending"], procedure: "event.humanBingo.admin.getHumanBingoSubmissionsForApproval", operation: "query", summary: "List Human Bingo submissions for moderation (filter by state).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string" }, page: { default: 1, type: "integer", exclusiveMinimum: 0, maximum: 9007199254740991 }, perPage: { default: 10, type: "integer", minimum: 1, maximum: 100 }, name: { type: "string" }, state: { default: "PENDING", type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] } }, required: ["eventId"] } },
10873
+ { path: ["human-bingo", "submissions", "respond"], procedure: "event.humanBingo.admin.respondToBingoCardItemSubmission", operation: "mutation", summary: "Approve or reject a Human Bingo card item submission.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: {
10933
10874
  eventId: { type: "string" },
10934
- page: { default: 1, type: "integer", exclusiveMinimum: 0, maximum: 9007199254740991 },
10935
- perPage: { default: 10, type: "integer", minimum: 1, maximum: 100 },
10936
- name: { type: "string" },
10937
- state: { default: "PENDING", type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] }
10938
- }, required: ["eventId"] } },
10939
- { path: ["human-bingo", "submissions", "respond"], procedure: "event.humanBingo.admin.respondToBingoCardItemSubmission", operation: "mutation", summary: "Approve or reject a Human Bingo card item submission.", effects: ["state-change"], target: "id", dates: [], input: { type: "object", properties: { eventId: { type: "string" }, id: { type: "string" }, status: { type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] }, bingoCardId: { type: "string" } }, required: ["eventId", "id", "status", "bingoCardId"] } },
10940
- { path: ["staff-redemption", "setup", "get"], procedure: "event.staffRedemption.getStaffRedemptionSetup", operation: "query", summary: "Get the whole staff redemption setup: settings (including counterOrder, always resolved: FOOD_THEN_DRAW when never set), missingPolicies and policiesLocked, sites (with crew access status), sessions, slots with setsIssued, item groups and items, prizes and prize stock. readiness lists what is still missing before counters can serve people (ready, and items of code plus short text); truncated is true when a list was cut at its cap. Archived rows are included with archivedAt; holds no personal data. Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId"], additionalProperties: !1 } },
10941
- { path: ["staff-redemption", "settings", "update"], procedure: "event.staffRedemption.updateStaffRedemptionSettings", operation: "mutation", summary: "Update eligibleShifts, itemRule, wrongSite, sessionRule, drawPolicy, fixedWinRatePercent and counterOrder; omitted fields are unchanged. sessionRule is OWN_SHIFT (the default when unset: only during the person's own shift's session) or ANY_OPEN_SESSION (whichever session is open now, from that session's sets; needs drawPolicy FIXED_RATE). counterOrder is FOOD_THEN_DRAW (the default when never set) or DRAW_THEN_FOOD (the person spins first and the food is recorded afterwards); it is not a required policy (never in missingPolicies). Policies, sessionRule and counterOrder included, lock once a redemption exists (setup get shows policiesLocked): then a change needs overrideReason, recorded in the activity log.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, eligibleShifts: { minItems: 1, maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 8 } }, itemRule: { type: "string", enum: ["ONE_FROM_EACH_GROUP", "AT_MOST_ONE_PER_GROUP", "AT_MOST_ONE_PER_GROUP_OR_NONE"] }, wrongSite: { type: "string", enum: ["REFUSE", "SERVE_FROM_COUNTER"] }, sessionRule: { type: "string", enum: ["OWN_SHIFT", "ANY_OPEN_SESSION"] }, drawPolicy: { type: "string", enum: ["REMAINING_HEADCOUNT", "FIXED_RATE"] }, fixedWinRatePercent: { type: "number", minimum: 0, maximum: 100 }, counterOrder: { type: "string", enum: ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"] }, overrideReason: {
10875
+ id: { type: "string" },
10876
+ status: { type: "string", enum: ["PENDING", "APPROVED", "REJECTED"] },
10877
+ bingoCardId: { type: "string" }
10878
+ }, required: ["eventId", "id", "status", "bingoCardId"] } },
10879
+ { path: ["staff-redemption", "setup", "get"], procedure: "event.staffRedemption.getStaffRedemptionSetup", operation: "query", summary: "Get the whole staff redemption setup: settings (including counterOrder, always resolved: FOOD_THEN_DRAW when never set, and the employee sign-in settings loginMethods, staffIdLabel and wrongSiteMessage, the two texts null while unset), employeeLogin.googleAvailable (whether Google sign-in can be turned on), missingPolicies and policiesLocked, sites (with crew access status), sessions, slots with setsIssued, item groups and items, prizes and prize stock. readiness lists what is still missing before counters can serve people (ready, and items of code plus short text); truncated is true when a list was cut at its cap. Archived rows are included with archivedAt; holds no personal data. Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId"], additionalProperties: !1 } },
10880
+ { path: ["staff-redemption", "settings", "update"], procedure: "event.staffRedemption.updateStaffRedemptionSettings", operation: "mutation", summary: "Update eligibleShifts, itemRule, wrongSite, sessionRule, drawPolicy, fixedWinRatePercent, counterOrder and the employee sign-in settings loginMethods (emailOtp, google, guest, staffId, staffIdRequiresLastName; every method is off until turned on; google needs the server's Google sign-in), staffIdLabel (what the roster identifier is called, default 'Employee ID') and wrongSiteMessage (the warning both counters show for a person rostered at another site, max 300 characters); null or blank resets a text to its default. Omitted fields are unchanged. sessionRule is OWN_SHIFT (the default when unset: only during the person's own shift's session) or ANY_OPEN_SESSION (whichever session is open now, from that session's sets and prizes; works with either drawPolicy, and under REMAINING_HEADCOUNT a walk-in from another shift or site draws from the open session's prizes as one extra person, so heavy walk-in traffic can use up prizes before that session's last arrivals). counterOrder is FOOD_THEN_DRAW (the default when never set) or DRAW_THEN_FOOD (the person spins first and the food is recorded afterwards); it is not a required policy (never in missingPolicies). Policies, sessionRule and counterOrder included, lock once a redemption exists (setup get shows policiesLocked): then a change needs overrideReason, recorded in the activity log. loginMethods, staffIdLabel and wrongSiteMessage are not policies: they never lock and never need overrideReason.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: {
10881
+ eventId: { type: "string", minLength: 1, maxLength: 64 },
10882
+ eligibleShifts: { minItems: 1, maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 8 } },
10883
+ itemRule: { type: "string", enum: ["ONE_FROM_EACH_GROUP", "AT_MOST_ONE_PER_GROUP", "AT_MOST_ONE_PER_GROUP_OR_NONE"] },
10884
+ wrongSite: { type: "string", enum: ["REFUSE", "SERVE_FROM_COUNTER"] },
10885
+ sessionRule: { type: "string", enum: ["OWN_SHIFT", "ANY_OPEN_SESSION"] },
10886
+ drawPolicy: { type: "string", enum: ["REMAINING_HEADCOUNT", "FIXED_RATE"] },
10887
+ fixedWinRatePercent: { type: "number", minimum: 0, maximum: 100 },
10888
+ counterOrder: { type: "string", enum: ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"] },
10889
+ loginMethods: { type: "object", properties: { emailOtp: { type: "boolean" }, google: { type: "boolean" }, guest: { type: "boolean" }, staffId: { default: !1, type: "boolean" }, staffIdRequiresLastName: { default: !0, type: "boolean" } }, required: ["emailOtp", "google", "guest"], additionalProperties: !1 },
10890
+ staffIdLabel: { anyOf: [{ type: "null" }, { type: "string", maxLength: 40 }] },
10891
+ wrongSiteMessage: { anyOf: [{ type: "null" }, { type: "string", maxLength: 300 }] },
10892
+ overrideReason: { type: "string", minLength: 1, maxLength: 500 }
10893
+ }, required: ["eventId"], additionalProperties: !1 } },
10894
+ { path: ["staff-redemption", "site", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionSite", operation: "mutation", summary: "Create a site (omit siteId) or rename and reorder one (give siteId). Use staff-redemption archive set to archive or unarchive it.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } }, required: ["eventId", "name"], additionalProperties: !1 } },
10895
+ { path: ["staff-redemption", "crew-password", "set"], procedure: "event.staffRedemption.setStaffRedemptionCrewPassword", operation: "mutation", summary: "Set a site's shared crew password (6-128 characters), which turns the site's crew link on. Ends every crew session at that site. Prefer --input-file over --input so the password stays out of shell history.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: {
10942
10896
  type: "string",
10943
10897
  minLength: 1,
10944
- maxLength: 500
10945
- } }, required: ["eventId"], additionalProperties: !1 } },
10946
- { path: ["staff-redemption", "site", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionSite", operation: "mutation", summary: "Create a site (omit siteId) or rename and reorder one (give siteId). Use staff-redemption archive set to archive or unarchive it.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } }, required: ["eventId", "name"], additionalProperties: !1 } },
10947
- { path: ["staff-redemption", "crew-password", "set"], procedure: "event.staffRedemption.setStaffRedemptionCrewPassword", operation: "mutation", summary: "Set a site's shared crew password (6-128 characters), which turns the site's crew link on. Ends every crew session at that site. Prefer --input-file over --input so the password stays out of shell history.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, password: { type: "string", minLength: 6, maxLength: 128 } }, required: ["eventId", "siteId", "password"], additionalProperties: !1 } },
10898
+ maxLength: 64
10899
+ }, siteId: { type: "string", minLength: 1, maxLength: 64 }, password: { type: "string", minLength: 6, maxLength: 128 } }, required: ["eventId", "siteId", "password"], additionalProperties: !1 } },
10948
10900
  { path: ["staff-redemption", "crew-password", "clear"], procedure: "event.staffRedemption.clearStaffRedemptionCrewPassword", operation: "mutation", summary: "Clear a site's crew password, which turns its crew link off and ends every crew session at that site.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId", "siteId"], additionalProperties: !1 } },
10949
10901
  { path: ["staff-redemption", "session", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionSession", operation: "mutation", summary: "Create a session (omit sessionId) or update one: name, shift letter, and optional startsAt and endsAt (ISO date-times; null or omitted means the session is open whenever the event is). Each shift has one session; a session with redemptions keeps its shift. Under sessionRule ANY_OPEN_SESSION, counters serve everyone from the open session that started most recently, so a session with no endsAt is used until a later one starts.", effects: ["state-change"], target: "eventId", dates: ["startsAt", "endsAt"], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, sessionId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, shift: { type: "string", minLength: 1, maxLength: 8 }, startsAt: { default: null, anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] }, endsAt: { default: null, anyOf: [{ type: "string", format: "date-time" }, { type: "null" }] } }, required: ["eventId", "name", "shift"], additionalProperties: !1 } },
10950
10902
  { path: ["staff-redemption", "slot", "set"], procedure: "event.staffRedemption.setStaffRedemptionSlot", operation: "mutation", summary: "Set how many sets a site has for a session (setQuantity). It cannot go below the sets already issued.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, sessionId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, setQuantity: { type: "integer", minimum: 0, maximum: 1e5 } }, required: ["eventId", "sessionId", "siteId", "setQuantity"], additionalProperties: !1 } },
10951
- { path: ["staff-redemption", "item-group", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionItemGroup", operation: "mutation", summary: "Create an item group (omit groupId; a choice such as wrap or pancake) or rename and reorder one.", effects: ["state-change"], target: "eventId", dates: [], input: {
10952
- type: "object",
10953
- properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, groupId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } },
10954
- required: ["eventId", "name"],
10955
- additionalProperties: !1
10956
- } },
10903
+ { path: ["staff-redemption", "item-group", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionItemGroup", operation: "mutation", summary: "Create an item group (omit groupId; a choice such as wrap or pancake) or rename and reorder one.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, groupId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } }, required: ["eventId", "name"], additionalProperties: !1 } },
10957
10904
  { path: ["staff-redemption", "item", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionItem", operation: "mutation", summary: "Create an item in a group (omit itemId) or rename, reorder or move one to another groupId; past claims keep their group.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, itemId: { type: "string", minLength: 1, maxLength: 64 }, groupId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } }, required: ["eventId", "groupId", "name"], additionalProperties: !1 } },
10958
- {
10959
- path: ["staff-redemption", "prize", "upsert"],
10960
- procedure: "event.staffRedemption.upsertStaffRedemptionPrize",
10961
- operation: "mutation",
10962
- summary: "Create a prize (omit prizeId) or rename and reorder one. Stock is set per slot with staff-redemption prize-stock set.",
10963
- effects: ["state-change"],
10964
- target: "eventId",
10965
- dates: [],
10966
- input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, prizeId: { type: "string", minLength: 1, maxLength: 64 }, name: { type: "string", minLength: 1, maxLength: 120 }, order: { type: "integer", minimum: 0, maximum: 1e4 } }, required: ["eventId", "name"], additionalProperties: !1 }
10967
- },
10905
+ { path: ["staff-redemption", "prize", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionPrize", operation: "mutation", summary: "Create a prize (omit prizeId) or rename and reorder one. Stock is set per slot with staff-redemption prize-stock set.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: {
10906
+ eventId: { type: "string", minLength: 1, maxLength: 64 },
10907
+ prizeId: { type: "string", minLength: 1, maxLength: 64 },
10908
+ name: { type: "string", minLength: 1, maxLength: 120 },
10909
+ order: { type: "integer", minimum: 0, maximum: 1e4 }
10910
+ }, required: ["eventId", "name"], additionalProperties: !1 } },
10968
10911
  { path: ["staff-redemption", "prize-stock", "set"], procedure: "event.staffRedemption.setStaffRedemptionPrizeStock", operation: "mutation", summary: "Set a prize's stock for one slot (slotId from setup get). An optional reason is recorded; stock cannot go below the prizes already drawn there and not released.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, slotId: { type: "string", minLength: 1, maxLength: 64 }, prizeId: { type: "string", minLength: 1, maxLength: 64 }, quantity: { type: "integer", minimum: 0, maximum: 1e5 }, reason: { type: "string", minLength: 1, maxLength: 500 } }, required: ["eventId", "slotId", "prizeId", "quantity"], additionalProperties: !1 } },
10969
10912
  { path: ["staff-redemption", "rollover", "preview"], procedure: "event.staffRedemption.getStaffRedemptionRolloverPreview", operation: "query", summary: "Preview rolling leftovers from fromSessionId into toSessionId, per site: sets left (set quantity minus active, not voided, redemptions) and prizes left (stock minus prizes drawn and not released) in the source, what would move and the target afterwards. A site is skipped, with a reason, unless the target session already has a slot there with sets (a rollover never creates a slot). Advisory; rollover run recomputes under lock. Needs event.setup.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, fromSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session whose leftover sets and prizes move out (id from setup get). Must belong to this event and not be archived." }, toSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session that receives them (id from setup get). Must differ from fromSessionId, belong to this event and not be archived." } }, required: ["eventId", "fromSessionId", "toSessionId"], additionalProperties: !1 } },
10970
- { path: ["staff-redemption", "rollover", "run"], procedure: "event.staffRedemption.rolloverStaffRedemptionStock", operation: "mutation", summary: "Move the leftover sets (sets) and/or prizes (prizes), both default true, of every site from fromSessionId into toSessionId, with a required reason (1-300 characters) that is logged. The source keeps exactly what it issued, so it never drops below issued. Skipped sites come back with a reason; moved is false and nothing is written (no quantity, log entry or lock) when nothing would move. Undo it exactly with rollover undo (the result's rolloverId is the id); running it the other way is not an undo. Returns rolloverId, null when nothing moved. Not automatic: a manager runs it. Needs event.setup.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: {
10971
- eventId: { type: "string", minLength: 1, maxLength: 64 },
10972
- fromSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session whose leftover sets and prizes move out (id from setup get). Must belong to this event and not be archived." },
10973
- toSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session that receives them (id from setup get). Must differ from fromSessionId, belong to this event and not be archived." },
10974
- sets: { default: !0, description: "Move the leftover sets (set quantity minus active, not voided, redemptions) of each site. Defaults to true.", type: "boolean" },
10975
- prizes: { default: !0, description: "Move the leftover prizes (stock minus prizes drawn and not released) of each site. Defaults to true.", type: "boolean" },
10976
- reason: { type: "string", minLength: 1, maxLength: 300, description: "Why the leftovers move (1 to 300 characters). Recorded in the activity log." }
10977
- }, required: ["eventId", "fromSessionId", "toSessionId", "reason"], additionalProperties: !1 } },
10913
+ { path: ["staff-redemption", "rollover", "run"], procedure: "event.staffRedemption.rolloverStaffRedemptionStock", operation: "mutation", summary: "Move the leftover sets (sets) and/or prizes (prizes), both default true, of every site from fromSessionId into toSessionId, with a required reason (1-300 characters) that is logged. The source keeps exactly what it issued, so it never drops below issued. Skipped sites come back with a reason; moved is false and nothing is written (no quantity, log entry or lock) when nothing would move. Undo it exactly with rollover undo (the result's rolloverId is the id); running it the other way is not an undo. Returns rolloverId, null when nothing moved. Not automatic: a manager runs it. Needs event.setup.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, fromSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session whose leftover sets and prizes move out (id from setup get). Must belong to this event and not be archived." }, toSessionId: { type: "string", minLength: 1, maxLength: 64, description: "Session that receives them (id from setup get). Must differ from fromSessionId, belong to this event and not be archived." }, sets: { default: !0, description: "Move the leftover sets (set quantity minus active, not voided, redemptions) of each site. Defaults to true.", type: "boolean" }, prizes: { default: !0, description: "Move the leftover prizes (stock minus prizes drawn and not released) of each site. Defaults to true.", type: "boolean" }, reason: { type: "string", minLength: 1, maxLength: 300, description: "Why the leftovers move (1 to 300 characters). Recorded in the activity log." } }, required: ["eventId", "fromSessionId", "toSessionId", "reason"], additionalProperties: !1 } },
10978
10914
  { path: ["staff-redemption", "rollover", "list"], procedure: "event.staffRedemption.getStaffRedemptionRollovers", operation: "query", summary: "List the event's rollovers, newest first (limit 1-50, default 20): id (use it for rollover undo), who ran it and when, reason, from and to sessions, totals, the sets and prizes moved per site, undoable, and undone (null, or who, when and why). total counts all of them. Needs event.setup.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, limit: { default: 20, description: "How many rollovers to return, newest first (1 to 50). Defaults to 20.", type: "integer", minimum: 1, maximum: 50 } }, required: ["eventId"], additionalProperties: !1 } },
10979
10915
  { path: ["staff-redemption", "rollover", "undo"], procedure: "event.staffRedemption.undoStaffRedemptionRollover", operation: "mutation", summary: "Undo one rollover exactly (rolloverId from rollover list), with a required reason (1-300 characters) that is logged: subtract exactly the sets and prizes it moved from the target session's slots and add them back to the source's, including a source left at 0 sets. The target's own sets and prizes are untouched. All or nothing: refused with CONFLICT, listing the sites and prizes, when a target site has since handed out or drawn part of what moved (it must still have the moved amount unissued), and with CONFLICT when already undone. A rolloverId of another event is NOT_FOUND. Does not check archived state: it restores exactly even if a session, site or prize was archived since. Redo or release voided target redemptions first, as an unreleased void's set counts as free. Recorded as its own activity entry. Needs event.setup.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, rolloverId: { type: "string", minLength: 1, maxLength: 64, description: "Id of the rollover to undo (id from rollover list). Must belong to this event and not be undone already." }, reason: { type: "string", minLength: 1, maxLength: 300, description: "Why the rollover is undone (1 to 300 characters). Recorded in the activity log." } }, required: ["eventId", "rolloverId", "reason"], additionalProperties: !1 } },
10980
10916
  { path: ["staff-redemption", "archive", "set"], procedure: "event.staffRedemption.setStaffRedemptionArchived", operation: "mutation", summary: "Archive (archived true) or unarchive (archived false) a site, session, itemGroup, item, prize or rosterEntry by entity and id. Setup get and roster list show the current state.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, entity: { type: "string", enum: ["site", "session", "itemGroup", "item", "prize", "rosterEntry"] }, id: { type: "string", minLength: 1, maxLength: 64 }, archived: { type: "boolean" } }, required: ["eventId", "entity", "id", "archived"], additionalProperties: !1 } },
10981
10917
  { path: ["staff-redemption", "roster", "list"], procedure: "event.staffRedemption.getStaffRedemptionRoster", operation: "query", summary: "List roster entries (cursor paged); filter by search, siteId, shift, archived (active, archived, all) and collected (any, collected, not-collected).", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, search: { type: "string", maxLength: 200 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, shift: { type: "string", minLength: 1, maxLength: 8 }, archived: { default: "active", type: "string", enum: ["active", "archived", "all"] }, collected: { default: "any", type: "string", enum: ["any", "collected", "not-collected"] }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 8192 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, required: ["eventId"], additionalProperties: !1 } },
10982
- { path: ["staff-redemption", "roster", "counts"], procedure: "event.staffRedemption.getStaffRedemptionRosterCounts", operation: "query", summary: "Count roster entries matching the same filters as roster list.", effects: [], dates: [], input: { type: "object", properties: {
10983
- eventId: { type: "string", minLength: 1, maxLength: 64 },
10984
- search: { type: "string", maxLength: 200 },
10985
- siteId: { type: "string", minLength: 1, maxLength: 64 },
10986
- shift: { type: "string", minLength: 1, maxLength: 8 },
10987
- archived: { default: "active", type: "string", enum: ["active", "archived", "all"] },
10988
- collected: { default: "any", type: "string", enum: ["any", "collected", "not-collected"] }
10989
- }, required: ["eventId"], additionalProperties: !1 } },
10990
- { path: ["staff-redemption", "roster", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionRosterEntry", operation: "mutation", summary: "Add or update one roster entry by employeeId (name, siteName, shift and workShift are required and can be null; allowance is optional). The site is matched by name, and allowance cannot go below the sets the person already collected. The archived state is unchanged (use staff-redemption archive set).", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 }, name: { anyOf: [{ type: "string", maxLength: 120 }, { type: "null" }] }, siteName: { anyOf: [
10991
- { type: "string", maxLength: 120 },
10992
- { type: "null" }
10993
- ] }, shift: { anyOf: [{ type: "string", minLength: 1, maxLength: 8 }, { type: "null" }] }, workShift: { anyOf: [{ type: "string", maxLength: 120 }, { type: "null" }] }, allowance: { type: "integer", minimum: 0, maximum: 20 } }, required: ["eventId", "employeeId", "name", "siteName", "shift", "workShift"], additionalProperties: !1 } },
10994
- { path: ["staff-redemption", "claims", "list"], procedure: "event.staffRedemption.getStaffRedemptionClaims", operation: "query", summary: "List redemption claims, newest first (cursor paged), with items (with groupName), draw outcome, site, awayFromRosterSite (served at a site other than the roster site), session and void state; each row also has itemsPending (true while the prize was drawn but the food is not recorded yet) and itemsRecordedAt; filter by search, siteId, sessionId and status (active, items-pending, voided, all). items-pending is active claims that still wait for their food.", effects: [], dates: [], input: { type: "object", properties: { eventId: {
10918
+ { path: ["staff-redemption", "roster", "counts"], procedure: "event.staffRedemption.getStaffRedemptionRosterCounts", operation: "query", summary: "Count roster entries matching the same filters as roster list.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, search: { type: "string", maxLength: 200 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, shift: { type: "string", minLength: 1, maxLength: 8 }, archived: {
10919
+ default: "active",
10995
10920
  type: "string",
10996
- minLength: 1,
10997
- maxLength: 64
10998
- }, search: { type: "string", maxLength: 200 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, sessionId: { type: "string", minLength: 1, maxLength: 64 }, status: { default: "all", type: "string", enum: ["active", "items-pending", "voided", "all"] }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 8192 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, required: ["eventId"], additionalProperties: !1 } },
10999
- { path: ["staff-redemption", "claims", "counts"], procedure: "event.staffRedemption.getStaffRedemptionClaimCounts", operation: "query", summary: "Count claims matching the same filters as claims list : returns totalCount (all filters, status included), then activeCount, itemsPendingCount (active claims whose food is not recorded yet) and voidedCount, which ignore the status filter.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, search: { type: "string", maxLength: 200 }, siteId: {
10921
+ enum: ["active", "archived", "all"]
10922
+ }, collected: { default: "any", type: "string", enum: ["any", "collected", "not-collected"] } }, required: ["eventId"], additionalProperties: !1 } },
10923
+ { path: ["staff-redemption", "roster", "upsert"], procedure: "event.staffRedemption.upsertStaffRedemptionRosterEntry", operation: "mutation", summary: "Add or update one roster entry by employeeId (name, siteName, shift and workShift are required and can be null; allowance is optional). The site is matched by name, and allowance cannot go below the sets the person already collected. The archived state is unchanged (use staff-redemption archive set).", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 }, name: { anyOf: [{ type: "string", maxLength: 120 }, { type: "null" }] }, siteName: { anyOf: [{ type: "string", maxLength: 120 }, { type: "null" }] }, shift: { anyOf: [{ type: "string", minLength: 1, maxLength: 8 }, { type: "null" }] }, workShift: {
10924
+ anyOf: [{ type: "string", maxLength: 120 }, { type: "null" }]
10925
+ }, allowance: { type: "integer", minimum: 0, maximum: 20 } }, required: ["eventId", "employeeId", "name", "siteName", "shift", "workShift"], additionalProperties: !1 } },
10926
+ { path: ["staff-redemption", "claims", "list"], procedure: "event.staffRedemption.getStaffRedemptionClaims", operation: "query", summary: "List redemption claims, newest first (cursor paged), with items (with groupName), draw outcome, site, awayFromRosterSite (served at a site other than the roster site), session and void state; each row also has itemsPending (true while the prize was drawn but the food is not recorded yet) and itemsRecordedAt; filter by search, siteId, sessionId and status (active, items-pending, voided, all). items-pending is active claims that still wait for their food.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, search: { type: "string", maxLength: 200 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, sessionId: {
11000
10927
  type: "string",
11001
10928
  minLength: 1,
11002
10929
  maxLength: 64
11003
- }, sessionId: { type: "string", minLength: 1, maxLength: 64 }, status: { default: "all", type: "string", enum: ["active", "items-pending", "voided", "all"] } }, required: ["eventId"], additionalProperties: !1 } },
10930
+ }, status: { default: "all", type: "string", enum: ["active", "items-pending", "voided", "all"] }, limit: { default: 25, type: "integer", minimum: 1, maximum: 100 }, cursor: { anyOf: [{ type: "string", minLength: 1, maxLength: 8192 }, { type: "null" }] }, direction: { type: "string", const: "forward" } }, required: ["eventId"], additionalProperties: !1 } },
10931
+ { path: ["staff-redemption", "claims", "counts"], procedure: "event.staffRedemption.getStaffRedemptionClaimCounts", operation: "query", summary: "Count claims matching the same filters as claims list : returns totalCount (all filters, status included), then activeCount, itemsPendingCount (active claims whose food is not recorded yet) and voidedCount, which ignore the status filter.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, search: { type: "string", maxLength: 200 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, sessionId: { type: "string", minLength: 1, maxLength: 64 }, status: { default: "all", type: "string", enum: ["active", "items-pending", "voided", "all"] } }, required: ["eventId"], additionalProperties: !1 } },
11004
10932
  { path: ["staff-redemption", "claims", "void"], procedure: "event.staffRedemption.voidStaffRedemptionClaim", operation: "mutation", summary: "Void a claim with a reason (a claim still waiting for its food too). The set returns to the person and the slot; the prize draw is kept, so a redo shows the same outcome until staff-redemption draw release. Claims list shows each draw's activeClaimCount.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, claimId: { type: "string", minLength: 1, maxLength: 64 }, reason: { type: "string", minLength: 1, maxLength: 500 } }, required: ["eventId", "claimId", "reason"], additionalProperties: !1 } },
11005
- { path: ["staff-redemption", "draw", "release"], procedure: "event.staffRedemption.releaseStaffRedemptionDraw", operation: "mutation", summary: "Release a person's prize draw (draw.id from claims list) with a reason: a won prize returns to its slot's stock and the person draws again on their next redemption. Refused (CONFLICT) while an active, not voided redemption still shows the draw (claims list draw.activeClaimCount > 0); void it first, or pass the explicit override allowWhileClaimActive: true to release a prize while its redemption stays recorded (for example a paper entry). The override is recorded in the activity log.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, drawId: { type: "string", minLength: 1, maxLength: 64 }, reason: { type: "string", minLength: 1, maxLength: 500 }, allowWhileClaimActive: {
11006
- description: "Override: release the draw even though an active (not voided) redemption still shows it, for a redemption that stays recorded (for example a paper entry with no spin). Omit to refuse while any active redemption uses the draw.",
11007
- type: "boolean"
11008
- } }, required: ["eventId", "drawId", "reason"], additionalProperties: !1 } },
11009
- { path: ["staff-redemption", "stock", "summary"], procedure: "event.staffRedemption.getStaffRedemptionStockSummary", operation: "query", summary: "Show sets and prizes issued and left per site and session, with per-slot item counts (items), roster headcount and how many of them collected, plus event-wide item totals.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId"], additionalProperties: !1 } },
11010
- { path: ["staff-redemption", "counter", "context"], procedure: "event.staffRedemption.getStaffRedemptionCounterContext", operation: "query", summary: "Counter view for one site (siteId): the event (name, status, dates), counterOrder (FOOD_THEN_DRAW or DRAW_THEN_FOOD, the order crew follow), items to choose from, the site's sessions with sets and prizes left, and any missing policies. sessionRule is the session policy; under ANY_OPEN_SESSION, openSession is the session every counter serves from now (null when none is open) and openSessionChangesAt when that next changes (serverTime is the server clock at the read). Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId", "siteId"], additionalProperties: !1 } },
11011
- { path: ["staff-redemption", "lookup"], procedure: "event.staffRedemption.lookupStaffRedemptionEmployee", operation: "mutation", summary: "Look up an Employee ID at a site: who they are, what they already collected (a collected card's receipt carries itemsPending and itemsRecordedAt), the session whose sets would be used (card.session; under ANY_OPEN_SESSION with none open, the next to open or else the last to close) and whether a redemption would go ahead (refusal code otherwise). Writes nothing but failed-lookup throttle records, so it needs no confirmation flags. Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId", "siteId", "employeeId"], additionalProperties: !1 } },
11012
- { path: ["staff-redemption", "redeem"], procedure: "event.staffRedemption.redeemStaffRedemption", operation: "mutation", summary: "Redeem for an Employee ID at a site: records the chosen itemIds and reveals the prize outcome the server decides in the same transaction. clientRequestId is a UUID you generate; retry with the same one and you get the stored receipt, never a second redemption. When the event's counterOrder is DRAW_THEN_FOOD, itemIds must be [] (anything else is BAD_REQUEST): the claim, the set and the prize draw are recorded together and the receipt has itemsPending true until staff-redemption claims record-items. The item rule is not checked at the spin. Needs event.operate.", effects: ["state-change"], target: "eventId", dates: [], input: {
11013
- type: "object",
11014
- properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 }, clientRequestId: { type: "string", format: "uuid", pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, itemIds: { maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 64 } } },
11015
- required: ["eventId", "siteId", "employeeId", "clientRequestId", "itemIds"],
11016
- additionalProperties: !1
11017
- } },
11018
- { path: ["staff-redemption", "claims", "record-items"], procedure: "event.staffRedemption.recordStaffRedemptionClaimItems", operation: "mutation", summary: "Record the food (itemIds, checked against the item rule) for a claim that was drawn first (itemsPending true, counterOrder DRAW_THEN_FOOD). siteId must be the claim's own site (claims list shows it). Writes the items, sets itemsPending false and itemsRecordedAt, and logs it; it deducts no set and makes no draw. Idempotent: the same items again return replayed true with the stored receipt. CONFLICT when different items were already recorded, when the claim is voided, or when the claim was food-first (nothing pending). Needs event.operate at that site (a manager has it). Returns status recorded, replayed and the receipt.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, claimId: { type: "string", minLength: 1, maxLength: 64 }, itemIds: { maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 64 } } }, required: ["eventId", "siteId", "claimId", "itemIds"], additionalProperties: !1 } },
10933
+ { path: ["staff-redemption", "draw", "release"], procedure: "event.staffRedemption.releaseStaffRedemptionDraw", operation: "mutation", summary: "Release a person's prize draw (draw.id from claims list) with a reason: a won prize returns to its slot's stock and the person draws again on their next redemption. Refused (CONFLICT) while an active, not voided redemption still shows the draw (claims list draw.activeClaimCount > 0); void it first, or pass the explicit override allowWhileClaimActive: true to release a prize while its redemption stays recorded (for example a paper entry). The override is recorded in the activity log.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, drawId: { type: "string", minLength: 1, maxLength: 64 }, reason: { type: "string", minLength: 1, maxLength: 500 }, allowWhileClaimActive: { description: "Override: release the draw even though an active (not voided) redemption still shows it, for a redemption that stays recorded (for example a paper entry with no spin). Omit to refuse while any active redemption uses the draw.", type: "boolean" } }, required: ["eventId", "drawId", "reason"], additionalProperties: !1 } },
10934
+ { path: ["staff-redemption", "stock", "summary"], procedure: "event.staffRedemption.getStaffRedemptionStockSummary", operation: "query", summary: "Show sets and prizes issued and left per site and session, with per-slot item counts (items), roster headcount and how many of them collected, walk-ins (walkIns: unreleased draws in the slot by people whose roster site or shift is not the slot's) and how many of them won (walkInPrizes), plus event-wide item totals.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId"], additionalProperties: !1 } },
10935
+ { path: ["staff-redemption", "counter", "context"], procedure: "event.staffRedemption.getStaffRedemptionCounterContext", operation: "query", summary: "Counter view for one site (siteId): the event (name, status, dates), counterOrder (FOOD_THEN_DRAW or DRAW_THEN_FOOD, the order crew follow), items to choose from, the site's sessions with sets and prizes left, and any missing policies. wrongSite is the policy for people rostered at another site (null while unset), wrongSiteMessage the warning to show for them and staffIdLabel what the roster identifier is called (defaults applied). sessionRule is the session policy; under ANY_OPEN_SESSION, openSession is the session every counter serves from now (null when none is open) and openSessionChangesAt when that next changes (serverTime is the server clock at the read). Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 } }, required: ["eventId", "siteId"], additionalProperties: !1 } },
10936
+ { path: ["staff-redemption", "lookup"], procedure: "event.staffRedemption.lookupStaffRedemptionEmployee", operation: "mutation", summary: "Look up an Employee ID (employeeId) or a scanned employee QR code (code, from the employee page; valid for ten minutes, refused with a message to refresh when expired or forged) at a site, giving exactly one of the two: who they are, the card's awayFromRosterSite and rosterSiteId (true when their roster site is not this site), what they already collected (a collected card's receipt carries itemsPending and itemsRecordedAt), the session whose sets would be used (card.session; under ANY_OPEN_SESSION with none open, the next to open or else the last to close) and whether a redemption would go ahead (refusal code otherwise). Writes nothing but failed-lookup throttle records, so it needs no confirmation flags. Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 }, code: { description: "Employee QR code as scanned from the employee page. Give either employeeId or code.", type: "string", minLength: 1, maxLength: 512 } }, required: ["eventId", "siteId"], additionalProperties: !1 } },
10937
+ { path: ["staff-redemption", "redeem"], procedure: "event.staffRedemption.redeemStaffRedemption", operation: "mutation", summary: "Redeem for an Employee ID at a site: records the chosen itemIds and reveals the prize outcome the server decides in the same transaction. clientRequestId is a UUID you generate; retry with the same one and you get the stored receipt, never a second redemption. When the event's counterOrder is DRAW_THEN_FOOD, itemIds must be [] (anything else is BAD_REQUEST): the claim, the set and the prize draw are recorded together and the receipt has itemsPending true until staff-redemption claims record-items. The item rule is not checked at the spin. Needs event.operate.", effects: ["state-change"], target: "eventId", dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, employeeId: { type: "string", minLength: 1, maxLength: 64 }, clientRequestId: { type: "string", format: "uuid", pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, itemIds: { maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 64 } } }, required: ["eventId", "siteId", "employeeId", "clientRequestId", "itemIds"], additionalProperties: !1 } },
10938
+ {
10939
+ path: ["staff-redemption", "claims", "record-items"],
10940
+ procedure: "event.staffRedemption.recordStaffRedemptionClaimItems",
10941
+ operation: "mutation",
10942
+ summary: "Record the food (itemIds, checked against the item rule) for a claim that was drawn first (itemsPending true, counterOrder DRAW_THEN_FOOD). siteId must be the claim's own site (claims list shows it). Writes the items, sets itemsPending false and itemsRecordedAt, and logs it; it deducts no set and makes no draw. Idempotent: the same items again return replayed true with the stored receipt. CONFLICT when different items were already recorded, when the claim is voided, or when the claim was food-first (nothing pending). Needs event.operate at that site (a manager has it). Returns status recorded, replayed and the receipt.",
10943
+ effects: ["state-change"],
10944
+ target: "eventId",
10945
+ dates: [],
10946
+ input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, claimId: { type: "string", minLength: 1, maxLength: 64 }, itemIds: { maxItems: 20, type: "array", items: { type: "string", minLength: 1, maxLength: 64 } } }, required: ["eventId", "siteId", "claimId", "itemIds"], additionalProperties: !1 }
10947
+ },
11019
10948
  { path: ["staff-redemption", "counter", "claims"], procedure: "event.staffRedemption.getStaffRedemptionCounterClaims", operation: "query", summary: "List a site's recent claims (limit 1-50, default 20) as the counter sees them. scope mine (default) is the claims you made at the site, site is every claim at the site. status all (default) includes every recent claim; items-pending selects active claims whose food is not recorded before applying the limit. Each receipt carries itemsPending and itemsRecordedAt. Needs event.operate.", effects: [], dates: [], input: { type: "object", properties: { eventId: { type: "string", minLength: 1, maxLength: 64 }, siteId: { type: "string", minLength: 1, maxLength: 64 }, limit: { default: 20, type: "integer", minimum: 1, maximum: 50 }, scope: { default: "mine", type: "string", enum: ["mine", "site"] }, status: { default: "all", type: "string", enum: ["all", "items-pending"] } }, required: ["eventId", "siteId"], additionalProperties: !1 } }
11020
- ], manifest = command_manifest_default, registryFlags = ["input", "input-file", "allow-state-change", "allow-delete", "allow-email", "target"], isoDateTimePattern = new __cliRegExp("^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d", ""), isRecord3 = __name2((value) => typeof value == "object" && value !== null && !Array.isArray(value), "isRecord3"), commandName = __name2((entry) => "et ".concat(entry.path.join(" ")), "commandName"), findManifestEntry = __name2((positionals) => manifest.find((entry) => entry.path.length === positionals.length && entry.path.every((segment, index) => positionals[index] === segment)), "findManifestEntry"), listRegistryCommands = __name2(() => manifest.map((entry) => ({ command: commandName(entry), summary: entry.summary, effects: entry.effects })), "listRegistryCommands"), coerceDateAt = __name2((value, segments, label) => {
11021
- const [head, ...rest] = segments;
11022
- if (head === void 0) {
11023
- if (typeof value != "string") return value;
11024
- const parsed = new Date(value);
11025
- if (!isoDateTimePattern.test(value) || Number.isNaN(parsed.getTime())) throw new CliUsageError("".concat(label, " must be an ISO 8601 date-time such as 2026-11-20T18:00:00+08:00."));
11026
- return parsed;
11027
- }
11028
- const isArray = head.endsWith("[]"), key = isArray ? head.slice(0, -2) : head, apply = __name2((child) => isArray ? Array.isArray(child) ? child.map((item) => coerceDateAt(item, rest, label)) : child : coerceDateAt(child, rest, label), "apply");
11029
- return key === "" ? apply(value) : !isRecord3(value) || !(key in value) ? value : { ...value, [key]: apply(
11030
- value[key]
11031
- ) };
11032
- }, "coerceDateAt"), coerceDates = __name2((input, datePaths) => datePaths.reduce((current, path2) => coerceDateAt(current, path2 === "" ? [] : path2.split("."), path2 || "input"), input), "coerceDates"), readInput = __name2(async (parsed, entry) => {
10949
+ ], manifest = command_manifest_default, registryFlags = ["input", "input-file", "allow-state-change", "allow-delete", "allow-email", "target"], isoDateTimePattern = new __cliRegExp("^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d", ""), isRecord3 = __name2((value) => typeof value == "object" && value !== null && !Array.isArray(value), "isRecord3"), commandName = __name2((entry) => "et ".concat(entry.path.join(" ")), "commandName"), findManifestEntry = __name2((positionals) => manifest.find((entry) => entry.path.length === positionals.length && entry.path.every((segment, index) => positionals[index] === segment)), "findManifestEntry"), listRegistryCommands = __name2(() => manifest.map((entry) => ({ command: commandName(entry), summary: entry.summary, effects: entry.effects })), "listRegistryCommands"), coerceDateAt = __name2(
10950
+ (value, segments, label) => {
10951
+ const [head, ...rest] = segments;
10952
+ if (head === void 0) {
10953
+ if (typeof value != "string") return value;
10954
+ const parsed = new Date(value);
10955
+ if (!isoDateTimePattern.test(value) || Number.isNaN(parsed.getTime())) throw new CliUsageError("".concat(label, " must be an ISO 8601 date-time such as 2026-11-20T18:00:00+08:00."));
10956
+ return parsed;
10957
+ }
10958
+ const isArray = head.endsWith("[]"), key = isArray ? head.slice(0, -2) : head, apply = __name2((child) => isArray ? Array.isArray(child) ? child.map((item) => coerceDateAt(item, rest, label)) : child : coerceDateAt(child, rest, label), "apply");
10959
+ return key === "" ? apply(value) : !isRecord3(value) || !(key in value) ? value : { ...value, [key]: apply(value[key]) };
10960
+ },
10961
+ "coerceDateAt"
10962
+ ), coerceDates = __name2((input, datePaths) => datePaths.reduce((current, path2) => coerceDateAt(current, path2 === "" ? [] : path2.split("."), path2 || "input"), input), "coerceDates"), readInput = __name2(async (parsed, entry) => {
11033
10963
  const provided = parsed.flags.has("input") || parsed.flags.has("input-file");
11034
10964
  if (!entry.input) {
11035
- if (provided) throw new CliUsageError("".concat(commandName(entry), " does not take --input."));
10965
+ if (provided) throw new CliUsageError("".concat(
10966
+ commandName(entry),
10967
+ " does not take --input."
10968
+ ));
11036
10969
  return;
11037
10970
  }
11038
10971
  if (!provided) {
@@ -11059,26 +10992,14 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
11059
10992
  const expected = targetText(isRecord3(input) ? input[entry.target] : void 0);
11060
10993
  if (expected === void 0) throw new CliUsageError("--input must include ".concat(entry.target, " so the target can be confirmed."));
11061
10994
  if (getOptionalFlag(parsed, "target") !== expected) throw new CliUsageError("--target must exactly match input.".concat(entry.target, " (").concat(expected, ")."));
11062
- }, "assertConfirmed"), describe2 = __name2((entry) => ({
11063
- command: commandName(entry),
11064
- summary: entry.summary,
11065
- procedure: entry.procedure,
11066
- operation: entry.operation,
11067
- effects: entry.effects,
11068
- confirmation: entry.effects.length > 0 ? [...entry.effects.map((effect) => "--allow-".concat(effect)), ...entry.target ? ["--target <input.".concat(entry.target).concat(entry.target.endsWith("s") ? " joined with commas" : "", ">")] : []] : [],
11069
- input: entry.input ? "--input '<json>' or --input-file <path> matching inputSchema" : "none",
11070
- dateFields: entry.dates,
11071
- inputSchema: entry.input
11072
- }), "describe2"), resolveProcedureClient = __name2((procedure) => procedure.split(".").reduce((node2, segment) => node2[segment], api2), "resolveProcedureClient"), runRegistryCommand = __name2(async (input) => {
10995
+ }, "assertConfirmed"), describe2 = __name2((entry) => ({ command: commandName(entry), summary: entry.summary, procedure: entry.procedure, operation: entry.operation, effects: entry.effects, confirmation: entry.effects.length > 0 ? [...entry.effects.map((effect) => "--allow-".concat(effect)), ...entry.target ? ["--target <input.".concat(entry.target).concat(entry.target.endsWith("s") ? " joined with commas" : "", ">")] : []] : [], input: entry.input ? "--input '<json>' or --input-file <path> matching inputSchema" : "none", dateFields: entry.dates, inputSchema: entry.input }), "describe2"), resolveProcedureClient = __name2((procedure) => procedure.split(".").reduce((node2, segment) => node2[segment], api2), "resolveProcedureClient"), runRegistryCommand = __name2(async (input) => {
11073
10996
  const { parsed, runtime, authenticate } = input, entry = findManifestEntry(parsed.positionals);
11074
10997
  if (!entry) return !1;
11075
10998
  if (parsed.flags.has("help")) return assertOnlyFlags(parsed, ["help"]), writeSuccess(runtime, describe2(entry)), !0;
11076
10999
  assertOnlyFlags(parsed, registryFlags);
11077
11000
  const procedureInput = await readInput(parsed, entry);
11078
11001
  assertConfirmed(parsed, entry, procedureInput), await authenticate();
11079
- const client = resolveProcedureClient(
11080
- entry.procedure
11081
- );
11002
+ const client = resolveProcedureClient(entry.procedure);
11082
11003
  return writeSuccess(runtime, entry.operation === "query" ? await client.query(procedureInput) : await client.mutate(procedureInput)), !0;
11083
11004
  }, "runRegistryCommand"), getInstalledCliVersion = __name2(() => {
11084
11005
  try {
@@ -11103,21 +11024,21 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
11103
11024
  const createdAt = new Date(parsed.createdAt);
11104
11025
  if (Number.isNaN(createdAt.getTime())) throw new CliUsageError("--cursor.createdAt must be a valid date.");
11105
11026
  return { createdAt, id: parsed.id };
11106
- }, "parseCursor"), parseRetainedIds = __name2((value) => {
11107
- let parsed;
11108
- try {
11109
- parsed = JSON.parse(value);
11110
- } catch {
11111
- throw new CliUsageError("--retained-ids must be valid JSON.");
11112
- }
11113
- if (!Array.isArray(parsed)) throw new CliUsageError("--retained-ids must be a JSON array.");
11114
- if (parsed.length > 100 || parsed.some((id) => typeof id != "string" || id.length === 0)) throw new CliUsageError("--retained-ids must contain at most 100 non-empty strings.");
11115
- return parsed;
11116
- }, "parseRetainedIds"), luckyDrawParticipantFields = /* @__PURE__ */ new Set(["email", "luckyDrawId", "name"]), asParticipantRecord = __name2((participant, index) => {
11117
- if (typeof participant != "object" || participant === null || Array.isArray(participant)) throw new CliUsageError("--participants[".concat(
11118
- index,
11119
- "] must be an object."
11120
- ));
11027
+ }, "parseCursor"), parseRetainedIds = __name2(
11028
+ (value) => {
11029
+ let parsed;
11030
+ try {
11031
+ parsed = JSON.parse(value);
11032
+ } catch {
11033
+ throw new CliUsageError("--retained-ids must be valid JSON.");
11034
+ }
11035
+ if (!Array.isArray(parsed)) throw new CliUsageError("--retained-ids must be a JSON array.");
11036
+ if (parsed.length > 100 || parsed.some((id) => typeof id != "string" || id.length === 0)) throw new CliUsageError("--retained-ids must contain at most 100 non-empty strings.");
11037
+ return parsed;
11038
+ },
11039
+ "parseRetainedIds"
11040
+ ), luckyDrawParticipantFields = /* @__PURE__ */ new Set(["email", "luckyDrawId", "name"]), asParticipantRecord = __name2((participant, index) => {
11041
+ if (typeof participant != "object" || participant === null || Array.isArray(participant)) throw new CliUsageError("--participants[".concat(index, "] must be an object."));
11121
11042
  if (Object.keys(participant).some((key) => !luckyDrawParticipantFields.has(key))) throw new CliUsageError("--participants[".concat(index, "] contains an unsupported field."));
11122
11043
  return participant;
11123
11044
  }, "asParticipantRecord"), readParticipantField = __name2((participant, key) => key in participant ? participant[key] : void 0, "readParticipantField"), parseLuckyDrawParticipant = __name2((participant, index) => {
@@ -11134,7 +11055,9 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
11134
11055
  throw new CliUsageError("--participants must be valid JSON.");
11135
11056
  }
11136
11057
  if (!Array.isArray(parsed)) throw new CliUsageError("--participants must be a JSON array.");
11137
- return parsed.map(parseLuckyDrawParticipant);
11058
+ return parsed.map(
11059
+ parseLuckyDrawParticipant
11060
+ );
11138
11061
  }, "parseLuckyDrawParticipants"), parseAppearanceMediaType = __name2((value) => {
11139
11062
  if (value === "image" || value === "video") return value;
11140
11063
  throw new CliUsageError("--media-type must be one of: image, video.");
@@ -11142,9 +11065,7 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
11142
11065
  if (!eventStatuses.some((status) => status === value)) throw new CliUsageError("--status must be one of: ".concat(eventStatuses.join(", "), "."));
11143
11066
  return value;
11144
11067
  }, "parseEventListStatus"), parseArchiveStatus = __name2((value) => {
11145
- if (!archiveStatuses.some((status) => status === value)) throw new CliUsageError(
11146
- "--archive-status must be one of: ".concat(archiveStatuses.join(", "), ".")
11147
- );
11068
+ if (!archiveStatuses.some((status) => status === value)) throw new CliUsageError("--archive-status must be one of: ".concat(archiveStatuses.join(", "), "."));
11148
11069
  return value;
11149
11070
  }, "parseArchiveStatus"), parseCreatableEventType = __name2((value) => {
11150
11071
  const result = activeEventTypeSchema.safeParse(value);
@@ -11163,7 +11084,10 @@ var STAFF_REDEMPTION_NAME_MAX = 120, STAFF_REDEMPTION_EMPLOYEE_ID_MAX = 64, STAF
11163
11084
  if (Number.isNaN(parsed.getTime())) throw new CliUsageError("--".concat(name, " must be a valid date-time."));
11164
11085
  return parsed;
11165
11086
  }, "parseIsoDateTime"), commandKey = __name2((action, subAction) => JSON.stringify([action ?? null, subAction ?? null]), "commandKey"), runAuthLogin = __name2(async ({ parsed, runtime, credentialStore, apiBaseUrl, cliVersion }) => {
11166
- assertPositionalCount(parsed, 2), assertOnlyFlags(parsed, ["no-browser"]);
11087
+ assertPositionalCount(
11088
+ parsed,
11089
+ 2
11090
+ ), assertOnlyFlags(parsed, ["no-browser"]);
11167
11091
  const credentials = await loginWithBrowser({ apiBaseUrl, clientVersion: cliVersion, onVerification: __name2(({ browserOpened, userCode, verificationUriComplete }) => {
11168
11092
  runtime.stderr.write("".concat(browserOpened ? "Opened" : "Open", " ").concat(verificationUriComplete, `
11169
11093
  Code: `).concat(userCode, `
@@ -11180,10 +11104,7 @@ Waiting for approval\u2026
11180
11104
  }, "runAuthLogout"), runAuthWhoami = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11181
11105
  assertPositionalCount(parsed, 2), assertOnlyFlags(parsed, []), await ensureAuthentication(), writeSuccess(runtime, await api2.auth.whoami.query(void 0));
11182
11106
  }, "runAuthWhoami"), runOrganizationList = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11183
- assertPositionalCount(
11184
- parsed,
11185
- 2
11186
- ), assertOnlyFlags(parsed, []), await ensureAuthentication(), writeSuccess(runtime, await api2.organization.getOrganizationsForUser.query(void 0));
11107
+ assertPositionalCount(parsed, 2), assertOnlyFlags(parsed, []), await ensureAuthentication(), writeSuccess(runtime, await api2.organization.getOrganizationsForUser.query(void 0));
11187
11108
  }, "runOrganizationList"), runOrganizationGet = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11188
11109
  assertPositionalCount(parsed, 2), assertOnlyFlags(parsed, ["organization-id"]), await ensureAuthentication(), writeSuccess(runtime, await api2.organization.getOrganizationById.query({ organizationId: getRequiredFlag(parsed, "organization-id") }));
11189
11110
  }, "runOrganizationGet"), runOrganizationCreate = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
@@ -11204,10 +11125,7 @@ Waiting for approval\u2026
11204
11125
  assertPositionalCount(parsed, 3), assertOnlyFlags(parsed, ["event-id", "public"]);
11205
11126
  const eventId = getRequiredFlag(parsed, "event-id");
11206
11127
  if (parsed.flags.get("public") === !0) {
11207
- writeSuccess(
11208
- runtime,
11209
- await api2.public.getEventAppearance.query({ eventId })
11210
- );
11128
+ writeSuccess(runtime, await api2.public.getEventAppearance.query({ eventId }));
11211
11129
  return;
11212
11130
  }
11213
11131
  await ensureAuthentication(), writeSuccess(runtime, await api2.event.getEventAppearance.query({ eventId }));
@@ -11217,30 +11135,27 @@ Waiting for approval\u2026
11217
11135
  if (reset && appearanceValue !== void 0) throw new CliUsageError("Use either --appearance or --reset, not both.");
11218
11136
  if (!reset && appearanceValue === void 0) throw new CliUsageError("--appearance is required unless --reset is provided.");
11219
11137
  const input = { eventId: getRequiredFlag(parsed, "event-id"), appearanceVersion: parseNonnegativeInteger(getRequiredFlag(parsed, "appearance-version"), "appearance-version"), appearance: reset ? null : parseAppearance(appearanceValue) };
11220
- await ensureAuthentication(), writeSuccess(
11221
- runtime,
11222
- await api2.event.updateEventAppearance.mutate(input)
11223
- );
11138
+ await ensureAuthentication(), writeSuccess(runtime, await api2.event.updateEventAppearance.mutate(input));
11224
11139
  }, "runEventAppearanceUpdate"), runEventAppearanceUpload = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11225
11140
  assertPositionalCount(parsed, 3), assertOnlyFlags(parsed, ["event-id", "file", "content-type", "media-type"]);
11226
- const eventId = getRequiredFlag(parsed, "event-id"), filePath = getRequiredFlag(parsed, "file"), contentType = getRequiredFlag(parsed, "content-type"), mediaType = parseAppearanceMediaType(getRequiredFlag(parsed, "media-type")), file = await readFile7(filePath);
11141
+ const eventId = getRequiredFlag(parsed, "event-id"), filePath = getRequiredFlag(
11142
+ parsed,
11143
+ "file"
11144
+ ), contentType = getRequiredFlag(parsed, "content-type"), mediaType = parseAppearanceMediaType(getRequiredFlag(parsed, "media-type")), file = await readFile7(filePath);
11227
11145
  await ensureAuthentication();
11228
11146
  const signed = await api2.attachment.getPresignedUrlToUpload.mutate({ folder: "event-appearance/".concat(mediaType === "image" ? "images" : "videos"), fileName: basename5(filePath), contentType, size: file.byteLength, eventId }), uploadResponse = await fetch(signed.uploadUrl, { method: "PUT", headers: { "content-type": contentType }, body: file });
11229
11147
  if (!uploadResponse.ok) throw new Error("Appearance media upload failed with HTTP ".concat(uploadResponse.status, "."));
11230
- writeSuccess(
11231
- runtime,
11232
- signed
11233
- );
11148
+ writeSuccess(runtime, signed);
11234
11149
  }, "runEventAppearanceUpload"), runPhotoWallDisplayItems = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11235
11150
  assertPositionalCount(parsed, 3), assertOnlyFlags(parsed, ["event-id", "limit", "cursor", "retained-ids"]);
11236
- const cursorValue = getOptionalFlag(parsed, "cursor"), retainedIdsValue = getOptionalFlag(parsed, "retained-ids"), input = { eventId: getRequiredFlag(parsed, "event-id"), limit: parseBoundedInteger(getOptionalFlag(parsed, "limit") ?? "30", "limit", 1, 60), ...cursorValue === void 0 ? {} : { cursor: parseCursor(cursorValue) }, retainedIds: retainedIdsValue === void 0 ? [] : parseRetainedIds(retainedIdsValue) };
11151
+ const cursorValue = getOptionalFlag(parsed, "cursor"), retainedIdsValue = getOptionalFlag(parsed, "retained-ids"), input = { eventId: getRequiredFlag(
11152
+ parsed,
11153
+ "event-id"
11154
+ ), limit: parseBoundedInteger(getOptionalFlag(parsed, "limit") ?? "30", "limit", 1, 60), ...cursorValue === void 0 ? {} : { cursor: parseCursor(cursorValue) }, retainedIds: retainedIdsValue === void 0 ? [] : parseRetainedIds(retainedIdsValue) };
11237
11155
  await ensureAuthentication(), writeSuccess(runtime, await api2.event.photoWall.getPhotoWallDisplayItems.query(input));
11238
11156
  }, "runPhotoWallDisplayItems"), runLuckyDrawPreDraw = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11239
11157
  assertPositionalCount(parsed, 2), assertOnlyFlags(parsed, ["event-id", "prize-count"]);
11240
- const input = { eventId: getRequiredFlag(parsed, "event-id"), prizeCount: parsePositiveInteger(getRequiredFlag(
11241
- parsed,
11242
- "prize-count"
11243
- ), "prize-count") };
11158
+ const input = { eventId: getRequiredFlag(parsed, "event-id"), prizeCount: parsePositiveInteger(getRequiredFlag(parsed, "prize-count"), "prize-count") };
11244
11159
  await ensureAuthentication(), writeSuccess(runtime, await api2.event.luckyDraw.preDrawPrizes.mutate(input));
11245
11160
  }, "runLuckyDrawPreDraw"), runLuckyDrawParticipantsReplace = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11246
11161
  assertPositionalCount(parsed, 3), assertOnlyFlags(parsed, ["event-id", "participants", "participants-file", "allow-state-change", "target"]);
@@ -11250,22 +11165,13 @@ Waiting for approval\u2026
11250
11165
  await ensureAuthentication(), writeSuccess(runtime, await api2.event.luckyDraw.createLuckyDrawParticipant.mutate(input));
11251
11166
  }, "runLuckyDrawParticipantsReplace"), runLuckyDrawParticipantsList = __name2(async ({ parsed, runtime, ensureAuthentication }) => {
11252
11167
  assertPositionalCount(parsed, 3), assertOnlyFlags(parsed, ["event-id", "page", "per-page"]);
11253
- const input = { eventId: getRequiredFlag(parsed, "event-id"), page: parsePositiveInteger(
11254
- getOptionalFlag(parsed, "page") ?? "1",
11255
- "page"
11256
- ), perPage: parseBoundedInteger(getOptionalFlag(parsed, "per-page") ?? "100", "per-page", 1, 100) };
11168
+ const input = { eventId: getRequiredFlag(parsed, "event-id"), page: parsePositiveInteger(getOptionalFlag(parsed, "page") ?? "1", "page"), perPage: parseBoundedInteger(getOptionalFlag(parsed, "per-page") ?? "100", "per-page", 1, 100) };
11257
11169
  await ensureAuthentication(), writeSuccess(runtime, await api2.event.luckyDraw.getLuckyDrawParticipantsByEventId.query(input));
11258
- }, "runLuckyDrawParticipantsList"), organizationCommands = /* @__PURE__ */ new Map([[commandKey("list"), runOrganizationList], [commandKey("get"), runOrganizationGet], [commandKey("create"), runOrganizationCreate]]), commandTable = /* @__PURE__ */ new Map([["auth", /* @__PURE__ */ new Map([[commandKey("login"), runAuthLogin], [commandKey("status"), runAuthStatus], [commandKey("logout"), runAuthLogout], [commandKey("whoami"), runAuthWhoami]])], ["organization", organizationCommands], ["org", organizationCommands], ["event", /* @__PURE__ */ new Map([
11259
- [commandKey("create"), runEventCreate],
11260
- [commandKey("list"), runEventList],
11261
- [commandKey("get"), runEventGet],
11262
- [commandKey("appearance", "get"), runEventAppearanceGet],
11263
- [commandKey("appearance", "update"), runEventAppearanceUpdate],
11264
- [commandKey("appearance", "reset"), runEventAppearanceUpdate],
11265
- [commandKey("appearance", "upload"), runEventAppearanceUpload],
11266
- [commandKey("photo-wall", "display-items"), runPhotoWallDisplayItems],
11267
- [commandKey("photo-wall", "display"), runPhotoWallDisplayItems]
11268
- ])], ["lucky-draw", /* @__PURE__ */ new Map([[commandKey("pre-draw"), runLuckyDrawPreDraw], [commandKey("participants", "replace"), runLuckyDrawParticipantsReplace], [commandKey("participants", "list"), runLuckyDrawParticipantsList]])]]), runCommand = __name2(async (parsed, runtime, credentialStore, apiBaseUrl, configureAccessToken) => {
11170
+ }, "runLuckyDrawParticipantsList"), organizationCommands = /* @__PURE__ */ new Map([
11171
+ [commandKey("list"), runOrganizationList],
11172
+ [commandKey("get"), runOrganizationGet],
11173
+ [commandKey("create"), runOrganizationCreate]
11174
+ ]), commandTable = /* @__PURE__ */ new Map([["auth", /* @__PURE__ */ new Map([[commandKey("login"), runAuthLogin], [commandKey("status"), runAuthStatus], [commandKey("logout"), runAuthLogout], [commandKey("whoami"), runAuthWhoami]])], ["organization", organizationCommands], ["org", organizationCommands], ["event", /* @__PURE__ */ new Map([[commandKey("create"), runEventCreate], [commandKey("list"), runEventList], [commandKey("get"), runEventGet], [commandKey("appearance", "get"), runEventAppearanceGet], [commandKey("appearance", "update"), runEventAppearanceUpdate], [commandKey("appearance", "reset"), runEventAppearanceUpdate], [commandKey("appearance", "upload"), runEventAppearanceUpload], [commandKey("photo-wall", "display-items"), runPhotoWallDisplayItems], [commandKey("photo-wall", "display"), runPhotoWallDisplayItems]])], ["lucky-draw", /* @__PURE__ */ new Map([[commandKey("pre-draw"), runLuckyDrawPreDraw], [commandKey("participants", "replace"), runLuckyDrawParticipantsReplace], [commandKey("participants", "list"), runLuckyDrawParticipantsList]])]]), runCommand = __name2(async (parsed, runtime, credentialStore, apiBaseUrl, configureAccessToken) => {
11269
11175
  const [group, action, subAction] = parsed.positionals, cliVersion = getInstalledCliVersion();
11270
11176
  let accessToken;
11271
11177
  const ensureAuthentication = __name2(async () => {
@@ -11296,14 +11202,15 @@ Waiting for approval\u2026
11296
11202
  const handler = group === void 0 ? void 0 : commandTable.get(group)?.get(commandKey(action, subAction));
11297
11203
  if (handler === void 0) throw new CliUsageError("Unknown command. Run `et --help` for available commands.");
11298
11204
  await handler({ parsed, runtime, credentialStore, apiBaseUrl, cliVersion, ensureAuthentication });
11299
- }, "runCommand"), runCli = __name2(async (args, runtime = processRuntime, credentialStore = createBunCredentialStore(
11300
- { product: "event-tech" }
11301
- ), configureAccessToken = configureEventTechAccessToken) => {
11205
+ }, "runCommand"), runCli = __name2(async (args, runtime = processRuntime, credentialStore = createBunCredentialStore({ product: "event-tech" }), configureAccessToken = configureEventTechAccessToken) => {
11302
11206
  try {
11303
11207
  const parsed = parseArguments(args), apiUrl = getOptionalFlag(parsed, "api-url");
11304
11208
  return apiUrl ? configureEventTechApiBaseUrl(apiUrl) : configureEventTechApiFromEnvironment(), await runCommand(parsed, runtime, credentialStore, getEventTechApiBaseUrl(), configureAccessToken), 0;
11305
11209
  } catch (error2) {
11306
- return writeError(runtime, error2), error2 instanceof CliUsageError ? 2 : 1;
11210
+ return writeError(
11211
+ runtime,
11212
+ error2
11213
+ ), error2 instanceof CliUsageError ? 2 : 1;
11307
11214
  }
11308
11215
  }, "runCli");
11309
11216
  import.meta.main && (assertBunRuntime(), process.exitCode = await runCli(process.argv.slice(2)));