@avallon-labs/mcp 48.2.0 → 49.0.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
|
@@ -3176,6 +3176,53 @@ var listWebhooks = async (id, params, options) => {
|
|
|
3176
3176
|
headers: res.headers
|
|
3177
3177
|
};
|
|
3178
3178
|
};
|
|
3179
|
+
var getCreateNotificationWebhookUrl = () => {
|
|
3180
|
+
return `/v1/notifications/webhooks`;
|
|
3181
|
+
};
|
|
3182
|
+
var createNotificationWebhook = async (createNotificationWebhookBody, options) => {
|
|
3183
|
+
const res = await fetch(getCreateNotificationWebhookUrl(), {
|
|
3184
|
+
...options,
|
|
3185
|
+
method: "POST",
|
|
3186
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
3187
|
+
body: JSON.stringify(createNotificationWebhookBody)
|
|
3188
|
+
});
|
|
3189
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3190
|
+
const data = body ? JSON.parse(body) : {};
|
|
3191
|
+
return {
|
|
3192
|
+
data,
|
|
3193
|
+
status: res.status,
|
|
3194
|
+
headers: res.headers
|
|
3195
|
+
};
|
|
3196
|
+
};
|
|
3197
|
+
var getListNotificationWebhooksUrl = (params) => {
|
|
3198
|
+
const normalizedParams = new URLSearchParams();
|
|
3199
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3200
|
+
if (value !== void 0) {
|
|
3201
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
3202
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
3203
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3204
|
+
}
|
|
3205
|
+
} else {
|
|
3206
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
});
|
|
3210
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3211
|
+
return stringifiedParams.length > 0 ? `/v1/notifications/webhooks?${stringifiedParams}` : `/v1/notifications/webhooks`;
|
|
3212
|
+
};
|
|
3213
|
+
var listNotificationWebhooks = async (params, options) => {
|
|
3214
|
+
const res = await fetch(getListNotificationWebhooksUrl(params), {
|
|
3215
|
+
...options,
|
|
3216
|
+
method: "GET"
|
|
3217
|
+
});
|
|
3218
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3219
|
+
const data = body ? JSON.parse(body) : {};
|
|
3220
|
+
return {
|
|
3221
|
+
data,
|
|
3222
|
+
status: res.status,
|
|
3223
|
+
headers: res.headers
|
|
3224
|
+
};
|
|
3225
|
+
};
|
|
3179
3226
|
var getDeleteWebhookUrl = (id) => {
|
|
3180
3227
|
return `/v1/webhooks/${id}`;
|
|
3181
3228
|
};
|
|
@@ -5051,6 +5098,28 @@ var listWebhooksHandler = async (args) => {
|
|
|
5051
5098
|
]
|
|
5052
5099
|
};
|
|
5053
5100
|
};
|
|
5101
|
+
var createNotificationWebhookHandler = async (args) => {
|
|
5102
|
+
const res = await createNotificationWebhook(args.bodyParams);
|
|
5103
|
+
return {
|
|
5104
|
+
content: [
|
|
5105
|
+
{
|
|
5106
|
+
type: "text",
|
|
5107
|
+
text: JSON.stringify(res)
|
|
5108
|
+
}
|
|
5109
|
+
]
|
|
5110
|
+
};
|
|
5111
|
+
};
|
|
5112
|
+
var listNotificationWebhooksHandler = async (args) => {
|
|
5113
|
+
const res = await listNotificationWebhooks(args.queryParams);
|
|
5114
|
+
return {
|
|
5115
|
+
content: [
|
|
5116
|
+
{
|
|
5117
|
+
type: "text",
|
|
5118
|
+
text: JSON.stringify(res)
|
|
5119
|
+
}
|
|
5120
|
+
]
|
|
5121
|
+
};
|
|
5122
|
+
};
|
|
5054
5123
|
var deleteWebhookHandler = async (args) => {
|
|
5055
5124
|
const res = await deleteWebhook(args.pathParams.id);
|
|
5056
5125
|
return {
|
|
@@ -8251,7 +8320,10 @@ var CreateWorkerWebhookResponse = zod.object({
|
|
|
8251
8320
|
}),
|
|
8252
8321
|
zod.object({
|
|
8253
8322
|
worker_id: zod.string()
|
|
8254
|
-
})
|
|
8323
|
+
}),
|
|
8324
|
+
zod.object({
|
|
8325
|
+
notifications: zod.boolean()
|
|
8326
|
+
}).describe("The organization's notification feed, not a resource")
|
|
8255
8327
|
]),
|
|
8256
8328
|
name: zod.string(),
|
|
8257
8329
|
url: zod.string(),
|
|
@@ -8288,7 +8360,10 @@ var ListWorkerWebhooksResponse = zod.object({
|
|
|
8288
8360
|
}),
|
|
8289
8361
|
zod.object({
|
|
8290
8362
|
worker_id: zod.string()
|
|
8291
|
-
})
|
|
8363
|
+
}),
|
|
8364
|
+
zod.object({
|
|
8365
|
+
notifications: zod.boolean()
|
|
8366
|
+
}).describe("The organization's notification feed, not a resource")
|
|
8292
8367
|
]),
|
|
8293
8368
|
name: zod.string(),
|
|
8294
8369
|
url: zod.string(),
|
|
@@ -8327,9 +8402,6 @@ var ListCasesQueryParams = zod.object({
|
|
|
8327
8402
|
sort_by: zod.enum(["created_at", "updated_at"]).default(listCasesQuerySortByDefault),
|
|
8328
8403
|
sort_order: zod.enum(["asc", "desc"]).default(listCasesQuerySortOrderDefault)
|
|
8329
8404
|
});
|
|
8330
|
-
var listCasesResponseDataItemCreatedByRegExp = new RegExp(
|
|
8331
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
8332
|
-
);
|
|
8333
8405
|
var ListCasesResponse = zod.object({
|
|
8334
8406
|
data: zod.array(
|
|
8335
8407
|
zod.object({
|
|
@@ -8337,7 +8409,7 @@ var ListCasesResponse = zod.object({
|
|
|
8337
8409
|
environment: zod.enum(["live", "test"]),
|
|
8338
8410
|
subject: zod.union([zod.string(), zod.null()]),
|
|
8339
8411
|
reporter: zod.union([zod.string(), zod.null()]),
|
|
8340
|
-
created_by: zod.string().
|
|
8412
|
+
created_by: zod.string().describe(
|
|
8341
8413
|
'Actor that created the case, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
8342
8414
|
),
|
|
8343
8415
|
created_at: zod.string().datetime({}),
|
|
@@ -8368,9 +8440,6 @@ var SearchCasesQueryParams = zod.object({
|
|
|
8368
8440
|
count: zod.number().min(1).max(searchCasesQueryCountMax).default(searchCasesQueryCountDefault),
|
|
8369
8441
|
offset: zod.number().min(searchCasesQueryOffsetMin).default(searchCasesQueryOffsetDefault)
|
|
8370
8442
|
});
|
|
8371
|
-
var searchCasesResponseDataItemCreatedByRegExp = new RegExp(
|
|
8372
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
8373
|
-
);
|
|
8374
8443
|
var SearchCasesResponse = zod.object({
|
|
8375
8444
|
data: zod.array(
|
|
8376
8445
|
zod.object({
|
|
@@ -8378,7 +8447,7 @@ var SearchCasesResponse = zod.object({
|
|
|
8378
8447
|
environment: zod.enum(["live", "test"]),
|
|
8379
8448
|
subject: zod.union([zod.string(), zod.null()]),
|
|
8380
8449
|
reporter: zod.union([zod.string(), zod.null()]),
|
|
8381
|
-
created_by: zod.string().
|
|
8450
|
+
created_by: zod.string().describe(
|
|
8382
8451
|
'Actor that created the case, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
8383
8452
|
),
|
|
8384
8453
|
created_at: zod.string().datetime({}),
|
|
@@ -8398,9 +8467,6 @@ var GetCaseQueryParams = zod.object({
|
|
|
8398
8467
|
"Environment the case belongs to. A case reference is unique per environment, so the same reference can name a different case in each. Defaults to `live`. A worker run may omit this or pass its own run's environment; any other value is rejected."
|
|
8399
8468
|
)
|
|
8400
8469
|
});
|
|
8401
|
-
var getCaseResponseDataCaseCreatedByRegExp = new RegExp(
|
|
8402
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
8403
|
-
);
|
|
8404
8470
|
var GetCaseResponse = zod.object({
|
|
8405
8471
|
data: zod.object({
|
|
8406
8472
|
case: zod.object({
|
|
@@ -8408,7 +8474,7 @@ var GetCaseResponse = zod.object({
|
|
|
8408
8474
|
environment: zod.enum(["live", "test"]),
|
|
8409
8475
|
subject: zod.union([zod.string(), zod.null()]),
|
|
8410
8476
|
reporter: zod.union([zod.string(), zod.null()]),
|
|
8411
|
-
created_by: zod.string().
|
|
8477
|
+
created_by: zod.string().describe(
|
|
8412
8478
|
'Actor that created the case, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
8413
8479
|
),
|
|
8414
8480
|
created_at: zod.string().datetime({}),
|
|
@@ -8867,6 +8933,7 @@ var GetProfileResponse = zod.object({
|
|
|
8867
8933
|
"workers:run",
|
|
8868
8934
|
"workers:promote",
|
|
8869
8935
|
"chat-agents:write",
|
|
8936
|
+
"notifications:write",
|
|
8870
8937
|
"prompts:read",
|
|
8871
8938
|
"prompts:write",
|
|
8872
8939
|
"secrets:read",
|
|
@@ -9574,25 +9641,33 @@ var ListNotificationsQueryParams = zod.object({
|
|
|
9574
9641
|
sort_by: zod.enum(["created_at"]).default(listNotificationsQuerySortByDefault),
|
|
9575
9642
|
sort_order: zod.enum(["asc", "desc"]).default(listNotificationsQuerySortOrderDefault)
|
|
9576
9643
|
});
|
|
9577
|
-
var listNotificationsResponseDataItemCreatedByRegExp = new RegExp(
|
|
9578
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9579
|
-
);
|
|
9580
9644
|
var ListNotificationsResponse = zod.object({
|
|
9581
9645
|
data: zod.array(
|
|
9582
|
-
zod.
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9646
|
+
zod.union([
|
|
9647
|
+
zod.object({
|
|
9648
|
+
id: zod.string(),
|
|
9649
|
+
title: zod.string().describe("Headline to display"),
|
|
9650
|
+
body: zod.string().describe("Body text to display"),
|
|
9651
|
+
created_by: zod.string().describe("Actor that raised the notification"),
|
|
9652
|
+
created_at: zod.string().datetime({}),
|
|
9653
|
+
type: zod.literal("worker_issue_reported"),
|
|
9654
|
+
data: zod.object({
|
|
9655
|
+
worker_id: zod.string(),
|
|
9656
|
+
run_id: zod.string()
|
|
9657
|
+
}).describe("The worker and run that reported the issue")
|
|
9658
|
+
}),
|
|
9659
|
+
zod.object({
|
|
9660
|
+
id: zod.string(),
|
|
9661
|
+
title: zod.string().describe("Headline to display"),
|
|
9662
|
+
body: zod.string().describe("Body text to display"),
|
|
9663
|
+
created_by: zod.string().describe("Actor that raised the notification"),
|
|
9664
|
+
created_at: zod.string().datetime({}),
|
|
9665
|
+
type: zod.literal("information_request_created"),
|
|
9666
|
+
data: zod.object({
|
|
9667
|
+
request_id: zod.string()
|
|
9668
|
+
}).describe("The information request waiting to be answered")
|
|
9669
|
+
})
|
|
9670
|
+
])
|
|
9596
9671
|
),
|
|
9597
9672
|
message: zod.string(),
|
|
9598
9673
|
meta: zod.object({
|
|
@@ -9630,12 +9705,6 @@ var ListInformationRequestsQueryParams = zod.object({
|
|
|
9630
9705
|
sort_by: zod.enum(["created_at"]).default(listInformationRequestsQuerySortByDefault),
|
|
9631
9706
|
sort_order: zod.enum(["asc", "desc"]).default(listInformationRequestsQuerySortOrderDefault)
|
|
9632
9707
|
});
|
|
9633
|
-
var listInformationRequestsResponseDataItemResolvedByOneRegExp = new RegExp(
|
|
9634
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9635
|
-
);
|
|
9636
|
-
var listInformationRequestsResponseDataItemCreatedByRegExp = new RegExp(
|
|
9637
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9638
|
-
);
|
|
9639
9708
|
var ListInformationRequestsResponse = zod.object({
|
|
9640
9709
|
data: zod.array(
|
|
9641
9710
|
zod.object({
|
|
@@ -9644,7 +9713,7 @@ var ListInformationRequestsResponse = zod.object({
|
|
|
9644
9713
|
question: zod.string().describe("What the asker needs to know"),
|
|
9645
9714
|
resolution: zod.union([zod.string(), zod.null()]).describe("Null while the request is open"),
|
|
9646
9715
|
resolved_by: zod.union([
|
|
9647
|
-
zod.string().
|
|
9716
|
+
zod.string().describe(
|
|
9648
9717
|
'Actor string, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
9649
9718
|
),
|
|
9650
9719
|
zod.null()
|
|
@@ -9652,7 +9721,7 @@ var ListInformationRequestsResponse = zod.object({
|
|
|
9652
9721
|
resolved_at: zod.union([zod.string().datetime({}), zod.null()]),
|
|
9653
9722
|
metadata: zod.record(zod.string(), zod.unknown()),
|
|
9654
9723
|
environment: zod.enum(["live", "test"]),
|
|
9655
|
-
created_by: zod.string().
|
|
9724
|
+
created_by: zod.string().describe("Actor that raised the request"),
|
|
9656
9725
|
created_at: zod.string().datetime({})
|
|
9657
9726
|
})
|
|
9658
9727
|
),
|
|
@@ -9664,12 +9733,6 @@ var ListInformationRequestsResponse = zod.object({
|
|
|
9664
9733
|
var GetInformationRequestParams = zod.object({
|
|
9665
9734
|
informationRequestId: zod.string().uuid()
|
|
9666
9735
|
});
|
|
9667
|
-
var getInformationRequestResponseDataResolvedByOneRegExp = new RegExp(
|
|
9668
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9669
|
-
);
|
|
9670
|
-
var getInformationRequestResponseDataCreatedByRegExp = new RegExp(
|
|
9671
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9672
|
-
);
|
|
9673
9736
|
var GetInformationRequestResponse = zod.object({
|
|
9674
9737
|
data: zod.object({
|
|
9675
9738
|
id: zod.string(),
|
|
@@ -9677,7 +9740,7 @@ var GetInformationRequestResponse = zod.object({
|
|
|
9677
9740
|
question: zod.string().describe("What the asker needs to know"),
|
|
9678
9741
|
resolution: zod.union([zod.string(), zod.null()]).describe("Null while the request is open"),
|
|
9679
9742
|
resolved_by: zod.union([
|
|
9680
|
-
zod.string().
|
|
9743
|
+
zod.string().describe(
|
|
9681
9744
|
'Actor string, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
9682
9745
|
),
|
|
9683
9746
|
zod.null()
|
|
@@ -9685,7 +9748,7 @@ var GetInformationRequestResponse = zod.object({
|
|
|
9685
9748
|
resolved_at: zod.union([zod.string().datetime({}), zod.null()]),
|
|
9686
9749
|
metadata: zod.record(zod.string(), zod.unknown()),
|
|
9687
9750
|
environment: zod.enum(["live", "test"]),
|
|
9688
|
-
created_by: zod.string().
|
|
9751
|
+
created_by: zod.string().describe("Actor that raised the request"),
|
|
9689
9752
|
created_at: zod.string().datetime({})
|
|
9690
9753
|
}),
|
|
9691
9754
|
message: zod.string()
|
|
@@ -9697,12 +9760,6 @@ var resolveInformationRequestBodyResolutionMax = 1e4;
|
|
|
9697
9760
|
var ResolveInformationRequestBody = zod.object({
|
|
9698
9761
|
resolution: zod.string().min(1).max(resolveInformationRequestBodyResolutionMax).describe("The information the asker was missing, in plain language")
|
|
9699
9762
|
});
|
|
9700
|
-
var resolveInformationRequestResponseDataResolvedByOneRegExp = new RegExp(
|
|
9701
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9702
|
-
);
|
|
9703
|
-
var resolveInformationRequestResponseDataCreatedByRegExp = new RegExp(
|
|
9704
|
-
"^(?:worker|user):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
9705
|
-
);
|
|
9706
9763
|
var ResolveInformationRequestResponse = zod.object({
|
|
9707
9764
|
data: zod.object({
|
|
9708
9765
|
id: zod.string(),
|
|
@@ -9710,7 +9767,7 @@ var ResolveInformationRequestResponse = zod.object({
|
|
|
9710
9767
|
question: zod.string().describe("What the asker needs to know"),
|
|
9711
9768
|
resolution: zod.union([zod.string(), zod.null()]).describe("Null while the request is open"),
|
|
9712
9769
|
resolved_by: zod.union([
|
|
9713
|
-
zod.string().
|
|
9770
|
+
zod.string().describe(
|
|
9714
9771
|
'Actor string, e.g. "worker:<workerId>" or "user:<profileId>".'
|
|
9715
9772
|
),
|
|
9716
9773
|
zod.null()
|
|
@@ -9718,7 +9775,7 @@ var ResolveInformationRequestResponse = zod.object({
|
|
|
9718
9775
|
resolved_at: zod.union([zod.string().datetime({}), zod.null()]),
|
|
9719
9776
|
metadata: zod.record(zod.string(), zod.unknown()),
|
|
9720
9777
|
environment: zod.enum(["live", "test"]),
|
|
9721
|
-
created_by: zod.string().
|
|
9778
|
+
created_by: zod.string().describe("Actor that raised the request"),
|
|
9722
9779
|
created_at: zod.string().datetime({})
|
|
9723
9780
|
}),
|
|
9724
9781
|
message: zod.string()
|
|
@@ -10115,7 +10172,10 @@ var CreateAgentWebhookResponse = zod.object({
|
|
|
10115
10172
|
}),
|
|
10116
10173
|
zod.object({
|
|
10117
10174
|
worker_id: zod.string()
|
|
10118
|
-
})
|
|
10175
|
+
}),
|
|
10176
|
+
zod.object({
|
|
10177
|
+
notifications: zod.boolean()
|
|
10178
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10119
10179
|
]),
|
|
10120
10180
|
name: zod.string(),
|
|
10121
10181
|
url: zod.string(),
|
|
@@ -10152,7 +10212,10 @@ var ListAgentWebhooksResponse = zod.object({
|
|
|
10152
10212
|
}),
|
|
10153
10213
|
zod.object({
|
|
10154
10214
|
worker_id: zod.string()
|
|
10155
|
-
})
|
|
10215
|
+
}),
|
|
10216
|
+
zod.object({
|
|
10217
|
+
notifications: zod.boolean()
|
|
10218
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10156
10219
|
]),
|
|
10157
10220
|
name: zod.string(),
|
|
10158
10221
|
url: zod.string(),
|
|
@@ -10202,7 +10265,10 @@ var CreateInboxWebhookResponse = zod.object({
|
|
|
10202
10265
|
}),
|
|
10203
10266
|
zod.object({
|
|
10204
10267
|
worker_id: zod.string()
|
|
10205
|
-
})
|
|
10268
|
+
}),
|
|
10269
|
+
zod.object({
|
|
10270
|
+
notifications: zod.boolean()
|
|
10271
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10206
10272
|
]),
|
|
10207
10273
|
name: zod.string(),
|
|
10208
10274
|
url: zod.string(),
|
|
@@ -10239,7 +10305,10 @@ var ListInboxWebhooksResponse = zod.object({
|
|
|
10239
10305
|
}),
|
|
10240
10306
|
zod.object({
|
|
10241
10307
|
worker_id: zod.string()
|
|
10242
|
-
})
|
|
10308
|
+
}),
|
|
10309
|
+
zod.object({
|
|
10310
|
+
notifications: zod.boolean()
|
|
10311
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10243
10312
|
]),
|
|
10244
10313
|
name: zod.string(),
|
|
10245
10314
|
url: zod.string(),
|
|
@@ -10289,7 +10358,10 @@ var CreateExtractorWebhookResponse = zod.object({
|
|
|
10289
10358
|
}),
|
|
10290
10359
|
zod.object({
|
|
10291
10360
|
worker_id: zod.string()
|
|
10292
|
-
})
|
|
10361
|
+
}),
|
|
10362
|
+
zod.object({
|
|
10363
|
+
notifications: zod.boolean()
|
|
10364
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10293
10365
|
]),
|
|
10294
10366
|
name: zod.string(),
|
|
10295
10367
|
url: zod.string(),
|
|
@@ -10326,7 +10398,66 @@ var ListWebhooksResponse = zod.object({
|
|
|
10326
10398
|
}),
|
|
10327
10399
|
zod.object({
|
|
10328
10400
|
worker_id: zod.string()
|
|
10329
|
-
})
|
|
10401
|
+
}),
|
|
10402
|
+
zod.object({
|
|
10403
|
+
notifications: zod.boolean()
|
|
10404
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10405
|
+
]),
|
|
10406
|
+
name: zod.string(),
|
|
10407
|
+
url: zod.string(),
|
|
10408
|
+
auth_header_name: zod.union([zod.string(), zod.null()]),
|
|
10409
|
+
has_auth: zod.boolean(),
|
|
10410
|
+
enabled: zod.boolean(),
|
|
10411
|
+
environments: zod.array(zod.enum(["live", "test"])),
|
|
10412
|
+
created_at: zod.string().datetime({}),
|
|
10413
|
+
updated_at: zod.string().datetime({})
|
|
10414
|
+
})
|
|
10415
|
+
),
|
|
10416
|
+
message: zod.string()
|
|
10417
|
+
});
|
|
10418
|
+
var createNotificationWebhookBodyNameMax = 256;
|
|
10419
|
+
var createNotificationWebhookBodyUrlMax = 2048;
|
|
10420
|
+
var createNotificationWebhookBodyAuthHeaderNameOneMax = 256;
|
|
10421
|
+
var createNotificationWebhookBodyAuthHeaderValueOneMax = 2048;
|
|
10422
|
+
var CreateNotificationWebhookBody = zod.object({
|
|
10423
|
+
name: zod.string().min(1).max(createNotificationWebhookBodyNameMax),
|
|
10424
|
+
url: zod.string().url().max(createNotificationWebhookBodyUrlMax),
|
|
10425
|
+
environments: zod.array(zod.enum(["live", "test"])).min(1).default([`live`]),
|
|
10426
|
+
auth_header_name: zod.union([
|
|
10427
|
+
zod.string().max(createNotificationWebhookBodyAuthHeaderNameOneMax),
|
|
10428
|
+
zod.null()
|
|
10429
|
+
]).optional(),
|
|
10430
|
+
auth_header_value: zod.union([
|
|
10431
|
+
zod.string().max(createNotificationWebhookBodyAuthHeaderValueOneMax),
|
|
10432
|
+
zod.null()
|
|
10433
|
+
]).optional(),
|
|
10434
|
+
enabled: zod.boolean().optional()
|
|
10435
|
+
});
|
|
10436
|
+
var ListNotificationWebhooksQueryParams = zod.object({
|
|
10437
|
+
environment: zod.enum(["live", "test"]).optional().describe(
|
|
10438
|
+
"Only return webhooks that receive events from this environment. Webhooks configured for both environments match either value."
|
|
10439
|
+
)
|
|
10440
|
+
});
|
|
10441
|
+
var ListNotificationWebhooksResponse = zod.object({
|
|
10442
|
+
data: zod.array(
|
|
10443
|
+
zod.object({
|
|
10444
|
+
id: zod.string(),
|
|
10445
|
+
scope: zod.union([
|
|
10446
|
+
zod.object({
|
|
10447
|
+
extractor_id: zod.string()
|
|
10448
|
+
}),
|
|
10449
|
+
zod.object({
|
|
10450
|
+
call_agent_id: zod.string()
|
|
10451
|
+
}),
|
|
10452
|
+
zod.object({
|
|
10453
|
+
inbox_id: zod.string()
|
|
10454
|
+
}),
|
|
10455
|
+
zod.object({
|
|
10456
|
+
worker_id: zod.string()
|
|
10457
|
+
}),
|
|
10458
|
+
zod.object({
|
|
10459
|
+
notifications: zod.boolean()
|
|
10460
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10330
10461
|
]),
|
|
10331
10462
|
name: zod.string(),
|
|
10332
10463
|
url: zod.string(),
|
|
@@ -10365,7 +10496,10 @@ var GetWebhookResponse = zod.object({
|
|
|
10365
10496
|
}),
|
|
10366
10497
|
zod.object({
|
|
10367
10498
|
worker_id: zod.string()
|
|
10368
|
-
})
|
|
10499
|
+
}),
|
|
10500
|
+
zod.object({
|
|
10501
|
+
notifications: zod.boolean()
|
|
10502
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10369
10503
|
]),
|
|
10370
10504
|
name: zod.string(),
|
|
10371
10505
|
url: zod.string(),
|
|
@@ -10413,7 +10547,10 @@ var UpdateWebhookResponse = zod.object({
|
|
|
10413
10547
|
}),
|
|
10414
10548
|
zod.object({
|
|
10415
10549
|
worker_id: zod.string()
|
|
10416
|
-
})
|
|
10550
|
+
}),
|
|
10551
|
+
zod.object({
|
|
10552
|
+
notifications: zod.boolean()
|
|
10553
|
+
}).describe("The organization's notification feed, not a resource")
|
|
10417
10554
|
]),
|
|
10418
10555
|
name: zod.string(),
|
|
10419
10556
|
url: zod.string(),
|
|
@@ -11732,6 +11869,22 @@ server.tool(
|
|
|
11732
11869
|
},
|
|
11733
11870
|
listWebhooksHandler
|
|
11734
11871
|
);
|
|
11872
|
+
server.tool(
|
|
11873
|
+
"createNotificationWebhook",
|
|
11874
|
+
"Create notification webhook",
|
|
11875
|
+
{
|
|
11876
|
+
bodyParams: CreateNotificationWebhookBody
|
|
11877
|
+
},
|
|
11878
|
+
createNotificationWebhookHandler
|
|
11879
|
+
);
|
|
11880
|
+
server.tool(
|
|
11881
|
+
"listNotificationWebhooks",
|
|
11882
|
+
"List notification webhooks",
|
|
11883
|
+
{
|
|
11884
|
+
queryParams: ListNotificationWebhooksQueryParams
|
|
11885
|
+
},
|
|
11886
|
+
listNotificationWebhooksHandler
|
|
11887
|
+
);
|
|
11735
11888
|
server.tool(
|
|
11736
11889
|
"deleteWebhook",
|
|
11737
11890
|
"Delete webhook",
|
|
@@ -11779,4 +11932,4 @@ var transport = new StdioServerTransport();
|
|
|
11779
11932
|
server.connect(transport).then(() => {
|
|
11780
11933
|
console.error("MCP server running on stdio");
|
|
11781
11934
|
}).catch(console.error);
|
|
11782
|
-
//# sourceMappingURL=server-
|
|
11935
|
+
//# sourceMappingURL=server-V7JISZPJ.js.map
|