@avallon-labs/mcp 10.0.0 → 11.0.0-staging.281

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
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-AKPXEANM.js");
57
+ await import("./server-5FCFDGUN.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -1306,11 +1306,11 @@ var listAgentWebhooks = async (voiceAgentId, options) => {
1306
1306
  headers: res.headers
1307
1307
  };
1308
1308
  };
1309
- var getCreateEmailAgentWebhookUrl = (id) => {
1310
- return `/v1/email-agents/${id}/webhooks`;
1309
+ var getCreateEmailAgentWebhookUrl = (inboxId) => {
1310
+ return `/v1/inboxes/${inboxId}/webhooks`;
1311
1311
  };
1312
- var createEmailAgentWebhook = async (id, createEmailAgentWebhookBody, options) => {
1313
- const res = await fetch(getCreateEmailAgentWebhookUrl(id), {
1312
+ var createEmailAgentWebhook = async (inboxId, createEmailAgentWebhookBody, options) => {
1313
+ const res = await fetch(getCreateEmailAgentWebhookUrl(inboxId), {
1314
1314
  ...options,
1315
1315
  method: "POST",
1316
1316
  headers: { "Content-Type": "application/json", ...options?.headers },
@@ -1324,6 +1324,22 @@ var createEmailAgentWebhook = async (id, createEmailAgentWebhookBody, options) =
1324
1324
  headers: res.headers
1325
1325
  };
1326
1326
  };
1327
+ var getListInboxWebhooksUrl = (inboxId) => {
1328
+ return `/v1/inboxes/${inboxId}/webhooks`;
1329
+ };
1330
+ var listInboxWebhooks = async (inboxId, options) => {
1331
+ const res = await fetch(getListInboxWebhooksUrl(inboxId), {
1332
+ ...options,
1333
+ method: "GET"
1334
+ });
1335
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1336
+ const data = body ? JSON.parse(body) : {};
1337
+ return {
1338
+ data,
1339
+ status: res.status,
1340
+ headers: res.headers
1341
+ };
1342
+ };
1327
1343
  var getCreateExtractorWebhookUrl = (id) => {
1328
1344
  return `/v1/extractors/${id}/webhooks`;
1329
1345
  };
@@ -1390,22 +1406,6 @@ var getWebhook = async (id, options) => {
1390
1406
  headers: res.headers
1391
1407
  };
1392
1408
  };
1393
- var getListInboxWebhooksUrl = (inboxId) => {
1394
- return `/v1/inboxes/${inboxId}/webhooks`;
1395
- };
1396
- var listInboxWebhooks = async (inboxId, options) => {
1397
- const res = await fetch(getListInboxWebhooksUrl(inboxId), {
1398
- ...options,
1399
- method: "GET"
1400
- });
1401
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1402
- const data = body ? JSON.parse(body) : {};
1403
- return {
1404
- data,
1405
- status: res.status,
1406
- headers: res.headers
1407
- };
1408
- };
1409
1409
  var getListWebhookDeliveriesUrl = (id, params) => {
1410
1410
  const normalizedParams = new URLSearchParams();
1411
1411
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2183,7 +2183,7 @@ var listAgentWebhooksHandler = async (args) => {
2183
2183
  };
2184
2184
  var createEmailAgentWebhookHandler = async (args) => {
2185
2185
  const res = await createEmailAgentWebhook(
2186
- args.pathParams.id,
2186
+ args.pathParams.inboxId,
2187
2187
  args.bodyParams
2188
2188
  );
2189
2189
  return {
@@ -2195,8 +2195,8 @@ var createEmailAgentWebhookHandler = async (args) => {
2195
2195
  ]
2196
2196
  };
2197
2197
  };
2198
- var createExtractorWebhookHandler = async (args) => {
2199
- const res = await createExtractorWebhook(args.pathParams.id, args.bodyParams);
2198
+ var listInboxWebhooksHandler = async (args) => {
2199
+ const res = await listInboxWebhooks(args.pathParams.inboxId);
2200
2200
  return {
2201
2201
  content: [
2202
2202
  {
@@ -2206,8 +2206,8 @@ var createExtractorWebhookHandler = async (args) => {
2206
2206
  ]
2207
2207
  };
2208
2208
  };
2209
- var listWebhooksHandler = async (args) => {
2210
- const res = await listWebhooks(args.pathParams.id);
2209
+ var createExtractorWebhookHandler = async (args) => {
2210
+ const res = await createExtractorWebhook(args.pathParams.id, args.bodyParams);
2211
2211
  return {
2212
2212
  content: [
2213
2213
  {
@@ -2217,8 +2217,8 @@ var listWebhooksHandler = async (args) => {
2217
2217
  ]
2218
2218
  };
2219
2219
  };
2220
- var deleteWebhookHandler = async (args) => {
2221
- const res = await deleteWebhook(args.pathParams.id);
2220
+ var listWebhooksHandler = async (args) => {
2221
+ const res = await listWebhooks(args.pathParams.id);
2222
2222
  return {
2223
2223
  content: [
2224
2224
  {
@@ -2228,8 +2228,8 @@ var deleteWebhookHandler = async (args) => {
2228
2228
  ]
2229
2229
  };
2230
2230
  };
2231
- var getWebhookHandler = async (args) => {
2232
- const res = await getWebhook(args.pathParams.id);
2231
+ var deleteWebhookHandler = async (args) => {
2232
+ const res = await deleteWebhook(args.pathParams.id);
2233
2233
  return {
2234
2234
  content: [
2235
2235
  {
@@ -2239,8 +2239,8 @@ var getWebhookHandler = async (args) => {
2239
2239
  ]
2240
2240
  };
2241
2241
  };
2242
- var listInboxWebhooksHandler = async (args) => {
2243
- const res = await listInboxWebhooks(args.pathParams.inboxId);
2242
+ var getWebhookHandler = async (args) => {
2243
+ const res = await getWebhook(args.pathParams.id);
2244
2244
  return {
2245
2245
  content: [
2246
2246
  {
@@ -3124,7 +3124,8 @@ var getCallAnalyticsQueryTimezoneDefault = `UTC`;
3124
3124
  var GetCallAnalyticsQueryParams = zod.object({
3125
3125
  from: zod.string(),
3126
3126
  to: zod.string(),
3127
- timezone: zod.string().default(getCallAnalyticsQueryTimezoneDefault)
3127
+ timezone: zod.string().default(getCallAnalyticsQueryTimezoneDefault),
3128
+ agent_ids: zod.string().optional()
3128
3129
  });
3129
3130
  var GetCallAnalyticsResponse = zod.object({
3130
3131
  summary: zod.object({
@@ -3850,7 +3851,7 @@ var ListAgentWebhooksResponse = zod.array(
3850
3851
  ListAgentWebhooksResponseItem
3851
3852
  );
3852
3853
  var CreateEmailAgentWebhookParams = zod.object({
3853
- id: zod.string().min(1)
3854
+ inboxId: zod.string().min(1)
3854
3855
  });
3855
3856
  var createEmailAgentWebhookBodyNameMax = 256;
3856
3857
  var createEmailAgentWebhookBodyUrlMax = 2048;
@@ -3890,6 +3891,33 @@ var CreateEmailAgentWebhookResponse = zod.object({
3890
3891
  created_at: zod.string().datetime({}),
3891
3892
  updated_at: zod.string().datetime({})
3892
3893
  });
3894
+ var ListInboxWebhooksParams = zod.object({
3895
+ inboxId: zod.string().min(1)
3896
+ });
3897
+ var ListInboxWebhooksResponseItem = zod.object({
3898
+ id: zod.string(),
3899
+ scope: zod.union([
3900
+ zod.object({
3901
+ extractor_id: zod.string()
3902
+ }),
3903
+ zod.object({
3904
+ call_agent_id: zod.string()
3905
+ }),
3906
+ zod.object({
3907
+ email_agent_id: zod.string()
3908
+ })
3909
+ ]),
3910
+ name: zod.string(),
3911
+ url: zod.string(),
3912
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3913
+ has_auth: zod.boolean(),
3914
+ enabled: zod.boolean(),
3915
+ created_at: zod.string().datetime({}),
3916
+ updated_at: zod.string().datetime({})
3917
+ });
3918
+ var ListInboxWebhooksResponse = zod.array(
3919
+ ListInboxWebhooksResponseItem
3920
+ );
3893
3921
  var CreateExtractorWebhookParams = zod.object({
3894
3922
  id: zod.string().min(1)
3895
3923
  });
@@ -3984,33 +4012,6 @@ var GetWebhookResponse = zod.object({
3984
4012
  created_at: zod.string().datetime({}),
3985
4013
  updated_at: zod.string().datetime({})
3986
4014
  });
3987
- var ListInboxWebhooksParams = zod.object({
3988
- inboxId: zod.string().min(1)
3989
- });
3990
- var ListInboxWebhooksResponseItem = zod.object({
3991
- id: zod.string(),
3992
- scope: zod.union([
3993
- zod.object({
3994
- extractor_id: zod.string()
3995
- }),
3996
- zod.object({
3997
- call_agent_id: zod.string()
3998
- }),
3999
- zod.object({
4000
- email_agent_id: zod.string()
4001
- })
4002
- ]),
4003
- name: zod.string(),
4004
- url: zod.string(),
4005
- auth_header_name: zod.union([zod.string(), zod.null()]),
4006
- has_auth: zod.boolean(),
4007
- enabled: zod.boolean(),
4008
- created_at: zod.string().datetime({}),
4009
- updated_at: zod.string().datetime({})
4010
- });
4011
- var ListInboxWebhooksResponse = zod.array(
4012
- ListInboxWebhooksResponseItem
4013
- );
4014
4015
  var ListWebhookDeliveriesParams = zod.object({
4015
4016
  id: zod.string().min(1)
4016
4017
  });
@@ -4568,13 +4569,21 @@ server.tool(
4568
4569
  );
4569
4570
  server.tool(
4570
4571
  "createEmailAgentWebhook",
4571
- "Create email agent webhook",
4572
+ "Create inbox webhook",
4572
4573
  {
4573
4574
  pathParams: CreateEmailAgentWebhookParams,
4574
4575
  bodyParams: CreateEmailAgentWebhookBody
4575
4576
  },
4576
4577
  createEmailAgentWebhookHandler
4577
4578
  );
4579
+ server.tool(
4580
+ "listInboxWebhooks",
4581
+ "List inbox webhooks",
4582
+ {
4583
+ pathParams: ListInboxWebhooksParams
4584
+ },
4585
+ listInboxWebhooksHandler
4586
+ );
4578
4587
  server.tool(
4579
4588
  "createExtractorWebhook",
4580
4589
  "Create extractor webhook",
@@ -4608,14 +4617,6 @@ server.tool(
4608
4617
  },
4609
4618
  getWebhookHandler
4610
4619
  );
4611
- server.tool(
4612
- "listInboxWebhooks",
4613
- "List inbox webhooks",
4614
- {
4615
- pathParams: ListInboxWebhooksParams
4616
- },
4617
- listInboxWebhooksHandler
4618
- );
4619
4620
  server.tool(
4620
4621
  "listWebhookDeliveries",
4621
4622
  "List webhook deliveries",
@@ -4637,4 +4638,4 @@ var transport = new StdioServerTransport();
4637
4638
  server.connect(transport).then(() => {
4638
4639
  console.error("MCP server running on stdio");
4639
4640
  }).catch(console.error);
4640
- //# sourceMappingURL=server-AKPXEANM.js.map
4641
+ //# sourceMappingURL=server-5FCFDGUN.js.map