@samva/cli 0.10.0 → 0.12.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 (4) hide show
  1. package/AGENTS.md +9 -2
  2. package/README.md +20 -1
  3. package/dist/bin.mjs +3992 -2383
  4. package/package.json +7 -7
package/AGENTS.md CHANGED
@@ -109,8 +109,10 @@ calls to you, rather than to an installation. Read what exists with `list`, `ver
109
109
  `--cursor`, and `--all --jsonl`.
110
110
 
111
111
  `samva mailboxes` reads and sends as a mailbox: `list` pages with `--limit`, `--cursor`, `--after`,
112
- and `--before`. `get <id>` inspects a mailbox; `update <id> --data <JSON-or-@file>` changes
113
- `displayName`, `defaultFrom`, or `metadata` (merges by key, `null` deletes a key). `pause <id>`
112
+ and `--before`. `create --address <address> --name <name>` makes a mailbox with one address; the
113
+ slug defaults to the address's local part, and a collision asks for `--slug` rather than suffixing.
114
+ `get <id>` inspects a mailbox; `update <id> --data <JSON-or-@file>` changes
115
+ `name`, `defaultFrom`, or `metadata` (merges by key, `null` deletes a key). `pause <id>`
114
116
  stops sending and receiving, and `resume <id>` resumes without backfilling mail received while
115
117
  paused. These mutations support `--dry-run`. `remove <id>` deletes a mailbox (`--yes` outside a terminal, `--dry-run` to
116
118
  preview), `threads` searches, `read` prints a message (human output marks the body as
@@ -132,3 +134,8 @@ the error `reason`, its `status` and `details`, and a `Try:` line; the last hand
132
134
  `--cursor` resumes from, goes to stderr in human mode and into `details.lastCursor` otherwise.
133
135
  `samva extensions dev` follows the same output modes. 401 and 403 exit 4. An expired
134
136
  cursor exits 1 and the next step is to start without `--cursor`. Ctrl+C exits cleanly.
137
+
138
+ `samva subscriptions subscribe` requests one email confirmation with `--email`,
139
+ `--contact-group-id`, and `--from`. Optional flags record signup context, select a template, or
140
+ name the unsubscribe group whose opt-out confirmation clears. A successful receipt means the
141
+ request was accepted; group membership waits for recipient confirmation on the hosted page.
package/README.md CHANGED
@@ -339,6 +339,25 @@ samva campaigns runs recipients <campaign-id> <run-id> --status failed
339
339
  scheduled message. Campaign definitions freeze after their first run. Cancelling a scheduled
340
340
  message or campaign run requires confirmation, and dispatch already in progress may still finish.
341
341
 
342
+ ## Contacts
343
+
344
+ ```sh
345
+ samva contacts list --search ada --limit 25
346
+ samva contacts list --fields plan,score --json
347
+ samva contacts list --custom-field plan --custom-field-value '"pro"' --json
348
+ samva contacts list --all --jsonl
349
+ samva contacts get contact_7q2xk9mvt4znw8rh --json
350
+ ```
351
+
352
+ `list` returns a bounded page with a `nextCursor`; pass it as `--cursor` to resume. `--fields`
353
+ selects the custom-field keys included in each summary. Exact custom-field filtering requires
354
+ both `--custom-field` and `--custom-field-value`, with the value encoded as a JSON scalar
355
+ (for example `'"pro"'`, `42`, `true`, or `null`). `--search`, `--status`, `--after`, and `--before`
356
+ combine with that filter. `get` returns the contact's identities, profile, custom fields, and metadata.
357
+ If a list page fails, machine-readable stderr includes `details.cursor`. Retry with that
358
+ `--cursor` and the same filters to resume after the contacts already printed; a null cursor means
359
+ the first page failed, so retry without `--cursor`.
360
+
342
361
  ## Automation contract
343
362
 
344
363
  Use `--dry-run` on supported mutations to validate input and preview the intended request. `email
@@ -402,7 +421,7 @@ samva email send --help
402
421
  ```
403
422
 
404
423
  Released top-level commands are `login`, `logout`, `org`, `email`, `messages`, `campaigns`,
405
- `scheduled-messages`, `templates`, `brands`, `webhooks`, `profile`, and `help`. Use `samva <command> --help`
424
+ `contacts`, `scheduled-messages`, `templates`, `brands`, `webhooks`, `profile`, and `help`. Use `samva <command> --help`
406
425
  for flags and runnable examples.
407
426
 
408
427
  Test a configured webhook against its real endpoint with an optional JSON payload. `--data` accepts