@remit/api-openapi-types 0.0.39 → 0.0.40
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.
- package/package.json +1 -1
- package/types.d.ts +245 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ writer can reach is a vocabulary that lies about what the field means.
|
|
|
64
64
|
/**
|
|
65
65
|
* IMAP connection states per RFC 9051 Section 3
|
|
66
66
|
*/
|
|
67
|
-
export type ConnectionState = "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required";
|
|
67
|
+
export type ConnectionState = "not_authenticated" | "authenticated" | "selected" | "logout" | "reauth_required" | "credentials_missing";
|
|
68
68
|
/**
|
|
69
69
|
* Phase of the initial account sync lifecycle
|
|
70
70
|
*/
|
|
@@ -73,6 +73,14 @@ writer can reach is a vocabulary that lies about what the field means.
|
|
|
73
73
|
* Where a resolved FolderAppointment came from. Total and required: every role carries one, so a surface can tell a folder somebody chose from a folder reader guessed without inferring it from which fields happen to be present.
|
|
74
74
|
*/
|
|
75
75
|
export type FolderAppointmentSource = "Appointed" | "Flagged" | "Reserved" | "Proposed" | "Stale" | "None";
|
|
76
|
+
/**
|
|
77
|
+
* Whether an import writes. The default is the dry run, so the wizard can show what a file would do before anything lands.
|
|
78
|
+
*/
|
|
79
|
+
export type ConfigImportMode = "validate" | "apply";
|
|
80
|
+
/**
|
|
81
|
+
* What an import does when the configuration it is importing into is not empty.
|
|
82
|
+
*/
|
|
83
|
+
export type ConfigImportOnExisting = "abort" | "merge";
|
|
76
84
|
/**
|
|
77
85
|
* 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).
|
|
78
86
|
*/
|
|
@@ -249,6 +257,14 @@ distinguishable from a network failure without parsing prose.
|
|
|
249
257
|
* Known user-setting keys. Each maps, in the registry, to a required value kind and a zod schema. New keys are added deliberately by extending this enum and the registry — never as an ad-hoc column.
|
|
250
258
|
*/
|
|
251
259
|
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "FolderRoleAppointmentLabel" | "MailboxRole";
|
|
260
|
+
/**
|
|
261
|
+
* Lifecycle of one applied configuration import. An import is Complete the moment every folder reference in the file has been bound to a real mailbox; until then it is Pending, waiting on the IMAP discovery that will produce those mailboxes.
|
|
262
|
+
*/
|
|
263
|
+
export type ConfigImportState = "Pending" | "Complete";
|
|
264
|
+
/**
|
|
265
|
+
* Which piece of configuration a still-unbound folder reference belongs to. A mailbox id is regenerated by every discovery, so an imported file names folders by IMAP path and the binder writes the row once a path resolves.
|
|
266
|
+
*/
|
|
267
|
+
export type ConfigImportRefKind = "FolderRole" | "MailboxOverride" | "FilterAction";
|
|
252
268
|
/**
|
|
253
269
|
* Explicit state engine for a pending placement-move marker (issue #1271, epic #1281). Recovery keys off this field, not control-flow inference: a redelivered/retried call drives a marker forward from whichever state it is actually in, rather than re-deriving intent by comparing the message's current location.
|
|
254
270
|
*/
|
|
@@ -860,6 +876,10 @@ never from a raw content-type line — parameters carry `name=` and
|
|
|
860
876
|
* Associated email accounts
|
|
861
877
|
*/
|
|
862
878
|
accounts: AccountResponse[];
|
|
879
|
+
/**
|
|
880
|
+
* Absent unless a configuration import is still waiting on folders IMAP has not produced yet (#1021). Nothing polls a separate route for it.
|
|
881
|
+
*/
|
|
882
|
+
pendingImport?: PendingConfigImport;
|
|
863
883
|
}
|
|
864
884
|
/**
|
|
865
885
|
* Configuration container for user accounts. Groups multiple IMAP accounts under a single user.
|
|
@@ -1233,6 +1253,23 @@ never from a raw content-type line — parameters carry `name=` and
|
|
|
1233
1253
|
*/
|
|
1234
1254
|
staleAppointmentPath?: String512;
|
|
1235
1255
|
}
|
|
1256
|
+
/**
|
|
1257
|
+
* An import that is still waiting for IMAP discovery to produce the folders its
|
|
1258
|
+
file named. The folder appointed to a role, a folder's own display name or
|
|
1259
|
+
mute, and a filter's move destination are all bound by path; a path this
|
|
1260
|
+
account does not hold yet is kept, not guessed, and bound the moment discovery
|
|
1261
|
+
finds it.
|
|
1262
|
+
*/
|
|
1263
|
+
export interface PendingConfigImport {
|
|
1264
|
+
/**
|
|
1265
|
+
* The import still waiting
|
|
1266
|
+
*/
|
|
1267
|
+
importId: UUID;
|
|
1268
|
+
/**
|
|
1269
|
+
* The IMAP paths no mailbox answers to yet, deduplicated
|
|
1270
|
+
*/
|
|
1271
|
+
folderPaths: string[];
|
|
1272
|
+
}
|
|
1236
1273
|
/**
|
|
1237
1274
|
* A configuration export: one versioned document carrying every user decision this instance holds, and no credential.
|
|
1238
1275
|
*/
|
|
@@ -1246,6 +1283,104 @@ never from a raw content-type line — parameters carry `name=` and
|
|
|
1246
1283
|
*/
|
|
1247
1284
|
document: Record;
|
|
1248
1285
|
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Request body for POST /config/import
|
|
1288
|
+
*/
|
|
1289
|
+
export interface ImportConfigInput {
|
|
1290
|
+
/**
|
|
1291
|
+
* `validate` writes nothing; `apply` writes.
|
|
1292
|
+
*/
|
|
1293
|
+
mode?: ConfigImportMode;
|
|
1294
|
+
/**
|
|
1295
|
+
* What to do when this configuration is not empty.
|
|
1296
|
+
*/
|
|
1297
|
+
onExisting?: ConfigImportOnExisting;
|
|
1298
|
+
/**
|
|
1299
|
+
* The config document, as exported.
|
|
1300
|
+
*/
|
|
1301
|
+
document: Record;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* The outcome of a validate or an apply. A rejected document is an answer, not a failure: `valid` is false and `errors` says why.
|
|
1305
|
+
*/
|
|
1306
|
+
export interface ConfigImportReport {
|
|
1307
|
+
/**
|
|
1308
|
+
* Import identity; present on apply, so the folder bindings this import is still waiting on can be named later
|
|
1309
|
+
*/
|
|
1310
|
+
importId?: UUID;
|
|
1311
|
+
/**
|
|
1312
|
+
* Whether the document is importable at all
|
|
1313
|
+
*/
|
|
1314
|
+
valid: boolean;
|
|
1315
|
+
/**
|
|
1316
|
+
* Schema version of the submitted document
|
|
1317
|
+
*/
|
|
1318
|
+
schemaVersion: number;
|
|
1319
|
+
/**
|
|
1320
|
+
* Whether anything was written
|
|
1321
|
+
*/
|
|
1322
|
+
applied: boolean;
|
|
1323
|
+
/**
|
|
1324
|
+
* Per-item verdicts
|
|
1325
|
+
*/
|
|
1326
|
+
items: ConfigImportItemReport[];
|
|
1327
|
+
/**
|
|
1328
|
+
* Blocking problems; non-empty means nothing was written
|
|
1329
|
+
*/
|
|
1330
|
+
errors: ApiError[];
|
|
1331
|
+
/**
|
|
1332
|
+
* Non-blocking notes - e.g. a folder path this account does not hold yet
|
|
1333
|
+
*/
|
|
1334
|
+
warnings: ApiError[];
|
|
1335
|
+
/**
|
|
1336
|
+
* Accounts that landed needing a credential before they can sync
|
|
1337
|
+
*/
|
|
1338
|
+
accountsNeedingCredentials: UUID[];
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* What became of one item in the submitted document
|
|
1342
|
+
*/
|
|
1343
|
+
export interface ConfigImportItemReport {
|
|
1344
|
+
/**
|
|
1345
|
+
* Which section: accounts | labels | filters | addressFlags | settings
|
|
1346
|
+
*/
|
|
1347
|
+
section: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* Human key of the item - an email, a label name, a filter name
|
|
1350
|
+
*/
|
|
1351
|
+
key: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* created | updated | unchanged | skipped | rejected
|
|
1354
|
+
*/
|
|
1355
|
+
verdict: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Why, when the verdict is skipped or rejected
|
|
1358
|
+
*/
|
|
1359
|
+
reason?: string;
|
|
1360
|
+
}
|
|
1361
|
+
/**
|
|
1362
|
+
* The import was refused because this configuration is not empty. The body is
|
|
1363
|
+
flat: `code`, `message` and `details` sit at the top level.
|
|
1364
|
+
|
|
1365
|
+
`code: "config_not_empty"` — the configuration already holds an account, a
|
|
1366
|
+
label, a filter or an address flag. `details` names how many of each. Re-send
|
|
1367
|
+
with `onExisting: merge` to upsert instead.
|
|
1368
|
+
*/
|
|
1369
|
+
export interface ConfigImportConflict {
|
|
1370
|
+
statusCode: 409;
|
|
1371
|
+
/**
|
|
1372
|
+
* Error code
|
|
1373
|
+
*/
|
|
1374
|
+
code: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* Human-readable error message
|
|
1377
|
+
*/
|
|
1378
|
+
message: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* Additional error details
|
|
1381
|
+
*/
|
|
1382
|
+
details?: Record;
|
|
1383
|
+
}
|
|
1249
1384
|
/**
|
|
1250
1385
|
* 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).
|
|
1251
1386
|
*/
|
|
@@ -4208,6 +4343,78 @@ either way and cannot tell which it received.
|
|
|
4208
4343
|
createdAt: number;
|
|
4209
4344
|
updatedAt: number;
|
|
4210
4345
|
}
|
|
4346
|
+
/**
|
|
4347
|
+
* A folder reference an import could not bind yet. Every folder in a
|
|
4348
|
+
configuration file is named by IMAP path, because mailbox ids are regenerated
|
|
4349
|
+
by each discovery, and a fresh database holds no mailboxes at all until IMAP
|
|
4350
|
+
has been read. The reference is recorded rather than dropped or guessed, and
|
|
4351
|
+
the binder writes the row it belongs to once the path resolves.
|
|
4352
|
+
*/
|
|
4353
|
+
export interface ConfigImportUnresolvedRef {
|
|
4354
|
+
/**
|
|
4355
|
+
* Which piece of configuration this reference belongs to
|
|
4356
|
+
*/
|
|
4357
|
+
kind: ConfigImportRefKind;
|
|
4358
|
+
/**
|
|
4359
|
+
* The account whose folders this path resolves against
|
|
4360
|
+
*/
|
|
4361
|
+
accountId: UUID;
|
|
4362
|
+
/**
|
|
4363
|
+
* The IMAP path, as the exporting instance spelled it
|
|
4364
|
+
*/
|
|
4365
|
+
folderPath: String512;
|
|
4366
|
+
/**
|
|
4367
|
+
* The role for a folder role, the folder path for a mailbox override, the filter id for a filter's move action
|
|
4368
|
+
*/
|
|
4369
|
+
target: String256;
|
|
4370
|
+
}
|
|
4371
|
+
/**
|
|
4372
|
+
* One applied configuration import (#1021). It exists because a file's folder
|
|
4373
|
+
references cannot bind at apply time: IMAP discovery produces the mailboxes,
|
|
4374
|
+
minutes to hours later, and the ids it assigns are new every run.
|
|
4375
|
+
|
|
4376
|
+
The row keeps the document as applied — credential-stripped, like the file
|
|
4377
|
+
itself — so the binder can re-read the payload behind each reference instead
|
|
4378
|
+
of copying it, and so a person can see what was imported after the fact.
|
|
4379
|
+
*/
|
|
4380
|
+
export interface ConfigImport {
|
|
4381
|
+
/**
|
|
4382
|
+
* Primary identifier
|
|
4383
|
+
*/
|
|
4384
|
+
importId: UUID;
|
|
4385
|
+
/**
|
|
4386
|
+
* The configuration this file was imported into — the caller's own, never the one the file records as its provenance
|
|
4387
|
+
*/
|
|
4388
|
+
accountConfigId: UUID;
|
|
4389
|
+
/**
|
|
4390
|
+
* Schema version of the document as applied, after migration
|
|
4391
|
+
*/
|
|
4392
|
+
schemaVersion: number;
|
|
4393
|
+
/**
|
|
4394
|
+
* Whether every folder reference has been bound
|
|
4395
|
+
*/
|
|
4396
|
+
state: ConfigImportState;
|
|
4397
|
+
/**
|
|
4398
|
+
* The document as applied. Carries no credential, for the same reason the file does not.
|
|
4399
|
+
*/
|
|
4400
|
+
document: Record;
|
|
4401
|
+
/**
|
|
4402
|
+
* Folder references still waiting for a mailbox. Emptied by the binder as discovery resolves each path; an empty list is what makes the import Complete.
|
|
4403
|
+
*/
|
|
4404
|
+
unresolvedRefs: ConfigImportUnresolvedRef[];
|
|
4405
|
+
/**
|
|
4406
|
+
* Epoch millis when the import was applied
|
|
4407
|
+
*/
|
|
4408
|
+
createdAt: number;
|
|
4409
|
+
/**
|
|
4410
|
+
* Epoch millis when the last folder reference was bound; `0` while the import is still Pending
|
|
4411
|
+
*/
|
|
4412
|
+
completedAt: number;
|
|
4413
|
+
/**
|
|
4414
|
+
* Epoch millis when the row was last written
|
|
4415
|
+
*/
|
|
4416
|
+
updatedAt: number;
|
|
4417
|
+
}
|
|
4211
4418
|
/**
|
|
4212
4419
|
* Typed value for a user setting. `kind` discriminates the concrete shape; a registry binds each setting name to the kind it requires.
|
|
4213
4420
|
*/
|
|
@@ -4849,6 +5056,14 @@ declare namespace Paths {
|
|
|
4849
5056
|
export type $200 = void;
|
|
4850
5057
|
}
|
|
4851
5058
|
}
|
|
5059
|
+
namespace ImportConfig {
|
|
5060
|
+
export type RequestBody = Components.Schemas.ImportConfigInput;
|
|
5061
|
+
namespace Responses {
|
|
5062
|
+
export type $200 = void;
|
|
5063
|
+
export type $400 = void;
|
|
5064
|
+
export type $409 = void;
|
|
5065
|
+
}
|
|
5066
|
+
}
|
|
4852
5067
|
namespace GetSystemUpdate {
|
|
4853
5068
|
export interface QueryParameters {
|
|
4854
5069
|
refresh?: boolean;
|
|
@@ -5402,6 +5617,14 @@ export interface OperationMethods {
|
|
|
5402
5617
|
data?: any,
|
|
5403
5618
|
config?: AxiosRequestConfig
|
|
5404
5619
|
): OperationResponse<Paths.ExportConfig.Responses.$200>;
|
|
5620
|
+
/**
|
|
5621
|
+
* importConfig - Validate, or validate and apply, a config document. `mode: validate` (the default) writes nothing and returns the same report an apply would. `onExisting: abort` (the default) refuses with 409 when this configuration already holds accounts, labels, filters or address flags. Nothing is written until the whole document has validated; a write failure after that aborts the remainder and the report names exactly what landed. Imported accounts arrive inactive with `connectionState: credentials_missing` (or `reauth_required` for OAuth) - the credentials the file deliberately omits are re-entered per account afterwards.
|
|
5622
|
+
*/
|
|
5623
|
+
'importConfig'(
|
|
5624
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5625
|
+
data?: Paths.ImportConfig.RequestBody,
|
|
5626
|
+
config?: AxiosRequestConfig
|
|
5627
|
+
): OperationResponse<Paths.ImportConfig.Responses.$200>;
|
|
5405
5628
|
/**
|
|
5406
5629
|
* 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. With `refresh=true`, records a check request on the control volume for the updater to pick up and answers with the stored state as it stands; the caller watches `check.lastCheckedAt` for the updater's answer. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
|
|
5407
5630
|
*/
|
|
@@ -5939,6 +6162,16 @@ export interface PathsDictionary {
|
|
|
5939
6162
|
config?: AxiosRequestConfig
|
|
5940
6163
|
): OperationResponse<Paths.ExportConfig.Responses.$200>;
|
|
5941
6164
|
};
|
|
6165
|
+
['/config/import']: {
|
|
6166
|
+
/**
|
|
6167
|
+
* importConfig - Validate, or validate and apply, a config document. `mode: validate` (the default) writes nothing and returns the same report an apply would. `onExisting: abort` (the default) refuses with 409 when this configuration already holds accounts, labels, filters or address flags. Nothing is written until the whole document has validated; a write failure after that aborts the remainder and the report names exactly what landed. Imported accounts arrive inactive with `connectionState: credentials_missing` (or `reauth_required` for OAuth) - the credentials the file deliberately omits are re-entered per account afterwards.
|
|
6168
|
+
*/
|
|
6169
|
+
'post'(
|
|
6170
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
6171
|
+
data?: Paths.ImportConfig.RequestBody,
|
|
6172
|
+
config?: AxiosRequestConfig
|
|
6173
|
+
): OperationResponse<Paths.ImportConfig.Responses.$200>;
|
|
6174
|
+
};
|
|
5942
6175
|
['/system/update']: {
|
|
5943
6176
|
/**
|
|
5944
6177
|
* 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. With `refresh=true`, records a check request on the control volume for the updater to pick up and answers with the stored state as it stands; the caller watches `check.lastCheckedAt` for the updater's answer. Owner-only, and absent (404) unless a manifest URL is configured (RFC 037 D7, D8).
|
|
@@ -6522,7 +6755,12 @@ export type AccountResponse = Components.Schemas.AccountResponse;
|
|
|
6522
6755
|
export type AddressFlagBase = Components.Schemas.AddressFlagBase;
|
|
6523
6756
|
export type MutedFlag = Components.Schemas.MutedFlag;
|
|
6524
6757
|
export type FolderAppointment = Components.Schemas.FolderAppointment;
|
|
6758
|
+
export type PendingConfigImport = Components.Schemas.PendingConfigImport;
|
|
6525
6759
|
export type ConfigExportResponse = Components.Schemas.ConfigExportResponse;
|
|
6760
|
+
export type ImportConfigInput = Components.Schemas.ImportConfigInput;
|
|
6761
|
+
export type ConfigImportReport = Components.Schemas.ConfigImportReport;
|
|
6762
|
+
export type ConfigImportItemReport = Components.Schemas.ConfigImportItemReport;
|
|
6763
|
+
export type ConfigImportConflict = Components.Schemas.ConfigImportConflict;
|
|
6526
6764
|
export type SystemUpdateResponse = Components.Schemas.SystemUpdateResponse;
|
|
6527
6765
|
export type SystemUpdateCheck = Components.Schemas.SystemUpdateCheck;
|
|
6528
6766
|
export type SystemUpdateRun = Components.Schemas.SystemUpdateRun;
|
|
@@ -6611,6 +6849,8 @@ export type UpdateMessageLabelsInput = Components.Schemas.UpdateMessageLabelsInp
|
|
|
6611
6849
|
export type SpamReportBulkResult = Components.Schemas.SpamReportBulkResult;
|
|
6612
6850
|
export type SpamReportFailure = Components.Schemas.SpamReportFailure;
|
|
6613
6851
|
export type EnvelopeAddress = Components.Schemas.EnvelopeAddress;
|
|
6852
|
+
export type ConfigImportUnresolvedRef = Components.Schemas.ConfigImportUnresolvedRef;
|
|
6853
|
+
export type ConfigImport = Components.Schemas.ConfigImport;
|
|
6614
6854
|
export type AccountSettingValue = Components.Schemas.AccountSettingValue;
|
|
6615
6855
|
export type BooleanSetting = Components.Schemas.BooleanSetting;
|
|
6616
6856
|
export type StringSetting = Components.Schemas.StringSetting;
|
|
@@ -6646,6 +6886,8 @@ export type AccountAuthType = Components.Schemas.AccountAuthType;
|
|
|
6646
6886
|
export type ConnectionState = Components.Schemas.ConnectionState;
|
|
6647
6887
|
export type SyncPhase = Components.Schemas.SyncPhase;
|
|
6648
6888
|
export type FolderAppointmentSource = Components.Schemas.FolderAppointmentSource;
|
|
6889
|
+
export type ConfigImportMode = Components.Schemas.ConfigImportMode;
|
|
6890
|
+
export type ConfigImportOnExisting = Components.Schemas.ConfigImportOnExisting;
|
|
6649
6891
|
export type SystemUpdateCheckStatus = Components.Schemas.SystemUpdateCheckStatus;
|
|
6650
6892
|
export type SystemUpdatePhase = Components.Schemas.SystemUpdatePhase;
|
|
6651
6893
|
export type SystemUpdateOutcome = Components.Schemas.SystemUpdateOutcome;
|
|
@@ -6687,6 +6929,8 @@ export type MailboxAttribute = Components.Schemas.MailboxAttribute;
|
|
|
6687
6929
|
export type StorageType = Components.Schemas.StorageType;
|
|
6688
6930
|
export type ContentEncoding = Components.Schemas.ContentEncoding;
|
|
6689
6931
|
export type AccountSettingName = Components.Schemas.AccountSettingName;
|
|
6932
|
+
export type ConfigImportState = Components.Schemas.ConfigImportState;
|
|
6933
|
+
export type ConfigImportRefKind = Components.Schemas.ConfigImportRefKind;
|
|
6690
6934
|
export type MessagePlacementMoveState = Components.Schemas.MessagePlacementMoveState;
|
|
6691
6935
|
export type FlagPushOperation = Components.Schemas.FlagPushOperation;
|
|
6692
6936
|
export type MessageFlagPushState = Components.Schemas.MessageFlagPushState;
|