nexup-mcp-server 1.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.

Potentially problematic release.


This version of nexup-mcp-server might be problematic. Click here for more details.

Files changed (66) hide show
  1. package/README.md +41 -0
  2. package/dist/client/auth.d.ts +6 -0
  3. package/dist/client/auth.d.ts.map +1 -0
  4. package/dist/client/auth.js +14 -0
  5. package/dist/client/auth.js.map +1 -0
  6. package/dist/client/http-client.d.ts +33 -0
  7. package/dist/client/http-client.d.ts.map +1 -0
  8. package/dist/client/http-client.js +149 -0
  9. package/dist/client/http-client.js.map +1 -0
  10. package/dist/config.d.ts +7 -0
  11. package/dist/config.d.ts.map +1 -0
  12. package/dist/config.js +19 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +108 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/resources/crm-resources.d.ts +8 -0
  19. package/dist/resources/crm-resources.d.ts.map +1 -0
  20. package/dist/resources/crm-resources.js +501 -0
  21. package/dist/resources/crm-resources.js.map +1 -0
  22. package/dist/resources/index.d.ts +2 -0
  23. package/dist/resources/index.d.ts.map +1 -0
  24. package/dist/resources/index.js +2 -0
  25. package/dist/resources/index.js.map +1 -0
  26. package/dist/tools/customers.d.ts +221 -0
  27. package/dist/tools/customers.d.ts.map +1 -0
  28. package/dist/tools/customers.js +207 -0
  29. package/dist/tools/customers.js.map +1 -0
  30. package/dist/tools/index.d.ts +883 -0
  31. package/dist/tools/index.d.ts.map +1 -0
  32. package/dist/tools/index.js +38 -0
  33. package/dist/tools/index.js.map +1 -0
  34. package/dist/tools/notifications.d.ts +16 -0
  35. package/dist/tools/notifications.d.ts.map +1 -0
  36. package/dist/tools/notifications.js +47 -0
  37. package/dist/tools/notifications.js.map +1 -0
  38. package/dist/tools/prospects.d.ts +478 -0
  39. package/dist/tools/prospects.d.ts.map +1 -0
  40. package/dist/tools/prospects.js +336 -0
  41. package/dist/tools/prospects.js.map +1 -0
  42. package/dist/tools/tickets.d.ts +83 -0
  43. package/dist/tools/tickets.d.ts.map +1 -0
  44. package/dist/tools/tickets.js +171 -0
  45. package/dist/tools/tickets.js.map +1 -0
  46. package/dist/tools/transcripts.d.ts +97 -0
  47. package/dist/tools/transcripts.d.ts.map +1 -0
  48. package/dist/tools/transcripts.js +188 -0
  49. package/dist/tools/transcripts.js.map +1 -0
  50. package/dist/utils/errors.d.ts +9 -0
  51. package/dist/utils/errors.d.ts.map +1 -0
  52. package/dist/utils/errors.js +28 -0
  53. package/dist/utils/errors.js.map +1 -0
  54. package/dist/utils/formatters.d.ts +5 -0
  55. package/dist/utils/formatters.d.ts.map +1 -0
  56. package/dist/utils/formatters.js +21 -0
  57. package/dist/utils/formatters.js.map +1 -0
  58. package/dist/utils/logger.d.ts +4 -0
  59. package/dist/utils/logger.d.ts.map +1 -0
  60. package/dist/utils/logger.js +43 -0
  61. package/dist/utils/logger.js.map +1 -0
  62. package/dist/validation/schemas.d.ts +424 -0
  63. package/dist/validation/schemas.d.ts.map +1 -0
  64. package/dist/validation/schemas.js +114 -0
  65. package/dist/validation/schemas.js.map +1 -0
  66. package/package.json +34 -0
