@go-labs-sg/event-tech 1.16.0 → 1.18.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 +93 -14
- package/command-reference.md +13 -10
- package/dist/index.js +215 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,6 +148,7 @@ et passport claim --event-id <id> --code <station-code>
|
|
|
148
148
|
et passport participant detail --event-id <id> --participant-id <id>
|
|
149
149
|
et passport prize upsert --event-id <id> --prize-json '{"name":"Tote bag","description":null,"stock":50,"stampCost":5,"order":0}'
|
|
150
150
|
et passport redemption create --event-id <id> --participant-id <id> --prize-id <id> --quantity 2
|
|
151
|
+
et passport redemption create --event-id <id> --participant-id <id> --prize-id <id> --award-station-id <id> --request-id "$(uuidgen)"
|
|
151
152
|
et passport station upsert --event-id <id> --station-json '{"name":"Ring toss","collection":{"collectionMode":"STAFF_SCAN","stampValue":3,"category":"GAME"}}'
|
|
152
153
|
et passport station upsert --event-id <id> --station-json '{"name":"Desk basketball","collection":{"collectionMode":"STAFF_SCAN","category":"GAME","info":{"subtitle":"Game 4 · Desk basketball","steps":["Stand behind the line","Sink 3 shots"]}}}'
|
|
153
154
|
et passport station upsert --event-id <id> --station-json '{"name":"Food counter","collection":{"collectionMode":"STAFF_TALLY","tallyItems":["Laksa","Teh"],"tallyEarnsStamp":true}}'
|
|
@@ -183,7 +184,8 @@ session. A duplicated event does not copy the password. `stamps stats` returns
|
|
|
183
184
|
per-station stamp counts, and `stamps recipients` / `recipient-counts` list the
|
|
184
185
|
participants (name, Staff ID) each station stamped and how (`issuedBy.kind`:
|
|
185
186
|
`participant` for a self-scan, `station-link`, `staff` with the staff member's name,
|
|
186
|
-
|
|
187
|
+
`bingo` for a stamp awarded by completing bingo, or `prize-desk` for a stamp awarded with a
|
|
188
|
+
prize redemption; `stats` also counts those per station as `prizeDeskStampCount`); recipients page with `--cursor` and
|
|
187
189
|
`--direction backward`. Station JSON also accepts `address` (up to 300
|
|
188
190
|
characters, `null` clears it). Signing in with the password is browser-only.
|
|
189
191
|
|
|
@@ -192,6 +194,12 @@ Station collection modes are `SELF_SCAN`, `STAFF_SCAN`, `STAFF_SCORE` and `STAFF
|
|
|
192
194
|
`collection.category` is `GAME`, `FOOD`, `DRINK` or `BINGO` (default `GAME`) and
|
|
193
195
|
groups stations for guests; the CLI rejects any other value before calling the API.
|
|
194
196
|
Omit either field on an existing station to keep the stored value.
|
|
197
|
+
`collection.prizeDeskAward` (`true` or `false`, `SELF_SCAN` and `STAFF_SCAN` stations only, not
|
|
198
|
+
the Bingo category) lets prize-desk crew award this station's stamp with a prize redemption (see
|
|
199
|
+
below); omit it to keep the stored value, `false` turns it off, and a station that never set it
|
|
200
|
+
reads as off. Hidden stations may be opted in (a bonus-only card); archived ones never qualify.
|
|
201
|
+
It shows in `overview` and `station upsert` output as `config.prizeDeskAward`, and event
|
|
202
|
+
duplication copies it with the station.
|
|
195
203
|
`collection.info` is the guest-facing station information shown when a guest taps
|
|
196
204
|
the station in their passport: `{"subtitle":"Game 4 · Desk basketball","steps":["Stand behind the line","Sink 3 shots"],"menu":[{"name":"Smash burger","detail":"Cooked to order","contains":"Gluten, dairy"}],"note":"Allergen info is indicative. Please ask our crew if unsure."}`.
|
|
197
205
|
`subtitle` is up to 80 characters, `steps` 1 to 8 lines of up to 160 (shown as "How to
|
|
@@ -250,19 +258,44 @@ it to `Employee Number`. Read the current label from `overview` (`passport.staff
|
|
|
250
258
|
`login-options` (`staffIdLabel`), as a guest from `mine` (`settings.staffIdLabel`), or from
|
|
251
259
|
`export` (`staffIdLabel`, for column headers). Changing it is recorded in the activity log.
|
|
252
260
|
|
|
261
|
+
Category names: optional `"categoryLabels"` in `--settings-json` renames the station categories
|
|
262
|
+
(`GAME`, `FOOD`, `DRINK`, `BINGO`) that guests see as group headings and card labels, station crew
|
|
263
|
+
see on their screens and organisers see in the station list, editor and category select. Each
|
|
264
|
+
category takes `{"en": "<text>", "zh-CN": "<text>"}`, either name optional, 1 to 40 characters
|
|
265
|
+
after trimming; a blank name means the built-in wording (for example `Games`). A Simplified Chinese
|
|
266
|
+
guest sees the `zh-CN` name when set and otherwise the built-in Chinese wording, never the English
|
|
267
|
+
name; English guests, crew and organisers use `en`. Omit `categoryLabels` to keep the stored names;
|
|
268
|
+
an object replaces them all (send every name you want to keep); `null` clears them. For example
|
|
269
|
+
`"categoryLabels":{"GAME":{"en":"Games & Activities"}}`. Read the current names from `overview`
|
|
270
|
+
(`passport.categoryLabels`), from `login-options` (`categoryLabels`) or, as a guest, from `mine`
|
|
271
|
+
(`settings.categoryLabels`); each is `null` when none are set. Changing them is recorded in the
|
|
272
|
+
activity log.
|
|
273
|
+
|
|
253
274
|
Queue status: optional `"queueStatus": true|false` in `--settings-json` lets station crew set how
|
|
254
275
|
long the queue is at each station (`< 10 mins`, `< 30 mins` or `> 30 mins`), which guests then see
|
|
255
276
|
on the station in their passport. It is off for an event that never set it. Optional
|
|
256
277
|
`"queueStatusStaleMinutes": <1-240>` is how long a set wait stays trusted before guests see "Not
|
|
257
|
-
updated recently" instead of the age (default
|
|
258
|
-
value.
|
|
278
|
+
updated recently" instead of the age (default 10; `null` resets it). Omit either to keep the stored
|
|
279
|
+
value. While queue status is on, every visible, non-archived station shows a wait: one crew never set
|
|
280
|
+
(or cleared) reads `< 10 mins` by default, so nobody mistakes it for a confirmed wait the default is
|
|
281
|
+
reported in its own field, `queueStatusDefault: "UNDER_10_MIN"` (guests just see `< 10 mins`; crew and
|
|
282
|
+
organisers see it labelled "default"), while `queueStatus` stays `null` for it, and it never goes stale.
|
|
283
|
+
A crew-set wait overrides it (`queueStatus: {status,updatedAt}`, `queueStatusDefault: null`) and goes
|
|
284
|
+
stale as above; hidden stations never show a default. Crew set the wait in the browser; `passport station queue-status --event-id <id> --station-id
|
|
259
285
|
<id> --status under-10|under-30|over-30|clear` does the same as an event operator. It is refused
|
|
260
|
-
while queue status is off, setting the same wait again refreshes its time, `clear` removes the wait
|
|
286
|
+
while queue status is off, setting the same wait again refreshes its time, `clear` removes the wait
|
|
287
|
+
(the station goes back to the default; the command prints `queueStatus: null` and
|
|
288
|
+
`queueStatusDefault: "UNDER_10_MIN"`),
|
|
261
289
|
and every change is recorded in the activity log with the station and who set it. Turning the
|
|
262
290
|
setting off hides waits from guests without deleting them. Read the switch from `overview`
|
|
263
291
|
(`passport.queueStatus`, `passport.queueStatusStaleMinutes`), each station's wait from `overview`
|
|
264
|
-
(`stations[].queueStatus`: `{status,updatedAt}` or `null`, hidden stations
|
|
265
|
-
|
|
292
|
+
(`stations[].queueStatus`: `{status,updatedAt}` for a crew-set wait or `null`, hidden stations
|
|
293
|
+
included, where a stored wait is one guests do not see, and `stations[].queueStatusDefault`: `"UNDER_10_MIN"` while queue status is on and a visible
|
|
294
|
+
station has no crew-set wait, else `null`) and the guest view from `passport queue-status`
|
|
295
|
+
(`enabled`, `staleMinutes`, `generatedAt`, `stations` with the crew-set waits only, and `defaultStatus`
|
|
296
|
+
with `defaultStationIds`, the visible stations that show the default). The CLI has no realtime
|
|
297
|
+
surface: guest screens get waits pushed over the realtime public room, and the CLI reads them on
|
|
298
|
+
demand.
|
|
266
299
|
|
|
267
300
|
`stamp correct`, `redemption reverse`, station/prize archive and print revocation
|
|
268
301
|
require `--allow-state-change --target <same-event-id>`; correction/reversal also
|
|
@@ -277,6 +310,32 @@ stored value. Prizes carry `stampCost` per unit (0 to 100000, default 0; omit on
|
|
|
277
310
|
update to keep it). `redemption create` takes `--quantity` (whole number 1 to 20,
|
|
278
311
|
default 1) and spends `stampCost x quantity` stamps. A participant's balance is
|
|
279
312
|
stamps earned minus stamps spent; reversing a redemption refunds its stamps.
|
|
313
|
+
`redemption create` also takes an optional `--award-station-id <id>`: the stamp of one station
|
|
314
|
+
that opted in with `collection.prizeDeskAward` (at most one per redemption) is given to the
|
|
315
|
+
participant together with the prize, in the same transaction, as if they had collected it (the
|
|
316
|
+
station's `stampValue` at that moment, an activity-log entry, the lucky draw and bingo/progress
|
|
317
|
+
rules, source `PRIZE_DESK`). The redemption's own checks (threshold, balance, per-person limit,
|
|
318
|
+
stock) use the balance before that stamp. It is refused when the participant already holds that
|
|
319
|
+
station's stamp, when the station is not opted in, archived or outside its opening window, when
|
|
320
|
+
the event takes no stamps (not ongoing), and when a manager revoked their stamp there. A stamp that
|
|
321
|
+
a redemption reversal revoked is back to how it was: it can be awarded again, and the guest can
|
|
322
|
+
also collect that station normally (scan or staff scan). The redemption records which stamp it awarded. `redemption reverse` revokes that stamp with
|
|
323
|
+
the redemption and re-syncs the lucky draw; like revoking a station stamp it is not refused when
|
|
324
|
+
stamps were spent since, so the balance can read negative and prize redemption stays blocked until
|
|
325
|
+
a manager reviews it. `participant detail` returns `awardStations` (the opted-in stations with
|
|
326
|
+
`stamps`, `hidden`, `alreadyCollected` and `blockedReason` for that participant; `blockedReason` also
|
|
327
|
+
says when the station is not open or the event takes no stamps) and
|
|
328
|
+
`redemptions[].awardedStation` (`{id,name,revokedAt}` or `null`; `revokedAt` is the reversal's time
|
|
329
|
+
when the reversal revoked the stamp, an earlier time when a manager had); the redemption response and `mine`
|
|
330
|
+
(`redemptions[].awardedStation`) report it too, the `export` redemption rows add the awarded
|
|
331
|
+
station, and the activity log records `awardedStationId`, `awardedStampId` and `awardedStamps` on
|
|
332
|
+
`passport_prize_redeemed` and `awardedStampRevoked` on `passport_redemption_reversed` (the stamp
|
|
333
|
+
revoke itself is a `passport_stamp_revoked` entry). Optional `--request-id <uuid>` makes a retry
|
|
334
|
+
safe: sending the same id again for the same participant returns the first redemption
|
|
335
|
+
(`replayed: true`) instead of redeeming and awarding twice, and reusing it with a different prize,
|
|
336
|
+
quantity or award station fails. Sending the id of a redemption that was since reversed also fails
|
|
337
|
+
("This redemption was reversed. Submit it again to hand over a new one.") and writes nothing; use a
|
|
338
|
+
new `--request-id` to redeem again.
|
|
280
339
|
`mine` also prints the participant's `profileCode` and `profileCodeExpiresAt`; the
|
|
281
340
|
code is valid for 5 minutes from issue, so run `mine` again for a fresh one.
|
|
282
341
|
`mine`, `participant detail`, `overview` and `export` return the earned, spent and
|
|
@@ -389,7 +448,7 @@ returns `imageKey` and a signed `imageUrl` for each prize.
|
|
|
389
448
|
items handed over and reveal a prize outcome the server decides in the same transaction.
|
|
390
449
|
Everything uses the same tRPC procedures and permissions as the web app. Setup and the roster
|
|
391
450
|
need `event.setup`, the export needs `event.export`, and the counter commands (`counter`,
|
|
392
|
-
`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
|
|
393
452
|
only; crew sign-in and the counter access check have no CLI command.
|
|
394
453
|
|
|
395
454
|
All commands except `roster import` and `export` are registry commands: pass the procedure input
|
|
@@ -400,7 +459,7 @@ confirm every write with `--allow-state-change --target <event-id>`. The command
|
|
|
400
459
|
| --- | --- |
|
|
401
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` |
|
|
402
461
|
| Roster | `roster list`, `roster counts`, `roster upsert`, `roster import` |
|
|
403
|
-
| 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` |
|
|
404
463
|
| Counter | `counter context`, `lookup`, `redeem`, `counter claims` |
|
|
405
464
|
|
|
406
465
|
A walkthrough with made-up names and IDs. Nothing here is an instruction to change a live event;
|
|
@@ -416,8 +475,12 @@ et event create --organization-id <org-id> --name "Example Staff Appreciation" \
|
|
|
416
475
|
# items a person may take (ONE_FROM_EACH_GROUP, AT_MOST_ONE_PER_GROUP or
|
|
417
476
|
# AT_MOST_ONE_PER_GROUP_OR_NONE), what happens at the wrong site (REFUSE or
|
|
418
477
|
# SERVE_FROM_COUNTER) and the draw (REMAINING_HEADCOUNT, or FIXED_RATE with
|
|
419
|
-
# fixedWinRatePercent).
|
|
420
|
-
#
|
|
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.
|
|
421
484
|
et staff-redemption settings update --allow-state-change --target <event-id> \
|
|
422
485
|
--input '{"eventId":"<event-id>","eligibleShifts":["A","B","C","D"],"itemRule":"ONE_FROM_EACH_GROUP","wrongSite":"REFUSE","drawPolicy":"REMAINING_HEADCOUNT"}'
|
|
423
486
|
|
|
@@ -468,6 +531,21 @@ et staff-redemption lookup \
|
|
|
468
531
|
et staff-redemption redeem --allow-state-change --target <event-id> \
|
|
469
532
|
--input "{\"eventId\":\"<event-id>\",\"siteId\":\"<site-id>\",\"employeeId\":\"E1001\",\"clientRequestId\":\"$(uuidgen | tr A-Z a-z)\",\"itemIds\":[\"<item-id>\"]}"
|
|
470
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
|
+
|
|
471
549
|
# 9. Fix a mistake. void returns the set (the prize outcome stays, so a redo shows the same
|
|
472
550
|
# result); draw release also returns a won prize to stock so the person draws again.
|
|
473
551
|
# draw release is refused while an active redemption still shows the draw (claims list
|
|
@@ -533,10 +611,10 @@ An unknown name fails and lists the workbook's sheets; nothing changes. A CSV ha
|
|
|
533
611
|
`--sheet` with a CSV fails.
|
|
534
612
|
|
|
535
613
|
**Export.** `export --event-id <id>` prints the redemption rows as JSON, oldest first. Filters:
|
|
536
|
-
`--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
|
|
537
615
|
`--csv-file <path>` it writes a CSV instead and prints `{ "file", "rows" }`. The CSV has one row
|
|
538
|
-
per claim with the columns Created at, Employee ID, Name, Site, Session, Items,
|
|
539
|
-
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
|
|
540
618
|
CRLF line ends so Excel opens it correctly; text that would run as a spreadsheet formula (a
|
|
541
619
|
leading `=`, `+`, `-` or `@`) gets a leading apostrophe. An existing file is never overwritten
|
|
542
620
|
unless you pass `--force`. The export needs `event.export` and fails above 20,000 rows; narrow
|
|
@@ -560,7 +638,8 @@ it with the filters.
|
|
|
560
638
|
when the person was served at a site other than their roster site; false when their roster
|
|
561
639
|
site matches no site). The CSV export adds "Roster site" and "Away from roster site" columns
|
|
562
640
|
and writes items as `Group: Item`.
|
|
563
|
-
- `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.
|
|
564
643
|
- `counter claims` takes `scope`: `mine` (default) is the claims made by you at the site (a crew
|
|
565
644
|
device sees its own crew session's), `site` is every claim at the site whoever served it.
|
|
566
645
|
Both need the same counter access, so `event.operate` for the CLI:
|
package/command-reference.md
CHANGED
|
@@ -306,9 +306,9 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
306
306
|
- Approve or reject a Human Bingo card item submission.
|
|
307
307
|
- Confirm: `--allow-state-change` `--target <input.id>`
|
|
308
308
|
- `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.
|
|
309
|
+
- 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
310
|
- `et staff-redemption settings update` → `event.staffRedemption.updateStaffRedemptionSettings` (mutation)
|
|
311
|
-
- Update eligibleShifts, itemRule, wrongSite, drawPolicy and
|
|
311
|
+
- 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
312
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
313
313
|
- `et staff-redemption site upsert` → `event.staffRedemption.upsertStaffRedemptionSite` (mutation)
|
|
314
314
|
- Create a site (omit siteId) or rename and reorder one (give siteId). Use staff-redemption archive set to archive or unarchive it.
|
|
@@ -320,7 +320,7 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
320
320
|
- Clear a site's crew password, which turns its crew link off and ends every crew session at that site.
|
|
321
321
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
322
322
|
- `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.
|
|
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. 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
324
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
325
325
|
- Date fields: `startsAt`, `endsAt`
|
|
326
326
|
- `et staff-redemption slot set` → `event.staffRedemption.setStaffRedemptionSlot` (mutation)
|
|
@@ -359,11 +359,11 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
359
359
|
- 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
360
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
361
361
|
- `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).
|
|
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; 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
363
|
- `et staff-redemption claims counts` → `event.staffRedemption.getStaffRedemptionClaimCounts` (query)
|
|
364
|
-
- Count claims matching the same filters as claims list.
|
|
364
|
+
- 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
365
|
- `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.
|
|
366
|
+
- 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
367
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
368
368
|
- `et staff-redemption draw release` → `event.staffRedemption.releaseStaffRedemptionDraw` (mutation)
|
|
369
369
|
- 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 +371,17 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
371
371
|
- `et staff-redemption stock summary` → `event.staffRedemption.getStaffRedemptionStockSummary` (query)
|
|
372
372
|
- 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
373
|
- `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.
|
|
374
|
+
- 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
375
|
- `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.
|
|
376
|
+
- 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
377
|
- `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.
|
|
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. 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.
|
|
379
|
+
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
380
|
+
- `et staff-redemption claims record-items` → `event.staffRedemption.recordStaffRedemptionClaimItems` (mutation)
|
|
381
|
+
- 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
382
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
380
383
|
- `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.
|
|
384
|
+
- 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
385
|
|
|
383
386
|
## Procedures without a registry command
|
|
384
387
|
|
package/dist/index.js
CHANGED
|
@@ -16258,6 +16258,14 @@ function object(shape, params) {
|
|
|
16258
16258
|
};
|
|
16259
16259
|
return new ZodObject(def);
|
|
16260
16260
|
}
|
|
16261
|
+
function strictObject(shape, params) {
|
|
16262
|
+
return new ZodObject({
|
|
16263
|
+
type: "object",
|
|
16264
|
+
shape,
|
|
16265
|
+
catchall: never(),
|
|
16266
|
+
...normalizeParams(params)
|
|
16267
|
+
});
|
|
16268
|
+
}
|
|
16261
16269
|
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
16262
16270
|
$ZodUnion.init(inst, def);
|
|
16263
16271
|
ZodType.init(inst, def);
|
|
@@ -19061,15 +19069,15 @@ Usage:
|
|
|
19061
19069
|
et passport overview --event-id <id>
|
|
19062
19070
|
et passport mine --event-id <id>
|
|
19063
19071
|
et passport login-options --event-id <id>
|
|
19064
|
-
et passport queue-status --event-id <id> (what guests see: enabled, staleMinutes and the visible stations
|
|
19072
|
+
et passport queue-status --event-id <id> (what guests see: enabled, staleMinutes and the crew-set waits in stations, plus defaultStatus and defaultStationIds for visible stations crew set none for, which read "< 10 mins"; overview gives each station's queueStatus and queueStatusDefault)
|
|
19065
19073
|
et passport bingo enable --event-id <id> (host: creates the hidden Bingo station and the HumanBingo)
|
|
19066
19074
|
et passport bingo rename --event-id <id> --name <name> (host: the game's display name guests see; 1-100 chars, default "Human Bingo")
|
|
19067
19075
|
et passport bingo join --event-id <id> (guest, passport participants only)
|
|
19068
19076
|
et passport bingo claim-stamp --event-id <id> (guest: catch-up award for a completed card)
|
|
19069
19077
|
et passport bingo status --event-id <id> (guest: own bingo progress and stamp)
|
|
19070
19078
|
et passport export --event-id <id>
|
|
19071
|
-
et passport settings update --event-id <id> --settings-json <json> (maxRedemptionsPerParticipant 0 = no cap; optional guestScan and simplifiedChinese true|false; optional staffIdLabel string|null; optional queueStatus true|false and queueStatusStaleMinutes 1-240|null)
|
|
19072
|
-
et passport station upsert --event-id <id> --station-json <json> (collection.stampValue 0-1000, default 1; collection.category GAME|FOOD|DRINK|BINGO, default GAME)
|
|
19079
|
+
et passport settings update --event-id <id> --settings-json <json> (maxRedemptionsPerParticipant 0 = no cap; optional guestScan and simplifiedChinese true|false; optional staffIdLabel string|null; optional categoryLabels object|null; optional queueStatus true|false and queueStatusStaleMinutes 1-240|null)
|
|
19080
|
+
et passport station upsert --event-id <id> --station-json <json> (collection.stampValue 0-1000, default 1; collection.category GAME|FOOD|DRINK|BINGO, default GAME; collection.prizeDeskAward true|false on SELF_SCAN/STAFF_SCAN, default false)
|
|
19073
19081
|
et passport station-access get --event-id <id>
|
|
19074
19082
|
et passport station-access set-password --event-id <id> --password-stdin --allow-state-change --target <same-event-id> (password read from stdin; 6-128 chars; ends every station session)
|
|
19075
19083
|
et passport station-access clear-password --event-id <id> --allow-state-change --target <same-event-id> (turns station links off; ends every station session)
|
|
@@ -19083,7 +19091,7 @@ Usage:
|
|
|
19083
19091
|
et passport station image-set --event-id <id> --station-id <id> --file <path> --content-type <image-mime>
|
|
19084
19092
|
et passport station image-clear --event-id <id> --station-id <id>
|
|
19085
19093
|
et passport station hidden --event-id <id> --station-id <id> --hidden <true|false>
|
|
19086
|
-
et passport station queue-status --event-id <id> --station-id <id> --status <under-10|under-30|over-30|clear> (set or clear the wait guests see; needs queueStatus on; re-sending a wait refreshes its time)
|
|
19094
|
+
et passport station queue-status --event-id <id> --station-id <id> --status <under-10|under-30|over-30|clear> (set or clear the wait guests see; clear returns the station to the "< 10 mins" default; needs queueStatus on; re-sending a wait refreshes its time)
|
|
19087
19095
|
et passport station archive --event-id <id> --station-id <id> --allow-state-change --target <same-event-id>
|
|
19088
19096
|
et passport station print-get --event-id <id> --station-id <id>
|
|
19089
19097
|
et passport station print-issue --event-id <id> --station-id <id> --expected-printed-qr-version <n>
|
|
@@ -19099,7 +19107,7 @@ Usage:
|
|
|
19099
19107
|
et passport prize image-set --event-id <id> --prize-id <id> --file <path> --content-type <image-mime>
|
|
19100
19108
|
et passport prize image-clear --event-id <id> --prize-id <id>
|
|
19101
19109
|
et passport prize archive --event-id <id> --prize-id <id> --allow-state-change --target <same-event-id>
|
|
19102
|
-
et passport redemption create --event-id <id> --participant-id <id> --prize-id <id> [--quantity <1-20>]
|
|
19110
|
+
et passport redemption create --event-id <id> --participant-id <id> --prize-id <id> [--quantity <1-20>] [--award-station-id <id>] [--request-id <uuid>]
|
|
19103
19111
|
et passport redemption reverse --event-id <id> --redemption-id <id> --reason <text> --allow-state-change --target <same-event-id>
|
|
19104
19112
|
et passport tally record --event-id <id> --station-id <id> --profile-code <code> --item <name> [--quantity <1-20>]
|
|
19105
19113
|
et passport tally reverse --event-id <id> --tally-id <id> --reason <text> --allow-state-change --target <same-event-id>
|
|
@@ -19128,8 +19136,15 @@ Event Passport:
|
|
|
19128
19136
|
pick a station and stamp guests. station-access get shows whether a password is set and how many station sessions are
|
|
19129
19137
|
active; set-password (stdin only) and clear-password both end every existing station session; no password means links are
|
|
19130
19138
|
off. stamps stats reports per-station stamp counts; stamps recipients lists who each station stamped and how
|
|
19131
|
-
(issuedBy.kind: participant self-scan, station-link, staff by name,
|
|
19139
|
+
(issuedBy.kind: participant self-scan, station-link, staff by name, bingo for a bingo award, or prize-desk for a stamp
|
|
19140
|
+
awarded with a prize redemption; page with
|
|
19132
19141
|
--cursor, backward needs a cursor). Station sessions themselves are browser-only.
|
|
19142
|
+
Prize-desk award: collection.prizeDeskAward (true|false, SELF_SCAN and STAFF_SCAN only, not the Bingo category; omit
|
|
19143
|
+
to keep, absent means off) lets crew give that station's stamp with a prize. redemption create --award-station-id
|
|
19144
|
+
<id> gives one such station's stamp (its stampValue, source PRIZE_DESK) in the same transaction as the redemption;
|
|
19145
|
+
the redemption's own checks use the balance before it, a station the participant already holds is refused, and
|
|
19146
|
+
redemption reverse revokes the awarded stamp. participant detail lists awardStations (alreadyCollected,
|
|
19147
|
+
blockedReason) and redemptions[].awardedStation. --request-id makes a retry safe (a retry of a since-reversed redemption is refused; use a new id).
|
|
19133
19148
|
Station cover art: image-set uploads a jpeg/png/webp/gif (up to 25 MB) to the event's station-art folder and
|
|
19134
19149
|
saves it as the station's imageKey, keeping every other station setting; image-clear removes it. A new
|
|
19135
19150
|
imageKey given in station JSON must be an upload to this event's event-passport/stations folder.
|
|
@@ -19163,12 +19178,22 @@ Event Passport:
|
|
|
19163
19178
|
that call it that. Omit it to keep the stored label; the Chinese passport keeps \u5458\u5DE5\u7F16\u53F7. overview
|
|
19164
19179
|
shows passport.staffIdLabel, login-options shows staffIdLabel, mine shows settings.staffIdLabel and
|
|
19165
19180
|
export returns staffIdLabel. Only the wording changes; the staffId fields and flags keep their names.
|
|
19181
|
+
Optional categoryLabels ({GAME,FOOD,DRINK,BINGO: {en,"zh-CN"}}, each name 1-40 chars after trimming, or null
|
|
19182
|
+
to clear) renames the station categories guests, crew and organisers see; omit it to keep the stored names,
|
|
19183
|
+
send an object to replace them all (a blank name means the built-in wording) and null to clear them. A
|
|
19184
|
+
Simplified Chinese guest sees the zh-CN name, else the built-in Chinese, never the English one. overview
|
|
19185
|
+
shows passport.categoryLabels, login-options shows categoryLabels and mine shows settings.categoryLabels.
|
|
19166
19186
|
Optional queueStatus (boolean, absent means off) lets station crew set a wait per station that guests
|
|
19167
19187
|
see in their passport: under-10, under-30 or over-30 minutes. Optional queueStatusStaleMinutes (1-240,
|
|
19168
|
-
or null to reset to
|
|
19188
|
+
or null to reset to 10) is how long a set wait stays trusted before guests see "Not updated recently".
|
|
19169
19189
|
overview shows passport.queueStatus, passport.queueStatusStaleMinutes and each station's queueStatus
|
|
19170
|
-
({status,updatedAt}
|
|
19171
|
-
|
|
19190
|
+
({status,updatedAt} for a crew-set wait, else null) and queueStatusDefault; queue-status shows the guest
|
|
19191
|
+
view. While queueStatus is on, every visible station shows a wait: a station crew never set (or cleared)
|
|
19192
|
+
has queueStatus null and queueStatusDefault UNDER_10_MIN ("< 10 mins"), a default that never goes stale; a
|
|
19193
|
+
crew-set wait overrides it (queueStatusDefault null) and reads "Not updated recently" after
|
|
19194
|
+
queueStatusStaleMinutes. queueStatusDefault is null while queueStatus is off and for hidden stations.
|
|
19195
|
+
station queue-status sets or clears one wait as an event operator (crew do the same in the browser; clear
|
|
19196
|
+
prints queueStatus null and queueStatusDefault UNDER_10_MIN), is refused while queueStatus is off, and
|
|
19172
19197
|
every change is recorded in the activity log. Turning queueStatus off hides waits from guests but keeps them.
|
|
19173
19198
|
Staff roster (event hosts only): import replaces the roster and returns imported, replaced and
|
|
19174
19199
|
rejected rows (blank, too long, or a Staff ID repeated in the file). Columns are matched from
|
|
@@ -19831,6 +19856,28 @@ var PASSPORT_STATION_CATEGORIES = [
|
|
|
19831
19856
|
"BINGO"
|
|
19832
19857
|
];
|
|
19833
19858
|
var passportStationCategorySchema = _enum(PASSPORT_STATION_CATEGORIES);
|
|
19859
|
+
var PASSPORT_CATEGORY_LABEL_MAX = 40;
|
|
19860
|
+
var PASSPORT_CATEGORY_LABEL_LOCALES = ["en", "zh-CN"];
|
|
19861
|
+
var passportCategoryLabelTextSchema = string2().trim().min(1).max(PASSPORT_CATEGORY_LABEL_MAX);
|
|
19862
|
+
var sanitizePassportCategoryLabels = (value) => {
|
|
19863
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
19864
|
+
return;
|
|
19865
|
+
const labels = {};
|
|
19866
|
+
for (const category of PASSPORT_STATION_CATEGORIES) {
|
|
19867
|
+
const entry = Reflect.get(value, category);
|
|
19868
|
+
if (typeof entry !== "object" || entry === null)
|
|
19869
|
+
continue;
|
|
19870
|
+
const names = {};
|
|
19871
|
+
for (const locale of PASSPORT_CATEGORY_LABEL_LOCALES) {
|
|
19872
|
+
const parsed = passportCategoryLabelTextSchema.safeParse(Reflect.get(entry, locale));
|
|
19873
|
+
if (parsed.success)
|
|
19874
|
+
names[locale] = parsed.data;
|
|
19875
|
+
}
|
|
19876
|
+
if (Object.keys(names).length > 0)
|
|
19877
|
+
labels[category] = names;
|
|
19878
|
+
}
|
|
19879
|
+
return Object.keys(labels).length > 0 ? labels : undefined;
|
|
19880
|
+
};
|
|
19834
19881
|
var passportTallyItemsSchema = array(string2().trim().min(1).max(PASSPORT_TALLY_ITEM_NAME_MAX)).min(1).max(PASSPORT_TALLY_ITEMS_MAX).superRefine((items, context) => {
|
|
19835
19882
|
const seen = new Set;
|
|
19836
19883
|
items.forEach((item, index) => {
|
|
@@ -19910,9 +19957,14 @@ var passportConfigSchema = object({
|
|
|
19910
19957
|
guestScan: boolean2().optional(),
|
|
19911
19958
|
simplifiedChinese: boolean2().optional(),
|
|
19912
19959
|
staffIdLabel: passportStaffIdLabelSchema.optional().catch(undefined),
|
|
19960
|
+
categoryLabels: unknown().transform(sanitizePassportCategoryLabels).optional(),
|
|
19913
19961
|
queueStatus: boolean2().optional().catch(undefined),
|
|
19914
19962
|
queueStatusStaleMinutes: number2().int().min(PASSPORT_QUEUE_STATUS_STALE_MINUTES_MIN).max(PASSPORT_QUEUE_STATUS_STALE_MINUTES_MAX).optional().catch(undefined)
|
|
19915
19963
|
});
|
|
19964
|
+
var PRIZE_DESK_AWARD_MODES = [
|
|
19965
|
+
"SELF_SCAN",
|
|
19966
|
+
"STAFF_SCAN"
|
|
19967
|
+
];
|
|
19916
19968
|
var passportStationConfigSchema = object({
|
|
19917
19969
|
version: literal(1),
|
|
19918
19970
|
collectionMode: _enum([
|
|
@@ -19928,6 +19980,7 @@ var passportStationConfigSchema = object({
|
|
|
19928
19980
|
category: passportStationCategorySchema.optional(),
|
|
19929
19981
|
tallyItems: passportTallyItemsSchema.optional(),
|
|
19930
19982
|
tallyEarnsStamp: boolean2().optional(),
|
|
19983
|
+
prizeDeskAward: boolean2().optional(),
|
|
19931
19984
|
info: passportStationInfoSchema.optional().catch(undefined)
|
|
19932
19985
|
}).superRefine((config, context) => {
|
|
19933
19986
|
const tally = config.collectionMode === "STAFF_TALLY";
|
|
@@ -19945,6 +19998,22 @@ var passportStationConfigSchema = object({
|
|
|
19945
19998
|
message: "Only tally stations can list items."
|
|
19946
19999
|
});
|
|
19947
20000
|
}
|
|
20001
|
+
if (config.prizeDeskAward === true) {
|
|
20002
|
+
if (!PRIZE_DESK_AWARD_MODES.includes(config.collectionMode)) {
|
|
20003
|
+
context.addIssue({
|
|
20004
|
+
code: "custom",
|
|
20005
|
+
path: ["prizeDeskAward"],
|
|
20006
|
+
message: "Only self-scan and staff-scan stations can be awarded at the prize desk."
|
|
20007
|
+
});
|
|
20008
|
+
}
|
|
20009
|
+
if (config.category === "BINGO") {
|
|
20010
|
+
context.addIssue({
|
|
20011
|
+
code: "custom",
|
|
20012
|
+
path: ["prizeDeskAward"],
|
|
20013
|
+
message: "The Bingo station cannot be awarded at the prize desk."
|
|
20014
|
+
});
|
|
20015
|
+
}
|
|
20016
|
+
}
|
|
19948
20017
|
if (config.collectionMode !== "STAFF_SCORE" && config.maxPoints !== 0) {
|
|
19949
20018
|
context.addIssue({
|
|
19950
20019
|
code: "custom",
|
|
@@ -19965,12 +20034,14 @@ var passportStationCollectionSchema = discriminatedUnion("collectionMode", [
|
|
|
19965
20034
|
collectionMode: literal("SELF_SCAN"),
|
|
19966
20035
|
stampValue: stampValueSchema.optional(),
|
|
19967
20036
|
category: passportStationCategorySchema.optional(),
|
|
20037
|
+
prizeDeskAward: boolean2().optional(),
|
|
19968
20038
|
info: passportStationInfoInputSchema.optional()
|
|
19969
20039
|
}).strict(),
|
|
19970
20040
|
object({
|
|
19971
20041
|
collectionMode: literal("STAFF_SCAN"),
|
|
19972
20042
|
stampValue: stampValueSchema.optional(),
|
|
19973
20043
|
category: passportStationCategorySchema.optional(),
|
|
20044
|
+
prizeDeskAward: boolean2().optional(),
|
|
19974
20045
|
info: passportStationInfoInputSchema.optional()
|
|
19975
20046
|
}).strict(),
|
|
19976
20047
|
object({
|
|
@@ -20034,6 +20105,17 @@ var requestPassportAccountLinkOtpSchema = passportAccountLinkIntentSchema.extend
|
|
|
20034
20105
|
var joinPassportSchema = passportEventIdSchema.extend({
|
|
20035
20106
|
name: string2().trim().min(1).max(100)
|
|
20036
20107
|
});
|
|
20108
|
+
var passportCategoryLabelInputSchema = string2().trim().max(PASSPORT_CATEGORY_LABEL_MAX);
|
|
20109
|
+
var passportCategoryLabelEntryInputSchema = strictObject({
|
|
20110
|
+
en: passportCategoryLabelInputSchema.optional(),
|
|
20111
|
+
"zh-CN": passportCategoryLabelInputSchema.optional()
|
|
20112
|
+
});
|
|
20113
|
+
var passportCategoryLabelsInputSchema = strictObject({
|
|
20114
|
+
GAME: passportCategoryLabelEntryInputSchema.optional(),
|
|
20115
|
+
FOOD: passportCategoryLabelEntryInputSchema.optional(),
|
|
20116
|
+
DRINK: passportCategoryLabelEntryInputSchema.optional(),
|
|
20117
|
+
BINGO: passportCategoryLabelEntryInputSchema.optional()
|
|
20118
|
+
}).transform((labels) => sanitizePassportCategoryLabels(labels) ?? {});
|
|
20037
20119
|
var passportSettingsSchema = passportEventIdSchema.extend({
|
|
20038
20120
|
luckyDrawStampThreshold: number2().int().positive().nullable(),
|
|
20039
20121
|
prizeStampThreshold: number2().int().positive().nullable(),
|
|
@@ -20046,6 +20128,7 @@ var passportSettingsSchema = passportEventIdSchema.extend({
|
|
|
20046
20128
|
_null3(),
|
|
20047
20129
|
string2().trim().max(PASSPORT_STAFF_ID_LABEL_MAX).transform((label) => label === "" ? null : label)
|
|
20048
20130
|
]).optional(),
|
|
20131
|
+
categoryLabels: union([_null3(), passportCategoryLabelsInputSchema]).optional(),
|
|
20049
20132
|
queueStatus: boolean2().optional(),
|
|
20050
20133
|
queueStatusStaleMinutes: number2().int().min(PASSPORT_QUEUE_STATUS_STALE_MINUTES_MIN).max(PASSPORT_QUEUE_STATUS_STALE_MINUTES_MAX).nullable().optional()
|
|
20051
20134
|
});
|
|
@@ -20077,10 +20160,13 @@ var passportPrizeSchema = passportEventIdSchema.extend({
|
|
|
20077
20160
|
stampCost: number2().int().min(0).max(PASSPORT_PRIZE_STAMP_COST_MAX).optional(),
|
|
20078
20161
|
order: number2().int().min(0)
|
|
20079
20162
|
});
|
|
20163
|
+
var passportRedemptionRequestIdSchema = uuid2();
|
|
20080
20164
|
var redeemPassportPrizeSchema = passportEventIdSchema.extend({
|
|
20081
20165
|
participantId: string2().min(1),
|
|
20082
20166
|
prizeId: string2().min(1),
|
|
20083
|
-
quantity: number2().int().min(1).max(PASSPORT_REDEMPTION_QUANTITY_MAX).default(1)
|
|
20167
|
+
quantity: number2().int().min(1).max(PASSPORT_REDEMPTION_QUANTITY_MAX).default(1),
|
|
20168
|
+
awardStationId: string2().min(1).optional(),
|
|
20169
|
+
requestId: passportRedemptionRequestIdSchema.optional()
|
|
20084
20170
|
});
|
|
20085
20171
|
|
|
20086
20172
|
// ../validators/src/event-passport/passport-roster.schema.ts
|
|
@@ -20210,7 +20296,12 @@ var stationPrizeClaimParticipantSchema = union([
|
|
|
20210
20296
|
staffId: string2().trim().min(1).max(PASSPORT_ROSTER_STAFF_ID_MAX)
|
|
20211
20297
|
})
|
|
20212
20298
|
]);
|
|
20213
|
-
var redeemPrizeAsStationStaffSchema = passportEventIdSchema.extend({
|
|
20299
|
+
var redeemPrizeAsStationStaffSchema = passportEventIdSchema.extend({
|
|
20300
|
+
profileCode: participantCodeSchema,
|
|
20301
|
+
prizeId: string2().min(1),
|
|
20302
|
+
awardStationId: string2().min(1).optional(),
|
|
20303
|
+
requestId: passportRedemptionRequestIdSchema.optional()
|
|
20304
|
+
}).strict();
|
|
20214
20305
|
var stationStampRecipientFiltersSchema = object({ search: string2().trim().max(200).optional() }).strict();
|
|
20215
20306
|
var passportStationStampRecipientsSchema = passportStationIdSchema.extend({
|
|
20216
20307
|
filters: stationStampRecipientFiltersSchema.default({}),
|
|
@@ -20653,6 +20744,14 @@ var nullableText = (value, name, maximum) => {
|
|
|
20653
20744
|
throw new CliUsageError(`${name} must be a string of at most ${maximum} characters or null.`);
|
|
20654
20745
|
return value.trim();
|
|
20655
20746
|
};
|
|
20747
|
+
var categoryLabels = (value) => {
|
|
20748
|
+
if (value === null)
|
|
20749
|
+
return null;
|
|
20750
|
+
const parsed = passportCategoryLabelsInputSchema.safeParse(value);
|
|
20751
|
+
if (!parsed.success)
|
|
20752
|
+
throw new CliUsageError(`categoryLabels is invalid: ${parsed.error.issues.map((issue) => `${issue.path.join(".") || "categoryLabels"} ${issue.message}`).join("; ")}`);
|
|
20753
|
+
return parsed.data;
|
|
20754
|
+
};
|
|
20656
20755
|
var stationInfo = (value) => {
|
|
20657
20756
|
const parsed = passportStationInfoInputSchema.safeParse(value);
|
|
20658
20757
|
if (!parsed.success)
|
|
@@ -20736,11 +20835,14 @@ var parsePassportCollection = (raw) => {
|
|
|
20736
20835
|
});
|
|
20737
20836
|
}
|
|
20738
20837
|
if (item.collectionMode === "SELF_SCAN" || item.collectionMode === "STAFF_SCAN") {
|
|
20739
|
-
keys(item, ["collectionMode", "stampValue", "category", "info"], "collection");
|
|
20838
|
+
keys(item, ["collectionMode", "stampValue", "category", "prizeDeskAward", "info"], "collection");
|
|
20839
|
+
if (item.prizeDeskAward !== undefined && typeof item.prizeDeskAward !== "boolean")
|
|
20840
|
+
throw new CliUsageError("prizeDeskAward must be true or false.");
|
|
20740
20841
|
return {
|
|
20741
20842
|
collectionMode: item.collectionMode,
|
|
20742
20843
|
...stampValue,
|
|
20743
20844
|
...category,
|
|
20845
|
+
...item.prizeDeskAward === undefined ? {} : { prizeDeskAward: item.prizeDeskAward },
|
|
20744
20846
|
...info
|
|
20745
20847
|
};
|
|
20746
20848
|
}
|
|
@@ -20793,6 +20895,8 @@ var parseSettingsSwitches = (value) => {
|
|
|
20793
20895
|
switches.queueStatusStaleMinutes = value.queueStatusStaleMinutes === null ? null : integer2(value.queueStatusStaleMinutes, "queueStatusStaleMinutes", PASSPORT_QUEUE_STATUS_STALE_MINUTES_MIN, PASSPORT_QUEUE_STATUS_STALE_MINUTES_MAX);
|
|
20794
20896
|
if (value.staffIdLabel !== undefined)
|
|
20795
20897
|
switches.staffIdLabel = nullableText(value.staffIdLabel, "staffIdLabel", PASSPORT_STAFF_ID_LABEL_MAX);
|
|
20898
|
+
if (value.categoryLabels !== undefined)
|
|
20899
|
+
switches.categoryLabels = categoryLabels(value.categoryLabels);
|
|
20796
20900
|
for (const name of [
|
|
20797
20901
|
"guestScan",
|
|
20798
20902
|
"simplifiedChinese",
|
|
@@ -20818,6 +20922,7 @@ var parsePassportSettingsInput = (raw, eventId) => {
|
|
|
20818
20922
|
"guestScan",
|
|
20819
20923
|
"simplifiedChinese",
|
|
20820
20924
|
"staffIdLabel",
|
|
20925
|
+
"categoryLabels",
|
|
20821
20926
|
"queueStatus",
|
|
20822
20927
|
"queueStatusStaleMinutes"
|
|
20823
20928
|
], "Settings");
|
|
@@ -21181,11 +21286,20 @@ var runPassportCommand = async (input) => {
|
|
|
21181
21286
|
break;
|
|
21182
21287
|
}
|
|
21183
21288
|
case "redemption create": {
|
|
21184
|
-
allowed.push("prize-id", "participant-id", "quantity");
|
|
21289
|
+
allowed.push("prize-id", "participant-id", "quantity", "award-station-id", "request-id");
|
|
21185
21290
|
const quantity = flag(flags, "quantity", false);
|
|
21291
|
+
const awardStationId = flag(flags, "award-station-id", false);
|
|
21292
|
+
const requestId = flag(flags, "request-id", false);
|
|
21186
21293
|
const payload = {
|
|
21187
21294
|
eventId,
|
|
21188
21295
|
...optionalEntry("quantity", quantity, (raw) => integer2(raw, "--quantity", 1, 20)),
|
|
21296
|
+
...optionalEntry("awardStationId", awardStationId, (raw) => text(raw, "--award-station-id", 200)),
|
|
21297
|
+
...optionalEntry("requestId", requestId, (raw) => {
|
|
21298
|
+
const parsed = passportRedemptionRequestIdSchema.safeParse(raw);
|
|
21299
|
+
if (!parsed.success)
|
|
21300
|
+
throw new CliUsageError("--request-id must be a UUID.");
|
|
21301
|
+
return parsed.data;
|
|
21302
|
+
}),
|
|
21189
21303
|
prizeId: requiredFlag(flags, "prize-id"),
|
|
21190
21304
|
participantId: requiredFlag(flags, "participant-id")
|
|
21191
21305
|
};
|
|
@@ -21332,10 +21446,18 @@ var STAFF_REDEMPTION_WRONG_SITE_RULES = [
|
|
|
21332
21446
|
"REFUSE",
|
|
21333
21447
|
"SERVE_FROM_COUNTER"
|
|
21334
21448
|
];
|
|
21449
|
+
var STAFF_REDEMPTION_SESSION_RULES = [
|
|
21450
|
+
"OWN_SHIFT",
|
|
21451
|
+
"ANY_OPEN_SESSION"
|
|
21452
|
+
];
|
|
21335
21453
|
var STAFF_REDEMPTION_DRAW_POLICIES = [
|
|
21336
21454
|
"REMAINING_HEADCOUNT",
|
|
21337
21455
|
"FIXED_RATE"
|
|
21338
21456
|
];
|
|
21457
|
+
var STAFF_REDEMPTION_COUNTER_ORDERS = [
|
|
21458
|
+
"FOOD_THEN_DRAW",
|
|
21459
|
+
"DRAW_THEN_FOOD"
|
|
21460
|
+
];
|
|
21339
21461
|
var STAFF_REDEMPTION_ARCHIVABLE = [
|
|
21340
21462
|
"site",
|
|
21341
21463
|
"session",
|
|
@@ -21360,8 +21482,10 @@ var updateStaffRedemptionSettingsSchema = staffRedemptionEventIdSchema.extend({
|
|
|
21360
21482
|
eligibleShifts: array(staffRedemptionShiftSchema).min(1).max(STAFF_REDEMPTION_ELIGIBLE_SHIFTS_MAX).optional(),
|
|
21361
21483
|
itemRule: _enum(STAFF_REDEMPTION_ITEM_RULES).optional(),
|
|
21362
21484
|
wrongSite: _enum(STAFF_REDEMPTION_WRONG_SITE_RULES).optional(),
|
|
21485
|
+
sessionRule: _enum(STAFF_REDEMPTION_SESSION_RULES).optional(),
|
|
21363
21486
|
drawPolicy: _enum(STAFF_REDEMPTION_DRAW_POLICIES).optional(),
|
|
21364
21487
|
fixedWinRatePercent: number2().min(0).max(100).optional(),
|
|
21488
|
+
counterOrder: _enum(STAFF_REDEMPTION_COUNTER_ORDERS).optional(),
|
|
21365
21489
|
overrideReason: reasonSchema.optional()
|
|
21366
21490
|
}).strict();
|
|
21367
21491
|
var upsertStaffRedemptionSiteSchema = staffRedemptionEventIdSchema.extend({
|
|
@@ -21458,23 +21582,34 @@ var staffRedemptionRosterListSchema = staffRedemptionEventIdSchema.extend({
|
|
|
21458
21582
|
}).strict();
|
|
21459
21583
|
var staffRedemptionRosterCountsSchema = staffRedemptionEventIdSchema.extend(rosterFiltersShape).strict();
|
|
21460
21584
|
var lookupStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({ employeeId: staffRedemptionEmployeeIdSchema }).strict();
|
|
21585
|
+
var claimItemIdsSchema = array(idSchema).max(STAFF_REDEMPTION_CLAIM_ITEMS_MAX).refine((ids) => new Set(ids).size === ids.length, {
|
|
21586
|
+
message: "Pick each item once."
|
|
21587
|
+
});
|
|
21461
21588
|
var redeemStaffRedemptionSchema = staffRedemptionSiteIdSchema.extend({
|
|
21462
21589
|
employeeId: staffRedemptionEmployeeIdSchema,
|
|
21463
21590
|
clientRequestId: staffRedemptionClientRequestIdSchema,
|
|
21464
|
-
itemIds:
|
|
21465
|
-
|
|
21466
|
-
|
|
21591
|
+
itemIds: claimItemIdsSchema
|
|
21592
|
+
}).strict();
|
|
21593
|
+
var recordStaffRedemptionClaimItemsSchema = staffRedemptionSiteIdSchema.extend({
|
|
21594
|
+
claimId: idSchema,
|
|
21595
|
+
itemIds: claimItemIdsSchema
|
|
21467
21596
|
}).strict();
|
|
21468
21597
|
var STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES = ["mine", "site"];
|
|
21469
21598
|
var staffRedemptionCounterClaimsSchema = staffRedemptionSiteIdSchema.extend({
|
|
21470
21599
|
limit: number2().int().min(1).max(50).default(20),
|
|
21471
21600
|
scope: _enum(STAFF_REDEMPTION_COUNTER_CLAIM_SCOPES).default("mine")
|
|
21472
21601
|
}).strict();
|
|
21602
|
+
var STAFF_REDEMPTION_CLAIM_STATUSES = [
|
|
21603
|
+
"active",
|
|
21604
|
+
"items-pending",
|
|
21605
|
+
"voided",
|
|
21606
|
+
"all"
|
|
21607
|
+
];
|
|
21473
21608
|
var claimFiltersShape = {
|
|
21474
21609
|
search: string2().trim().max(200).optional(),
|
|
21475
21610
|
siteId: idSchema.optional(),
|
|
21476
21611
|
sessionId: idSchema.optional(),
|
|
21477
|
-
status: _enum(
|
|
21612
|
+
status: _enum(STAFF_REDEMPTION_CLAIM_STATUSES).default("all")
|
|
21478
21613
|
};
|
|
21479
21614
|
var staffRedemptionClaimListSchema = staffRedemptionEventIdSchema.extend({
|
|
21480
21615
|
...claimFiltersShape,
|
|
@@ -21637,7 +21772,7 @@ var exportFilters = (parsed, eventId) => {
|
|
|
21637
21772
|
if (!checked.success) {
|
|
21638
21773
|
const issue = checked.error.issues[0];
|
|
21639
21774
|
const name = String(issue?.path[0] ?? "filter");
|
|
21640
|
-
throw new CliUsageError(name === "status" ? "--status must be active, voided or all." : `Invalid ${name}: ${issue?.message ?? "the value is invalid"}.`);
|
|
21775
|
+
throw new CliUsageError(name === "status" ? "--status must be active, items-pending, voided or all." : `Invalid ${name}: ${issue?.message ?? "the value is invalid"}.`);
|
|
21641
21776
|
}
|
|
21642
21777
|
return checked.data;
|
|
21643
21778
|
};
|
|
@@ -21662,6 +21797,8 @@ var csvColumns = [
|
|
|
21662
21797
|
return item.quantity === 1 ? label : `${label} x${item.quantity}`;
|
|
21663
21798
|
}).join("; ")
|
|
21664
21799
|
],
|
|
21800
|
+
["Items recorded", (row) => row.itemsPending ? "no" : "yes"],
|
|
21801
|
+
["Items recorded at", (row) => row.itemsRecordedAt?.toISOString() ?? null],
|
|
21665
21802
|
["Outcome", (row) => row.draw?.outcome ?? null],
|
|
21666
21803
|
["Prize", (row) => row.draw?.prize?.name ?? null],
|
|
21667
21804
|
["Operator kind", (row) => row.operatorKind],
|
|
@@ -25046,7 +25183,7 @@ var command_manifest_default = [
|
|
|
25046
25183
|
path: ["staff-redemption", "setup", "get"],
|
|
25047
25184
|
procedure: "event.staffRedemption.getStaffRedemptionSetup",
|
|
25048
25185
|
operation: "query",
|
|
25049
|
-
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.",
|
|
25186
|
+
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.",
|
|
25050
25187
|
effects: [],
|
|
25051
25188
|
dates: [],
|
|
25052
25189
|
input: {
|
|
@@ -25066,7 +25203,7 @@ var command_manifest_default = [
|
|
|
25066
25203
|
path: ["staff-redemption", "settings", "update"],
|
|
25067
25204
|
procedure: "event.staffRedemption.updateStaffRedemptionSettings",
|
|
25068
25205
|
operation: "mutation",
|
|
25069
|
-
summary: "Update eligibleShifts, itemRule, wrongSite, drawPolicy and
|
|
25206
|
+
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.",
|
|
25070
25207
|
effects: ["state-change"],
|
|
25071
25208
|
target: "eventId",
|
|
25072
25209
|
dates: [],
|
|
@@ -25100,6 +25237,10 @@ var command_manifest_default = [
|
|
|
25100
25237
|
type: "string",
|
|
25101
25238
|
enum: ["REFUSE", "SERVE_FROM_COUNTER"]
|
|
25102
25239
|
},
|
|
25240
|
+
sessionRule: {
|
|
25241
|
+
type: "string",
|
|
25242
|
+
enum: ["OWN_SHIFT", "ANY_OPEN_SESSION"]
|
|
25243
|
+
},
|
|
25103
25244
|
drawPolicy: {
|
|
25104
25245
|
type: "string",
|
|
25105
25246
|
enum: ["REMAINING_HEADCOUNT", "FIXED_RATE"]
|
|
@@ -25109,6 +25250,10 @@ var command_manifest_default = [
|
|
|
25109
25250
|
minimum: 0,
|
|
25110
25251
|
maximum: 100
|
|
25111
25252
|
},
|
|
25253
|
+
counterOrder: {
|
|
25254
|
+
type: "string",
|
|
25255
|
+
enum: ["FOOD_THEN_DRAW", "DRAW_THEN_FOOD"]
|
|
25256
|
+
},
|
|
25112
25257
|
overrideReason: {
|
|
25113
25258
|
type: "string",
|
|
25114
25259
|
minLength: 1,
|
|
@@ -25216,7 +25361,7 @@ var command_manifest_default = [
|
|
|
25216
25361
|
path: ["staff-redemption", "session", "upsert"],
|
|
25217
25362
|
procedure: "event.staffRedemption.upsertStaffRedemptionSession",
|
|
25218
25363
|
operation: "mutation",
|
|
25219
|
-
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.",
|
|
25364
|
+
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.",
|
|
25220
25365
|
effects: ["state-change"],
|
|
25221
25366
|
target: "eventId",
|
|
25222
25367
|
dates: ["startsAt", "endsAt"],
|
|
@@ -25840,7 +25985,7 @@ var command_manifest_default = [
|
|
|
25840
25985
|
path: ["staff-redemption", "claims", "list"],
|
|
25841
25986
|
procedure: "event.staffRedemption.getStaffRedemptionClaims",
|
|
25842
25987
|
operation: "query",
|
|
25843
|
-
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).",
|
|
25988
|
+
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.",
|
|
25844
25989
|
effects: [],
|
|
25845
25990
|
dates: [],
|
|
25846
25991
|
input: {
|
|
@@ -25868,7 +26013,7 @@ var command_manifest_default = [
|
|
|
25868
26013
|
status: {
|
|
25869
26014
|
default: "all",
|
|
25870
26015
|
type: "string",
|
|
25871
|
-
enum: ["active", "voided", "all"]
|
|
26016
|
+
enum: ["active", "items-pending", "voided", "all"]
|
|
25872
26017
|
},
|
|
25873
26018
|
limit: {
|
|
25874
26019
|
default: 25,
|
|
@@ -25901,7 +26046,7 @@ var command_manifest_default = [
|
|
|
25901
26046
|
path: ["staff-redemption", "claims", "counts"],
|
|
25902
26047
|
procedure: "event.staffRedemption.getStaffRedemptionClaimCounts",
|
|
25903
26048
|
operation: "query",
|
|
25904
|
-
summary: "Count claims matching the same filters as claims list.",
|
|
26049
|
+
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.",
|
|
25905
26050
|
effects: [],
|
|
25906
26051
|
dates: [],
|
|
25907
26052
|
input: {
|
|
@@ -25929,7 +26074,7 @@ var command_manifest_default = [
|
|
|
25929
26074
|
status: {
|
|
25930
26075
|
default: "all",
|
|
25931
26076
|
type: "string",
|
|
25932
|
-
enum: ["active", "voided", "all"]
|
|
26077
|
+
enum: ["active", "items-pending", "voided", "all"]
|
|
25933
26078
|
}
|
|
25934
26079
|
},
|
|
25935
26080
|
required: ["eventId"],
|
|
@@ -25940,7 +26085,7 @@ var command_manifest_default = [
|
|
|
25940
26085
|
path: ["staff-redemption", "claims", "void"],
|
|
25941
26086
|
procedure: "event.staffRedemption.voidStaffRedemptionClaim",
|
|
25942
26087
|
operation: "mutation",
|
|
25943
|
-
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.",
|
|
26088
|
+
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.",
|
|
25944
26089
|
effects: ["state-change"],
|
|
25945
26090
|
target: "eventId",
|
|
25946
26091
|
dates: [],
|
|
@@ -26026,7 +26171,7 @@ var command_manifest_default = [
|
|
|
26026
26171
|
path: ["staff-redemption", "counter", "context"],
|
|
26027
26172
|
procedure: "event.staffRedemption.getStaffRedemptionCounterContext",
|
|
26028
26173
|
operation: "query",
|
|
26029
|
-
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.",
|
|
26174
|
+
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.",
|
|
26030
26175
|
effects: [],
|
|
26031
26176
|
dates: [],
|
|
26032
26177
|
input: {
|
|
@@ -26051,7 +26196,7 @@ var command_manifest_default = [
|
|
|
26051
26196
|
path: ["staff-redemption", "lookup"],
|
|
26052
26197
|
procedure: "event.staffRedemption.lookupStaffRedemptionEmployee",
|
|
26053
26198
|
operation: "mutation",
|
|
26054
|
-
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.",
|
|
26199
|
+
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.",
|
|
26055
26200
|
effects: [],
|
|
26056
26201
|
dates: [],
|
|
26057
26202
|
input: {
|
|
@@ -26081,7 +26226,7 @@ var command_manifest_default = [
|
|
|
26081
26226
|
path: ["staff-redemption", "redeem"],
|
|
26082
26227
|
procedure: "event.staffRedemption.redeemStaffRedemption",
|
|
26083
26228
|
operation: "mutation",
|
|
26084
|
-
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.",
|
|
26229
|
+
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.",
|
|
26085
26230
|
effects: ["state-change"],
|
|
26086
26231
|
target: "eventId",
|
|
26087
26232
|
dates: [],
|
|
@@ -26128,11 +26273,51 @@ var command_manifest_default = [
|
|
|
26128
26273
|
additionalProperties: false
|
|
26129
26274
|
}
|
|
26130
26275
|
},
|
|
26276
|
+
{
|
|
26277
|
+
path: ["staff-redemption", "claims", "record-items"],
|
|
26278
|
+
procedure: "event.staffRedemption.recordStaffRedemptionClaimItems",
|
|
26279
|
+
operation: "mutation",
|
|
26280
|
+
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.",
|
|
26281
|
+
effects: ["state-change"],
|
|
26282
|
+
target: "eventId",
|
|
26283
|
+
dates: [],
|
|
26284
|
+
input: {
|
|
26285
|
+
type: "object",
|
|
26286
|
+
properties: {
|
|
26287
|
+
eventId: {
|
|
26288
|
+
type: "string",
|
|
26289
|
+
minLength: 1,
|
|
26290
|
+
maxLength: 64
|
|
26291
|
+
},
|
|
26292
|
+
siteId: {
|
|
26293
|
+
type: "string",
|
|
26294
|
+
minLength: 1,
|
|
26295
|
+
maxLength: 64
|
|
26296
|
+
},
|
|
26297
|
+
claimId: {
|
|
26298
|
+
type: "string",
|
|
26299
|
+
minLength: 1,
|
|
26300
|
+
maxLength: 64
|
|
26301
|
+
},
|
|
26302
|
+
itemIds: {
|
|
26303
|
+
maxItems: 20,
|
|
26304
|
+
type: "array",
|
|
26305
|
+
items: {
|
|
26306
|
+
type: "string",
|
|
26307
|
+
minLength: 1,
|
|
26308
|
+
maxLength: 64
|
|
26309
|
+
}
|
|
26310
|
+
}
|
|
26311
|
+
},
|
|
26312
|
+
required: ["eventId", "siteId", "claimId", "itemIds"],
|
|
26313
|
+
additionalProperties: false
|
|
26314
|
+
}
|
|
26315
|
+
},
|
|
26131
26316
|
{
|
|
26132
26317
|
path: ["staff-redemption", "counter", "claims"],
|
|
26133
26318
|
procedure: "event.staffRedemption.getStaffRedemptionCounterClaims",
|
|
26134
26319
|
operation: "query",
|
|
26135
|
-
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.",
|
|
26320
|
+
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.",
|
|
26136
26321
|
effects: [],
|
|
26137
26322
|
dates: [],
|
|
26138
26323
|
input: {
|