@avallon-labs/mcp 44.2.0-staging.1038 → 44.4.0-staging.1040

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-JM77DIBD.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 {
@@ -7124,6 +7153,7 @@ var GetEmailResponse = zod.object({
7124
7153
  email_agent_id: zod.union([zod.string(), zod.null()]),
7125
7154
  claim_id: zod.union([zod.string(), zod.null()]),
7126
7155
  direction: zod.enum(["inbound", "outbound"]),
7156
+ environment: zod.enum(["live", "test"]),
7127
7157
  from: zod.string(),
7128
7158
  to: zod.array(zod.string()),
7129
7159
  cc: zod.array(zod.string()),
@@ -10043,6 +10073,54 @@ var GetWebhookResponse = zod.object({
10043
10073
  }),
10044
10074
  message: zod.string()
10045
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
+ });
10046
10124
  var ListWebhookDeliveriesParams = zod.object({
10047
10125
  id: zod.string().min(1)
10048
10126
  });
@@ -11315,6 +11393,15 @@ server.tool(
11315
11393
  },
11316
11394
  getWebhookHandler
11317
11395
  );
11396
+ server.tool(
11397
+ "updateWebhook",
11398
+ "Update webhook",
11399
+ {
11400
+ pathParams: UpdateWebhookParams,
11401
+ bodyParams: UpdateWebhookBody
11402
+ },
11403
+ updateWebhookHandler
11404
+ );
11318
11405
  server.tool(
11319
11406
  "listWebhookDeliveries",
11320
11407
  "List webhook deliveries",
@@ -11337,4 +11424,4 @@ var transport = new StdioServerTransport();
11337
11424
  server.connect(transport).then(() => {
11338
11425
  console.error("MCP server running on stdio");
11339
11426
  }).catch(console.error);
11340
- //# sourceMappingURL=server-JM77DIBD.js.map
11427
+ //# sourceMappingURL=server-A6PKBDNO.js.map