@remit/api-openapi-types 0.0.11 → 0.0.13

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 +219 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -69,6 +69,18 @@ writer can reach is a vocabulary that lies about what the field means.
69
69
  * Phase of the initial account sync lifecycle
70
70
  */
71
71
  export type SyncPhase = "idle" | "discovering_mailboxes" | "syncing_inbox" | "syncing_others" | "complete" | "error";
72
+ /**
73
+ * Outcome of the most recent manifest check. `ok` when a manifest was fetched and validated, `failed` when it could not be, `disabled` when no manifest URL is configured or no check has ever run (RFC 037 D8).
74
+ */
75
+ export type SystemUpdateCheckStatus = "ok" | "failed" | "disabled";
76
+ /**
77
+ * Phase of an update run. Advances through the atomic update sequence; `checking` before anything is pulled, `committing` once the new version has answered the gate (RFC 037 R9, R11).
78
+ */
79
+ export type SystemUpdatePhase = "checking" | "pulling" | "snapshotting" | "stopping" | "starting" | "verifying" | "committing" | "rollingBack" | "recovering";
80
+ /**
81
+ * Terminal outcome of an update run. `null` while a run is in flight; `succeeded` when the new version committed, `rolledBack` when it did not and the previous version was restored, `rollbackFailed` when the restore itself failed and an operator shell is needed, `abandoned` when the run ended having changed nothing (RFC 037 R11).
82
+ */
83
+ export type SystemUpdateOutcome = "succeeded" | "rolledBack" | "rollbackFailed" | "abandoned";
72
84
  /**
73
85
  * IMAP namespace types per RFC 9051 Section 6.3.10
74
86
  */
@@ -1089,6 +1101,118 @@ never from a raw content-type line — parameters carry `name=` and
1089
1101
  */
1090
1102
  mailboxId?: UUID;
1091
1103
  }
1104
+ /**
1105
+ * The self-update resource: the running version, the outcome of the most recent manifest check, and the state of the current or last run. One read serves every interface state. The check block and the run block are independent by construction (RFC 037 D7).
1106
+ */
1107
+ export interface SystemUpdateResponse {
1108
+ /**
1109
+ * The version the instance is currently running, `vX.Y.Z` (or a non-release tag such as `latest`)
1110
+ */
1111
+ currentVersion: string;
1112
+ /**
1113
+ * Schema version the running instance is on, written by the wrapper at check time. The consent UI derives that applying a release runs a migration from `check.schemaVersion` being greater than this. Absent when unknown, so a state file written before this field existed still validates.
1114
+ */
1115
+ currentSchemaVersion?: number;
1116
+ /**
1117
+ * The most recent manifest check
1118
+ */
1119
+ check: SystemUpdateCheck;
1120
+ /**
1121
+ * The current or last update run, or `null` when no run has ever started
1122
+ */
1123
+ run: SystemUpdateRun | any;
1124
+ }
1125
+ /**
1126
+ * The most recent manifest check. The check block is independent of the run block: a failed check never renders as a failed update. On `failed` the version fields are absent and an `error` sentence explains why; on `disabled` only the status is present.
1127
+ */
1128
+ export interface SystemUpdateCheck {
1129
+ /**
1130
+ * Outcome of the most recent manifest check
1131
+ */
1132
+ status: SystemUpdateCheckStatus;
1133
+ /**
1134
+ * When the manifest was last fetched, ISO 8601. Absent when the check is disabled.
1135
+ */
1136
+ lastCheckedAt?: string;
1137
+ /**
1138
+ * Latest release version named by the manifest, `vX.Y.Z`. Present when status is `ok`.
1139
+ */
1140
+ latestVersion?: string;
1141
+ /**
1142
+ * Publication date of the latest release, ISO 8601. Present when status is `ok`.
1143
+ */
1144
+ publishedAt?: string;
1145
+ /**
1146
+ * One authored sentence describing the latest release. Present when status is `ok`.
1147
+ */
1148
+ summary?: string;
1149
+ /**
1150
+ * URL of the release notes for the latest release. Present when status is `ok`.
1151
+ */
1152
+ releaseNotesUrl?: string;
1153
+ /**
1154
+ * Whether the latest release is newer than the running version. Present when status is `ok`.
1155
+ */
1156
+ updateAvailable?: boolean;
1157
+ /**
1158
+ * Schema version of the latest release, from the manifest. Compared against `currentSchemaVersion` to derive whether applying the release runs a migration. Absent when the manifest does not carry it, so a state file written before this field existed still validates.
1159
+ */
1160
+ schemaVersion?: number;
1161
+ /**
1162
+ * Plain sentence naming why the check failed. Present when status is `failed`.
1163
+ */
1164
+ error?: string;
1165
+ }
1166
+ /**
1167
+ * The current or last update run. `null` when no run has ever started. `outcome` is `null` while a run is in flight. `message` and `logCommand` are rendered to the operator verbatim: a plain sentence naming the cause and a command that can be pasted into a shell to see more (RFC 037 Interface).
1168
+ */
1169
+ export interface SystemUpdateRun {
1170
+ /**
1171
+ * Opaque id of this run; the client persists it and treats subsequent request failures as an in-progress apply until the surface answers
1172
+ */
1173
+ runId: string;
1174
+ /**
1175
+ * Version the run started from, `vX.Y.Z`
1176
+ */
1177
+ fromVersion: string;
1178
+ /**
1179
+ * Version the run is installing, `vX.Y.Z`
1180
+ */
1181
+ targetVersion: string;
1182
+ /**
1183
+ * Phase the run is in
1184
+ */
1185
+ phase: SystemUpdatePhase;
1186
+ /**
1187
+ * Terminal outcome, or `null` while the run is in flight
1188
+ */
1189
+ outcome: SystemUpdateOutcome | any;
1190
+ /**
1191
+ * When the run started, ISO 8601
1192
+ */
1193
+ startedAt: string;
1194
+ /**
1195
+ * When the run state was last written, ISO 8601
1196
+ */
1197
+ updatedAt: string;
1198
+ /**
1199
+ * Plain sentence naming the current cause, rendered to the operator verbatim
1200
+ */
1201
+ message: string;
1202
+ /**
1203
+ * A command that can be pasted into a shell to see more, rendered to the operator verbatim
1204
+ */
1205
+ logCommand: string;
1206
+ }
1207
+ /**
1208
+ * Request to install a specific release. `targetVersion` must equal the version the latest check reported; the backend passes exactly this one field across the control seam and resolves nothing else (RFC 037 R6).
1209
+ */
1210
+ export interface ApplyUpdateInput {
1211
+ /**
1212
+ * The release version to install, `vX.Y.Z`
1213
+ */
1214
+ targetVersion: string;
1215
+ }
1092
1216
  /**
1093
1217
  * Represents an IMAP mailbox (folder). Contains IMAP-specific identifiers for message synchronization.
1094
1218
  */
