@remit/data-ports 0.0.3 → 0.0.5

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.3",
3
+ "version": "0.0.5",
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
+ * List starred rows for a config, newest first, across every mailbox.
54
+ *
55
+ * Backed by the `byStarred` index (pk = accountConfigId, sk = hasStars +
56
+ * sentDate). Starredness is read from `hasStars` — the boolean of record —
57
+ * never from the presentation-only `star` colour. `mailboxIds` narrows the
58
+ * result to a caller-supplied set (used to drop muted mailboxes and the
59
+ * folders a star never surfaces from); omitting it returns every mailbox.
60
+ *
61
+ * Rows are per mailbox, not per conversation: the same mail filed in two
62
+ * folders is two rows sharing a `threadId`. Callers that render one row per
63
+ * conversation must collapse by `threadId` across the pages they have
64
+ * accumulated — this cannot be done inside a single page.
65
+ */
66
+ listByStarred(
67
+ accountConfigId: string,
68
+ options?: {
69
+ order?: "asc" | "desc";
70
+ limit?: number;
71
+ continuationToken?: string;
72
+ mailboxIds?: Set<string>;
73
+ excludeDeleted?: boolean;
74
+ },
75
+ ): Promise<ResultList<ThreadMessageItem>>;
76
+ /**
77
+ * Every message of a thread, across all mailboxes of the account. A
78
+ * conversation spans INBOX, Sent and any folder its messages were filed
79
+ * in, so this listing is deliberately not scoped to a mailbox (#46).
80
+ */
52
81
  listByThread(
53
82
  threadId: string,
54
83
  accountConfigId: string,
@@ -56,7 +85,6 @@ export interface IThreadMessageRepository {
56
85
  order?: "asc" | "desc";
57
86
  limit?: number;
58
87
  continuationToken?: string;
59
- mailboxId?: string;
60
88
  excludeDeleted?: boolean;
61
89
  },
62
90
  ): Promise<ResultList<ThreadMessageItem>>;