@go-labs-sg/event-tech 1.13.0 → 1.15.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 +14 -2
- package/dist/index.js +27 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,6 +231,15 @@ station-session stamping of other stations is unaffected. Read the current state
|
|
|
231
231
|
`overview` (`passport.guestScan`) or, as a guest, from `mine` (`settings.guestScanEnabled`).
|
|
232
232
|
Turn it back on by sending `"guestScan":true`.
|
|
233
233
|
|
|
234
|
+
Simplified Chinese: optional `"simplifiedChinese": true|false` in `--settings-json` controls
|
|
235
|
+
whether the guest passport offers a 简体中文 language option next to English. It translates the
|
|
236
|
+
passport's own wording (buttons, labels, dates, messages); text the organiser entered, such as
|
|
237
|
+
event, station and prize names and descriptions, is shown as entered. Omit it to keep the stored
|
|
238
|
+
value; an event that never set it reads as off, so guests see English only. Read the current state
|
|
239
|
+
from `overview` (`passport.simplifiedChinese`) or, before or after sign-in, from `login-options`
|
|
240
|
+
(`simplifiedChinese`). Turn it off again by sending `"simplifiedChinese":false`; open signed-in passports
|
|
241
|
+
switch back to English.
|
|
242
|
+
|
|
234
243
|
`stamp correct`, `redemption reverse`, station/prize archive and print revocation
|
|
235
244
|
require `--allow-state-change --target <same-event-id>`; correction/reversal also
|
|
236
245
|
require a reason. Scored corrections accept `--points` and preserve historical
|
|
@@ -326,8 +335,11 @@ et passport station image-clear --event-id <id> --station-id <id>
|
|
|
326
335
|
|
|
327
336
|
`image-set` uploads to the event's station-art folder and saves the key, keeping
|
|
328
337
|
every other station setting and the collection mode. `image-clear` removes it.
|
|
329
|
-
|
|
330
|
-
|
|
338
|
+
`station upsert` keeps the stored cover art when `--station-json` omits
|
|
339
|
+
`imageKey`, so an upsert after `image-set` does not remove the image; pass
|
|
340
|
+
`null` to clear it. A new `imageKey` passed through `station upsert` must also
|
|
341
|
+
be an upload to this event's `event-passport/stations` folder; an unchanged key
|
|
342
|
+
always passes.
|
|
331
343
|
|
|
332
344
|
Prize photos use the prize's optional `imageKey`, with the same flow and limits:
|
|
333
345
|
|
package/dist/index.js
CHANGED
|
@@ -18929,7 +18929,7 @@ Usage:
|
|
|
18929
18929
|
et passport bingo claim-stamp --event-id <id> (guest: catch-up award for a completed card)
|
|
18930
18930
|
et passport bingo status --event-id <id> (guest: own bingo progress and stamp)
|
|
18931
18931
|
et passport export --event-id <id>
|
|
18932
|
-
et passport settings update --event-id <id> --settings-json <json> (maxRedemptionsPerParticipant 0 = no cap; optional guestScan true|false)
|
|
18932
|
+
et passport settings update --event-id <id> --settings-json <json> (maxRedemptionsPerParticipant 0 = no cap; optional guestScan and simplifiedChinese true|false)
|
|
18933
18933
|
et passport station upsert --event-id <id> --station-json <json> (collection.stampValue 0-1000, default 1; collection.category GAME|FOOD|DRINK|BINGO, default GAME)
|
|
18934
18934
|
et passport station-access get --event-id <id>
|
|
18935
18935
|
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)
|
|
@@ -18980,6 +18980,7 @@ Event Passport:
|
|
|
18980
18980
|
collection.category groups stations for guests: GAME, FOOD, DRINK or BINGO. Omit it to keep the stored one.
|
|
18981
18981
|
Omit collection on an existing station to preserve its current mode.
|
|
18982
18982
|
Station JSON supports id/name/description/location/address/imageKey/order/opensAt/closesAt/collection.
|
|
18983
|
+
imageKey is the cover art: omit it to keep the stored image, null clears it.
|
|
18983
18984
|
location is the in-venue spot ("Level 2 pantry"); address is the street or site address (up to 300 chars, null clears it, omit keeps it).
|
|
18984
18985
|
Station links: one shared password per passport lets staff without accounts open /events/<id>/event-passport/station,
|
|
18985
18986
|
pick a station and stamp guests. station-access get shows whether a password is set and how many station sessions are
|
|
@@ -19008,7 +19009,9 @@ Event Passport:
|
|
|
19008
19009
|
Omit loginMethods to preserve it. Optional guestScan (boolean) turns guest station QR scanning
|
|
19009
19010
|
on or off; omit it to keep the stored value (absent means on). When off, guests cannot self-scan
|
|
19010
19011
|
(staff and station crew still stamp) and the guest passport hides the Scan tab. overview shows
|
|
19011
|
-
passport.guestScan and mine shows settings.guestScanEnabled.
|
|
19012
|
+
passport.guestScan and mine shows settings.guestScanEnabled. Optional simplifiedChinese (boolean,
|
|
19013
|
+
absent means off) offers a Simplified Chinese option on the guest passport; organiser-entered text
|
|
19014
|
+
stays as entered. overview shows passport.simplifiedChinese and login-options shows simplifiedChinese.
|
|
19012
19015
|
Staff roster (event hosts only): import replaces the roster and returns imported, replaced and
|
|
19013
19016
|
rejected rows (blank, too long, or a Staff ID repeated in the file). Columns are matched from
|
|
19014
19017
|
header names; override with the column flags. Without a last-name column, the last name is
|
|
@@ -19684,7 +19687,8 @@ var passportLoginMethodsSchema = object({
|
|
|
19684
19687
|
var passportConfigSchema = object({
|
|
19685
19688
|
version: literal(1),
|
|
19686
19689
|
loginMethods: passportLoginMethodsSchema,
|
|
19687
|
-
guestScan: boolean2().optional()
|
|
19690
|
+
guestScan: boolean2().optional(),
|
|
19691
|
+
simplifiedChinese: boolean2().optional()
|
|
19688
19692
|
});
|
|
19689
19693
|
var passportStationConfigSchema = object({
|
|
19690
19694
|
version: literal(1),
|
|
@@ -19813,7 +19817,8 @@ var passportSettingsSchema = passportEventIdSchema.extend({
|
|
|
19813
19817
|
maxRedemptionsPerParticipant: number2().int().min(0).max(2147483647),
|
|
19814
19818
|
linkedDrawEventId: string2().min(1).nullable(),
|
|
19815
19819
|
loginMethods: passportLoginMethodsSchema.optional(),
|
|
19816
|
-
guestScan: boolean2().optional()
|
|
19820
|
+
guestScan: boolean2().optional(),
|
|
19821
|
+
simplifiedChinese: boolean2().optional()
|
|
19817
19822
|
});
|
|
19818
19823
|
var renamePassportBingoSchema = passportEventIdSchema.extend({
|
|
19819
19824
|
name: string2().trim().min(1).max(100)
|
|
@@ -19824,7 +19829,7 @@ var passportStationSchema = passportEventIdSchema.extend({
|
|
|
19824
19829
|
description: string2().trim().max(1000).nullable(),
|
|
19825
19830
|
location: string2().trim().max(200).nullable(),
|
|
19826
19831
|
address: string2().trim().max(300).nullable().optional(),
|
|
19827
|
-
imageKey: string2().nullable(),
|
|
19832
|
+
imageKey: string2().nullable().optional(),
|
|
19828
19833
|
order: number2().int().min(0),
|
|
19829
19834
|
opensAt: date2().nullable(),
|
|
19830
19835
|
closesAt: date2().nullable(),
|
|
@@ -20529,13 +20534,25 @@ var parsePassportStationInput = (raw, eventId) => {
|
|
|
20529
20534
|
description: nullableText(value.description, "description", 1000),
|
|
20530
20535
|
location: nullableText(value.location, "location", 200),
|
|
20531
20536
|
...value.address === undefined ? {} : { address: nullableText(value.address, "address", 300) },
|
|
20532
|
-
imageKey: nullableText(value.imageKey, "imageKey", 2048),
|
|
20537
|
+
...value.imageKey === undefined ? {} : { imageKey: nullableText(value.imageKey, "imageKey", 2048) },
|
|
20533
20538
|
order: integer2(value.order ?? 0, "order"),
|
|
20534
20539
|
opensAt: date3(value.opensAt, "opensAt"),
|
|
20535
20540
|
closesAt: date3(value.closesAt, "closesAt"),
|
|
20536
20541
|
...collection ? { collection } : {}
|
|
20537
20542
|
};
|
|
20538
20543
|
};
|
|
20544
|
+
var parseSettingsSwitches = (value) => {
|
|
20545
|
+
const switches = {};
|
|
20546
|
+
for (const name of ["guestScan", "simplifiedChinese"]) {
|
|
20547
|
+
const item = value[name];
|
|
20548
|
+
if (item === undefined)
|
|
20549
|
+
continue;
|
|
20550
|
+
if (typeof item !== "boolean")
|
|
20551
|
+
throw new CliUsageError(`${name} must be a JSON boolean.`);
|
|
20552
|
+
switches[name] = item;
|
|
20553
|
+
}
|
|
20554
|
+
return switches;
|
|
20555
|
+
};
|
|
20539
20556
|
var parsePassportSettingsInput = (raw, eventId) => {
|
|
20540
20557
|
const value = json(raw, "--settings-json");
|
|
20541
20558
|
keys(value, [
|
|
@@ -20544,10 +20561,10 @@ var parsePassportSettingsInput = (raw, eventId) => {
|
|
|
20544
20561
|
"maxRedemptionsPerParticipant",
|
|
20545
20562
|
"linkedDrawEventId",
|
|
20546
20563
|
"loginMethods",
|
|
20547
|
-
"guestScan"
|
|
20564
|
+
"guestScan",
|
|
20565
|
+
"simplifiedChinese"
|
|
20548
20566
|
], "Settings");
|
|
20549
|
-
|
|
20550
|
-
throw new CliUsageError("guestScan must be a JSON boolean.");
|
|
20567
|
+
const switches = parseSettingsSwitches(value);
|
|
20551
20568
|
const threshold = (item, name) => item === null ? null : integer2(item, name, 1);
|
|
20552
20569
|
let loginMethods;
|
|
20553
20570
|
if (value.loginMethods !== undefined) {
|
|
@@ -20574,7 +20591,7 @@ var parsePassportSettingsInput = (raw, eventId) => {
|
|
|
20574
20591
|
maxRedemptionsPerParticipant: integer2(value.maxRedemptionsPerParticipant, "maxRedemptionsPerParticipant", 0),
|
|
20575
20592
|
linkedDrawEventId: value.linkedDrawEventId === null ? null : text(value.linkedDrawEventId, "linkedDrawEventId", 200),
|
|
20576
20593
|
...loginMethods ? { loginMethods } : {},
|
|
20577
|
-
...
|
|
20594
|
+
...switches
|
|
20578
20595
|
};
|
|
20579
20596
|
};
|
|
20580
20597
|
var parsePassportRosterEntryInput = (raw, eventId) => {
|