@go-labs-sg/event-tech 1.30.0 → 1.31.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 +8 -3
- package/command-reference.md +4 -4
- package/dist/index.js +238 -298
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -596,8 +596,11 @@ et event create --organization-id <org-id> --name "Example Staff Appreciation" \
|
|
|
596
596
|
# from their own shift's slot's prizes there. A walk-in rostered at another site (or
|
|
597
597
|
# none) is served only while a session is open (NO_OPEN_SESSION otherwise), from their
|
|
598
598
|
# own shift's slot at the counter's site while their session is open and it has sets
|
|
599
|
-
# left, else the open session's slot there with the most sets left, and
|
|
600
|
-
#
|
|
599
|
+
# left, else the open session's slot there with the most sets left, and spins for no
|
|
600
|
+
# prize unless walkInDraw is AT_COUNTER_SITE (#2549; with wrongSite SERVE_FROM_COUNTER
|
|
601
|
+
# and drawPolicy REMAINING_HEADCOUNT a walk-in then draws from the prizes of the slot
|
|
602
|
+
# their set comes from, odds left / (H + 1); unset or NO_PRIZE keeps the no-prize spin).
|
|
603
|
+
# card.setSession and card.setsFromOtherSession say which slot gives the set,
|
|
601
604
|
# card.prizesHere whether the spin can win, and card.ownSessionTiming warns NOT_STARTED
|
|
602
605
|
# or ENDED when their own session is not open. Session times decide which other
|
|
603
606
|
# sessions' stock is usable: set them correctly. Both draws work with either session
|
|
@@ -808,7 +811,9 @@ it with the filters.
|
|
|
808
811
|
this site a redemption would use now; null, with `setsFromOtherSession` false, on a card refused
|
|
809
812
|
before sets are counted), `setsFromOtherSession`, `prizesHere` (false when the spin here can only
|
|
810
813
|
be no prize: no slot for their shift at this site, or under `ANY_OPEN_SESSION` they are rostered
|
|
811
|
-
at another site
|
|
814
|
+
at another site, unless `walkInDraw` is `AT_COUNTER_SITE`), `walkInPrizeDraw` (true when a walk-in
|
|
815
|
+
draws from `setSession`'s prizes at this site under `walkInDraw` `AT_COUNTER_SITE`) and
|
|
816
|
+
`ownSessionTiming` (`NOT_STARTED`, `ENDED` or null; `ANY_OPEN_SESSION` only, a
|
|
812
817
|
warning: a person rostered here still uses their own shift's sets and prizes, a walk-in gets an
|
|
813
818
|
open session's set and a no-prize spin).
|
|
814
819
|
`card.session` is now always the person's own shift's session (their prizes), and
|
package/command-reference.md
CHANGED
|
@@ -308,9 +308,9 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
308
308
|
- Approve or reject a Human Bingo card item submission.
|
|
309
309
|
- Confirm: `--allow-state-change` `--target <input.id>`
|
|
310
310
|
- `et staff-redemption setup get` → `event.staffRedemption.getStaffRedemptionSetup` (query)
|
|
311
|
-
- Get the whole staff redemption setup: settings (including counterOrder, always resolved: FOOD_THEN_DRAW when never set, and the employee sign-in settings loginMethods, staffIdLabel and wrongSiteMessage, the two texts null while unset), employeeLogin.googleAvailable (whether Google sign-in can be turned on), missingPolicies and policiesLocked, sites (with crew access status), sessions, slots with setsIssued, item groups and items, prizes and prize stock. readiness lists what is still missing before counters can serve people (ready, and items of code plus short text); truncated is true when a list was cut at its cap. Archived rows are included with archivedAt; holds no personal data. Needs event.operate.
|
|
311
|
+
- Get the whole staff redemption setup: settings (including counterOrder, always resolved: FOOD_THEN_DRAW when never set, walkInDraw, always resolved: NO_PRIZE when never set, and the employee sign-in settings loginMethods, staffIdLabel and wrongSiteMessage, the two texts null while unset), employeeLogin.googleAvailable (whether Google sign-in can be turned on), missingPolicies and policiesLocked, sites (with crew access status), sessions, slots with setsIssued, item groups and items, prizes and prize stock. readiness lists what is still missing before counters can serve people (ready, and items of code plus short text); truncated is true when a list was cut at its cap. Archived rows are included with archivedAt; holds no personal data. Needs event.operate.
|
|
312
312
|
- `et staff-redemption settings update` → `event.staffRedemption.updateStaffRedemptionSettings` (mutation)
|
|
313
|
-
- Update eligibleShifts, itemRule, wrongSite, sessionRule, drawPolicy, fixedWinRatePercent, counterOrder and the employee sign-in settings loginMethods (emailOtp, google, guest, staffId, staffIdRequiresLastName; every method is off until turned on; google needs the server's Google sign-in), staffIdLabel (what the roster identifier is called, default 'Employee ID') and wrongSiteMessage (the warning both counters show for a person rostered at another site, max 300 characters); null or blank resets a text to its default. Omitted fields are unchanged. sessionRule is OWN_SHIFT (the default when unset: only during the person's own shift's session, from its sets and prizes) or ANY_OPEN_SESSION ('any open session: own shift's stock first'. A person rostered at the counter's site gets their set, from their session's (Singapore) day onwards whatever the hour (on an earlier day they are served like a walk-in), from their own shift's slot there while it has sets left, else from the slot at the same site of the open session with the most sets left (NO_SETS_LEFT when none has), and always draws from their own shift's slot's prizes there; they are never refused NO_OPEN_SESSION. A walk-in rostered at another site (or none) is served only while a session is open (NO_OPEN_SESSION otherwise), from their own shift's slot at the counter's site while their session is open and it has sets left, else from the open session's slot there with the most sets left, and their spin is
|
|
313
|
+
- Update eligibleShifts, itemRule, wrongSite, sessionRule, drawPolicy, walkInDraw, fixedWinRatePercent, counterOrder and the employee sign-in settings loginMethods (emailOtp, google, guest, staffId, staffIdRequiresLastName; every method is off until turned on; google needs the server's Google sign-in), staffIdLabel (what the roster identifier is called, default 'Employee ID') and wrongSiteMessage (the warning both counters show for a person rostered at another site, max 300 characters); null or blank resets a text to its default. Omitted fields are unchanged. sessionRule is OWN_SHIFT (the default when unset: only during the person's own shift's session, from its sets and prizes) or ANY_OPEN_SESSION ('any open session: own shift's stock first'. A person rostered at the counter's site gets their set, from their session's (Singapore) day onwards whatever the hour (on an earlier day they are served like a walk-in), from their own shift's slot there while it has sets left, else from the slot at the same site of the open session with the most sets left (NO_SETS_LEFT when none has), and always draws from their own shift's slot's prizes there; they are never refused NO_OPEN_SESSION. A walk-in rostered at another site (or none) is served only while a session is open (NO_OPEN_SESSION otherwise), from their own shift's slot at the counter's site while their session is open and it has sets left, else from the open session's slot there with the most sets left, and their spin is no prize unless walkInDraw is AT_COUNTER_SITE; works with either drawPolicy, and under REMAINING_HEADCOUNT a site's prizes are shared only over its own people). walkInDraw is NO_PRIZE (the default when unset) or AT_COUNTER_SITE: under ANY_OPEN_SESSION with wrongSite SERVE_FROM_COUNTER and drawPolicy REMAINING_HEADCOUNT, a walk-in draws from the prizes of the counter site's slot their set comes from, added to that slot's people (odds prizes left / (headcount + 1)), so each walk-in win is one fewer prize for that site's own people; ignored (no prize) under any other combination. 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, walkInDraw and counterOrder included, lock once a redemption exists (setup get shows policiesLocked): then a change needs overrideReason, recorded in the activity log. loginMethods, staffIdLabel and wrongSiteMessage are not policies: they never lock and never need overrideReason.
|
|
314
314
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
315
315
|
- `et staff-redemption site upsert` → `event.staffRedemption.upsertStaffRedemptionSite` (mutation)
|
|
316
316
|
- Create a site (omit siteId) or rename and reorder one (give siteId). Use staff-redemption archive set to archive or unarchive it.
|
|
@@ -371,11 +371,11 @@ Run `et <command> --help` for the full input JSON Schema.
|
|
|
371
371
|
- Release a person's prize draw (draw.id from claims list) with a reason: a won prize returns to the stock of the slot it was drawn in (claims list draw.slot) 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.
|
|
372
372
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|
|
373
373
|
- `et staff-redemption stock summary` → `event.staffRedemption.getStaffRedemptionStockSummary` (query)
|
|
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, walk-ins (walkIns: unreleased draws in the slot by people whose roster site or shift is not the slot's, leaving out no-prize draws by another shift, which are the placeholders recorded where a set came from when no prize slot could be used) and how many of them won (walkInPrizes; under ANY_OPEN_SESSION walk-ins from another site spin for no prize since 19 Nov 2026, so it only counts earlier draws there), plus event-wide item totals.
|
|
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, walk-ins (walkIns: unreleased draws in the slot by people whose roster site or shift is not the slot's, leaving out no-prize draws by another shift, which are the placeholders recorded where a set came from when no prize slot could be used) and how many of them won (walkInPrizes; under ANY_OPEN_SESSION walk-ins from another site spin for no prize since 19 Nov 2026 unless walkInDraw is AT_COUNTER_SITE, so otherwise it only counts earlier draws there), plus event-wide item totals.
|
|
375
375
|
- `et staff-redemption counter context` → `event.staffRedemption.getStaffRedemptionCounterContext` (query)
|
|
376
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. wrongSite is the policy for people rostered at another site (null while unset), wrongSiteMessage the warning to show for them and staffIdLabel what the roster identifier is called (defaults applied). sessionRule is the session policy; under ANY_OPEN_SESSION, openSessionIds are the sessions open now and openSessionChangesAt when that next changes (serverTime is the server clock at the read); openSession (the open session that started most recently) is informational only, as no single session serves everyone (a person rostered at the site uses their own shift's slot from that session's Singapore day onwards, whatever the hour; walk-ins and people whose session is on a later day use only open sessions' stock). Needs event.operate.
|
|
377
377
|
- `et staff-redemption lookup` → `event.staffRedemption.lookupStaffRedemptionEmployee` (mutation)
|
|
378
|
-
- Look up an Employee ID (employeeId) or a scanned employee QR code (code, from the employee page; valid for ten minutes, refused with a message to refresh when expired or forged) at a site, giving exactly one of the two: who they are, the card's awayFromRosterSite and rosterSiteId (true when their roster site is not this site), what they already collected (a collected card's receipt carries itemsPending and itemsRecordedAt), their own shift's session (card.session, the only one whose prizes they can draw from), the session whose sets at this site a redemption would use now (card.setSession, with card.setsFromOtherSession true when it is not their own; both null and false on a card refused before sets are counted; card.slotSetsLeft is what is left in it), card.prizesHere (false when the spin here can only be no prize: no slot for their shift at this site, or under ANY_OPEN_SESSION they are rostered at another site or their own session is on a later Singapore day), card.heldDraw (their unreleased draw from an earlier, voided redemption, shown again instead of a new spin; null when the next redemption draws afresh), card.ownSessionTiming (ANY_OPEN_SESSION only: NOT_STARTED or ENDED when their own session is not open, a warning; a person rostered here whose session has started or is due that Singapore day still uses their own shift's sets and prizes, while a walk-in or a person whose session is on a later day gets an open session's set and a no-prize spin; null otherwise) and whether a redemption would go ahead (refusal code otherwise). Writes nothing and is not rate-limited, so it needs no confirmation flags. Needs event.operate.
|
|
378
|
+
- Look up an Employee ID (employeeId) or a scanned employee QR code (code, from the employee page; valid for ten minutes, refused with a message to refresh when expired or forged) at a site, giving exactly one of the two: who they are, the card's awayFromRosterSite and rosterSiteId (true when their roster site is not this site), what they already collected (a collected card's receipt carries itemsPending and itemsRecordedAt), their own shift's session (card.session, the only one whose prizes they can draw from), the session whose sets at this site a redemption would use now (card.setSession, with card.setsFromOtherSession true when it is not their own; both null and false on a card refused before sets are counted; card.slotSetsLeft is what is left in it), card.prizesHere (false when the spin here can only be no prize: no slot for their shift at this site, or under ANY_OPEN_SESSION they are rostered at another site or their own session is on a later Singapore day and walkInDraw is not AT_COUNTER_SITE), card.walkInPrizeDraw (true when such a walk-in draws from card.setSession's prizes at this site instead, walkInDraw AT_COUNTER_SITE), card.heldDraw (their unreleased draw from an earlier, voided redemption, shown again instead of a new spin; null when the next redemption draws afresh), card.ownSessionTiming (ANY_OPEN_SESSION only: NOT_STARTED or ENDED when their own session is not open, a warning; a person rostered here whose session has started or is due that Singapore day still uses their own shift's sets and prizes, while a walk-in or a person whose session is on a later day gets an open session's set and a no-prize spin; null otherwise) and whether a redemption would go ahead (refusal code otherwise). Writes nothing and is not rate-limited, so it needs no confirmation flags. Needs event.operate.
|
|
379
379
|
- `et staff-redemption redeem` → `event.staffRedemption.redeemStaffRedemption` (mutation)
|
|
380
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. The set and the draw follow the event's sessionRule. Under ANY_OPEN_SESSION a person rostered at this site gets the set, from their session's (Singapore) day onwards whatever the hour (on an earlier day they are served like a walk-in), from their own shift's slot here while it has sets left, else the open session's slot here with the most sets left (receipt.session names it; NO_SETS_LEFT when none has), and always draws from their own shift's slot's prizes here; a walk-in rostered at another site is served only while a session is open (NO_OPEN_SESSION otherwise), from their own shift's slot here while their session is open and it has sets left, else the open session's slot here with the most sets left, and always gets no prize. receipt.draw.slot is the slot, session and site the draw was made in (a reused draw keeps its own). 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
381
|
- Confirm: `--allow-state-change` `--target <input.eventId>`
|