@avallon-labs/mcp 62.6.0 → 63.0.0-staging.1349
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
|
@@ -2602,12 +2602,19 @@ var listChatMessages = async (chatId, params, options) => {
|
|
|
2602
2602
|
const data = body ? JSON.parse(body) : {};
|
|
2603
2603
|
return { data, status: res.status, headers: res.headers };
|
|
2604
2604
|
};
|
|
2605
|
-
var getGetPublicFormSubmissionUrl = (id) => {
|
|
2606
|
-
|
|
2605
|
+
var getGetPublicFormSubmissionUrl = (id, params) => {
|
|
2606
|
+
const normalizedParams = new URLSearchParams();
|
|
2607
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2608
|
+
if (value !== void 0) {
|
|
2609
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2610
|
+
}
|
|
2611
|
+
});
|
|
2612
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2613
|
+
return stringifiedParams.length > 0 ? `/public/v1/form-submissions/${id}?${stringifiedParams}` : `/public/v1/form-submissions/${id}`;
|
|
2607
2614
|
};
|
|
2608
|
-
var getPublicFormSubmission = async (id, options) => {
|
|
2615
|
+
var getPublicFormSubmission = async (id, params, options) => {
|
|
2609
2616
|
const res = await fetch(
|
|
2610
|
-
getGetPublicFormSubmissionUrl(id),
|
|
2617
|
+
getGetPublicFormSubmissionUrl(id, params),
|
|
2611
2618
|
{
|
|
2612
2619
|
...options,
|
|
2613
2620
|
method: "GET"
|
|
@@ -7100,7 +7107,7 @@ var listChatMessagesHandler = async (args, options) => {
|
|
|
7100
7107
|
};
|
|
7101
7108
|
};
|
|
7102
7109
|
var getPublicFormSubmissionHandler = async (args, options) => {
|
|
7103
|
-
const res = await getPublicFormSubmission(args.pathParams.id, options);
|
|
7110
|
+
const res = await getPublicFormSubmission(args.pathParams.id, args.queryParams, options);
|
|
7104
7111
|
if (res.status >= 400) {
|
|
7105
7112
|
return {
|
|
7106
7113
|
content: [
|
|
@@ -12768,6 +12775,10 @@ var ListChatMessagesResponse = zod.object({
|
|
|
12768
12775
|
var GetPublicFormSubmissionParams = zod.object({
|
|
12769
12776
|
"id": zod.string().uuid()
|
|
12770
12777
|
});
|
|
12778
|
+
var getPublicFormSubmissionQueryPasswordMax = 256;
|
|
12779
|
+
var GetPublicFormSubmissionQueryParams = zod.object({
|
|
12780
|
+
"password": zod.string().min(1).max(getPublicFormSubmissionQueryPasswordMax).describe("The password the person entered")
|
|
12781
|
+
});
|
|
12771
12782
|
var GetPublicFormSubmissionResponse = zod.object({
|
|
12772
12783
|
"data": zod.object({
|
|
12773
12784
|
"title": zod.string(),
|
|
@@ -12779,8 +12790,10 @@ var GetPublicFormSubmissionResponse = zod.object({
|
|
|
12779
12790
|
var SubmitFormSubmissionParams = zod.object({
|
|
12780
12791
|
"id": zod.string().uuid()
|
|
12781
12792
|
});
|
|
12793
|
+
var submitFormSubmissionBodyPasswordMax = 256;
|
|
12782
12794
|
var SubmitFormSubmissionBody = zod.object({
|
|
12783
|
-
"answers": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).describe("Answers keyed by form field. Validated against the JSON Schema of the form version this submission is pinned to; failures return 400 with the field path in the message.")
|
|
12795
|
+
"answers": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).describe("Answers keyed by form field. Validated against the JSON Schema of the form version this submission is pinned to; failures return 400 with the field path in the message."),
|
|
12796
|
+
"password": zod.string().min(1).max(submitFormSubmissionBodyPasswordMax).describe("The password the person entered")
|
|
12784
12797
|
});
|
|
12785
12798
|
var SubmitFormSubmissionResponse = zod.object({
|
|
12786
12799
|
"data": zod.object({
|
|
@@ -12962,10 +12975,12 @@ var PromoteFormVersionResponse = zod.object({
|
|
|
12962
12975
|
}),
|
|
12963
12976
|
"message": zod.string()
|
|
12964
12977
|
});
|
|
12978
|
+
var createFormSubmissionBodyPasswordMax = 256;
|
|
12965
12979
|
var CreateFormSubmissionBody = zod.object({
|
|
12966
12980
|
"form_id": zod.string().uuid(),
|
|
12967
12981
|
"environment": zod.enum(["live", "test"]),
|
|
12968
|
-
"prefill": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).optional().describe("Field values to fill in, checked against the form's schema")
|
|
12982
|
+
"prefill": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).optional().describe("Field values to fill in, checked against the form's schema"),
|
|
12983
|
+
"password": zod.string().min(1).max(createFormSubmissionBodyPasswordMax).describe("Password the person must enter to open the form, e.g. a date of birth or a 6-digit code")
|
|
12969
12984
|
});
|
|
12970
12985
|
var CreateFormSubmissionResponse = zod.object({
|
|
12971
12986
|
"data": zod.object({
|
|
@@ -12977,6 +12992,7 @@ var CreateFormSubmissionResponse = zod.object({
|
|
|
12977
12992
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
12978
12993
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12979
12994
|
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
12995
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form"),
|
|
12980
12996
|
"url": zod.string().url().describe("Link to send to the person filling the form")
|
|
12981
12997
|
}),
|
|
12982
12998
|
"message": zod.string()
|
|
@@ -13007,7 +13023,8 @@ var ListFormSubmissionsResponse = zod.object({
|
|
|
13007
13023
|
"prefill": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Values the renderer fills in before the person edits them"),
|
|
13008
13024
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
13009
13025
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
13010
|
-
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()])
|
|
13026
|
+
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
13027
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form")
|
|
13011
13028
|
})),
|
|
13012
13029
|
"message": zod.string(),
|
|
13013
13030
|
"meta": zod.object({
|
|
@@ -13026,7 +13043,8 @@ var GetFormSubmissionResponse = zod.object({
|
|
|
13026
13043
|
"prefill": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Values the renderer fills in before the person edits them"),
|
|
13027
13044
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
13028
13045
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
13029
|
-
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()])
|
|
13046
|
+
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
13047
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form")
|
|
13030
13048
|
}),
|
|
13031
13049
|
"message": zod.string()
|
|
13032
13050
|
});
|
|
@@ -17192,9 +17210,10 @@ var createMcpServer = (options) => {
|
|
|
17192
17210
|
"getPublicFormSubmission",
|
|
17193
17211
|
{
|
|
17194
17212
|
title: "Get a form submission's form (public)",
|
|
17195
|
-
description: "Return the title and JSON Schema of the form version a submission link is pinned to, for the form renderer. The id
|
|
17213
|
+
description: "Return the title and JSON Schema of the form version a submission link is pinned to, for the form renderer. The id and the password set on create are the credential; an unknown id is 404 and a wrong password, or a link created without one, is 401. Once the request has been submitted the request fails with 409 and `{ title }`.",
|
|
17196
17214
|
inputSchema: {
|
|
17197
|
-
pathParams: GetPublicFormSubmissionParams
|
|
17215
|
+
pathParams: GetPublicFormSubmissionParams,
|
|
17216
|
+
queryParams: GetPublicFormSubmissionQueryParams
|
|
17198
17217
|
},
|
|
17199
17218
|
outputSchema: GetPublicFormSubmissionResponse,
|
|
17200
17219
|
annotations: { readOnlyHint: true }
|
|
@@ -17208,7 +17227,7 @@ var createMcpServer = (options) => {
|
|
|
17208
17227
|
"submitFormSubmission",
|
|
17209
17228
|
{
|
|
17210
17229
|
title: "Submit a form submission (public)",
|
|
17211
|
-
description: "Store the answers for a submission link and hand them to the form's processor. Each link can be submitted once: a second submit fails with 409. The id
|
|
17230
|
+
description: "Store the answers for a submission link and hand them to the form's processor. Each link can be submitted once: a second submit fails with 409. The id and the password set on create are the credential; an unknown id is 404 and a wrong password, or a link created without one, is 401.",
|
|
17212
17231
|
inputSchema: {
|
|
17213
17232
|
pathParams: SubmitFormSubmissionParams,
|
|
17214
17233
|
bodyParams: SubmitFormSubmissionBody.optional()
|
|
@@ -17340,7 +17359,7 @@ var createMcpServer = (options) => {
|
|
|
17340
17359
|
"createFormSubmission",
|
|
17341
17360
|
{
|
|
17342
17361
|
title: "Create form submission",
|
|
17343
|
-
description: "Open a submission link for a form, pinned to the version the given environment points at. Send the returned url to the person filling the form.",
|
|
17362
|
+
description: "Open a submission link for a form, pinned to the version the given environment points at. Send the returned url and the password to the person filling the form.",
|
|
17344
17363
|
inputSchema: {
|
|
17345
17364
|
bodyParams: CreateFormSubmissionBody.optional()
|
|
17346
17365
|
},
|
|
@@ -18533,4 +18552,4 @@ var transport = new StdioServerTransport();
|
|
|
18533
18552
|
server.connect(transport).then(() => {
|
|
18534
18553
|
console.error("MCP server running on stdio");
|
|
18535
18554
|
}).catch(console.error);
|
|
18536
|
-
//# sourceMappingURL=server-
|
|
18555
|
+
//# sourceMappingURL=server-HTIA6QIE.js.map
|