@@ -2215,17 +2339,29 @@ standing to persist.
2215
2339
  dkimMismatch: boolean;
2216
2340
  }
2217
2341
  /**
2218
- * Present only when Remit auto-moved this message on body-sync (a confident, non-dry-run move). Absent means the message was not auto-moved by Remit — clients treat absence as no indicator.
2342
+ * Present only when Remit auto-moved this message on body-sync. Two shapes share this model: a classifier placement move carries `action` + `fromPlacement` (Inbox/Junk direction); a standing-filter move carries `fromMailboxId` + `destinationMailboxId` + `filterId` (an arbitrary destination folder). Absent means the message was not auto-moved by Remit — clients treat absence as no indicator.
2219
2343
  */
2220
2344
  export interface AutoMovedInfo {
2221
2345
  /**
2222
- * Direction Remit moved the message: MoveToInbox | MoveToJunk. The implied destination lets the client tell whether the move is still in effect.
2346
+ * Classifier move only: direction Remit moved the message MoveToInbox | MoveToJunk. Absent for a standing-filter move, which names its destination via `destinationMailboxId` instead.
2223
2347
  */
2224
- action: PlacementAction;
2348
+ action?: PlacementAction;
2225
2349
  /**
2226
- * Folder role the message was moved from: inbox | junk | other. Used to render "moved from Junk" and to resolve the undo target client-side via MailboxRole.
2350
+ * Classifier move only: folder role the message was moved from inbox | junk | other. Used to render "moved from Junk" and to resolve the undo target via MailboxRole. Absent for a standing-filter move, which names its source via `fromMailboxId`.
2227
2351
  */
2228
- fromPlacement: string;
2352
+ fromPlacement?: string;
2353
+ /**
2354
+ * Standing-filter move only: the mailbox the message was moved out of. The undo target — the client resolves its display name for the badge and moves the message back here.
2355
+ */
2356
+ fromMailboxId?: UUID;
2357
+ /**
2358
+ * Standing-filter move only: the mailbox the filter moved the message into. The move is still in effect while the message sits here.
2359
+ */
2360
+ destinationMailboxId?: UUID;
2361
+ /**
2362
+ * Standing-filter move only: the filter that moved the message, for the Settings › Filters link. Undo does not disable it.
2363
+ */
2364
+ filterId?: UUID;
2229
2365
  }
