@remit/api-http-client 0.0.6 → 0.0.8

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 (2) hide show
  1. package/package.json +1 -1
  2. package/types.gen.ts +26 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/types.gen.ts CHANGED
@@ -1175,17 +1175,13 @@ export type RemitImapMessageAuthenticity = {
1175
1175
  */
1176
1176
  export type RemitImapMessageBulkOperationResult = {
1177
1177
  /**
1178
- * Number of items successfully processed
1178
+ * Number of items accepted for processing
1179
1179
  */
1180
1180
  successCount: number;
1181
1181
  /**
1182
- * Number of items that failed
1182
+ * Number of items rejected before processing
1183
1183
  */
1184
1184
  failureCount: number;
1185
- /**
1186
- * IDs of failed items
1187
- */
1188
- failedIds?: Array<Uuid>;
1189
1185
  };
1190
1186
 
1191
1187
  /**
@@ -1489,20 +1485,35 @@ export type RemitImapPlacementAction = 'MoveToInbox' | 'MoveToJunk';
1489
1485
  * Closed rather than free text: this is the one diagnostic that is interpolated
1490
1486
  * into the title of an issue filed under the user's own GitHub account, so its
1491
1487
  * publishability has to be a property of the type instead of a claim about the
1492
- * writer. Grows with the same narrowing that grows QuarantineFailureStage.
1488
+ * writer.
1489
+ *
1490
+ * The vocabulary is total — every quarantine write picks a member, and a defect
1491
+ * the writer cannot name is `UnreadableBody` rather than an invented code. It
1492
+ * is deliberately small: the body parser reports its refusals as free text with
1493
+ * no stable type or code, so a member exists only where the writer can identify
1494
+ * the defect without reading parser prose. `UnterminatedMultipartBoundary` and
1495
+ * `TruncatedBody` were provisional members carried by Phase 2 and are gone —
1496
+ * nothing on the narrowed sync path could produce either, and a member no
1497
+ * writer can reach is a vocabulary that lies about what the field means.
1498
+ * `MissingEnvelope` is absent for the same reason: see QuarantineFailureStage.
1493
1499
  */
1494
- export type RemitImapQuarantineFailureCode = 'UnterminatedMultipartBoundary' | 'UnknownCharset' | 'TruncatedBody';
1500
+ export type RemitImapQuarantineFailureCode = 'UnknownCharset' | 'UnreadableBody';
1495
1501
 
1496
1502
  /**
1497
1503
  * The pipeline step that refused a quarantined message.
1498
1504
  *
1499
- * One member. No catch site on the sync path can currently tell a parse failure
1500
- * from an infrastructure failure: the per-message frame in `body-sync.ts` wraps
1501
- * the S3 body write, the parsed-body cache write, the body-part upserts, the
1502
- * placement move and the label and counter writes alongside the `simpleParser`
1503
- * call, and filters only connection drops out of it. A stage is added when a
1504
- * try block is narrowed far enough to attribute it, never ahead of that — an
1505
- * enum member that reached stored rows cannot be walked back.
1505
+ * One member, and it is behind a real narrowing rather than a promise of one:
1506
+ * the body parse has its own try block around the parse call and nothing else,
1507
+ * so an error out of it can only be the message. S3, queue and database
1508
+ * failures propagate and never become a record here quarantining one would
1509
+ * set a message aside for an outage, tell the user it was unreadable, and
1510
+ * invite a public GitHub issue about it.
1511
+ *
1512
+ * A message that arrives with no ENVELOPE is deliberately NOT a member. Nothing
1513
+ * can tell that apart from the FETCH row glitching (#408), and the IMAP client
1514
+ * is far more often the cause than the message; the sync path holds its cursor
1515
+ * and retries instead, so a transient glitch heals and a persistent one trips
1516
+ * the stalled-cursor alert.
1506
1517
  */
1507
1518
  export type RemitImapQuarantineFailureStage = 'BodyParse';
1508
1519