@go-labs-sg/event-tech 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2471,6 +2471,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2471
2471
  return payload;
2472
2472
  };
2473
2473
  });
2474
+ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
2475
+ $ZodType.init(inst, def);
2476
+ inst._zod.parse = (payload, _ctx) => {
2477
+ if (def.coerce) {
2478
+ try {
2479
+ payload.value = new Date(payload.value);
2480
+ } catch (_err) {}
2481
+ }
2482
+ const input = payload.value;
2483
+ const isDate = input instanceof Date;
2484
+ const isValidDate = isDate && !Number.isNaN(input.getTime());
2485
+ if (isValidDate)
2486
+ return payload;
2487
+ payload.issues.push({
2488
+ expected: "date",
2489
+ code: "invalid_type",
2490
+ input,
2491
+ ...isDate ? { received: "Invalid Date" } : {},
2492
+ inst
2493
+ });
2494
+ return payload;
2495
+ };
2496
+ });
2474
2497
  function capSize(inst, size) {
2475
2498
  const caps = sizeCaps(inst._zod.def.checks);
2476
2499
  if (!caps.length)
@@ -2908,6 +2931,89 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2908
2931
  });
2909
2932
  };
2910
2933
  });
2934
+ function discriminatorMap(def) {
2935
+ const map = new Map;
2936
+ for (const option of def.options) {
2937
+ const values = option._zod.propValues?.[def.discriminator];
2938
+ if (!values || values.size === 0)
2939
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
2940
+ for (const value of values) {
2941
+ if (map.has(value)) {
2942
+ if (value !== undefined)
2943
+ throw new Error(`Duplicate discriminator value "${String(value)}"`);
2944
+ map.set(value, null);
2945
+ } else {
2946
+ map.set(value, option);
2947
+ }
2948
+ }
2949
+ }
2950
+ return map;
2951
+ }
2952
+ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2953
+ def.inclusive = false;
2954
+ $ZodUnion.init(inst, def);
2955
+ const _super = inst._zod.parse;
2956
+ defineLazyInternal(inst, "propValues", (zod) => {
2957
+ const propValues = {};
2958
+ let undefinedCount = 0;
2959
+ for (const option of zod.def.options) {
2960
+ const pv = option._zod.propValues;
2961
+ if (!pv || Object.keys(pv).length === 0)
2962
+ throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
2963
+ if (pv[zod.def.discriminator]?.has(undefined))
2964
+ undefinedCount++;
2965
+ for (const [k, v] of Object.entries(pv)) {
2966
+ if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
2967
+ assignProp(propValues, k, new Set);
2968
+ }
2969
+ for (const val of v) {
2970
+ propValues[k].add(val);
2971
+ }
2972
+ }
2973
+ }
2974
+ if (!zod.def.unionFallback && undefinedCount > 1)
2975
+ propValues[zod.def.discriminator]?.delete(undefined);
2976
+ return propValues;
2977
+ });
2978
+ def.options.forEach((option, i) => {
2979
+ const propShape = rawShape(option._zod.def);
2980
+ if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
2981
+ throw new Error(`Invalid discriminated union option at index "${i}"`);
2982
+ }
2983
+ });
2984
+ const disc = cached(() => discriminatorMap(def));
2985
+ inst._zod.parse = (payload, ctx) => {
2986
+ const input = payload.value;
2987
+ if (!isObject(input)) {
2988
+ payload.issues.push({
2989
+ code: "invalid_type",
2990
+ expected: "object",
2991
+ input,
2992
+ inst
2993
+ });
2994
+ return payload;
2995
+ }
2996
+ const value = input?.[def.discriminator];
2997
+ const opt = disc.value.get(value);
2998
+ if (opt && (value !== undefined || ctx.direction !== "backward")) {
2999
+ return opt._zod.run(payload, ctx);
3000
+ }
3001
+ if (def.unionFallback || ctx.direction === "backward") {
3002
+ return _super(payload, ctx);
3003
+ }
3004
+ payload.issues.push({
3005
+ code: "invalid_union",
3006
+ errors: [],
3007
+ note: "No matching discriminator",
3008
+ discriminator: def.discriminator,
3009
+ options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
3010
+ input,
3011
+ path: [def.discriminator],
3012
+ inst
3013
+ });
3014
+ return payload;
3015
+ };
3016
+ });
2911
3017
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2912
3018
  $ZodType.init(inst, def);
2913
3019
  inst._zod.parse = (payload, ctx) => {
@@ -4039,6 +4145,12 @@ function _never(Class, params) {
4039
4145
  ...normalizeParams(params)
4040
4146
  });
4041
4147
  }
4148
+ function _date(Class, params) {
4149
+ return new Class({
4150
+ type: "date",
4151
+ ...normalizeParams(params)
4152
+ });
4153
+ }
4042
4154
  function _lt(value, params) {
4043
4155
  return new $ZodCheckLessThan({
4044
4156
  check: "less_than",
@@ -4933,6 +5045,9 @@ var neverProcessor = (_schema, _ctx, json, _params) => {
4933
5045
  json.not = {};
4934
5046
  };
4935
5047
  var unknownProcessor = (_schema, _ctx, _json, _params) => {};
5048
+ var dateProcessor = (schema, ctx, json, params) => {
5049
+ handleUnrepresentable(schema, ctx, json, params, "Date cannot be represented in JSON Schema");
5050
+ };
4936
5051
  var enumProcessor = (schema, _ctx, json, _params) => {
4937
5052
  const def = schema._zod.def;
4938
5053
  const values = getEnumValues(def.entries);
@@ -5575,6 +5690,9 @@ var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
5575
5690
  $ZodEmail.init(inst, def);
5576
5691
  ZodStringFormat.init(inst, def);
5577
5692
  });
5693
+ function email2(params) {
5694
+ return _email(ZodEmail, params);
5695
+ }
5578
5696
  var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
5579
5697
  $ZodGUID.init(inst, def);
5580
5698
  ZodStringFormat.init(inst, def);
@@ -5755,6 +5873,25 @@ var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
5755
5873
  function never(params) {
5756
5874
  return _never(ZodNever, params);
5757
5875
  }
5876
+ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
5877
+ $ZodDate.init(inst, def);
5878
+ ZodType.init(inst, def);
5879
+ inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
5880
+ inst.min = (value, params) => inst.check(_gte(value, params));
5881
+ inst.max = (value, params) => inst.check(_lte(value, params));
5882
+ }, /* @__PURE__ */ derived({
5883
+ minDate: (inst) => {
5884
+ const { minimum } = aggregateChecks(inst);
5885
+ return minimum ? new Date(minimum) : null;
5886
+ },
5887
+ maxDate: (inst) => {
5888
+ const { maximum } = aggregateChecks(inst);
5889
+ return maximum ? new Date(maximum) : null;
5890
+ }
5891
+ }, {}));
5892
+ function date2(params) {
5893
+ return _date(ZodDate, params);
5894
+ }
5758
5895
  var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
5759
5896
  _ensureDefaultMemoizer();
5760
5897
  $ZodArray.init(inst, def);
@@ -5852,6 +5989,18 @@ function union(options, params) {
5852
5989
  ...normalizeParams(params)
5853
5990
  });
5854
5991
  }
5992
+ var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
5993
+ ZodUnion.init(inst, def);
5994
+ $ZodDiscriminatedUnion.init(inst, def);
5995
+ });
5996
+ function discriminatedUnion(discriminator, options, params) {
5997
+ return new ZodDiscriminatedUnion({
5998
+ type: "union",
5999
+ options,
6000
+ discriminator,
6001
+ ...normalizeParams(params)
6002
+ });
6003
+ }
5855
6004
  var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
5856
6005
  $ZodIntersection.init(inst, def);
5857
6006
  ZodType.init(inst, def);