2230
2366
  /**
2231
2367
  * Aggregate response for `searchThreads`. Carries the matching rows (`items`), a
@@ -2945,6 +3081,10 @@ server-capped window. `items` is omitted when `results=false` (count-only);
2945
3081
  * Remit's placement verdict, recorded when Remit decided to act (action != leave). Absent means left-in-place or synced before placement rolled out. Recorded in dry-run too, so the dark-ship distribution is queryable.
2946
3082
  */
2947
3083
  placementVerdict?: MessagePlacementVerdict;
3084
+ /**
3085
+ * Recorded when a standing filter moved this message at body-sync time (RFC 034). Absent means no filter moved it — a classifier move records `placementVerdict` instead, and a retroactive back-apply records neither. Drives the arbitrary-destination auto-moved badge and its undo.
3086
+ */
3087
+ filterMove?: MessageFilterMove;
2948
3088
  createdAt: number;
2949
3089
  updatedAt: number;
2950
3090
  }
@@ -3011,6 +3151,27 @@ server-capped window. `items` is omitted when `results=false` (count-only);
3011
3151
  */
3012
3152
  decidedAt: number;
3013
3153
  }
3154
+ /**
3155
+ * Recorded when a standing filter (RFC 034) moved this message at body-sync time. Present only for a real, index-time filter move, so the client can render the badge naming the destination, offer an undo back to the source folder, and link to the filter in Settings. A retroactive back-apply move attributes to no filter and never writes this (RFC 034 Decision 3.3).
3156
+ */
3157
+ export interface MessageFilterMove {
3158
+ /**
3159
+ * The standing filter that moved the message — lets the client link the badge to Settings › Filters.
3160
+ */
3161
+ filterId: UUID;
3162
+ /**
3163
+ * The mailbox the message was in before the filter moved it. The undo target: undo returns the message here and does not disable the filter.
3164
+ */
3165
+ sourceMailboxId: UUID;
3166
+ /**
3167
+ * The mailbox the filter moved the message into. The move is still in effect while the message sits here; any move away (undo or manual) clears the badge.
3168
+ */
3169
+ destinationMailboxId: UUID;
3170
+ /**
3171
+ * Body-sync timestamp the move was decided at (epoch millis).
3172
+ */
3173
+ decidedAt: number;
3174
+ }
3014
3175
  /**
3015
3176
  * Core message metadata for API responses
3016
3177
  */
@@ -4050,6 +4211,17 @@ declare namespace Paths {
4050
4211
  export type $200 = void;
4051
4212
  }
4052
4213
  }
