@marlinjai/email-mcp 1.4.2 → 1.4.4
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/README.md +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +2 -2
- package/dist/setup/wizard.js +6 -2
- package/dist/setup/wizard.js.map +2 -2
- package/package.json +1 -1
package/dist/setup/wizard.js
CHANGED
|
@@ -280,7 +280,11 @@ import { OAuth2Client } from "google-auth-library";
|
|
|
280
280
|
import crypto2 from "node:crypto";
|
|
281
281
|
var GMAIL_SCOPES = [
|
|
282
282
|
"https://mail.google.com/",
|
|
283
|
-
"https://www.googleapis.com/auth/gmail.modify"
|
|
283
|
+
"https://www.googleapis.com/auth/gmail.modify",
|
|
284
|
+
// Mailbox content access (above) does NOT cover the Settings API —
|
|
285
|
+
// Google treats them as separate permission domains. Needed for
|
|
286
|
+
// users.settings.filters.* (email_create_block_rule/list/delete).
|
|
287
|
+
"https://www.googleapis.com/auth/gmail.settings.basic"
|
|
284
288
|
];
|
|
285
289
|
var GmailAuth = class {
|
|
286
290
|
clientId;
|
|
@@ -1033,7 +1037,7 @@ var GmailAdapter = class {
|
|
|
1033
1037
|
criteria.query = rule.value;
|
|
1034
1038
|
break;
|
|
1035
1039
|
}
|
|
1036
|
-
const action = rule.action === "delete" ? { addLabelIds: ["TRASH"] } : {
|
|
1040
|
+
const action = rule.action === "delete" ? { addLabelIds: ["TRASH"] } : { removeLabelIds: ["INBOX"] };
|
|
1037
1041
|
const res = await gmail.users.settings.filters.create({
|
|
1038
1042
|
userId: "me",
|
|
1039
1043
|
requestBody: { criteria, action }
|