@go-labs-sg/event-tech 1.17.0 → 1.19.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/README.md +55 -17
- package/command-reference.md +15 -74
- package/dist/index.js +105 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ Commands emit deterministic JSON envelopes. Authentication credentials are never
|
|
|
109
109
|
|
|
110
110
|
### Registry commands (every staff and admin operation)
|
|
111
111
|
|
|
112
|
-
Besides the named commands above, `et` exposes every staff/admin Event Tech API procedure as a registry command. [`command-reference.md`](./command-reference.md) lists them all, plus the procedures that intentionally have none (participant-only, public/display, browser-only,
|
|
112
|
+
Besides the named commands above, `et` exposes every staff/admin Event Tech API procedure as a registry command. [`command-reference.md`](./command-reference.md) lists them all, plus the procedures that intentionally have none (participant-only, public/display, browser-only, and web navigation helpers).
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
115
|
et commands # list every registry command
|
|
@@ -448,7 +448,7 @@ returns `imageKey` and a signed `imageUrl` for each prize.
|
|
|
448
448
|
items handed over and reveal a prize outcome the server decides in the same transaction.
|
|
449
449
|
Everything uses the same tRPC procedures and permissions as the web app. Setup and the roster
|
|
450
450
|
need `event.setup`, the export needs `event.export`, and the counter commands (`counter`,
|
|
451
|
-
`lookup`, `redeem`) need `event.operate`. Site crew sign in with a site password in the browser
|
|
451
|
+
`lookup`, `redeem`, `claims record-items`) need `event.operate`. Site crew sign in with a site password in the browser
|
|
452
452
|
only; crew sign-in and the counter access check have no CLI command.
|
|
453
453
|
|
|
454
454
|
All commands except `roster import` and `export` are registry commands: pass the procedure input
|
|
@@ -459,7 +459,7 @@ confirm every write with `--allow-state-change --target <event-id>`. The command
|
|
|
459
459
|
| --- | --- |
|
|
460
460
|
| Setup | `setup get`, `settings update`, `site upsert`, `crew-password set`, `crew-password clear`, `session upsert`, `slot set`, `item-group upsert`, `item upsert`, `prize upsert`, `prize-stock set`, `rollover preview`, `rollover run`, `rollover list`, `rollover undo`, `archive set` |
|
|
461
461
|
| Roster | `roster list`, `roster counts`, `roster upsert`, `roster import` |
|
|
462
|
-
| Redemption log | `claims list`, `claims counts`, `claims void`, `draw release`, `stock summary`, `export` |
|
|
462
|
+
| Redemption log | `claims list`, `claims counts`, `claims void`, `claims record-items`, `draw release`, `stock summary`, `export` |
|
|
463
463
|
| Counter | `counter context`, `lookup`, `redeem`, `counter claims` |
|
|
464
464
|
|
|
465
465
|
A walkthrough with made-up names and IDs. Nothing here is an instruction to change a live event;
|
|
@@ -475,8 +475,12 @@ et event create --organization-id <org-id> --name "Example Staff Appreciation" \
|
|
|
475
475
|
# items a person may take (ONE_FROM_EACH_GROUP, AT_MOST_ONE_PER_GROUP or
|
|
476
476
|
# AT_MOST_ONE_PER_GROUP_OR_NONE), what happens at the wrong site (REFUSE or
|
|
477
477
|
# SERVE_FROM_COUNTER) and the draw (REMAINING_HEADCOUNT, or FIXED_RATE with
|
|
478
|
-
# fixedWinRatePercent).
|
|
479
|
-
#
|
|
478
|
+
# fixedWinRatePercent). sessionRule is optional: OWN_SHIFT (the default) serves people
|
|
479
|
+
# only during their own shift's session; ANY_OPEN_SESSION serves them during whichever
|
|
480
|
+
# session is open now, from that session's sets. counterOrder is optional too:
|
|
481
|
+
# FOOD_THEN_DRAW (the default when unset: items first, then the wheel) or DRAW_THEN_FOOD
|
|
482
|
+
# (spin first, record the food afterwards). They lock once the first redemption exists;
|
|
483
|
+
# changing them then needs overrideReason.
|
|
480
484
|
et staff-redemption settings update --allow-state-change --target <event-id> \
|
|
481
485
|
--input '{"eventId":"<event-id>","eligibleShifts":["A","B","C","D"],"itemRule":"ONE_FROM_EACH_GROUP","wrongSite":"REFUSE","drawPolicy":"REMAINING_HEADCOUNT"}'
|
|
482
486
|
|
|
@@ -527,6 +531,21 @@ et staff-redemption lookup \
|
|
|
527
531
|
et staff-redemption redeem --allow-state-change --target <event-id> \
|
|
528
532
|
--input "{\"eventId\":\"<event-id>\",\"siteId\":\"<site-id>\",\"employeeId\":\"E1001\",\"clientRequestId\":\"$(uuidgen | tr A-Z a-z)\",\"itemIds\":[\"<item-id>\"]}"
|
|
529
533
|
|
|
534
|
+
# 8b. Draw first (counterOrder DRAW_THEN_FOOD). redeem must send itemIds [] (anything else is
|
|
535
|
+
# BAD_REQUEST): it records the claim, the set and the prize draw together, and the receipt
|
|
536
|
+
# has itemsPending true. The food is recorded later, on the claim, with record-items (the
|
|
537
|
+
# claim's own siteId; claimId from the receipt or claims list). The same items again return
|
|
538
|
+
# replayed true; different items once recorded, a voided claim and a food-first claim are
|
|
539
|
+
# CONFLICT. counter claims and claims list show itemsPending and itemsRecordedAt;
|
|
540
|
+
# claims list --status items-pending finds claims still waiting for food.
|
|
541
|
+
et staff-redemption settings update --allow-state-change --target <event-id> \
|
|
542
|
+
--input '{"eventId":"<event-id>","counterOrder":"DRAW_THEN_FOOD"}'
|
|
543
|
+
et staff-redemption redeem --allow-state-change --target <event-id> \
|
|
544
|
+
--input "{\"eventId\":\"<event-id>\",\"siteId\":\"<site-id>\",\"employeeId\":\"E1001\",\"clientRequestId\":\"$(uuidgen | tr A-Z a-z)\",\"itemIds\":[]}"
|
|
545
|
+
et staff-redemption claims record-items --allow-state-change --target <event-id> \
|
|
546
|
+
--input '{"eventId":"<event-id>","siteId":"<site-id>","claimId":"<claim-id>","itemIds":["<item-id>"]}'
|
|
547
|
+
et staff-redemption claims list --input '{"eventId":"<event-id>","status":"items-pending"}'
|
|
548
|
+
|
|
530
549
|
# 9. Fix a mistake. void returns the set (the prize outcome stays, so a redo shows the same
|
|
531
550
|
# result); draw release also returns a won prize to stock so the person draws again.
|
|
532
551
|
# draw release is refused while an active redemption still shows the draw (claims list
|
|
@@ -592,10 +611,10 @@ An unknown name fails and lists the workbook's sheets; nothing changes. A CSV ha
|
|
|
592
611
|
`--sheet` with a CSV fails.
|
|
593
612
|
|
|
594
613
|
**Export.** `export --event-id <id>` prints the redemption rows as JSON, oldest first. Filters:
|
|
595
|
-
`--search`, `--site-id`, `--session-id` and `--status active|voided|all` (default all). With
|
|
614
|
+
`--search`, `--site-id`, `--session-id` and `--status active|items-pending|voided|all` (default all). With
|
|
596
615
|
`--csv-file <path>` it writes a CSV instead and prints `{ "file", "rows" }`. The CSV has one row
|
|
597
|
-
per claim with the columns Created at, Employee ID, Name, Site, Session, Items,
|
|
598
|
-
Operator kind, Voided at, Void reason and Draw released at. It is UTF-8 with a byte order mark and
|
|
616
|
+
per claim with the columns Created at, Employee ID, Name, Site, Session, Items, Items recorded
|
|
617
|
+
(yes or no), Items recorded at, Outcome, Prize, Operator kind, Voided at, Void reason and Draw released at. It is UTF-8 with a byte order mark and
|
|
599
618
|
CRLF line ends so Excel opens it correctly; text that would run as a spreadsheet formula (a
|
|
600
619
|
leading `=`, `+`, `-` or `@`) gets a leading apostrophe. An existing file is never overwritten
|
|
601
620
|
unless you pass `--force`. The export needs `event.export` and fails above 20,000 rows; narrow
|
|
@@ -619,21 +638,40 @@ it with the filters.
|
|
|
619
638
|
when the person was served at a site other than their roster site; false when their roster
|
|
620
639
|
site matches no site). The CSV export adds "Roster site" and "Away from roster site" columns
|
|
621
640
|
and writes items as `Group: Item`.
|
|
622
|
-
- `counter context` adds `event` (`{ id, name, status, startDateTime, endDateTime }`)
|
|
641
|
+
- `counter context` adds `event` (`{ id, name, status, startDateTime, endDateTime }`) and `counterOrder`.
|
|
642
|
+
- Draw-first claims: `claims list`, `export` and `counter claims` rows and receipts carry `itemsPending` (true until the food is recorded) and `itemsRecordedAt` (null until then; also null on food-first claims). `claims counts` returns `totalCount`, `activeCount`, `itemsPendingCount` and `voidedCount`. Voiding a claim that is still pending releases its set; a redo reuses the same prize outcome and is pending again.
|
|
623
643
|
- `counter claims` takes `scope`: `mine` (default) is the claims made by you at the site (a crew
|
|
624
644
|
device sees its own crew session's), `site` is every claim at the site whoever served it.
|
|
625
645
|
Both need the same counter access, so `event.operate` for the CLI:
|
|
626
646
|
`et staff-redemption counter claims --input '{"eventId":"<event-id>","siteId":"<site-id>","scope":"site"}'`.
|
|
627
647
|
|
|
628
|
-
###
|
|
648
|
+
### Retired event types
|
|
649
|
+
|
|
650
|
+
Scavenger Hunt (Amazing Race) and Gardens by the Bay were retired and their code
|
|
651
|
+
removed (#2401). Existing `event list`, `event get` and appearance commands retain
|
|
652
|
+
their contracts and can still return historical `SCAVENGER_HUNT` /
|
|
653
|
+
`GARDENS_BY_THE_BAY` values for the events kept in the database. The CLI has no
|
|
654
|
+
event-create, duplicate, type-change or scavenger-specific commands, and the
|
|
655
|
+
server rejects new events of these types and changes into them, including requests
|
|
656
|
+
from older/custom clients.
|
|
657
|
+
|
|
658
|
+
Their stored data can still be read with one read-only command (needs
|
|
659
|
+
`event.export` on the event; archived events are included):
|
|
660
|
+
|
|
661
|
+
```bash
|
|
662
|
+
et event retired export --input '{"eventId":"<event-id>"}' > retired-event.json
|
|
663
|
+
```
|
|
629
664
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
665
|
+
It is a full export of setup and results: the event, its saved config, teams,
|
|
666
|
+
stations and missions (answer options, correct answers, acceptable variations,
|
|
667
|
+
points, matching-game and spot-the-difference content), and every participant with
|
|
668
|
+
station progress and mission submissions (answer, points, status, approval state).
|
|
669
|
+
Every row has its stable `id`; archived rows are included with `archivedAt` set, so
|
|
670
|
+
an obsolete option or variation is distinguishable from its replacement. Station,
|
|
671
|
+
mission and game images (`imageUrl`) and photo/video submissions (`mediaUrl`) are
|
|
672
|
+
signed for one hour (`mediaUrlExpiresInSeconds`), so download media right after
|
|
673
|
+
exporting; the raw S3 keys are included too. Other event types are rejected with a pointer to
|
|
674
|
+
`et event export`. Nothing creates or edits these events.
|
|
637
675
|
|
|
638
676
|
### Event appearance and Photo Wall display
|
|
639
677
|
|
package/command-reference.md
CHANGED
|
@@ -166,6 +166,8 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
166
166
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
167
167
|
- `et event export` → `event.getEventDataToExport` (query)
|
|
168
168
|
- Export an event's submissions and results.
|
|
169
|
+
- `et event retired export` → `event.getRetiredEventExport` (query)
|
|
170
|
+
- 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.
|
|
169
171
|
- `et event background get` → `event.getEventBackgroundImage` (query)
|
|
170
172
|
- Get an event's background image URL.
|
|
171
173
|
- `et event story list` → `event.getStoryItemsByEventId` (query)
|
|
@@ -306,9 +308,9 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
306
308
|
- Approve or reject a Human Bingo card item submission.
|
|
307
309
|
- Confirm: `--allow-state-change` `--target <input.id>`
|
|
308
310
|
- `et staff-redemption setup get` → `event.staffRedemption.getStaffRedemptionSetup` (query)
|
|
309
|
-
- Get the whole staff redemption setup: settings, 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.
|
|
311
|
+
- 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.
|
|
310
312
|
- `et staff-redemption settings update` → `event.staffRedemption.updateStaffRedemptionSettings` (mutation)
|
|
311
|
-
- Update eligibleShifts, itemRule, wrongSite, drawPolicy and
|
|
313
|
+
- 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.
|
|
312
314
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
313
315
|
- `et staff-redemption site upsert` → `event.staffRedemption.upsertStaffRedemptionSite` (mutation)
|
|
314
316
|
- Create a site (omit siteId) or rename and reorder one (give siteId). Use staff-redemption archive set to archive or unarchive it.
|
|
@@ -320,7 +322,7 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
320
322
|
- Clear a site's crew password, which turns its crew link off and ends every crew session at that site.
|
|
321
323
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
322
324
|
- `et staff-redemption session upsert` → `event.staffRedemption.upsertStaffRedemptionSession` (mutation)
|
|
323
|
-
- 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.
|
|
325
|
+
- 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.
|
|
324
326
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
325
327
|
- Date fields: `startsAt`, `endsAt`
|
|
326
328
|
- `et staff-redemption slot set` → `event.staffRedemption.setStaffRedemptionSlot` (mutation)
|
|
@@ -359,11 +361,11 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
359
361
|
- 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).
|
|
360
362
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
361
363
|
- `et staff-redemption claims list` → `event.staffRedemption.getStaffRedemptionClaims` (query)
|
|
362
|
-
- 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; filter by search, siteId, sessionId and status (active, voided, all).
|
|
364
|
+
- 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.
|
|
363
365
|
- `et staff-redemption claims counts` → `event.staffRedemption.getStaffRedemptionClaimCounts` (query)
|
|
364
|
-
- Count claims matching the same filters as claims list.
|
|
366
|
+
- 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.
|
|
365
367
|
- `et staff-redemption claims void` → `event.staffRedemption.voidStaffRedemptionClaim` (mutation)
|
|
366
|
-
- Void a claim with a reason. 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.
|
|
368
|
+
- 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.
|
|
367
369
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
368
370
|
- `et staff-redemption draw release` → `event.staffRedemption.releaseStaffRedemptionDraw` (mutation)
|
|
369
371
|
- 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.
|
|
@@ -371,14 +373,17 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
371
373
|
- `et staff-redemption stock summary` → `event.staffRedemption.getStaffRedemptionStockSummary` (query)
|
|
372
374
|
- 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.
|
|
373
375
|
- `et staff-redemption counter context` → `event.staffRedemption.getStaffRedemptionCounterContext` (query)
|
|
374
|
-
- Counter view for one site (siteId): the event (name, status, dates), items to choose from, the site's sessions with sets and prizes left, and any missing policies. Needs event.operate.
|
|
376
|
+
- 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.
|
|
375
377
|
- `et staff-redemption lookup` → `event.staffRedemption.lookupStaffRedemptionEmployee` (mutation)
|
|
376
|
-
- Look up an Employee ID at a site: who they are, what they already collected 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.
|
|
378
|
+
- 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.
|
|
377
379
|
- `et staff-redemption redeem` → `event.staffRedemption.redeemStaffRedemption` (mutation)
|
|
378
|
-
- 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. Needs event.operate.
|
|
380
|
+
- 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.
|
|
381
|
+
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
382
|
+
- `et staff-redemption claims record-items` → `event.staffRedemption.recordStaffRedemptionClaimItems` (mutation)
|
|
383
|
+
- 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.
|
|
379
384
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
380
385
|
- `et staff-redemption counter claims` → `event.staffRedemption.getStaffRedemptionCounterClaims` (query)
|
|
381
|
-
- 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. Needs event.operate.
|
|
386
|
+
- 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. Each receipt carries itemsPending and itemsRecordedAt. Needs event.operate.
|
|
382
387
|
|
|
383
388
|
## Procedures without a registry command
|
|
384
389
|
|
|
@@ -482,70 +487,6 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
482
487
|
- `event.passport.setPassportStationPassword`: hand-written
|
|
483
488
|
- `event.passport.setStationQueueStatusAsStationStaff`: hand-written
|
|
484
489
|
- `event.passport.signInToStationStaff`: browser-only
|
|
485
|
-
- `event.scavengerHunt.getScavengerHuntByEventId`: frozen-scavenger-hunt
|
|
486
|
-
- `event.scavengerHunt.getScavengerHuntBoardBackgroundByEventId`: frozen-scavenger-hunt
|
|
487
|
-
- `event.scavengerHunt.getPhotoSubmissionsOnly`: frozen-scavenger-hunt
|
|
488
|
-
- `event.scavengerHunt.getScavengerHuntConfig`: frozen-scavenger-hunt
|
|
489
|
-
- `event.scavengerHunt.getScavengerHuntConfigPublic`: frozen-scavenger-hunt
|
|
490
|
-
- `event.scavengerHunt.getScavengerHuntSubmissionsForApproval`: frozen-scavenger-hunt
|
|
491
|
-
- `event.scavengerHunt.respondToScavengerHuntSubmission`: frozen-scavenger-hunt
|
|
492
|
-
- `event.scavengerHunt.updateScavengerHuntConfig`: frozen-scavenger-hunt
|
|
493
|
-
- `event.scavengerHunt.station.createStation`: frozen-scavenger-hunt
|
|
494
|
-
- `event.scavengerHunt.station.updateStation`: frozen-scavenger-hunt
|
|
495
|
-
- `event.scavengerHunt.station.archiveStation`: frozen-scavenger-hunt
|
|
496
|
-
- `event.scavengerHunt.station.restoreStation`: frozen-scavenger-hunt
|
|
497
|
-
- `event.scavengerHunt.station.getStationsByEventId`: frozen-scavenger-hunt
|
|
498
|
-
- `event.scavengerHunt.station.updateStationOrder`: frozen-scavenger-hunt
|
|
499
|
-
- `event.scavengerHunt.station.getStationForNav`: frozen-scavenger-hunt
|
|
500
|
-
- `event.scavengerHunt.station.getStationsForUser`: frozen-scavenger-hunt
|
|
501
|
-
- `event.scavengerHunt.station.getStationByIdForUser`: frozen-scavenger-hunt
|
|
502
|
-
- `event.scavengerHunt.mission.upsertMission`: frozen-scavenger-hunt
|
|
503
|
-
- `event.scavengerHunt.mission.archiveMission`: frozen-scavenger-hunt
|
|
504
|
-
- `event.scavengerHunt.mission.deleteMissionOption`: frozen-scavenger-hunt
|
|
505
|
-
- `event.scavengerHunt.mission.deleteMissionAcceptableVariation`: frozen-scavenger-hunt
|
|
506
|
-
- `event.scavengerHunt.mission.deleteMatchingGameOption`: frozen-scavenger-hunt
|
|
507
|
-
- `event.scavengerHunt.mission.deleteSpotTheDifferenceVariant`: frozen-scavenger-hunt
|
|
508
|
-
- `event.scavengerHunt.mission.deleteSpotTheDifferenceCoordinates`: frozen-scavenger-hunt
|
|
509
|
-
- `event.scavengerHunt.mission.getMissionStationSegmentsByEventId`: frozen-scavenger-hunt
|
|
510
|
-
- `event.scavengerHunt.mission.getMissionsByStationId`: frozen-scavenger-hunt
|
|
511
|
-
- `event.scavengerHunt.mission.restoreMission`: frozen-scavenger-hunt
|
|
512
|
-
- `event.scavengerHunt.mission.updateMissionOrder`: frozen-scavenger-hunt
|
|
513
|
-
- `event.scavengerHunt.mission.upsertMissionOption`: frozen-scavenger-hunt
|
|
514
|
-
- `event.scavengerHunt.mission.upsertMissionAcceptableVariation`: frozen-scavenger-hunt
|
|
515
|
-
- `event.scavengerHunt.mission.updateMissionOptionOrder`: frozen-scavenger-hunt
|
|
516
|
-
- `event.scavengerHunt.mission.upsertMatchingGame`: frozen-scavenger-hunt
|
|
517
|
-
- `event.scavengerHunt.mission.upsertMatchingGameOption`: frozen-scavenger-hunt
|
|
518
|
-
- `event.scavengerHunt.mission.upsertSpotTheDifferenceGame`: frozen-scavenger-hunt
|
|
519
|
-
- `event.scavengerHunt.mission.upsertSpotTheDifferenceVariant`: frozen-scavenger-hunt
|
|
520
|
-
- `event.scavengerHunt.mission.upsertSpotTheDifferenceCoordinate`: frozen-scavenger-hunt
|
|
521
|
-
- `event.scavengerHunt.mission.getMissionByIdForUser`: frozen-scavenger-hunt
|
|
522
|
-
- `event.scavengerHunt.participant.requestParticipantOtp`: frozen-scavenger-hunt
|
|
523
|
-
- `event.scavengerHunt.participant.addSingleParticipant`: frozen-scavenger-hunt
|
|
524
|
-
- `event.scavengerHunt.participant.createTeamParticipant`: frozen-scavenger-hunt
|
|
525
|
-
- `event.scavengerHunt.participant.getParticipantsForEvent`: frozen-scavenger-hunt
|
|
526
|
-
- `event.scavengerHunt.participant.bulkAddParticipants`: frozen-scavenger-hunt
|
|
527
|
-
- `event.scavengerHunt.participant.getAllParticipantsToExport`: frozen-scavenger-hunt
|
|
528
|
-
- `event.scavengerHunt.participant.getMissionByIdForParticipant`: frozen-scavenger-hunt
|
|
529
|
-
- `event.scavengerHunt.participant.submitMissionAnswer`: frozen-scavenger-hunt
|
|
530
|
-
- `event.scavengerHunt.participant.getStationsForUser`: frozen-scavenger-hunt
|
|
531
|
-
- `event.scavengerHunt.participant.getStationByIdForUser`: frozen-scavenger-hunt
|
|
532
|
-
- `event.scavengerHunt.participant.checkDuplicate`: frozen-scavenger-hunt
|
|
533
|
-
- `event.scavengerHunt.participant.createParticipant`: frozen-scavenger-hunt
|
|
534
|
-
- `event.scavengerHunt.participant.updateMissionStatus`: frozen-scavenger-hunt
|
|
535
|
-
- `event.scavengerHunt.participant.getInProgressStationById`: frozen-scavenger-hunt
|
|
536
|
-
- `event.scavengerHunt.participant.deleteParticipants`: frozen-scavenger-hunt
|
|
537
|
-
- `event.scavengerHunt.participant.getScoreTable`: frozen-scavenger-hunt
|
|
538
|
-
- `event.scavengerHunt.participant.getParticipantLeaderboard`: frozen-scavenger-hunt
|
|
539
|
-
- `event.scavengerHunt.participant.getTeamParticipantLeaderboard`: frozen-scavenger-hunt
|
|
540
|
-
- `event.scavengerHunt.participant.getPaginatedParticipantLeaderboard`: frozen-scavenger-hunt
|
|
541
|
-
- `event.scavengerHunt.participant.getPaginatedTeamParticipantLeaderboard`: frozen-scavenger-hunt
|
|
542
|
-
- `event.scavengerHunt.participant.updateParticipantName`: frozen-scavenger-hunt
|
|
543
|
-
- `event.scavengerHunt.team.createTeam`: frozen-scavenger-hunt
|
|
544
|
-
- `event.scavengerHunt.team.updateTeam`: frozen-scavenger-hunt
|
|
545
|
-
- `event.scavengerHunt.team.archiveTeam`: frozen-scavenger-hunt
|
|
546
|
-
- `event.scavengerHunt.team.restoreTeam`: frozen-scavenger-hunt
|
|
547
|
-
- `event.scavengerHunt.team.getTeamsByEventId`: frozen-scavenger-hunt
|
|
548
|
-
- `event.scavengerHunt.team.getTeamForNav`: frozen-scavenger-hunt
|
|
549
490
|
- `event.staffRedemption.importStaffRedemptionRoster`: hand-written
|
|
550
491
|
- `event.staffRedemption.getStaffRedemptionExportData`: hand-written
|
|
551
492
|
- `event.staffRedemption.getStaffRedemptionCounterAccess`: browser-only
|
package/dist/index.js
CHANGED
|
@@ -10683,7 +10683,6 @@ var CLI_REFRESH_INACTIVITY_TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
|
10683
10683
|
var cliProducts = [
|
|
10684
10684
|
"budget-builder",
|
|
10685
10685
|
"event-tech",
|
|
10686
|
-
"registration",
|
|
10687
10686
|
"rsvp",
|
|
10688
10687
|
"gosh"
|
|
10689
10688
|
];
|
|
@@ -21446,10 +21445,18 @@ var STAFF_REDEMPTION_WRONG_SITE_RULES = [
|
|
|
21446
21445
|
"REFUSE",
|
|
21447
21446
|
"SERVE_FROM_COUNTER"
|
|
21448
21447
|
];
|
|
21448
|
+
var STAFF_REDEMPTION_SESSION_RULES = [
|
|
21449
|
+
"OWN_SHIFT",
|
|
21450
|
+
"ANY_OPEN_SESSION"
|
|
21451
|
+
];
|
|
21449
21452
|
var STAFF_REDEMPTION_DRAW_POLICIES = [
|
|
21450
21453
|
"REMAINING_HEADCOUNT",
|
|
21451
21454
|
"FIXED_RATE"
|
|
21452
21455
|
];
|
|
21456
|
+
var STAFF_REDEMPTION_COUNTER_ORDERS = [
|
|
21457
|
+
"FOOD_THEN_DRAW",
|
|
21458
|
+
"DRAW_THEN_FOOD"
|
|
21459
|
+
];
|
|
21453
21460
|
var STAFF_REDEMPTION_ARCHIVABLE = [
|
|
21454
21461
|
"site",
|
|
21455
21462
|
"session",
|
|
@@ -21474,8 +21481,10 @@ var updateStaffRedemptionSettingsSchema = staffRedemptionEventIdSchema.extend({
|
|
|
21474
21481
|
eligibleShifts: array(staffRedemptionShiftSchema).min(1).max(STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX).optional(),
|
|
21475
21482
|
itemRule: _enum(STAFF_REDEMPTION_ITEM_RULES).optional(),
|
|
21476
21483
|
wrongSite: _enum(STAFF_REDEMPTION_WRONG_SITE_RULES).optional(),
|
|
21484
|
+
sessionRule: _enum(STAFF_REDEMPTION_SESSION_RULES).optional(),
|
|
21477
21485
|
drawPolicy: _enum(STAFF_REDEMPTION_DRAW_POLICIES).optional(),
|
|
21478
21486
|
fixedWinRatePercent: number2().min(0).max(100).optional(),
|
|
21487
|
+
counterOrder: _enum(STAFF_REDEMPTION_COUNTER_ORDERS).optional(),
|
|
21479
21488
|
overrideReason: reasonSchema.optional()
|
|
21480
21489
|
}).strict();
|
|
21481
21490
|
var upsertStaffRedemptionSiteSchema = staffRedemptionEventIdSchema.extend({
|
|
@@ -21572,23 +21581,34 @@ var staffRedemptionRosterListSchema = staffRedemptionEventIdSchema.extend({
|
|
|
21572
21581
|
}).strict();
|
|
21573
21582
|
var staffRedemptionRosterCountsSchema = staffRedemptionEventIdSchema.extend(rosterFiltersShape).strict();
|
|
21574
21583
|
var lookupStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema }).strict();
|
|
21584
|
+
var claimItemIdsSchema = array(idSchema).max(STAFF_REDEMPTION_CLAIM_ITEMS_MAX).refine((ids) => new Set(ids).size === ids.length, {
|
|
21585
|
+
message: "Pick each item once."
|
|
21586
|
+
});
|
|
21575
21587
|
var redeemStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({
|
|
21576
21588
|
employeeId: staffRedemptionEmployeeIdSchema,
|
|
21577
21589
|
clientRequestId: staffRedemptionClientRequestIdSchema,
|
|
21578
|
-
itemIds:
|
|
21579
|
-
|
|
21580
|
-
|
|
21590
|
+
itemIds: claimItemIdsSchema
|
|
21591
|
+
}).strict();
|
|
21592
|
+
var recordStaffRedemptionClaimItemsSchema = staffRedemptionSiteIdSchema.extend({
|
|
21593
|
+
claimId: idSchema,
|
|
21594
|
+
itemIds: claimItemIdsSchema
|
|
21581
21595
|
}).strict();
|
|
21582
21596
|
var STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES = ["mine", "site"];
|
|
21583
21597
|
var staffRedemptionCounterClaimsSchema = staffRedemptionSiteIdSchema.extend({
|
|
21584
21598
|
limit: number2().int().min(1).max(50).default(20),
|
|
21585
21599
|
scope: _enum(STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES).default("mine")
|
|
21586
21600
|
}).strict();
|
|
21601
|
+
var STAFF_REDEMPTION_CLAIM_STATUSES = [
|
|
21602
|
+
"active",
|
|
21603
|
+
"items-pending",
|
|
21604
|
+
"voided",
|
|
21605
|
+
"all"
|
|
21606
|
+
];
|
|
21587
21607
|
var claimFiltersShape = {
|
|
21588
21608
|
search: string2().trim().max(200).optional(),
|
|
21589
21609
|
siteId: idSchema.optional(),
|
|
21590
21610
|
sessionId: idSchema.optional(),
|
|
21591
|
-
status: _enum(
|
|
21611
|
+
status: _enum(STAFF_REDEMPTION_CLAIM_STATUSES).default("all")
|
|
21592
21612
|
};
|
|
21593
21613
|
var staffRedemptionClaimListSchema = staffRedemptionEventIdSchema.extend({
|
|
21594
21614
|
...claimFiltersShape,
|
|
@@ -21751,7 +21771,7 @@ var exportFilters = (parsed, eventId) => {
|
|
|
21751
21771
|
if (!checked.success) {
|
|
21752
21772
|
const issue = checked.error.issues[0];
|
|
21753
21773
|
const name = String(issue?.path[0] ?? "filter");
|
|
21754
|
-
throw new CliUsageError(name === "status" ? "--status must be active, voided or all." : `Invalid ${name}: ${issue?.message ?? "the value is invalid"}.`);
|
|
21774
|
+
throw new CliUsageError(name === "status" ? "--status must be active, items-pending, voided or all." : `Invalid ${name}: ${issue?.message ?? "the value is invalid"}.`);
|
|
21755
21775
|
}
|
|
21756
21776
|
return checked.data;
|
|
21757
21777
|
};
|
|
@@ -21776,6 +21796,8 @@ var csvColumns = [
|
|
|
21776
21796
|
return item.quantity === 1 ? label : `${label} x${item.quantity}`;
|
|
21777
21797
|
}).join("; ")
|
|
21778
21798
|
],
|
|
21799
|
+
["Items recorded", (row) => row.itemsPending ? "no" : "yes"],
|
|
21800
|
+
["Items recorded at", (row) => row.itemsRecordedAt?.toISOString() ?? null],
|
|
21779
21801
|
["Outcome", (row) => row.draw?.outcome ?? null],
|
|
21780
21802
|
["Prize", (row) => row.draw?.prize?.name ?? null],
|
|
21781
21803
|
["Operator kind", (row) => row.operatorKind],
|
|
@@ -23545,6 +23567,23 @@ var command_manifest_default = [
|
|
|
23545
23567
|
required: ["eventId"]
|
|
23546
23568
|
}
|
|
23547
23569
|
},
|
|
23570
|
+
{
|
|
23571
|
+
path: ["event", "retired", "export"],
|
|
23572
|
+
procedure: "event.getRetiredEventExport",
|
|
23573
|
+
operation: "query",
|
|
23574
|
+
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.",
|
|
23575
|
+
effects: [],
|
|
23576
|
+
dates: [],
|
|
23577
|
+
input: {
|
|
23578
|
+
type: "object",
|
|
23579
|
+
properties: {
|
|
23580
|
+
eventId: {
|
|
23581
|
+
type: "string"
|
|
23582
|
+
}
|
|
23583
|
+
},
|
|
23584
|
+
required: ["eventId"]
|
|
23585
|
+
}
|
|
23586
|
+
},
|
|
23548
23587
|
{
|
|
23549
23588
|
path: ["event", "background", "get"],
|
|
23550
23589
|
procedure: "event.getEventBackgroundImage",
|
|
@@ -25160,7 +25199,7 @@ var command_manifest_default = [
|
|
|
25160
25199
|
path: ["staff-redemption", "setup", "get"],
|
|
25161
25200
|
procedure: "event.staffRedemption.getStaffRedemptionSetup",
|
|
25162
25201
|
operation: "query",
|
|
25163
|
-
summary: "Get the whole staff redemption setup: settings, 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.",
|
|
25202
|
+
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.",
|
|
25164
25203
|
effects: [],
|
|
25165
25204
|
dates: [],
|
|
25166
25205
|
input: {
|
|
@@ -25180,7 +25219,7 @@ var command_manifest_default = [
|
|
|
25180
25219
|
path: ["staff-redemption", "settings", "update"],
|
|
25181
25220
|
procedure: "event.staffRedemption.updateStaffRedemptionSettings",
|
|
25182
25221
|
operation: "mutation",
|
|
25183
|
-
summary: "Update eligibleShifts, itemRule, wrongSite, drawPolicy and
|
|
25222
|
+
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.",
|
|
25184
25223
|
effects: ["state-change"],
|
|
25185
25224
|
target: "eventId",
|
|
25186
25225
|
dates: [],
|
|
@@ -25214,6 +25253,10 @@ var command_manifest_default = [
|
|
|
25214
25253
|
type: "string",
|
|
25215
25254
|
enum: ["REFUSE", "SERVE_FROM_COUNTER"]
|
|
25216
25255
|
},
|
|
25256
|
+
sessionRule: {
|
|
25257
|
+
type: "string",
|
|
25258
|
+
enum: ["OWN_SHIFT", "ANY_OPEN_SESSION"]
|
|
25259
|
+
},
|
|
25217
25260
|
drawPolicy: {
|
|
25218
25261
|
type: "string",
|
|
25219
25262
|
enum: ["REMAINING_HEADCOUNT", "FIXED_RATE"]
|
|
@@ -25223,6 +25266,10 @@ var command_manifest_default = [
|
|
|
25223
25266
|
minimum: 0,
|
|
25224
25267
|
maximum: 100
|
|
25225
25268
|
},
|
|
25269
|
+
counterOrder: {
|
|
25270
|
+
type: "string",
|
|
25271
|
+
enum: ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"]
|
|
25272
|
+
},
|
|
25226
25273
|
overrideReason: {
|
|
25227
25274
|
type: "string",
|
|
25228
25275
|
minLength: 1,
|
|
@@ -25330,7 +25377,7 @@ var command_manifest_default = [
|
|
|
25330
25377
|
path: ["staff-redemption", "session", "upsert"],
|
|
25331
25378
|
procedure: "event.staffRedemption.upsertStaffRedemptionSession",
|
|
25332
25379
|
operation: "mutation",
|
|
25333
|
-
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.",
|
|
25380
|
+
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.",
|
|
25334
25381
|
effects: ["state-change"],
|
|
25335
25382
|
target: "eventId",
|
|
25336
25383
|
dates: ["startsAt", "endsAt"],
|
|
@@ -25954,7 +26001,7 @@ var command_manifest_default = [
|
|
|
25954
26001
|
path: ["staff-redemption", "claims", "list"],
|
|
25955
26002
|
procedure: "event.staffRedemption.getStaffRedemptionClaims",
|
|
25956
26003
|
operation: "query",
|
|
25957
|
-
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; filter by search, siteId, sessionId and status (active, voided, all).",
|
|
26004
|
+
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.",
|
|
25958
26005
|
effects: [],
|
|
25959
26006
|
dates: [],
|
|
25960
26007
|
input: {
|
|
@@ -25982,7 +26029,7 @@ var command_manifest_default = [
|
|
|
25982
26029
|
status: {
|
|
25983
26030
|
default: "all",
|
|
25984
26031
|
type: "string",
|
|
25985
|
-
enum: ["active", "voided", "all"]
|
|
26032
|
+
enum: ["active", "items-pending", "voided", "all"]
|
|
25986
26033
|
},
|
|
25987
26034
|
limit: {
|
|
25988
26035
|
default: 25,
|
|
@@ -26015,7 +26062,7 @@ var command_manifest_default = [
|
|
|
26015
26062
|
path: ["staff-redemption", "claims", "counts"],
|
|
26016
26063
|
procedure: "event.staffRedemption.getStaffRedemptionClaimCounts",
|
|
26017
26064
|
operation: "query",
|
|
26018
|
-
summary: "Count claims matching the same filters as claims list.",
|
|
26065
|
+
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.",
|
|
26019
26066
|
effects: [],
|
|
26020
26067
|
dates: [],
|
|
26021
26068
|
input: {
|
|
@@ -26043,7 +26090,7 @@ var command_manifest_default = [
|
|
|
26043
26090
|
status: {
|
|
26044
26091
|
default: "all",
|
|
26045
26092
|
type: "string",
|
|
26046
|
-
enum: ["active", "voided", "all"]
|
|
26093
|
+
enum: ["active", "items-pending", "voided", "all"]
|
|
26047
26094
|
}
|
|
26048
26095
|
},
|
|
26049
26096
|
required: ["eventId"],
|
|
@@ -26054,7 +26101,7 @@ var command_manifest_default = [
|
|
|
26054
26101
|
path: ["staff-redemption", "claims", "void"],
|
|
26055
26102
|
procedure: "event.staffRedemption.voidStaffRedemptionClaim",
|
|
26056
26103
|
operation: "mutation",
|
|
26057
|
-
summary: "Void a claim with a reason. 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.",
|
|
26104
|
+
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.",
|
|
26058
26105
|
effects: ["state-change"],
|
|
26059
26106
|
target: "eventId",
|
|
26060
26107
|
dates: [],
|
|
@@ -26140,7 +26187,7 @@ var command_manifest_default = [
|
|
|
26140
26187
|
path: ["staff-redemption", "counter", "context"],
|
|
26141
26188
|
procedure: "event.staffRedemption.getStaffRedemptionCounterContext",
|
|
26142
26189
|
operation: "query",
|
|
26143
|
-
summary: "Counter view for one site (siteId): the event (name, status, dates), items to choose from, the site's sessions with sets and prizes left, and any missing policies. Needs event.operate.",
|
|
26190
|
+
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.",
|
|
26144
26191
|
effects: [],
|
|
26145
26192
|
dates: [],
|
|
26146
26193
|
input: {
|
|
@@ -26165,7 +26212,7 @@ var command_manifest_default = [
|
|
|
26165
26212
|
path: ["staff-redemption", "lookup"],
|
|
26166
26213
|
procedure: "event.staffRedemption.lookupStaffRedemptionEmployee",
|
|
26167
26214
|
operation: "mutation",
|
|
26168
|
-
summary: "Look up an Employee ID at a site: who they are, what they already collected 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.",
|
|
26215
|
+
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.",
|
|
26169
26216
|
effects: [],
|
|
26170
26217
|
dates: [],
|
|
26171
26218
|
input: {
|
|
@@ -26195,7 +26242,7 @@ var command_manifest_default = [
|
|
|
26195
26242
|
path: ["staff-redemption", "redeem"],
|
|
26196
26243
|
procedure: "event.staffRedemption.redeemStaffRedemption",
|
|
26197
26244
|
operation: "mutation",
|
|
26198
|
-
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. Needs event.operate.",
|
|
26245
|
+
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.",
|
|
26199
26246
|
effects: ["state-change"],
|
|
26200
26247
|
target: "eventId",
|
|
26201
26248
|
dates: [],
|
|
@@ -26242,11 +26289,51 @@ var command_manifest_default = [
|
|
|
26242
26289
|
additionalProperties: false
|
|
26243
26290
|
}
|
|
26244
26291
|
},
|
|
26292
|
+
{
|
|
26293
|
+
path: ["staff-redemption", "claims", "record-items"],
|
|
26294
|
+
procedure: "event.staffRedemption.recordStaffRedemptionClaimItems",
|
|
26295
|
+
operation: "mutation",
|
|
26296
|
+
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.",
|
|
26297
|
+
effects: ["state-change"],
|
|
26298
|
+
target: "eventId",
|
|
26299
|
+
dates: [],
|
|
26300
|
+
input: {
|
|
26301
|
+
type: "object",
|
|
26302
|
+
properties: {
|
|
26303
|
+
eventId: {
|
|
26304
|
+
type: "string",
|
|
26305
|
+
minLength: 1,
|
|
26306
|
+
maxLength: 64
|
|
26307
|
+
},
|
|
26308
|
+
siteId: {
|
|
26309
|
+
type: "string",
|
|
26310
|
+
minLength: 1,
|
|
26311
|
+
maxLength: 64
|
|
26312
|
+
},
|
|
26313
|
+
claimId: {
|
|
26314
|
+
type: "string",
|
|
26315
|
+
minLength: 1,
|
|
26316
|
+
maxLength: 64
|
|
26317
|
+
},
|
|
26318
|
+
itemIds: {
|
|
26319
|
+
maxItems: 20,
|
|
26320
|
+
type: "array",
|
|
26321
|
+
items: {
|
|
26322
|
+
type: "string",
|
|
26323
|
+
minLength: 1,
|
|
26324
|
+
maxLength: 64
|
|
26325
|
+
}
|
|
26326
|
+
}
|
|
26327
|
+
},
|
|
26328
|
+
required: ["eventId", "siteId", "claimId", "itemIds"],
|
|
26329
|
+
additionalProperties: false
|
|
26330
|
+
}
|
|
26331
|
+
},
|
|
26245
26332
|
{
|
|
26246
26333
|
path: ["staff-redemption", "counter", "claims"],
|
|
26247
26334
|
procedure: "event.staffRedemption.getStaffRedemptionCounterClaims",
|
|
26248
26335
|
operation: "query",
|
|
26249
|
-
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. Needs event.operate.",
|
|
26336
|
+
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. Each receipt carries itemsPending and itemsRecordedAt. Needs event.operate.",
|
|
26250
26337
|
effects: [],
|
|
26251
26338
|
dates: [],
|
|
26252
26339
|
input: {
|