@opencx/mcp 1.15.76 → 1.15.78
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/create-server-options.spec.js +19 -0
- package/dist/create-server-options.spec.js.map +1 -1
- package/dist/http.d.ts +3 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +6 -2
- package/dist/http.js.map +1 -1
- package/dist/integrations.d.ts +7 -0
- package/dist/integrations.d.ts.map +1 -0
- package/dist/integrations.js +18 -0
- package/dist/integrations.js.map +1 -0
- package/dist/salesforce-ai-reply-templates.spec.js +4 -1
- package/dist/salesforce-ai-reply-templates.spec.js.map +1 -1
- package/dist/schema.d.ts +8990 -6469
- package/dist/schema.d.ts.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +27 -2
- package/dist/server.js.map +1 -1
- package/dist/tool-annotations.spec.js +5 -1
- package/dist/tool-annotations.spec.js.map +1 -1
- package/dist/tools/dynamics365-integration.d.ts +4 -0
- package/dist/tools/dynamics365-integration.d.ts.map +1 -0
- package/dist/tools/dynamics365-integration.js +45 -0
- package/dist/tools/dynamics365-integration.js.map +1 -0
- package/dist/tools/email.d.ts.map +1 -1
- package/dist/tools/email.js +24 -0
- package/dist/tools/email.js.map +1 -1
- package/dist/tools/freshchat-integration.d.ts +4 -0
- package/dist/tools/freshchat-integration.d.ts.map +1 -0
- package/dist/tools/freshchat-integration.js +54 -0
- package/dist/tools/freshchat-integration.js.map +1 -0
- package/dist/tools/freshdesk-integration.d.ts +4 -0
- package/dist/tools/freshdesk-integration.d.ts.map +1 -0
- package/dist/tools/freshdesk-integration.js +68 -0
- package/dist/tools/freshdesk-integration.js.map +1 -0
- package/dist/tools/front-integration.d.ts +4 -0
- package/dist/tools/front-integration.d.ts.map +1 -0
- package/dist/tools/front-integration.js +52 -0
- package/dist/tools/front-integration.js.map +1 -0
- package/dist/tools/gorgias-integration.d.ts +4 -0
- package/dist/tools/gorgias-integration.d.ts.map +1 -0
- package/dist/tools/gorgias-integration.js +24 -0
- package/dist/tools/gorgias-integration.js.map +1 -0
- package/dist/tools/hubspot-integration.d.ts +4 -0
- package/dist/tools/hubspot-integration.d.ts.map +1 -0
- package/dist/tools/hubspot-integration.js +50 -0
- package/dist/tools/hubspot-integration.js.map +1 -0
- package/dist/tools/infobip-integration.d.ts +4 -0
- package/dist/tools/infobip-integration.d.ts.map +1 -0
- package/dist/tools/infobip-integration.js +68 -0
- package/dist/tools/infobip-integration.js.map +1 -0
- package/dist/tools/intercom-integration.d.ts +4 -0
- package/dist/tools/intercom-integration.d.ts.map +1 -0
- package/dist/tools/intercom-integration.js +74 -0
- package/dist/tools/intercom-integration.js.map +1 -0
- package/dist/tools/macros.d.ts.map +1 -1
- package/dist/tools/macros.js +9 -1
- package/dist/tools/macros.js.map +1 -1
- package/dist/tools/salesforce-integration.d.ts +4 -0
- package/dist/tools/salesforce-integration.d.ts.map +1 -0
- package/dist/tools/salesforce-integration.js +65 -0
- package/dist/tools/salesforce-integration.js.map +1 -0
- package/dist/tools/twilio-flex-integration.d.ts +4 -0
- package/dist/tools/twilio-flex-integration.d.ts.map +1 -0
- package/dist/tools/twilio-flex-integration.js +44 -0
- package/dist/tools/twilio-flex-integration.js.map +1 -0
- package/dist/tools/zendesk-integration.d.ts +4 -0
- package/dist/tools/zendesk-integration.d.ts.map +1 -0
- package/dist/tools/zendesk-integration.js +65 -0
- package/dist/tools/zendesk-integration.js.map +1 -0
- package/package.json +5 -1
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { CompanionIntegration } from './integrations.js';
|
|
2
3
|
export interface CreateServerOptions {
|
|
3
4
|
/** Forwarded as `x-opencx-coworker-session-id` on every API call (companion attribution). */
|
|
4
5
|
coworkerSessionId?: string;
|
|
@@ -8,6 +9,11 @@ export interface CreateServerOptions {
|
|
|
8
9
|
* it per caller (see registerFirecrawlTools).
|
|
9
10
|
*/
|
|
10
11
|
firecrawlApiKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Ticketing integrations the org has connected; only their tools are
|
|
14
|
+
* registered. Omitted = none (a caller that can't know never exposes them).
|
|
15
|
+
*/
|
|
16
|
+
connectedIntegrations?: readonly CompanionIntegration[];
|
|
11
17
|
}
|
|
12
18
|
export declare function createServer(apiKey: string, baseUrl: string, options?: CreateServerOptions): McpServer;
|
|
13
19
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA4DpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AA8B9D,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACzD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,mBAAwB,GAChC,SAAS,CA0EX"}
|
package/dist/server.js
CHANGED
|
@@ -23,7 +23,6 @@ import { registerEmailTools } from './tools/email.js';
|
|
|
23
23
|
import { registerEmailTemplateTools } from './tools/email-templates.js';
|
|
24
24
|
import { registerMacroTools } from './tools/macros.js';
|
|
25
25
|
import { registerSessionSidebarTools } from './tools/session-sidebar.js';
|
|
26
|
-
import { registerSalesforceAiReplyTemplateTools } from './tools/salesforce-ai-reply-templates.js';
|
|
27
26
|
import { registerPhoneTools } from './tools/phone.js';
|
|
28
27
|
import { registerOrgTools } from './tools/org.js';
|
|
29
28
|
import { registerSearchTools } from './tools/search.js';
|
|
@@ -60,6 +59,30 @@ import { registerFollowUpTools } from './tools/follow-ups.js';
|
|
|
60
59
|
import { registerTodoTools } from './tools/todos.js';
|
|
61
60
|
import { registerOnboardingTools } from './tools/onboarding.js';
|
|
62
61
|
import { registerFirecrawlTools } from './tools/firecrawl.js';
|
|
62
|
+
import { registerZendeskIntegrationTools } from './tools/zendesk-integration.js';
|
|
63
|
+
import { registerHubspotIntegrationTools } from './tools/hubspot-integration.js';
|
|
64
|
+
import { registerSalesforceIntegrationTools } from './tools/salesforce-integration.js';
|
|
65
|
+
import { registerFreshdeskIntegrationTools } from './tools/freshdesk-integration.js';
|
|
66
|
+
import { registerFreshchatIntegrationTools } from './tools/freshchat-integration.js';
|
|
67
|
+
import { registerGorgiasIntegrationTools } from './tools/gorgias-integration.js';
|
|
68
|
+
import { registerIntercomIntegrationTools } from './tools/intercom-integration.js';
|
|
69
|
+
import { registerDynamics365IntegrationTools } from './tools/dynamics365-integration.js';
|
|
70
|
+
import { registerTwilioFlexIntegrationTools } from './tools/twilio-flex-integration.js';
|
|
71
|
+
import { registerFrontIntegrationTools } from './tools/front-integration.js';
|
|
72
|
+
import { registerInfobipIntegrationTools } from './tools/infobip-integration.js';
|
|
73
|
+
const INTEGRATION_TOOL_REGISTRARS = {
|
|
74
|
+
zendesk: registerZendeskIntegrationTools,
|
|
75
|
+
hubspot: registerHubspotIntegrationTools,
|
|
76
|
+
salesforce: registerSalesforceIntegrationTools,
|
|
77
|
+
freshdesk: registerFreshdeskIntegrationTools,
|
|
78
|
+
freshchat: registerFreshchatIntegrationTools,
|
|
79
|
+
gorgias: registerGorgiasIntegrationTools,
|
|
80
|
+
intercom: registerIntercomIntegrationTools,
|
|
81
|
+
dynamics365: registerDynamics365IntegrationTools,
|
|
82
|
+
twilio_flex: registerTwilioFlexIntegrationTools,
|
|
83
|
+
front: registerFrontIntegrationTools,
|
|
84
|
+
infobip: registerInfobipIntegrationTools,
|
|
85
|
+
};
|
|
63
86
|
export function createServer(apiKey, baseUrl, options = {}) {
|
|
64
87
|
const server = new McpServer({
|
|
65
88
|
name: 'OpenCX',
|
|
@@ -89,7 +112,6 @@ export function createServer(apiKey, baseUrl, options = {}) {
|
|
|
89
112
|
registerEmailTemplateTools(server, client);
|
|
90
113
|
registerMacroTools(server, client);
|
|
91
114
|
registerSessionSidebarTools(server, client);
|
|
92
|
-
registerSalesforceAiReplyTemplateTools(server, client);
|
|
93
115
|
registerPhoneTools(server, client);
|
|
94
116
|
registerOrgTools(server, client);
|
|
95
117
|
registerSearchTools(server, client);
|
|
@@ -128,6 +150,9 @@ export function createServer(apiKey, baseUrl, options = {}) {
|
|
|
128
150
|
registerTodoTools(server, client);
|
|
129
151
|
registerOnboardingTools(server, client);
|
|
130
152
|
registerFirecrawlTools(server, { apiKey: options.firecrawlApiKey });
|
|
153
|
+
for (const integration of options.connectedIntegrations ?? []) {
|
|
154
|
+
INTEGRATION_TOOL_REGISTRARS[integration](server, client);
|
|
155
|
+
}
|
|
131
156
|
return server;
|
|
132
157
|
}
|
|
133
158
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,q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AM,CAAC,CAAC;IACxC,sBAAsB,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACpE,KAAK,MAAM,WAAW,IAAI,OAAO,CAAC,qBAAqB,IAAI,EAAE,EAAE,CAAC;QAC9D,2BAA2B,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { connectInMemory } from './spec-helpers.js';
|
|
3
|
+
import { COMPANION_INTEGRATIONS } from './integrations.js';
|
|
3
4
|
describe('tool annotations', () => {
|
|
4
5
|
it('every tool carries a title and exactly one access hint', async () => {
|
|
5
|
-
const { client, cleanup } = await connectInMemory({
|
|
6
|
+
const { client, cleanup } = await connectInMemory({
|
|
7
|
+
firecrawlApiKey: 'firecrawl-key',
|
|
8
|
+
connectedIntegrations: COMPANION_INTEGRATIONS,
|
|
9
|
+
});
|
|
6
10
|
try {
|
|
7
11
|
const { tools } = await client.listTools();
|
|
8
12
|
const names = tools.map((t) => t.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-annotations.spec.js","sourceRoot":"","sources":["../src/tool-annotations.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-annotations.spec.js","sourceRoot":"","sources":["../src/tool-annotations.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,M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CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC9B,CAAC;gBAAS,CAAC;YACT,MAAM,OAAO,EAAE,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerDynamics365IntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=dynamics365-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamics365-integration.d.ts","sourceRoot":"","sources":["../../src/tools/dynamics365-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA6D1F"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerDynamics365IntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_dynamics365_settings', {
|
|
6
|
+
description: 'Read the Dynamics 365 integration settings: tenant, client id, environment URL and the defaults applied to tickets created from sessions (owner, queue, priority). The client secret is never returned.',
|
|
7
|
+
annotations: { title: 'Get Dynamics 365 settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/dynamics365/settings')).data));
|
|
9
|
+
server.registerTool('update_dynamics365_settings', {
|
|
10
|
+
description: 'Change the defaults applied to tickets created in Dynamics 365. Only the fields you pass change; null clears one. Credentials cannot be changed here — the user reconnects in Settings → Integrations.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
default_owner_id: z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.nullable()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Dynamics 365 user id that owns new tickets (from list_dynamics365_owners)'),
|
|
18
|
+
default_queue_id: z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.nullable()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('Dynamics 365 queue id new tickets go to (from list_dynamics365_queues)'),
|
|
24
|
+
default_priority: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.nullable()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Priority code set on new tickets (Dynamics default: 1 High, 2 Normal, 3 Low)'),
|
|
30
|
+
},
|
|
31
|
+
annotations: { title: 'Update Dynamics 365 settings', destructiveHint: false },
|
|
32
|
+
}, async (args) => {
|
|
33
|
+
const body = args;
|
|
34
|
+
return jsonContent((await client.PATCH('/integrations/dynamics365/settings', { body })).data);
|
|
35
|
+
});
|
|
36
|
+
server.registerTool('list_dynamics365_queues', {
|
|
37
|
+
description: 'List the queues in the connected Dynamics 365 environment (id + name).',
|
|
38
|
+
annotations: { title: 'List Dynamics 365 queues', readOnlyHint: true },
|
|
39
|
+
}, async () => jsonContent((await client.GET('/integrations/dynamics365/queues')).data));
|
|
40
|
+
server.registerTool('list_dynamics365_owners', {
|
|
41
|
+
description: 'List the users in the connected Dynamics 365 environment (id + name).',
|
|
42
|
+
annotations: { title: 'List Dynamics 365 users', readOnlyHint: true },
|
|
43
|
+
}, async () => jsonContent((await client.GET('/integrations/dynamics365/owners')).data));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=dynamics365-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamics365-integration.js","sourceRoot":"","sources":["../../src/tools/dynamics365-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAA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IAEF,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,WAAW,EAAE,wEAAwE;QACrF,WAAW,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,IAAI,EAAE;KACvE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC,CAAC,IAAI,CAAC,CACrF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,WAAW,EAAE,uEAAuE;QACpF,WAAW,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,IAAI,EAAE;KACtE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC,CAAC,IAAI,CAAC,CACrF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA0KzE"}
|
package/dist/tools/email.js
CHANGED
|
@@ -95,5 +95,29 @@ export function registerEmailTools(server, client) {
|
|
|
95
95
|
})).data;
|
|
96
96
|
return jsonContent(data);
|
|
97
97
|
});
|
|
98
|
+
server.registerTool('list_email_channels', {
|
|
99
|
+
description: "List the organization's email inboxes (channels) with the HTML template (html_template) that wraps every reply sent from each. A null html_template means the built-in default template. sender_signature is a legacy read-only signature appended only while the inbox uses the default template: carry it into a new custom template, or it stops appearing. Always call this before update_email_channel_template so you edit the current version. Load the `email-templates` skill for the variables a template supports.",
|
|
100
|
+
annotations: { title: 'List email channels', readOnlyHint: true },
|
|
101
|
+
}, async () => {
|
|
102
|
+
const data = (await client.GET('/email/channels')).data;
|
|
103
|
+
return jsonContent(data);
|
|
104
|
+
});
|
|
105
|
+
server.registerTool('update_email_channel_template', {
|
|
106
|
+
description: "Set one email inbox's HTML template, which wraps every reply sent from it — the place for per-agent sign-offs. html_template MUST contain {{content}} or the save is rejected with 400; null or an empty string resets to the built-in default. Every reply from the inbox uses the new version immediately. Show the user the full draft and get an explicit go before saving, and never reset a template unless explicitly asked. Load the `email-templates` skill first for the available variables.",
|
|
107
|
+
inputSchema: {
|
|
108
|
+
email_channel_id: z.string().describe('Email channel id from list_email_channels'),
|
|
109
|
+
html_template: z
|
|
110
|
+
.string()
|
|
111
|
+
.nullable()
|
|
112
|
+
.describe('Full HTML wrapping every reply. Must contain {{content}}. Optional: {{ticket_number}}, {{zendesk_ticket_id}}, {{session.language}}, {{agent_name}}, {{agent_title}}, {{agent_email}}, {{quoted_content}}. null/empty resets to the default template.'),
|
|
113
|
+
},
|
|
114
|
+
annotations: { title: 'Update email channel template', destructiveHint: true },
|
|
115
|
+
}, async ({ email_channel_id, html_template }) => {
|
|
116
|
+
const data = (await client.PATCH('/email/channels/{emailChannelId}', {
|
|
117
|
+
params: { path: { emailChannelId: email_channel_id } },
|
|
118
|
+
body: { html_template },
|
|
119
|
+
})).data;
|
|
120
|
+
return jsonContent(data);
|
|
121
|
+
});
|
|
98
122
|
}
|
|
99
123
|
//# sourceMappingURL=email.js.map
|
package/dist/tools/email.js.map
CHANGED
|
@@ -1 +1 @@
|
|
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CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC;QACxD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,+BAA+B,EAC/B;QACE,WAAW,EACT,yeAAye;QAC3e,WAAW,EAAE;YACX,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;YAClF,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,sPAAsP,CACvP;SACJ;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,+BAA+B,EAAE,eAAe,EAAE,IAAI,EAAE;KAC/E,EACD,KAAK,EAAE,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,CACX,MAAM,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE;YACrD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE;YACtD,IAAI,EAAE,EAAE,aAAa,EAAE;SACxB,CAAC,CACH,CAAC,IAAI,CAAC;QACP,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerFreshchatIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=freshchat-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshchat-integration.d.ts","sourceRoot":"","sources":["../../src/tools/freshchat-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QAyExF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerFreshchatIntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_freshchat_settings', {
|
|
6
|
+
description: 'Get the Freshchat integration settings: the agent the AI acts as, whether it handles every conversation, and where handoffs go. The access token is never returned; connected:false means Freshchat is not connected.',
|
|
7
|
+
annotations: { title: 'Get Freshchat settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/freshchat/settings')).data));
|
|
9
|
+
server.registerTool('update_freshchat_settings', {
|
|
10
|
+
description: 'Change Freshchat integration settings. Pass only the fields to change; the rest stay as they are. assign_to_agent needs handoff_agent_email (not the AI agent), assign_to_group needs handoff_group_id (see list_freshchat_groups). The access token and domain cannot be changed here.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
default_agent_email: z
|
|
13
|
+
.string()
|
|
14
|
+
.email()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Freshchat agent the AI acts as: conversations assigned to it are handled by the AI'),
|
|
17
|
+
enabled: z.boolean().optional().describe('false pauses the integration'),
|
|
18
|
+
auto_handle_all_incoming_chats: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('true = the AI handles every incoming conversation, not only those assigned to its agent'),
|
|
22
|
+
handoff_behavior: z
|
|
23
|
+
.enum(['unassign', 'freshchat_automation', 'assign_to_agent', 'assign_to_group'])
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('On handoff: unassign (back to the queue), freshchat_automation (Freshchat assignment rules decide), assign_to_agent, assign_to_group'),
|
|
26
|
+
handoff_agent_email: z
|
|
27
|
+
.string()
|
|
28
|
+
.email()
|
|
29
|
+
.nullable()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('Agent that receives handoffs'),
|
|
32
|
+
handoff_group_id: z
|
|
33
|
+
.string()
|
|
34
|
+
.min(1)
|
|
35
|
+
.nullable()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Group that receives handoffs'),
|
|
38
|
+
handoff_marker_property_name: z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Custom conversation property set to true on handoff (default cf_opencx_handed_off)'),
|
|
43
|
+
},
|
|
44
|
+
annotations: { title: 'Update Freshchat settings', destructiveHint: true },
|
|
45
|
+
}, async (args) => {
|
|
46
|
+
const body = args;
|
|
47
|
+
return jsonContent((await client.PATCH('/integrations/freshchat/settings', { body })).data);
|
|
48
|
+
});
|
|
49
|
+
server.registerTool('list_freshchat_groups', {
|
|
50
|
+
description: 'List the Freshchat groups (id, name) to pick the handoff group.',
|
|
51
|
+
annotations: { title: 'List Freshchat groups', readOnlyHint: true },
|
|
52
|
+
}, async () => jsonContent((await client.GET('/integrations/freshchat/groups')).data));
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=freshchat-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshchat-integration.js","sourceRoot":"","sources":["../../src/tools/freshchat-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,+EAA+E;AAC/E,MAAM,UAAU,iCAAiC,CAAC,MAAiB,EAAE,MAAoB;IACvF,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,WAAW,EACT,uNAAuN;QACzN,WAAW,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,IAAI,EAAE;KACrE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAA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W,CAAC,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9F,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,IAAI,EAAE;KACpE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC,IAAI,CAAC,CACnF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerFreshdeskIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=freshdesk-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshdesk-integration.d.ts","sourceRoot":"","sources":["../../src/tools/freshdesk-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA4FxF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerFreshdeskIntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_freshdesk_settings', {
|
|
6
|
+
description: 'Get the Freshdesk integration settings: which tickets the AI handles, where handoffs go, extra AI agents and the assist-mode note footer. The API key is never returned; connected:false means Freshdesk is not connected.',
|
|
7
|
+
annotations: { title: 'Get Freshdesk settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/freshdesk/settings')).data));
|
|
9
|
+
server.registerTool('update_freshdesk_settings', {
|
|
10
|
+
description: 'Change Freshdesk integration settings. Pass only the fields to change; the rest stay as they are. Saved like the dashboard: the connection is re-checked and setup issues (e.g. a missing handoff marker field) come back in warnings. assign_to_agent needs handoff_agent_id, assign_to_group needs handoff_group_id. The domain and API key cannot be changed here.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
auto_handle_all_incoming_chats: z
|
|
13
|
+
.boolean()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('true = the AI handles every new ticket; false = only tickets assigned to its agent or default_group_id'),
|
|
16
|
+
default_group_id: z
|
|
17
|
+
.string()
|
|
18
|
+
.min(1)
|
|
19
|
+
.nullable()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Group whose tickets the AI handles when not handling all (see list_freshdesk_groups); null = none'),
|
|
22
|
+
handoff_behavior: z
|
|
23
|
+
.enum(['unassign', 'freshdesk_automation', 'assign_to_agent', 'assign_to_group'])
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('On handoff: unassign, freshdesk_automation (Freshdesk rules decide), assign_to_agent (handoff_agent_id), assign_to_group (handoff_group_id)'),
|
|
26
|
+
handoff_agent_id: z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.nullable()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('Agent that receives handoffs (see list_freshdesk_agents)'),
|
|
32
|
+
handoff_group_id: z
|
|
33
|
+
.string()
|
|
34
|
+
.min(1)
|
|
35
|
+
.nullable()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Group that receives handoffs'),
|
|
38
|
+
handoff_marker_property_name: z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Custom checkbox ticket field (cf_ name) set to true on handoff'),
|
|
43
|
+
assist_mode_footer_message: z
|
|
44
|
+
.string()
|
|
45
|
+
.nullable()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('Footer added to the private notes the AI leaves in assist mode; null = none'),
|
|
48
|
+
ai_agent_ids: z
|
|
49
|
+
.array(z.string().regex(/^\d+$/))
|
|
50
|
+
.max(25)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Extra Freshdesk agent ids the AI also acts as (replaces the list; [] clears)'),
|
|
53
|
+
},
|
|
54
|
+
annotations: { title: 'Update Freshdesk settings', destructiveHint: true },
|
|
55
|
+
}, async (args) => {
|
|
56
|
+
const body = args;
|
|
57
|
+
return jsonContent((await client.PATCH('/integrations/freshdesk/settings', { body })).data);
|
|
58
|
+
});
|
|
59
|
+
server.registerTool('list_freshdesk_groups', {
|
|
60
|
+
description: 'List the Freshdesk groups (id, name, auto-assignment) to pick the default or handoff group.',
|
|
61
|
+
annotations: { title: 'List Freshdesk groups', readOnlyHint: true },
|
|
62
|
+
}, async () => jsonContent((await client.GET('/integrations/freshdesk/groups')).data));
|
|
63
|
+
server.registerTool('list_freshdesk_agents', {
|
|
64
|
+
description: 'List the Freshdesk agents other than the AI agent (id, name, email) to pick the handoff agent or extra AI agent ids.',
|
|
65
|
+
annotations: { title: 'List Freshdesk agents', readOnlyHint: true },
|
|
66
|
+
}, async () => jsonContent((await client.GET('/integrations/freshdesk/agents')).data));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=freshdesk-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshdesk-integration.js","sourceRoot":"","sources":["../../src/tools/freshdesk-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,+EAA+E;AAC/E,MAAM,UAAU,iCAAiC,CAAC,MAAiB,EAAE,MAAoB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cp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerFrontIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=front-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"front-integration.d.ts","sourceRoot":"","sources":["../../src/tools/front-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA4EpF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerFrontIntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_front_settings', {
|
|
6
|
+
description: 'Read the Front integration settings: AI teammate, handoff inbox, signature and reply toggles. The API token is never returned.',
|
|
7
|
+
annotations: { title: 'Get Front settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/front/settings')).data));
|
|
9
|
+
server.registerTool('update_front_settings', {
|
|
10
|
+
description: 'Change Front integration settings. Only the fields you pass change. The API token cannot be changed here — the user reconnects in Settings → Integrations.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
default_teammate_id: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('Front teammate the AI acts as; conversations assigned to it get AI replies (from list_front_teammates)'),
|
|
16
|
+
handoff_inbox_id: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Inbox conversations move to on handoff to a human (from list_front_inboxes)'),
|
|
20
|
+
signature_id: z
|
|
21
|
+
.string()
|
|
22
|
+
.nullable()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Signature on AI email replies (from list_front_signatures); null = none'),
|
|
25
|
+
handle_unassigned: z
|
|
26
|
+
.boolean()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('AI also replies to unassigned conversations'),
|
|
29
|
+
process_on_assignment: z
|
|
30
|
+
.boolean()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe('Assigning a conversation to the AI teammate triggers an AI reply'),
|
|
33
|
+
},
|
|
34
|
+
annotations: { title: 'Update Front settings', destructiveHint: false },
|
|
35
|
+
}, async (args) => {
|
|
36
|
+
const body = args;
|
|
37
|
+
return jsonContent((await client.PATCH('/integrations/front/settings', { body })).data);
|
|
38
|
+
});
|
|
39
|
+
server.registerTool('list_front_teammates', {
|
|
40
|
+
description: 'List the teammates of the connected Front account (id, email, name).',
|
|
41
|
+
annotations: { title: 'List Front teammates', readOnlyHint: true },
|
|
42
|
+
}, async () => jsonContent((await client.GET('/integrations/front/teammates')).data));
|
|
43
|
+
server.registerTool('list_front_inboxes', {
|
|
44
|
+
description: 'List the inboxes of the connected Front account (id, name).',
|
|
45
|
+
annotations: { title: 'List Front inboxes', readOnlyHint: true },
|
|
46
|
+
}, async () => jsonContent((await client.GET('/integrations/front/inboxes')).data));
|
|
47
|
+
server.registerTool('list_front_signatures', {
|
|
48
|
+
description: 'List the signatures available to the AI teammate. Fails until default_teammate_id is set.',
|
|
49
|
+
annotations: { title: 'List Front signatures', readOnlyHint: true },
|
|
50
|
+
}, async () => jsonContent((await client.GET('/integrations/front/signatures')).data));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=front-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"front-integration.js","sourceRoot":"","sources":["../../src/tools/front-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,+EAA+E;AAC/E,MAAM,UAAU,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AC,YAAY,CACjB,sBAAsB,EACtB;QACE,WAAW,EAAE,sEAAsE;QACnF,WAAW,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,IAAI,EAAE;KACnE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC,CAAC,IAAI,CAAC,CAClF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,WAAW,EAAE,6DAA6D;QAC1E,WAAW,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,IAAI,EAAE;KACjE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC,IAAI,CAAC,CAChF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,WAAW,EACT,2FAA2F;QAC7F,WAAW,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,IAAI,EAAE;KACpE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC,IAAI,CAAC,CACnF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerGorgiasIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=gorgias-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gorgias-integration.d.ts","sourceRoot":"","sources":["../../src/tools/gorgias-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA8BtF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerGorgiasIntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_gorgias_settings', {
|
|
6
|
+
description: 'Get the Gorgias integration settings: the domain prefix and the Gorgias user tickets are assigned to. The API key is never returned; connected:false means Gorgias is not connected.',
|
|
7
|
+
annotations: { title: 'Get Gorgias settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/gorgias/settings')).data));
|
|
9
|
+
server.registerTool('update_gorgias_settings', {
|
|
10
|
+
description: 'Change the Gorgias user OpenCX assigns tickets to. The API key and domain cannot be changed here (the dashboard connects Gorgias).',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
default_user_id: z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Gorgias user id that tickets are assigned to'),
|
|
17
|
+
},
|
|
18
|
+
annotations: { title: 'Update Gorgias settings', destructiveHint: true },
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const body = args;
|
|
21
|
+
return jsonContent((await client.PATCH('/integrations/gorgias/settings', { body })).data);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=gorgias-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gorgias-integration.js","sourceRoot":"","sources":["../../src/tools/gorgias-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,+EAA+E;AAC/E,MAAM,UAAU,+BAA+B,CAAC,MAAiB,EAAE,MAAoB;IACrF,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,WAAW,EACT,sLAAsL;QACxL,WAAW,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,IAAI,EAAE;KACnE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC,IAAI,CAAC,CACnF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,WAAW,EACT,oIAAoI;QACtI,WAAW,EAAE;YACX,eAAe,EAAE,CAAC;iBACf,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,EAAE;iBACV,QAAQ,CAAC,8CAA8C,CAAC;SAC5D;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,IAAI,EAAE;KACzE,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,IAAI,GAAe,IAAI,CAAC;QAC9B,OAAO,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC5F,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerHubspotIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=hubspot-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubspot-integration.d.ts","sourceRoot":"","sources":["../../src/tools/hubspot-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA8DtF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jsonContent } from '../api-client.js';
|
|
3
|
+
// Registered by createServer only when the org has this integration connected.
|
|
4
|
+
export function registerHubspotIntegrationTools(server, client) {
|
|
5
|
+
server.registerTool('get_hubspot_settings', {
|
|
6
|
+
description: "Get the HubSpot integration settings: the AI's seat user, who handed-off conversations are assigned to, reply-all, the close stage and the handoff comment. Credentials are never returned; connected:false means HubSpot is not connected.",
|
|
7
|
+
annotations: { title: 'Get HubSpot settings', readOnlyHint: true },
|
|
8
|
+
}, async () => jsonContent((await client.GET('/integrations/hubspot/settings')).data));
|
|
9
|
+
server.registerTool('update_hubspot_settings', {
|
|
10
|
+
description: 'Change HubSpot integration settings. Pass only the fields to change. User ids come from list_hubspot_owners.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
default_user_id: z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('HubSpot user the AI acts as; conversations the AI owns move to this user'),
|
|
17
|
+
handoff_assignment_type: z
|
|
18
|
+
.enum(['unassigned', 'assign_to_user', 'leave_unchanged'])
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('After handoff: unassigned = clear the owner, assign_to_user = give it to handoff_user_id, leave_unchanged = keep the owner'),
|
|
21
|
+
handoff_user_id: z
|
|
22
|
+
.string()
|
|
23
|
+
.nullable()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('HubSpot user handed-off conversations go to; required with assign_to_user'),
|
|
26
|
+
ai_reply_to_all_enabled: z
|
|
27
|
+
.boolean()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('true = AI email replies go to everyone on the thread, not just the sender'),
|
|
30
|
+
close_ticket_stage_id: z
|
|
31
|
+
.string()
|
|
32
|
+
.nullable()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Ticket pipeline stage id used when a session closes; null = the pipeline default'),
|
|
35
|
+
post_handoff_note: z
|
|
36
|
+
.boolean()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('true = a handoff posts a summary comment in HubSpot'),
|
|
39
|
+
},
|
|
40
|
+
annotations: { title: 'Update HubSpot settings', destructiveHint: true },
|
|
41
|
+
}, async (input) => {
|
|
42
|
+
const body = input;
|
|
43
|
+
return jsonContent((await client.PATCH('/integrations/hubspot/settings', { body })).data);
|
|
44
|
+
});
|
|
45
|
+
server.registerTool('list_hubspot_owners', {
|
|
46
|
+
description: 'List the users of the connected HubSpot account (user_id, name, email) — the valid values for default_user_id and handoff_user_id.',
|
|
47
|
+
annotations: { title: 'List HubSpot users', readOnlyHint: true },
|
|
48
|
+
}, async () => jsonContent((await client.GET('/integrations/hubspot/owners')).data));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=hubspot-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubspot-integration.js","sourceRoot":"","sources":["../../src/tools/hubspot-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,+EAA+E;AAC/E,MAAM,UAAU,+BAA+B,CAAC,MAAiB,EAAE,MAAoB;IACrF,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,WAAW,EACT,6OAA6O;QAC/O,WAAW,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,IAAI,EAAE;KACnE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC,IAAI,CAAC,CACnF,CAAC;IAEF,MAAM,CAAC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jE,EACD,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC,CAAC,IAAI,CAAC,CACjF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { OpenCXClient } from '../api-client.js';
|
|
3
|
+
export declare function registerInfobipIntegrationTools(server: McpServer, client: OpenCXClient): void;
|
|
4
|
+
//# sourceMappingURL=infobip-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infobip-integration.d.ts","sourceRoot":"","sources":["../../src/tools/infobip-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QAyFtF"}
|