@go-labs-sg/rsvp 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -0
- package/dist/index.js +15694 -0
- package/examples/amgen-dinner-dance-2026-template.json +229 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# RSVP CLI (`rsvp`)
|
|
2
|
+
|
|
3
|
+
JSON-first command-line access to RSVP organizations, events, guests, check-in, payments, reporting, retention, and administrative operations.
|
|
4
|
+
|
|
5
|
+
## Runtime and installation
|
|
6
|
+
|
|
7
|
+
The CLI requires [Bun](https://bun.com/docs/installation) 1.4.0 or newer. npm distributes the package, while the installed command runs under Bun.
|
|
8
|
+
|
|
9
|
+
Check whether a compatible Bun version is already available:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If Bun is missing, install it for the current operating system:
|
|
16
|
+
|
|
17
|
+
**macOS (Homebrew)**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
brew install oven-sh/bun/bun
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Windows (PowerShell)**
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
powershell -c "irm bun.sh/install.ps1|iex"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Linux**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -fsSL https://bun.com/install | bash
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If Bun is installed but older than 1.4.0, run `bun upgrade`. Open a new terminal if the installer changes `PATH`, then verify `bun --version` again. Installation agents should skip the platform installer when Bun 1.4.0 or newer is already available.
|
|
36
|
+
|
|
37
|
+
Install and verify the CLI:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
bun add --global @go-labs-sg/rsvp
|
|
41
|
+
rsvp version
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Authentication
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
rsvp auth login
|
|
48
|
+
rsvp auth status
|
|
49
|
+
rsvp auth whoami
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`rsvp auth login` opens RSVP in the system browser. Sign in through RSVP's normal Google-backed web flow if needed, verify that the displayed device and code match the terminal, then click **Authorize CLI**. Existing browser sessions skip another Google login but never skip explicit CLI approval.
|
|
53
|
+
|
|
54
|
+
RSVP CLI access is limited to global administrators. The server rechecks the account's current global role and ban state when issuing, refreshing, and authenticating CLI credentials, so removing the admin role immediately blocks further CLI access.
|
|
55
|
+
|
|
56
|
+
The CLI polls automatically and stores only RSVP-issued credentials through `Bun.secrets`. It does not store Google credentials and has no API-key or environment-variable fallback. Use `rsvp auth logout` to revoke the remote session and remove its local credential. For SSH or containers, pass `--no-browser` and open the printed URL on another device.
|
|
57
|
+
|
|
58
|
+
The default API is `https://rsvp.getout.events`. Override it with `RSVP_API_URL` or `--api-url`; non-local overrides must use HTTPS.
|
|
59
|
+
|
|
60
|
+
## Command safety
|
|
61
|
+
|
|
62
|
+
Use `rsvp help` for the command catalogue. Every response is a JSON envelope on stdout; errors and diagnostics go to stderr. `rsvp manifest` emits the machine-readable command reference for tooling.
|
|
63
|
+
|
|
64
|
+
Commands returning invitee, registration, roster, report, audit, export, payment, or user data require `--ack-sensitive-data`. Mutations require their exact effect gates and a `--target` matching the affected resource in the payload. Depending on the operation, gates include:
|
|
65
|
+
|
|
66
|
+
- `--allow-state-change`
|
|
67
|
+
- `--allow-email`
|
|
68
|
+
- `--allow-delete`
|
|
69
|
+
- `--allow-external-write`
|
|
70
|
+
- `--allow-financial-write`
|
|
71
|
+
|
|
72
|
+
Example:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
rsvp check-in by-reference \
|
|
76
|
+
--allow-state-change \
|
|
77
|
+
--target ABC123 \
|
|
78
|
+
--payload '{"organizationId":"org_123","eventId":"evt_123","referenceCode":"ABC123"}'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
High-impact payment and retention commands remain protected by their matching financial, deletion, external-write, and sensitive-data gates. The API always re-evaluates the authenticated user's current RSVP role, organization membership, event assignment, and resource permissions.
|
|
82
|
+
|
|
83
|
+
## Reusable event configurations
|
|
84
|
+
|
|
85
|
+
`template create` accepts a complete JSON payload, so event-specific workflows remain data rather than product code. This package includes `examples/amgen-dinner-dance-2026-template.json` as a validated example of Staff ID confirmation, employment-based eligibility, conditional fields, guest limits, and categorized decline reasons.
|
|
86
|
+
|
|
87
|
+
Create the template after replacing its organization ID:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
payload="$(jq --arg organizationId "org_123" '.organizationId = $organizationId' examples/amgen-dinner-dance-2026-template.json)"
|
|
91
|
+
rsvp template create \
|
|
92
|
+
--allow-state-change \
|
|
93
|
+
--target "Amgen Dinner & Dance 2026" \
|
|
94
|
+
--payload "$payload"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Instantiate the returned template version through `rsvp template instantiate`, then use the existing staged roster import. The example expects roster columns `email`, `name`, `staffId`, and `employmentType`; only `FTE` and `INTERN` values are configured as eligible profiles. Rules for other events should be expressed in their own template payloads using the same generic contracts.
|