@remit/api-openapi-spec 0.0.59 → 0.0.61
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/openapi.json +35 -1
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -5846,7 +5846,7 @@
|
|
|
5846
5846
|
"/threads": {
|
|
5847
5847
|
"get": {
|
|
5848
5848
|
"operationId": "UnifiedThreadOperations_listAllThreads",
|
|
5849
|
-
"description": "List threads across all non-muted accounts of the caller, ordered by sentDate desc. Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.\n\nINBOX scope: results are filtered to each account's top-level INBOX, matched by exact path `fullPath === \"INBOX\"` (RFC 6154 defines no Inbox special-use). By design this excludes namespaced sub-paths like `INBOX/Receipts` and non-English server primaries — the unified inbox is each account's primary INBOX, not its sub-folders. Soft-deleted rows are also excluded.\n\nMute exclusion: muted accounts and muted mailboxes are excluded. The inbox/mute filter set is rebuilt per page from live state, so muting/unmuting a mailbox mid-pagination takes effect on the next page (never retroactively).\n\nPagination: pass the returned `continuationToken` to fetch the next page; keep paging until it is absent. In the default (INBOX) mode the INBOX/deleted filter is applied after the index read with a bounded read window per request, so a page may return FEWER than `limit` rows while still carrying a `continuationToken` — treat the presence of the token (not a full page) as the \"more results\" signal. No rows are skipped or duplicated across pages.\n\nStarred mode (`starred=true`): served by the `byStarred` LSI4 instead. A star is a marker on the mail rather than on its placement, so the INBOX scope does not apply and a starred thread in Archive is still returned. Excluded are muted and soft-deleted rows as usual, plus the folders a star never surfaces from: Junk, Trash, and Gmail's All Mail (a second copy of everything, whose rows would otherwise double every starred message). All filtering happens in the query, so a page is short only when the results are exhausted. Rows are per mailbox: the same mail filed in two folders is two rows sharing a `threadId`, and a client rendering one row per conversation collapses by `threadId` across the pages it has accumulated.\n\nSearch mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it
|
|
5849
|
+
"description": "List threads across all non-muted accounts of the caller, ordered by sentDate desc (search mode ranks sender matches first, see below). Each row carries an attached `accountId` (derived from a mailboxId→accountId map at read time) plus the usual `senderTrust` enrichment; `category` is served from the ThreadMessage row. Served by the `byDate` LSI1 (pk = the caller's account config), so the caller can never see another account config's threads.\n\nINBOX scope: results are filtered to each account's top-level INBOX, matched by exact path `fullPath === \"INBOX\"` (RFC 6154 defines no Inbox special-use). By design this excludes namespaced sub-paths like `INBOX/Receipts` and non-English server primaries — the unified inbox is each account's primary INBOX, not its sub-folders. Soft-deleted rows are also excluded.\n\nMute exclusion: muted accounts and muted mailboxes are excluded. The inbox/mute filter set is rebuilt per page from live state, so muting/unmuting a mailbox mid-pagination takes effect on the next page (never retroactively).\n\nPagination: pass the returned `continuationToken` to fetch the next page; keep paging until it is absent. In the default (INBOX) mode the INBOX/deleted filter is applied after the index read with a bounded read window per request, so a page may return FEWER than `limit` rows while still carrying a `continuationToken` — treat the presence of the token (not a full page) as the \"more results\" signal. No rows are skipped or duplicated across pages.\n\nStarred mode (`starred=true`): served by the `byStarred` LSI4 instead. A star is a marker on the mail rather than on its placement, so the INBOX scope does not apply and a starred thread in Archive is still returned. Excluded are muted and soft-deleted rows as usual, plus the folders a star never surfaces from: Junk, Trash, and Gmail's All Mail (a second copy of everything, whose rows would otherwise double every starred message). All filtering happens in the query, so a page is short only when the results are exhausted. Rows are per mailbox: the same mail filed in two folders is two rows sharing a `threadId`, and a client rendering one row per conversation collapses by `threadId` across the pages it has accumulated.\n\nSearch mode (`query=<text>`): the listing widens past the INBOX scope to every non-muted mailbox of every non-muted account, and returns only rows whose subject, From address or body text matches the text. This is the unscoped search of the daily brief: one query reaching every folder of every account. Whitespace splits the text into terms and every term must match (AND), each against subject OR From OR body. Matching is case-insensitive substring, not tokenized full-text, so it does not stem. Rows come in two tiers: a row whose From matches any term ranks above a row that only mentions the terms in its subject or body text, and each tier runs in date order.\n\nBody text is the stored preview the row carries — the first prose of the message with quoted replies removed, which is the same text the row renders under its subject. A term further into a long message is not reached; a term the reader can see on the row is.\n\nSearch scope: every non-muted mailbox EXCEPT Trash. The scope is defined by what it excludes, so anything a server offers that is not on that list is searched — Spam, Drafts and Gmail's virtual folders (All Mail, Starred, Important) included. Spam is deliberately in scope: the point of an unscoped search is that it reaches the folders the user did not think to look in. Combining `query` with `starred=true` searches the starred scope instead.\n\nDuplicates: a virtual folder holds a second copy of mail that also lives in a real folder, so a backend keying a row by its mailbox returns the same message several times — a starred, Important Gmail inbox message four times. The extras are dropped from the response by message identity, keeping the copy in a real folder, so one message is one row. This is done after the read rather than by barring those folders from the scope, because a message whose only stored row sits in one of them would otherwise become unfindable. De-duplication is per page: a duplicate split across a page boundary survives, the same caveat that applies to collapsing by `threadId`. A page may therefore return fewer rows than `limit` while still carrying a `continuationToken`.\n\nSearch mode and pagination: `limit` is a page size over MATCHES, capped server-side at 500. A page may be shorter than `limit` for two reasons — the matches ran out, or duplicates were dropped from it — so treat the presence of a `continuationToken` as the \"more results\" signal rather than a full page. There is no total match count; page until the token is absent.\n\nWhat a row is in search mode: one per message, not one per mailbox. This differs from the starred mode above, where the same mail filed in two folders is two rows sharing a `threadId`. Collapsing by `threadId` is still a client's job if it renders one row per CONVERSATION, since distinct messages in one thread remain distinct rows here.\n\nCallers that omit `query` are unaffected: the INBOX (and starred) listings behave exactly as before.\n\nRow filters: `category`, `unread` and `attachments` are columns on the ThreadMessage row, so each is a predicate inside the query rather than a pass over what a page returned. They compose with every mode above — INBOX, starred and search alike — and a page therefore comes back full of matches however rare the criterion is. This is what the cross-account collections need: filtering the pages a client happens to have loaded shows an empty list whenever the matching mail sits below the newest page (#308).\n\nField filters: `from` and `subject` each match one field, which the single `query` cannot express — it matches both at once. They compose with `query` and with each other as further AND terms.\n\nAccount scope: `accountId` narrows every mode to the mailboxes of one account. The scope is built from the account's own mailboxes, so the listing, the count and the search all answer over the same set. Without it the listing is the cross-account aggregate.\n\nFolder scope: `mailboxId` narrows the same scope to one folder, and composes with `accountId` as a further AND — a folder of another account leaves the scope empty and matches nothing. It is how a caller asks what one folder holds of a cross-account search, counted in the same conversations the unscoped listing renders. A folder the scope already excludes — Trash, a muted one, one of a muted account — stays excluded.\n\nMuted senders: `muted=false` excludes rows whose From address is muted, `muted=true` returns only those, and omitting it filters nothing. Muting is a property of the address rather than a column on the row, so this is the one predicate that reaches outside the ThreadMessage table; it applies to the listing and the `count` alike, which is what lets a caller that hides muted mail state a number that is the size of what it renders.\n\nCounting: `count=true` answers how many CONVERSATIONS match, over the whole scope and independent of `limit`. `results=false` omits the rows, which is how a header total is read without also paying for a page of mail. Conversations rather than rows because that is what this listing renders: a row is per mailbox, so the same mail filed in two folders is two rows sharing a `threadId`, and clients collapse by it. Counting rows would put a third number beside a list that shows a second one.",
|
|
5850
5850
|
"parameters": [
|
|
5851
5851
|
{
|
|
5852
5852
|
"name": "continuationToken",
|
|
@@ -6363,6 +6363,7 @@
|
|
|
6363
6363
|
"username",
|
|
6364
6364
|
"email",
|
|
6365
6365
|
"authType",
|
|
6366
|
+
"syncedServices",
|
|
6366
6367
|
"imapHost",
|
|
6367
6368
|
"imapPort",
|
|
6368
6369
|
"imapTls",
|
|
@@ -6419,6 +6420,17 @@
|
|
|
6419
6420
|
"default": "password",
|
|
6420
6421
|
"readOnly": true
|
|
6421
6422
|
},
|
|
6423
|
+
"syncedServices": {
|
|
6424
|
+
"type": "array",
|
|
6425
|
+
"items": {
|
|
6426
|
+
"$ref": "#/components/schemas/RemitImap.AccountService"
|
|
6427
|
+
},
|
|
6428
|
+
"description": "Services this account syncs. Never empty. A password account holds `Mail` alone. Every account written before this field existed holds `#[AccountService.Mail]`.",
|
|
6429
|
+
"default": [
|
|
6430
|
+
"Mail"
|
|
6431
|
+
],
|
|
6432
|
+
"readOnly": true
|
|
6433
|
+
},
|
|
6422
6434
|
"imapHost": {
|
|
6423
6435
|
"type": "string",
|
|
6424
6436
|
"minLength": 1,
|
|
@@ -6583,6 +6595,14 @@
|
|
|
6583
6595
|
},
|
|
6584
6596
|
"description": "Account response (excluding sensitive fields). Display name, mute flag, and signatures are sourced from per-account AccountSetting rows (RFC 032), not the Account entity, but are surfaced here so the response shape is unchanged."
|
|
6585
6597
|
},
|
|
6598
|
+
"RemitImap.AccountService": {
|
|
6599
|
+
"type": "string",
|
|
6600
|
+
"enum": [
|
|
6601
|
+
"Mail",
|
|
6602
|
+
"Calendar"
|
|
6603
|
+
],
|
|
6604
|
+
"description": "A service an account syncs. `Mail` covers messages, folders and sending; `Calendar` covers a provider calendar read into the calendar store."
|
|
6605
|
+
},
|
|
6586
6606
|
"RemitImap.AccountSyncStatusResponse": {
|
|
6587
6607
|
"type": "object",
|
|
6588
6608
|
"required": [
|
|
@@ -8216,6 +8236,13 @@
|
|
|
8216
8236
|
],
|
|
8217
8237
|
"description": "Authentication mechanism for this account. Defaults to `password`. Pass `oauthMicrosoft` only via the OAuth connect flow (POST /accounts/oauth/microsoft/start)."
|
|
8218
8238
|
},
|
|
8239
|
+
"syncedServices": {
|
|
8240
|
+
"type": "array",
|
|
8241
|
+
"items": {
|
|
8242
|
+
"$ref": "#/components/schemas/RemitImap.AccountService"
|
|
8243
|
+
},
|
|
8244
|
+
"description": "Services this account syncs. Defaults to `#[Mail]`. Refused when empty, and refused for a password account unless it is exactly `#[Mail]`."
|
|
8245
|
+
},
|
|
8219
8246
|
"password": {
|
|
8220
8247
|
"type": "string",
|
|
8221
8248
|
"format": "password",
|
|
@@ -11834,6 +11861,13 @@
|
|
|
11834
11861
|
"type": "boolean",
|
|
11835
11862
|
"description": "Enable/disable account"
|
|
11836
11863
|
},
|
|
11864
|
+
"syncedServices": {
|
|
11865
|
+
"type": "array",
|
|
11866
|
+
"items": {
|
|
11867
|
+
"$ref": "#/components/schemas/RemitImap.AccountService"
|
|
11868
|
+
},
|
|
11869
|
+
"description": "Replaces the stored service set outright. Refused when empty, on a password account unless it is exactly `#[Mail]`, or when it names a service the account's OAuth grant does not cover. That last case is a consent round trip through the OAuth start route."
|
|
11870
|
+
},
|
|
11837
11871
|
"signaturePlainText": {
|
|
11838
11872
|
"type": "string",
|
|
11839
11873
|
"description": "Plain text email signature"
|