@remit/data-ports 0.0.82 → 0.0.83
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 +1 -1
- package/src/errors.ts +18 -0
- package/src/interfaces/message.ts +9 -0
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -131,6 +131,24 @@ export class MessagePlacementUnsettledError extends ConflictError {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* The row named a message the mail server no longer holds at that UID —
|
|
136
|
+
* another client expunged it or moved it away. Distinct from a plain
|
|
137
|
+
* not-found so the client can say where the message went rather than
|
|
138
|
+
* claiming the user deleted it.
|
|
139
|
+
*/
|
|
140
|
+
export class MessageGoneFromServerError extends NotFoundError {
|
|
141
|
+
name = "MessageGoneFromServerError";
|
|
142
|
+
|
|
143
|
+
constructor(messageId: string) {
|
|
144
|
+
super("This message is no longer on the mail server.");
|
|
145
|
+
this.publicApiError = {
|
|
146
|
+
code: "message_gone_from_server",
|
|
147
|
+
details: { messageId },
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
134
152
|
/**
|
|
135
153
|
* A configuration import refused because this configuration is not empty
|
|
136
154
|
* (#1021). The default is to refuse rather than to fold the file in: a person
|
|
@@ -22,6 +22,15 @@ export interface IMessageRepository {
|
|
|
22
22
|
clearSpamReport(messageId: string): Promise<MessageItem>;
|
|
23
23
|
delete(messageId: string): Promise<void>;
|
|
24
24
|
deleteMany(messageIds: string[]): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete the row only while its placement still matches what the caller
|
|
27
|
+
* read (imap-mutations R3). Resolves `false` when the predicate did not
|
|
28
|
+
* match and nothing was deleted.
|
|
29
|
+
*/
|
|
30
|
+
deleteIfPlacement(
|
|
31
|
+
messageId: string,
|
|
32
|
+
expected: PlacementPredicate,
|
|
33
|
+
): Promise<boolean>;
|
|
25
34
|
listByMailbox(
|
|
26
35
|
mailboxId: string,
|
|
27
36
|
options?: { limit?: number; continuationToken?: string },
|