@remit/data-ports 0.0.89 → 0.0.91

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.
@@ -2,6 +2,7 @@ import type { ThreadMessageItem } from "../types.js";
2
2
  export type AccountDeleteEvent = {
3
3
  type: "AccountDelete";
4
4
  accountConfigId: string;
5
+ userId: string;
5
6
  };
6
7
  /**
7
8
  * Per-account hard-delete. Purges ONE mail account's data (mailboxes,
@@ -12,7 +12,10 @@ export interface IMessageRepository {
12
12
  clearBodyStorageKey(messageId: string): Promise<MessageItem>;
13
13
  clearSpamReport(messageId: string): Promise<MessageItem>;
14
14
  setSearchText(messageId: string, text: string): Promise<void>;
15
- copySearchText(sourceMessageId: string, targetMessageId: string): Promise<void>;
15
+ copyMessage(sourceMessageId: string, input: CreateMessageInput): Promise<{
16
+ item: MessageItem;
17
+ created: boolean;
18
+ }>;
16
19
  syncSearch(messageIds: string[]): Promise<void>;
17
20
  listMissingSearchText(after: string, limit: number): Promise<Array<{
18
21
  messageId: string;
@@ -27,6 +30,11 @@ export interface IMessageRepository {
27
30
  * deleted.
28
31
  */
29
32
  deleteIfPlacement(messageId: string, expected: PlacementPredicate): Promise<boolean>;
33
+ /** {@link deleteIfPlacement} for many rows of one folder, each still at its uid. */
34
+ deleteManyIfPlacement(mailboxId: string, placements: ReadonlyArray<{
35
+ messageId: string;
36
+ uid: number;
37
+ }>): Promise<void>;
30
38
  listByMailbox(mailboxId: string, options?: {
31
39
  limit?: number;
32
40
  continuationToken?: string;
package/dist/types.d.ts CHANGED
@@ -300,7 +300,7 @@ export type MailboxSubtreeTransitionIntent = {
300
300
  to: MailboxItem["syncStatus"];
301
301
  newPath: string;
302
302
  };
303
- export type CreateMessageInput = Omit<MessageItem, "messageId" | "createdAt" | "updatedAt" | "status" | "syncStatus" | "abandonedMutation" | "category" | "classificationState" | "authenticityVerdict" | "hasListUnsubscribe" | "movedByRemit"> & {
303
+ export type CreateMessageInput = Omit<MessageItem, "messageId" | "envelopeId" | "rootBodyPartId" | "createdAt" | "updatedAt" | "status" | "syncStatus" | "abandonedMutation" | "category" | "classificationState" | "authenticityVerdict" | "hasListUnsubscribe" | "movedByRemit"> & {
304
304
  messageId: string;
305
305
  status?: MessageItem["status"];
306
306
  syncStatus?: MessageItem["syncStatus"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/data-ports",
3
- "version": "0.0.89",
3
+ "version": "0.0.91",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",