@avallon-labs/mcp 19.4.0-staging.460 → 19.5.0

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
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-GHNSEJ6P.js");
57
+ await import("./server-T4IFGZIC.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -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
- received_at: zod.string()
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;
@@ -5719,6 +5767,14 @@ server.tool(
5719
5767
  },
5720
5768
  replyToEmailHandler
5721
5769
  );
5770
+ server.tool(
5771
+ "sendEmail",
5772
+ "Send email",
5773
+ {
5774
+ bodyParams: SendEmailBody
5775
+ },
5776
+ sendEmailHandler
5777
+ );
5722
5778
  server.tool(
5723
5779
  "listExtractorJobs",
5724
5780
  "List extractor jobs",
@@ -6065,4 +6121,4 @@ var transport = new StdioServerTransport();
6065
6121
  server.connect(transport).then(() => {
6066
6122
  console.error("MCP server running on stdio");
6067
6123
  }).catch(console.error);
6068
- //# sourceMappingURL=server-GHNSEJ6P.js.map
6124
+ //# sourceMappingURL=server-T4IFGZIC.js.map