@go-labs-sg/rsvp 1.8.0 → 1.9.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 +44 -0
  2. package/dist/index.js +63 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -800,6 +800,50 @@ population. Non-operational statuses remain excluded, and permissions, payment
800
800
  gates, duplicate protection, and undo behavior are unchanged. The web panel's
801
801
  realtime connection and manual refresh controls do not add a CLI subscription.
802
802
 
803
+ ### GOSH teams from check-in
804
+
805
+ A registration form can create a GOSH team and route the first time anyone
806
+ from the registration checks in. The first email is the registrant (captain);
807
+ the rest come from each attendee's email answer, in attendee order. RSVP saves
808
+ the request with the check-in and the worker sends it to GOSH afterwards, so
809
+ check-in never waits on GOSH. The crew screen shows **Pending team
810
+ assignment**, then the route and team name, or a failure to follow up.
811
+
812
+ The binding is off by default. Set it up in GOSH first (`gosh rsvp-check-in
813
+ binding set`), then link the RSVP form to the GOSH binding ID:
814
+
815
+ ```sh
816
+ rsvp check-in gosh binding set \
817
+ --allow-state-change \
818
+ --target form_123 \
819
+ --payload '{"organizationId":"org_123","eventId":"evt_123","flowId":"form_123","goshBindingId":"gosh_binding_id","memberEmailOutputKey":"teammate_email","enabled":true}'
820
+ rsvp check-in gosh list --payload '{"organizationId":"org_123","eventId":"evt_123","filter":"DELIVERY_FAILED"}'
821
+ rsvp check-in gosh retry --allow-state-change --target reg_123 \
822
+ --payload '{"organizationId":"org_123","eventId":"evt_123","registrationId":"reg_123"}'
823
+ rsvp check-in gosh reconcile --allow-state-change --target evt_123 \
824
+ --payload '{"organizationId":"org_123","eventId":"evt_123","dryRun":false,"retryFailed":true}'
825
+ ```
826
+
827
+ The worker needs `RSVP_GOSH_API_URL`, `RSVP_GOSH_CHECK_IN_KEY_ID` and
828
+ `RSVP_GOSH_CHECK_IN_SECRET` (the same `whsec_` secret GOSH holds under that key
829
+ ID). Without them, deliveries fail with a configuration error instead of
830
+ retrying forever.
831
+
832
+ - Only the first check-in of a registration sends a team. Teammates checking in
833
+ later, or at the same moment, do not create another team.
834
+ - Undoing the last check-in keeps the GOSH team and route but flags it for
835
+ review. Checking in again reuses the same team.
836
+ - Retry and reconcile reuse the same delivery ID, so GOSH returns the team it
837
+ already created. Reconcile defaults to `dryRun: true` and never rescans QR
838
+ codes or moves teams.
839
+ - A registration without a registrant email is rejected with
840
+ `CAPTAIN_EMAIL_MISSING` instead of making a teammate captain. Add the email,
841
+ then retry.
842
+ - Turning the binding off stops queued deliveries too; they show `PAUSED` and
843
+ attendance is kept. To resume, turn it back on, then run reconcile with
844
+ `"dryRun": false, "retryFailed": true`. Check-ins made while it was off are
845
+ picked up by the same reconcile.
846
+
803
847
  Set `registrationMasterList.includeAttendanceSheets: true` with an approved
804
848
  `event setup step update` (`section: "REGISTRATION_RULES"`) to add response-based
805
849
  **Attending**, **Not attending** (explicit declines only), and **All** tabs,
