@zaapi/open-api-mcp 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.
- package/README.md +37 -0
- package/dist/client.js +59 -0
- package/dist/client.js.map +1 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/server.js +68 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/close-ticket.js +21 -0
- package/dist/tools/close-ticket.js.map +1 -0
- package/dist/tools/common.js +29 -0
- package/dist/tools/common.js.map +1 -0
- package/dist/tools/contacts/create-contact.js +21 -0
- package/dist/tools/contacts/create-contact.js.map +1 -0
- package/dist/tools/contacts/get-contact-by-id.js +14 -0
- package/dist/tools/contacts/get-contact-by-id.js.map +1 -0
- package/dist/tools/contacts/list-contact-fields.js +12 -0
- package/dist/tools/contacts/list-contact-fields.js.map +1 -0
- package/dist/tools/contacts/list-contacts.js +22 -0
- package/dist/tools/contacts/list-contacts.js.map +1 -0
- package/dist/tools/contacts/update-contact-field.js +17 -0
- package/dist/tools/contacts/update-contact-field.js.map +1 -0
- package/dist/tools/conversations/filter-conversations.js +27 -0
- package/dist/tools/conversations/filter-conversations.js.map +1 -0
- package/dist/tools/conversations/mark-conversation-read.js +18 -0
- package/dist/tools/conversations/mark-conversation-read.js.map +1 -0
- package/dist/tools/conversations/update-conversation-labels.js +23 -0
- package/dist/tools/conversations/update-conversation-labels.js.map +1 -0
- package/dist/tools/create-contact.js +21 -0
- package/dist/tools/create-contact.js.map +1 -0
- package/dist/tools/create-internal-comment.js +15 -0
- package/dist/tools/create-internal-comment.js.map +1 -0
- package/dist/tools/filter-conversations.js +18 -0
- package/dist/tools/filter-conversations.js.map +1 -0
- package/dist/tools/get-contact-by-id.js +14 -0
- package/dist/tools/get-contact-by-id.js.map +1 -0
- package/dist/tools/get-messages.js +19 -0
- package/dist/tools/get-messages.js.map +1 -0
- package/dist/tools/get-ticket-by-id.js +16 -0
- package/dist/tools/get-ticket-by-id.js.map +1 -0
- package/dist/tools/index.js +62 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/labels/list-labels.js +16 -0
- package/dist/tools/labels/list-labels.js.map +1 -0
- package/dist/tools/list-contact-fields.js +12 -0
- package/dist/tools/list-contact-fields.js.map +1 -0
- package/dist/tools/list-contacts.js +22 -0
- package/dist/tools/list-contacts.js.map +1 -0
- package/dist/tools/list-internal-comments.js +17 -0
- package/dist/tools/list-internal-comments.js.map +1 -0
- package/dist/tools/list-labels.js +16 -0
- package/dist/tools/list-labels.js.map +1 -0
- package/dist/tools/list-teams.js +17 -0
- package/dist/tools/list-teams.js.map +1 -0
- package/dist/tools/list-ticket-fields.js +15 -0
- package/dist/tools/list-ticket-fields.js.map +1 -0
- package/dist/tools/list-tickets.js +88 -0
- package/dist/tools/list-tickets.js.map +1 -0
- package/dist/tools/list-users.js +16 -0
- package/dist/tools/list-users.js.map +1 -0
- package/dist/tools/mark-conversation-read.js +18 -0
- package/dist/tools/mark-conversation-read.js.map +1 -0
- package/dist/tools/messages/create-internal-comment.js +15 -0
- package/dist/tools/messages/create-internal-comment.js.map +1 -0
- package/dist/tools/messages/get-messages.js +29 -0
- package/dist/tools/messages/get-messages.js.map +1 -0
- package/dist/tools/messages/list-internal-comments.js +17 -0
- package/dist/tools/messages/list-internal-comments.js.map +1 -0
- package/dist/tools/messages/send-plain-text-message.js +15 -0
- package/dist/tools/messages/send-plain-text-message.js.map +1 -0
- package/dist/tools/send-plain-text-message.js +15 -0
- package/dist/tools/send-plain-text-message.js.map +1 -0
- package/dist/tools/teams/list-teams.js +17 -0
- package/dist/tools/teams/list-teams.js.map +1 -0
- package/dist/tools/tickets/close-ticket.js +21 -0
- package/dist/tools/tickets/close-ticket.js.map +1 -0
- package/dist/tools/tickets/get-ticket-by-id.js +16 -0
- package/dist/tools/tickets/get-ticket-by-id.js.map +1 -0
- package/dist/tools/tickets/list-ticket-fields.js +15 -0
- package/dist/tools/tickets/list-ticket-fields.js.map +1 -0
- package/dist/tools/tickets/list-tickets.js +88 -0
- package/dist/tools/tickets/list-tickets.js.map +1 -0
- package/dist/tools/tickets/update-ticket-field.js +22 -0
- package/dist/tools/tickets/update-ticket-field.js.map +1 -0
- package/dist/tools/update-contact-field.js +17 -0
- package/dist/tools/update-contact-field.js.map +1 -0
- package/dist/tools/update-conversation-labels.js +16 -0
- package/dist/tools/update-conversation-labels.js.map +1 -0
- package/dist/tools/update-ticket-field.js +22 -0
- package/dist/tools/update-ticket-field.js.map +1 -0
- package/dist/tools/users/list-users.js +16 -0
- package/dist/tools/users/list-users.js.map +1 -0
- package/dist/tools.js +413 -0
- package/dist/tools.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { closeTicket } from './tickets/close-ticket.js';
|
|
2
|
+
import { createContact } from './contacts/create-contact.js';
|
|
3
|
+
import { createInternalComment } from './messages/create-internal-comment.js';
|
|
4
|
+
import { filterConversations } from './conversations/filter-conversations.js';
|
|
5
|
+
import { getContactById } from './contacts/get-contact-by-id.js';
|
|
6
|
+
import { getMessages } from './messages/get-messages.js';
|
|
7
|
+
import { getTicketById } from './tickets/get-ticket-by-id.js';
|
|
8
|
+
import { listContactFields } from './contacts/list-contact-fields.js';
|
|
9
|
+
import { listContacts } from './contacts/list-contacts.js';
|
|
10
|
+
import { listInternalComments } from './messages/list-internal-comments.js';
|
|
11
|
+
import { listLabels } from './labels/list-labels.js';
|
|
12
|
+
import { listTeams } from './teams/list-teams.js';
|
|
13
|
+
import { listTicketFields } from './tickets/list-ticket-fields.js';
|
|
14
|
+
import { listTickets } from './tickets/list-tickets.js';
|
|
15
|
+
import { listUsers } from './users/list-users.js';
|
|
16
|
+
import { markConversationRead } from './conversations/mark-conversation-read.js';
|
|
17
|
+
import { sendPlainTextMessage } from './messages/send-plain-text-message.js';
|
|
18
|
+
import { updateContactField } from './contacts/update-contact-field.js';
|
|
19
|
+
import { updateConversationLabels } from './conversations/update-conversation-labels.js';
|
|
20
|
+
import { updateTicketField } from './tickets/update-ticket-field.js';
|
|
21
|
+
export const tools = [
|
|
22
|
+
getTicketById,
|
|
23
|
+
listTickets,
|
|
24
|
+
listTicketFields,
|
|
25
|
+
updateTicketField,
|
|
26
|
+
closeTicket,
|
|
27
|
+
filterConversations,
|
|
28
|
+
markConversationRead,
|
|
29
|
+
updateConversationLabels,
|
|
30
|
+
getContactById,
|
|
31
|
+
listContacts,
|
|
32
|
+
listContactFields,
|
|
33
|
+
createContact,
|
|
34
|
+
updateContactField,
|
|
35
|
+
getMessages,
|
|
36
|
+
listInternalComments,
|
|
37
|
+
createInternalComment,
|
|
38
|
+
sendPlainTextMessage,
|
|
39
|
+
listUsers,
|
|
40
|
+
listLabels,
|
|
41
|
+
listTeams,
|
|
42
|
+
];
|
|
43
|
+
export function splitInput(input, queryKeys) {
|
|
44
|
+
const query = {};
|
|
45
|
+
const body = {};
|
|
46
|
+
for (const [key, value] of Object.entries(input)) {
|
|
47
|
+
if (value === undefined) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (queryKeys.includes(key)) {
|
|
51
|
+
query[key] = value;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
body[key] = value;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
query,
|
|
59
|
+
...(Object.keys(body).length > 0 ? { body } : {}),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MA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B,EAAE,CAAC;IAC1C,MAAM,IAAI,GAA4B,EAAE,CAAC;IAEzC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,SAAS;QACX,CAAC;QACD,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK;QACL,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { paginationFields } from '../common.js';
|
|
3
|
+
export const listLabels = {
|
|
4
|
+
name: 'listLabels',
|
|
5
|
+
title: 'List labels',
|
|
6
|
+
description: 'Required scope: labels:read. Labels for the store, most recently updated first. searchTerm must be 3–100 characters.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/labels',
|
|
9
|
+
queryKeys: ['searchTerm', 'pageSize', 'cursor'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
searchTerm: z.string().min(3).max(100).optional(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
}),
|
|
14
|
+
annotations: { readOnlyHint: true },
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=list-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-labels.js","sourceRoot":"","sources":["../../../src/tools/labels/list-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAqB,MAAM,cAAc,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,sHAAsH;IACxH,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC/C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QACjD,GAAG,gBAAgB;KACpB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const listContactFields = {
|
|
3
|
+
name: 'listContactFields',
|
|
4
|
+
title: 'List contact fields',
|
|
5
|
+
description: 'Required scope: contacts:read. Fetch contact field definitions for the store.',
|
|
6
|
+
method: 'GET',
|
|
7
|
+
path: '/v1/contacts/fields',
|
|
8
|
+
queryKeys: [],
|
|
9
|
+
inputSchema: z.object({}),
|
|
10
|
+
annotations: { readOnlyHint: true },
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=list-contact-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-contact-fields.js","sourceRoot":"","sources":["../../src/tools/list-contact-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,+EAA+E;IACjF,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,qBAAqB;IAC3B,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { paginationFields } from './common.js';
|
|
3
|
+
export const listContacts = {
|
|
4
|
+
name: 'listContacts',
|
|
5
|
+
title: 'List contacts',
|
|
6
|
+
description: 'Required scope: contacts:read. Search and page through contacts, most recently updated first.',
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v1/contacts/list',
|
|
9
|
+
queryKeys: ['pageSize', 'cursor'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
...paginationFields,
|
|
12
|
+
search: z
|
|
13
|
+
.string()
|
|
14
|
+
.max(100)
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Free-text search across name, email, and phone.'),
|
|
17
|
+
updatedAfter: z.string().optional(),
|
|
18
|
+
updatedBefore: z.string().optional(),
|
|
19
|
+
}),
|
|
20
|
+
annotations: { readOnlyHint: true },
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=list-contacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-contacts.js","sourceRoot":"","sources":["../../src/tools/list-contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,+FAA+F;IACjG,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,GAAG,gBAAgB;QACnB,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand, paginationFields, paginationQueryKeys, } from './common.js';
|
|
3
|
+
export const listInternalComments = {
|
|
4
|
+
name: 'listInternalComments',
|
|
5
|
+
title: 'List internal comments',
|
|
6
|
+
description: 'Required scope: messages:read. Seller-private notes on a conversation, newest first. These do not reach the customer.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/messages/internal-comments',
|
|
9
|
+
queryKeys: ['conversationId', ...paginationQueryKeys],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
conversationId: z.string(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
expand: expand('Pass createdBy,conversation,account to resolve related names.'),
|
|
14
|
+
}),
|
|
15
|
+
annotations: { readOnlyHint: true },
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=list-internal-comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-internal-comments.js","sourceRoot":"","sources":["../../src/tools/list-internal-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,uHAAuH;IACzH,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,gCAAgC;IACtC,SAAS,EAAE,CAAC,gBAAgB,EAAE,GAAG,mBAAmB,CAAC;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,+DAA+D,CAChE;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { paginationFields } from './common.js';
|
|
3
|
+
export const listLabels = {
|
|
4
|
+
name: 'listLabels',
|
|
5
|
+
title: 'List labels',
|
|
6
|
+
description: 'Required scope: labels:read. Labels for the store, most recently updated first. searchTerm must be 3–100 characters.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/labels',
|
|
9
|
+
queryKeys: ['searchTerm', 'pageSize', 'cursor'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
searchTerm: z.string().min(3).max(100).optional(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
}),
|
|
14
|
+
annotations: { readOnlyHint: true },
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=list-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-labels.js","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAElE,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,sHAAsH;IACxH,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC/C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QACjD,GAAG,gBAAgB;KACpB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand, paginationFields, paginationQueryKeys, } from './common.js';
|
|
3
|
+
export const listTeams = {
|
|
4
|
+
name: 'listTeams',
|
|
5
|
+
title: 'List teams',
|
|
6
|
+
description: 'Required scope: teams:read. Teams for the store. Pass userId to return only teams containing that user. Pass expand=users to return member { id, name }.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/teams',
|
|
9
|
+
queryKeys: ['userId', ...paginationQueryKeys],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
userId: z.string().uuid().optional(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
expand: expand('Pass users to return each member as { id, name } when that user exists on the store.'),
|
|
14
|
+
}),
|
|
15
|
+
annotations: { readOnlyHint: true },
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=list-teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-teams.js","sourceRoot":"","sources":["../../src/tools/list-teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,0JAA0J;IAC5J,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACpC,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,sFAAsF,CACvF;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand } from './common.js';
|
|
3
|
+
export const listTicketFields = {
|
|
4
|
+
name: 'listTicketFields',
|
|
5
|
+
title: 'List ticket fields',
|
|
6
|
+
description: 'Required scope: tickets:read. Full catalog of custom ticket field definitions. Pass expand=accounts to include the accounts each field applies to.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/tickets/fields',
|
|
9
|
+
queryKeys: ['expand'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
expand: expand('Pass accounts to include the accounts each field applies to.'),
|
|
12
|
+
}),
|
|
13
|
+
annotations: { readOnlyHint: true },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=list-ticket-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-ticket-fields.js","sourceRoot":"","sources":["../../src/tools/list-ticket-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,oJAAoJ;IACtJ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CACZ,8DAA8D,CAC/D;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand, paginationFields, paginationQueryKeys, } from './common.js';
|
|
3
|
+
export const listTickets = {
|
|
4
|
+
name: 'listTickets',
|
|
5
|
+
title: 'List tickets',
|
|
6
|
+
description: 'Required scope: tickets:read. Page through tickets, newest message first. Empty body returns open, non-spam tickets that are not snoozed. Do not send assigneeUserIds together with unassigned: true.',
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v1/tickets/list',
|
|
9
|
+
queryKeys: paginationQueryKeys,
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
...paginationFields,
|
|
12
|
+
expand: expand('Pass account,conversation,assignee,handledBy to replace those ids with names.'),
|
|
13
|
+
statuses: z
|
|
14
|
+
.array(z.enum(['open', 'closed']))
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Omit to return open tickets only.'),
|
|
17
|
+
conversationId: z.string().optional(),
|
|
18
|
+
accountIds: z.array(z.string()).optional(),
|
|
19
|
+
assigneeUserIds: z.array(z.string()).optional(),
|
|
20
|
+
handledByUserIds: z.array(z.string()).optional(),
|
|
21
|
+
resolutionStatuses: z
|
|
22
|
+
.array(z.enum([
|
|
23
|
+
'none',
|
|
24
|
+
'human',
|
|
25
|
+
'automation',
|
|
26
|
+
'ai_full_resolution',
|
|
27
|
+
'ai_partial_resolution',
|
|
28
|
+
]))
|
|
29
|
+
.optional(),
|
|
30
|
+
unassigned: z.boolean().optional(),
|
|
31
|
+
isFollowUp: z.boolean().optional(),
|
|
32
|
+
isSpam: z.boolean().optional(),
|
|
33
|
+
advancedFilters: z
|
|
34
|
+
.object({
|
|
35
|
+
labels: z
|
|
36
|
+
.object({
|
|
37
|
+
operator: z.enum([
|
|
38
|
+
'contains_any',
|
|
39
|
+
'contains_all',
|
|
40
|
+
'does_not_contain_any',
|
|
41
|
+
]),
|
|
42
|
+
labelIds: z.array(z.string()).min(1).max(10),
|
|
43
|
+
})
|
|
44
|
+
.optional(),
|
|
45
|
+
ticketFields: z
|
|
46
|
+
.array(z.object({
|
|
47
|
+
ticketFieldId: z.string(),
|
|
48
|
+
operator: z.enum([
|
|
49
|
+
'equal',
|
|
50
|
+
'not_equal',
|
|
51
|
+
'starts_with',
|
|
52
|
+
'text_contains',
|
|
53
|
+
'is_one_of',
|
|
54
|
+
'is_not_one_of',
|
|
55
|
+
'contains_any',
|
|
56
|
+
'contains_all',
|
|
57
|
+
'does_not_contain_any',
|
|
58
|
+
'greater_than',
|
|
59
|
+
'less_than',
|
|
60
|
+
'greater_than_or_equal',
|
|
61
|
+
'less_than_or_equal',
|
|
62
|
+
'between',
|
|
63
|
+
]),
|
|
64
|
+
value: z.any().optional(),
|
|
65
|
+
min: z.any().optional(),
|
|
66
|
+
max: z.any().optional(),
|
|
67
|
+
}))
|
|
68
|
+
.max(10)
|
|
69
|
+
.optional(),
|
|
70
|
+
waitingForReply: z
|
|
71
|
+
.object({
|
|
72
|
+
value: z.number().int().min(1).max(43200),
|
|
73
|
+
})
|
|
74
|
+
.optional(),
|
|
75
|
+
openedAt: z
|
|
76
|
+
.object({
|
|
77
|
+
operator: z.enum(['between', 'greater_than', 'less_than']),
|
|
78
|
+
value: z.string().optional(),
|
|
79
|
+
min: z.string().optional(),
|
|
80
|
+
max: z.string().optional(),
|
|
81
|
+
})
|
|
82
|
+
.optional(),
|
|
83
|
+
})
|
|
84
|
+
.optional(),
|
|
85
|
+
}),
|
|
86
|
+
annotations: { readOnlyHint: true },
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=list-tickets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-tickets.js","sourceRoot":"","sources":["../../src/tools/list-tickets.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ACN,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;gBAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBAC1B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC3B,CAAC;iBACD,QAAQ,EAAE;SACd,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand } from './common.js';
|
|
3
|
+
export const listUsers = {
|
|
4
|
+
name: 'listUsers',
|
|
5
|
+
title: 'List users',
|
|
6
|
+
description: 'Required scope: users:read. Full list of users on the store. Optionally filter to one userId. Pass expand=role to include { id, name } for the role.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/users',
|
|
9
|
+
queryKeys: ['userId', 'expand'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
userId: z.string().uuid().optional(),
|
|
12
|
+
expand: expand('Pass role to include { id, name } and omit roleId.'),
|
|
13
|
+
}),
|
|
14
|
+
annotations: { readOnlyHint: true },
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=list-users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-users.js","sourceRoot":"","sources":["../../src/tools/list-users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AAExD,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,sJAAsJ;IACxJ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACpC,MAAM,EAAE,MAAM,CAAC,oDAAoD,CAAC;KACrE,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const markConversationRead = {
|
|
3
|
+
name: 'markConversationRead',
|
|
4
|
+
title: 'Mark a conversation as read',
|
|
5
|
+
description: "Required scope: conversations:write. Clears the unread count on the conversation's open ticket. Idempotent. A conversation with no open ticket returns 404.",
|
|
6
|
+
method: 'PATCH',
|
|
7
|
+
path: '/v1/conversations/read',
|
|
8
|
+
queryKeys: [],
|
|
9
|
+
inputSchema: z.object({
|
|
10
|
+
conversationId: z.string(),
|
|
11
|
+
}),
|
|
12
|
+
annotations: {
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
destructiveHint: false,
|
|
15
|
+
idempotentHint: true,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=mark-conversation-read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-conversation-read.js","sourceRoot":"","sources":["../../src/tools/mark-conversation-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,6JAA6J;IAC/J,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,wBAAwB;IAC9B,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;KAC3B,CAAC;IACF,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const createInternalComment = {
|
|
3
|
+
name: 'createInternalComment',
|
|
4
|
+
title: 'Add an internal comment',
|
|
5
|
+
description: 'Required scope: messages:write. Add a seller-private note. Not sent to the customer.',
|
|
6
|
+
method: 'POST',
|
|
7
|
+
path: '/v1/messages/internal-comments',
|
|
8
|
+
queryKeys: [],
|
|
9
|
+
inputSchema: z.object({
|
|
10
|
+
conversationId: z.string(),
|
|
11
|
+
text: z.string(),
|
|
12
|
+
}),
|
|
13
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=create-internal-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-internal-comment.js","sourceRoot":"","sources":["../../../src/tools/messages/create-internal-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,sFAAsF;IACxF,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,gCAAgC;IACtC,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cursor, expand, messagePageSize, } from '../common.js';
|
|
3
|
+
const getMessagesExpand = expand('Pass sentBy,conversation,account to add related names.');
|
|
4
|
+
export const getMessages = {
|
|
5
|
+
name: 'getMessages',
|
|
6
|
+
title: 'List messages',
|
|
7
|
+
description: 'Required scope: messages:read. Customer-facing messages, newest first. Send conversationId and/or ticketId — at least one is required. pageSize max 15.',
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/v1/messages',
|
|
10
|
+
queryKeys: ['conversationId', 'ticketId', 'pageSize', 'cursor', 'expand'],
|
|
11
|
+
inputSchema: z.union([
|
|
12
|
+
z.object({
|
|
13
|
+
conversationId: z.string().min(1),
|
|
14
|
+
ticketId: z.string().min(1).optional(),
|
|
15
|
+
pageSize: messagePageSize,
|
|
16
|
+
cursor,
|
|
17
|
+
expand: getMessagesExpand,
|
|
18
|
+
}),
|
|
19
|
+
z.object({
|
|
20
|
+
ticketId: z.string().min(1),
|
|
21
|
+
conversationId: z.string().min(1).optional(),
|
|
22
|
+
pageSize: messagePageSize,
|
|
23
|
+
cursor,
|
|
24
|
+
expand: getMessagesExpand,
|
|
25
|
+
}),
|
|
26
|
+
]),
|
|
27
|
+
annotations: { readOnlyHint: true },
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=get-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-messages.js","sourceRoot":"","sources":["../../../src/tools/messages/get-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,MAAM,EACN,MAAM,EACN,eAAe,GAEhB,MAAM,cAAc,CAAC;AAEtB,MAAM,iBAAiB,GAAG,MAAM,CAC9B,wDAAwD,CACzD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,yJAAyJ;IAC3J,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACzE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,MAAM,CAAC;YACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACtC,QAAQ,EAAE,eAAe;YACzB,MAAM;YACN,MAAM,EAAE,iBAAiB;SAC1B,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC5C,QAAQ,EAAE,eAAe;YACzB,MAAM;YACN,MAAM,EAAE,iBAAiB;SAC1B,CAAC;KACH,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
|
|
3
|
+
export const listInternalComments = {
|
|
4
|
+
name: 'listInternalComments',
|
|
5
|
+
title: 'List internal comments',
|
|
6
|
+
description: 'Required scope: messages:read. Seller-private notes on a conversation, newest first. These do not reach the customer.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/messages/internal-comments',
|
|
9
|
+
queryKeys: ['conversationId', ...paginationQueryKeys],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
conversationId: z.string(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
expand: expand('Pass createdBy,conversation,account to resolve related names.'),
|
|
14
|
+
}),
|
|
15
|
+
annotations: { readOnlyHint: true },
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=list-internal-comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-internal-comments.js","sourceRoot":"","sources":["../../../src/tools/messages/list-internal-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,uHAAuH;IACzH,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,gCAAgC;IACtC,SAAS,EAAE,CAAC,gBAAgB,EAAE,GAAG,mBAAmB,CAAC;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,+DAA+D,CAChE;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const sendPlainTextMessage = {
|
|
3
|
+
name: 'sendPlainTextMessage',
|
|
4
|
+
title: 'Send a plain text message',
|
|
5
|
+
description: 'Required scope: messages:write. Send plain text to the customer on a conversation.',
|
|
6
|
+
method: 'POST',
|
|
7
|
+
path: '/v1/messages/plain-text',
|
|
8
|
+
queryKeys: [],
|
|
9
|
+
inputSchema: z.object({
|
|
10
|
+
conversationId: z.string(),
|
|
11
|
+
text: z.string(),
|
|
12
|
+
}),
|
|
13
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=send-plain-text-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-plain-text-message.js","sourceRoot":"","sources":["../../../src/tools/messages/send-plain-text-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,oFAAoF;IACtF,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,yBAAyB;IAC/B,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const sendPlainTextMessage = {
|
|
3
|
+
name: 'sendPlainTextMessage',
|
|
4
|
+
title: 'Send a plain text message',
|
|
5
|
+
description: 'Required scope: messages:write. Send plain text to the customer on a conversation.',
|
|
6
|
+
method: 'POST',
|
|
7
|
+
path: '/v1/messages/plain-text',
|
|
8
|
+
queryKeys: [],
|
|
9
|
+
inputSchema: z.object({
|
|
10
|
+
conversationId: z.string(),
|
|
11
|
+
text: z.string(),
|
|
12
|
+
}),
|
|
13
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=send-plain-text-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-plain-text-message.js","sourceRoot":"","sources":["../../src/tools/send-plain-text-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,oFAAoF;IACtF,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,yBAAyB;IAC/B,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
|
|
3
|
+
export const listTeams = {
|
|
4
|
+
name: 'listTeams',
|
|
5
|
+
title: 'List teams',
|
|
6
|
+
description: 'Required scope: teams:read. Teams for the store. Pass userId to return only teams containing that user. Pass expand=users to return member { id, name }.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/teams',
|
|
9
|
+
queryKeys: ['userId', ...paginationQueryKeys],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
userId: z.string().uuid().optional(),
|
|
12
|
+
...paginationFields,
|
|
13
|
+
expand: expand('Pass users to return each member as { id, name } when that user exists on the store.'),
|
|
14
|
+
}),
|
|
15
|
+
annotations: { readOnlyHint: true },
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=list-teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-teams.js","sourceRoot":"","sources":["../../../src/tools/teams/list-teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,0JAA0J;IAC5J,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACpC,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,sFAAsF,CACvF;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand } from '../common.js';
|
|
3
|
+
export const closeTicket = {
|
|
4
|
+
name: 'closeTicket',
|
|
5
|
+
title: 'Close a ticket',
|
|
6
|
+
description: 'Required scope: tickets:write. Close a ticket. You can record who handled it, conversion details, and ticket field values in the same request.',
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
path: '/v1/tickets/close',
|
|
9
|
+
queryKeys: ['expand'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
expand: expand('Related objects to include on the closed ticket.'),
|
|
12
|
+
ticketId: z.string(),
|
|
13
|
+
handledBy: z.string().uuid().optional(),
|
|
14
|
+
isConverted: z.boolean().optional(),
|
|
15
|
+
totalRevenue: z.number().min(0).optional(),
|
|
16
|
+
currency: z.string().optional(),
|
|
17
|
+
ticketFields: z.record(z.string(), z.any()).optional(),
|
|
18
|
+
}),
|
|
19
|
+
annotations: { readOnlyHint: false, destructiveHint: true },
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=close-ticket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-ticket.js","sourceRoot":"","sources":["../../../src/tools/tickets/close-ticket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,gJAAgJ;IAClJ,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC,kDAAkD,CAAC;QAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACvC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;KACvD,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;CAC5D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand } from '../common.js';
|
|
3
|
+
export const getTicketById = {
|
|
4
|
+
name: 'getTicketById',
|
|
5
|
+
title: 'Get a ticket by ID',
|
|
6
|
+
description: 'Required scope: tickets:read. Fetch a single ticket. Pass expand=account,conversation,assignee,handledBy to replace those ids with names.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/tickets',
|
|
9
|
+
queryKeys: ['ticketId', 'expand'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
ticketId: z.string().describe('The ID of the ticket'),
|
|
12
|
+
expand: expand('Comma-separated related objects to include.'),
|
|
13
|
+
}),
|
|
14
|
+
annotations: { readOnlyHint: true },
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=get-ticket-by-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-ticket-by-id.js","sourceRoot":"","sources":["../../../src/tools/tickets/get-ticket-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,2IAA2I;IAC7I,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,aAAa;IACnB,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACrD,MAAM,EAAE,MAAM,CAAC,6CAA6C,CAAC;KAC9D,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { expand } from '../common.js';
|
|
3
|
+
export const listTicketFields = {
|
|
4
|
+
name: 'listTicketFields',
|
|
5
|
+
title: 'List ticket fields',
|
|
6
|
+
description: 'Required scope: tickets:read. Full catalog of custom ticket field definitions. Pass expand=accounts to include the accounts each field applies to.',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v1/tickets/fields',
|
|
9
|
+
queryKeys: ['expand'],
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
expand: expand('Pass accounts to include the accounts each field applies to.'),
|
|
12
|
+
}),
|
|
13
|
+
annotations: { readOnlyHint: true },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=list-ticket-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-ticket-fields.js","sourceRoot":"","sources":["../../../src/tools/tickets/list-ticket-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,oJAAoJ;IACtJ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CACZ,8DAA8D,CAC/D;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
|