4214
+ namespace GetSystemUpdate {
4215
+ namespace Responses {
4216
+ export type $200 = void;
4217
+ }
4218
+ }
4219
+ namespace ApplySystemUpdate {
4220
+ export type RequestBody = Components.Schemas.ApplyUpdateInput;
4221
+ namespace Responses {
4222
+ export type $200 = void;
4223
+ }
4224
+ }
4053
4225
  namespace ListMailboxes {
4054
4226
  export interface PathParameters {
4055
4227
  accountId: Components.Schemas.UUID;
@@ -4489,6 +4661,22 @@ export interface OperationMethods {
4489
4661
  data?: any,
4490
4662
  config?: AxiosRequestConfig
4491
4663
  ): OperationResponse<Paths.GetConfig.Responses.$200>;
4664
+ /**
4665
+ * getSystemUpdate - Read the self-update resource: the running version, the outcome of the most recent manifest check, and the state of the current or last run. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
4666
+ */
4667
+ 'getSystemUpdate'(
4668
+ parameters?: Parameters<UnknownParamsObject> | null,
4669
+ data?: any,
4670
+ config?: AxiosRequestConfig
4671
+ ): OperationResponse<Paths.GetSystemUpdate.Responses.$200>;
4672
+ /**
4673
+ * applySystemUpdate - Request installation of a specific release. Writes the request to the control seam and returns 202 with the same resource, including a runId. 409 when a run is in flight, 422 when the target is not the manifest's version. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
4674
+ */
4675
+ 'applySystemUpdate'(
4676
+ parameters?: Parameters<UnknownParamsObject> | null,
4677
+ data?: Paths.ApplySystemUpdate.RequestBody,
4678
+ config?: AxiosRequestConfig
4679
+ ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
4492
4680
  /**
4493
4681
  * listMailboxes
4494
4682
  */
@@ -4920,6 +5108,24 @@ export interface PathsDictionary {
4920
5108
  config?: AxiosRequestConfig
4921
5109
  ): OperationResponse<Paths.GetConfig.Responses.$200>;
4922
5110
  };
5111
+ ['/system/update']: {
5112
+ /**
5113
+ * getSystemUpdate - Read the self-update resource: the running version, the outcome of the most recent manifest check, and the state of the current or last run. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
5114
+ */
5115
+ 'get'(
5116
+ parameters?: Parameters<UnknownParamsObject> | null,
5117
+ data?: any,
5118
+ config?: AxiosRequestConfig
5119
+ ): OperationResponse<Paths.GetSystemUpdate.Responses.$200>;
5120
+ /**
5121
+ * applySystemUpdate - Request installation of a specific release. Writes the request to the control seam and returns 202 with the same resource, including a runId. 409 when a run is in flight, 422 when the target is not the manifest's version. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
5122
+ */
5123
+ 'post'(
5124
+ parameters?: Parameters<UnknownParamsObject> | null,
5125
+ data?: Paths.ApplySystemUpdate.RequestBody,
5126
+ config?: AxiosRequestConfig
5127
+ ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
5128
+ };
4923
5129
  ['/accounts/{accountId}/mailboxes']: {
4924
5130
  /**
4925
5131
  * listMailboxes
@@ -5387,6 +5593,10 @@ export type AccountResponse = Components.Schemas.AccountResponse;
5387
5593
  export type AddressFlagBase = Components.Schemas.AddressFlagBase;
5388
5594
  export type MutedFlag = Components.Schemas.MutedFlag;
5389
5595
  export type FolderAppointment = Components.Schemas.FolderAppointment;
5596
+ export type SystemUpdateResponse = Components.Schemas.SystemUpdateResponse;
5597
+ export type SystemUpdateCheck = Components.Schemas.SystemUpdateCheck;
5598
+ export type SystemUpdateRun = Components.Schemas.SystemUpdateRun;
5599
+ export type ApplyUpdateInput = Components.Schemas.ApplyUpdateInput;
5390
5600
  export type Mailbox = Components.Schemas.Mailbox;
5391
5601
  export type MailboxResponse = Components.Schemas.MailboxResponse;
5392
5602
  export type CreateMailboxInput = Components.Schemas.CreateMailboxInput;
@@ -5438,6 +5648,7 @@ export type Message = Components.Schemas.Message;
5438
5648
  export type MessageAuthResult = Components.Schemas.MessageAuthResult;
5439
5649
  export type MessageProviderSpam = Components.Schemas.MessageProviderSpam;
5440
5650
  export type MessagePlacementVerdict = Components.Schemas.MessagePlacementVerdict;
5651
+ export type MessageFilterMove = Components.Schemas.MessageFilterMove;
5441
5652
  export type MessageSummaryResponse = Components.Schemas.MessageSummaryResponse;
5442
5653
  export type EnvelopeResponse = Components.Schemas.EnvelopeResponse;
5443
5654
  export type EnvelopeAddressResponse = Components.Schemas.EnvelopeAddressResponse;
@@ -5488,6 +5699,9 @@ export type AccountConfigState = Components.Schemas.AccountConfigState;
5488
5699
  export type AccountAuthType = Components.Schemas.AccountAuthType;
5489
5700
  export type ConnectionState = Components.Schemas.ConnectionState;
5490
5701
  export type SyncPhase = Components.Schemas.SyncPhase;
5702
+ export type SystemUpdateCheckStatus = Components.Schemas.SystemUpdateCheckStatus;
5703
+ export type SystemUpdatePhase = Components.Schemas.SystemUpdatePhase;
5704
+ export type SystemUpdateOutcome = Components.Schemas.SystemUpdateOutcome;
5491
5705
  export type NamespaceType = Components.Schemas.NamespaceType;
5492
5706
  export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
5493
5707
  export type MailboxCursorState = Components.Schemas.MailboxCursorState;