@framers/agentos-ext-channel-email 0.2.1 → 0.4.1
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 +64 -2
- package/dist/EmailService.d.ts +15 -0
- package/dist/EmailService.d.ts.map +1 -1
- package/dist/EmailService.js +13 -0
- package/dist/EmailService.js.map +1 -1
- package/dist/ResendTransport.d.ts +12 -7
- package/dist/ResendTransport.d.ts.map +1 -1
- package/dist/ResendTransport.js +18 -11
- package/dist/ResendTransport.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/messageHeaders.d.ts +31 -0
- package/dist/messageHeaders.d.ts.map +1 -0
- package/dist/messageHeaders.js +90 -0
- package/dist/messageHeaders.js.map +1 -0
- package/dist/preferences/RecipientCapability.d.ts +100 -0
- package/dist/preferences/RecipientCapability.d.ts.map +1 -0
- package/dist/preferences/RecipientCapability.js +168 -0
- package/dist/preferences/RecipientCapability.js.map +1 -0
- package/dist/preferences/SuppressionStore.d.ts +72 -0
- package/dist/preferences/SuppressionStore.d.ts.map +1 -0
- package/dist/preferences/SuppressionStore.js +91 -0
- package/dist/preferences/SuppressionStore.js.map +1 -0
- package/dist/preferences/database.d.ts +34 -0
- package/dist/preferences/database.d.ts.map +1 -0
- package/dist/preferences/database.js +34 -0
- package/dist/preferences/database.js.map +1 -0
- package/dist/preferences/index.d.ts +15 -0
- package/dist/preferences/index.d.ts.map +1 -0
- package/dist/preferences/index.js +30 -0
- package/dist/preferences/index.js.map +1 -0
- package/manifest.json +3 -2
- package/package.json +4 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { EmailPreferencesDb } from './database.js';
|
|
2
|
+
export { DEFAULT_SUPPRESSION_SCOPE, SUPPRESSION_REASONS, SqlSuppressionStore, suppressionStoreDdl } from './SuppressionStore.js';
|
|
3
|
+
export type { SuppressionReason, SuppressionStore } from './SuppressionStore.js';
|
|
4
|
+
export { SqlRecipientCapability, recipientCapabilityDdl } from './RecipientCapability.js';
|
|
5
|
+
export type { RecipientCapability, RecipientCapabilityIssueOptions, RecipientGrant, SqlRecipientCapabilityOptions, } from './RecipientCapability.js';
|
|
6
|
+
/**
|
|
7
|
+
* Both tables' DDL under one prefix, the suppression record's then the recipient capabilities', for a host whose one
|
|
8
|
+
* migration makes both. A host whose tables come from different migrations runs `suppressionStoreDdl` and
|
|
9
|
+
* `recipientCapabilityDdl` where each belongs.
|
|
10
|
+
*
|
|
11
|
+
* @param prefix A lower-case letter followed by at most 39 lower-case letters, digits or underscores.
|
|
12
|
+
* @throws RangeError when the prefix does not fit.
|
|
13
|
+
*/
|
|
14
|
+
export declare function emailPreferencesDdl(prefix: string): string;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/preferences/index.ts"],"names":[],"mappings":"AAOA,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjI,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,YAAY,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,cAAc,EACd,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recipientCapabilityDdl = exports.SqlRecipientCapability = exports.suppressionStoreDdl = exports.SqlSuppressionStore = exports.SUPPRESSION_REASONS = exports.DEFAULT_SUPPRESSION_SCOPE = void 0;
|
|
4
|
+
exports.emailPreferencesDdl = emailPreferencesDdl;
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview The email pack's preference stores: the suppression record and recipient capabilities, each on a
|
|
7
|
+
* host's SQL database under a table prefix.
|
|
8
|
+
*/
|
|
9
|
+
const RecipientCapability_js_1 = require("./RecipientCapability.js");
|
|
10
|
+
const SuppressionStore_js_1 = require("./SuppressionStore.js");
|
|
11
|
+
var SuppressionStore_js_2 = require("./SuppressionStore.js");
|
|
12
|
+
Object.defineProperty(exports, "DEFAULT_SUPPRESSION_SCOPE", { enumerable: true, get: function () { return SuppressionStore_js_2.DEFAULT_SUPPRESSION_SCOPE; } });
|
|
13
|
+
Object.defineProperty(exports, "SUPPRESSION_REASONS", { enumerable: true, get: function () { return SuppressionStore_js_2.SUPPRESSION_REASONS; } });
|
|
14
|
+
Object.defineProperty(exports, "SqlSuppressionStore", { enumerable: true, get: function () { return SuppressionStore_js_2.SqlSuppressionStore; } });
|
|
15
|
+
Object.defineProperty(exports, "suppressionStoreDdl", { enumerable: true, get: function () { return SuppressionStore_js_2.suppressionStoreDdl; } });
|
|
16
|
+
var RecipientCapability_js_2 = require("./RecipientCapability.js");
|
|
17
|
+
Object.defineProperty(exports, "SqlRecipientCapability", { enumerable: true, get: function () { return RecipientCapability_js_2.SqlRecipientCapability; } });
|
|
18
|
+
Object.defineProperty(exports, "recipientCapabilityDdl", { enumerable: true, get: function () { return RecipientCapability_js_2.recipientCapabilityDdl; } });
|
|
19
|
+
/**
|
|
20
|
+
* Both tables' DDL under one prefix, the suppression record's then the recipient capabilities', for a host whose one
|
|
21
|
+
* migration makes both. A host whose tables come from different migrations runs `suppressionStoreDdl` and
|
|
22
|
+
* `recipientCapabilityDdl` where each belongs.
|
|
23
|
+
*
|
|
24
|
+
* @param prefix A lower-case letter followed by at most 39 lower-case letters, digits or underscores.
|
|
25
|
+
* @throws RangeError when the prefix does not fit.
|
|
26
|
+
*/
|
|
27
|
+
function emailPreferencesDdl(prefix) {
|
|
28
|
+
return `${(0, SuppressionStore_js_1.suppressionStoreDdl)(prefix)}\n${(0, RecipientCapability_js_1.recipientCapabilityDdl)(prefix)}`;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preferences/index.ts"],"names":[],"mappings":";;;AA0BA,kDAEC;AA5BD;;;GAGG;AACH,qEAAkE;AAClE,+DAA4D;AAG5D,6DAAiI;AAAxH,gIAAA,yBAAyB,OAAA;AAAE,0HAAA,mBAAmB,OAAA;AAAE,0HAAA,mBAAmB,OAAA;AAAE,0HAAA,mBAAmB,OAAA;AAEjG,mEAA0F;AAAjF,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA;AAQvD;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CAAC,MAAc;IAChD,OAAO,GAAG,IAAA,yCAAmB,EAAC,MAAM,CAAC,KAAK,IAAA,+CAAsB,EAAC,MAAM,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.channels.email",
|
|
4
4
|
"name": "Email Channel Extension",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"description": "Bidirectional email integration: send through SMTP or Resend's HTTPS API, and read, search, extract verification codes and reply through IMAP.",
|
|
7
7
|
"categories": ["channel", "communication"],
|
|
8
8
|
"platforms": ["email"],
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"Read inbox and other IMAP folders",
|
|
23
23
|
"Search emails by query, folder, and date range",
|
|
24
24
|
"Extract verification codes and OTPs from email bodies",
|
|
25
|
-
"Reply to email threads maintaining conversation context"
|
|
25
|
+
"Reply to email threads maintaining conversation context",
|
|
26
|
+
"Keep a suppression record and opaque unsubscribe tokens, stored as hashes, on a SQL database"
|
|
26
27
|
]
|
|
27
28
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-channel-email",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Email channel adapter for AgentOS: send through SMTP or Resend's HTTPS API
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Email channel adapter for AgentOS: send through SMTP or Resend's HTTPS API; read, search, extract codes and reply through IMAP; keep a suppression record and unsubscribe tokens on a SQL database.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
"nodemailer": "^10.0.16"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
+
"@framers/sql-storage-adapter": "^0.6.14",
|
|
25
26
|
"@types/node": "^20.0.0",
|
|
26
27
|
"typescript": "^5.0.0",
|
|
27
28
|
"vitest": "^3.2.7",
|
|
28
|
-
"@framers/agentos": "^0.13.
|
|
29
|
+
"@framers/agentos": "^0.13.134"
|
|
29
30
|
},
|
|
30
31
|
"repository": {
|
|
31
32
|
"type": "git",
|