@avallon-labs/mcp 44.3.0-staging.1039 → 44.4.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
@@ -46,5 +46,5 @@ function setupFetch() {
46
46
 
47
47
  // src/index.ts
48
48
  setupFetch();
49
- await import("./server-KG4OHF75.js");
49
+ await import("./server-A6PKBDNO.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -3044,6 +3044,24 @@ var getWebhook = async (id, options) => {
3044
3044
  headers: res.headers
3045
3045
  };
3046
3046
  };
3047
+ var getUpdateWebhookUrl = (id) => {
3048
+ return `/v1/webhooks/${id}`;
3049
+ };
3050
+ var updateWebhook = async (id, updateWebhookBody, options) => {
3051
+ const res = await fetch(getUpdateWebhookUrl(id), {
3052
+ ...options,
3053
+ method: "PATCH",
3054
+ headers: { "Content-Type": "application/json", ...options?.headers },
3055
+ body: JSON.stringify(updateWebhookBody)
3056
+ });
3057
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
3058
+ const data = body ? JSON.parse(body) : {};
3059
+ return {
3060
+ data,
3061
+ status: res.status,
3062
+ headers: res.headers
3063
+ };
3064
+ };
3047
3065
  var getListWebhookDeliveriesUrl = (id, params) => {
3048
3066
  const normalizedParams = new URLSearchParams();
3049
3067
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -4830,6 +4848,17 @@ var getWebhookHandler = async (args) => {
4830
4848
  ]
4831
4849
  };
4832
4850
  };
4851
+ var updateWebhookHandler = async (args) => {
4852
+ const res = await updateWebhook(args.pathParams.id, args.bodyParams);
4853
+ return {
4854
+ content: [
4855
+ {
4856
+ type: "text",
4857
+ text: JSON.stringify(res)
4858
+ }
4859
+ ]
4860
+ };
4861
+ };
4833
4862
  var listWebhookDeliveriesHandler = async (args) => {
4834
4863
  const res = await listWebhookDeliveries(args.pathParams.id, args.queryParams);
4835
4864
  return {
@@ -10044,6 +10073,54 @@ var GetWebhookResponse = zod.object({
10044
10073
  }),
10045
10074
  message: zod.string()
10046
10075
  });
10076
+ var UpdateWebhookParams = zod.object({
10077
+ id: zod.string().min(1)
10078
+ });
10079
+ var updateWebhookBodyNameMax = 256;
10080
+ var updateWebhookBodyUrlMax = 2048;
10081
+ var updateWebhookBodyAuthOneHeaderNameMax = 256;
10082
+ var updateWebhookBodyAuthOneHeaderValueMax = 2048;
10083
+ var UpdateWebhookBody = zod.object({
10084
+ name: zod.string().min(1).max(updateWebhookBodyNameMax).optional(),
10085
+ url: zod.string().url().max(updateWebhookBodyUrlMax).optional(),
10086
+ environments: zod.array(zod.enum(["live", "test"])).min(1).optional(),
10087
+ enabled: zod.boolean().optional(),
10088
+ auth: zod.union([
10089
+ zod.object({
10090
+ header_name: zod.string().min(1).max(updateWebhookBodyAuthOneHeaderNameMax),
10091
+ header_value: zod.string().min(1).max(updateWebhookBodyAuthOneHeaderValueMax)
10092
+ }),
10093
+ zod.null()
10094
+ ]).optional()
10095
+ });
10096
+ var UpdateWebhookResponse = zod.object({
10097
+ data: zod.object({
10098
+ id: zod.string(),
10099
+ scope: zod.union([
10100
+ zod.object({
10101
+ extractor_id: zod.string()
10102
+ }),
10103
+ zod.object({
10104
+ call_agent_id: zod.string()
10105
+ }),
10106
+ zod.object({
10107
+ inbox_id: zod.string()
10108
+ }),
10109
+ zod.object({
10110
+ worker_id: zod.string()
10111
+ })
10112
+ ]),
10113
+ name: zod.string(),
10114
+ url: zod.string(),
10115
+ auth_header_name: zod.union([zod.string(), zod.null()]),
10116
+ has_auth: zod.boolean(),
10117
+ enabled: zod.boolean(),
10118
+ environments: zod.array(zod.enum(["live", "test"])),
10119
+ created_at: zod.string().datetime({}),
10120
+ updated_at: zod.string().datetime({})
10121
+ }),
10122
+ message: zod.string()
10123
+ });
10047
10124
  var ListWebhookDeliveriesParams = zod.object({
10048
10125
  id: zod.string().min(1)
10049
10126
  });
@@ -11316,6 +11393,15 @@ server.tool(
11316
11393
  },
11317
11394
  getWebhookHandler
11318
11395
  );
11396
+ server.tool(
11397
+ "updateWebhook",
11398
+ "Update webhook",
11399
+ {
11400
+ pathParams: UpdateWebhookParams,
11401
+ bodyParams: UpdateWebhookBody
11402
+ },
11403
+ updateWebhookHandler
11404
+ );
11319
11405
  server.tool(
11320
11406
  "listWebhookDeliveries",
11321
11407
  "List webhook deliveries",
@@ -11338,4 +11424,4 @@ var transport = new StdioServerTransport();
11338
11424
  server.connect(transport).then(() => {
11339
11425
  console.error("MCP server running on stdio");
11340
11426
  }).catch(console.error);
11341
- //# sourceMappingURL=server-KG4OHF75.js.map
11427
+ //# sourceMappingURL=server-A6PKBDNO.js.map