@remit/api-openapi-types 0.0.12 → 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 +176 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.12",
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
  */
@@ -4087,6 +4211,17 @@ declare namespace Paths {
4087
4211
  export type $200 = void;
4088
4212
  }
4089
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
+ }
4090
4225
  namespace ListMailboxes {
4091
4226
  export interface PathParameters {
4092
4227
  accountId: Components.Schemas.UUID;
@@ -4526,6 +4661,22 @@ export interface OperationMethods {
4526
4661
  data?: any,
4527
4662
  config?: AxiosRequestConfig
4528
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>;
4529
4680
  /**
4530
4681
  * listMailboxes
4531
4682
  */
@@ -4957,6 +5108,24 @@ export interface PathsDictionary {
4957
5108
  config?: AxiosRequestConfig
4958
5109
  ): OperationResponse<Paths.GetConfig.Responses.$200>;
4959
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
+ };
4960
5129
  ['/accounts/{accountId}/mailboxes']: {
4961
5130
  /**
4962
5131
  * listMailboxes
@@ -5424,6 +5593,10 @@ export type AccountResponse = Components.Schemas.AccountResponse;
5424
5593
  export type AddressFlagBase = Components.Schemas.AddressFlagBase;
5425
5594
  export type MutedFlag = Components.Schemas.MutedFlag;
5426
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;
5427
5600
  export type Mailbox = Components.Schemas.Mailbox;
5428
5601
  export type MailboxResponse = Components.Schemas.MailboxResponse;
5429
5602
  export type CreateMailboxInput = Components.Schemas.CreateMailboxInput;
@@ -5526,6 +5699,9 @@ export type AccountConfigState = Components.Schemas.AccountConfigState;
5526
5699
  export type AccountAuthType = Components.Schemas.AccountAuthType;
5527
5700
  export type ConnectionState = Components.Schemas.ConnectionState;
5528
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;
5529
5705
  export type NamespaceType = Components.Schemas.NamespaceType;
5530
5706
  export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
5531
5707
  export type MailboxCursorState = Components.Schemas.MailboxCursorState;