feat(sms): CLI list --type/--phones + notification sms group + channel-aware recipients (S6)

This commit is contained in:
Joseph Doherty
2026-06-19 10:40:09 -04:00
parent cdfd0ffbd2
commit 73df322a66
7 changed files with 638 additions and 37 deletions
+46 -4
View File
@@ -985,31 +985,47 @@ scadabridge --url <url> notification list
#### `notification create`
Create a notification list with one or more recipients.
Create a notification list with one or more recipients. The `--type` flag selects the
delivery channel and decides which recipient flag is required: `email` (the default)
uses `--emails`; `sms` uses `--phones`. Supplying the wrong recipient flag for the
channel is rejected before the command is sent.
```sh
# Email list (default channel)
scadabridge --url <url> notification create --name <string> --emails <email1,email2,...>
# SMS list
scadabridge --url <url> notification create --name <string> --type sms --phones <e164a,e164b,...>
```
| Option | Required | Description |
|--------|----------|-------------|
| `--name` | yes | Notification list name |
| `--emails` | yes | Comma-separated list of recipient email addresses |
| `--type` | no | Delivery channel: `email` or `sms` (case-insensitive; default `email`) |
| `--emails` | conditional | Comma-separated recipient email addresses. **Required for `--type email`; rejected for `--type sms`.** |
| `--phones` | conditional | Comma-separated recipient phone numbers in E.164. **Required for `--type sms`; rejected for `--type email`.** |
#### `notification update`
Update a notification list. An update **replaces** the whole entity — every required
field below must be supplied, even if unchanged.
field below must be supplied, even if unchanged. As with `create`, `--type` selects the
channel and decides whether `--emails` or `--phones` is required.
```sh
# Email list
scadabridge --url <url> notification update --id <int> --name <string> --emails <email1,email2,...>
# SMS list
scadabridge --url <url> notification update --id <int> --name <string> --type sms --phones <e164a,e164b,...>
```
| Option | Required | Description |
|--------|----------|-------------|
| `--id` | yes | Notification list ID |
| `--name` | yes | List name |
| `--emails` | yes | Comma-separated list of recipient email addresses |
| `--type` | no | Delivery channel: `email` or `sms` (case-insensitive; default `email`) |
| `--emails` | conditional | Comma-separated recipient email addresses. **Required for `--type email`; rejected for `--type sms`.** |
| `--phones` | conditional | Comma-separated recipient phone numbers in E.164. **Required for `--type sms`; rejected for `--type email`.** |
#### `notification delete`
@@ -1049,6 +1065,32 @@ scadabridge --url <url> notification smtp update --id <int> --server <string> --
| `--tls-mode` | no | TLS mode: `None`, `StartTLS`, or `SSL` (preserves existing if omitted) |
| `--credentials` | no | SMTP credentials — `username:password` for Basic, or client secret for OAuth2 (preserves existing if omitted) |
#### `notification sms list`
Show the current SMS (Twilio) configuration. The Twilio **Auth Token is never returned**
— the listing reports it only as a `hasAuthToken` presence flag.
```sh
scadabridge --url <url> notification sms list
```
#### `notification sms update`
Update the SMS (Twilio) configuration.
```sh
scadabridge --url <url> notification sms update --id <int> --account-sid <string> --from-number <string> [--messaging-service-sid <string>] [--api-base-url <string>] [--auth-token <string>]
```
| Option | Required | Description |
|--------|----------|-------------|
| `--id` | yes | SMS config ID |
| `--account-sid` | yes | Twilio Account SID |
| `--from-number` | yes | Sender phone number (E.164) |
| `--messaging-service-sid` | no | Twilio Messaging Service SID. **Omitting it CLEARS the stored value** (the update overwrites it). |
| `--api-base-url` | no | API base URL override (preserves existing if omitted) |
| `--auth-token` | no | Twilio Auth Token. **Omitting it PRESERVES the stored token.** Never printed back. |
---
### `security` — Security settings