@remit/api-openapi-types 0.0.51 → 0.0.52

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 +33 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -190,9 +190,24 @@ current enum emitter anyway, so the wire contract uses the bare form.
190
190
  */
191
191
  export type MessageStatus = "active" | "deleting" | "deleted" | "moving";
192
192
  /**
193
- * Sync status for message move/delete operations
193
+ * Sync status for message move/delete operations. Read it as a pair with
194
+ `MessageStatus`, never alone — the six placement states and the transitions
195
+ between them are `docs/architecture/imap-mutations.md` R3.
194
196
  */
195
- export type MessageSyncStatus = "synced" | "pending" | "failed";
197
+ export type MessageSyncStatus = "synced" | "pending" | "failed" | "abandoned";
198
+ /**
199
+ * Which mutation a message's placement gave up on. Read it only while
200
+ `syncStatus` is `abandoned` — outside that it is `none` and says nothing,
201
+ the way `originalUid` says nothing once a placement has settled
202
+ (`docs/architecture/imap-mutations.md` R3).
203
+
204
+ It exists because a hand-back erases the evidence: the give-up puts `status`
205
+ back to `active`, and `status` was the only field naming the mutation that
206
+ was outstanding. Without this the client can see that something was
207
+ abandoned and cannot see what, which is how a move that gave up came to be
208
+ explained to the user as a failed delete.
209
+ */
210
+ export type MessageMutation = "none" | "move" | "delete" | "copy";
196
211
  /**
197
212
  * Actionable placement verdict — the direction Remit decided to move a message. `leave` is not represented: a left-in-place verdict means the placement sub-model is absent.
198
213
  */
@@ -3371,9 +3386,13 @@ asking "is this slot free" never has to do the merging itself.
3371
3386
  */
3372
3387
  status: MessageStatus;
3373
3388
  /**
3374
- * Sync status of the underlying Message, projected at read time. Read it WITH `status`, never alone: `message-move`, `message-delete` and `message-copy` all write `failed` on an ordinary transient attempt before a redelivery that usually succeeds, so `failed` by itself does not mean a mutation gave up. One pair does prove one: `active` + `failed`, written only by `abandonDelete` — a delete Remit refused to run and handed back. Nothing else here is decidable. A move that gave up leaves `moving` + `failed`, the same pair its first dropped connection leaves; a delete that exhausted its retries is repaired to `active` + `synced` and reads as settled; `flag-push` and `placement-move-push` never write either field.
3389
+ * Sync status of the underlying Message, projected at read time. Read it WITH `status`, never alone (imap-mutations R3): `message-move`, `message-delete` and `message-copy` all write `failed` on an ordinary transient attempt before a redelivery that usually succeeds, so `failed` never means a mutation gave up. Give-up is `active` + `abandoned`, and that pair is decidable on its own — the row has been put back on a placement the server holds and nothing else is coming for it. A mutation that exhausted its retries and was repaired against IMAP settles to `active` + `synced` and reads as settled.
3375
3390
  */
3376
3391
  syncStatus: MessageSyncStatus;
3392
+ /**
3393
+ * Which mutation gave up on the underlying Message, projected at read time. Read it only where `syncStatus` is `abandoned`; `none` otherwise. This is what lets a surface name the operation that actually failed — before it existed, a move that handed back and a delete that was refused were the same two values on the wire, and the client called both a failed delete.
3394
+ */
3395
+ abandonedMutation: MessageMutation;
3377
3396
  /**
3378
3397
  * Account identifier attached at read time via a mailboxId→accountId map. Present on rows returned by `GET /threads`; absent on rows from per-mailbox endpoints (clients can resolve from the mailbox cache).
3379
3398
  */
@@ -4394,9 +4413,13 @@ either way and cannot tell which it received.
4394
4413
  */
4395
4414
  status: MessageStatus;
4396
4415
  /**
4397
- * Sync status for move/delete operations. The `synced` column default only applies to a row written without the field: the repository always supplies one, and an ordinary inbound sync writes `pending`, which nothing later promotes. So `pending` here does not mean an outstanding move or delete — `status` names that, and `failed` marks a mutation that gave up.
4416
+ * Sync status for move/delete operations, read as a pair with `status` (imap-mutations R3). The `synced` column default only applies to a row written without the field: the repository always supplies one, and an ordinary inbound sync writes `pending`, which nothing later promotes. So `pending` here does not mean an outstanding move or delete — `status` names that, `failed` marks an attempt about to be redelivered, and `abandoned` marks a mutation that gave up.
4398
4417
  */
4399
4418
  syncStatus: MessageSyncStatus;
4419
+ /**
4420
+ * Which mutation gave up on this message. Meaningful only while `syncStatus` is `abandoned`; `none` everywhere else, so the absent state is a named value rather than a missing attribute. Written by the same transition that writes `abandoned`, because a hand-back sets `status` back to `active` and that is the field which named the mutation.
4421
+ */
4422
+ abandonedMutation: MessageMutation;
4400
4423
  /**
4401
4424
  * Original mailbox ID before move (for restore from trash)
4402
4425
  */
@@ -4573,9 +4596,13 @@ either way and cannot tell which it received.
4573
4596
  */
4574
4597
  status: MessageStatus;
4575
4598
  /**
4576
- * Sync status for move/delete operations. The `synced` column default only applies to a row written without the field: the repository always supplies one, and an ordinary inbound sync writes `pending`, which nothing later promotes. So `pending` here does not mean an outstanding move or delete — `status` names that, and `failed` marks a mutation that gave up.
4599
+ * Sync status for move/delete operations, read as a pair with `status` (imap-mutations R3). The `synced` column default only applies to a row written without the field: the repository always supplies one, and an ordinary inbound sync writes `pending`, which nothing later promotes. So `pending` here does not mean an outstanding move or delete — `status` names that, `failed` marks an attempt about to be redelivered, and `abandoned` marks a mutation that gave up.
4577
4600
  */
4578
4601
  syncStatus: MessageSyncStatus;
4602
+ /**
4603
+ * Which mutation gave up on this message. Meaningful only while `syncStatus` is `abandoned`; `none` everywhere else, so the absent state is a named value rather than a missing attribute. Written by the same transition that writes `abandoned`, because a hand-back sets `status` back to `active` and that is the field which named the mutation.
4604
+ */
4605
+ abandonedMutation: MessageMutation;
4579
4606
  /**
4580
4607
  * Structured sender-authenticity signal derived from DKIM headers at classification time. Absent for messages classified before this field was introduced — absence means no signal.
4581
4608
  */
@@ -8617,6 +8644,7 @@ export type SenderTrust = Components.Schemas.SenderTrust;
8617
8644
  export type DisplayNameCorrespondence = Components.Schemas.DisplayNameCorrespondence;
8618
8645
  export type MessageStatus = Components.Schemas.MessageStatus;
8619
8646
  export type MessageSyncStatus = Components.Schemas.MessageSyncStatus;
8647
+ export type MessageMutation = Components.Schemas.MessageMutation;
8620
8648
  export type PlacementAction = Components.Schemas.PlacementAction;
8621
8649
  export type SemanticSearchChunkType = Components.Schemas.SemanticSearchChunkType;
8622
8650
  export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;