@go-labs-sg/rsvp 0.16.0 → 0.17.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.
Files changed (3) hide show
  1. package/README.md +100 -0
  2. package/dist/index.js +20 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -368,6 +368,106 @@ rsvp event seating table update \
368
368
  --payload '{"organizationId":"org_123","eventId":"evt_123","tableId":"table_123","label":"Table 1"}'
369
369
  ```
370
370
 
371
+ ## Live seating and seat-change notifications
372
+
373
+ Deploy the matching API and worker before using these commands from an updated
374
+ CLI. They retain browser authentication, event permissions and sensitive-field
375
+ grants; the CLI does not implement separate seating rules.
376
+
377
+ ```sh
378
+ rsvp event seating live get --ack-sensitive-data \
379
+ --payload '{"organizationId":"org_123","eventId":"evt_123"}'
380
+ rsvp event seating occupants list --ack-sensitive-data \
381
+ --payload '{"organizationId":"org_123","eventId":"evt_123","seatMapId":"map_123","categoryValue":"finance","limit":25,"cursor":0}'
382
+ rsvp people registration edit get --ack-sensitive-data \
383
+ --payload '{"organizationId":"org_123","eventId":"evt_123","registrationId":"reg_123"}'
384
+ ```
385
+
386
+ Occupants supports optional `tableId`, `department`, `categoryValue` and `query`
387
+ filters. `categoryValue` is the canonical (trimmed, case-normalized) value
388
+ returned by the occupant response's category legend; it is not an arbitrary
389
+ field lookup. Follow `nextCursor` until null; counts and department/category
390
+ context contain only permitted data. The API projects all active occupants of the
391
+ selected map in batches before filtering; small pages are not database-level
392
+ filtered pagination.
393
+
394
+ ### Imported-field seating categories
395
+
396
+ Category coloring is optional and disabled by default. An authorized organizer
397
+ can read the eligible imported fields and their actual event values, then save one
398
+ selected field and a unique six-digit hex color for each canonical value. The
399
+ server includes unregistered invitees when it discovers the imported values;
400
+ guests inherit the host's imported value. It excludes identity, contact, system,
401
+ nested and multi-value data, and enforces sensitive-field grants before it returns
402
+ field keys, values, legends, filters or seat colors.
403
+
404
+ ```sh
405
+ rsvp event seating category config get --ack-sensitive-data \
406
+ --payload '{"organizationId":"org_123","eventId":"evt_123"}'
407
+
408
+ rsvp event seating category config update \
409
+ --ack-sensitive-data --allow-state-change --target evt_123 \
410
+ --payload '{"organizationId":"org_123","eventId":"evt_123","configurationVersion":3,"config":{"enabled":true,"fieldKey":"department","seed":"chosen-once","colors":[{"value":"finance","color":"#155e75"},{"value":"operations","color":"#7c2d12"}]}}'
411
+ ```
412
+
413
+ The get command is sensitive-data acknowledged. The update command additionally
414
+ requires explicit state-change confirmation and a target matching `eventId`; it
415
+ forwards `configurationVersion` for optimistic concurrency and the complete
416
+ configuration payload unchanged. It never assigns colors, interprets imported
417
+ values, or bypasses authorization in the CLI.
418
+
419
+ When categories are enabled, the API preserves saved mappings while new imported
420
+ values arrive and assigns only unused colors. Distinct groups never share a color;
421
+ there is an explicit capacity error instead of palette reuse or truncation. An
422
+ explicit auto-assign-all save is the only intentional re-randomization. Blank,
423
+ missing, unreadable and unauthorized values stay neutral. Disable the setting to
424
+ return ordinary seating status colors while retaining the selected field and
425
+ stable mappings. Clearing the selected field explicitly resets its mappings. Deploy matching web, API and CLI releases, then
426
+ perform separate live acceptance before enabling it for an event.
427
+
428
+ `people registration update` forwards the organizer-edit API. Supply the current
429
+ `expectedVersion`, audit `reason`, and complete `seats` array preserving unchanged
430
+ party assignments. Realtime-enabled changes additionally require valid exact-seat
431
+ holds through the existing realtime protocol; the CLI does not acquire holds.
432
+ Use `--ack-sensitive-data --allow-state-change --target <registration-id>`.
433
+ Saving does not send email unless the payload opts in. Re-read the revision
434
+ after conflicts.
435
+
436
+ To notify for a seat-only move, add `seatChangeNotice` to the same save. The
437
+ notice is queued in the move's database transaction, so the move and notice
438
+ request commit together or not at all; this additionally requires
439
+ `--allow-email`. It is rejected alongside identity, contact or response edits.
440
+
441
+ ```sh
442
+ rsvp people registration update \
443
+ --ack-sensitive-data --allow-state-change --allow-email --target reg_123 \
444
+ --payload '{"organizationId":"org_123","eventId":"evt_123","registrationId":"reg_123","expectedVersion":4,"reason":"Moved to finance table","seats":[{"registrationAttendeeId":"att_1","seatId":"seat_9"},{"registrationAttendeeId":"att_2","seatId":"seat_2"}],"seatChangeNotice":{"idempotencyKey":"4d68a320-013d-43c7-bfcc-d1126827d8c5"}}'
445
+ ```
446
+
447
+ A separate manual notice for an already committed revision remains available:
448
+
449
+ ```sh
450
+ rsvp people registration confirmation resend \
451
+ --allow-email --allow-state-change --target reg_123 \
452
+ --payload '{"organizationId":"org_123","eventId":"evt_123","registrationId":"reg_123","purpose":"SEAT_CHANGE","expectedRegistrationVersion":5,"idempotencyKey":"4d68a320-013d-43c7-bfcc-d1126827d8c5"}'
453
+ ```
454
+
455
+ Replace the sample UUID with a new UUID for a new request; reuse that same UUID
456
+ for retries of that request. Omitted `purpose` remains `CONFIRMATION`; seat-change
457
+ requests require the committed `expectedRegistrationVersion`. Queue acceptance
458
+ is not delivery. Stale revisions, unavailable copy and current permissions are
459
+ checked by the server, and delivery rechecks the current recipient and active
460
+ seats without including names, private answers or QR codes.
461
+
462
+ Legacy copy is `seatChangeNotification: {enabled, subject, body}` in the
463
+ `REGISTRATION_RULES` payload for `event setup step update`, with the current
464
+ configuration version. Configurable copy is
465
+ `definition.communications.participant.seatChange: {enabled, subject, body}`;
466
+ merge into the complete named draft, preview, save with its revision, read back,
467
+ then publish only with separate approval. Existing responses use their saved
468
+ published version. Both default disabled/blank; missing copy never falls back to
469
+ confirmation copy. No event-specific copy is supplied or enabled by this change.
470
+
371
471
  ## Audience tiers
372
472
 
373
473
  Audience tiers control which invitees can use a seat or table. List the tiers and their current invitee, table, and seat counts with:
package/dist/index.js CHANGED
@@ -6654,6 +6654,18 @@ Object.assign(commands, {
6654
6654
  "event reminder counts": payloadCommand((api, input) => api.event.getReminderSegmentCounts.query(input), "Get reminder segment counts (--payload JSON).", ["sensitive-data"]),
6655
6655
  "event rsvp manifest": payloadCommand((api, input) => api.event.getRsvpManifest.query(input), "Get the caller's registration manifest (--payload JSON).", ["sensitive-data"]),
6656
6656
  "event seating availability": payloadCommand((api, input) => api.event.getSeatAvailability.query(input), "Get seat availability (--payload JSON)."),
6657
+ "event seating live get": payloadCommand((api, input) => api.event.getLiveSeating.query(input), "Get the selected live seating map (--payload JSON).", ["sensitive-data"]),
6658
+ "event seating category config get": payloadCommand((api, input) => api.event.getSeatingCategoryConfig.query(input), "Get authorized imported-field seating category settings (--payload JSON).", ["sensitive-data"]),
6659
+ "event seating category config update": payloadCommand((api, input) => api.event.updateSeatingCategoryConfig.mutate(input), "Save imported-field seating category settings with configurationVersion (--payload JSON).", ["sensitive-data", "state-change"], "eventId"),
6660
+ "event seating occupants list": payloadCommand((api, input) => api.event.getLiveSeatingOccupants.query(input), "List permitted occupants by seatMapId, tableId, department, categoryValue and query; follow nextCursor (--payload JSON).", ["sensitive-data"]),
6661
+ "people registration edit get": payloadCommand((api, input) => api.event.getRegistrationForEdit.query(input), "Get current revision, permitted attendees, eligible seats and notification readiness (--payload JSON).", ["sensitive-data"]),
6662
+ "people registration update": {
6663
+ ...payloadCommand((api, input) => api.event.updateRegistration.mutate(input), "Save organizer edits with expectedVersion and reason; seating requires full-party seats and configured holds. Optional seatChangeNotice queues a seat-change notice atomically with a seat-only save (--payload JSON).", ["sensitive-data", "state-change"], "registrationId"),
6664
+ conditionalEffects: [
6665
+ { effect: "email", whenPayloadField: "seatChangeNotice" }
6666
+ ]
6667
+ },
6668
+ "people registration confirmation resend": payloadCommand((api, input) => api.event.resendRegistrationConfirmation.mutate(input), "Queue CONFIRMATION (default) or SEAT_CHANGE with expectedRegistrationVersion and idempotencyKey; retries reuse that key (--payload JSON).", ["email", "state-change"], "registrationId"),
6657
6669
  "event realtime-token issue": payloadCommand((api, input) => api.event.issueRealtimeToken.mutate(input), "Issue a realtime token (--payload JSON).", ["sensitive-data", "state-change"]),
6658
6670
  "event mine list": payloadCommand((api, input) => api.event.listMyEvents.query(input), "List the caller's events (--payload JSON)."),
6659
6671
  "event reminder list": payloadCommand((api, input) => api.event.listReminderSegments.query(input), "List reminder segments (--payload JSON).", ["sensitive-data"]),
@@ -6727,6 +6739,7 @@ var getCommandManifest = () => ({
6727
6739
  summary: "Show the CLI version and configured API base URL."
6728
6740
  },
6729
6741
  ...Object.entries(commands).map(([path, command]) => ({
6742
+ ...command.conditionalEffects ? { conditionalEffects: command.conditionalEffects } : {},
6730
6743
  effects: command.effects,
6731
6744
  path,
6732
6745
  summary: command.summary
@@ -6968,6 +6981,7 @@ var collectTargets = (input, targetKey) => {
6968
6981
  }
6969
6982
  return [];
6970
6983
  };
6984
+ var getConditionalEffects = (definition, input) => (definition.conditionalEffects ?? []).flatMap(({ effect, whenPayloadField }) => input && Object.hasOwn(input, whenPayloadField) && Reflect.get(input, whenPayloadField) != null ? [effect] : []);
6971
6985
  var requireEffects = async (effects, flags, confirm, input, targetKey) => {
6972
6986
  if (effects.length === 0)
6973
6987
  return;
@@ -7131,7 +7145,12 @@ Waiting for approval\u2026
7131
7145
  if (!definition)
7132
7146
  throw new CliUsageError("Unknown command. Run 'rsvp help' to list commands.");
7133
7147
  const input = getInput(parsed.flags, definition.payloadOnly, definition.scope);
7134
- await requireEffects(definition.effects, parsed.flags, dependencies.confirm, input, definition.targetKey);
7148
+ await requireEffects([
7149
+ ...new Set([
7150
+ ...definition.effects,
7151
+ ...getConditionalEffects(definition, input)
7152
+ ])
7153
+ ], parsed.flags, dependencies.confirm, input, definition.targetKey);
7135
7154
  const accessToken = !dependencies.apiClient && !definition.public ? await getAuthenticatedAccessToken({
7136
7155
  apiBaseUrl,
7137
7156
  store: getCredentialStore()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/rsvp",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "RSVP CLI for authorized event operations.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",