@remit/api-openapi-types 0.0.49 → 0.0.50

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.d.ts +14 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -174,7 +174,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
174
174
  */
175
175
  export type StarColor = "none" | "yellow" | "orange" | "red" | "purple" | "blue" | "teal" | "green" | "yellow_bang" | "red_bang" | "purple_question" | "blue_info" | "orange_guillemet" | "green_check" | "yellow_check" | "blue_star";
176
176
  /**
177
- * Header-derived message category. Set by classifyByHeaders during body-sync. Defaults to `uncategorized` until the message is body-classified.
177
+ * Header-derived message category. Set by classifyByHeaders during body-sync. Defaults to `uncategorized`, which covers both a message that has not been classified yet and one the classifier declined to categorize; `Message.classificationState` is what tells those apart.
178
178
  */
179
179
  export type MessageCategory = "uncategorized" | "personal" | "newsletter" | "marketing" | "automated" | "transactional" | "social";
180
180
  /**
@@ -221,6 +221,10 @@ member (naming the file, the size and the cap), so a refusal must be
221
221
  distinguishable from a network failure without parsing prose.
222
222
  */
223
223
  export type OutboxAttachmentRejectionReason = "EmptyFile" | "UnusableFilename" | "FileTooLarge" | "MessageTooLarge" | "TooManyAttachments" | "ReservationExpired" | "UploadMissing" | "SizeMismatch";
224
+ /**
225
+ * Whether the header classifier has examined a message's body (issue #331). Persistence-level state on `Message`, deliberately off the wire: no response model carries it. It exists because `category` cannot answer this question — `uncategorized` is both the value a metadata-synced row starts at and the answer the classifier gives when it has nothing to say, so a guard reading `category` alone cannot tell "never examined" from "examined and declined" and re-reads the stored body on every sync pass forever.
226
+ */
227
+ export type MessageClassificationState = "NotExamined" | "Examined";
224
228
  /**
225
229
  * Sender-authenticity tier for a message, resolved at body-sync from the trusted Authentication-Results header and the sender's pair-keyed standing. First match wins, in tier order: `Impersonation`, `Aligned`, `Authenticated`, `Routine`, `NotChecked`, `Caution`. `NotEvaluated` is the sentinel for a message the derivation has never run on — it is the default and what every message written before this field existed carries, and it is distinct from `NotChecked`, which is a result.
226
230
  */
@@ -3274,7 +3278,7 @@ asking "is this slot free" never has to do the merging itself.
3274
3278
  */
3275
3279
  snippet?: String256;
3276
3280
  /**
3277
- * Header-derived category, denormalized from the underlying Message. Defaults to `uncategorized` at metadata-sync and is set to the classified value at body-sync — that pending state is a named value, not absence.
3281
+ * Header-derived category, denormalized from the underlying Message. Defaults to `uncategorized` at metadata-sync and is set to the classifier's answer at body-sync — `uncategorized` is a named value, not absence, and it is also the answer a classifier with nothing to say gives. Whether the classifier has run at all is `Message.classificationState`; this row has no column for it.
3278
3282
  */
3279
3283
  category: MessageCategory;
3280
3284
  createdAt: number;
@@ -3347,7 +3351,7 @@ asking "is this slot free" never has to do the merging itself.
3347
3351
  createdAt: number;
3348
3352
  updatedAt: number;
3349
3353
  /**
3350
- * Header-derived category for the message, served from the ThreadMessage row. Always present: the column is NOT NULL with an `uncategorized` default, and `uncategorized` is a named value for the not-yet-classified state, never a stand-in for `personal` (issue #45).
3354
+ * Header-derived category for the message, served from the ThreadMessage row. Always present: the column is NOT NULL with an `uncategorized` default, and `uncategorized` is a named value — no category — never a stand-in for `personal` (issue #45).
3351
3355
  */
3352
3356
  category: MessageCategory;
3353
3357
  /**
@@ -4402,9 +4406,13 @@ either way and cannot tell which it received.
4402
4406
  */
4403
4407
  originalUid?: number;
4404
4408
  /**
4405
- * Header-derived category. Defaults to `uncategorized` for messages that have been metadata-synced but not yet body-classified — that pending state is a named value, not absence.
4409
+ * Header-derived category. Defaults to `uncategorized`, a named value rather than absence. It covers two states — metadata-synced but not yet classified, and classified with nothing to say — and `classificationState` is what tells them apart.
4406
4410
  */
4407
4411
  category: MessageCategory;
4412
+ /**
4413
+ * Whether the header classifier has examined this message's body. Defaults to `NotExamined`, the named pending state every message written before this field existed carries. A field of its own rather than a reading of `category` or of `bodyStorageKey`: `uncategorized` is both the pending value and the classifier's own "nothing to say", and key presence is the storage fact, not the derivation's. Persistence-only — no response model exposes it — and it is what a later backfill selects the never-examined cohort by.
4414
+ */
4415
+ classificationState: MessageClassificationState;
4408
4416
  /**
4409
4417
  * Structured sender-authenticity signal derived from DKIM headers at classification time. Absent for messages classified before this field was introduced — absence means no signal.
4410
4418
  */
@@ -4626,7 +4634,7 @@ either way and cannot tell which it received.
4626
4634
  */
4627
4635
  replyTo: EnvelopeAddressResponse[];
4628
4636
  /**
4629
- * Header-derived category for the message. Always present: `Message.category` is NOT NULL with an `uncategorized` default, and `uncategorized` names the not-yet-classified state rather than standing for absence (issue #45).
4637
+ * Header-derived category for the message. Always present: `Message.category` is NOT NULL with an `uncategorized` default, and `uncategorized` is a named value — no category — rather than a stand-in for absence or for `personal` (issue #45).
4630
4638
  */
4631
4639
  category: MessageCategory;
4632
4640
  /**
@@ -8613,6 +8621,7 @@ export type SemanticSearchChunkType = Components.Schemas.SemanticSearchChunkType
8613
8621
  export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
8614
8622
  export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
8615
8623
  export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
8624
+ export type MessageClassificationState = Components.Schemas.MessageClassificationState;
8616
8625
  export type AuthenticityVerdict = Components.Schemas.AuthenticityVerdict;
8617
8626
  export type AuthResultVerdict = Components.Schemas.AuthResultVerdict;
8618
8627
  export type PlacementConfidence = Components.Schemas.PlacementConfidence;