@avallon-labs/mcp 62.0.0-staging.1333 → 62.2.0-staging.1335
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
|
@@ -1928,29 +1928,6 @@ var getAccess = async (entityType, entityId, options) => {
|
|
|
1928
1928
|
const data = body ? JSON.parse(body) : {};
|
|
1929
1929
|
return { data, status: res.status, headers: res.headers };
|
|
1930
1930
|
};
|
|
1931
|
-
var getUpdateAccessUrl = (entityType, entityId) => {
|
|
1932
|
-
return `/v1/access/${entityType}/${entityId}`;
|
|
1933
|
-
};
|
|
1934
|
-
var updateAccess = async (entityType, entityId, updateAccessBody, options) => {
|
|
1935
|
-
const getHeaders = (h) => {
|
|
1936
|
-
if (!h) return {};
|
|
1937
|
-
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1938
|
-
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1939
|
-
return h;
|
|
1940
|
-
};
|
|
1941
|
-
const res = await fetch(
|
|
1942
|
-
getUpdateAccessUrl(entityType, entityId),
|
|
1943
|
-
{
|
|
1944
|
-
...options,
|
|
1945
|
-
method: "PUT",
|
|
1946
|
-
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1947
|
-
body: JSON.stringify(updateAccessBody)
|
|
1948
|
-
}
|
|
1949
|
-
);
|
|
1950
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1951
|
-
const data = body ? JSON.parse(body) : {};
|
|
1952
|
-
return { data, status: res.status, headers: res.headers };
|
|
1953
|
-
};
|
|
1954
1931
|
var getChangeAccessUrl = (entityType, entityId) => {
|
|
1955
1932
|
return `/v1/access/${entityType}/${entityId}`;
|
|
1956
1933
|
};
|
|
@@ -2686,6 +2663,126 @@ var createForm = async (createFormBody, options) => {
|
|
|
2686
2663
|
const data = body ? JSON.parse(body) : {};
|
|
2687
2664
|
return { data, status: res.status, headers: res.headers };
|
|
2688
2665
|
};
|
|
2666
|
+
var getListFormsUrl = (params) => {
|
|
2667
|
+
const normalizedParams = new URLSearchParams();
|
|
2668
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2669
|
+
if (value !== void 0) {
|
|
2670
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2671
|
+
}
|
|
2672
|
+
});
|
|
2673
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2674
|
+
return stringifiedParams.length > 0 ? `/v1/forms?${stringifiedParams}` : `/v1/forms`;
|
|
2675
|
+
};
|
|
2676
|
+
var listForms = async (params, options) => {
|
|
2677
|
+
const res = await fetch(
|
|
2678
|
+
getListFormsUrl(params),
|
|
2679
|
+
{
|
|
2680
|
+
...options,
|
|
2681
|
+
method: "GET"
|
|
2682
|
+
}
|
|
2683
|
+
);
|
|
2684
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2685
|
+
const data = body ? JSON.parse(body) : {};
|
|
2686
|
+
return { data, status: res.status, headers: res.headers };
|
|
2687
|
+
};
|
|
2688
|
+
var getGetFormUrl = (formId) => {
|
|
2689
|
+
return `/v1/forms/${formId}`;
|
|
2690
|
+
};
|
|
2691
|
+
var getForm = async (formId, options) => {
|
|
2692
|
+
const res = await fetch(
|
|
2693
|
+
getGetFormUrl(formId),
|
|
2694
|
+
{
|
|
2695
|
+
...options,
|
|
2696
|
+
method: "GET"
|
|
2697
|
+
}
|
|
2698
|
+
);
|
|
2699
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2700
|
+
const data = body ? JSON.parse(body) : {};
|
|
2701
|
+
return { data, status: res.status, headers: res.headers };
|
|
2702
|
+
};
|
|
2703
|
+
var getUpdateFormUrl = (formId) => {
|
|
2704
|
+
return `/v1/forms/${formId}`;
|
|
2705
|
+
};
|
|
2706
|
+
var updateForm = async (formId, updateFormBody, options) => {
|
|
2707
|
+
const getHeaders = (h) => {
|
|
2708
|
+
if (!h) return {};
|
|
2709
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2710
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2711
|
+
return h;
|
|
2712
|
+
};
|
|
2713
|
+
const res = await fetch(
|
|
2714
|
+
getUpdateFormUrl(formId),
|
|
2715
|
+
{
|
|
2716
|
+
...options,
|
|
2717
|
+
method: "PATCH",
|
|
2718
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2719
|
+
body: JSON.stringify(updateFormBody)
|
|
2720
|
+
}
|
|
2721
|
+
);
|
|
2722
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2723
|
+
const data = body ? JSON.parse(body) : {};
|
|
2724
|
+
return { data, status: res.status, headers: res.headers };
|
|
2725
|
+
};
|
|
2726
|
+
var getListFormVersionsUrl = (formId, params) => {
|
|
2727
|
+
const normalizedParams = new URLSearchParams();
|
|
2728
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2729
|
+
if (value !== void 0) {
|
|
2730
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2731
|
+
}
|
|
2732
|
+
});
|
|
2733
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2734
|
+
return stringifiedParams.length > 0 ? `/v1/forms/${formId}/versions?${stringifiedParams}` : `/v1/forms/${formId}/versions`;
|
|
2735
|
+
};
|
|
2736
|
+
var listFormVersions = async (formId, params, options) => {
|
|
2737
|
+
const res = await fetch(
|
|
2738
|
+
getListFormVersionsUrl(formId, params),
|
|
2739
|
+
{
|
|
2740
|
+
...options,
|
|
2741
|
+
method: "GET"
|
|
2742
|
+
}
|
|
2743
|
+
);
|
|
2744
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2745
|
+
const data = body ? JSON.parse(body) : {};
|
|
2746
|
+
return { data, status: res.status, headers: res.headers };
|
|
2747
|
+
};
|
|
2748
|
+
var getGetFormVersionUrl = (formId, version) => {
|
|
2749
|
+
return `/v1/forms/${formId}/versions/${version}`;
|
|
2750
|
+
};
|
|
2751
|
+
var getFormVersion = async (formId, version, options) => {
|
|
2752
|
+
const res = await fetch(
|
|
2753
|
+
getGetFormVersionUrl(formId, version),
|
|
2754
|
+
{
|
|
2755
|
+
...options,
|
|
2756
|
+
method: "GET"
|
|
2757
|
+
}
|
|
2758
|
+
);
|
|
2759
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2760
|
+
const data = body ? JSON.parse(body) : {};
|
|
2761
|
+
return { data, status: res.status, headers: res.headers };
|
|
2762
|
+
};
|
|
2763
|
+
var getPromoteFormVersionUrl = (formId, version) => {
|
|
2764
|
+
return `/v1/forms/${formId}/versions/${version}/promote`;
|
|
2765
|
+
};
|
|
2766
|
+
var promoteFormVersion = async (formId, version, promoteFormVersionBody, options) => {
|
|
2767
|
+
const getHeaders = (h) => {
|
|
2768
|
+
if (!h) return {};
|
|
2769
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2770
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2771
|
+
return h;
|
|
2772
|
+
};
|
|
2773
|
+
const res = await fetch(
|
|
2774
|
+
getPromoteFormVersionUrl(formId, version),
|
|
2775
|
+
{
|
|
2776
|
+
...options,
|
|
2777
|
+
method: "POST",
|
|
2778
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2779
|
+
body: JSON.stringify(promoteFormVersionBody)
|
|
2780
|
+
}
|
|
2781
|
+
);
|
|
2782
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2783
|
+
const data = body ? JSON.parse(body) : {};
|
|
2784
|
+
return { data, status: res.status, headers: res.headers };
|
|
2785
|
+
};
|
|
2689
2786
|
var getCreateFormSubmissionUrl = () => {
|
|
2690
2787
|
return `/v1/form-submissions`;
|
|
2691
2788
|
};
|
|
@@ -6244,29 +6341,6 @@ var getAccessHandler = async (args, options) => {
|
|
|
6244
6341
|
structuredContent: res.data
|
|
6245
6342
|
};
|
|
6246
6343
|
};
|
|
6247
|
-
var updateAccessHandler = async (args, options) => {
|
|
6248
|
-
const res = await updateAccess(args.pathParams.entityType, args.pathParams.entityId, args.bodyParams, options);
|
|
6249
|
-
if (res.status >= 400) {
|
|
6250
|
-
return {
|
|
6251
|
-
content: [
|
|
6252
|
-
{
|
|
6253
|
-
type: "text",
|
|
6254
|
-
text: JSON.stringify(res.data ?? null)
|
|
6255
|
-
}
|
|
6256
|
-
],
|
|
6257
|
-
isError: true
|
|
6258
|
-
};
|
|
6259
|
-
}
|
|
6260
|
-
return {
|
|
6261
|
-
content: [
|
|
6262
|
-
{
|
|
6263
|
-
type: "text",
|
|
6264
|
-
text: JSON.stringify(res.data ?? null)
|
|
6265
|
-
}
|
|
6266
|
-
],
|
|
6267
|
-
structuredContent: res.data
|
|
6268
|
-
};
|
|
6269
|
-
};
|
|
6270
6344
|
var changeAccessHandler = async (args, options) => {
|
|
6271
6345
|
const res = await changeAccess(args.pathParams.entityType, args.pathParams.entityId, args.bodyParams, options);
|
|
6272
6346
|
if (res.status >= 400) {
|
|
@@ -7072,6 +7146,144 @@ var createFormHandler = async (args, options) => {
|
|
|
7072
7146
|
structuredContent: res.data
|
|
7073
7147
|
};
|
|
7074
7148
|
};
|
|
7149
|
+
var listFormsHandler = async (args, options) => {
|
|
7150
|
+
const res = await listForms(args.queryParams, options);
|
|
7151
|
+
if (res.status >= 400) {
|
|
7152
|
+
return {
|
|
7153
|
+
content: [
|
|
7154
|
+
{
|
|
7155
|
+
type: "text",
|
|
7156
|
+
text: JSON.stringify(res.data ?? null)
|
|
7157
|
+
}
|
|
7158
|
+
],
|
|
7159
|
+
isError: true
|
|
7160
|
+
};
|
|
7161
|
+
}
|
|
7162
|
+
return {
|
|
7163
|
+
content: [
|
|
7164
|
+
{
|
|
7165
|
+
type: "text",
|
|
7166
|
+
text: JSON.stringify(res.data ?? null)
|
|
7167
|
+
}
|
|
7168
|
+
],
|
|
7169
|
+
structuredContent: res.data
|
|
7170
|
+
};
|
|
7171
|
+
};
|
|
7172
|
+
var getFormHandler = async (args, options) => {
|
|
7173
|
+
const res = await getForm(args.pathParams.form_id, options);
|
|
7174
|
+
if (res.status >= 400) {
|
|
7175
|
+
return {
|
|
7176
|
+
content: [
|
|
7177
|
+
{
|
|
7178
|
+
type: "text",
|
|
7179
|
+
text: JSON.stringify(res.data ?? null)
|
|
7180
|
+
}
|
|
7181
|
+
],
|
|
7182
|
+
isError: true
|
|
7183
|
+
};
|
|
7184
|
+
}
|
|
7185
|
+
return {
|
|
7186
|
+
content: [
|
|
7187
|
+
{
|
|
7188
|
+
type: "text",
|
|
7189
|
+
text: JSON.stringify(res.data ?? null)
|
|
7190
|
+
}
|
|
7191
|
+
],
|
|
7192
|
+
structuredContent: res.data
|
|
7193
|
+
};
|
|
7194
|
+
};
|
|
7195
|
+
var updateFormHandler = async (args, options) => {
|
|
7196
|
+
const res = await updateForm(args.pathParams.form_id, args.bodyParams, options);
|
|
7197
|
+
if (res.status >= 400) {
|
|
7198
|
+
return {
|
|
7199
|
+
content: [
|
|
7200
|
+
{
|
|
7201
|
+
type: "text",
|
|
7202
|
+
text: JSON.stringify(res.data ?? null)
|
|
7203
|
+
}
|
|
7204
|
+
],
|
|
7205
|
+
isError: true
|
|
7206
|
+
};
|
|
7207
|
+
}
|
|
7208
|
+
return {
|
|
7209
|
+
content: [
|
|
7210
|
+
{
|
|
7211
|
+
type: "text",
|
|
7212
|
+
text: JSON.stringify(res.data ?? null)
|
|
7213
|
+
}
|
|
7214
|
+
],
|
|
7215
|
+
structuredContent: res.data
|
|
7216
|
+
};
|
|
7217
|
+
};
|
|
7218
|
+
var listFormVersionsHandler = async (args, options) => {
|
|
7219
|
+
const res = await listFormVersions(args.pathParams.form_id, args.queryParams, options);
|
|
7220
|
+
if (res.status >= 400) {
|
|
7221
|
+
return {
|
|
7222
|
+
content: [
|
|
7223
|
+
{
|
|
7224
|
+
type: "text",
|
|
7225
|
+
text: JSON.stringify(res.data ?? null)
|
|
7226
|
+
}
|
|
7227
|
+
],
|
|
7228
|
+
isError: true
|
|
7229
|
+
};
|
|
7230
|
+
}
|
|
7231
|
+
return {
|
|
7232
|
+
content: [
|
|
7233
|
+
{
|
|
7234
|
+
type: "text",
|
|
7235
|
+
text: JSON.stringify(res.data ?? null)
|
|
7236
|
+
}
|
|
7237
|
+
],
|
|
7238
|
+
structuredContent: res.data
|
|
7239
|
+
};
|
|
7240
|
+
};
|
|
7241
|
+
var getFormVersionHandler = async (args, options) => {
|
|
7242
|
+
const res = await getFormVersion(args.pathParams.form_id, args.pathParams.version, options);
|
|
7243
|
+
if (res.status >= 400) {
|
|
7244
|
+
return {
|
|
7245
|
+
content: [
|
|
7246
|
+
{
|
|
7247
|
+
type: "text",
|
|
7248
|
+
text: JSON.stringify(res.data ?? null)
|
|
7249
|
+
}
|
|
7250
|
+
],
|
|
7251
|
+
isError: true
|
|
7252
|
+
};
|
|
7253
|
+
}
|
|
7254
|
+
return {
|
|
7255
|
+
content: [
|
|
7256
|
+
{
|
|
7257
|
+
type: "text",
|
|
7258
|
+
text: JSON.stringify(res.data ?? null)
|
|
7259
|
+
}
|
|
7260
|
+
],
|
|
7261
|
+
structuredContent: res.data
|
|
7262
|
+
};
|
|
7263
|
+
};
|
|
7264
|
+
var promoteFormVersionHandler = async (args, options) => {
|
|
7265
|
+
const res = await promoteFormVersion(args.pathParams.form_id, args.pathParams.version, args.bodyParams, options);
|
|
7266
|
+
if (res.status >= 400) {
|
|
7267
|
+
return {
|
|
7268
|
+
content: [
|
|
7269
|
+
{
|
|
7270
|
+
type: "text",
|
|
7271
|
+
text: JSON.stringify(res.data ?? null)
|
|
7272
|
+
}
|
|
7273
|
+
],
|
|
7274
|
+
isError: true
|
|
7275
|
+
};
|
|
7276
|
+
}
|
|
7277
|
+
return {
|
|
7278
|
+
content: [
|
|
7279
|
+
{
|
|
7280
|
+
type: "text",
|
|
7281
|
+
text: JSON.stringify(res.data ?? null)
|
|
7282
|
+
}
|
|
7283
|
+
],
|
|
7284
|
+
structuredContent: res.data
|
|
7285
|
+
};
|
|
7286
|
+
};
|
|
7075
7287
|
var createFormSubmissionHandler = async (args, options) => {
|
|
7076
7288
|
const res = await createFormSubmission(args.bodyParams, options);
|
|
7077
7289
|
if (res.status >= 400) {
|
|
@@ -11830,29 +12042,6 @@ var GetAccessResponse = zod.object({
|
|
|
11830
12042
|
}),
|
|
11831
12043
|
"message": zod.string()
|
|
11832
12044
|
});
|
|
11833
|
-
var UpdateAccessParams = zod.object({
|
|
11834
|
-
"entityType": zod.enum(["worker", "case_type", "form", "voice_agent"]),
|
|
11835
|
-
"entityId": zod.string().describe("The worker's, form's or voice agent's id, or the case type's slug.")
|
|
11836
|
-
});
|
|
11837
|
-
var updateAccessBodyGrantsMax = 1e3;
|
|
11838
|
-
var UpdateAccessBody = zod.object({
|
|
11839
|
-
"grants": zod.array(zod.object({
|
|
11840
|
-
"principal_type": zod.enum(["profile", "worker", "tenant"]).describe("Who holds the grant: a team member's `profile`, a `worker`, whose runs act with it, or the whole `tenant`. `tenant` is not supported yet."),
|
|
11841
|
-
"principal_id": zod.string().uuid(),
|
|
11842
|
-
"level": zod.enum(["viewer", "editor"]).describe("`viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. On a `case_type`, `editor` can also edit, promote and share it. On a `form`, `viewer` can see it and open form submissions; `editor` can also edit and share it. On a `voice_agent`, `editor` can also edit, promote, delete and share it and manage its webhooks; changing its prompt or greeting still needs `prompts:write`.")
|
|
11843
|
-
})).max(updateAccessBodyGrantsMax).describe("Everyone the entity is shared with, replacing the current set. Pass an empty array to share it with no one.")
|
|
11844
|
-
});
|
|
11845
|
-
var UpdateAccessResponse = zod.object({
|
|
11846
|
-
"data": zod.object({
|
|
11847
|
-
"grants": zod.array(zod.object({
|
|
11848
|
-
"principal_type": zod.enum(["profile", "worker", "tenant"]).describe("Who holds the grant: a team member's `profile`, a `worker`, whose runs act with it, or the whole `tenant`. `tenant` is not supported yet."),
|
|
11849
|
-
"principal_id": zod.string().uuid(),
|
|
11850
|
-
"level": zod.enum(["viewer", "editor"]).describe("`viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. On a `case_type`, `editor` can also edit, promote and share it. On a `form`, `viewer` can see it and open form submissions; `editor` can also edit and share it. On a `voice_agent`, `editor` can also edit, promote, delete and share it and manage its webhooks; changing its prompt or greeting still needs `prompts:write`."),
|
|
11851
|
-
"created_at": zod.string().datetime({ "offset": true })
|
|
11852
|
-
}))
|
|
11853
|
-
}),
|
|
11854
|
-
"message": zod.string()
|
|
11855
|
-
});
|
|
11856
12045
|
var ChangeAccessParams = zod.object({
|
|
11857
12046
|
"entityType": zod.enum(["worker", "case_type", "form", "voice_agent"]),
|
|
11858
12047
|
"entityId": zod.string().describe("The worker's, form's or voice agent's id, or the case type's slug.")
|
|
@@ -11889,7 +12078,7 @@ var GetMyAccessParams = zod.object({
|
|
|
11889
12078
|
});
|
|
11890
12079
|
var GetMyAccessResponse = zod.object({
|
|
11891
12080
|
"data": zod.object({
|
|
11892
|
-
"permissions": zod.array(zod.enum(["workers:read", "workers:run", "workers:write", "workers:promote", "case-types:read", "case-types:write", "forms:read", "forms:request", "forms:write", "voice-agents:read", "voice-agents:write", "voice-agents:promote"])).describe("What the caller may do with the entity, through their role or a grant on it. `workers:write` on a worker, `case-types:write` on a case type and `voice-agents:write` on a voice agent also let the caller share it.")
|
|
12081
|
+
"permissions": zod.array(zod.enum(["workers:read", "workers:run", "workers:write", "workers:promote", "case-types:read", "case-types:write", "forms:read", "forms:request", "forms:write", "forms:promote", "voice-agents:read", "voice-agents:write", "voice-agents:promote"])).describe("What the caller may do with the entity, through their role or a grant on it. `workers:write` on a worker, `case-types:write` on a case type and `voice-agents:write` on a voice agent also let the caller share it.")
|
|
11893
12082
|
}),
|
|
11894
12083
|
"message": zod.string()
|
|
11895
12084
|
});
|
|
@@ -12576,6 +12765,157 @@ var CreateFormResponse = zod.object({
|
|
|
12576
12765
|
}),
|
|
12577
12766
|
"message": zod.string()
|
|
12578
12767
|
});
|
|
12768
|
+
var listFormsQueryCountDefault = 50;
|
|
12769
|
+
var listFormsQueryCountMax = 100;
|
|
12770
|
+
var listFormsQueryOffsetDefault = 0;
|
|
12771
|
+
var listFormsQueryOffsetMin = 0;
|
|
12772
|
+
var listFormsQuerySortByDefault = `created_at`;
|
|
12773
|
+
var listFormsQuerySortOrderDefault = `desc`;
|
|
12774
|
+
var ListFormsQueryParams = zod.object({
|
|
12775
|
+
"count": zod.number().min(1).max(listFormsQueryCountMax).default(listFormsQueryCountDefault),
|
|
12776
|
+
"offset": zod.number().min(listFormsQueryOffsetMin).default(listFormsQueryOffsetDefault),
|
|
12777
|
+
"sort_by": zod.enum(["created_at"]).default(listFormsQuerySortByDefault),
|
|
12778
|
+
"sort_order": zod.enum(["asc", "desc"]).default(listFormsQuerySortOrderDefault)
|
|
12779
|
+
});
|
|
12780
|
+
var listFormsResponseMetaTotalMin = -9007199254740991;
|
|
12781
|
+
var listFormsResponseMetaTotalMax = 9007199254740991;
|
|
12782
|
+
var ListFormsResponse = zod.object({
|
|
12783
|
+
"data": zod.array(zod.object({
|
|
12784
|
+
"id": zod.string(),
|
|
12785
|
+
"title": zod.string(),
|
|
12786
|
+
"version": zod.number().describe("Version the schema below belongs to."),
|
|
12787
|
+
"versions": zod.object({
|
|
12788
|
+
"live": zod.number(),
|
|
12789
|
+
"test": zod.number()
|
|
12790
|
+
}),
|
|
12791
|
+
"schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
12792
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
12793
|
+
"processor_id": zod.string(),
|
|
12794
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
12795
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
12796
|
+
})),
|
|
12797
|
+
"message": zod.string(),
|
|
12798
|
+
"meta": zod.object({
|
|
12799
|
+
"total": zod.number().int().min(listFormsResponseMetaTotalMin).max(listFormsResponseMetaTotalMax)
|
|
12800
|
+
})
|
|
12801
|
+
});
|
|
12802
|
+
var GetFormParams = zod.object({
|
|
12803
|
+
"form_id": zod.string().uuid()
|
|
12804
|
+
});
|
|
12805
|
+
var GetFormResponse = zod.object({
|
|
12806
|
+
"data": zod.object({
|
|
12807
|
+
"id": zod.string(),
|
|
12808
|
+
"title": zod.string(),
|
|
12809
|
+
"version": zod.number().describe("Version the schema below belongs to."),
|
|
12810
|
+
"versions": zod.object({
|
|
12811
|
+
"live": zod.number(),
|
|
12812
|
+
"test": zod.number()
|
|
12813
|
+
}),
|
|
12814
|
+
"schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
12815
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
12816
|
+
"processor_id": zod.string(),
|
|
12817
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
12818
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
12819
|
+
}),
|
|
12820
|
+
"message": zod.string()
|
|
12821
|
+
});
|
|
12822
|
+
var UpdateFormParams = zod.object({
|
|
12823
|
+
"form_id": zod.string().uuid()
|
|
12824
|
+
});
|
|
12825
|
+
var UpdateFormBody = zod.object({
|
|
12826
|
+
"title": zod.string().min(1).optional(),
|
|
12827
|
+
"schema": zod.record(zod.string(), zod.unknown()).optional().describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
12828
|
+
"processor_id": zod.string().uuid().optional().describe("Id of the worker that processes each submission.")
|
|
12829
|
+
});
|
|
12830
|
+
var UpdateFormResponse = zod.object({
|
|
12831
|
+
"data": zod.object({
|
|
12832
|
+
"id": zod.string(),
|
|
12833
|
+
"title": zod.string(),
|
|
12834
|
+
"version": zod.number().describe("Version the schema below belongs to."),
|
|
12835
|
+
"versions": zod.object({
|
|
12836
|
+
"live": zod.number(),
|
|
12837
|
+
"test": zod.number()
|
|
12838
|
+
}),
|
|
12839
|
+
"schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
12840
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
12841
|
+
"processor_id": zod.string(),
|
|
12842
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
12843
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
12844
|
+
}),
|
|
12845
|
+
"message": zod.string()
|
|
12846
|
+
});
|
|
12847
|
+
var ListFormVersionsParams = zod.object({
|
|
12848
|
+
"form_id": zod.string().uuid()
|
|
12849
|
+
});
|
|
12850
|
+
var listFormVersionsQueryCountDefault = 50;
|
|
12851
|
+
var listFormVersionsQueryCountMax = 100;
|
|
12852
|
+
var listFormVersionsQueryOffsetDefault = 0;
|
|
12853
|
+
var listFormVersionsQueryOffsetMin = 0;
|
|
12854
|
+
var listFormVersionsQuerySortByDefault = `version`;
|
|
12855
|
+
var listFormVersionsQuerySortOrderDefault = `desc`;
|
|
12856
|
+
var ListFormVersionsQueryParams = zod.object({
|
|
12857
|
+
"count": zod.number().min(1).max(listFormVersionsQueryCountMax).default(listFormVersionsQueryCountDefault),
|
|
12858
|
+
"offset": zod.number().min(listFormVersionsQueryOffsetMin).default(listFormVersionsQueryOffsetDefault),
|
|
12859
|
+
"sort_by": zod.enum(["version"]).default(listFormVersionsQuerySortByDefault),
|
|
12860
|
+
"sort_order": zod.enum(["asc", "desc"]).default(listFormVersionsQuerySortOrderDefault)
|
|
12861
|
+
});
|
|
12862
|
+
var listFormVersionsResponseDataItemVersionMin = -9007199254740991;
|
|
12863
|
+
var listFormVersionsResponseDataItemVersionMax = 9007199254740991;
|
|
12864
|
+
var listFormVersionsResponseMetaTotalMin = -9007199254740991;
|
|
12865
|
+
var listFormVersionsResponseMetaTotalMax = 9007199254740991;
|
|
12866
|
+
var ListFormVersionsResponse = zod.object({
|
|
12867
|
+
"data": zod.array(zod.object({
|
|
12868
|
+
"version": zod.number().int().min(listFormVersionsResponseDataItemVersionMin).max(listFormVersionsResponseDataItemVersionMax),
|
|
12869
|
+
"title": zod.string(),
|
|
12870
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
12871
|
+
"processor_id": zod.string(),
|
|
12872
|
+
"created_by": zod.string(),
|
|
12873
|
+
"created_at": zod.string().datetime({ "offset": true })
|
|
12874
|
+
})),
|
|
12875
|
+
"message": zod.string(),
|
|
12876
|
+
"meta": zod.object({
|
|
12877
|
+
"total": zod.number().int().min(listFormVersionsResponseMetaTotalMin).max(listFormVersionsResponseMetaTotalMax)
|
|
12878
|
+
})
|
|
12879
|
+
});
|
|
12880
|
+
var getFormVersionPathVersionMax = 9007199254740991;
|
|
12881
|
+
var GetFormVersionParams = zod.object({
|
|
12882
|
+
"form_id": zod.string().uuid(),
|
|
12883
|
+
"version": zod.number().int().min(1).max(getFormVersionPathVersionMax)
|
|
12884
|
+
});
|
|
12885
|
+
var GetFormVersionResponse = zod.object({
|
|
12886
|
+
"data": zod.object({
|
|
12887
|
+
"id": zod.string(),
|
|
12888
|
+
"title": zod.string(),
|
|
12889
|
+
"version": zod.number().describe("Version the schema below belongs to."),
|
|
12890
|
+
"versions": zod.object({
|
|
12891
|
+
"live": zod.number(),
|
|
12892
|
+
"test": zod.number()
|
|
12893
|
+
}),
|
|
12894
|
+
"schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
12895
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
12896
|
+
"processor_id": zod.string(),
|
|
12897
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
12898
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
12899
|
+
}),
|
|
12900
|
+
"message": zod.string()
|
|
12901
|
+
});
|
|
12902
|
+
var promoteFormVersionPathVersionMax = 9007199254740991;
|
|
12903
|
+
var PromoteFormVersionParams = zod.object({
|
|
12904
|
+
"form_id": zod.string().uuid(),
|
|
12905
|
+
"version": zod.number().int().min(1).max(promoteFormVersionPathVersionMax)
|
|
12906
|
+
});
|
|
12907
|
+
var PromoteFormVersionBody = zod.object({
|
|
12908
|
+
"environment": zod.enum(["live", "test"])
|
|
12909
|
+
});
|
|
12910
|
+
var promoteFormVersionResponseDataVersionMin = -9007199254740991;
|
|
12911
|
+
var promoteFormVersionResponseDataVersionMax = 9007199254740991;
|
|
12912
|
+
var PromoteFormVersionResponse = zod.object({
|
|
12913
|
+
"data": zod.object({
|
|
12914
|
+
"version": zod.number().int().min(promoteFormVersionResponseDataVersionMin).max(promoteFormVersionResponseDataVersionMax),
|
|
12915
|
+
"environment": zod.enum(["live", "test"])
|
|
12916
|
+
}),
|
|
12917
|
+
"message": zod.string()
|
|
12918
|
+
});
|
|
12579
12919
|
var CreateFormSubmissionBody = zod.object({
|
|
12580
12920
|
"form_id": zod.string().uuid(),
|
|
12581
12921
|
"environment": zod.enum(["live", "test"])
|
|
@@ -12694,7 +13034,7 @@ var GetProfileResponse = zod.object({
|
|
|
12694
13034
|
"last_name": zod.union([zod.string(), zod.null()]),
|
|
12695
13035
|
"email": zod.string(),
|
|
12696
13036
|
"role": zod.enum(["admin", "avallon_admin", "member"]),
|
|
12697
|
-
"permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
|
|
13037
|
+
"permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "forms:promote", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
|
|
12698
13038
|
"tenants": zod.object({
|
|
12699
13039
|
"active": zod.object({
|
|
12700
13040
|
"id": zod.string(),
|
|
@@ -16235,23 +16575,6 @@ var createMcpServer = (options) => {
|
|
|
16235
16575
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16236
16576
|
})
|
|
16237
16577
|
);
|
|
16238
|
-
tools.updateAccess = server2.registerTool(
|
|
16239
|
-
"updateAccess",
|
|
16240
|
-
{
|
|
16241
|
-
title: "Update access (deprecated)",
|
|
16242
|
-
description: "Replace who an entity is shared with. Each grantee must be a team member or a worker of the tenant. Requires `workers:write` on a worker, `case-types:write` on a case type and `voice-agents:write` on a voice agent. An editor who leaves their own grant out loses access, unless their role gives it.\n\n**Deprecated:** Use `PATCH /v1/access/{entityType}/{entityId}` instead.",
|
|
16243
|
-
inputSchema: {
|
|
16244
|
-
pathParams: UpdateAccessParams,
|
|
16245
|
-
bodyParams: UpdateAccessBody.optional()
|
|
16246
|
-
},
|
|
16247
|
-
outputSchema: UpdateAccessResponse,
|
|
16248
|
-
annotations: { destructiveHint: true, idempotentHint: true }
|
|
16249
|
-
},
|
|
16250
|
-
(args, ctx) => updateAccessHandler(args, {
|
|
16251
|
-
...options,
|
|
16252
|
-
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16253
|
-
})
|
|
16254
|
-
);
|
|
16255
16578
|
tools.changeAccess = server2.registerTool(
|
|
16256
16579
|
"changeAccess",
|
|
16257
16580
|
{
|
|
@@ -16831,6 +17154,105 @@ var createMcpServer = (options) => {
|
|
|
16831
17154
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16832
17155
|
})
|
|
16833
17156
|
);
|
|
17157
|
+
tools.listForms = server2.registerTool(
|
|
17158
|
+
"listForms",
|
|
17159
|
+
{
|
|
17160
|
+
title: "List forms",
|
|
17161
|
+
description: "List the forms shared with the caller, each at its latest version.",
|
|
17162
|
+
inputSchema: {
|
|
17163
|
+
queryParams: ListFormsQueryParams
|
|
17164
|
+
},
|
|
17165
|
+
outputSchema: ListFormsResponse,
|
|
17166
|
+
annotations: { readOnlyHint: true }
|
|
17167
|
+
},
|
|
17168
|
+
(args, ctx) => listFormsHandler(args, {
|
|
17169
|
+
...options,
|
|
17170
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17171
|
+
})
|
|
17172
|
+
);
|
|
17173
|
+
tools.getForm = server2.registerTool(
|
|
17174
|
+
"getForm",
|
|
17175
|
+
{
|
|
17176
|
+
title: "Get form",
|
|
17177
|
+
description: "Retrieve a form at its latest version.",
|
|
17178
|
+
inputSchema: {
|
|
17179
|
+
pathParams: GetFormParams
|
|
17180
|
+
},
|
|
17181
|
+
outputSchema: GetFormResponse,
|
|
17182
|
+
annotations: { readOnlyHint: true }
|
|
17183
|
+
},
|
|
17184
|
+
(args, ctx) => getFormHandler(args, {
|
|
17185
|
+
...options,
|
|
17186
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17187
|
+
})
|
|
17188
|
+
);
|
|
17189
|
+
tools.updateForm = server2.registerTool(
|
|
17190
|
+
"updateForm",
|
|
17191
|
+
{
|
|
17192
|
+
title: "Update form",
|
|
17193
|
+
description: "Partially update a form. Omitted fields are left unchanged, and one request creates at most one new version \u2014 none when nothing changed. Live and test keep pointing at their versions until promoted.",
|
|
17194
|
+
inputSchema: {
|
|
17195
|
+
pathParams: UpdateFormParams,
|
|
17196
|
+
bodyParams: UpdateFormBody.optional()
|
|
17197
|
+
},
|
|
17198
|
+
outputSchema: UpdateFormResponse,
|
|
17199
|
+
annotations: { destructiveHint: true }
|
|
17200
|
+
},
|
|
17201
|
+
(args, ctx) => updateFormHandler(args, {
|
|
17202
|
+
...options,
|
|
17203
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17204
|
+
})
|
|
17205
|
+
);
|
|
17206
|
+
tools.listFormVersions = server2.registerTool(
|
|
17207
|
+
"listFormVersions",
|
|
17208
|
+
{
|
|
17209
|
+
title: "List form versions",
|
|
17210
|
+
description: "List a form's versions without their schemas, newest first by default. Fetch a version's schema with the form version endpoint.",
|
|
17211
|
+
inputSchema: {
|
|
17212
|
+
pathParams: ListFormVersionsParams,
|
|
17213
|
+
queryParams: ListFormVersionsQueryParams
|
|
17214
|
+
},
|
|
17215
|
+
outputSchema: ListFormVersionsResponse,
|
|
17216
|
+
annotations: { readOnlyHint: true }
|
|
17217
|
+
},
|
|
17218
|
+
(args, ctx) => listFormVersionsHandler(args, {
|
|
17219
|
+
...options,
|
|
17220
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17221
|
+
})
|
|
17222
|
+
);
|
|
17223
|
+
tools.getFormVersion = server2.registerTool(
|
|
17224
|
+
"getFormVersion",
|
|
17225
|
+
{
|
|
17226
|
+
title: "Get form version",
|
|
17227
|
+
description: "Retrieve a form at the given version, including that version's schema.",
|
|
17228
|
+
inputSchema: {
|
|
17229
|
+
pathParams: GetFormVersionParams
|
|
17230
|
+
},
|
|
17231
|
+
outputSchema: GetFormVersionResponse,
|
|
17232
|
+
annotations: { readOnlyHint: true }
|
|
17233
|
+
},
|
|
17234
|
+
(args, ctx) => getFormVersionHandler(args, {
|
|
17235
|
+
...options,
|
|
17236
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17237
|
+
})
|
|
17238
|
+
);
|
|
17239
|
+
tools.promoteFormVersion = server2.registerTool(
|
|
17240
|
+
"promoteFormVersion",
|
|
17241
|
+
{
|
|
17242
|
+
title: "Promote form version",
|
|
17243
|
+
description: "Point the live or test environment at an existing form version. New submission links for that environment are pinned to it; open links keep their version.",
|
|
17244
|
+
inputSchema: {
|
|
17245
|
+
pathParams: PromoteFormVersionParams,
|
|
17246
|
+
bodyParams: PromoteFormVersionBody.optional()
|
|
17247
|
+
},
|
|
17248
|
+
outputSchema: PromoteFormVersionResponse,
|
|
17249
|
+
annotations: { destructiveHint: true }
|
|
17250
|
+
},
|
|
17251
|
+
(args, ctx) => promoteFormVersionHandler(args, {
|
|
17252
|
+
...options,
|
|
17253
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17254
|
+
})
|
|
17255
|
+
);
|
|
16834
17256
|
tools.createFormSubmission = server2.registerTool(
|
|
16835
17257
|
"createFormSubmission",
|
|
16836
17258
|
{
|
|
@@ -18012,4 +18434,4 @@ var transport = new StdioServerTransport();
|
|
|
18012
18434
|
server.connect(transport).then(() => {
|
|
18013
18435
|
console.error("MCP server running on stdio");
|
|
18014
18436
|
}).catch(console.error);
|
|
18015
|
-
//# sourceMappingURL=server-
|
|
18437
|
+
//# sourceMappingURL=server-OTXFMKP3.js.map
|