package/dist/index.js CHANGED
@@ -11135,6 +11135,33 @@ var requestExportInputSchema = eventScopeSchema3.extend({
11135
11135
  var getExportDownloadInputSchema = eventScopeSchema3.extend({
11136
11136
  exportJobId: string2().min(1)
11137
11137
  });
11138
+ // ../validators/src/gosh-check-in.ts
11139
+ var id = string2().trim().min(1).max(128);
11140
+ var upsertGoshCheckInBindingInputSchema = organizationEventByIdInputSchema.extend({
11141
+ enabled: boolean2(),
11142
+ flowId: id,
11143
+ goshBindingId: id,
11144
+ memberEmailOutputKey: string2().trim().min(1).max(120).nullable()
11145
+ });
11146
+ var getGoshCheckInStatusInputSchema = organizationEventByIdInputSchema.extend({ registrationId: id });
11147
+ var listGoshCheckInSyncsInputSchema = organizationEventByIdInputSchema.extend({
11148
+ cursor: id.optional(),
11149
+ filter: _enum([
11150
+ "ALL",
11151
+ "PENDING",
11152
+ "ASSIGNED",
11153
+ "REJECTED",
11154
+ "DELIVERY_FAILED",
11155
+ "PAUSED"
11156
+ ]).default("ALL"),
11157
+ limit: number2().int().min(1).max(100).default(50)
11158
+ });
11159
+ var retryGoshCheckInDeliveryInputSchema = organizationEventByIdInputSchema.extend({ registrationId: id });
11160
+ var reconcileGoshCheckInInputSchema = organizationEventByIdInputSchema.extend({
11161
+ dryRun: boolean2().default(true),
11162
+ limit: number2().int().min(1).max(500).default(200),
11163
+ retryFailed: boolean2().default(false)
11164
+ });
11138
11165
  // ../validators/src/workflow.ts
11139
11166
  var verifyRegistrationIdentityInputSchema = object({
11140
11167
  eventSlug: eventSlugSchema,
@@ -12274,6 +12301,42 @@ var commands = {
12274
12301
  payloadOnly: true,
12275
12302
  summary: "Check in by attendee reference (--payload JSON)."
12276
12303
  },
12304
+ "check-in gosh binding list": {
12305
+ effects: [],
12306
+ operation: (api, input) => api.event.getGoshCheckInBindings.query(input),
12307
+ payloadOnly: true,
12308
+ summary: "List GOSH check-in team bindings for an event (--payload JSON). Requires event.manage."
12309
+ },
12310
+ "check-in gosh binding set": {
12311
+ effects: ["state-change"],
12312
+ operation: (api, input) => api.event.upsertGoshCheckInBinding.mutate(input),
12313
+ payloadOnly: true,
12314
+ summary: "Create or update the GOSH check-in team binding for a registration form: {organizationId, eventId, flowId, goshBindingId, memberEmailOutputKey, enabled} (--payload JSON). Disabled by default. Signing keys live in the RSVP worker environment, never in the binding."
12315
+ },
12316
+ "check-in gosh status": {
12317
+ effects: [],
12318
+ operation: (api, input) => api.event.getGoshCheckInStatus.query(input),
12319
+ payloadOnly: true,
12320
+ summary: "Show a registration's GOSH team route: NOT_CONFIGURED, PENDING, ASSIGNED, REJECTED, DELIVERY_FAILED, PAUSED or UNASSIGNED (--payload JSON). No emails are returned."
12321
+ },
12322
+ "check-in gosh list": {
12323
+ effects: [],
12324
+ operation: (api, input) => api.event.listGoshCheckInSyncs.query(input),
12325
+ payloadOnly: true,
12326
+ summary: "List registrations synced to GOSH teams with revision and status; filter ALL, PENDING, ASSIGNED, REJECTED, DELIVERY_FAILED or PAUSED (--payload JSON)."
12327
+ },
12328
+ "check-in gosh retry": {
12329
+ effects: ["state-change"],
12330
+ operation: (api, input) => api.event.retryGoshCheckInDelivery.mutate(input),
12331
+ payloadOnly: true,
12332
+ summary: "Requeue a registration's latest GOSH team assignment with the same webhook ID, so GOSH returns the stored team rather than creating another (--payload JSON)."
12333
+ },
12334
+ "check-in gosh reconcile": {
12335
+ effects: ["state-change"],
12336
+ operation: (api, input) => api.event.reconcileGoshCheckIn.mutate(input),
12337
+ payloadOnly: true,
12338
+ summary: "Find checked-in registrations missing a GOSH team assignment and enqueue them; retryFailed also requeues failed deliveries. dryRun defaults to true (--payload JSON)."
12339
+ },
12277
12340
  "check-in manual": {
12278
12341
  effects: ["state-change"],
12279
12342
  operation: (api, input) => api.event.manualCheckIn.mutate(input),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/rsvp",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "RSVP CLI for authorized event operations.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",