@avallon-labs/mcp 14.2.0 → 14.4.0-staging.352
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/dist/index.js
CHANGED
|
@@ -875,6 +875,24 @@ var getEmail = async (emailId, options) => {
|
|
|
875
875
|
const data = body ? JSON.parse(body) : {};
|
|
876
876
|
return { data, status: res.status, headers: res.headers };
|
|
877
877
|
};
|
|
878
|
+
var getReplyToEmailUrl = (emailId) => {
|
|
879
|
+
return `/v1/emails/${emailId}/reply`;
|
|
880
|
+
};
|
|
881
|
+
var replyToEmail = async (emailId, replyToEmailBody, options) => {
|
|
882
|
+
const res = await fetch(getReplyToEmailUrl(emailId), {
|
|
883
|
+
...options,
|
|
884
|
+
method: "POST",
|
|
885
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
886
|
+
body: JSON.stringify(replyToEmailBody)
|
|
887
|
+
});
|
|
888
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
889
|
+
const data = body ? JSON.parse(body) : {};
|
|
890
|
+
return {
|
|
891
|
+
data,
|
|
892
|
+
status: res.status,
|
|
893
|
+
headers: res.headers
|
|
894
|
+
};
|
|
895
|
+
};
|
|
878
896
|
var getListExtractorJobsUrl = (params) => {
|
|
879
897
|
const normalizedParams = new URLSearchParams();
|
|
880
898
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2090,6 +2108,17 @@ var getEmailHandler = async (args) => {
|
|
|
2090
2108
|
]
|
|
2091
2109
|
};
|
|
2092
2110
|
};
|
|
2111
|
+
var replyToEmailHandler = async (args) => {
|
|
2112
|
+
const res = await replyToEmail(args.pathParams.emailId, args.bodyParams);
|
|
2113
|
+
return {
|
|
2114
|
+
content: [
|
|
2115
|
+
{
|
|
2116
|
+
type: "text",
|
|
2117
|
+
text: JSON.stringify(res)
|
|
2118
|
+
}
|
|
2119
|
+
]
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2093
2122
|
var listExtractorJobsHandler = async (args) => {
|
|
2094
2123
|
const res = await listExtractorJobs(args.queryParams);
|
|
2095
2124
|
return {
|
|
@@ -3673,6 +3702,15 @@ var GetEmailResponse = zod.object({
|
|
|
3673
3702
|
received_at: zod.string(),
|
|
3674
3703
|
created_at: zod.string().datetime({})
|
|
3675
3704
|
});
|
|
3705
|
+
var ReplyToEmailParams = zod.object({
|
|
3706
|
+
emailId: zod.string().min(1)
|
|
3707
|
+
});
|
|
3708
|
+
var ReplyToEmailBody = zod.object({
|
|
3709
|
+
body_text: zod.string().min(1)
|
|
3710
|
+
});
|
|
3711
|
+
var ReplyToEmailResponse = zod.object({
|
|
3712
|
+
sent: zod.boolean()
|
|
3713
|
+
});
|
|
3676
3714
|
var listExtractorJobsQueryCountDefault = 50;
|
|
3677
3715
|
var listExtractorJobsQueryCountMax = 100;
|
|
3678
3716
|
var listExtractorJobsQueryOffsetDefault = 0;
|
|
@@ -4109,6 +4147,7 @@ var GetProfileResponse = zod.object({
|
|
|
4109
4147
|
first_name: zod.union([zod.string(), zod.null()]),
|
|
4110
4148
|
last_name: zod.union([zod.string(), zod.null()]),
|
|
4111
4149
|
email: zod.string(),
|
|
4150
|
+
role: zod.enum(["admin", "member"]),
|
|
4112
4151
|
tenants: zod.object({
|
|
4113
4152
|
active: zod.object({
|
|
4114
4153
|
id: zod.string(),
|
|
@@ -4828,6 +4867,15 @@ server.tool(
|
|
|
4828
4867
|
},
|
|
4829
4868
|
getEmailHandler
|
|
4830
4869
|
);
|
|
4870
|
+
server.tool(
|
|
4871
|
+
"replyToEmail",
|
|
4872
|
+
"Reply to email",
|
|
4873
|
+
{
|
|
4874
|
+
pathParams: ReplyToEmailParams,
|
|
4875
|
+
bodyParams: ReplyToEmailBody
|
|
4876
|
+
},
|
|
4877
|
+
replyToEmailHandler
|
|
4878
|
+
);
|
|
4831
4879
|
server.tool(
|
|
4832
4880
|
"listExtractorJobs",
|
|
4833
4881
|
"List extractor jobs",
|
|
@@ -5139,4 +5187,4 @@ var transport = new StdioServerTransport();
|
|
|
5139
5187
|
server.connect(transport).then(() => {
|
|
5140
5188
|
console.error("MCP server running on stdio");
|
|
5141
5189
|
}).catch(console.error);
|
|
5142
|
-
//# sourceMappingURL=server-
|
|
5190
|
+
//# sourceMappingURL=server-MNJP63D4.js.map
|