@avallon-labs/mcp 24.5.0 → 25.0.0-staging.637
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
|
@@ -873,67 +873,6 @@ var deleteCallFeedback = async (id, feedbackId, options) => {
|
|
|
873
873
|
headers: res.headers
|
|
874
874
|
};
|
|
875
875
|
};
|
|
876
|
-
var getCreateClaimUrl = () => {
|
|
877
|
-
return `/v1/claims`;
|
|
878
|
-
};
|
|
879
|
-
var createClaim = async (options) => {
|
|
880
|
-
const res = await fetch(getCreateClaimUrl(), {
|
|
881
|
-
...options,
|
|
882
|
-
method: "POST"
|
|
883
|
-
});
|
|
884
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
885
|
-
const data = body ? JSON.parse(body) : {};
|
|
886
|
-
return {
|
|
887
|
-
data,
|
|
888
|
-
status: res.status,
|
|
889
|
-
headers: res.headers
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
var getListClaimsUrl = (params) => {
|
|
893
|
-
const normalizedParams = new URLSearchParams();
|
|
894
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
895
|
-
if (value !== void 0) {
|
|
896
|
-
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
897
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
898
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
899
|
-
}
|
|
900
|
-
} else {
|
|
901
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
const stringifiedParams = normalizedParams.toString();
|
|
906
|
-
return stringifiedParams.length > 0 ? `/v1/claims?${stringifiedParams}` : `/v1/claims`;
|
|
907
|
-
};
|
|
908
|
-
var listClaims = async (params, options) => {
|
|
909
|
-
const res = await fetch(getListClaimsUrl(params), {
|
|
910
|
-
...options,
|
|
911
|
-
method: "GET"
|
|
912
|
-
});
|
|
913
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
914
|
-
const data = body ? JSON.parse(body) : {};
|
|
915
|
-
return {
|
|
916
|
-
data,
|
|
917
|
-
status: res.status,
|
|
918
|
-
headers: res.headers
|
|
919
|
-
};
|
|
920
|
-
};
|
|
921
|
-
var getGetClaimDetailUrl = (id) => {
|
|
922
|
-
return `/v1/claims/${id}`;
|
|
923
|
-
};
|
|
924
|
-
var getClaimDetail = async (id, options) => {
|
|
925
|
-
const res = await fetch(getGetClaimDetailUrl(id), {
|
|
926
|
-
...options,
|
|
927
|
-
method: "GET"
|
|
928
|
-
});
|
|
929
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
930
|
-
const data = body ? JSON.parse(body) : {};
|
|
931
|
-
return {
|
|
932
|
-
data,
|
|
933
|
-
status: res.status,
|
|
934
|
-
headers: res.headers
|
|
935
|
-
};
|
|
936
|
-
};
|
|
937
876
|
var getCheckInboxAvailabilityUrl = (params) => {
|
|
938
877
|
const normalizedParams = new URLSearchParams();
|
|
939
878
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2815,39 +2754,6 @@ var deleteCallFeedbackHandler = async (args) => {
|
|
|
2815
2754
|
]
|
|
2816
2755
|
};
|
|
2817
2756
|
};
|
|
2818
|
-
var createClaimHandler = async () => {
|
|
2819
|
-
const res = await createClaim();
|
|
2820
|
-
return {
|
|
2821
|
-
content: [
|
|
2822
|
-
{
|
|
2823
|
-
type: "text",
|
|
2824
|
-
text: JSON.stringify(res)
|
|
2825
|
-
}
|
|
2826
|
-
]
|
|
2827
|
-
};
|
|
2828
|
-
};
|
|
2829
|
-
var listClaimsHandler = async (args) => {
|
|
2830
|
-
const res = await listClaims(args.queryParams);
|
|
2831
|
-
return {
|
|
2832
|
-
content: [
|
|
2833
|
-
{
|
|
2834
|
-
type: "text",
|
|
2835
|
-
text: JSON.stringify(res)
|
|
2836
|
-
}
|
|
2837
|
-
]
|
|
2838
|
-
};
|
|
2839
|
-
};
|
|
2840
|
-
var getClaimDetailHandler = async (args) => {
|
|
2841
|
-
const res = await getClaimDetail(args.pathParams.id);
|
|
2842
|
-
return {
|
|
2843
|
-
content: [
|
|
2844
|
-
{
|
|
2845
|
-
type: "text",
|
|
2846
|
-
text: JSON.stringify(res)
|
|
2847
|
-
}
|
|
2848
|
-
]
|
|
2849
|
-
};
|
|
2850
|
-
};
|
|
2851
2757
|
var checkInboxAvailabilityHandler = async (args) => {
|
|
2852
2758
|
const res = await checkInboxAvailability(args.queryParams);
|
|
2853
2759
|
return {
|
|
@@ -5412,75 +5318,6 @@ var DeleteCallFeedbackParams = zod.object({
|
|
|
5412
5318
|
feedbackId: zod.string().uuid().describe("The feedback ID to delete")
|
|
5413
5319
|
});
|
|
5414
5320
|
var DeleteCallFeedbackResponse = zod.null();
|
|
5415
|
-
var CreateClaimResponse = zod.object({
|
|
5416
|
-
claim_id: zod.string(),
|
|
5417
|
-
created_at: zod.string().datetime({})
|
|
5418
|
-
});
|
|
5419
|
-
var listClaimsQueryCountDefault = 20;
|
|
5420
|
-
var listClaimsQueryCountMax = 100;
|
|
5421
|
-
var listClaimsQueryOffsetDefault = 0;
|
|
5422
|
-
var listClaimsQueryOffsetMin = 0;
|
|
5423
|
-
var listClaimsQuerySortByDefault = `created_at`;
|
|
5424
|
-
var listClaimsQuerySortOrderDefault = `desc`;
|
|
5425
|
-
var ListClaimsQueryParams = zod.object({
|
|
5426
|
-
count: zod.number().min(1).max(listClaimsQueryCountMax).default(listClaimsQueryCountDefault),
|
|
5427
|
-
offset: zod.number().min(listClaimsQueryOffsetMin).default(listClaimsQueryOffsetDefault),
|
|
5428
|
-
sort_by: zod.enum(["created_at"]).default(listClaimsQuerySortByDefault),
|
|
5429
|
-
sort_order: zod.enum(["asc", "desc"]).default(listClaimsQuerySortOrderDefault)
|
|
5430
|
-
});
|
|
5431
|
-
var ListClaimsResponse = zod.object({
|
|
5432
|
-
claims: zod.array(
|
|
5433
|
-
zod.object({
|
|
5434
|
-
id: zod.string(),
|
|
5435
|
-
created_at: zod.string().datetime({}),
|
|
5436
|
-
latest_source: zod.union([zod.unknown(), zod.null()]),
|
|
5437
|
-
job_status: zod.union([
|
|
5438
|
-
zod.string().describe("Extractor job status"),
|
|
5439
|
-
zod.null()
|
|
5440
|
-
])
|
|
5441
|
-
})
|
|
5442
|
-
),
|
|
5443
|
-
total: zod.number().describe("do not use. use the property in the meta object instead.")
|
|
5444
|
-
});
|
|
5445
|
-
var GetClaimDetailParams = zod.object({
|
|
5446
|
-
id: zod.string().min(1)
|
|
5447
|
-
});
|
|
5448
|
-
var GetClaimDetailResponse = zod.object({
|
|
5449
|
-
claim: zod.object({
|
|
5450
|
-
id: zod.string(),
|
|
5451
|
-
created_at: zod.string().datetime({}),
|
|
5452
|
-
updated_at: zod.string().datetime({})
|
|
5453
|
-
}),
|
|
5454
|
-
sources: zod.array(
|
|
5455
|
-
zod.object({
|
|
5456
|
-
type: zod.string(),
|
|
5457
|
-
direction: zod.string(),
|
|
5458
|
-
id: zod.string(),
|
|
5459
|
-
from: zod.string(),
|
|
5460
|
-
to: zod.array(zod.string()),
|
|
5461
|
-
subject: zod.union([zod.string(), zod.null()]),
|
|
5462
|
-
body_html: zod.union([zod.string(), zod.null()]),
|
|
5463
|
-
sent_at: zod.string(),
|
|
5464
|
-
received_at: zod.string()
|
|
5465
|
-
})
|
|
5466
|
-
),
|
|
5467
|
-
artifacts: zod.array(
|
|
5468
|
-
zod.object({
|
|
5469
|
-
id: zod.string(),
|
|
5470
|
-
document_name: zod.string(),
|
|
5471
|
-
created_at: zod.string().datetime({})
|
|
5472
|
-
})
|
|
5473
|
-
),
|
|
5474
|
-
extractor_job: zod.union([
|
|
5475
|
-
zod.object({
|
|
5476
|
-
id: zod.string(),
|
|
5477
|
-
status: zod.string(),
|
|
5478
|
-
extract_id: zod.union([zod.string(), zod.null()])
|
|
5479
|
-
}),
|
|
5480
|
-
zod.null()
|
|
5481
|
-
]),
|
|
5482
|
-
extract: zod.union([zod.unknown(), zod.null()])
|
|
5483
|
-
});
|
|
5484
5321
|
var CheckInboxAvailabilityQueryParams = zod.object({
|
|
5485
5322
|
username: zod.string().describe("Email username")
|
|
5486
5323
|
});
|
|
@@ -5574,7 +5411,6 @@ var UpdateInboxResponse = zod.object({
|
|
|
5574
5411
|
updated_at: zod.string().datetime({})
|
|
5575
5412
|
});
|
|
5576
5413
|
var CreateEmailBody = zod.object({
|
|
5577
|
-
claim_id: zod.string().uuid().optional(),
|
|
5578
5414
|
direction: zod.enum(["inbound", "outbound"]),
|
|
5579
5415
|
from: zod.string().email(),
|
|
5580
5416
|
to: zod.array(zod.string().email()).min(1),
|
|
@@ -5584,17 +5420,18 @@ var CreateEmailBody = zod.object({
|
|
|
5584
5420
|
body_text: zod.string().optional(),
|
|
5585
5421
|
body_html: zod.string().optional(),
|
|
5586
5422
|
sent_at: zod.string().optional(),
|
|
5587
|
-
received_at: zod.string().optional()
|
|
5423
|
+
received_at: zod.string().optional(),
|
|
5424
|
+
claim_id: zod.string().optional()
|
|
5588
5425
|
});
|
|
5589
5426
|
var CreateEmailResponse = zod.object({
|
|
5590
5427
|
email_id: zod.string(),
|
|
5591
|
-
claim_id: zod.union([zod.string(), zod.null()]),
|
|
5592
5428
|
direction: zod.enum(["inbound", "outbound"]),
|
|
5593
5429
|
from: zod.string(),
|
|
5594
5430
|
to: zod.array(zod.string()),
|
|
5595
5431
|
subject: zod.union([zod.string(), zod.null()]),
|
|
5596
5432
|
sent_at: zod.string(),
|
|
5597
5433
|
received_at: zod.string(),
|
|
5434
|
+
claim_id: zod.union([zod.string(), zod.null()]),
|
|
5598
5435
|
created_at: zod.string().datetime({})
|
|
5599
5436
|
});
|
|
5600
5437
|
var listEmailsQueryContentMax = 500;
|
|
@@ -5703,7 +5540,7 @@ var SendEmailBody = zod.object({
|
|
|
5703
5540
|
bcc: zod.array(zod.string().email()).optional(),
|
|
5704
5541
|
subject: zod.string().min(1),
|
|
5705
5542
|
body_text: zod.string().min(1),
|
|
5706
|
-
claim_id: zod.string().
|
|
5543
|
+
claim_id: zod.string().optional(),
|
|
5707
5544
|
attachments: zod.array(
|
|
5708
5545
|
zod.object({
|
|
5709
5546
|
filename: zod.string().min(1).max(sendEmailBodyAttachmentsItemFilenameMax),
|
|
@@ -7271,23 +7108,6 @@ server.tool(
|
|
|
7271
7108
|
},
|
|
7272
7109
|
deleteCallFeedbackHandler
|
|
7273
7110
|
);
|
|
7274
|
-
server.tool("createClaim", "Create claim", createClaimHandler);
|
|
7275
|
-
server.tool(
|
|
7276
|
-
"listClaims",
|
|
7277
|
-
"List claims",
|
|
7278
|
-
{
|
|
7279
|
-
queryParams: ListClaimsQueryParams
|
|
7280
|
-
},
|
|
7281
|
-
listClaimsHandler
|
|
7282
|
-
);
|
|
7283
|
-
server.tool(
|
|
7284
|
-
"getClaimDetail",
|
|
7285
|
-
"Get claim detail",
|
|
7286
|
-
{
|
|
7287
|
-
pathParams: GetClaimDetailParams
|
|
7288
|
-
},
|
|
7289
|
-
getClaimDetailHandler
|
|
7290
|
-
);
|
|
7291
7111
|
server.tool(
|
|
7292
7112
|
"checkInboxAvailability",
|
|
7293
7113
|
"Check email username availability",
|
|
@@ -7859,4 +7679,4 @@ var transport = new StdioServerTransport();
|
|
|
7859
7679
|
server.connect(transport).then(() => {
|
|
7860
7680
|
console.error("MCP server running on stdio");
|
|
7861
7681
|
}).catch(console.error);
|
|
7862
|
-
//# sourceMappingURL=server-
|
|
7682
|
+
//# sourceMappingURL=server-6G7BRTQI.js.map
|