@primitivedotdev/sdk 0.12.0 → 0.14.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/dist/api/generated/index.js +1 -1
- package/dist/api/generated/sdk.gen.js +91 -4
- package/dist/api/index.d.ts +2 -2
- package/dist/{api-CLLpjjWy.js → api-DH-YKt7a.js} +104 -5
- package/dist/{index-K4KbjppU.d.ts → index-Cts9r1sL.d.ts} +625 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oclif/api-command.js +72 -12
- package/dist/oclif/commands/emails-latest.js +118 -0
- package/dist/oclif/commands/send.js +25 -4
- package/dist/oclif/commands/whoami.js +2 -3
- package/dist/oclif/index.js +69 -3
- package/dist/openapi/openapi.generated.js +570 -7
- package/dist/openapi/operations.generated.js +111 -2
- package/oclif.manifest.json +243 -14
- package/package.json +3 -3
|
@@ -371,7 +371,7 @@ export const operationManifest = [
|
|
|
371
371
|
"binaryResponse": false,
|
|
372
372
|
"bodyRequired": false,
|
|
373
373
|
"command": "list-emails",
|
|
374
|
-
"description": "Returns a paginated list of received
|
|
374
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are not\nincluded; this endpoint is the inbox view, not a unified\nsend/receive history.\n\nSupports filtering by domain, status, date range, and free-text\nsearch across subject, sender, and recipient fields.\n",
|
|
375
375
|
"hasJsonBody": false,
|
|
376
376
|
"method": "GET",
|
|
377
377
|
"operationId": "listEmails",
|
|
@@ -435,7 +435,7 @@ export const operationManifest = [
|
|
|
435
435
|
],
|
|
436
436
|
"requestSchema": null,
|
|
437
437
|
"sdkName": "listEmails",
|
|
438
|
-
"summary": "List emails",
|
|
438
|
+
"summary": "List inbound emails",
|
|
439
439
|
"tag": "Emails",
|
|
440
440
|
"tagCommand": "emails"
|
|
441
441
|
},
|
|
@@ -752,6 +752,115 @@ export const operationManifest = [
|
|
|
752
752
|
"tag": "Filters",
|
|
753
753
|
"tagCommand": "filters"
|
|
754
754
|
},
|
|
755
|
+
{
|
|
756
|
+
"binaryResponse": false,
|
|
757
|
+
"bodyRequired": false,
|
|
758
|
+
"command": "get-send-permissions",
|
|
759
|
+
"description": "Returns a flat list of rules describing every recipient the\ncaller may send to. Each rule has a `type`, a kind-specific\npayload, and a human-readable `description`. If any rule\nmatches the recipient, /send-mail will accept the send under\nthe recipient-scope check.\n\nThe endpoint is the answer to \"where can I send\" without\nexposing internal entitlement names. Agents that don't\nrecognize a `type` can still read the `description` prose\nand act on it.\n\nRule kinds, ordered broadest-first so an agent can stop\nscanning at the first match:\n\n 1. `any_recipient` (one entry, only when the org can send\n anywhere): every other rule below it is redundant.\n 2. `managed_zone` (always emitted, one per Primitive-managed\n zone): sends to any address at *.primitive.email or\n *.email.works always succeed; no entitlement required.\n 3. `your_domain` (one per active verified outbound domain\n owned by the org): sends to that domain are approved.\n 4. `address` (one per address that has authenticated\n inbound mail to the org, capped at `meta.address_cap`):\n sends to that exact address are approved.\n\nThe list is informational, not an authorization check.\n/send-mail remains the source of truth on whether an\nindividual send will succeed (it also enforces the\nfrom-address and the `send_mail` entitlement, which are\nnot recipient-scope concerns and are not represented here).\n",
|
|
760
|
+
"hasJsonBody": false,
|
|
761
|
+
"method": "GET",
|
|
762
|
+
"operationId": "getSendPermissions",
|
|
763
|
+
"path": "/send-permissions",
|
|
764
|
+
"pathParams": [],
|
|
765
|
+
"queryParams": [],
|
|
766
|
+
"requestSchema": null,
|
|
767
|
+
"sdkName": "getSendPermissions",
|
|
768
|
+
"summary": "List send-permission rules",
|
|
769
|
+
"tag": "Sending",
|
|
770
|
+
"tagCommand": "sending"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"binaryResponse": false,
|
|
774
|
+
"bodyRequired": false,
|
|
775
|
+
"command": "get-sent-email",
|
|
776
|
+
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n",
|
|
777
|
+
"hasJsonBody": false,
|
|
778
|
+
"method": "GET",
|
|
779
|
+
"operationId": "getSentEmail",
|
|
780
|
+
"path": "/sent-emails/{id}",
|
|
781
|
+
"pathParams": [
|
|
782
|
+
{
|
|
783
|
+
"description": "Resource UUID",
|
|
784
|
+
"enum": null,
|
|
785
|
+
"name": "id",
|
|
786
|
+
"required": true,
|
|
787
|
+
"type": "string"
|
|
788
|
+
}
|
|
789
|
+
],
|
|
790
|
+
"queryParams": [],
|
|
791
|
+
"requestSchema": null,
|
|
792
|
+
"sdkName": "getSentEmail",
|
|
793
|
+
"summary": "Get a sent email by id",
|
|
794
|
+
"tag": "Sending",
|
|
795
|
+
"tagCommand": "sending"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"binaryResponse": false,
|
|
799
|
+
"bodyRequired": false,
|
|
800
|
+
"command": "list-sent-emails",
|
|
801
|
+
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
802
|
+
"hasJsonBody": false,
|
|
803
|
+
"method": "GET",
|
|
804
|
+
"operationId": "listSentEmails",
|
|
805
|
+
"path": "/sent-emails",
|
|
806
|
+
"pathParams": [],
|
|
807
|
+
"queryParams": [
|
|
808
|
+
{
|
|
809
|
+
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
810
|
+
"enum": null,
|
|
811
|
+
"name": "cursor",
|
|
812
|
+
"required": false,
|
|
813
|
+
"type": "string"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"description": "Number of results per page",
|
|
817
|
+
"enum": null,
|
|
818
|
+
"name": "limit",
|
|
819
|
+
"required": false,
|
|
820
|
+
"type": "integer"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"description": "Filter to rows in this status. Useful for polling\nqueued rows that haven't transitioned, auditing\ngate-denied attempts, or listing only successful\ndeliveries.\n",
|
|
824
|
+
"enum": null,
|
|
825
|
+
"name": "status",
|
|
826
|
+
"required": false,
|
|
827
|
+
"type": "string"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"description": "Filter to the row matching a specific server-issued\n`request_id`. The /send-mail response surfaces\n`request_id` on every send; this lookup lets the\ncaller find the historical row for a given live call\nwithout remembering its `id`.\n",
|
|
831
|
+
"enum": null,
|
|
832
|
+
"name": "request_id",
|
|
833
|
+
"required": false,
|
|
834
|
+
"type": "string"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"description": "Filter to rows with the given `client_idempotency_key`.\nMultiple rows can share a key (a retry that hit the\nidempotent-replay path returns the same row, but a\nretry with a DIFFERENT canonical payload under the\nsame key is rejected by /send-mail before the row is\nwritten, so duplicates are bounded).\n",
|
|
838
|
+
"enum": null,
|
|
839
|
+
"name": "idempotency_key",
|
|
840
|
+
"required": false,
|
|
841
|
+
"type": "string"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"description": "Inclusive lower bound on `created_at`.",
|
|
845
|
+
"enum": null,
|
|
846
|
+
"name": "date_from",
|
|
847
|
+
"required": false,
|
|
848
|
+
"type": "string"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"description": "Inclusive upper bound on `created_at`.",
|
|
852
|
+
"enum": null,
|
|
853
|
+
"name": "date_to",
|
|
854
|
+
"required": false,
|
|
855
|
+
"type": "string"
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
"requestSchema": null,
|
|
859
|
+
"sdkName": "listSentEmails",
|
|
860
|
+
"summary": "List outbound sent emails",
|
|
861
|
+
"tag": "Sending",
|
|
862
|
+
"tagCommand": "sending"
|
|
863
|
+
},
|
|
755
864
|
{
|
|
756
865
|
"binaryResponse": false,
|
|
757
866
|
"bodyRequired": true,
|
package/oclif.manifest.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"list-operations": {
|
|
31
31
|
"aliases": [],
|
|
32
32
|
"args": {},
|
|
33
|
-
"description": "List all generated API operations",
|
|
33
|
+
"description": "List all generated API operations as JSON. Useful for piping to `jq` to discover available commands, their request/response schemas, and per-field descriptions. For inspecting a single operation in detail, prefer `primitive describe <command>`.",
|
|
34
34
|
"flags": {},
|
|
35
35
|
"hasDynamicHelp": false,
|
|
36
36
|
"hiddenAliases": [],
|
|
@@ -39,7 +39,32 @@
|
|
|
39
39
|
"pluginName": "@primitivedotdev/sdk",
|
|
40
40
|
"pluginType": "core",
|
|
41
41
|
"strict": true,
|
|
42
|
-
"summary": "List all generated API operations",
|
|
42
|
+
"summary": "List all generated API operations (JSON)",
|
|
43
|
+
"enableJsonFlag": false
|
|
44
|
+
},
|
|
45
|
+
"describe": {
|
|
46
|
+
"aliases": [],
|
|
47
|
+
"args": {
|
|
48
|
+
"command": {
|
|
49
|
+
"description": "Command id to describe, in `<topic>:<command>` form (e.g. `emails:get-email`). Run `primitive list-operations | jq -r '.[] | \"\\(.tagCommand):\\(.command)\"'` to enumerate.",
|
|
50
|
+
"name": "command",
|
|
51
|
+
"required": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"description": "Print the full operation manifest entry for a single API command, including the path, request schema, response schema, and per-field descriptions sourced from the OpenAPI spec.\n\n Useful for clarifying response field meanings (e.g. on inbound EmailDetail, which of `sender`, `from_email`, `from_header`, and `smtp_mail_from` to read), confirming required body fields, or checking a path's parameter shape before composing a request.",
|
|
55
|
+
"examples": [
|
|
56
|
+
"<%= config.bin %> describe emails:get-email",
|
|
57
|
+
"<%= config.bin %> describe sending:send-email"
|
|
58
|
+
],
|
|
59
|
+
"flags": {},
|
|
60
|
+
"hasDynamicHelp": false,
|
|
61
|
+
"hiddenAliases": [],
|
|
62
|
+
"id": "describe",
|
|
63
|
+
"pluginAlias": "@primitivedotdev/sdk",
|
|
64
|
+
"pluginName": "@primitivedotdev/sdk",
|
|
65
|
+
"pluginType": "core",
|
|
66
|
+
"strict": true,
|
|
67
|
+
"summary": "Describe a single API operation in detail",
|
|
43
68
|
"enableJsonFlag": false
|
|
44
69
|
},
|
|
45
70
|
"send": {
|
|
@@ -172,6 +197,50 @@
|
|
|
172
197
|
"summary": "Print the authenticated account (credentials smoke test)",
|
|
173
198
|
"enableJsonFlag": false
|
|
174
199
|
},
|
|
200
|
+
"emails:latest": {
|
|
201
|
+
"aliases": [],
|
|
202
|
+
"args": {},
|
|
203
|
+
"description": "Print the N most recent inbound emails as a one-line-per-row text table. Designed for quick triage and visual scanning. For programmatic access, use `primitive emails:list-emails` (full JSON envelope, cursor pagination, filters).\n\n The displayed id is the first 8 characters of the email's UUID; pass the full UUID (from `emails:list-emails` or `emails:get-email`) to operations that need it.",
|
|
204
|
+
"examples": [
|
|
205
|
+
"<%= config.bin %> emails:latest",
|
|
206
|
+
"<%= config.bin %> emails:latest --limit 25"
|
|
207
|
+
],
|
|
208
|
+
"flags": {
|
|
209
|
+
"api-key": {
|
|
210
|
+
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
211
|
+
"env": "PRIMITIVE_API_KEY",
|
|
212
|
+
"name": "api-key",
|
|
213
|
+
"hasDynamicHelp": false,
|
|
214
|
+
"multiple": false,
|
|
215
|
+
"type": "option"
|
|
216
|
+
},
|
|
217
|
+
"base-url": {
|
|
218
|
+
"description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
|
|
219
|
+
"env": "PRIMITIVE_API_URL",
|
|
220
|
+
"name": "base-url",
|
|
221
|
+
"hasDynamicHelp": false,
|
|
222
|
+
"multiple": false,
|
|
223
|
+
"type": "option"
|
|
224
|
+
},
|
|
225
|
+
"limit": {
|
|
226
|
+
"description": "Number of rows to print (1-100, default 10).",
|
|
227
|
+
"name": "limit",
|
|
228
|
+
"default": 10,
|
|
229
|
+
"hasDynamicHelp": false,
|
|
230
|
+
"multiple": false,
|
|
231
|
+
"type": "option"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"hasDynamicHelp": false,
|
|
235
|
+
"hiddenAliases": [],
|
|
236
|
+
"id": "emails:latest",
|
|
237
|
+
"pluginAlias": "@primitivedotdev/sdk",
|
|
238
|
+
"pluginName": "@primitivedotdev/sdk",
|
|
239
|
+
"pluginType": "core",
|
|
240
|
+
"strict": true,
|
|
241
|
+
"summary": "Show the most recent inbound emails as a compact table",
|
|
242
|
+
"enableJsonFlag": false
|
|
243
|
+
},
|
|
175
244
|
"account:get-account": {
|
|
176
245
|
"aliases": [],
|
|
177
246
|
"args": {},
|
|
@@ -342,7 +411,7 @@
|
|
|
342
411
|
"type": "boolean"
|
|
343
412
|
},
|
|
344
413
|
"spam-threshold": {
|
|
345
|
-
"description": "Global spam score threshold (0-15). Emails scoring above this are rejected.
|
|
414
|
+
"description": "Global spam score threshold (0-15). Emails scoring above this are rejected. Set to null to disable.",
|
|
346
415
|
"name": "spam-threshold",
|
|
347
416
|
"hasDynamicHelp": false,
|
|
348
417
|
"multiple": false,
|
|
@@ -784,7 +853,7 @@
|
|
|
784
853
|
"emails:list-emails": {
|
|
785
854
|
"aliases": [],
|
|
786
855
|
"args": {},
|
|
787
|
-
"description": "Returns a paginated list of received
|
|
856
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are not\nincluded; this endpoint is the inbox view, not a unified\nsend/receive history.\n\nSupports filtering by domain, status, date range, and free-text\nsearch across subject, sender, and recipient fields.\n",
|
|
788
857
|
"flags": {
|
|
789
858
|
"api-key": {
|
|
790
859
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -872,7 +941,7 @@
|
|
|
872
941
|
"pluginName": "@primitivedotdev/sdk",
|
|
873
942
|
"pluginType": "core",
|
|
874
943
|
"strict": true,
|
|
875
|
-
"summary": "List emails",
|
|
944
|
+
"summary": "List inbound emails",
|
|
876
945
|
"enableJsonFlag": false
|
|
877
946
|
},
|
|
878
947
|
"emails:replay-email-webhooks": {
|
|
@@ -1370,6 +1439,166 @@
|
|
|
1370
1439
|
"summary": "Update a filter rule",
|
|
1371
1440
|
"enableJsonFlag": false
|
|
1372
1441
|
},
|
|
1442
|
+
"sending:get-send-permissions": {
|
|
1443
|
+
"aliases": [],
|
|
1444
|
+
"args": {},
|
|
1445
|
+
"description": "Returns a flat list of rules describing every recipient the\ncaller may send to. Each rule has a `type`, a kind-specific\npayload, and a human-readable `description`. If any rule\nmatches the recipient, /send-mail will accept the send under\nthe recipient-scope check.\n\nThe endpoint is the answer to \"where can I send\" without\nexposing internal entitlement names. Agents that don't\nrecognize a `type` can still read the `description` prose\nand act on it.\n\nRule kinds, ordered broadest-first so an agent can stop\nscanning at the first match:\n\n 1. `any_recipient` (one entry, only when the org can send\n anywhere): every other rule below it is redundant.\n 2. `managed_zone` (always emitted, one per Primitive-managed\n zone): sends to any address at *.primitive.email or\n *.email.works always succeed; no entitlement required.\n 3. `your_domain` (one per active verified outbound domain\n owned by the org): sends to that domain are approved.\n 4. `address` (one per address that has authenticated\n inbound mail to the org, capped at `meta.address_cap`):\n sends to that exact address are approved.\n\nThe list is informational, not an authorization check.\n/send-mail remains the source of truth on whether an\nindividual send will succeed (it also enforces the\nfrom-address and the `send_mail` entitlement, which are\nnot recipient-scope concerns and are not represented here).\n",
|
|
1446
|
+
"flags": {
|
|
1447
|
+
"api-key": {
|
|
1448
|
+
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
1449
|
+
"env": "PRIMITIVE_API_KEY",
|
|
1450
|
+
"name": "api-key",
|
|
1451
|
+
"hasDynamicHelp": false,
|
|
1452
|
+
"multiple": false,
|
|
1453
|
+
"type": "option"
|
|
1454
|
+
},
|
|
1455
|
+
"base-url": {
|
|
1456
|
+
"description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
|
|
1457
|
+
"env": "PRIMITIVE_API_URL",
|
|
1458
|
+
"name": "base-url",
|
|
1459
|
+
"hasDynamicHelp": false,
|
|
1460
|
+
"multiple": false,
|
|
1461
|
+
"type": "option"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"hasDynamicHelp": false,
|
|
1465
|
+
"hiddenAliases": [],
|
|
1466
|
+
"id": "sending:get-send-permissions",
|
|
1467
|
+
"pluginAlias": "@primitivedotdev/sdk",
|
|
1468
|
+
"pluginName": "@primitivedotdev/sdk",
|
|
1469
|
+
"pluginType": "core",
|
|
1470
|
+
"strict": true,
|
|
1471
|
+
"summary": "List send-permission rules",
|
|
1472
|
+
"enableJsonFlag": false
|
|
1473
|
+
},
|
|
1474
|
+
"sending:get-sent-email": {
|
|
1475
|
+
"aliases": [],
|
|
1476
|
+
"args": {},
|
|
1477
|
+
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n",
|
|
1478
|
+
"flags": {
|
|
1479
|
+
"api-key": {
|
|
1480
|
+
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
1481
|
+
"env": "PRIMITIVE_API_KEY",
|
|
1482
|
+
"name": "api-key",
|
|
1483
|
+
"hasDynamicHelp": false,
|
|
1484
|
+
"multiple": false,
|
|
1485
|
+
"type": "option"
|
|
1486
|
+
},
|
|
1487
|
+
"base-url": {
|
|
1488
|
+
"description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
|
|
1489
|
+
"env": "PRIMITIVE_API_URL",
|
|
1490
|
+
"name": "base-url",
|
|
1491
|
+
"hasDynamicHelp": false,
|
|
1492
|
+
"multiple": false,
|
|
1493
|
+
"type": "option"
|
|
1494
|
+
},
|
|
1495
|
+
"id": {
|
|
1496
|
+
"description": "Resource UUID",
|
|
1497
|
+
"name": "id",
|
|
1498
|
+
"required": true,
|
|
1499
|
+
"hasDynamicHelp": false,
|
|
1500
|
+
"multiple": false,
|
|
1501
|
+
"type": "option"
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
"hasDynamicHelp": false,
|
|
1505
|
+
"hiddenAliases": [],
|
|
1506
|
+
"id": "sending:get-sent-email",
|
|
1507
|
+
"pluginAlias": "@primitivedotdev/sdk",
|
|
1508
|
+
"pluginName": "@primitivedotdev/sdk",
|
|
1509
|
+
"pluginType": "core",
|
|
1510
|
+
"strict": true,
|
|
1511
|
+
"summary": "Get a sent email by id",
|
|
1512
|
+
"enableJsonFlag": false
|
|
1513
|
+
},
|
|
1514
|
+
"sending:list-sent-emails": {
|
|
1515
|
+
"aliases": [],
|
|
1516
|
+
"args": {},
|
|
1517
|
+
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
1518
|
+
"flags": {
|
|
1519
|
+
"api-key": {
|
|
1520
|
+
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
1521
|
+
"env": "PRIMITIVE_API_KEY",
|
|
1522
|
+
"name": "api-key",
|
|
1523
|
+
"hasDynamicHelp": false,
|
|
1524
|
+
"multiple": false,
|
|
1525
|
+
"type": "option"
|
|
1526
|
+
},
|
|
1527
|
+
"base-url": {
|
|
1528
|
+
"description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
|
|
1529
|
+
"env": "PRIMITIVE_API_URL",
|
|
1530
|
+
"name": "base-url",
|
|
1531
|
+
"hasDynamicHelp": false,
|
|
1532
|
+
"multiple": false,
|
|
1533
|
+
"type": "option"
|
|
1534
|
+
},
|
|
1535
|
+
"cursor": {
|
|
1536
|
+
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
1537
|
+
"name": "cursor",
|
|
1538
|
+
"required": false,
|
|
1539
|
+
"hasDynamicHelp": false,
|
|
1540
|
+
"multiple": false,
|
|
1541
|
+
"type": "option"
|
|
1542
|
+
},
|
|
1543
|
+
"limit": {
|
|
1544
|
+
"description": "Number of results per page",
|
|
1545
|
+
"name": "limit",
|
|
1546
|
+
"required": false,
|
|
1547
|
+
"hasDynamicHelp": false,
|
|
1548
|
+
"multiple": false,
|
|
1549
|
+
"type": "option"
|
|
1550
|
+
},
|
|
1551
|
+
"status": {
|
|
1552
|
+
"description": "Filter to rows in this status. Useful for polling\nqueued rows that haven't transitioned, auditing\ngate-denied attempts, or listing only successful\ndeliveries.\n",
|
|
1553
|
+
"name": "status",
|
|
1554
|
+
"required": false,
|
|
1555
|
+
"hasDynamicHelp": false,
|
|
1556
|
+
"multiple": false,
|
|
1557
|
+
"type": "option"
|
|
1558
|
+
},
|
|
1559
|
+
"request-id": {
|
|
1560
|
+
"description": "Filter to the row matching a specific server-issued\n`request_id`. The /send-mail response surfaces\n`request_id` on every send; this lookup lets the\ncaller find the historical row for a given live call\nwithout remembering its `id`.\n",
|
|
1561
|
+
"name": "request-id",
|
|
1562
|
+
"required": false,
|
|
1563
|
+
"hasDynamicHelp": false,
|
|
1564
|
+
"multiple": false,
|
|
1565
|
+
"type": "option"
|
|
1566
|
+
},
|
|
1567
|
+
"idempotency-key": {
|
|
1568
|
+
"description": "Filter to rows with the given `client_idempotency_key`.\nMultiple rows can share a key (a retry that hit the\nidempotent-replay path returns the same row, but a\nretry with a DIFFERENT canonical payload under the\nsame key is rejected by /send-mail before the row is\nwritten, so duplicates are bounded).\n",
|
|
1569
|
+
"name": "idempotency-key",
|
|
1570
|
+
"required": false,
|
|
1571
|
+
"hasDynamicHelp": false,
|
|
1572
|
+
"multiple": false,
|
|
1573
|
+
"type": "option"
|
|
1574
|
+
},
|
|
1575
|
+
"date-from": {
|
|
1576
|
+
"description": "Inclusive lower bound on `created_at`.",
|
|
1577
|
+
"name": "date-from",
|
|
1578
|
+
"required": false,
|
|
1579
|
+
"hasDynamicHelp": false,
|
|
1580
|
+
"multiple": false,
|
|
1581
|
+
"type": "option"
|
|
1582
|
+
},
|
|
1583
|
+
"date-to": {
|
|
1584
|
+
"description": "Inclusive upper bound on `created_at`.",
|
|
1585
|
+
"name": "date-to",
|
|
1586
|
+
"required": false,
|
|
1587
|
+
"hasDynamicHelp": false,
|
|
1588
|
+
"multiple": false,
|
|
1589
|
+
"type": "option"
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
"hasDynamicHelp": false,
|
|
1593
|
+
"hiddenAliases": [],
|
|
1594
|
+
"id": "sending:list-sent-emails",
|
|
1595
|
+
"pluginAlias": "@primitivedotdev/sdk",
|
|
1596
|
+
"pluginName": "@primitivedotdev/sdk",
|
|
1597
|
+
"pluginType": "core",
|
|
1598
|
+
"strict": true,
|
|
1599
|
+
"summary": "List outbound sent emails",
|
|
1600
|
+
"enableJsonFlag": false
|
|
1601
|
+
},
|
|
1373
1602
|
"sending:reply-to-email": {
|
|
1374
1603
|
"aliases": [],
|
|
1375
1604
|
"args": {},
|
|
@@ -1421,21 +1650,21 @@
|
|
|
1421
1650
|
"type": "option"
|
|
1422
1651
|
},
|
|
1423
1652
|
"body-text": {
|
|
1424
|
-
"description": "Plain-text reply body. At least one of body_text or body_html is required.
|
|
1653
|
+
"description": "Plain-text reply body. At least one of body_text or body_html is required. The combined UTF-8 byte length of body_text and body_html must be at most 262144 bytes (same cap as send-mail).",
|
|
1425
1654
|
"name": "body-text",
|
|
1426
1655
|
"hasDynamicHelp": false,
|
|
1427
1656
|
"multiple": false,
|
|
1428
1657
|
"type": "option"
|
|
1429
1658
|
},
|
|
1430
1659
|
"from": {
|
|
1431
|
-
"description": "Optional override for the reply's From header. Defaults to",
|
|
1660
|
+
"description": "Optional override for the reply's From header. Defaults to the inbound's recipient. Use to add a display name (`\"Acme Support\" <agent@company.com>`) or to reply from a different verified outbound address (e.g. multi-team routing where support@ triages to billing@). The from-domain must be a verified outbound domain for your org, same as send-mail.",
|
|
1432
1661
|
"name": "from",
|
|
1433
1662
|
"hasDynamicHelp": false,
|
|
1434
1663
|
"multiple": false,
|
|
1435
1664
|
"type": "option"
|
|
1436
1665
|
},
|
|
1437
1666
|
"wait": {
|
|
1438
|
-
"description": "When true, wait for the first downstream SMTP delivery outcome before
|
|
1667
|
+
"description": "When true, wait for the first downstream SMTP delivery outcome before returning, mirroring the send-mail `wait` semantics.",
|
|
1439
1668
|
"name": "wait",
|
|
1440
1669
|
"allowNo": false,
|
|
1441
1670
|
"type": "boolean"
|
|
@@ -1487,7 +1716,7 @@
|
|
|
1487
1716
|
"type": "option"
|
|
1488
1717
|
},
|
|
1489
1718
|
"from": {
|
|
1490
|
-
"description": "RFC 5322 From header. The sender domain must be a verified outbound domain
|
|
1719
|
+
"description": "RFC 5322 From header. The sender domain must be a verified outbound domain for your organization.",
|
|
1491
1720
|
"name": "from",
|
|
1492
1721
|
"hasDynamicHelp": false,
|
|
1493
1722
|
"multiple": false,
|
|
@@ -1501,21 +1730,21 @@
|
|
|
1501
1730
|
"type": "option"
|
|
1502
1731
|
},
|
|
1503
1732
|
"to": {
|
|
1504
|
-
"description": "Recipient address. Recipient eligibility depends on your account's outbound
|
|
1733
|
+
"description": "Recipient address. Recipient eligibility depends on your account's outbound entitlements.",
|
|
1505
1734
|
"name": "to",
|
|
1506
1735
|
"hasDynamicHelp": false,
|
|
1507
1736
|
"multiple": false,
|
|
1508
1737
|
"type": "option"
|
|
1509
1738
|
},
|
|
1510
1739
|
"body-html": {
|
|
1511
|
-
"description": "HTML message body. At least one of body_text or body_html is required. The
|
|
1740
|
+
"description": "HTML message body. At least one of body_text or body_html is required. The combined UTF-8 byte length of body_text and body_html must be at most 262144 bytes.",
|
|
1512
1741
|
"name": "body-html",
|
|
1513
1742
|
"hasDynamicHelp": false,
|
|
1514
1743
|
"multiple": false,
|
|
1515
1744
|
"type": "option"
|
|
1516
1745
|
},
|
|
1517
1746
|
"body-text": {
|
|
1518
|
-
"description": "Plain-text message body. At least one of body_text or body_html is required.
|
|
1747
|
+
"description": "Plain-text message body. At least one of body_text or body_html is required. The combined UTF-8 byte length of body_text and body_html must be at most 262144 bytes.",
|
|
1519
1748
|
"name": "body-text",
|
|
1520
1749
|
"hasDynamicHelp": false,
|
|
1521
1750
|
"multiple": false,
|
|
@@ -1535,7 +1764,7 @@
|
|
|
1535
1764
|
"type": "boolean"
|
|
1536
1765
|
},
|
|
1537
1766
|
"wait-timeout-ms": {
|
|
1538
|
-
"description": "Maximum time to wait for a delivery outcome when wait is true. Defaults to
|
|
1767
|
+
"description": "Maximum time to wait for a delivery outcome when wait is true. Defaults to 30000.",
|
|
1539
1768
|
"name": "wait-timeout-ms",
|
|
1540
1769
|
"hasDynamicHelp": false,
|
|
1541
1770
|
"multiple": false,
|
|
@@ -1679,5 +1908,5 @@
|
|
|
1679
1908
|
"enableJsonFlag": false
|
|
1680
1909
|
}
|
|
1681
1910
|
},
|
|
1682
|
-
"version": "0.
|
|
1911
|
+
"version": "0.14.0"
|
|
1683
1912
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primitivedotdev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Official Primitive Node.js SDK — webhook, api, openapi, contract, and parser modules",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"description": "Claim, verify, and manage email domains"
|
|
67
67
|
},
|
|
68
68
|
"emails": {
|
|
69
|
-
"description": "List, inspect, and manage received emails"
|
|
69
|
+
"description": "List, inspect, and manage received emails. Use `primitive emails:latest` for a one-line-per-email summary of recent inbound mail."
|
|
70
70
|
},
|
|
71
71
|
"sending": {
|
|
72
|
-
"description": "Send outbound emails
|
|
72
|
+
"description": "Send outbound emails. For replies to inbound mail, use `sending:reply-to-email --id <inbound-id>` (threading and Re: subject derived server-side); for fresh sends, use `sending:send-email` or the `primitive send` shortcut."
|
|
73
73
|
},
|
|
74
74
|
"endpoints": {
|
|
75
75
|
"description": "Manage webhook endpoints that receive email events"
|