@@ -6992,6 +7141,7 @@ var writeError = (runtime, error) => {
6992
7141
  // src/arguments.ts
6993
7142
  var booleanFlags = new Set([
6994
7143
  "allow-delete",
7144
+ "allow-email",
6995
7145
  "allow-state-change",
6996
7146
  "dry-run",
6997
7147
  "help",
@@ -7157,9 +7307,13 @@ Usage:
7157
7307
  et passport overview --event-id <id>
7158
7308
  et passport mine --event-id <id>
7159
7309
  et passport login-options --event-id <id>
7310
+ et passport bingo enable --event-id <id> (host: creates the hidden Bingo station and the HumanBingo)
7311
+ et passport bingo join --event-id <id> (guest, passport participants only)
7312
+ et passport bingo claim-stamp --event-id <id> (guest: catch-up award for a completed card)
7313
+ et passport bingo status --event-id <id> (guest: own bingo progress and stamp)
7160
7314
  et passport export --event-id <id>
7161
- et passport settings update --event-id <id> --settings-json <json>
7162
- et passport station upsert --event-id <id> --station-json <json>
7315
+ et passport settings update --event-id <id> --settings-json <json> (maxRedemptionsPerParticipant 0 = no cap)
7316
+ et passport station upsert --event-id <id> --station-json <json> (collection.stampValue 0-1000, default 1; collection.category GAME|FOOD|DRINK|BINGO, default GAME)
7163
7317
  et passport station hidden --event-id <id> --station-id <id> --hidden <true|false>
7164
7318
  et passport station archive --event-id <id> --station-id <id> --allow-state-change --target <same-event-id>
7165
7319
  et passport station print-get --event-id <id> --station-id <id>
@@ -7172,15 +7326,21 @@ Usage:
7172
7326
  et passport participant search --event-id <id> [--query <text>]
7173
7327
  et passport participant detail --event-id <id> --participant-id <id>
7174
7328
  et passport stamp correct --event-id <id> --station-id <id> --participant-id <id> --stamped <true|false> --reason <text> [--points <n>] --allow-state-change --target <same-event-id>
7175
- et passport prize upsert --event-id <id> --prize-json <json>
7329
+ et passport prize upsert --event-id <id> --prize-json <json> (stampCost: stamps per unit, default 0)
7176
7330
  et passport prize archive --event-id <id> --prize-id <id> --allow-state-change --target <same-event-id>
7177
- et passport redemption create --event-id <id> --participant-id <id> --prize-id <id>
7331
+ et passport redemption create --event-id <id> --participant-id <id> --prize-id <id> [--quantity <1-20>]
7178
7332
  et passport redemption reverse --event-id <id> --redemption-id <id> --reason <text> --allow-state-change --target <same-event-id>
7333
+ et passport tally record --event-id <id> --station-id <id> --profile-code <code> --item <name> [--quantity <1-20>]
7334
+ et passport tally reverse --event-id <id> --tally-id <id> --reason <text> --allow-state-change --target <same-event-id>
7335
+ et passport tally summary --event-id <id>
7336
+ et passport tally list --event-id <id> --station-id <id>
7179
7337
 
7180
7338
  Event Passport:
7181
7339
  Uses the same typed procedures and event permissions as the web app.
7182
- Station collection modes: SELF_SCAN, STAFF_SCAN, STAFF_SCORE.
7340
+ Station collection modes: SELF_SCAN, STAFF_SCAN, STAFF_SCORE, STAFF_TALLY.
7341
+ STAFF_TALLY needs collection.tallyItems (1-30 unique names) and optional tallyEarnsStamp (default false).
7183
7342
  Include collection.maxPoints only for STAFF_SCORE; zero is a valid score.
7343
+ collection.category groups stations for guests: GAME, FOOD, DRINK or BINGO. Omit it to keep the stored one.
7184
7344
  Omit collection on an existing station to preserve its current mode.
7185
7345
  Station JSON supports id/name/description/location/imageKey/order/opensAt/closesAt/collection.
7186
7346
  Date-time fields are ISO strings or null; order defaults to zero.
@@ -7224,8 +7384,25 @@ Lucky draw:
7224
7384
  It requires --allow-state-change and --target exactly equal to --event-id.
7225
7385
  participants list defaults to page 1 with 100 results per page; inspect every page.
7226
7386
 
7387
+ Registry commands (staff and admin operations, one per API procedure):
7388
+ et commands List every registry command as JSON.
7389
+ et <command> --help Show its input JSON Schema and confirmations.
7390
+ et <command> [--input <json> | --input-file <path>]
7391
+ et <write command> --input <json> --allow-state-change [--allow-delete] [--allow-email] --target <value>
7392
+ Groups: organization member/owner/invitation/update/image/archive/access/dashboard/analytics,
7393
+ admin organization/event/member/user/activity/dashboard, event access/details/update/
7394
+ status-update/archive/restore/duplicate/export/recent/background/story, activity list,
7395
+ lucky-draw winners/boards/participants eligible|delete/wheel/passport-sync,
7396
+ passport lucky-draws/operator-metadata, photo-wall, post-it, signature-wall, rating, human-bingo.
7397
+ --input is passed unchanged to the procedure, so field names match the web app.
7398
+ Date fields take ISO 8601 strings and are sent as dates.
7399
+ Writes require --allow-state-change and --target equal to the input key shown by --help
7400
+ (arrays joined with commas). Hard deletes add --allow-delete; emails add --allow-email.
7401
+ Run every write once with --help first and read back the result afterwards.
7402
+
7227
7403
  Global options:
7228
- Bare flags (--dry-run, --allow-state-change, --public, --no-browser) take no value;
7404
+ Bare flags (--dry-run, --allow-state-change, --allow-delete, --allow-email, --public,
7405
+ --no-browser) take no value;
7229
7406
  --flag=value spellings are rejected before any request.
7230
7407
  --api-url <url> Override EVENT_TECH_API_URL.
7231
7408
  --help Print this help as JSON.
@@ -7583,6 +7760,191 @@ var runLuckyDrawSetupCommand = async (input) => {
7583
7760
  return false;
7584
7761
  };
7585
7762
 
7763
+ // ../validators/src/event-passport/passport-input.schema.ts
7764
+ var pointsSchema = number2().int().min(0).max(2147483647);
7765
+ var printVersionSchema = number2().int().min(0).max(Number.MAX_SAFE_INTEGER);
7766
+ var PASSPORT_STAMP_VALUE_MAX = 1000;
7767
+ var PASSPORT_PRIZE_STAMP_COST_MAX = 1e5;
7768
+ var PASSPORT_REDEMPTION_QUANTITY_MAX = 20;
7769
+ var PASSPORT_TALLY_ITEMS_MAX = 30;
7770
+ var PASSPORT_TALLY_ITEM_NAME_MAX = 60;
7771
+ var PASSPORT_TALLY_QUANTITY_MAX = 20;
7772
+ var stampValueSchema = number2().int().min(0).max(PASSPORT_STAMP_VALUE_MAX);
7773
+ var PASSPORT_STATION_CATEGORIES = [
7774
+ "GAME",
7775
+ "FOOD",
7776
+ "DRINK",
7777
+ "BINGO"
7778
+ ];
7779
+ var passportStationCategorySchema = _enum(PASSPORT_STATION_CATEGORIES);
7780
+ var passportTallyItemsSchema = array(string2().trim().min(1).max(PASSPORT_TALLY_ITEM_NAME_MAX)).min(1).max(PASSPORT_TALLY_ITEMS_MAX).superRefine((items, context) => {
7781
+ const seen = new Set;
7782
+ items.forEach((item, index) => {
7783
+ const key = item.toLocaleLowerCase();
7784
+ if (seen.has(key))
7785
+ context.addIssue({
7786
+ code: "custom",
7787
+ path: [index],
7788
+ message: `"${item}" is listed more than once.`
7789
+ });
7790
+ seen.add(key);
7791
+ });
7792
+ });
7793
+ var passportLoginMethodsSchema = object({ emailOtp: boolean2(), google: boolean2(), guest: boolean2() }).strict().refine((methods) => methods.emailOtp || methods.google, {
7794
+ message: "Keep email OTP or Google available for passport recovery."
7795
+ });
7796
+ var passportConfigSchema = object({
7797
+ version: literal(1),
7798
+ loginMethods: passportLoginMethodsSchema
7799
+ });
7800
+ var passportStationConfigSchema = object({
7801
+ version: literal(1),
7802
+ collectionMode: _enum([
7803
+ "SELF_SCAN",
7804
+ "STAFF_SCAN",
7805
+ "STAFF_SCORE",
7806
+ "STAFF_TALLY"
7807
+ ]),
7808
+ maxPoints: pointsSchema,
7809
+ printedQrVersion: printVersionSchema,
7810
+ printedQrEnabled: boolean2(),
7811
+ stampValue: stampValueSchema.optional(),
7812
+ category: passportStationCategorySchema.optional(),
7813
+ tallyItems: passportTallyItemsSchema.optional(),
7814
+ tallyEarnsStamp: boolean2().optional()
7815
+ }).superRefine((config, context) => {
7816
+ const tally = config.collectionMode === "STAFF_TALLY";
7817
+ if (tally && !config.tallyItems) {
7818
+ context.addIssue({
7819
+ code: "custom",
7820
+ path: ["tallyItems"],
7821
+ message: "Tally stations need at least one item."
7822
+ });
7823
+ }
7824
+ if (!tally && (config.tallyItems !== undefined || config.tallyEarnsStamp !== undefined)) {
7825
+ context.addIssue({
7826
+ code: "custom",
7827
+ path: ["tallyItems"],
7828
+ message: "Only tally stations can list items."
7829
+ });
7830
+ }
7831
+ if (config.collectionMode !== "STAFF_SCORE" && config.maxPoints !== 0) {
7832
+ context.addIssue({
7833
+ code: "custom",
7834
+ path: ["maxPoints"],
7835
+ message: "Only scored stations can award points."
7836
+ });
7837
+ }
7838
+ if (config.collectionMode !== "SELF_SCAN" && config.printedQrEnabled) {
7839
+ context.addIssue({
7840
+ code: "custom",
7841
+ path: ["printedQrEnabled"],
7842
+ message: "Only self-scan stations can issue printed QR codes."
7843
+ });
7844
+ }
7845
+ });
7846
+ var passportStationCollectionSchema = discriminatedUnion("collectionMode", [
7847
+ object({
7848
+ collectionMode: literal("SELF_SCAN"),
7849
+ stampValue: stampValueSchema.optional(),
7850
+ category: passportStationCategorySchema.optional()
7851
+ }).strict(),
7852
+ object({
7853
+ collectionMode: literal("STAFF_SCAN"),
7854
+ stampValue: stampValueSchema.optional(),
7855
+ category: passportStationCategorySchema.optional()
7856
+ }).strict(),
7857
+ object({
7858
+ collectionMode: literal("STAFF_SCORE"),
7859
+ maxPoints: pointsSchema,
7860
+ stampValue: stampValueSchema.optional(),
7861
+ category: passportStationCategorySchema.optional()
7862
+ }).strict(),
7863
+ object({
7864
+ collectionMode: literal("STAFF_TALLY"),
7865
+ tallyItems: passportTallyItemsSchema,
7866
+ tallyEarnsStamp: boolean2().default(false),
7867
+ stampValue: stampValueSchema.optional(),
7868
+ category: passportStationCategorySchema.optional()
7869
+ }).strict()
7870
+ ]);
7871
+ var passportEventIdSchema = object({ eventId: string2().min(1) });
7872
+ var passportStationIdSchema = passportEventIdSchema.extend({
7873
+ stationId: string2().min(1)
7874
+ });
7875
+ var passportQrInputSchema = passportEventIdSchema.extend({
7876
+ code: string2().min(1).max(2048)
7877
+ });
7878
+ var passportPrintQrMutationSchema = passportStationIdSchema.extend({
7879
+ expectedPrintedQrVersion: printVersionSchema
7880
+ });
7881
+ var collectPassportStampByStaffSchema = passportStationIdSchema.extend({
7882
+ profileCode: string2().min(1).max(2048),
7883
+ points: pointsSchema.optional()
7884
+ });
7885
+ var recordPassportTallySchema = passportStationIdSchema.extend({
7886
+ profileCode: string2().min(1).max(2048),
7887
+ item: string2().trim().min(1).max(PASSPORT_TALLY_ITEM_NAME_MAX),
7888
+ quantity: number2().int().min(1).max(PASSPORT_TALLY_QUANTITY_MAX).default(1)
7889
+ });
7890
+ var reversePassportTallySchema = passportEventIdSchema.extend({
7891
+ tallyId: string2().min(1),
7892
+ reason: string2().trim().min(1).max(200)
7893
+ });
7894
+ var correctPassportStampSchema = passportStationIdSchema.extend({
7895
+ participantId: string2().min(1),
7896
+ stamped: boolean2(),
7897
+ reason: string2().trim().min(1).max(500),
7898
+ points: pointsSchema.optional()
7899
+ });
7900
+ var beginPassportAccountLinkSchema = discriminatedUnion("method", [
7901
+ passportEventIdSchema.extend({
7902
+ method: literal("EMAIL_OTP"),
7903
+ email: string2().trim().toLowerCase().pipe(email2())
7904
+ }).strict(),
7905
+ passportEventIdSchema.extend({ method: literal("GOOGLE") }).strict()
7906
+ ]);
7907
+ var passportAccountLinkIntentSchema = passportEventIdSchema.extend({
7908
+ intent: string2().regex(/^epl1\.[A-Za-z0-9_-]{43}$/)
7909
+ });
7910
+ var requestPassportAccountLinkOtpSchema = passportAccountLinkIntentSchema.extend({
7911
+ email: string2().trim().toLowerCase().pipe(email2())
7912
+ });
7913
+ var joinPassportSchema = passportEventIdSchema.extend({
7914
+ name: string2().trim().min(1).max(100)
7915
+ });
7916
+ var passportSettingsSchema = passportEventIdSchema.extend({
7917
+ luckyDrawStampThreshold: number2().int().positive().nullable(),
7918
+ prizeStampThreshold: number2().int().positive().nullable(),
7919
+ maxRedemptionsPerParticipant: number2().int().min(0).max(2147483647),
7920
+ linkedDrawEventId: string2().min(1).nullable(),
7921
+ loginMethods: passportLoginMethodsSchema.optional()
7922
+ });
7923
+ var passportStationSchema = passportEventIdSchema.extend({
7924
+ id: string2().optional(),
7925
+ name: string2().trim().min(1).max(100),
7926
+ description: string2().trim().max(1000).nullable(),
7927
+ location: string2().trim().max(200).nullable(),
7928
+ imageKey: string2().nullable(),
7929
+ order: number2().int().min(0),
7930
+ opensAt: date2().nullable(),
7931
+ closesAt: date2().nullable(),
7932
+ collection: passportStationCollectionSchema.optional()
7933
+ });
7934
+ var passportPrizeSchema = passportEventIdSchema.extend({
7935
+ id: string2().optional(),
7936
+ name: string2().trim().min(1).max(100),
7937
+ description: string2().trim().max(1000).nullable(),
7938
+ stock: number2().int().min(0),
7939
+ stampCost: number2().int().min(0).max(PASSPORT_PRIZE_STAMP_COST_MAX).optional(),
7940
+ order: number2().int().min(0)
7941
+ });
7942
+ var redeemPassportPrizeSchema = passportEventIdSchema.extend({
7943
+ participantId: string2().min(1),
7944
+ prizeId: string2().min(1),
7945
+ quantity: number2().int().min(1).max(PASSPORT_REDEMPTION_QUANTITY_MAX).default(1)
7946
+ });
7947
+
7586
7948
  // src/commands/passport.ts
7587
7949
  var flag = (flags, name, required = true) => {
7588
7950
  const value = flags.get(name);
@@ -7596,13 +7958,19 @@ var requiredFlag = (flags, name) => {
7596
7958
  throw new CliUsageError(`--${name} is required.`);
7597
7959
  return value;
7598
7960
  };
7599
- var integer2 = (value, name, minimum = 0) => {
7961
+ var integer2 = (value, name, minimum = 0, maximum = 2147483647) => {
7600
7962
  const parsed = typeof value === "string" && value.trim() !== "" ? Number(value) : value;
7601
- if (typeof parsed !== "number" || !Number.isSafeInteger(parsed) || parsed < minimum || parsed > 2147483647) {
7602
- throw new CliUsageError(`${name} must be a whole number from ${minimum} to 2147483647.`);
7963
+ if (typeof parsed !== "number" || !Number.isSafeInteger(parsed) || parsed < minimum || parsed > maximum) {
7964
+ throw new CliUsageError(`${name} must be a whole number from ${minimum} to ${maximum}.`);
7603
7965
  }
7604
7966
  return parsed;
7605
7967
  };
7968
+ var stationCategory = (value) => {
7969
+ const match = PASSPORT_STATION_CATEGORIES.find((category) => category === value);
7970
+ if (!match)
7971
+ throw new CliUsageError(`category must be ${PASSPORT_STATION_CATEGORIES.join(", ")}.`);
7972
+ return match;
7973
+ };
7606
7974
  var boolean3 = (value, name) => {
7607
7975
  if (value === true || value === "true")
7608
7976
  return true;
@@ -7641,7 +8009,7 @@ var keys = (value, allowed, name) => {
7641
8009
  if (Object.keys(value).some((key) => !allowed.includes(key)))
7642
8010
  throw new CliUsageError(`${name} contains unsupported fields.`);
7643
8011
  };
7644
- var date2 = (value, name) => {
8012
+ var date3 = (value, name) => {
7645
8013
  if (value == null)
7646
8014
  return null;
7647
8015
  if (typeof value !== "string" || !/^\d{4}-\d\d-\d\dT/.test(value))
@@ -7667,17 +8035,49 @@ var parsePassportStationInput = (raw, eventId) => {
7667
8035
  let collection;
7668
8036
  if (value.collection !== undefined) {
7669
8037
  const item = object2(value.collection, "collection");
8038
+ const stampValue = item.stampValue === undefined ? {} : { stampValue: integer2(item.stampValue, "stampValue", 0, 1000) };
8039
+ const category = item.category === undefined ? {} : { category: stationCategory(item.category) };
7670
8040
  if (item.collectionMode === "STAFF_SCORE") {
7671
- keys(item, ["collectionMode", "maxPoints"], "collection");
8041
+ keys(item, ["collectionMode", "maxPoints", "stampValue", "category"], "collection");
7672
8042
  collection = {
7673
8043
  collectionMode: "STAFF_SCORE",
7674
- maxPoints: integer2(item.maxPoints, "maxPoints")
8044
+ maxPoints: integer2(item.maxPoints, "maxPoints"),
8045
+ ...stampValue,
8046
+ ...category
8047
+ };
8048
+ } else if (item.collectionMode === "STAFF_TALLY") {
8049
+ keys(item, [
8050
+ "collectionMode",
8051
+ "tallyItems",
8052
+ "tallyEarnsStamp",
8053
+ "stampValue",
8054
+ "category"
8055
+ ], "collection");
8056
+ if (!Array.isArray(item.tallyItems))
8057
+ throw new CliUsageError("tallyItems must be an array of item names.");
8058
+ if (item.tallyItems.length < 1 || item.tallyItems.length > 30)
8059
+ throw new CliUsageError("tallyItems must have 1 to 30 items.");
8060
+ const tallyItems = item.tallyItems.map((name, index) => text(name, `tallyItems[${index}]`, 60));
8061
+ if (new Set(tallyItems.map((name) => name.toLocaleLowerCase())).size !== tallyItems.length)
8062
+ throw new CliUsageError("tallyItems must be unique ignoring case.");
8063
+ if (item.tallyEarnsStamp !== undefined && typeof item.tallyEarnsStamp !== "boolean")
8064
+ throw new CliUsageError("tallyEarnsStamp must be true or false.");
8065
+ collection = {
8066
+ collectionMode: "STAFF_TALLY",
8067
+ tallyItems,
8068
+ tallyEarnsStamp: item.tallyEarnsStamp === true,
8069
+ ...stampValue,
8070
+ ...category
7675
8071
  };
7676
8072
  } else if (item.collectionMode === "SELF_SCAN" || item.collectionMode === "STAFF_SCAN") {
7677
- keys(item, ["collectionMode"], "collection");
7678
- collection = { collectionMode: item.collectionMode };
8073
+ keys(item, ["collectionMode", "stampValue", "category"], "collection");
8074
+ collection = {
8075
+ collectionMode: item.collectionMode,
8076
+ ...stampValue,
8077
+ ...category
8078
+ };
7679
8079
  } else
7680
- throw new CliUsageError("collectionMode must be SELF_SCAN, STAFF_SCAN or STAFF_SCORE.");
8080
+ throw new CliUsageError("collectionMode must be SELF_SCAN, STAFF_SCAN, STAFF_SCORE or STAFF_TALLY.");
7681
8081
  }
7682
8082
  return {
7683
8083
  eventId,
@@ -7687,8 +8087,8 @@ var parsePassportStationInput = (raw, eventId) => {
7687
8087
  location: nullableText(value.location, "location", 200),
7688
8088
  imageKey: nullableText(value.imageKey, "imageKey", 2048),
7689
8089
  order: integer2(value.order ?? 0, "order"),
7690
- opensAt: date2(value.opensAt, "opensAt"),
7691
- closesAt: date2(value.closesAt, "closesAt"),
8090
+ opensAt: date3(value.opensAt, "opensAt"),
8091
+ closesAt: date3(value.closesAt, "closesAt"),
7692
8092
  ...collection ? { collection } : {}
7693
8093
  };
7694
8094
  };
@@ -7722,7 +8122,7 @@ var parsePassportSettingsInput = (raw, eventId) => {
7722
8122
  eventId,
7723
8123
  luckyDrawStampThreshold: threshold(value.luckyDrawStampThreshold, "luckyDrawStampThreshold"),
7724
8124
  prizeStampThreshold: threshold(value.prizeStampThreshold, "prizeStampThreshold"),
7725
- maxRedemptionsPerParticipant: integer2(value.maxRedemptionsPerParticipant, "maxRedemptionsPerParticipant", 1),
8125
+ maxRedemptionsPerParticipant: integer2(value.maxRedemptionsPerParticipant, "maxRedemptionsPerParticipant", 0),
7726
8126
  linkedDrawEventId: value.linkedDrawEventId === null ? null : text(value.linkedDrawEventId, "linkedDrawEventId", 200),
7727
8127
  ...loginMethods ? { loginMethods } : {}
7728
8128
  };
@@ -7751,6 +8151,18 @@ var runPassportCommand = async (input) => {
7751
8151
  case "mine":
7752
8152
  operation = () => api2.event.passport.getMyPassport.query(event);
7753
8153
  break;
8154
+ case "bingo enable":
8155
+ operation = () => api2.event.passport.enablePassportBingo.mutate(event);
8156
+ break;
8157
+ case "bingo join":
8158
+ operation = () => api2.event.passport.joinPassportBingo.mutate(event);
8159
+ break;
8160
+ case "bingo claim-stamp":
8161
+ operation = () => api2.event.passport.claimPassportBingoStamp.mutate(event);
8162
+ break;
8163
+ case "bingo status":
8164
+ operation = () => api2.event.passport.getMyPassportBingo.query(event);
8165
+ break;
7754
8166
  case "login-options":
7755
8167
  operation = () => api2.event.passport.getPassportLoginOptions.query(event);
7756
8168
  break;
@@ -7861,13 +8273,14 @@ var runPassportCommand = async (input) => {
7861
8273
  case "prize upsert": {
7862
8274
  allowed.push("prize-json");
7863
8275
  const value = json(requiredFlag(flags, "prize-json"), "--prize-json");
7864
- keys(value, ["id", "name", "description", "stock", "order"], "Prize");
8276
+ keys(value, ["id", "name", "description", "stock", "stampCost", "order"], "Prize");
7865
8277
  const payload = {
7866
8278
  eventId,
7867
8279
  ...value.id === undefined ? {} : { id: text(value.id, "id", 200) },
7868
8280
  name: text(value.name, "name", 100),
7869
8281
  description: nullableText(value.description, "description", 1000),
7870
8282
  stock: integer2(value.stock, "stock"),
8283
+ ...value.stampCost === undefined ? {} : { stampCost: integer2(value.stampCost, "stampCost", 0, 1e5) },
7871
8284
  order: integer2(value.order ?? 0, "order")
7872
8285
  };
7873
8286
  operation = () => api2.event.passport.upsertPassportPrize.mutate(payload);
@@ -7881,9 +8294,11 @@ var runPassportCommand = async (input) => {
7881
8294
  break;
7882
8295
  }
7883
8296
  case "redemption create": {
7884
- allowed.push("prize-id", "participant-id");
8297
+ allowed.push("prize-id", "participant-id", "quantity");
8298
+ const quantity = flag(flags, "quantity", false);
7885
8299
  const payload = {
7886
8300
  eventId,
8301
+ ...quantity === undefined ? {} : { quantity: integer2(quantity, "--quantity", 1, 20) },
7887
8302
  prizeId: requiredFlag(flags, "prize-id"),
7888
8303
  participantId: requiredFlag(flags, "participant-id")
7889
8304
  };
@@ -7901,6 +8316,36 @@ var runPassportCommand = async (input) => {
7901
8316
  operation = () => api2.event.passport.reversePassportRedemption.mutate(payload);
7902
8317
  break;
7903
8318
  }
8319
+ case "tally record": {
8320
+ allowed.push("station-id", "profile-code", "item", "quantity");
8321
+ const quantity = flag(flags, "quantity", false);
8322
+ const payload = {
8323
+ ...station(),
8324
+ profileCode: requiredFlag(flags, "profile-code"),
8325
+ item: requiredFlag(flags, "item"),
8326
+ ...quantity === undefined ? {} : { quantity: integer2(quantity, "--quantity", 1, 20) }
8327
+ };
8328
+ operation = () => api2.event.passport.recordPassportTally.mutate(payload);
8329
+ break;
8330
+ }
8331
+ case "tally reverse": {
8332
+ allowed.push("tally-id", "reason");
8333
+ confirm();
8334
+ const payload = {
8335
+ eventId,
8336
+ tallyId: requiredFlag(flags, "tally-id"),
8337
+ reason: requiredFlag(flags, "reason")
8338
+ };
8339
+ operation = () => api2.event.passport.reversePassportTally.mutate(payload);
8340
+ break;
8341
+ }
8342
+ case "tally summary":
8343
+ operation = () => api2.event.passport.getPassportTallySummary.query(event);
8344
+ break;
8345
+ case "tally list":
8346
+ allowed.push("station-id");
8347
+ operation = () => api2.event.passport.getPassportStationTallies.query(station());
8348
+ break;
7904
8349
  default:
7905
8350
  throw new CliUsageError("Unknown passport command. Run et --help for supported commands.");
7906
8351
  }
@@ -7911,133 +8356,3226 @@ var runPassportCommand = async (input) => {
7911
8356
  writeSuccess(input.runtime, await operation());
7912
8357
  };
7913
8358
 
7914
- // src/cli.ts
7915
- var getInstalledCliVersion = () => {
7916
- try {
7917
- const packageJson = JSON.parse(readFileSync(resolve(import.meta.dir, "../package.json"), "utf8"));
7918
- return typeof packageJson.version === "string" ? packageJson.version : "unknown";
7919
- } catch {
7920
- return "unknown";
7921
- }
7922
- };
7923
- var parseJsonObject = (value, name) => {
7924
- let parsed;
7925
- try {
7926
- parsed = JSON.parse(value);
7927
- } catch {
7928
- throw new CliUsageError(`--${name} must be valid JSON.`);
7929
- }
7930
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
7931
- throw new CliUsageError(`--${name} must be a JSON object.`);
7932
- }
7933
- return parsed;
7934
- };
7935
- var parseAppearance = (value) => parseJsonObject(value, "appearance");
7936
- var parseCursor = (value) => {
7937
- const parsed = parseJsonObject(value, "cursor");
7938
- if (typeof parsed.id !== "string" || parsed.id.length === 0) {
7939
- throw new CliUsageError("--cursor.id must be a non-empty string.");
7940
- }
7941
- if (typeof parsed.createdAt !== "string") {
7942
- throw new CliUsageError("--cursor.createdAt must be an ISO date string.");
7943
- }
7944
- const createdAt = new Date(parsed.createdAt);
7945
- if (Number.isNaN(createdAt.getTime())) {
7946
- throw new CliUsageError("--cursor.createdAt must be a valid date.");
7947
- }
7948
- return { createdAt, id: parsed.id };
7949
- };
7950
- var parseRetainedIds = (value) => {
7951
- let parsed;
7952
- try {
7953
- parsed = JSON.parse(value);
7954
- } catch {
7955
- throw new CliUsageError("--retained-ids must be valid JSON.");
7956
- }
7957
- if (!Array.isArray(parsed)) {
7958
- throw new CliUsageError("--retained-ids must be a JSON array.");
7959
- }
7960
- if (parsed.length > 100 || parsed.some((id) => typeof id !== "string" || id.length === 0)) {
7961
- throw new CliUsageError("--retained-ids must contain at most 100 non-empty strings.");
7962
- }
7963
- return parsed;
7964
- };
7965
- var luckyDrawParticipantFields = new Set(["email", "luckyDrawId", "name"]);
7966
- var parseLuckyDrawParticipants = (value) => {
7967
- let parsed;
7968
- try {
7969
- parsed = JSON.parse(value);
7970
- } catch {
7971
- throw new CliUsageError("--participants must be valid JSON.");
7972
- }
7973
- if (!Array.isArray(parsed)) {
7974
- throw new CliUsageError("--participants must be a JSON array.");
7975
- }
7976
- return parsed.map((participant, index) => {
7977
- if (typeof participant !== "object" || participant === null || Array.isArray(participant)) {
7978
- throw new CliUsageError(`--participants[${index}] must be an object.`);
8359
+ // src/registry/command-manifest.json
8360
+ var command_manifest_default = [
8361
+ {
8362
+ path: ["organization", "member", "list"],
8363
+ procedure: "organization.getOrganizationMembersById",
8364
+ operation: "query",
8365
+ summary: "List an organization's members and pending invitations (paged).",
8366
+ effects: [],
8367
+ dates: [],
8368
+ input: {
8369
+ type: "object",
8370
+ properties: {
8371
+ organizationId: {
8372
+ type: "string"
8373
+ },
8374
+ page: {
8375
+ default: 1,
8376
+ type: "integer",
8377
+ exclusiveMinimum: 0,
8378
+ maximum: 9007199254740991
8379
+ },
8380
+ perPage: {
8381
+ default: 10,
8382
+ type: "integer",
8383
+ minimum: 1,
8384
+ maximum: 100
8385
+ },
8386
+ search: {
8387
+ default: "",
8388
+ type: "string"
8389
+ }
8390
+ },
8391
+ required: ["organizationId"]
7979
8392
  }
7980
- if (Object.keys(participant).some((key) => !luckyDrawParticipantFields.has(key))) {
7981
- throw new CliUsageError(`--participants[${index}] contains an unsupported field.`);
8393
+ },
8394
+ {
8395
+ path: ["organization", "member", "list-all"],
8396
+ procedure: "organization.getMembersByOrganization",
8397
+ operation: "query",
8398
+ summary: "List every member of an organization without paging.",
8399
+ effects: [],
8400
+ dates: [],
8401
+ input: {
8402
+ type: "object",
8403
+ properties: {
8404
+ organizationId: {
8405
+ type: "string"
8406
+ }
8407
+ },
8408
+ required: ["organizationId"]
7982
8409
  }
7983
- const luckyDrawId = "luckyDrawId" in participant ? participant.luckyDrawId : undefined;
7984
- const name = "name" in participant ? participant.name : undefined;
7985
- const email = "email" in participant ? participant.email : undefined;
7986
- if (typeof luckyDrawId !== "string") {
7987
- throw new CliUsageError(`--participants[${index}].luckyDrawId must be a string.`);
8410
+ },
8411
+ {
8412
+ path: ["organization", "member", "invite"],
8413
+ procedure: "organization.createOrganizationMember",
8414
+ operation: "mutation",
8415
+ summary: "Invite a member to an organization and email the invitation.",
8416
+ effects: ["state-change", "email"],
8417
+ target: "email",
8418
+ dates: [],
8419
+ input: {
8420
+ type: "object",
8421
+ properties: {
8422
+ email: {
8423
+ type: "string",
8424
+ format: "email",
8425
+ pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
8426
+ },
8427
+ organizationId: {
8428
+ type: "string",
8429
+ minLength: 1
8430
+ },
8431
+ organizationRole: {
8432
+ default: "MEMBER",
8433
+ type: "string",
8434
+ enum: ["OWNER", "ADMIN", "MEMBER"]
8435
+ }
8436
+ },
8437
+ required: ["email", "organizationId"]
7988
8438
  }
7989
- if (name !== undefined && typeof name !== "string") {
7990
- throw new CliUsageError(`--participants[${index}].name must be a string.`);
8439
+ },
8440
+ {
8441
+ path: ["organization", "member", "remove"],
8442
+ procedure: "organization.deleteOrganizationMember",
8443
+ operation: "mutation",
8444
+ summary: "Remove a member (or leave with isLeaving) and revoke their event access.",
8445
+ effects: ["state-change"],
8446
+ target: "memberId",
8447
+ dates: [],
8448
+ input: {
8449
+ type: "object",
8450
+ properties: {
8451
+ organizationId: {
8452
+ type: "string",
8453
+ minLength: 1
8454
+ },
8455
+ memberId: {
8456
+ type: "string",
8457
+ minLength: 1
8458
+ },
8459
+ isLeaving: {
8460
+ default: false,
8461
+ type: "boolean"
8462
+ }
8463
+ },
8464
+ required: ["organizationId", "memberId"]
7991
8465
  }
7992
- if (email !== undefined && email !== null && typeof email !== "string") {
7993
- throw new CliUsageError(`--participants[${index}].email must be a string or null.`);
8466
+ },
8467
+ {
8468
+ path: ["organization", "member", "role-update"],
8469
+ procedure: "organization.updateOrganizationMemberRole",
8470
+ operation: "mutation",
8471
+ summary: "Change an organization member's role.",
8472
+ effects: ["state-change"],
8473
+ target: "memberId",
8474
+ dates: [],
8475
+ input: {
8476
+ type: "object",
8477
+ properties: {
8478
+ organizationId: {
8479
+ type: "string",
8480
+ minLength: 1
8481
+ },
8482
+ memberId: {
8483
+ type: "string",
8484
+ minLength: 1
8485
+ },
8486
+ newRole: {
8487
+ type: "string",
8488
+ enum: ["OWNER", "ADMIN", "MEMBER"]
8489
+ }
8490
+ },
8491
+ required: ["organizationId", "memberId", "newRole"]
7994
8492
  }
7995
- return {
7996
- luckyDrawId,
7997
- ...name === undefined ? {} : { name },
7998
- ...email === undefined ? {} : { email }
7999
- };
8000
- });
8001
- };
8002
- var parseAppearanceMediaType = (value) => {
8003
- if (value === "image" || value === "video")
8004
- return value;
8005
- throw new CliUsageError("--media-type must be one of: image, video.");
8006
- };
8007
- var eventStatuses = ["DRAFT", "ONGOING", "COMPLETED", "ALL"];
8008
- var archiveStatuses = ["active", "archived", "all"];
8009
- var parseEventListStatus = (value) => {
8010
- if (!eventStatuses.some((status) => status === value)) {
8011
- throw new CliUsageError(`--status must be one of: ${eventStatuses.join(", ")}.`);
8012
- }
8013
- return value;
8014
- };
8015
- var parseArchiveStatus = (value) => {
8016
- if (!archiveStatuses.some((status) => status === value)) {
8017
- throw new CliUsageError(`--archive-status must be one of: ${archiveStatuses.join(", ")}.`);
8018
- }
8019
- return value;
8020
- };
8021
- var parseCreatableEventType = (value) => {
8022
- const result = activeEventTypeSchema.safeParse(value);
8023
- if (!result.success) {
8024
- throw new CliUsageError(`--type must be one of: ${activeEventTypeSchema.options.join(", ")}.`);
8025
- }
8026
- return result.data;
8027
- };
8028
- var parseEventTypeList = (value) => {
8029
- const types = value.split(",").map((type) => type.trim());
8030
- return [...new Set(types)].map((type) => {
8031
- const result = activeEventTypeSchema.safeParse(type);
8032
- if (!result.success) {
8033
- throw new CliUsageError(`--allowed-event-types entries must be one of: ${activeEventTypeSchema.options.join(", ")}.`);
8493
+ },
8494
+ {
8495
+ path: ["organization", "owner", "transfer"],
8496
+ procedure: "organization.transferOwnership",
8497
+ operation: "mutation",
8498
+ summary: "Transfer organization ownership to another active member.",
8499
+ effects: ["state-change"],
8500
+ target: "memberId",
8501
+ dates: [],
8502
+ input: {
8503
+ type: "object",
8504
+ properties: {
8505
+ organizationId: {
8506
+ type: "string",
8507
+ minLength: 1
8508
+ },
8509
+ memberId: {
8510
+ type: "string",
8511
+ minLength: 1
8512
+ }
8513
+ },
8514
+ required: ["organizationId", "memberId"]
8034
8515
  }
8035
- return result.data;
8036
- });
8037
- };
8038
- var parseIsoDateTime = (value, name) => {
8039
- if (!/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value)) {
8040
- throw new CliUsageError(`--${name} must be an ISO 8601 date-time such as 2026-11-20T18:00:00+08:00.`);
8516
+ },
8517
+ {
8518
+ path: ["organization", "invitation", "get"],
8519
+ procedure: "organization.getInvitation",
8520
+ operation: "query",
8521
+ summary: "Get one event or organization access invitation by ID.",
8522
+ effects: [],
8523
+ dates: [],
8524
+ input: {
8525
+ type: "object",
8526
+ properties: {
8527
+ invitationId: {
8528
+ type: "string",
8529
+ minLength: 1
8530
+ }
8531
+ },
8532
+ required: ["invitationId"]
8533
+ }
8534
+ },
8535
+ {
8536
+ path: ["organization", "invitation", "list-mine"],
8537
+ procedure: "organization.getInvitedMemberships",
8538
+ operation: "query",
8539
+ summary: "List organization invitations addressed to the current user.",
8540
+ effects: [],
8541
+ dates: [],
8542
+ input: null
8543
+ },
8544
+ {
8545
+ path: ["organization", "invitation", "organization"],
8546
+ procedure: "organization.getInvitedOrganizationById",
8547
+ operation: "query",
8548
+ summary: "Get the organization behind an invitation addressed to the current user.",
8549
+ effects: [],
8550
+ dates: [],
8551
+ input: {
8552
+ type: "object",
8553
+ properties: {
8554
+ organizationId: {
8555
+ type: "string"
8556
+ }
8557
+ },
8558
+ required: ["organizationId"]
8559
+ }
8560
+ },
8561
+ {
8562
+ path: ["organization", "invitation", "accept"],
8563
+ procedure: "organization.acceptInvitation",
8564
+ operation: "mutation",
8565
+ summary: "Accept the current user's invitation to an organization.",
8566
+ effects: ["state-change"],
8567
+ target: "organizationId",
8568
+ dates: [],
8569
+ input: {
8570
+ type: "object",
8571
+ properties: {
8572
+ organizationId: {
8573
+ type: "string"
8574
+ }
8575
+ },
8576
+ required: ["organizationId"]
8577
+ }
8578
+ },
8579
+ {
8580
+ path: ["organization", "invitation", "reject"],
8581
+ procedure: "organization.rejectInvitation",
8582
+ operation: "mutation",
8583
+ summary: "Reject the current user's invitation to an organization.",
8584
+ effects: ["state-change"],
8585
+ target: "organizationId",
8586
+ dates: [],
8587
+ input: {
8588
+ type: "object",
8589
+ properties: {
8590
+ organizationId: {
8591
+ type: "string"
8592
+ }
8593
+ },
8594
+ required: ["organizationId"]
8595
+ }
8596
+ },
8597
+ {
8598
+ path: ["organization", "invitation", "accept-access"],
8599
+ procedure: "organization.acceptAccessInvitation",
8600
+ operation: "mutation",
8601
+ summary: "Accept an access invitation (organization or event staff) by invitation ID.",
8602
+ effects: ["state-change"],
8603
+ target: "invitationId",
8604
+ dates: [],
8605
+ input: {
8606
+ type: "object",
8607
+ properties: {
8608
+ invitationId: {
8609
+ type: "string",
8610
+ minLength: 1
8611
+ }
8612
+ },
8613
+ required: ["invitationId"]
8614
+ }
8615
+ },
8616
+ {
8617
+ path: ["organization", "invitation", "reject-access"],
8618
+ procedure: "organization.rejectAccessInvitation",
8619
+ operation: "mutation",
8620
+ summary: "Reject an access invitation by invitation ID.",
8621
+ effects: ["state-change"],
8622
+ target: "invitationId",
8623
+ dates: [],
8624
+ input: {
8625
+ type: "object",
8626
+ properties: {
8627
+ invitationId: {
8628
+ type: "string",
8629
+ minLength: 1
8630
+ }
8631
+ },
8632
+ required: ["invitationId"]
8633
+ }
8634
+ },
8635
+ {
8636
+ path: ["organization", "invitation", "cancel"],
8637
+ procedure: "organization.cancelInvitation",
8638
+ operation: "mutation",
8639
+ summary: "Cancel a pending organization invitation.",
8640
+ effects: ["state-change"],
8641
+ target: "invitationId",
8642
+ dates: [],
8643
+ input: {
8644
+ type: "object",
8645
+ properties: {
8646
+ organizationId: {
8647
+ type: "string",
8648
+ minLength: 1
8649
+ },
8650
+ invitationId: {
8651
+ type: "string",
8652
+ minLength: 1
8653
+ }
8654
+ },
8655
+ required: ["organizationId", "invitationId"]
8656
+ }
8657
+ },
8658
+ {
8659
+ path: ["organization", "invitation", "resend"],
8660
+ procedure: "organization.resendInvitation",
8661
+ operation: "mutation",
8662
+ summary: "Resend a pending organization invitation email.",
8663
+ effects: ["state-change", "email"],
8664
+ target: "invitationId",
8665
+ dates: [],
8666
+ input: {
8667
+ type: "object",
8668
+ properties: {
8669
+ organizationId: {
8670
+ type: "string",
8671
+ minLength: 1
8672
+ },
8673
+ invitationId: {
8674
+ type: "string",
8675
+ minLength: 1
8676
+ }
8677
+ },
8678
+ required: ["organizationId", "invitationId"]
8679
+ }
8680
+ },
8681
+ {
8682
+ path: ["organization", "update"],
8683
+ procedure: "organization.updateOrganizationById",
8684
+ operation: "mutation",
8685
+ summary: "Update organization details. name is required; omitted optional fields are unchanged.",
8686
+ effects: ["state-change"],
8687
+ target: "organizationId",
8688
+ dates: [],
8689
+ input: {
8690
+ type: "object",
8691
+ properties: {
8692
+ organizationId: {
8693
+ type: "string",
8694
+ minLength: 1
8695
+ },
8696
+ name: {
8697
+ type: "string",
8698
+ minLength: 1
8699
+ },
8700
+ slug: {
8701
+ type: "string"
8702
+ },
8703
+ description: {
8704
+ type: "string"
8705
+ },
8706
+ website: {
8707
+ anyOf: [
8708
+ {
8709
+ type: "string",
8710
+ format: "uri"
8711
+ },
8712
+ {
8713
+ type: "string",
8714
+ const: ""
8715
+ }
8716
+ ]
8717
+ },
8718
+ email: {
8719
+ anyOf: [
8720
+ {
8721
+ type: "string",
8722
+ format: "email",
8723
+ pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
8724
+ },
8725
+ {
8726
+ type: "string",
8727
+ const: ""
8728
+ }
8729
+ ]
8730
+ },
8731
+ allowedEventTypes: {
8732
+ type: "array",
8733
+ items: {
8734
+ type: "string",
8735
+ enum: [
8736
+ "POST_IT_NOTE",
8737
+ "PHOTO_WALL",
8738
+ "STORY_COLLECTION",
8739
+ "LUCKY_DRAW",
8740
+ "SCAVENGER_HUNT",
8741
+ "HUMAN_BINGO",
8742
+ "SIGNATURE_WALL",
8743
+ "GARDENS_BY_THE_BAY",
8744
+ "RATING_SYSTEM",
8745
+ "EVENT_PASSPORT"
8746
+ ]
8747
+ }
8748
+ },
8749
+ image: {
8750
+ type: ["string", "null"]
8751
+ }
8752
+ },
8753
+ required: ["organizationId", "name"]
8754
+ }
8755
+ },
8756
+ {
8757
+ path: ["organization", "image", "update"],
8758
+ procedure: "organization.updateOrganizationImageById",
8759
+ operation: "mutation",
8760
+ summary: "Set the organization image to an uploaded key (see et upload, folder organization-images).",
8761
+ effects: ["state-change"],
8762
+ target: "organizationId",
8763
+ dates: [],
8764
+ input: {
8765
+ type: "object",
8766
+ properties: {
8767
+ organizationId: {
8768
+ type: "string"
8769
+ },
8770
+ image: {
8771
+ type: ["string", "null"]
8772
+ }
8773
+ },
8774
+ required: ["organizationId", "image"]
8775
+ }
8776
+ },
8777
+ {
8778
+ path: ["organization", "archive"],
8779
+ procedure: "organization.archiveOrganization",
8780
+ operation: "mutation",
8781
+ summary: "Archive an organization as its owner.",
8782
+ effects: ["state-change"],
8783
+ target: "organizationId",
8784
+ dates: [],
8785
+ input: {
8786
+ type: "object",
8787
+ properties: {
8788
+ organizationId: {
8789
+ type: "string"
8790
+ }
8791
+ },
8792
+ required: ["organizationId"]
8793
+ }
8794
+ },
8795
+ {
8796
+ path: ["organization", "access", "check"],
8797
+ procedure: "organization.checkOrganizationAccess",
8798
+ operation: "query",
8799
+ summary: "Check the current user's access to an organization.",
8800
+ effects: [],
8801
+ dates: [],
8802
+ input: {
8803
+ type: "object",
8804
+ properties: {
8805
+ organizationId: {
8806
+ type: "string"
8807
+ }
8808
+ },
8809
+ required: ["organizationId"]
8810
+ }
8811
+ },
8812
+ {
8813
+ path: ["organization", "dashboard"],
8814
+ procedure: "organization.getOrganizationDashboardStats",
8815
+ operation: "query",
8816
+ summary: "Get an organization's dashboard totals.",
8817
+ effects: [],
8818
+ dates: [],
8819
+ input: {
8820
+ type: "object",
8821
+ properties: {
8822
+ organizationId: {
8823
+ type: "string"
8824
+ }
8825
+ },
8826
+ required: ["organizationId"]
8827
+ }
8828
+ },
8829
+ {
8830
+ path: ["organization", "analytics"],
8831
+ procedure: "organization.getOrganizationEventAnalytics",
8832
+ operation: "query",
8833
+ summary: "Get per-event analytics for an organization.",
8834
+ effects: [],
8835
+ dates: [],
8836
+ input: {
8837
+ type: "object",
8838
+ properties: {
8839
+ organizationId: {
8840
+ type: "string"
8841
+ }
8842
+ },
8843
+ required: ["organizationId"]
8844
+ }
8845
+ },
8846
+ {
8847
+ path: ["organization", "event-types"],
8848
+ procedure: "organization.getAllowedEventTypeByOrganizationId",
8849
+ operation: "query",
8850
+ summary: "List the event types an organization may create.",
8851
+ effects: [],
8852
+ dates: [],
8853
+ input: {
8854
+ type: "object",
8855
+ properties: {
8856
+ organizationId: {
8857
+ type: "string"
8858
+ }
8859
+ },
8860
+ required: ["organizationId"]
8861
+ }
8862
+ },
8863
+ {
8864
+ path: ["organization", "onboarding"],
8865
+ procedure: "organization.getOnboardingState",
8866
+ operation: "query",
8867
+ summary: "Get the current user's onboarding state.",
8868
+ effects: [],
8869
+ dates: [],
8870
+ input: null
8871
+ },
8872
+ {
8873
+ path: ["admin", "organization", "list"],
8874
+ procedure: "admin.organization.getOrganizations",
8875
+ operation: "query",
8876
+ summary: "List every organization (paged, searchable) as a global admin.",
8877
+ effects: [],
8878
+ dates: [],
8879
+ input: {
8880
+ type: "object",
8881
+ properties: {
8882
+ archiveStatus: {
8883
+ default: "active",
8884
+ type: "string",
8885
+ enum: ["active", "archived", "all"]
8886
+ },
8887
+ page: {
8888
+ default: 1,
8889
+ type: "number",
8890
+ minimum: 1
8891
+ },
8892
+ perPage: {
8893
+ default: 6,
8894
+ type: "number",
8895
+ minimum: 1,
8896
+ maximum: 100
8897
+ },
8898
+ search: {
8899
+ default: "",
8900
+ type: "string"
8901
+ }
8902
+ }
8903
+ }
8904
+ },
8905
+ {
8906
+ path: ["admin", "organization", "get"],
8907
+ procedure: "admin.organization.getOrganization",
8908
+ operation: "query",
8909
+ summary: "Get any organization by ID as a global admin.",
8910
+ effects: [],
8911
+ dates: [],
8912
+ input: {
8913
+ type: "object",
8914
+ properties: {
8915
+ id: {
8916
+ type: "string"
8917
+ }
8918
+ },
8919
+ required: ["id"]
8920
+ }
8921
+ },
8922
+ {
8923
+ path: ["admin", "organization", "members"],
8924
+ procedure: "admin.organization.getOrganizationMembers",
8925
+ operation: "query",
8926
+ summary: "List an organization's members as a global admin.",
8927
+ effects: [],
8928
+ dates: [],
8929
+ input: {
8930
+ type: "object",
8931
+ properties: {
8932
+ organizationId: {
8933
+ type: "string"
8934
+ },
8935
+ search: {
8936
+ default: "",
8937
+ type: "string"
8938
+ },
8939
+ role: {
8940
+ default: "ALL",
8941
+ type: "string",
8942
+ enum: ["ALL", "ADMIN", "MEMBER"]
8943
+ },
8944
+ status: {
8945
+ default: "ALL",
8946
+ type: "string",
8947
+ enum: ["ALL", "PENDING", "ACTIVE", "LEFT", "REMOVED", "REJECTED"]
8948
+ }
8949
+ },
8950
+ required: ["organizationId"]
8951
+ }
8952
+ },
8953
+ {
8954
+ path: ["admin", "organization", "stats"],
8955
+ procedure: "organization.getOrganizationStats",
8956
+ operation: "query",
8957
+ summary: "Get platform-wide organization totals as a global admin.",
8958
+ effects: [],
8959
+ dates: [],
8960
+ input: null
8961
+ },
8962
+ {
8963
+ path: ["admin", "organization", "archive"],
8964
+ procedure: "admin.organization.archiveOrganization",
8965
+ operation: "mutation",
8966
+ summary: "Archive any organization as a global admin.",
8967
+ effects: ["state-change"],
8968
+ target: "id",
8969
+ dates: [],
8970
+ input: {
8971
+ type: "object",
8972
+ properties: {
8973
+ id: {
8974
+ type: "string"
8975
+ }
8976
+ },
8977
+ required: ["id"]
8978
+ }
8979
+ },
8980
+ {
8981
+ path: ["admin", "organization", "restore"],
8982
+ procedure: "admin.organization.restoreOrganization",
8983
+ operation: "mutation",
8984
+ summary: "Restore an archived organization as a global admin.",
8985
+ effects: ["state-change"],
8986
+ target: "id",
8987
+ dates: [],
8988
+ input: {
8989
+ type: "object",
8990
+ properties: {
8991
+ id: {
8992
+ type: "string"
8993
+ }
8994
+ },
8995
+ required: ["id"]
8996
+ }
8997
+ },
8998
+ {
8999
+ path: ["admin", "event", "list"],
9000
+ procedure: "admin.event.getEvents",
9001
+ operation: "query",
9002
+ summary: "List an organization's events as a global admin.",
9003
+ effects: [],
9004
+ dates: [],
9005
+ input: {
9006
+ type: "object",
9007
+ properties: {
9008
+ organizationId: {
9009
+ type: "string"
9010
+ },
9011
+ archiveStatus: {
9012
+ default: "active",
9013
+ type: "string",
9014
+ enum: ["active", "archived", "all"]
9015
+ },
9016
+ limit: {
9017
+ default: 50,
9018
+ type: "number",
9019
+ minimum: 1,
9020
+ maximum: 100
9021
+ },
9022
+ offset: {
9023
+ default: 0,
9024
+ type: "number",
9025
+ minimum: 0
9026
+ }
9027
+ },
9028
+ required: ["organizationId"]
9029
+ }
9030
+ },
9031
+ {
9032
+ path: ["admin", "event", "get"],
9033
+ procedure: "admin.event.getEvent",
9034
+ operation: "query",
9035
+ summary: "Get any event by ID as a global admin.",
9036
+ effects: [],
9037
+ dates: [],
9038
+ input: {
9039
+ type: "object",
9040
+ properties: {
9041
+ id: {
9042
+ type: "string"
9043
+ }
9044
+ },
9045
+ required: ["id"]
9046
+ }
9047
+ },
9048
+ {
9049
+ path: ["admin", "member", "list"],
9050
+ procedure: "admin.member.getAllMembers",
9051
+ operation: "query",
9052
+ summary: "List organization members across every organization as a global admin.",
9053
+ effects: [],
9054
+ dates: [],
9055
+ input: null
9056
+ },
9057
+ {
9058
+ path: ["admin", "member", "role-update"],
9059
+ procedure: "admin.member.updateMemberRole",
9060
+ operation: "mutation",
9061
+ summary: "Change any organization member's role as a global admin.",
9062
+ effects: ["state-change"],
9063
+ target: "memberId",
9064
+ dates: [],
9065
+ input: {
9066
+ type: "object",
9067
+ properties: {
9068
+ organizationId: {
9069
+ type: "string",
9070
+ minLength: 1
9071
+ },
9072
+ memberId: {
9073
+ type: "string",
9074
+ minLength: 1
9075
+ },
9076
+ newRole: {
9077
+ type: "string",
9078
+ enum: ["OWNER", "ADMIN", "MEMBER"]
9079
+ }
9080
+ },
9081
+ required: ["organizationId", "memberId", "newRole"]
9082
+ }
9083
+ },
9084
+ {
9085
+ path: ["admin", "member", "remove"],
9086
+ procedure: "admin.member.removeMember",
9087
+ operation: "mutation",
9088
+ summary: "Remove a member from an organization and delete their allowed-email entries.",
9089
+ effects: ["state-change", "delete"],
9090
+ target: "memberId",
9091
+ dates: [],
9092
+ input: {
9093
+ type: "object",
9094
+ properties: {
9095
+ organizationId: {
9096
+ type: "string",
9097
+ minLength: 1
9098
+ },
9099
+ memberId: {
9100
+ type: "string",
9101
+ minLength: 1
9102
+ }
9103
+ },
9104
+ required: ["organizationId", "memberId"]
9105
+ }
9106
+ },
9107
+ {
9108
+ path: ["admin", "activity", "list"],
9109
+ procedure: "admin.activity.getAll",
9110
+ operation: "query",
9111
+ summary: "List platform activity as a global admin.",
9112
+ effects: [],
9113
+ dates: [],
9114
+ input: null
9115
+ },
9116
+ {
9117
+ path: ["admin", "dashboard", "event-analytics"],
9118
+ procedure: "admin.dashboard.getEventAnalytics",
9119
+ operation: "query",
9120
+ summary: "Get platform event analytics as a global admin.",
9121
+ effects: [],
9122
+ dates: [],
9123
+ input: null
9124
+ },
9125
+ {
9126
+ path: ["admin", "user", "list"],
9127
+ procedure: "admin.user.getUsers",
9128
+ operation: "query",
9129
+ summary: "List users as a global admin.",
9130
+ effects: [],
9131
+ dates: [],
9132
+ input: null
9133
+ },
9134
+ {
9135
+ path: ["admin", "user", "get"],
9136
+ procedure: "admin.user.getUserById",
9137
+ operation: "query",
9138
+ summary: "Get one user as a global admin.",
9139
+ effects: [],
9140
+ dates: [],
9141
+ input: {
9142
+ type: "object",
9143
+ properties: {
9144
+ userId: {
9145
+ type: "string",
9146
+ minLength: 1
9147
+ }
9148
+ },
9149
+ required: ["userId"]
9150
+ }
9151
+ },
9152
+ {
9153
+ path: ["admin", "user", "role-update"],
9154
+ procedure: "admin.user.updateSystemRole",
9155
+ operation: "mutation",
9156
+ summary: "Change a user's system role (ADMIN, USER, GUEST).",
9157
+ effects: ["state-change"],
9158
+ target: "userId",
9159
+ dates: [],
9160
+ input: {
9161
+ type: "object",
9162
+ properties: {
9163
+ role: {
9164
+ type: "string",
9165
+ enum: ["ADMIN", "USER", "GUEST"]
9166
+ },
9167
+ userId: {
9168
+ type: "string",
9169
+ minLength: 1
9170
+ }
9171
+ },
9172
+ required: ["role", "userId"]
9173
+ }
9174
+ },
9175
+ {
9176
+ path: ["event", "access", "mine"],
9177
+ procedure: "access.getMyEventAccess",
9178
+ operation: "query",
9179
+ summary: "Show the current user's role and permissions for an event.",
9180
+ effects: [],
9181
+ dates: [],
9182
+ input: {
9183
+ type: "object",
9184
+ properties: {
9185
+ eventId: {
9186
+ type: "string",
9187
+ minLength: 1
9188
+ },
9189
+ organizationId: {
9190
+ type: "string",
9191
+ minLength: 1
9192
+ },
9193
+ allowArchived: {
9194
+ type: "boolean"
9195
+ }
9196
+ },
9197
+ required: ["eventId", "organizationId"]
9198
+ }
9199
+ },
9200
+ {
9201
+ path: ["event", "access", "list"],
9202
+ procedure: "access.listEventAssignments",
9203
+ operation: "query",
9204
+ summary: "List event staff assignments and pending staff invitations.",
9205
+ effects: [],
9206
+ dates: [],
9207
+ input: {
9208
+ type: "object",
9209
+ properties: {
9210
+ eventId: {
9211
+ type: "string",
9212
+ minLength: 1
9213
+ },
9214
+ organizationId: {
9215
+ type: "string",
9216
+ minLength: 1
9217
+ }
9218
+ },
9219
+ required: ["eventId", "organizationId"]
9220
+ }
9221
+ },
9222
+ {
9223
+ path: ["event", "access", "invite"],
9224
+ procedure: "access.inviteEventStaff",
9225
+ operation: "mutation",
9226
+ summary: "Invite event staff by email. startsAt/expiresAt are ISO date-times or null.",
9227
+ effects: ["state-change", "email"],
9228
+ target: "email",
9229
+ dates: ["expiresAt", "startsAt"],
9230
+ input: {
9231
+ type: "object",
9232
+ properties: {
9233
+ eventId: {
9234
+ type: "string",
9235
+ minLength: 1
9236
+ },
9237
+ organizationId: {
9238
+ type: "string",
9239
+ minLength: 1
9240
+ },
9241
+ canExport: {
9242
+ default: false,
9243
+ type: "boolean"
9244
+ },
9245
+ email: {
9246
+ type: "string"
9247
+ },
9248
+ expiresAt: {
9249
+ anyOf: [
9250
+ {
9251
+ type: "string",
9252
+ format: "date-time"
9253
+ },
9254
+ {
9255
+ type: "null"
9256
+ }
9257
+ ]
9258
+ },
9259
+ role: {
9260
+ type: "string",
9261
+ enum: ["MANAGER", "OPERATOR", "VIEWER"]
9262
+ },
9263
+ startsAt: {
9264
+ anyOf: [
9265
+ {
9266
+ type: "string",
9267
+ format: "date-time"
9268
+ },
9269
+ {
9270
+ type: "null"
9271
+ }
9272
+ ]
9273
+ }
9274
+ },
9275
+ required: ["eventId", "organizationId", "email", "role"]
9276
+ }
9277
+ },
9278
+ {
9279
+ path: ["event", "access", "invitation-resend"],
9280
+ procedure: "access.resendEventStaffInvitation",
9281
+ operation: "mutation",
9282
+ summary: "Resend a pending event staff invitation email.",
9283
+ effects: ["state-change", "email"],
9284
+ target: "invitationId",
9285
+ dates: [],
9286
+ input: {
9287
+ type: "object",
9288
+ properties: {
9289
+ eventId: {
9290
+ type: "string",
9291
+ minLength: 1
9292
+ },
9293
+ organizationId: {
9294
+ type: "string",
9295
+ minLength: 1
9296
+ },
9297
+ invitationId: {
9298
+ type: "string",
9299
+ minLength: 1
9300
+ }
9301
+ },
9302
+ required: ["eventId", "organizationId", "invitationId"]
9303
+ }
9304
+ },
9305
+ {
9306
+ path: ["event", "access", "invitation-revoke"],
9307
+ procedure: "access.revokeEventStaffInvitation",
9308
+ operation: "mutation",
9309
+ summary: "Revoke a pending event staff invitation.",
9310
+ effects: ["state-change"],
9311
+ target: "invitationId",
9312
+ dates: [],
9313
+ input: {
9314
+ type: "object",
9315
+ properties: {
9316
+ eventId: {
9317
+ type: "string",
9318
+ minLength: 1
9319
+ },
9320
+ organizationId: {
9321
+ type: "string",
9322
+ minLength: 1
9323
+ },
9324
+ invitationId: {
9325
+ type: "string",
9326
+ minLength: 1
9327
+ }
9328
+ },
9329
+ required: ["eventId", "organizationId", "invitationId"]
9330
+ }
9331
+ },
9332
+ {
9333
+ path: ["event", "access", "assign"],
9334
+ procedure: "access.upsertEventAssignment",
9335
+ operation: "mutation",
9336
+ summary: "Create or update an existing user's event staff assignment.",
9337
+ effects: ["state-change"],
9338
+ target: "userId",
9339
+ dates: ["expiresAt", "startsAt"],
9340
+ input: {
9341
+ type: "object",
9342
+ properties: {
9343
+ eventId: {
9344
+ type: "string",
9345
+ minLength: 1
9346
+ },
9347
+ organizationId: {
9348
+ type: "string",
9349
+ minLength: 1
9350
+ },
9351
+ canExport: {
9352
+ default: false,
9353
+ type: "boolean"
9354
+ },
9355
+ expiresAt: {
9356
+ anyOf: [
9357
+ {
9358
+ type: "string",
9359
+ format: "date-time"
9360
+ },
9361
+ {
9362
+ type: "null"
9363
+ }
9364
+ ]
9365
+ },
9366
+ role: {
9367
+ type: "string",
9368
+ enum: ["MANAGER", "OPERATOR", "VIEWER"]
9369
+ },
9370
+ startsAt: {
9371
+ anyOf: [
9372
+ {
9373
+ type: "string",
9374
+ format: "date-time"
9375
+ },
9376
+ {
9377
+ type: "null"
9378
+ }
9379
+ ]
9380
+ },
9381
+ userId: {
9382
+ type: "string",
9383
+ minLength: 1
9384
+ }
9385
+ },
9386
+ required: ["eventId", "organizationId", "role", "userId"]
9387
+ }
9388
+ },
9389
+ {
9390
+ path: ["event", "access", "revoke"],
9391
+ procedure: "access.revokeEventAssignment",
9392
+ operation: "mutation",
9393
+ summary: "Revoke a user's event staff assignment.",
9394
+ effects: ["state-change"],
9395
+ target: "userId",
9396
+ dates: [],
9397
+ input: {
9398
+ type: "object",
9399
+ properties: {
9400
+ eventId: {
9401
+ type: "string",
9402
+ minLength: 1
9403
+ },
9404
+ organizationId: {
9405
+ type: "string",
9406
+ minLength: 1
9407
+ },
9408
+ userId: {
9409
+ type: "string",
9410
+ minLength: 1
9411
+ }
9412
+ },
9413
+ required: ["eventId", "organizationId", "userId"]
9414
+ }
9415
+ },
9416
+ {
9417
+ path: ["activity", "list"],
9418
+ procedure: "activity.getByResource",
9419
+ operation: "query",
9420
+ summary: "List the activity log for an organization, event or other resource (cursor paged).",
9421
+ effects: [],
9422
+ dates: ["startAt", "endAt"],
9423
+ input: {
9424
+ type: "object",
9425
+ properties: {
9426
+ organizationId: {
9427
+ type: "string"
9428
+ },
9429
+ resourceType: {
9430
+ type: "string",
9431
+ minLength: 1
9432
+ },
9433
+ resourceId: {
9434
+ type: "string",
9435
+ minLength: 1
9436
+ },
9437
+ eventId: {
9438
+ type: "string"
9439
+ },
9440
+ includeEventChildren: {
9441
+ default: false,
9442
+ type: "boolean"
9443
+ },
9444
+ eventCategory: {
9445
+ type: "string",
9446
+ enum: [
9447
+ "ORGANIZATION",
9448
+ "MEMBER",
9449
+ "EVENT",
9450
+ "CONFIG",
9451
+ "SUBMISSION",
9452
+ "PARTICIPANT",
9453
+ "EXPORT",
9454
+ "SYSTEM"
9455
+ ]
9456
+ },
9457
+ actorUserId: {
9458
+ type: "string"
9459
+ },
9460
+ startAt: {
9461
+ type: "string",
9462
+ format: "date-time"
9463
+ },
9464
+ endAt: {
9465
+ type: "string",
9466
+ format: "date-time"
9467
+ },
9468
+ cursor: {
9469
+ type: "string"
9470
+ },
9471
+ limit: {
9472
+ default: 25,
9473
+ type: "number",
9474
+ minimum: 1,
9475
+ maximum: 50
9476
+ }
9477
+ },
9478
+ required: ["organizationId", "resourceType", "resourceId"]
9479
+ }
9480
+ },
9481
+ {
9482
+ path: ["event", "recent"],
9483
+ procedure: "event.getRecentEvents",
9484
+ operation: "query",
9485
+ summary: "List the events the current user opened most recently.",
9486
+ effects: [],
9487
+ dates: [],
9488
+ input: null
9489
+ },
9490
+ {
9491
+ path: ["event", "details"],
9492
+ procedure: "event.getEventById",
9493
+ operation: "query",
9494
+ summary: "Get an event's full details (description, tags, background, dates).",
9495
+ effects: [],
9496
+ dates: [],
9497
+ input: {
9498
+ type: "object",
9499
+ properties: {
9500
+ eventId: {
9501
+ type: "string",
9502
+ minLength: 1
9503
+ }
9504
+ },
9505
+ required: ["eventId"]
9506
+ }
9507
+ },
9508
+ {
9509
+ path: ["event", "update"],
9510
+ procedure: "event.updateEvent",
9511
+ operation: "mutation",
9512
+ summary: "Replace an event's details. Send every field from event details; dates are ISO.",
9513
+ effects: ["state-change"],
9514
+ target: "id",
9515
+ dates: ["eventDateRange.from", "eventDateRange.to"],
9516
+ input: {
9517
+ type: "object",
9518
+ properties: {
9519
+ organizationId: {
9520
+ type: "string",
9521
+ minLength: 1
9522
+ },
9523
+ name: {
9524
+ type: "string",
9525
+ minLength: 1,
9526
+ maxLength: 100
9527
+ },
9528
+ type: {
9529
+ type: "string",
9530
+ enum: [
9531
+ "POST_IT_NOTE",
9532
+ "PHOTO_WALL",
9533
+ "STORY_COLLECTION",
9534
+ "LUCKY_DRAW",
9535
+ "SCAVENGER_HUNT",
9536
+ "HUMAN_BINGO",
9537
+ "SIGNATURE_WALL",
9538
+ "GARDENS_BY_THE_BAY",
9539
+ "RATING_SYSTEM",
9540
+ "EVENT_PASSPORT"
9541
+ ]
9542
+ },
9543
+ descriptionDelta: {},
9544
+ descriptionRichText: {
9545
+ anyOf: [
9546
+ {},
9547
+ {
9548
+ type: "null"
9549
+ }
9550
+ ]
9551
+ },
9552
+ filtering: {
9553
+ type: "boolean"
9554
+ },
9555
+ location: {
9556
+ type: "string",
9557
+ minLength: 1
9558
+ },
9559
+ eventDateRange: {
9560
+ type: "object",
9561
+ properties: {
9562
+ from: {
9563
+ type: "string",
9564
+ format: "date-time"
9565
+ },
9566
+ to: {
9567
+ type: "string",
9568
+ format: "date-time"
9569
+ }
9570
+ },
9571
+ required: ["from"]
9572
+ },
9573
+ tags: {
9574
+ type: "array",
9575
+ items: {
9576
+ type: "string"
9577
+ }
9578
+ },
9579
+ backgroundImageKey: {
9580
+ type: ["string", "null"]
9581
+ },
9582
+ id: {
9583
+ type: "string",
9584
+ minLength: 1
9585
+ }
9586
+ },
9587
+ required: [
9588
+ "organizationId",
9589
+ "name",
9590
+ "type",
9591
+ "location",
9592
+ "eventDateRange",
9593
+ "id"
9594
+ ]
9595
+ }
9596
+ },
9597
+ {
9598
+ path: ["event", "status-update"],
9599
+ procedure: "event.updateEventStatus",
9600
+ operation: "mutation",
9601
+ summary: "Set an event's status (DRAFT, ONGOING, COMPLETED).",
9602
+ effects: ["state-change"],
9603
+ target: "eventId",
9604
+ dates: [],
9605
+ input: {
9606
+ type: "object",
9607
+ properties: {
9608
+ eventId: {
9609
+ type: "string"
9610
+ },
9611
+ organizationId: {
9612
+ type: "string"
9613
+ },
9614
+ status: {
9615
+ type: "string",
9616
+ enum: ["DRAFT", "ONGOING", "COMPLETED"]
9617
+ }
9618
+ },
9619
+ required: ["eventId", "organizationId", "status"]
9620
+ }
9621
+ },
9622
+ {
9623
+ path: ["event", "archive"],
9624
+ procedure: "event.archiveEvent",
9625
+ operation: "mutation",
9626
+ summary: "Archive an event.",
9627
+ effects: ["state-change"],
9628
+ target: "eventId",
9629
+ dates: [],
9630
+ input: {
9631
+ type: "object",
9632
+ properties: {
9633
+ eventId: {
9634
+ type: "string",
9635
+ minLength: 1
9636
+ },
9637
+ organizationId: {
9638
+ type: "string",
9639
+ minLength: 1
9640
+ }
9641
+ },
9642
+ required: ["eventId", "organizationId"]
9643
+ }
9644
+ },
9645
+ {
9646
+ path: ["event", "restore"],
9647
+ procedure: "event.restoreEvent",
9648
+ operation: "mutation",
9649
+ summary: "Restore an archived event.",
9650
+ effects: ["state-change"],
9651
+ target: "eventId",
9652
+ dates: [],
9653
+ input: {
9654
+ type: "object",
9655
+ properties: {
9656
+ eventId: {
9657
+ type: "string",
9658
+ minLength: 1
9659
+ },
9660
+ organizationId: {
9661
+ type: "string",
9662
+ minLength: 1
9663
+ }
9664
+ },
9665
+ required: ["eventId", "organizationId"]
9666
+ }
9667
+ },
9668
+ {
9669
+ path: ["event", "duplicate"],
9670
+ procedure: "event.duplicateEvent",
9671
+ operation: "mutation",
9672
+ summary: "Duplicate an event and its setup into a new draft.",
9673
+ effects: ["state-change"],
9674
+ target: "eventId",
9675
+ dates: [],
9676
+ input: {
9677
+ type: "object",
9678
+ properties: {
9679
+ eventId: {
9680
+ type: "string"
9681
+ }
9682
+ },
9683
+ required: ["eventId"]
9684
+ }
9685
+ },
9686
+ {
9687
+ path: ["event", "export"],
9688
+ procedure: "event.getEventDataToExport",
9689
+ operation: "query",
9690
+ summary: "Export an event's submissions and results.",
9691
+ effects: [],
9692
+ dates: [],
9693
+ input: {
9694
+ type: "object",
9695
+ properties: {
9696
+ eventId: {
9697
+ type: "string"
9698
+ }
9699
+ },
9700
+ required: ["eventId"]
9701
+ }
9702
+ },
9703
+ {
9704
+ path: ["event", "background", "get"],
9705
+ procedure: "event.getEventBackgroundImage",
9706
+ operation: "query",
9707
+ summary: "Get an event's background image URL.",
9708
+ effects: [],
9709
+ dates: [],
9710
+ input: {
9711
+ type: "object",
9712
+ properties: {
9713
+ eventId: {
9714
+ type: "string"
9715
+ }
9716
+ },
9717
+ required: ["eventId"]
9718
+ }
9719
+ },
9720
+ {
9721
+ path: ["event", "story", "list"],
9722
+ procedure: "event.getStoryItemsByEventId",
9723
+ operation: "query",
9724
+ summary: "List Story Collection submissions (paged).",
9725
+ effects: [],
9726
+ dates: [],
9727
+ input: {
9728
+ type: "object",
9729
+ properties: {
9730
+ eventId: {
9731
+ type: "string"
9732
+ },
9733
+ email: {
9734
+ type: "string"
9735
+ },
9736
+ page: {
9737
+ default: 1,
9738
+ type: "number",
9739
+ minimum: 1
9740
+ },
9741
+ perPage: {
9742
+ default: 5,
9743
+ type: "number",
9744
+ minimum: 1,
9745
+ maximum: 100
9746
+ }
9747
+ },
9748
+ required: ["eventId"]
9749
+ }
9750
+ },
9751
+ {
9752
+ path: ["event", "story", "archive"],
9753
+ procedure: "event.archiveStoryItems",
9754
+ operation: "mutation",
9755
+ summary: "Archive Story Collection submissions by ID. --target is the comma-joined ids.",
9756
+ effects: ["state-change"],
9757
+ target: "ids",
9758
+ dates: [],
9759
+ input: {
9760
+ type: "object",
9761
+ properties: {
9762
+ eventId: {
9763
+ type: "string"
9764
+ },
9765
+ ids: {
9766
+ type: "array",
9767
+ items: {
9768
+ type: "string"
9769
+ }
9770
+ }
9771
+ },
9772
+ required: ["eventId", "ids"]
9773
+ }
9774
+ },
9775
+ {
9776
+ path: ["lucky-draw", "passport-sync"],
9777
+ procedure: "event.luckyDraw.getPassportDrawSyncStatus",
9778
+ operation: "query",
9779
+ summary: "Show whether a Passport-linked draw roster is in sync.",
9780
+ effects: [],
9781
+ dates: [],
9782
+ input: {
9783
+ type: "object",
9784
+ properties: {
9785
+ eventId: {
9786
+ type: "string",
9787
+ minLength: 1
9788
+ }
9789
+ },
9790
+ required: ["eventId"]
9791
+ }
9792
+ },
9793
+ {
9794
+ path: ["lucky-draw", "participants", "eligible"],
9795
+ procedure: "event.luckyDraw.getFilteredLuckyDrawParticipantsByEventId",
9796
+ operation: "query",
9797
+ summary: "List participants still eligible after domain/email filters and winners.",
9798
+ effects: [],
9799
+ dates: [],
9800
+ input: {
9801
+ type: "object",
9802
+ properties: {
9803
+ eventId: {
9804
+ type: "string"
9805
+ }
9806
+ },
9807
+ required: ["eventId"]
9808
+ }
9809
+ },
9810
+ {
9811
+ path: ["lucky-draw", "wheel", "participants"],
9812
+ procedure: "event.luckyDraw.getLuckyDrawWheelParticipantsByEventId",
9813
+ operation: "query",
9814
+ summary: "List the participants currently shown on the draw board.",
9815
+ effects: [],
9816
+ dates: [],
9817
+ input: {
9818
+ type: "object",
9819
+ properties: {
9820
+ eventId: {
9821
+ type: "string"
9822
+ }
9823
+ },
9824
+ required: ["eventId"]
9825
+ }
9826
+ },
9827
+ {
9828
+ path: ["lucky-draw", "boards", "list"],
9829
+ procedure: "event.luckyDraw.getLuckyDrawItemsByEventId",
9830
+ operation: "query",
9831
+ summary: "List an event's lucky draw boards (paged).",
9832
+ effects: [],
9833
+ dates: [],
9834
+ input: {
9835
+ type: "object",
9836
+ properties: {
9837
+ eventId: {
9838
+ type: "string"
9839
+ },
9840
+ name: {
9841
+ type: "string"
9842
+ },
9843
+ note: {
9844
+ type: "string"
9845
+ },
9846
+ page: {
9847
+ default: 1,
9848
+ type: "number",
9849
+ minimum: 1
9850
+ },
9851
+ perPage: {
9852
+ default: 10,
9853
+ type: "number",
9854
+ minimum: 1,
9855
+ maximum: 100
9856
+ }
9857
+ },
9858
+ required: ["eventId"]
9859
+ }
9860
+ },
9861
+ {
9862
+ path: ["lucky-draw", "winners", "list"],
9863
+ procedure: "event.luckyDraw.getLuckyDrawPrizesWinnerByEventId",
9864
+ operation: "query",
9865
+ summary: "List prizes with their winners.",
9866
+ effects: [],
9867
+ dates: [],
9868
+ input: {
9869
+ type: "object",
9870
+ properties: {
9871
+ eventId: {
9872
+ type: "string"
9873
+ }
9874
+ },
9875
+ required: ["eventId"]
9876
+ }
9877
+ },
9878
+ {
9879
+ path: ["lucky-draw", "winners", "accept"],
9880
+ procedure: "event.luckyDraw.acceptWinner",
9881
+ operation: "mutation",
9882
+ summary: "Assign a prize to a drawn participant.",
9883
+ effects: ["state-change"],
9884
+ target: "winnerLuckyDrawParticipantId",
9885
+ dates: [],
9886
+ input: {
9887
+ type: "object",
9888
+ properties: {
9889
+ winnerLuckyDrawParticipantId: {
9890
+ type: "string"
9891
+ },
9892
+ winnerLuckyDrawPrizeId: {
9893
+ type: "string"
9894
+ }
9895
+ },
9896
+ required: ["winnerLuckyDrawParticipantId", "winnerLuckyDrawPrizeId"]
9897
+ }
9898
+ },
9899
+ {
9900
+ path: ["lucky-draw", "winners", "remove"],
9901
+ procedure: "event.luckyDraw.removeLuckyDrawPrize",
9902
+ operation: "mutation",
9903
+ summary: "Take the prize back from a winning participant.",
9904
+ effects: ["state-change"],
9905
+ target: "participantId",
9906
+ dates: [],
9907
+ input: {
9908
+ type: "object",
9909
+ properties: {
9910
+ participantId: {
9911
+ type: "string"
9912
+ }
9913
+ },
9914
+ required: ["participantId"]
9915
+ }
9916
+ },
9917
+ {
9918
+ path: ["lucky-draw", "participants", "delete"],
9919
+ procedure: "event.luckyDraw.deleteLuckyDrawParticipant",
9920
+ operation: "mutation",
9921
+ summary: "Permanently delete participants by ID. --target is the comma-joined ids.",
9922
+ effects: ["state-change", "delete"],
9923
+ target: "ids",
9924
+ dates: [],
9925
+ input: {
9926
+ type: "object",
9927
+ properties: {
9928
+ eventId: {
9929
+ type: "string"
9930
+ },
9931
+ ids: {
9932
+ type: "array",
9933
+ items: {
9934
+ type: "string"
9935
+ }
9936
+ }
9937
+ },
9938
+ required: ["eventId", "ids"]
9939
+ }
9940
+ },
9941
+ {
9942
+ path: ["passport", "lucky-draws"],
9943
+ procedure: "event.passport.getAvailableLuckyDraws",
9944
+ operation: "query",
9945
+ summary: "List lucky draw events a Passport can link to.",
9946
+ effects: [],
9947
+ dates: [],
9948
+ input: {
9949
+ type: "object",
9950
+ properties: {
9951
+ eventId: {
9952
+ type: "string",
9953
+ minLength: 1
9954
+ }
9955
+ },
9956
+ required: ["eventId"]
9957
+ }
9958
+ },
9959
+ {
9960
+ path: ["passport", "operator-metadata"],
9961
+ procedure: "event.passport.getPassportOperatorMetadata",
9962
+ operation: "query",
9963
+ summary: "Get the staff operator view metadata (stations, prizes, permissions).",
9964
+ effects: [],
9965
+ dates: [],
9966
+ input: {
9967
+ type: "object",
9968
+ properties: {
9969
+ eventId: {
9970
+ type: "string",
9971
+ minLength: 1
9972
+ }
9973
+ },
9974
+ required: ["eventId"]
9975
+ }
9976
+ },
9977
+ {
9978
+ path: ["photo-wall", "items", "list"],
9979
+ procedure: "event.photoWall.getPhotoWallItemsByEventId",
9980
+ operation: "query",
9981
+ summary: "List Photo Wall photos (paged).",
9982
+ effects: [],
9983
+ dates: [],
9984
+ input: {
9985
+ type: "object",
9986
+ properties: {
9987
+ eventId: {
9988
+ type: "string"
9989
+ },
9990
+ name: {
9991
+ type: "string"
9992
+ },
9993
+ page: {
9994
+ default: 1,
9995
+ type: "number",
9996
+ minimum: 1
9997
+ },
9998
+ perPage: {
9999
+ default: 5,
10000
+ type: "number",
10001
+ minimum: 1,
10002
+ maximum: 100
10003
+ }
10004
+ },
10005
+ required: ["eventId"]
10006
+ }
10007
+ },
10008
+ {
10009
+ path: ["photo-wall", "items", "archive"],
10010
+ procedure: "event.photoWall.archivePhotoWallItems",
10011
+ operation: "mutation",
10012
+ summary: "Archive Photo Wall photos by ID. --target is the comma-joined ids.",
10013
+ effects: ["state-change"],
10014
+ target: "ids",
10015
+ dates: [],
10016
+ input: {
10017
+ type: "object",
10018
+ properties: {
10019
+ eventId: {
10020
+ type: "string"
10021
+ },
10022
+ ids: {
10023
+ type: "array",
10024
+ items: {
10025
+ type: "string"
10026
+ }
10027
+ }
10028
+ },
10029
+ required: ["eventId", "ids"]
10030
+ }
10031
+ },
10032
+ {
10033
+ path: ["photo-wall", "submissions", "list"],
10034
+ procedure: "event.photoWall.getPhotoWallSubmissionForApproval",
10035
+ operation: "query",
10036
+ summary: "List Photo Wall submissions for moderation (filter by state).",
10037
+ effects: [],
10038
+ dates: [],
10039
+ input: {
10040
+ type: "object",
10041
+ properties: {
10042
+ eventId: {
10043
+ type: "string"
10044
+ },
10045
+ state: {
10046
+ default: "PENDING",
10047
+ type: "string",
10048
+ enum: ["PENDING", "APPROVED", "REJECTED"]
10049
+ },
10050
+ page: {
10051
+ default: 1,
10052
+ type: "number",
10053
+ minimum: 1
10054
+ },
10055
+ perPage: {
10056
+ default: 6,
10057
+ type: "number",
10058
+ minimum: 1,
10059
+ maximum: 100
10060
+ }
10061
+ },
10062
+ required: ["eventId"]
10063
+ }
10064
+ },
10065
+ {
10066
+ path: ["photo-wall", "submissions", "respond"],
10067
+ procedure: "event.photoWall.respondToPhotoWallSubmission",
10068
+ operation: "mutation",
10069
+ summary: "Approve or reject a Photo Wall submission.",
10070
+ effects: ["state-change"],
10071
+ target: "id",
10072
+ dates: [],
10073
+ input: {
10074
+ type: "object",
10075
+ properties: {
10076
+ eventId: {
10077
+ type: "string"
10078
+ },
10079
+ id: {
10080
+ type: "string"
10081
+ },
10082
+ status: {
10083
+ type: "string",
10084
+ enum: ["PENDING", "APPROVED", "REJECTED"]
10085
+ }
10086
+ },
10087
+ required: ["eventId", "id", "status"]
10088
+ }
10089
+ },
10090
+ {
10091
+ path: ["photo-wall", "display-link"],
10092
+ procedure: "event.photoWall.getPhotoWallDisplayLink",
10093
+ operation: "mutation",
10094
+ summary: "Get the Photo Wall display link, creating its access code on first use.",
10095
+ effects: ["state-change"],
10096
+ target: "eventId",
10097
+ dates: [],
10098
+ input: {
10099
+ type: "object",
10100
+ properties: {
10101
+ eventId: {
10102
+ type: "string",
10103
+ minLength: 1,
10104
+ maxLength: 128,
10105
+ pattern: "^[a-zA-Z0-9_-]+$"
10106
+ }
10107
+ },
10108
+ required: ["eventId"]
10109
+ }
10110
+ },
10111
+ {
10112
+ path: ["post-it", "notes", "list"],
10113
+ procedure: "event.postItNote.getPostItNotesByEventId",
10114
+ operation: "query",
10115
+ summary: "List approved Post-it Notes (paged).",
10116
+ effects: [],
10117
+ dates: [],
10118
+ input: {
10119
+ type: "object",
10120
+ properties: {
10121
+ eventId: {
10122
+ type: "string"
10123
+ },
10124
+ name: {
10125
+ type: "string"
10126
+ },
10127
+ note: {
10128
+ type: "string"
10129
+ },
10130
+ page: {
10131
+ default: 1,
10132
+ type: "number",
10133
+ minimum: 1
10134
+ },
10135
+ perPage: {
10136
+ default: 10,
10137
+ type: "number",
10138
+ minimum: 1,
10139
+ maximum: 100
10140
+ }
10141
+ },
10142
+ required: ["eventId"]
10143
+ }
10144
+ },
10145
+ {
10146
+ path: ["post-it", "notes", "list-all"],
10147
+ procedure: "event.postItNote.getAllPostItNotesByEventId",
10148
+ operation: "query",
10149
+ summary: "List every Post-it Note for an event.",
10150
+ effects: [],
10151
+ dates: [],
10152
+ input: {
10153
+ type: "object",
10154
+ properties: {
10155
+ eventId: {
10156
+ type: "string"
10157
+ }
10158
+ },
10159
+ required: ["eventId"]
10160
+ }
10161
+ },
10162
+ {
10163
+ path: ["post-it", "notes", "table"],
10164
+ procedure: "event.postItNote.getPostItNoteTable",
10165
+ operation: "query",
10166
+ summary: "List Post-it Notes in the admin table shape (paged).",
10167
+ effects: [],
10168
+ dates: [],
10169
+ input: {
10170
+ type: "object",
10171
+ properties: {
10172
+ eventId: {
10173
+ type: "string"
10174
+ },
10175
+ name: {
10176
+ type: "string"
10177
+ },
10178
+ note: {
10179
+ type: "string"
10180
+ },
10181
+ page: {
10182
+ default: 1,
10183
+ type: "number",
10184
+ minimum: 1
10185
+ },
10186
+ perPage: {
10187
+ default: 10,
10188
+ type: "number",
10189
+ minimum: 1,
10190
+ maximum: 100
10191
+ }
10192
+ },
10193
+ required: ["eventId"]
10194
+ }
10195
+ },
10196
+ {
10197
+ path: ["post-it", "notes", "archive"],
10198
+ procedure: "event.postItNote.archivePostItNotes",
10199
+ operation: "mutation",
10200
+ summary: "Archive Post-it Notes by ID. --target is the comma-joined ids.",
10201
+ effects: ["state-change"],
10202
+ target: "ids",
10203
+ dates: [],
10204
+ input: {
10205
+ type: "object",
10206
+ properties: {
10207
+ eventId: {
10208
+ type: "string"
10209
+ },
10210
+ ids: {
10211
+ type: "array",
10212
+ items: {
10213
+ type: "string"
10214
+ }
10215
+ }
10216
+ },
10217
+ required: ["eventId", "ids"]
10218
+ }
10219
+ },
10220
+ {
10221
+ path: ["post-it", "submissions", "list"],
10222
+ procedure: "event.postItNote.getPostItNoteSubmissionForApproval",
10223
+ operation: "query",
10224
+ summary: "List Post-it Note submissions for moderation.",
10225
+ effects: [],
10226
+ dates: [],
10227
+ input: {
10228
+ type: "object",
10229
+ properties: {
10230
+ eventId: {
10231
+ type: "string"
10232
+ },
10233
+ name: {
10234
+ type: "string"
10235
+ },
10236
+ note: {
10237
+ type: "string"
10238
+ },
10239
+ state: {
10240
+ type: "string",
10241
+ enum: ["PENDING", "APPROVED", "REJECTED"]
10242
+ },
10243
+ page: {
10244
+ default: 1,
10245
+ type: "number",
10246
+ minimum: 1
10247
+ },
10248
+ perPage: {
10249
+ default: 6,
10250
+ type: "number",
10251
+ minimum: 1,
10252
+ maximum: 100
10253
+ }
10254
+ },
10255
+ required: ["eventId"]
10256
+ }
10257
+ },
10258
+ {
10259
+ path: ["post-it", "submissions", "respond"],
10260
+ procedure: "event.postItNote.respondToPostItNoteSubmission",
10261
+ operation: "mutation",
10262
+ summary: "Approve or reject a Post-it Note submission.",
10263
+ effects: ["state-change"],
10264
+ target: "id",
10265
+ dates: [],
10266
+ input: {
10267
+ type: "object",
10268
+ properties: {
10269
+ eventId: {
10270
+ type: "string"
10271
+ },
10272
+ id: {
10273
+ type: "string"
10274
+ },
10275
+ status: {
10276
+ type: "string",
10277
+ enum: ["PENDING", "APPROVED", "REJECTED"]
10278
+ }
10279
+ },
10280
+ required: ["eventId", "id", "status"]
10281
+ }
10282
+ },
10283
+ {
10284
+ path: ["signature-wall", "config", "get"],
10285
+ procedure: "event.signatureWall.getSignatureWallByEventId",
10286
+ operation: "query",
10287
+ summary: "Get the Signature Wall config.",
10288
+ effects: [],
10289
+ dates: [],
10290
+ input: {
10291
+ type: "object",
10292
+ properties: {
10293
+ eventId: {
10294
+ type: "string"
10295
+ }
10296
+ },
10297
+ required: ["eventId"]
10298
+ }
10299
+ },
10300
+ {
10301
+ path: ["signature-wall", "config", "update"],
10302
+ procedure: "event.signatureWall.updateSignatureWallConfigs",
10303
+ operation: "mutation",
10304
+ summary: "Replace the Signature Wall config.",
10305
+ effects: ["state-change"],
10306
+ target: "eventId",
10307
+ dates: [],
10308
+ input: {
10309
+ type: "object",
10310
+ properties: {
10311
+ eventId: {
10312
+ type: "string"
10313
+ },
10314
+ config: {
10315
+ type: "object",
10316
+ properties: {
10317
+ backgroundColor: {
10318
+ type: "string"
10319
+ },
10320
+ titleColor: {
10321
+ type: "string"
10322
+ },
10323
+ titleFontSize: {
10324
+ type: "number"
10325
+ },
10326
+ titleFont: {
10327
+ type: "string"
10328
+ },
10329
+ title: {
10330
+ type: "string"
10331
+ },
10332
+ cardBackgroundColor: {
10333
+ type: "string"
10334
+ },
10335
+ cardBorderColor: {
10336
+ type: "string"
10337
+ },
10338
+ nameColor: {
10339
+ type: "string"
10340
+ },
10341
+ nameCardBackgroundColor: {
10342
+ type: "string"
10343
+ },
10344
+ nameCardBorderColor: {
10345
+ type: "string"
10346
+ },
10347
+ animationVideoKey: {
10348
+ type: ["string", "null"]
10349
+ },
10350
+ signatureCounts: {
10351
+ type: "number"
10352
+ }
10353
+ },
10354
+ required: [
10355
+ "backgroundColor",
10356
+ "titleColor",
10357
+ "titleFontSize",
10358
+ "titleFont",
10359
+ "title",
10360
+ "cardBackgroundColor",
10361
+ "cardBorderColor",
10362
+ "nameColor",
10363
+ "nameCardBackgroundColor",
10364
+ "nameCardBorderColor"
10365
+ ]
10366
+ }
10367
+ },
10368
+ required: ["eventId", "config"]
10369
+ }
10370
+ },
10371
+ {
10372
+ path: ["signature-wall", "signatures", "list"],
10373
+ procedure: "event.signatureWall.getSignatureTable",
10374
+ operation: "query",
10375
+ summary: "List signatures (paged).",
10376
+ effects: [],
10377
+ dates: [],
10378
+ input: {
10379
+ type: "object",
10380
+ properties: {
10381
+ eventId: {
10382
+ type: "string"
10383
+ },
10384
+ name: {
10385
+ type: "string"
10386
+ },
10387
+ page: {
10388
+ default: 1,
10389
+ type: "number",
10390
+ minimum: 1
10391
+ },
10392
+ perPage: {
10393
+ default: 10,
10394
+ type: "number",
10395
+ minimum: 1,
10396
+ maximum: 100
10397
+ }
10398
+ },
10399
+ required: ["eventId"]
10400
+ }
10401
+ },
10402
+ {
10403
+ path: ["signature-wall", "signatures", "strokes"],
10404
+ procedure: "event.signatureWall.getSignatureStrokes",
10405
+ operation: "query",
10406
+ summary: "Get one signature's pen strokes (list rows omit them).",
10407
+ effects: [],
10408
+ dates: [],
10409
+ input: {
10410
+ type: "object",
10411
+ properties: {
10412
+ eventId: {
10413
+ type: "string"
10414
+ },
10415
+ signatureId: {
10416
+ type: "string"
10417
+ }
10418
+ },
10419
+ required: ["eventId", "signatureId"]
10420
+ }
10421
+ },
10422
+ {
10423
+ path: ["signature-wall", "signatures", "archive"],
10424
+ procedure: "event.signatureWall.archiveSignatures",
10425
+ operation: "mutation",
10426
+ summary: "Archive signatures by ID. --target is the comma-joined ids.",
10427
+ effects: ["state-change"],
10428
+ target: "ids",
10429
+ dates: [],
10430
+ input: {
10431
+ type: "object",
10432
+ properties: {
10433
+ ids: {
10434
+ type: "array",
10435
+ items: {
10436
+ type: "string"
10437
+ }
10438
+ }
10439
+ },
10440
+ required: ["ids"]
10441
+ }
10442
+ },
10443
+ {
10444
+ path: ["rating", "config", "get"],
10445
+ procedure: "event.ratingSystem.getRatingSystemByEventId",
10446
+ operation: "query",
10447
+ summary: "Get the Rating System config.",
10448
+ effects: [],
10449
+ dates: [],
10450
+ input: {
10451
+ type: "object",
10452
+ properties: {
10453
+ eventId: {
10454
+ type: "string"
10455
+ }
10456
+ },
10457
+ required: ["eventId"]
10458
+ }
10459
+ },
10460
+ {
10461
+ path: ["rating", "config", "update"],
10462
+ procedure: "event.ratingSystem.updateRatingSystemConfig",
10463
+ operation: "mutation",
10464
+ summary: "Replace the Rating System config.",
10465
+ effects: ["state-change"],
10466
+ target: "eventId",
10467
+ dates: [],
10468
+ input: {
10469
+ type: "object",
10470
+ properties: {
10471
+ eventId: {
10472
+ type: "string"
10473
+ },
10474
+ config: {
10475
+ type: "object",
10476
+ properties: {
10477
+ mobileBackgroundImageKey: {
10478
+ type: ["string", "null"]
10479
+ }
10480
+ }
10481
+ }
10482
+ },
10483
+ required: ["eventId", "config"]
10484
+ }
10485
+ },
10486
+ {
10487
+ path: ["rating", "background", "get"],
10488
+ procedure: "event.ratingSystem.getRatingSystemBackgroundByEventId",
10489
+ operation: "query",
10490
+ summary: "Get the Rating System background images.",
10491
+ effects: [],
10492
+ dates: [],
10493
+ input: {
10494
+ type: "object",
10495
+ properties: {
10496
+ eventId: {
10497
+ type: "string"
10498
+ }
10499
+ },
10500
+ required: ["eventId"]
10501
+ }
10502
+ },
10503
+ {
10504
+ path: ["rating", "subjects", "list"],
10505
+ procedure: "event.ratingSystem.getRatingSubjects",
10506
+ operation: "query",
10507
+ summary: "List rating subjects with their scores.",
10508
+ effects: [],
10509
+ dates: [],
10510
+ input: {
10511
+ type: "object",
10512
+ properties: {
10513
+ eventId: {
10514
+ type: "string"
10515
+ }
10516
+ },
10517
+ required: ["eventId"]
10518
+ }
10519
+ },
10520
+ {
10521
+ path: ["rating", "subjects", "create"],
10522
+ procedure: "event.ratingSystem.createRatingSubject",
10523
+ operation: "mutation",
10524
+ summary: "Create a rating subject.",
10525
+ effects: ["state-change"],
10526
+ target: "ratingSystemId",
10527
+ dates: [],
10528
+ input: {
10529
+ type: "object",
10530
+ properties: {
10531
+ ratingSystemId: {
10532
+ type: "string"
10533
+ },
10534
+ name: {
10535
+ type: "string",
10536
+ minLength: 1
10537
+ },
10538
+ description: {
10539
+ type: ["string", "null"]
10540
+ },
10541
+ order: {
10542
+ default: 0,
10543
+ type: "integer",
10544
+ minimum: -9007199254740991,
10545
+ maximum: 9007199254740991
10546
+ },
10547
+ imageKey: {
10548
+ type: ["string", "null"]
10549
+ }
10550
+ },
10551
+ required: ["ratingSystemId", "name"]
10552
+ }
10553
+ },
10554
+ {
10555
+ path: ["rating", "subjects", "update"],
10556
+ procedure: "event.ratingSystem.updateRatingSubject",
10557
+ operation: "mutation",
10558
+ summary: "Update a rating subject.",
10559
+ effects: ["state-change"],
10560
+ target: "id",
10561
+ dates: [],
10562
+ input: {
10563
+ type: "object",
10564
+ properties: {
10565
+ id: {
10566
+ type: "string"
10567
+ },
10568
+ name: {
10569
+ type: "string",
10570
+ minLength: 1
10571
+ },
10572
+ description: {
10573
+ type: ["string", "null"]
10574
+ },
10575
+ order: {
10576
+ type: "integer",
10577
+ minimum: -9007199254740991,
10578
+ maximum: 9007199254740991
10579
+ },
10580
+ imageKey: {
10581
+ type: ["string", "null"]
10582
+ }
10583
+ },
10584
+ required: ["id"]
10585
+ }
10586
+ },
10587
+ {
10588
+ path: ["rating", "subjects", "archive"],
10589
+ procedure: "event.ratingSystem.archiveRatingSubject",
10590
+ operation: "mutation",
10591
+ summary: "Archive a rating subject.",
10592
+ effects: ["state-change"],
10593
+ target: "id",
10594
+ dates: [],
10595
+ input: {
10596
+ type: "object",
10597
+ properties: {
10598
+ id: {
10599
+ type: "string"
10600
+ }
10601
+ },
10602
+ required: ["id"]
10603
+ }
10604
+ },
10605
+ {
10606
+ path: ["human-bingo", "config", "get"],
10607
+ procedure: "event.humanBingo.getHumanBingoByEventId",
10608
+ operation: "query",
10609
+ summary: "Get the Human Bingo board and config.",
10610
+ effects: [],
10611
+ dates: [],
10612
+ input: {
10613
+ type: "object",
10614
+ properties: {
10615
+ eventId: {
10616
+ type: "string"
10617
+ }
10618
+ },
10619
+ required: ["eventId"]
10620
+ }
10621
+ },
10622
+ {
10623
+ path: ["human-bingo", "config", "update"],
10624
+ procedure: "event.humanBingo.updateHumanBingoConfigs",
10625
+ operation: "mutation",
10626
+ summary: "Replace the Human Bingo config.",
10627
+ effects: ["state-change"],
10628
+ target: "eventId",
10629
+ dates: [],
10630
+ input: {
10631
+ type: "object",
10632
+ properties: {
10633
+ eventId: {
10634
+ type: "string"
10635
+ },
10636
+ config: {
10637
+ type: "object",
10638
+ properties: {
10639
+ textColor: {
10640
+ type: "string"
10641
+ },
10642
+ titleFontSize: {
10643
+ type: "number"
10644
+ },
10645
+ backgroundColor: {
10646
+ type: "string"
10647
+ },
10648
+ backgroundImageKey: {
10649
+ type: ["string", "null"]
10650
+ },
10651
+ nameCardTextColor: {
10652
+ type: "string"
10653
+ },
10654
+ nameCardBackgroundColor: {
10655
+ type: "string"
10656
+ },
10657
+ nameCardBorderColor: {
10658
+ type: "string"
10659
+ },
10660
+ cardBackgroundColor: {
10661
+ type: "string"
10662
+ },
10663
+ cardBorderColor: {
10664
+ type: "string"
10665
+ },
10666
+ cardTextColor: {
10667
+ type: "string"
10668
+ },
10669
+ numberOfParticipants: {
10670
+ type: "number"
10671
+ },
10672
+ bingoCellDialogBackgroundColor: {
10673
+ type: "string"
10674
+ },
10675
+ bingoCellDialogTextColor: {
10676
+ type: "string"
10677
+ },
10678
+ bingoCellDialogButtonTextColor: {
10679
+ type: "string"
10680
+ },
10681
+ bingoCellDialogButtonColor: {
10682
+ type: "string"
10683
+ },
10684
+ bingoCellDialogUploadTextColor: {
10685
+ type: "string"
10686
+ },
10687
+ bingoCellImageKey: {
10688
+ type: ["string", "null"]
10689
+ },
10690
+ minRowsForBingo: {
10691
+ type: "number"
10692
+ },
10693
+ infoTextColor: {
10694
+ type: "string"
10695
+ },
10696
+ infoTextPosition: {
10697
+ type: "string"
10698
+ },
10699
+ mobileBackgroundColor: {
10700
+ type: "string"
10701
+ },
10702
+ mobileBackgroundImageKey: {
10703
+ type: ["string", "null"]
10704
+ },
10705
+ loginTitle: {
10706
+ type: "string"
10707
+ },
10708
+ loginDescription: {
10709
+ type: ["string", "null"]
10710
+ },
10711
+ loginTitleColor: {
10712
+ type: "string"
10713
+ },
10714
+ loginButtonColor: {
10715
+ type: "string"
10716
+ },
10717
+ loginButtonTextColor: {
10718
+ type: "string"
10719
+ },
10720
+ loginCardBackgroundColor: {
10721
+ type: "string"
10722
+ },
10723
+ loginInputColor: {
10724
+ type: "string"
10725
+ },
10726
+ leaderboardCardBackgroundColor: {
10727
+ type: "string"
10728
+ },
10729
+ leaderboardCardTextColor: {
10730
+ type: "string"
10731
+ },
10732
+ leaderboardBorderColor: {
10733
+ type: "string"
10734
+ }
10735
+ },
10736
+ required: [
10737
+ "textColor",
10738
+ "titleFontSize",
10739
+ "backgroundColor",
10740
+ "nameCardTextColor",
10741
+ "nameCardBackgroundColor",
10742
+ "nameCardBorderColor",
10743
+ "cardBackgroundColor",
10744
+ "cardBorderColor",
10745
+ "cardTextColor",
10746
+ "numberOfParticipants",
10747
+ "bingoCellDialogBackgroundColor",
10748
+ "bingoCellDialogTextColor",
10749
+ "bingoCellDialogButtonTextColor",
10750
+ "bingoCellDialogButtonColor",
10751
+ "bingoCellDialogUploadTextColor",
10752
+ "minRowsForBingo",
10753
+ "infoTextColor",
10754
+ "infoTextPosition",
10755
+ "mobileBackgroundColor",
10756
+ "loginTitle",
10757
+ "loginTitleColor",
10758
+ "loginButtonColor",
10759
+ "loginButtonTextColor",
10760
+ "loginCardBackgroundColor",
10761
+ "loginInputColor",
10762
+ "leaderboardCardBackgroundColor",
10763
+ "leaderboardCardTextColor",
10764
+ "leaderboardBorderColor"
10765
+ ]
10766
+ }
10767
+ },
10768
+ required: ["eventId", "config"]
10769
+ }
10770
+ },
10771
+ {
10772
+ path: ["human-bingo", "background", "get"],
10773
+ procedure: "event.humanBingo.getHumanBingoBoardBackgroundByEventId",
10774
+ operation: "query",
10775
+ summary: "Get the Human Bingo board background images.",
10776
+ effects: [],
10777
+ dates: [],
10778
+ input: {
10779
+ type: "object",
10780
+ properties: {
10781
+ eventId: {
10782
+ type: "string"
10783
+ }
10784
+ },
10785
+ required: ["eventId"]
10786
+ }
10787
+ },
10788
+ {
10789
+ path: ["human-bingo", "items", "list"],
10790
+ procedure: "event.humanBingo.admin.getHumanBingoItemsByEventId",
10791
+ operation: "query",
10792
+ summary: "List Human Bingo items.",
10793
+ effects: [],
10794
+ dates: [],
10795
+ input: {
10796
+ type: "object",
10797
+ properties: {
10798
+ eventId: {
10799
+ type: "string"
10800
+ },
10801
+ archiveStatus: {
10802
+ default: "active",
10803
+ type: "string",
10804
+ enum: ["active", "archived", "all"]
10805
+ }
10806
+ },
10807
+ required: ["eventId"]
10808
+ }
10809
+ },
10810
+ {
10811
+ path: ["human-bingo", "items", "table"],
10812
+ procedure: "event.humanBingo.admin.getHumanBingoItemsTable",
10813
+ operation: "query",
10814
+ summary: "List Human Bingo items in the admin table shape (paged).",
10815
+ effects: [],
10816
+ dates: [],
10817
+ input: {
10818
+ type: "object",
10819
+ properties: {
10820
+ eventId: {
10821
+ type: "string"
10822
+ },
10823
+ name: {
10824
+ type: "string"
10825
+ },
10826
+ page: {
10827
+ default: 1,
10828
+ type: "number",
10829
+ minimum: 1
10830
+ },
10831
+ perPage: {
10832
+ default: 10,
10833
+ type: "number",
10834
+ minimum: 1,
10835
+ maximum: 100
10836
+ },
10837
+ archiveStatus: {
10838
+ default: "active",
10839
+ type: "string",
10840
+ enum: ["active", "archived", "all"]
10841
+ }
10842
+ },
10843
+ required: ["eventId"]
10844
+ }
10845
+ },
10846
+ {
10847
+ path: ["human-bingo", "items", "replace"],
10848
+ procedure: "event.humanBingo.admin.createHumanBingoItems",
10849
+ operation: "mutation",
10850
+ summary: "Replace every Human Bingo item: existing items are deleted first.",
10851
+ effects: ["state-change", "delete"],
10852
+ target: "eventId",
10853
+ dates: [],
10854
+ input: {
10855
+ type: "object",
10856
+ properties: {
10857
+ eventId: {
10858
+ type: "string",
10859
+ minLength: 1
10860
+ },
10861
+ items: {
10862
+ type: "array",
10863
+ items: {
10864
+ type: "object",
10865
+ properties: {
10866
+ name: {
10867
+ type: "string",
10868
+ minLength: 1,
10869
+ maxLength: 200
10870
+ },
10871
+ description: {
10872
+ type: "string",
10873
+ maxLength: 500
10874
+ },
10875
+ type: {
10876
+ default: "PHOTO_UPLOAD",
10877
+ type: "string",
10878
+ enum: [
10879
+ "SINGLE_SELECT",
10880
+ "TEXT_INPUT",
10881
+ "PHOTO_UPLOAD",
10882
+ "VIDEO_UPLOAD"
10883
+ ]
10884
+ },
10885
+ options: {
10886
+ default: [],
10887
+ maxItems: 20,
10888
+ type: "array",
10889
+ items: {
10890
+ type: "object",
10891
+ properties: {
10892
+ name: {
10893
+ type: "string",
10894
+ minLength: 1,
10895
+ maxLength: 100
10896
+ },
10897
+ isCorrect: {
10898
+ default: false,
10899
+ type: "boolean"
10900
+ }
10901
+ },
10902
+ required: ["name"]
10903
+ }
10904
+ },
10905
+ correctAnswer: {
10906
+ type: "string",
10907
+ maxLength: 100
10908
+ },
10909
+ manualReview: {
10910
+ default: false,
10911
+ type: "boolean"
10912
+ }
10913
+ },
10914
+ required: ["name"]
10915
+ }
10916
+ }
10917
+ },
10918
+ required: ["eventId", "items"]
10919
+ }
10920
+ },
10921
+ {
10922
+ path: ["human-bingo", "items", "update"],
10923
+ procedure: "event.humanBingo.admin.editHumanBingoItems",
10924
+ operation: "mutation",
10925
+ summary: "Update one Human Bingo item.",
10926
+ effects: ["state-change"],
10927
+ target: "id",
10928
+ dates: [],
10929
+ input: {
10930
+ type: "object",
10931
+ properties: {
10932
+ name: {
10933
+ type: "string",
10934
+ minLength: 1,
10935
+ maxLength: 200
10936
+ },
10937
+ description: {
10938
+ type: "string",
10939
+ maxLength: 500
10940
+ },
10941
+ type: {
10942
+ default: "PHOTO_UPLOAD",
10943
+ type: "string",
10944
+ enum: [
10945
+ "SINGLE_SELECT",
10946
+ "TEXT_INPUT",
10947
+ "PHOTO_UPLOAD",
10948
+ "VIDEO_UPLOAD"
10949
+ ]
10950
+ },
10951
+ options: {
10952
+ default: [],
10953
+ maxItems: 20,
10954
+ type: "array",
10955
+ items: {
10956
+ type: "object",
10957
+ properties: {
10958
+ name: {
10959
+ type: "string",
10960
+ minLength: 1,
10961
+ maxLength: 100
10962
+ },
10963
+ isCorrect: {
10964
+ default: false,
10965
+ type: "boolean"
10966
+ }
10967
+ },
10968
+ required: ["name"]
10969
+ }
10970
+ },
10971
+ correctAnswer: {
10972
+ type: "string",
10973
+ maxLength: 100
10974
+ },
10975
+ manualReview: {
10976
+ default: false,
10977
+ type: "boolean"
10978
+ },
10979
+ id: {
10980
+ type: "string",
10981
+ minLength: 1
10982
+ }
10983
+ },
10984
+ required: ["name", "id"]
10985
+ }
10986
+ },
10987
+ {
10988
+ path: ["human-bingo", "items", "archive"],
10989
+ procedure: "event.humanBingo.admin.archiveHumanBingoItem",
10990
+ operation: "mutation",
10991
+ summary: "Archive one Human Bingo item.",
10992
+ effects: ["state-change"],
10993
+ target: "id",
10994
+ dates: [],
10995
+ input: {
10996
+ type: "object",
10997
+ properties: {
10998
+ id: {
10999
+ type: "string"
11000
+ }
11001
+ },
11002
+ required: ["id"]
11003
+ }
11004
+ },
11005
+ {
11006
+ path: ["human-bingo", "items", "archive-many"],
11007
+ procedure: "event.humanBingo.admin.archiveManyHumanBingoItems",
11008
+ operation: "mutation",
11009
+ summary: "Archive Human Bingo items by ID. --target is the comma-joined ids.",
11010
+ effects: ["state-change"],
11011
+ target: "ids",
11012
+ dates: [],
11013
+ input: {
11014
+ type: "object",
11015
+ properties: {
11016
+ ids: {
11017
+ type: "array",
11018
+ items: {
11019
+ type: "string"
11020
+ }
11021
+ }
11022
+ },
11023
+ required: ["ids"]
11024
+ }
11025
+ },
11026
+ {
11027
+ path: ["human-bingo", "items", "restore"],
11028
+ procedure: "event.humanBingo.admin.restoreHumanBingoItem",
11029
+ operation: "mutation",
11030
+ summary: "Restore an archived Human Bingo item.",
11031
+ effects: ["state-change"],
11032
+ target: "id",
11033
+ dates: [],
11034
+ input: {
11035
+ type: "object",
11036
+ properties: {
11037
+ id: {
11038
+ type: "string"
11039
+ }
11040
+ },
11041
+ required: ["id"]
11042
+ }
11043
+ },
11044
+ {
11045
+ path: ["human-bingo", "leaderboard"],
11046
+ procedure: "event.humanBingo.admin.getLeaderboard",
11047
+ operation: "query",
11048
+ summary: "Get the completed-card leaderboard (eventRoomId is the Human Bingo ID).",
11049
+ effects: [],
11050
+ dates: [],
11051
+ input: {
11052
+ type: "object",
11053
+ properties: {
11054
+ eventRoomId: {
11055
+ type: "string"
11056
+ }
11057
+ },
11058
+ required: ["eventRoomId"]
11059
+ }
11060
+ },
11061
+ {
11062
+ path: ["human-bingo", "participants", "leaderboard"],
11063
+ procedure: "event.humanBingo.admin.getParticipantLeaderboard",
11064
+ operation: "query",
11065
+ summary: "Get the participant leaderboard.",
11066
+ effects: [],
11067
+ dates: [],
11068
+ input: {
11069
+ type: "object",
11070
+ properties: {
11071
+ eventId: {
11072
+ type: "string"
11073
+ }
11074
+ },
11075
+ required: ["eventId"]
11076
+ }
11077
+ },
11078
+ {
11079
+ path: ["human-bingo", "participants", "list"],
11080
+ procedure: "event.humanBingo.admin.getParticipantsByEvent",
11081
+ operation: "query",
11082
+ summary: "List Human Bingo participants.",
11083
+ effects: [],
11084
+ dates: [],
11085
+ input: {
11086
+ type: "object",
11087
+ properties: {
11088
+ eventId: {
11089
+ type: "string"
11090
+ },
11091
+ archiveStatus: {
11092
+ default: "active",
11093
+ type: "string",
11094
+ enum: ["active", "archived", "all"]
11095
+ }
11096
+ },
11097
+ required: ["eventId"]
11098
+ }
11099
+ },
11100
+ {
11101
+ path: ["human-bingo", "participants", "table"],
11102
+ procedure: "event.humanBingo.admin.getParticipantsTable",
11103
+ operation: "query",
11104
+ summary: "List Human Bingo participants in the admin table shape (paged).",
11105
+ effects: [],
11106
+ dates: [],
11107
+ input: {
11108
+ type: "object",
11109
+ properties: {
11110
+ eventId: {
11111
+ type: "string"
11112
+ },
11113
+ name: {
11114
+ type: "string"
11115
+ },
11116
+ page: {
11117
+ default: 1,
11118
+ type: "number",
11119
+ minimum: 1
11120
+ },
11121
+ perPage: {
11122
+ default: 10,
11123
+ type: "number",
11124
+ minimum: 1,
11125
+ maximum: 100
11126
+ },
11127
+ archiveStatus: {
11128
+ default: "active",
11129
+ type: "string",
11130
+ enum: ["active", "archived", "all"]
11131
+ }
11132
+ },
11133
+ required: ["eventId"]
11134
+ }
11135
+ },
11136
+ {
11137
+ path: ["human-bingo", "participants", "card"],
11138
+ procedure: "event.humanBingo.admin.getParticipantBingoCard",
11139
+ operation: "query",
11140
+ summary: "Get one participant's bingo card.",
11141
+ effects: [],
11142
+ dates: [],
11143
+ input: {
11144
+ type: "object",
11145
+ properties: {
11146
+ eventId: {
11147
+ type: "string"
11148
+ },
11149
+ participantId: {
11150
+ type: "string"
11151
+ }
11152
+ },
11153
+ required: ["eventId", "participantId"]
11154
+ }
11155
+ },
11156
+ {
11157
+ path: ["human-bingo", "participants", "ban"],
11158
+ procedure: "event.humanBingo.admin.updateParticipantBanStatus",
11159
+ operation: "mutation",
11160
+ summary: "Ban or unban a participant.",
11161
+ effects: ["state-change"],
11162
+ target: "participantId",
11163
+ dates: [],
11164
+ input: {
11165
+ type: "object",
11166
+ properties: {
11167
+ eventId: {
11168
+ type: "string"
11169
+ },
11170
+ participantId: {
11171
+ type: "string"
11172
+ },
11173
+ banned: {
11174
+ type: "boolean"
11175
+ }
11176
+ },
11177
+ required: ["eventId", "participantId", "banned"]
11178
+ }
11179
+ },
11180
+ {
11181
+ path: ["human-bingo", "participants", "archive"],
11182
+ procedure: "event.humanBingo.admin.archiveHumanBingoParticipants",
11183
+ operation: "mutation",
11184
+ summary: "Archive participants by ID. --target is the comma-joined ids.",
11185
+ effects: ["state-change"],
11186
+ target: "ids",
11187
+ dates: [],
11188
+ input: {
11189
+ type: "object",
11190
+ properties: {
11191
+ ids: {
11192
+ type: "array",
11193
+ items: {
11194
+ type: "string"
11195
+ }
11196
+ }
11197
+ },
11198
+ required: ["ids"]
11199
+ }
11200
+ },
11201
+ {
11202
+ path: ["human-bingo", "participants", "restore"],
11203
+ procedure: "event.humanBingo.admin.restoreHumanBingoParticipants",
11204
+ operation: "mutation",
11205
+ summary: "Restore participants; cards that no longer match the board are deleted and rebuilt.",
11206
+ effects: ["state-change", "delete"],
11207
+ target: "ids",
11208
+ dates: [],
11209
+ input: {
11210
+ type: "object",
11211
+ properties: {
11212
+ ids: {
11213
+ type: "array",
11214
+ items: {
11215
+ type: "string"
11216
+ }
11217
+ }
11218
+ },
11219
+ required: ["ids"]
11220
+ }
11221
+ },
11222
+ {
11223
+ path: ["human-bingo", "submissions", "list"],
11224
+ procedure: "event.humanBingo.admin.getSubmissions",
11225
+ operation: "query",
11226
+ summary: "List Human Bingo submissions (paged).",
11227
+ effects: [],
11228
+ dates: [],
11229
+ input: {
11230
+ type: "object",
11231
+ properties: {
11232
+ eventId: {
11233
+ type: "string"
11234
+ },
11235
+ page: {
11236
+ type: "number",
11237
+ minimum: 1
11238
+ },
11239
+ cursor: {
11240
+ type: "number",
11241
+ minimum: 1
11242
+ },
11243
+ perPage: {
11244
+ default: 6,
11245
+ type: "number",
11246
+ minimum: 1,
11247
+ maximum: 50
11248
+ },
11249
+ direction: {
11250
+ type: "string",
11251
+ enum: ["forward", "backward"]
11252
+ }
11253
+ },
11254
+ required: ["eventId"]
11255
+ }
11256
+ },
11257
+ {
11258
+ path: ["human-bingo", "submissions", "pending"],
11259
+ procedure: "event.humanBingo.admin.getHumanBingoSubmissionsForApproval",
11260
+ operation: "query",
11261
+ summary: "List Human Bingo submissions for moderation (filter by state).",
11262
+ effects: [],
11263
+ dates: [],
11264
+ input: {
11265
+ type: "object",
11266
+ properties: {
11267
+ eventId: {
11268
+ type: "string"
11269
+ },
11270
+ page: {
11271
+ default: 1,
11272
+ type: "integer",
11273
+ exclusiveMinimum: 0,
11274
+ maximum: 9007199254740991
11275
+ },
11276
+ perPage: {
11277
+ default: 10,
11278
+ type: "integer",
11279
+ minimum: 1,
11280
+ maximum: 100
11281
+ },
11282
+ name: {
11283
+ type: "string"
11284
+ },
11285
+ state: {
11286
+ default: "PENDING",
11287
+ type: "string",
11288
+ enum: ["PENDING", "APPROVED", "REJECTED"]
11289
+ }
11290
+ },
11291
+ required: ["eventId"]
11292
+ }
11293
+ },
11294
+ {
11295
+ path: ["human-bingo", "submissions", "respond"],
11296
+ procedure: "event.humanBingo.admin.respondToBingoCardItemSubmission",
11297
+ operation: "mutation",
11298
+ summary: "Approve or reject a Human Bingo card item submission.",
11299
+ effects: ["state-change"],
11300
+ target: "id",
11301
+ dates: [],
11302
+ input: {
11303
+ type: "object",
11304
+ properties: {
11305
+ eventId: {
11306
+ type: "string"
11307
+ },
11308
+ id: {
11309
+ type: "string"
11310
+ },
11311
+ status: {
11312
+ type: "string",
11313
+ enum: ["PENDING", "APPROVED", "REJECTED"]
11314
+ },
11315
+ bingoCardId: {
11316
+ type: "string"
11317
+ }
11318
+ },
11319
+ required: ["eventId", "id", "status", "bingoCardId"]
11320
+ }
11321
+ }
11322
+ ];
11323
+
11324
+ // src/registry/run-registry-command.ts
11325
+ var manifest = command_manifest_default;
11326
+ var registryFlags = [
11327
+ "input",
11328
+ "input-file",
11329
+ "allow-state-change",
11330
+ "allow-delete",
11331
+ "allow-email",
11332
+ "target"
11333
+ ];
11334
+ var isoDateTimePattern = /^\d{4}-\d\d-\d\dT\d\d:\d\d/;
11335
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
11336
+ var commandName = (entry) => `et ${entry.path.join(" ")}`;
11337
+ var findManifestEntry = (positionals) => manifest.find((entry) => entry.path.length === positionals.length && entry.path.every((segment, index) => positionals[index] === segment));
11338
+ var listRegistryCommands = () => manifest.map((entry) => ({
11339
+ command: commandName(entry),
11340
+ summary: entry.summary,
11341
+ effects: entry.effects
11342
+ }));
11343
+ var coerceDateAt = (value, segments, label) => {
11344
+ const [head, ...rest] = segments;
11345
+ if (head === undefined) {
11346
+ if (typeof value !== "string")
11347
+ return value;
11348
+ const parsed = new Date(value);
11349
+ if (!isoDateTimePattern.test(value) || Number.isNaN(parsed.getTime())) {
11350
+ throw new CliUsageError(`${label} must be an ISO 8601 date-time such as 2026-11-20T18:00:00+08:00.`);
11351
+ }
11352
+ return parsed;
11353
+ }
11354
+ const isArray = head.endsWith("[]");
11355
+ const key = isArray ? head.slice(0, -2) : head;
11356
+ const apply = (child) => isArray ? Array.isArray(child) ? child.map((item) => coerceDateAt(item, rest, label)) : child : coerceDateAt(child, rest, label);
11357
+ if (key === "")
11358
+ return apply(value);
11359
+ if (!isRecord(value) || !(key in value))
11360
+ return value;
11361
+ return { ...value, [key]: apply(value[key]) };
11362
+ };
11363
+ var coerceDates = (input, datePaths) => datePaths.reduce((current, path) => coerceDateAt(current, path === "" ? [] : path.split("."), path || "input"), input);
11364
+ var readInput = async (parsed, entry) => {
11365
+ const provided = parsed.flags.has("input") || parsed.flags.has("input-file");
11366
+ if (!entry.input) {
11367
+ if (provided) {
11368
+ throw new CliUsageError(`${commandName(entry)} does not take --input.`);
11369
+ }
11370
+ return;
11371
+ }
11372
+ if (!provided) {
11373
+ if ((entry.input.required ?? []).length > 0) {
11374
+ throw new CliUsageError(`${commandName(entry)} requires --input or --input-file with ${entry.input.required?.join(", ")}. Run it with --help for the schema.`);
11375
+ }
11376
+ return {};
11377
+ }
11378
+ const raw = await readInlineOrFile(parsed, "input", "input-file");
11379
+ let value;
11380
+ try {
11381
+ value = JSON.parse(raw);
11382
+ } catch {
11383
+ throw new CliUsageError("--input must be valid JSON.");
11384
+ }
11385
+ if (!isRecord(value)) {
11386
+ throw new CliUsageError("--input must be a JSON object.");
11387
+ }
11388
+ return coerceDates(value, entry.dates);
11389
+ };
11390
+ var targetText = (value) => {
11391
+ if (typeof value === "string" || typeof value === "number") {
11392
+ return String(value);
11393
+ }
11394
+ if (Array.isArray(value) && value.length > 0 && value.every((item) => typeof item === "string")) {
11395
+ return value.join(",");
11396
+ }
11397
+ return;
11398
+ };
11399
+ var assertConfirmed = (parsed, entry, input) => {
11400
+ if (entry.effects.length === 0)
11401
+ return;
11402
+ const missing = entry.effects.map((effect) => `allow-${effect}`).filter((flag) => parsed.flags.get(flag) !== true);
11403
+ if (missing.length > 0) {
11404
+ throw new CliUsageError(`${commandName(entry)} requires ${missing.map((flag) => `--${flag}`).join(" ")} as explicit acknowledgement.`);
11405
+ }
11406
+ if (!entry.target)
11407
+ return;
11408
+ const expected = targetText(isRecord(input) ? input[entry.target] : undefined);
11409
+ if (expected === undefined) {
11410
+ throw new CliUsageError(`--input must include ${entry.target} so the target can be confirmed.`);
11411
+ }
11412
+ if (getOptionalFlag(parsed, "target") !== expected) {
11413
+ throw new CliUsageError(`--target must exactly match input.${entry.target} (${expected}).`);
11414
+ }
11415
+ };
11416
+ var describe2 = (entry) => ({
11417
+ command: commandName(entry),
11418
+ summary: entry.summary,
11419
+ procedure: entry.procedure,
11420
+ operation: entry.operation,
11421
+ effects: entry.effects,
11422
+ confirmation: entry.effects.length > 0 ? [
11423
+ ...entry.effects.map((effect) => `--allow-${effect}`),
11424
+ ...entry.target ? [
11425
+ `--target <input.${entry.target}${entry.target.endsWith("s") ? " joined with commas" : ""}>`
11426
+ ] : []
11427
+ ] : [],
11428
+ input: entry.input ? "--input '<json>' or --input-file <path> matching inputSchema" : "none",
11429
+ dateFields: entry.dates,
11430
+ inputSchema: entry.input
11431
+ });
11432
+ var resolveProcedureClient = (procedure) => procedure.split(".").reduce((node, segment) => node[segment], api2);
11433
+ var runRegistryCommand = async (input) => {
11434
+ const { parsed, runtime, authenticate } = input;
11435
+ const entry = findManifestEntry(parsed.positionals);
11436
+ if (!entry)
11437
+ return false;
11438
+ if (parsed.flags.has("help")) {
11439
+ assertOnlyFlags(parsed, ["help"]);
11440
+ writeSuccess(runtime, describe2(entry));
11441
+ return true;
11442
+ }
11443
+ assertOnlyFlags(parsed, registryFlags);
11444
+ const procedureInput = await readInput(parsed, entry);
11445
+ assertConfirmed(parsed, entry, procedureInput);
11446
+ await authenticate();
11447
+ const client = resolveProcedureClient(entry.procedure);
11448
+ writeSuccess(runtime, entry.operation === "query" ? await client.query(procedureInput) : await client.mutate(procedureInput));
11449
+ return true;
11450
+ };
11451
+
11452
+ // src/cli.ts
11453
+ var getInstalledCliVersion = () => {
11454
+ try {
11455
+ const packageJson = JSON.parse(readFileSync(resolve(import.meta.dir, "../package.json"), "utf8"));
11456
+ return typeof packageJson.version === "string" ? packageJson.version : "unknown";
11457
+ } catch {
11458
+ return "unknown";
11459
+ }
11460
+ };
11461
+ var parseJsonObject = (value, name) => {
11462
+ let parsed;
11463
+ try {
11464
+ parsed = JSON.parse(value);
11465
+ } catch {
11466
+ throw new CliUsageError(`--${name} must be valid JSON.`);
11467
+ }
11468
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
11469
+ throw new CliUsageError(`--${name} must be a JSON object.`);
11470
+ }
11471
+ return parsed;
11472
+ };
11473
+ var parseAppearance = (value) => parseJsonObject(value, "appearance");
11474
+ var parseCursor = (value) => {
11475
+ const parsed = parseJsonObject(value, "cursor");
11476
+ if (typeof parsed.id !== "string" || parsed.id.length === 0) {
11477
+ throw new CliUsageError("--cursor.id must be a non-empty string.");
11478
+ }
11479
+ if (typeof parsed.createdAt !== "string") {
11480
+ throw new CliUsageError("--cursor.createdAt must be an ISO date string.");
11481
+ }
11482
+ const createdAt = new Date(parsed.createdAt);
11483
+ if (Number.isNaN(createdAt.getTime())) {
11484
+ throw new CliUsageError("--cursor.createdAt must be a valid date.");
11485
+ }
11486
+ return { createdAt, id: parsed.id };
11487
+ };
11488
+ var parseRetainedIds = (value) => {
11489
+ let parsed;
11490
+ try {
11491
+ parsed = JSON.parse(value);
11492
+ } catch {
11493
+ throw new CliUsageError("--retained-ids must be valid JSON.");
11494
+ }
11495
+ if (!Array.isArray(parsed)) {
11496
+ throw new CliUsageError("--retained-ids must be a JSON array.");
11497
+ }
11498
+ if (parsed.length > 100 || parsed.some((id) => typeof id !== "string" || id.length === 0)) {
11499
+ throw new CliUsageError("--retained-ids must contain at most 100 non-empty strings.");
11500
+ }
11501
+ return parsed;
11502
+ };
11503
+ var luckyDrawParticipantFields = new Set(["email", "luckyDrawId", "name"]);
11504
+ var parseLuckyDrawParticipants = (value) => {
11505
+ let parsed;
11506
+ try {
11507
+ parsed = JSON.parse(value);
11508
+ } catch {
11509
+ throw new CliUsageError("--participants must be valid JSON.");
11510
+ }
11511
+ if (!Array.isArray(parsed)) {
11512
+ throw new CliUsageError("--participants must be a JSON array.");
11513
+ }
11514
+ return parsed.map((participant, index) => {
11515
+ if (typeof participant !== "object" || participant === null || Array.isArray(participant)) {
11516
+ throw new CliUsageError(`--participants[${index}] must be an object.`);
11517
+ }
11518
+ if (Object.keys(participant).some((key) => !luckyDrawParticipantFields.has(key))) {
11519
+ throw new CliUsageError(`--participants[${index}] contains an unsupported field.`);
11520
+ }
11521
+ const luckyDrawId = "luckyDrawId" in participant ? participant.luckyDrawId : undefined;
11522
+ const name = "name" in participant ? participant.name : undefined;
11523
+ const email = "email" in participant ? participant.email : undefined;
11524
+ if (typeof luckyDrawId !== "string") {
11525
+ throw new CliUsageError(`--participants[${index}].luckyDrawId must be a string.`);
11526
+ }
11527
+ if (name !== undefined && typeof name !== "string") {
11528
+ throw new CliUsageError(`--participants[${index}].name must be a string.`);
11529
+ }
11530
+ if (email !== undefined && email !== null && typeof email !== "string") {
11531
+ throw new CliUsageError(`--participants[${index}].email must be a string or null.`);
11532
+ }
11533
+ return {
11534
+ luckyDrawId,
11535
+ ...name === undefined ? {} : { name },
11536
+ ...email === undefined ? {} : { email }
11537
+ };
11538
+ });
11539
+ };
11540
+ var parseAppearanceMediaType = (value) => {
11541
+ if (value === "image" || value === "video")
11542
+ return value;
11543
+ throw new CliUsageError("--media-type must be one of: image, video.");
11544
+ };
11545
+ var eventStatuses = ["DRAFT", "ONGOING", "COMPLETED", "ALL"];
11546
+ var archiveStatuses = ["active", "archived", "all"];
11547
+ var parseEventListStatus = (value) => {
11548
+ if (!eventStatuses.some((status) => status === value)) {
11549
+ throw new CliUsageError(`--status must be one of: ${eventStatuses.join(", ")}.`);
11550
+ }
11551
+ return value;
11552
+ };
11553
+ var parseArchiveStatus = (value) => {
11554
+ if (!archiveStatuses.some((status) => status === value)) {
11555
+ throw new CliUsageError(`--archive-status must be one of: ${archiveStatuses.join(", ")}.`);
11556
+ }
11557
+ return value;
11558
+ };
11559
+ var parseCreatableEventType = (value) => {
11560
+ const result = activeEventTypeSchema.safeParse(value);
11561
+ if (!result.success) {
11562
+ throw new CliUsageError(`--type must be one of: ${activeEventTypeSchema.options.join(", ")}.`);
11563
+ }
11564
+ return result.data;
11565
+ };
11566
+ var parseEventTypeList = (value) => {
11567
+ const types = value.split(",").map((type) => type.trim());
11568
+ return [...new Set(types)].map((type) => {
11569
+ const result = activeEventTypeSchema.safeParse(type);
11570
+ if (!result.success) {
11571
+ throw new CliUsageError(`--allowed-event-types entries must be one of: ${activeEventTypeSchema.options.join(", ")}.`);
11572
+ }
11573
+ return result.data;
11574
+ });
11575
+ };
11576
+ var parseIsoDateTime = (value, name) => {
11577
+ if (!/^\d{4}-\d\d-\d\dT\d\d:\d\d/.test(value)) {
11578
+ throw new CliUsageError(`--${name} must be an ISO 8601 date-time such as 2026-11-20T18:00:00+08:00.`);
8041
11579
  }
8042
11580
  const parsed = new Date(value);
8043
11581
  if (Number.isNaN(parsed.getTime())) {
@@ -8056,6 +11594,18 @@ var runCommand = async (parsed, runtime, credentialStore, apiBaseUrl, configureA
8056
11594
  });
8057
11595
  configureAccessToken(accessToken);
8058
11596
  };
11597
+ if (await runRegistryCommand({
11598
+ parsed,
11599
+ runtime,
11600
+ authenticate: ensureAuthentication
11601
+ })) {
11602
+ return;
11603
+ }
11604
+ if (group === "commands" && action === undefined) {
11605
+ assertOnlyFlags(parsed, []);
11606
+ writeSuccess(runtime, { commands: listRegistryCommands() });
11607
+ return;
11608
+ }
8059
11609
  if (parsed.flags.has("help") || group === "help") {
8060
11610
  assertOnlyFlags(parsed, ["help"]);
8061
11611
  writeSuccess(runtime, { usage });