@avallon-labs/mcp 19.3.0 → 19.5.0-staging.461
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
|
@@ -940,6 +940,24 @@ var replyToEmail = async (emailId, replyToEmailBody, options) => {
|
|
|
940
940
|
headers: res.headers
|
|
941
941
|
};
|
|
942
942
|
};
|
|
943
|
+
var getSendEmailUrl = () => {
|
|
944
|
+
return `/v1/emails/send`;
|
|
945
|
+
};
|
|
946
|
+
var sendEmail = async (sendEmailBody, options) => {
|
|
947
|
+
const res = await fetch(getSendEmailUrl(), {
|
|
948
|
+
...options,
|
|
949
|
+
method: "POST",
|
|
950
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
951
|
+
body: JSON.stringify(sendEmailBody)
|
|
952
|
+
});
|
|
953
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
954
|
+
const data = body ? JSON.parse(body) : {};
|
|
955
|
+
return {
|
|
956
|
+
data,
|
|
957
|
+
status: res.status,
|
|
958
|
+
headers: res.headers
|
|
959
|
+
};
|
|
960
|
+
};
|
|
943
961
|
var getListExtractorJobsUrl = (params) => {
|
|
944
962
|
const normalizedParams = new URLSearchParams();
|
|
945
963
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2277,6 +2295,17 @@ var replyToEmailHandler = async (args) => {
|
|
|
2277
2295
|
]
|
|
2278
2296
|
};
|
|
2279
2297
|
};
|
|
2298
|
+
var sendEmailHandler = async (args) => {
|
|
2299
|
+
const res = await sendEmail(args.bodyParams);
|
|
2300
|
+
return {
|
|
2301
|
+
content: [
|
|
2302
|
+
{
|
|
2303
|
+
type: "text",
|
|
2304
|
+
text: JSON.stringify(res)
|
|
2305
|
+
}
|
|
2306
|
+
]
|
|
2307
|
+
};
|
|
2308
|
+
};
|
|
2280
2309
|
var listExtractorJobsHandler = async (args) => {
|
|
2281
2310
|
const res = await listExtractorJobs(args.queryParams);
|
|
2282
2311
|
return {
|
|
@@ -4212,6 +4241,7 @@ var GetClaimDetailResponse = zod.object({
|
|
|
4212
4241
|
to: zod.array(zod.string()),
|
|
4213
4242
|
subject: zod.union([zod.string(), zod.null()]),
|
|
4214
4243
|
body_html: zod.union([zod.string(), zod.null()]),
|
|
4244
|
+
sent_at: zod.string(),
|
|
4215
4245
|
received_at: zod.string()
|
|
4216
4246
|
})
|
|
4217
4247
|
),
|
|
@@ -4334,7 +4364,8 @@ var CreateEmailBody = zod.object({
|
|
|
4334
4364
|
subject: zod.string().optional(),
|
|
4335
4365
|
body_text: zod.string().optional(),
|
|
4336
4366
|
body_html: zod.string().optional(),
|
|
4337
|
-
|
|
4367
|
+
sent_at: zod.string().optional(),
|
|
4368
|
+
received_at: zod.string().optional()
|
|
4338
4369
|
});
|
|
4339
4370
|
var CreateEmailResponse = zod.object({
|
|
4340
4371
|
email_id: zod.string(),
|
|
@@ -4343,6 +4374,7 @@ var CreateEmailResponse = zod.object({
|
|
|
4343
4374
|
from: zod.string(),
|
|
4344
4375
|
to: zod.array(zod.string()),
|
|
4345
4376
|
subject: zod.union([zod.string(), zod.null()]),
|
|
4377
|
+
sent_at: zod.string(),
|
|
4346
4378
|
received_at: zod.string(),
|
|
4347
4379
|
created_at: zod.string().datetime({})
|
|
4348
4380
|
});
|
|
@@ -4375,6 +4407,7 @@ var ListEmailsResponseItem = zod.object({
|
|
|
4375
4407
|
to: zod.array(zod.string()),
|
|
4376
4408
|
subject: zod.union([zod.string(), zod.null()]),
|
|
4377
4409
|
preview: zod.union([zod.string(), zod.null()]),
|
|
4410
|
+
sent_at: zod.string(),
|
|
4378
4411
|
received_at: zod.string(),
|
|
4379
4412
|
created_at: zod.string().datetime({})
|
|
4380
4413
|
});
|
|
@@ -4396,6 +4429,7 @@ var GetEmailResponse = zod.object({
|
|
|
4396
4429
|
subject: zod.union([zod.string(), zod.null()]),
|
|
4397
4430
|
body_text: zod.union([zod.string(), zod.null()]),
|
|
4398
4431
|
body_html: zod.union([zod.string(), zod.null()]),
|
|
4432
|
+
sent_at: zod.string(),
|
|
4399
4433
|
received_at: zod.string(),
|
|
4400
4434
|
created_at: zod.string().datetime({})
|
|
4401
4435
|
});
|
|
@@ -4429,6 +4463,20 @@ var ReplyToEmailBody = zod.object({
|
|
|
4429
4463
|
var ReplyToEmailResponse = zod.object({
|
|
4430
4464
|
sent: zod.boolean()
|
|
4431
4465
|
});
|
|
4466
|
+
var SendEmailBody = zod.object({
|
|
4467
|
+
inbox_id: zod.string().min(1),
|
|
4468
|
+
to: zod.array(zod.string().email()).min(1),
|
|
4469
|
+
cc: zod.array(zod.string().email()).optional(),
|
|
4470
|
+
bcc: zod.array(zod.string().email()).optional(),
|
|
4471
|
+
subject: zod.string().min(1),
|
|
4472
|
+
body_text: zod.string().min(1),
|
|
4473
|
+
claim_id: zod.string().min(1).optional()
|
|
4474
|
+
});
|
|
4475
|
+
var SendEmailResponse = zod.object({
|
|
4476
|
+
email_id: zod.string(),
|
|
4477
|
+
thread_id: zod.string(),
|
|
4478
|
+
sent: zod.boolean()
|
|
4479
|
+
});
|
|
4432
4480
|
var listExtractorJobsQueryCountDefault = 50;
|
|
4433
4481
|
var listExtractorJobsQueryCountMax = 100;
|
|
4434
4482
|
var listExtractorJobsQueryOffsetDefault = 0;
|
|
@@ -4912,7 +4960,7 @@ var GetProfileResponse = zod.object({
|
|
|
4912
4960
|
first_name: zod.union([zod.string(), zod.null()]),
|
|
4913
4961
|
last_name: zod.union([zod.string(), zod.null()]),
|
|
4914
4962
|
email: zod.string(),
|
|
4915
|
-
role: zod.enum(["admin", "member"]),
|
|
4963
|
+
role: zod.enum(["admin", "avallon_admin", "member"]),
|
|
4916
4964
|
permissions: zod.array(
|
|
4917
4965
|
zod.enum([
|
|
4918
4966
|
"voice-agents:write",
|
|
@@ -4928,7 +4976,9 @@ var GetProfileResponse = zod.object({
|
|
|
4928
4976
|
"feedback:write",
|
|
4929
4977
|
"outbound-jobs:write",
|
|
4930
4978
|
"workers:write",
|
|
4931
|
-
"chat-agents:write"
|
|
4979
|
+
"chat-agents:write",
|
|
4980
|
+
"prompts:read",
|
|
4981
|
+
"prompts:write"
|
|
4932
4982
|
])
|
|
4933
4983
|
),
|
|
4934
4984
|
tenants: zod.object({
|
|
@@ -4949,7 +4999,7 @@ var ListTeamMembersResponseItem = zod.object({
|
|
|
4949
4999
|
first_name: zod.union([zod.string(), zod.null()]),
|
|
4950
5000
|
last_name: zod.union([zod.string(), zod.null()]),
|
|
4951
5001
|
email: zod.string(),
|
|
4952
|
-
role: zod.enum(["admin", "member"]),
|
|
5002
|
+
role: zod.enum(["admin", "avallon_admin", "member"]),
|
|
4953
5003
|
created_at: zod.string(),
|
|
4954
5004
|
updated_at: zod.string()
|
|
4955
5005
|
});
|
|
@@ -5717,6 +5767,14 @@ server.tool(
|
|
|
5717
5767
|
},
|
|
5718
5768
|
replyToEmailHandler
|
|
5719
5769
|
);
|
|
5770
|
+
server.tool(
|
|
5771
|
+
"sendEmail",
|
|
5772
|
+
"Send email",
|
|
5773
|
+
{
|
|
5774
|
+
bodyParams: SendEmailBody
|
|
5775
|
+
},
|
|
5776
|
+
sendEmailHandler
|
|
5777
|
+
);
|
|
5720
5778
|
server.tool(
|
|
5721
5779
|
"listExtractorJobs",
|
|
5722
5780
|
"List extractor jobs",
|
|
@@ -6063,4 +6121,4 @@ var transport = new StdioServerTransport();
|
|
|
6063
6121
|
server.connect(transport).then(() => {
|
|
6064
6122
|
console.error("MCP server running on stdio");
|
|
6065
6123
|
}).catch(console.error);
|
|
6066
|
-
//# sourceMappingURL=server-
|
|
6124
|
+
//# sourceMappingURL=server-T4IFGZIC.js.map
|