@@ -0,0 +1,221 @@
1
+ export declare const customerTools: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: string;
6
+ properties: {
7
+ search: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ owner: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ companyName?: undefined;
16
+ address?: undefined;
17
+ industry?: undefined;
18
+ website?: undefined;
19
+ sentiment?: undefined;
20
+ notes?: undefined;
21
+ customerId?: undefined;
22
+ nextAction?: undefined;
23
+ nextActionDueDate?: undefined;
24
+ firstName?: undefined;
25
+ lastName?: undefined;
26
+ email?: undefined;
27
+ phone?: undefined;
28
+ role?: undefined;
29
+ isPrimary?: undefined;
30
+ };
31
+ required: never[];
32
+ };
33
+ } | {
34
+ name: string;
35
+ description: string;
36
+ inputSchema: {
37
+ type: string;
38
+ properties: {
39
+ companyName: {
40
+ type: string;
41
+ description: string;
42
+ };
43
+ address: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ industry: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ website: {
52
+ type: string;
53
+ description: string;
54
+ };
55
+ owner: {
56
+ type: string;
57
+ description: string;
58
+ };
59
+ sentiment: {
60
+ type: string;
61
+ description: string;
62
+ minimum: number;
63
+ maximum: number;
64
+ };
65
+ notes: {
66
+ type: string;
67
+ description: string;
68
+ };
69
+ search?: undefined;
70
+ customerId?: undefined;
71
+ nextAction?: undefined;
72
+ nextActionDueDate?: undefined;
73
+ firstName?: undefined;
74
+ lastName?: undefined;
75
+ email?: undefined;
76
+ phone?: undefined;
77
+ role?: undefined;
78
+ isPrimary?: undefined;
79
+ };
80
+ required: string[];
81
+ };
82
+ } | {
83
+ name: string;
84
+ description: string;
85
+ inputSchema: {
86
+ type: string;
87
+ properties: {
88
+ customerId: {
89
+ type: string;
90
+ description: string;
91
+ };
92
+ companyName: {
93
+ type: string;
94
+ description: string;
95
+ };
96
+ address: {
97
+ type: string;
98
+ description: string;
99
+ };
100
+ industry: {
101
+ type: string;
102
+ description: string;
103
+ };
104
+ website: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ sentiment: {
109
+ type: string;
110
+ description: string;
111
+ minimum: number;
112
+ maximum: number;
113
+ };
114
+ nextAction: {
115
+ type: string;
116
+ description: string;
117
+ };
118
+ nextActionDueDate: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ owner: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ notes: {
127
+ type: string;
128
+ description: string;
129
+ };
130
+ search?: undefined;
131
+ firstName?: undefined;
132
+ lastName?: undefined;
133
+ email?: undefined;
134
+ phone?: undefined;
135
+ role?: undefined;
136
+ isPrimary?: undefined;
137
+ };
138
+ required: string[];
139
+ };
140
+ } | {
141
+ name: string;
142
+ description: string;
143
+ inputSchema: {
144
+ type: string;
145
+ properties: {
146
+ customerId: {
147
+ type: string;
148
+ description: string;
149
+ };
150
+ firstName: {
151
+ type: string;
152
+ description: string;
153
+ };
154
+ lastName: {
155
+ type: string;
156
+ description: string;
157
+ };
158
+ email: {
159
+ type: string;
160
+ description: string;
161
+ };
162
+ phone: {
163
+ type: string;
164
+ description: string;
165
+ };
166
+ role: {
167
+ type: string;
168
+ description: string;
169
+ };
170
+ isPrimary: {
171
+ type: string;
172
+ description: string;
173
+ };
174
+ notes: {
175
+ type: string;
176
+ description: string;
177
+ };
178
+ search?: undefined;
179
+ owner?: undefined;
180
+ companyName?: undefined;
181
+ address?: undefined;
182
+ industry?: undefined;
183
+ website?: undefined;
184
+ sentiment?: undefined;
185
+ nextAction?: undefined;
186
+ nextActionDueDate?: undefined;
187
+ };
188
+ required: string[];
189
+ };
190
+ } | {
191
+ name: string;
192
+ description: string;
193
+ inputSchema: {
194
+ type: string;
195
+ properties: {
196
+ customerId: {
197
+ type: string;
198
+ description: string;
199
+ };
200
+ search?: undefined;
201
+ owner?: undefined;
202
+ companyName?: undefined;
203
+ address?: undefined;
204
+ industry?: undefined;
205
+ website?: undefined;
206
+ sentiment?: undefined;
207
+ notes?: undefined;
208
+ nextAction?: undefined;
209
+ nextActionDueDate?: undefined;
210
+ firstName?: undefined;
211
+ lastName?: undefined;
212
+ email?: undefined;
213
+ phone?: undefined;
214
+ role?: undefined;
215
+ isPrimary?: undefined;
216
+ };
217
+ required: string[];
218
+ };
219
+ })[];
220
+ export declare function handleCustomerTool(toolName: string, params: any): Promise<any>;
221
+ //# sourceMappingURL=customers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../src/tools/customers.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+EzB,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAoBpF"}
@@ -0,0 +1,207 @@
1
+ import { httpClient } from '../client/http-client.js';
2
+ import { logToolCall } from '../utils/logger.js';
3
+ import { formatError } from '../utils/errors.js';
4
+ import { createCustomerSchema, updateCustomerSchema, createContactSchema, } from '../validation/schemas.js';
5
+ export const customerTools = [
6
+ {
7
+ name: 'list_customers',
8
+ description: 'List and search customer companies in the CRM. Can filter by company name or owner.',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ search: { type: 'string', description: 'Search by company name, industry, or contact name/email (optional)' },
13
+ owner: { type: 'string', description: 'Filter by owner (optional)' },
14
+ },
15
+ required: [],
16
+ },
17
+ },
18
+ {
19
+ name: 'create_customer',
20
+ description: 'Create a new customer company account. Requires user confirmation before execution.',
21
+ inputSchema: {
22
+ type: 'object',
23
+ properties: {
24
+ companyName: { type: 'string', description: 'Company name' },
25
+ address: { type: 'string', description: 'Company address (optional)' },
26
+ industry: { type: 'string', description: 'Industry (optional)' },
27
+ website: { type: 'string', description: 'Website URL (optional)' },
28
+ owner: { type: 'string', description: 'Customer owner/manager (optional)' },
29
+ sentiment: { type: 'number', description: 'Customer sentiment 1-5 scale (default: 3)', minimum: 1, maximum: 5 },
30
+ notes: { type: 'string', description: 'Customer notes (optional)' },
31
+ },
32
+ required: ['companyName'],
33
+ },
34
+ },
35
+ {
36
+ name: 'update_customer',
37
+ description: 'Update an existing customer. Requires user confirmation before execution.',
38
+ inputSchema: {
39
+ type: 'object',
40
+ properties: {
41
+ customerId: { type: 'string', description: 'Customer ID to update' },
42
+ companyName: { type: 'string', description: 'Company name (optional)' },
43
+ address: { type: 'string', description: 'Company address (optional)' },
44
+ industry: { type: 'string', description: 'Industry (optional)' },
45
+ website: { type: 'string', description: 'Website URL (optional)' },
46
+ sentiment: { type: 'number', description: 'Customer sentiment 1-5 scale (optional)', minimum: 1, maximum: 5 },
47
+ nextAction: { type: 'string', description: 'Next action to take (optional)' },
48
+ nextActionDueDate: { type: 'string', description: 'Due date for next action (ISO format, optional)' },
49
+ owner: { type: 'string', description: 'Customer owner/manager (optional)' },
50
+ notes: { type: 'string', description: 'Customer notes (optional)' },
51
+ },
52
+ required: ['customerId'],
53
+ },
54
+ },
55
+ {
56
+ name: 'add_customer_contact',
57
+ description: 'Add a person/contact to a customer company. Requires user confirmation before execution.',
58
+ inputSchema: {
59
+ type: 'object',
60
+ properties: {
61
+ customerId: { type: 'string', description: 'Customer company ID' },
62
+ firstName: { type: 'string', description: 'First name' },
63
+ lastName: { type: 'string', description: 'Last name' },
64
+ email: { type: 'string', description: 'Email address' },
65
+ phone: { type: 'string', description: 'Phone number (optional)' },
66
+ role: { type: 'string', description: 'Job title/role (optional)' },
67
+ isPrimary: { type: 'boolean', description: 'Is this the primary contact? (optional, default: false)' },
68
+ notes: { type: 'string', description: 'Additional notes (optional)' },
69
+ },
70
+ required: ['customerId', 'firstName', 'lastName', 'email'],
71
+ },
72
+ },
73
+ {
74
+ name: 'list_customer_contacts',
75
+ description: 'List all contacts/people associated with a customer company.',
76
+ inputSchema: {
77
+ type: 'object',
78
+ properties: {
79
+ customerId: { type: 'string', description: 'Customer company ID' },
80
+ },
81
+ required: ['customerId'],
82
+ },
83
+ },
84
+ ];
85
+ export async function handleCustomerTool(toolName, params) {
86
+ try {
87
+ switch (toolName) {
88
+ case 'list_customers':
89
+ return await listCustomers(params);
90
+ case 'create_customer':
91
+ return await createCustomer(params);
92
+ case 'update_customer':
93
+ return await updateCustomer(params);
94
+ case 'add_customer_contact':
95
+ return await addCustomerContact(params);
96
+ case 'list_customer_contacts':
97
+ return await listCustomerContacts(params);
98
+ default:
99
+ throw new Error(`Unknown customer tool: ${toolName}`);
100
+ }
101
+ }
102
+ catch (error) {
103
+ logToolCall(toolName, params, 'error', { error: formatError(error) });
104
+ throw error;
105
+ }
106
+ }
107
+ async function listCustomers(params) {
108
+ const customers = await httpClient.get('/api/customers', params);
109
+ logToolCall('list_customers', params, 'success', { count: customers.length });
110
+ if (customers.length === 0) {
111
+ return {
112
+ content: [
113
+ {
114
+ type: 'text',
115
+ text: 'No customers found matching the specified criteria.',
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ const customersList = customers
121
+ .map((c) => {
122
+ const primaryContact = c.contacts?.find((contact) => contact.isPrimary);
123
+ const contactInfo = primaryContact
124
+ ? `\n Primary Contact: ${primaryContact.firstName} ${primaryContact.lastName} (${primaryContact.email})`
125
+ : `\n Contacts: ${c._count?.contacts || 0}`;
126
+ const sentiment = '★'.repeat(c.sentiment) + '☆'.repeat(5 - c.sentiment);
127
+ return `- ${c.companyName}${contactInfo}\n Sentiment: ${sentiment} (${c.sentiment}/5)\n Owner: ${c.owner || 'Unassigned'}\n ID: ${c.id}`;
128
+ })
129
+ .join('\n\n');
130
+ return {
131
+ content: [
132
+ {
133
+ type: 'text',
134
+ text: `Found ${customers.length} customer(s):\n\n${customersList}`,
135
+ },
136
+ ],
137
+ };
138
+ }
139
+ async function createCustomer(params) {
140
+ const validated = createCustomerSchema.parse(params);
141
+ const customer = await httpClient.post('/api/customers', validated, 'create_customer');
142
+ logToolCall('create_customer', params, 'success', { customerId: customer.id });
143
+ const sentiment = '★'.repeat(customer.sentiment) + '☆'.repeat(5 - customer.sentiment);
144
+ return {
145
+ content: [
146
+ {
147
+ type: 'text',
148
+ text: `✓ Created customer: ${customer.companyName}\nSentiment: ${sentiment} (${customer.sentiment}/5)${customer.similarCompanies ? `\n\n⚠️ Similar companies exist:\n${customer.similarCompanies.map((c) => `- ${c.companyName}`).join('\n')}` : ''}`,
149
+ },
150
+ ],
151
+ };
152
+ }
153
+ async function updateCustomer(params) {
154
+ const validated = updateCustomerSchema.parse(params);
155
+ const { customerId, ...updates } = validated;
156
+ const customer = await httpClient.patch(`/api/customers/${customerId}`, updates, 'update_customer');
157
+ logToolCall('update_customer', params, 'success', { customerId });
158
+ const sentiment = '★'.repeat(customer.sentiment) + '☆'.repeat(5 - customer.sentiment);
159
+ return {
160
+ content: [
161
+ {
162
+ type: 'text',
163
+ text: `✓ Updated customer: ${customer.companyName}\nSentiment: ${sentiment} (${customer.sentiment}/5)`,
164
+ },
165
+ ],
166
+ };
167
+ }
168
+ async function addCustomerContact(params) {
169
+ const validated = createContactSchema.parse(params);
170
+ const contact = await httpClient.post('/api/contacts', validated, 'add_customer_contact');
171
+ logToolCall('add_customer_contact', params, 'success', { contactId: contact.id });
172
+ return {
173
+ content: [
174
+ {
175
+ type: 'text',
176
+ text: `✓ Added contact: ${contact.firstName} ${contact.lastName} (${contact.email}) to ${contact.customer?.companyName}`,
177
+ },
178
+ ],
179
+ };
180
+ }
181
+ async function listCustomerContacts(params) {
182
+ const { customerId } = params;
183
+ const contacts = await httpClient.get('/api/contacts', { customerId });
184
+ logToolCall('list_customer_contacts', params, 'success', { count: contacts.length });
185
+ if (contacts.length === 0) {
186
+ return {
187
+ content: [
188
+ {
189
+ type: 'text',
190
+ text: 'No contacts found for this customer.',
191
+ },
192
+ ],
193
+ };
194
+ }
195
+ const contactsList = contacts
196
+ .map((c) => `- ${c.firstName} ${c.lastName} (${c.email})${c.isPrimary ? ' ★ Primary' : ''}\n Role: ${c.role || 'N/A'}\n Phone: ${c.phone || 'N/A'}\n ID: ${c.id}`)
197
+ .join('\n\n');
198
+ return {
199
+ content: [
200
+ {
201
+ type: 'text',
202
+ text: `Found ${contacts.length} contact(s):\n\n${contactsList}`,
203
+ },
204
+ ],
205
+ };
206
+ }
207
+ //# sourceMappingURL=customers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.js","sourceRoot":"","sources":["../../src/tools/customers.ts"],"names":[],"m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