@primitivedotdev/sdk 1.23.0 → 1.25.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.
@@ -29,6 +29,10 @@ const openapiDocument = {
29
29
  }],
30
30
  "security": [{ "BearerAuth": [] }],
31
31
  "tags": [
32
+ {
33
+ "name": "Agent Connections",
34
+ "description": "Manage address-bound connections to external agent runtimes."
35
+ },
32
36
  {
33
37
  "name": "CLI",
34
38
  "description": "Browser-assisted CLI authentication"
@@ -1240,6 +1244,100 @@ const openapiDocument = {
1240
1244
  }
1241
1245
  }
1242
1246
  },
1247
+ "/emails/{id}/attachments/{part_index}": {
1248
+ "parameters": [{ "$ref": "#/components/parameters/ResourceId" }, { "$ref": "#/components/parameters/AttachmentPartIndex" }],
1249
+ "get": {
1250
+ "operationId": "downloadEmailAttachmentPart",
1251
+ "summary": "Download one inbound email attachment",
1252
+ "description": "Pending service release. This contract does not establish live availability.\nDownloads the original bytes of one ordinary email attachment, selected by\nits metadata `part_index`, not its position in an attachments array. Refresh\nthe email detail after `attachment_changed` before choosing an index again.\nUses bearer authentication only; signed raw-email download tokens are not accepted.\nA paired-agent credential may read only a message addressed to its claimed address.\nFunction credentials are denied. Other bearer credentials retain their\nexisting email access boundaries. This endpoint serves email bytes only.\n",
1253
+ "tags": ["Emails"],
1254
+ "security": [{ "BearerAuth": [] }],
1255
+ "responses": {
1256
+ "200": { "$ref": "#/components/responses/AttachmentPart" },
1257
+ "400": { "$ref": "#/components/responses/ValidationError" },
1258
+ "401": { "$ref": "#/components/responses/Unauthorized" },
1259
+ "403": { "$ref": "#/components/responses/Forbidden" },
1260
+ "404": {
1261
+ "description": "Missing or inaccessible message, or missing attachment part",
1262
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1263
+ },
1264
+ "409": {
1265
+ "description": "attachment_changed; refresh email detail before selecting a part again",
1266
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1267
+ },
1268
+ "410": {
1269
+ "description": "content_discarded; the original content is no longer available",
1270
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1271
+ },
1272
+ "413": {
1273
+ "description": "attachment_limit_exceeded; the attachment exceeds download limits",
1274
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1275
+ },
1276
+ "502": {
1277
+ "description": "attachment_integrity_failed; stored content failed integrity validation",
1278
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1279
+ },
1280
+ "503": {
1281
+ "description": "attachment_not_ready or attachment_storage_unavailable; retry after the indicated delay",
1282
+ "headers": { "Retry-After": {
1283
+ "description": "Delay in seconds before retrying this read",
1284
+ "schema": {
1285
+ "type": "integer",
1286
+ "minimum": 0
1287
+ }
1288
+ } },
1289
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1290
+ }
1291
+ }
1292
+ }
1293
+ },
1294
+ "/sent-emails/{id}/attachments/{part_index}": {
1295
+ "parameters": [{ "$ref": "#/components/parameters/ResourceId" }, { "$ref": "#/components/parameters/AttachmentPartIndex" }],
1296
+ "get": {
1297
+ "operationId": "downloadSentAttachmentPart",
1298
+ "summary": "Download one sent email attachment",
1299
+ "description": "Pending service release. This contract does not establish live availability.\nDownloads the original bytes of one ordinary email attachment, selected by\nits metadata `part_index`, not its position in an attachments array. Refresh\nthe email detail after `attachment_changed` before choosing an index again.\nUses bearer authentication only; signed raw-email download tokens are not accepted.\nA paired-agent credential may read only mail sent from its claimed address.\nReceiving a copy does not authorize downloading another sender's sent content.\nFunction credentials are denied. Other bearer credentials retain their\nexisting email access boundaries. This endpoint serves email bytes only.\n",
1300
+ "tags": ["Sending"],
1301
+ "security": [{ "BearerAuth": [] }],
1302
+ "responses": {
1303
+ "200": { "$ref": "#/components/responses/AttachmentPart" },
1304
+ "400": { "$ref": "#/components/responses/ValidationError" },
1305
+ "401": { "$ref": "#/components/responses/Unauthorized" },
1306
+ "403": { "$ref": "#/components/responses/Forbidden" },
1307
+ "404": {
1308
+ "description": "Missing or inaccessible message, or missing attachment part",
1309
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1310
+ },
1311
+ "409": {
1312
+ "description": "attachment_changed; refresh email detail before selecting a part again",
1313
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1314
+ },
1315
+ "410": {
1316
+ "description": "content_discarded; the original content is no longer available",
1317
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1318
+ },
1319
+ "413": {
1320
+ "description": "attachment_limit_exceeded; the attachment exceeds download limits",
1321
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1322
+ },
1323
+ "502": {
1324
+ "description": "attachment_integrity_failed; stored content failed integrity validation",
1325
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1326
+ },
1327
+ "503": {
1328
+ "description": "attachment_not_ready or attachment_storage_unavailable; retry after the indicated delay",
1329
+ "headers": { "Retry-After": {
1330
+ "description": "Delay in seconds before retrying this read",
1331
+ "schema": {
1332
+ "type": "integer",
1333
+ "minimum": 0
1334
+ }
1335
+ } },
1336
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1337
+ }
1338
+ }
1339
+ }
1340
+ },
1243
1341
  "/emails/{id}/reply": {
1244
1342
  "parameters": [{ "$ref": "#/components/parameters/ResourceId" }],
1245
1343
  "post": {
@@ -1270,6 +1368,10 @@ const openapiDocument = {
1270
1368
  "401": { "$ref": "#/components/responses/Unauthorized" },
1271
1369
  "403": { "$ref": "#/components/responses/Forbidden" },
1272
1370
  "404": { "$ref": "#/components/responses/NotFound" },
1371
+ "410": {
1372
+ "description": "The prior send was deleted. Its idempotency key or automatic reply suppression remains reserved, so this request will not send another message. Do not retry with a new key to bypass this refusal.",
1373
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
1374
+ },
1273
1375
  "422": {
1274
1376
  "description": "Inbound is not repliable: the row exists but lacks a\n`message_id` (no thread anchor) or a `recipient` (cannot\nderive the From address).\n",
1275
1377
  "content": { "application/json": {
@@ -2162,6 +2264,10 @@ const openapiDocument = {
2162
2264
  "400": { "$ref": "#/components/responses/ValidationError" },
2163
2265
  "401": { "$ref": "#/components/responses/Unauthorized" },
2164
2266
  "403": { "$ref": "#/components/responses/Forbidden" },
2267
+ "410": {
2268
+ "description": "The prior send was deleted. Its idempotency key or automatic reply suppression remains reserved, so this request will not send another message. Do not retry with a new key to bypass this refusal.",
2269
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
2270
+ },
2165
2271
  "429": { "$ref": "#/components/responses/RateLimited" },
2166
2272
  "500": { "$ref": "#/components/responses/InternalError" },
2167
2273
  "502": { "$ref": "#/components/responses/BadGateway" },
@@ -2284,6 +2390,50 @@ const openapiDocument = {
2284
2390
  }
2285
2391
  } },
2286
2392
  "/sent-emails/{id}": {
2393
+ "delete": {
2394
+ "operationId": "deleteSentEmail",
2395
+ "summary": "Delete a sent email",
2396
+ "description": "Permanently deletes sender mailbox history and its owned attachment archive\nand transient payload. Allows delivered, bounced, agent_failed, gate_denied,\ncanceled, deferred and wait_timeout; other states return 409. Cancel scheduled\nsends first. This does not recall or cancel delivery already admitted.\nRecipient copies, received replies and independent audit records are preserved.\nOccupied idempotency keys and delivered-reply deduplication remain reserved.\nKeys already released by cancellation, gate denial or a never-attempted failure\nremain reusable. Repeating a completed deletion succeeds; unknown or foreign\nIDs return 404. Organization API keys, sessions and OAuth are supported;\nFunction and connected-agent credentials are denied.\n",
2397
+ "tags": ["Sending"],
2398
+ "parameters": [{ "$ref": "#/components/parameters/ResourceId" }],
2399
+ "responses": {
2400
+ "200": {
2401
+ "description": "Deletion completed",
2402
+ "content": { "application/json": { "schema": {
2403
+ "type": "object",
2404
+ "required": ["success", "data"],
2405
+ "properties": {
2406
+ "success": {
2407
+ "type": "boolean",
2408
+ "const": true
2409
+ },
2410
+ "data": {
2411
+ "type": "object",
2412
+ "required": ["deleted"],
2413
+ "properties": { "deleted": {
2414
+ "type": "boolean",
2415
+ "const": true
2416
+ } }
2417
+ }
2418
+ }
2419
+ } } }
2420
+ },
2421
+ "400": { "$ref": "#/components/responses/ValidationError" },
2422
+ "401": { "$ref": "#/components/responses/Unauthorized" },
2423
+ "403": { "$ref": "#/components/responses/Forbidden" },
2424
+ "404": { "$ref": "#/components/responses/NotFound" },
2425
+ "409": { "$ref": "#/components/responses/Conflict" },
2426
+ "429": { "$ref": "#/components/responses/RateLimited" },
2427
+ "500": {
2428
+ "description": "Database failure. Files may already be removed while the message record and cleanup references remain. Retry the same DELETE; failure does not restore files.",
2429
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
2430
+ },
2431
+ "503": {
2432
+ "description": "Storage cleanup failed. Some files may already be removed; the message record and cleanup references remain for an idempotent retry. Failure does not restore files.",
2433
+ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
2434
+ }
2435
+ }
2436
+ },
2287
2437
  "get": {
2288
2438
  "operationId": "getSentEmail",
2289
2439
  "summary": "Get a sent email by id",
@@ -2344,6 +2494,52 @@ const openapiDocument = {
2344
2494
  }
2345
2495
  }
2346
2496
  },
2497
+ "/agent-connections/{address}/remove": { "post": {
2498
+ "operationId": "removeAgentConnection",
2499
+ "summary": "Remove a revoked agent connection",
2500
+ "description": "Permanently removes a revoked connection record. Requires an organization\nowner or admin session or OAuth token; organization API keys are denied.\nDisconnect first using DELETE /agent-connections/{address}. An active\nconnection returns 409 connection_not_revoked. Missing or already removed\nrecords return 404. Mail, address notes, domains and external runtimes are\npreserved. The same address can be paired again with a new invitation;\nold credentials and invitations remain invalid.\n",
2501
+ "tags": ["Agent Connections"],
2502
+ "parameters": [{
2503
+ "name": "address",
2504
+ "in": "path",
2505
+ "required": true,
2506
+ "description": "The email address identifying the revoked connection.",
2507
+ "schema": {
2508
+ "type": "string",
2509
+ "format": "email",
2510
+ "maxLength": 254
2511
+ }
2512
+ }],
2513
+ "responses": {
2514
+ "200": {
2515
+ "description": "Deletion completed",
2516
+ "content": { "application/json": { "schema": {
2517
+ "type": "object",
2518
+ "required": ["success", "data"],
2519
+ "properties": {
2520
+ "success": {
2521
+ "type": "boolean",
2522
+ "const": true
2523
+ },
2524
+ "data": {
2525
+ "type": "object",
2526
+ "required": ["deleted"],
2527
+ "properties": { "deleted": {
2528
+ "type": "boolean",
2529
+ "const": true
2530
+ } }
2531
+ }
2532
+ }
2533
+ } } }
2534
+ },
2535
+ "400": { "$ref": "#/components/responses/ValidationError" },
2536
+ "401": { "$ref": "#/components/responses/Unauthorized" },
2537
+ "403": { "$ref": "#/components/responses/Forbidden" },
2538
+ "404": { "$ref": "#/components/responses/NotFound" },
2539
+ "409": { "$ref": "#/components/responses/Conflict" },
2540
+ "429": { "$ref": "#/components/responses/RateLimited" }
2541
+ }
2542
+ } },
2347
2543
  "/sent-emails/{id}/cancel": {
2348
2544
  "parameters": [{ "$ref": "#/components/parameters/ResourceId" }],
2349
2545
  "post": {
@@ -3923,6 +4119,18 @@ const openapiDocument = {
3923
4119
  }
3924
4120
  },
3925
4121
  "parameters": {
4122
+ "AttachmentPartIndex": {
4123
+ "name": "part_index",
4124
+ "in": "path",
4125
+ "required": true,
4126
+ "description": "The attachment metadata `part_index`, not its offset in the attachments array",
4127
+ "schema": {
4128
+ "type": "integer",
4129
+ "format": "int32",
4130
+ "minimum": 0,
4131
+ "maximum": 2147483647
4132
+ }
4133
+ },
3926
4134
  "ResourceId": {
3927
4135
  "name": "id",
3928
4136
  "in": "path",
@@ -3993,6 +4201,33 @@ const openapiDocument = {
3993
4201
  }
3994
4202
  },
3995
4203
  "responses": {
4204
+ "AttachmentPart": {
4205
+ "description": "Original attachment bytes; never a JSON envelope or a base64 string",
4206
+ "content": { "application/octet-stream": { "schema": {
4207
+ "type": "string",
4208
+ "format": "binary"
4209
+ } } },
4210
+ "headers": {
4211
+ "X-Content-SHA256": {
4212
+ "description": "SHA-256 hex digest of the original bytes",
4213
+ "schema": {
4214
+ "type": "string",
4215
+ "pattern": "^[a-fA-F0-9]{64}$"
4216
+ }
4217
+ },
4218
+ "Content-Disposition": {
4219
+ "description": "Safe attachment disposition with a sanitized filename",
4220
+ "schema": { "type": "string" }
4221
+ },
4222
+ "Cache-Control": {
4223
+ "description": "Attachment responses are private and must not be stored by caches",
4224
+ "schema": {
4225
+ "type": "string",
4226
+ "example": "private, no-store"
4227
+ }
4228
+ }
4229
+ }
4230
+ },
3996
4231
  "PullContentGone": {
3997
4232
  "description": "Queued content is no longer available",
3998
4233
  "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
@@ -5011,6 +5246,17 @@ const openapiDocument = {
5011
5246
  "conflict",
5012
5247
  "mx_conflict",
5013
5248
  "not_scheduled",
5249
+ "sent_email_deleted",
5250
+ "sent_email_not_settled",
5251
+ "sent_email_changed",
5252
+ "sent_email_cleanup_failed",
5253
+ "connection_not_revoked",
5254
+ "attachment_changed",
5255
+ "content_discarded",
5256
+ "attachment_limit_exceeded",
5257
+ "attachment_integrity_failed",
5258
+ "attachment_not_ready",
5259
+ "attachment_storage_unavailable",
5014
5260
  "outbound_disabled",
5015
5261
  "cannot_send_from_domain",
5016
5262
  "recipient_not_allowed",
@@ -7820,6 +8066,53 @@ const openapiDocument = {
7820
8066
  "body_html": {
7821
8067
  "type": ["string", "null"],
7822
8068
  "description": "HTML body sent on the wire. Null when the send\ncarried only a plain-text body, or when bodies\nhave been discarded post-send.\n"
8069
+ },
8070
+ "attachments": {
8071
+ "type": "array",
8072
+ "description": "Metadata for submitted inline attachments; download availability is reported separately. Metadata may exist when the archive is unavailable, and legacy sends may have no metadata. Offloaded payload files are not included in the inline archive.",
8073
+ "items": {
8074
+ "type": "object",
8075
+ "description": "Metadata for one submitted inline attachment.",
8076
+ "additionalProperties": true,
8077
+ "properties": {
8078
+ "filename": { "type": ["string", "null"] },
8079
+ "content_type": { "type": "string" },
8080
+ "size_bytes": {
8081
+ "type": "integer",
8082
+ "minimum": 0,
8083
+ "maximum": 9007199254740991
8084
+ },
8085
+ "sha256": { "type": "string" },
8086
+ "part_index": {
8087
+ "type": "integer",
8088
+ "minimum": 0,
8089
+ "maximum": 9007199254740991
8090
+ },
8091
+ "tar_path": { "type": "string" }
8092
+ },
8093
+ "required": [
8094
+ "filename",
8095
+ "content_type",
8096
+ "size_bytes",
8097
+ "sha256",
8098
+ "part_index",
8099
+ "tar_path"
8100
+ ]
8101
+ }
8102
+ },
8103
+ "attachments_size_bytes": {
8104
+ "type": "integer",
8105
+ "minimum": 0,
8106
+ "maximum": 9007199254740991,
8107
+ "description": "Original decoded attachment byte total accepted for this send, not the compressed archive size. It may exceed the retained inline total after offloading."
8108
+ },
8109
+ "attachments_complete": {
8110
+ "type": "boolean",
8111
+ "description": "Whether attachments enumerates the complete original submitted attachment set, including zero-byte and inline CID parts. True requires no submitted payload-reference, offloaded, or visibility-filtered attachment to be omitted, retained content, and a published archive when the attachment inventory is nonempty. False or absent provides no completeness proof, including for legacy or discarded content. This field grants no download access and has no interaction semantics."
8112
+ },
8113
+ "attachments_download_available": {
8114
+ "type": "boolean",
8115
+ "description": "Whether an inline attachment archive has been successfully retained and is available for download. Download authorization is checked separately; address-bound agent connection keys cannot download archives."
7823
8116
  }
7824
8117
  }
7825
8118
  }]
@@ -11872,6 +12165,47 @@ const operationManifest = [
11872
12165
  "tag": "Agent",
11873
12166
  "tagCommand": "agent"
11874
12167
  },
12168
+ {
12169
+ "binaryResponse": false,
12170
+ "bodyRequired": false,
12171
+ "command": "remove-agent-connection",
12172
+ "description": "Permanently removes a revoked connection record. Requires an organization\nowner or admin session or OAuth token; organization API keys are denied.\nDisconnect first using DELETE /agent-connections/{address}. An active\nconnection returns 409 connection_not_revoked. Missing or already removed\nrecords return 404. Mail, address notes, domains and external runtimes are\npreserved. The same address can be paired again with a new invitation;\nold credentials and invitations remain invalid.\n",
12173
+ "hasJsonBody": false,
12174
+ "method": "POST",
12175
+ "operationId": "removeAgentConnection",
12176
+ "path": "/agent-connections/{address}/remove",
12177
+ "pathParams": [{
12178
+ "description": "The email address identifying the revoked connection.",
12179
+ "enum": null,
12180
+ "name": "address",
12181
+ "required": true,
12182
+ "type": "string"
12183
+ }],
12184
+ "queryParams": [],
12185
+ "requestSchema": null,
12186
+ "responseSchema": {
12187
+ "type": "object",
12188
+ "required": ["success", "data"],
12189
+ "properties": {
12190
+ "success": {
12191
+ "type": "boolean",
12192
+ "const": true
12193
+ },
12194
+ "data": {
12195
+ "type": "object",
12196
+ "required": ["deleted"],
12197
+ "properties": { "deleted": {
12198
+ "type": "boolean",
12199
+ "const": true
12200
+ } }
12201
+ }
12202
+ }
12203
+ },
12204
+ "sdkName": "removeAgentConnection",
12205
+ "summary": "Remove a revoked agent connection",
12206
+ "tag": "Agent Connections",
12207
+ "tagCommand": "agent-connections"
12208
+ },
11875
12209
  {
11876
12210
  "binaryResponse": false,
11877
12211
  "bodyRequired": false,
@@ -13609,6 +13943,38 @@ const operationManifest = [
13609
13943
  "tag": "Emails",
13610
13944
  "tagCommand": "emails"
13611
13945
  },
13946
+ {
13947
+ "binaryResponse": true,
13948
+ "bodyRequired": false,
13949
+ "command": "download-email-attachment-part",
13950
+ "description": "Pending service release. This contract does not establish live availability.\nDownloads the original bytes of one ordinary email attachment, selected by\nits metadata `part_index`, not its position in an attachments array. Refresh\nthe email detail after `attachment_changed` before choosing an index again.\nUses bearer authentication only; signed raw-email download tokens are not accepted.\nA paired-agent credential may read only a message addressed to its claimed address.\nFunction credentials are denied. Other bearer credentials retain their\nexisting email access boundaries. This endpoint serves email bytes only.\n",
13951
+ "hasJsonBody": false,
13952
+ "method": "GET",
13953
+ "operationId": "downloadEmailAttachmentPart",
13954
+ "path": "/emails/{id}/attachments/{part_index}",
13955
+ "pathParams": [{
13956
+ "description": "Resource UUID",
13957
+ "enum": null,
13958
+ "name": "id",
13959
+ "required": true,
13960
+ "type": "string"
13961
+ }, {
13962
+ "description": "The attachment metadata `part_index`, not its offset in the attachments array",
13963
+ "enum": null,
13964
+ "maximum": 2147483647,
13965
+ "minimum": 0,
13966
+ "name": "part_index",
13967
+ "required": true,
13968
+ "type": "integer"
13969
+ }],
13970
+ "queryParams": [],
13971
+ "requestSchema": null,
13972
+ "responseSchema": null,
13973
+ "sdkName": "downloadEmailAttachmentPart",
13974
+ "summary": "Download one inbound email attachment",
13975
+ "tag": "Emails",
13976
+ "tagCommand": "emails"
13977
+ },
13612
13978
  {
13613
13979
  "binaryResponse": true,
13614
13980
  "bodyRequired": false,
@@ -21095,6 +21461,53 @@ const operationManifest = [
21095
21461
  "body_html": {
21096
21462
  "type": ["string", "null"],
21097
21463
  "description": "HTML body sent on the wire. Null when the send\ncarried only a plain-text body, or when bodies\nhave been discarded post-send.\n"
21464
+ },
21465
+ "attachments": {
21466
+ "type": "array",
21467
+ "description": "Metadata for submitted inline attachments; download availability is reported separately. Metadata may exist when the archive is unavailable, and legacy sends may have no metadata. Offloaded payload files are not included in the inline archive.",
21468
+ "items": {
21469
+ "type": "object",
21470
+ "description": "Metadata for one submitted inline attachment.",
21471
+ "additionalProperties": true,
21472
+ "properties": {
21473
+ "filename": { "type": ["string", "null"] },
21474
+ "content_type": { "type": "string" },
21475
+ "size_bytes": {
21476
+ "type": "integer",
21477
+ "minimum": 0,
21478
+ "maximum": 9007199254740991
21479
+ },
21480
+ "sha256": { "type": "string" },
21481
+ "part_index": {
21482
+ "type": "integer",
21483
+ "minimum": 0,
21484
+ "maximum": 9007199254740991
21485
+ },
21486
+ "tar_path": { "type": "string" }
21487
+ },
21488
+ "required": [
21489
+ "filename",
21490
+ "content_type",
21491
+ "size_bytes",
21492
+ "sha256",
21493
+ "part_index",
21494
+ "tar_path"
21495
+ ]
21496
+ }
21497
+ },
21498
+ "attachments_size_bytes": {
21499
+ "type": "integer",
21500
+ "minimum": 0,
21501
+ "maximum": 9007199254740991,
21502
+ "description": "Original decoded attachment byte total accepted for this send, not the compressed archive size. It may exceed the retained inline total after offloading."
21503
+ },
21504
+ "attachments_complete": {
21505
+ "type": "boolean",
21506
+ "description": "Whether attachments enumerates the complete original submitted attachment set, including zero-byte and inline CID parts. True requires no submitted payload-reference, offloaded, or visibility-filtered attachment to be omitted, retained content, and a published archive when the attachment inventory is nonempty. False or absent provides no completeness proof, including for legacy or discarded content. This field grants no download access and has no interaction semantics."
21507
+ },
21508
+ "attachments_download_available": {
21509
+ "type": "boolean",
21510
+ "description": "Whether an inline attachment archive has been successfully retained and is available for download. Download authorization is checked separately; address-bound agent connection keys cannot download archives."
21098
21511
  }
21099
21512
  }
21100
21513
  }]
@@ -21104,6 +21517,79 @@ const operationManifest = [
21104
21517
  "tag": "Sending",
21105
21518
  "tagCommand": "sending"
21106
21519
  },
21520
+ {
21521
+ "binaryResponse": false,
21522
+ "bodyRequired": false,
21523
+ "command": "delete-sent-email",
21524
+ "description": "Permanently deletes sender mailbox history and its owned attachment archive\nand transient payload. Allows delivered, bounced, agent_failed, gate_denied,\ncanceled, deferred and wait_timeout; other states return 409. Cancel scheduled\nsends first. This does not recall or cancel delivery already admitted.\nRecipient copies, received replies and independent audit records are preserved.\nOccupied idempotency keys and delivered-reply deduplication remain reserved.\nKeys already released by cancellation, gate denial or a never-attempted failure\nremain reusable. Repeating a completed deletion succeeds; unknown or foreign\nIDs return 404. Organization API keys, sessions and OAuth are supported;\nFunction and connected-agent credentials are denied.\n",
21525
+ "hasJsonBody": false,
21526
+ "method": "DELETE",
21527
+ "operationId": "deleteSentEmail",
21528
+ "path": "/sent-emails/{id}",
21529
+ "pathParams": [{
21530
+ "description": "Resource UUID",
21531
+ "enum": null,
21532
+ "name": "id",
21533
+ "required": true,
21534
+ "type": "string"
21535
+ }],
21536
+ "queryParams": [],
21537
+ "requestSchema": null,
21538
+ "responseSchema": {
21539
+ "type": "object",
21540
+ "required": ["success", "data"],
21541
+ "properties": {
21542
+ "success": {
21543
+ "type": "boolean",
21544
+ "const": true
21545
+ },
21546
+ "data": {
21547
+ "type": "object",
21548
+ "required": ["deleted"],
21549
+ "properties": { "deleted": {
21550
+ "type": "boolean",
21551
+ "const": true
21552
+ } }
21553
+ }
21554
+ }
21555
+ },
21556
+ "sdkName": "deleteSentEmail",
21557
+ "summary": "Delete a sent email",
21558
+ "tag": "Sending",
21559
+ "tagCommand": "sending"
21560
+ },
21561
+ {
21562
+ "binaryResponse": true,
21563
+ "bodyRequired": false,
21564
+ "command": "download-sent-attachment-part",
21565
+ "description": "Pending service release. This contract does not establish live availability.\nDownloads the original bytes of one ordinary email attachment, selected by\nits metadata `part_index`, not its position in an attachments array. Refresh\nthe email detail after `attachment_changed` before choosing an index again.\nUses bearer authentication only; signed raw-email download tokens are not accepted.\nA paired-agent credential may read only mail sent from its claimed address.\nReceiving a copy does not authorize downloading another sender's sent content.\nFunction credentials are denied. Other bearer credentials retain their\nexisting email access boundaries. This endpoint serves email bytes only.\n",
21566
+ "hasJsonBody": false,
21567
+ "method": "GET",
21568
+ "operationId": "downloadSentAttachmentPart",
21569
+ "path": "/sent-emails/{id}/attachments/{part_index}",
21570
+ "pathParams": [{
21571
+ "description": "Resource UUID",
21572
+ "enum": null,
21573
+ "name": "id",
21574
+ "required": true,
21575
+ "type": "string"
21576
+ }, {
21577
+ "description": "The attachment metadata `part_index`, not its offset in the attachments array",
21578
+ "enum": null,
21579
+ "maximum": 2147483647,
21580
+ "minimum": 0,
21581
+ "name": "part_index",
21582
+ "required": true,
21583
+ "type": "integer"
21584
+ }],
21585
+ "queryParams": [],
21586
+ "requestSchema": null,
21587
+ "responseSchema": null,
21588
+ "sdkName": "downloadSentAttachmentPart",
21589
+ "summary": "Download one sent email attachment",
21590
+ "tag": "Sending",
21591
+ "tagCommand": "sending"
21592
+ },
21107
21593
  {
21108
21594
  "binaryResponse": false,
21109
21595
  "bodyRequired": false,
@@ -21572,6 +22058,53 @@ const operationManifest = [
21572
22058
  "body_html": {
21573
22059
  "type": ["string", "null"],
21574
22060
  "description": "HTML body sent on the wire. Null when the send\ncarried only a plain-text body, or when bodies\nhave been discarded post-send.\n"
22061
+ },
22062
+ "attachments": {
22063
+ "type": "array",
22064
+ "description": "Metadata for submitted inline attachments; download availability is reported separately. Metadata may exist when the archive is unavailable, and legacy sends may have no metadata. Offloaded payload files are not included in the inline archive.",
22065
+ "items": {
22066
+ "type": "object",
22067
+ "description": "Metadata for one submitted inline attachment.",
22068
+ "additionalProperties": true,
22069
+ "properties": {
22070
+ "filename": { "type": ["string", "null"] },
22071
+ "content_type": { "type": "string" },
22072
+ "size_bytes": {
22073
+ "type": "integer",
22074
+ "minimum": 0,
22075
+ "maximum": 9007199254740991
22076
+ },
22077
+ "sha256": { "type": "string" },
22078
+ "part_index": {
22079
+ "type": "integer",
22080
+ "minimum": 0,
22081
+ "maximum": 9007199254740991
22082
+ },
22083
+ "tar_path": { "type": "string" }
22084
+ },
22085
+ "required": [
22086
+ "filename",
22087
+ "content_type",
22088
+ "size_bytes",
22089
+ "sha256",
22090
+ "part_index",
22091
+ "tar_path"
22092
+ ]
22093
+ }
22094
+ },
22095
+ "attachments_size_bytes": {
22096
+ "type": "integer",
22097
+ "minimum": 0,
22098
+ "maximum": 9007199254740991,
22099
+ "description": "Original decoded attachment byte total accepted for this send, not the compressed archive size. It may exceed the retained inline total after offloading."
22100
+ },
22101
+ "attachments_complete": {
22102
+ "type": "boolean",
22103
+ "description": "Whether attachments enumerates the complete original submitted attachment set, including zero-byte and inline CID parts. True requires no submitted payload-reference, offloaded, or visibility-filtered attachment to be omitted, retained content, and a published archive when the attachment inventory is nonempty. False or absent provides no completeness proof, including for legacy or discarded content. This field grants no download access and has no interaction semantics."
22104
+ },
22105
+ "attachments_download_available": {
22106
+ "type": "boolean",
22107
+ "description": "Whether an inline attachment archive has been successfully retained and is available for download. Download authorization is checked separately; address-bound agent connection keys cannot download archives."
21575
22108
  }
21576
22109
  }
21577
22110
  }]
@@ -22296,6 +22829,53 @@ const operationManifest = [
22296
22829
  "body_html": {
22297
22830
  "type": ["string", "null"],
22298
22831
  "description": "HTML body sent on the wire. Null when the send\ncarried only a plain-text body, or when bodies\nhave been discarded post-send.\n"
22832
+ },
22833
+ "attachments": {
22834
+ "type": "array",
22835
+ "description": "Metadata for submitted inline attachments; download availability is reported separately. Metadata may exist when the archive is unavailable, and legacy sends may have no metadata. Offloaded payload files are not included in the inline archive.",
22836
+ "items": {
22837
+ "type": "object",
22838
+ "description": "Metadata for one submitted inline attachment.",
22839
+ "additionalProperties": true,
22840
+ "properties": {
22841
+ "filename": { "type": ["string", "null"] },
22842
+ "content_type": { "type": "string" },
22843
+ "size_bytes": {
22844
+ "type": "integer",
22845
+ "minimum": 0,
22846
+ "maximum": 9007199254740991
22847
+ },
22848
+ "sha256": { "type": "string" },
22849
+ "part_index": {
22850
+ "type": "integer",
22851
+ "minimum": 0,
22852
+ "maximum": 9007199254740991
22853
+ },
22854
+ "tar_path": { "type": "string" }
22855
+ },
22856
+ "required": [
22857
+ "filename",
22858
+ "content_type",
22859
+ "size_bytes",
22860
+ "sha256",
22861
+ "part_index",
22862
+ "tar_path"
22863
+ ]
22864
+ }
22865
+ },
22866
+ "attachments_size_bytes": {
22867
+ "type": "integer",
22868
+ "minimum": 0,
22869
+ "maximum": 9007199254740991,
22870
+ "description": "Original decoded attachment byte total accepted for this send, not the compressed archive size. It may exceed the retained inline total after offloading."
22871
+ },
22872
+ "attachments_complete": {
22873
+ "type": "boolean",
22874
+ "description": "Whether attachments enumerates the complete original submitted attachment set, including zero-byte and inline CID parts. True requires no submitted payload-reference, offloaded, or visibility-filtered attachment to be omitted, retained content, and a published archive when the attachment inventory is nonempty. False or absent provides no completeness proof, including for legacy or discarded content. This field grants no download access and has no interaction semantics."
22875
+ },
22876
+ "attachments_download_available": {
22877
+ "type": "boolean",
22878
+ "description": "Whether an inline attachment archive has been successfully retained and is available for download. Download authorization is checked separately; address-bound agent connection keys cannot download archives."
22299
22879
  }
22300
22880
  }
22301
22881
  }]