@remit/data-ports 0.0.7 → 0.0.8

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/data-ports",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -49,6 +49,35 @@ export interface IThreadMessageRepository {
49
49
  excludeDeleted?: boolean;
50
50
  },
51
51
  ): Promise<ResultList<ThreadMessageItem>>;
52
+ /**
53
+ * Search rows for a config across every mailbox in `mailboxIds`, newest
54
+ * first — the cross-account, cross-folder counterpart of `searchByMailbox`.
55
+ *
56
+ * Backed by the same date-ordered access pattern as `listByDate`; the caller
57
+ * supplies the mailbox scope, so a search reaching Archive, Sent, Spam and
58
+ * custom folders is a matter of which set is passed. An empty or absent
59
+ * `mailboxIds` means no narrowing (every mailbox of the config), which is why
60
+ * handlers pass an explicitly built set rather than relying on the default.
61
+ *
62
+ * Matching follows `searchByMailbox`: `query` splits on whitespace and every
63
+ * term must match subject OR From, case-insensitively. `limit` is a page size
64
+ * over MATCHES, clamped server-side, so a short page means the matches ran
65
+ * out — never that a read window was exhausted.
66
+ *
67
+ * Rows are per mailbox, not per conversation: the same mail filed in two
68
+ * folders is two rows sharing a `threadId`.
69
+ */
70
+ searchByDate(
71
+ accountConfigId: string,
72
+ search: SearchOptions,
73
+ options?: {
74
+ order?: "asc" | "desc";
75
+ limit?: number;
76
+ continuationToken?: string;
77
+ mailboxIds?: Set<string>;
78
+ excludeDeleted?: boolean;
79
+ },
80
+ ): Promise<ResultList<ThreadMessageItem>>;
52
81
  /**
53
82
  * List starred rows for a config, newest first, across every mailbox.
54
83
  *