@remit/data-ports 0.0.57 → 0.0.59
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
CHANGED
|
@@ -47,6 +47,13 @@ export interface IThreadMessageRepository {
|
|
|
47
47
|
continuationToken?: string;
|
|
48
48
|
inboxMailboxIds?: Set<string>;
|
|
49
49
|
excludeDeleted?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Row criteria applied inside the query, so a page is a page of
|
|
52
|
+
* matches however rare the criterion is. Filtering the rows a page
|
|
53
|
+
* returned instead is what makes a listing look empty whenever the
|
|
54
|
+
* matching mail sits below the newest page (#308).
|
|
55
|
+
*/
|
|
56
|
+
search?: SearchOptions;
|
|
50
57
|
},
|
|
51
58
|
): Promise<ResultList<ThreadMessageItem>>;
|
|
52
59
|
/**
|
|
@@ -100,8 +107,31 @@ export interface IThreadMessageRepository {
|
|
|
100
107
|
continuationToken?: string;
|
|
101
108
|
mailboxIds?: Set<string>;
|
|
102
109
|
excludeDeleted?: boolean;
|
|
110
|
+
/** Row criteria applied inside the query; see `listByDate`. */
|
|
111
|
+
search?: SearchOptions;
|
|
103
112
|
},
|
|
104
113
|
): Promise<ResultList<ThreadMessageItem>>;
|
|
114
|
+
/**
|
|
115
|
+
* COUNT of matching CONVERSATIONS over the same predicate and the same
|
|
116
|
+
* mailbox scope the three cross-account listing modes read with — the scoped
|
|
117
|
+
* counterpart of `countByMailbox`.
|
|
118
|
+
*
|
|
119
|
+
* A page size bounds the rows a response carries and has no bearing on how
|
|
120
|
+
* much matches, so a count returns no rows and is answered in full.
|
|
121
|
+
*
|
|
122
|
+
* Distinct on `threadId`, unlike `countByMailbox`, because the cross-account
|
|
123
|
+
* listing is collapsed by thread before it is rendered: a row is per mailbox,
|
|
124
|
+
* so one message reachable through a real folder and a virtual copy of it is
|
|
125
|
+
* several rows, and two matching messages of one conversation are two more.
|
|
126
|
+
*/
|
|
127
|
+
countThreadsInScope(
|
|
128
|
+
accountConfigId: string,
|
|
129
|
+
search: SearchOptions,
|
|
130
|
+
options?: {
|
|
131
|
+
mailboxIds?: Set<string>;
|
|
132
|
+
excludeDeleted?: boolean;
|
|
133
|
+
},
|
|
134
|
+
): Promise<number>;
|
|
105
135
|
/**
|
|
106
136
|
* Every message of a thread, across all mailboxes of the account. A
|
|
107
137
|
* conversation spans INBOX, Sent and any folder its messages were filed
|
|
@@ -169,6 +199,17 @@ export interface IThreadMessageRepository {
|
|
|
169
199
|
excludeDeleted?: boolean;
|
|
170
200
|
},
|
|
171
201
|
): Promise<ResultList<ThreadMessageItem>>;
|
|
202
|
+
/**
|
|
203
|
+
* COUNT of matching MESSAGES in one mailbox, under the same predicate
|
|
204
|
+
* `searchByMailboxWindow` reads with — the per-mailbox counterpart of
|
|
205
|
+
* `countThreadsInScope`, and not distinct on `threadId` because the listing
|
|
206
|
+
* it answers for renders a row per message.
|
|
207
|
+
*
|
|
208
|
+
* The number is over the whole mailbox. No page size bounds it and no cursor
|
|
209
|
+
* narrows it, so it does not shrink as the caller pages and does not change
|
|
210
|
+
* when the page size does (#305). There is nothing to cap: the count is one
|
|
211
|
+
* aggregate read that returns no rows.
|
|
212
|
+
*/
|
|
172
213
|
countByMailbox(
|
|
173
214
|
accountConfigId: string,
|
|
174
215
|
mailboxId: string,
|