@zaapi/open-api-mcp 1.1.1 → 1.3.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.
Files changed (59) hide show
  1. package/dist/client.js +5 -0
  2. package/dist/client.js.map +1 -1
  3. package/dist/instructions.js +73 -0
  4. package/dist/instructions.js.map +1 -0
  5. package/dist/server.js +134 -12
  6. package/dist/server.js.map +1 -1
  7. package/dist/tools/accounts/list-accounts.js +8 -18
  8. package/dist/tools/accounts/list-accounts.js.map +1 -1
  9. package/dist/tools/common.js +24 -28
  10. package/dist/tools/common.js.map +1 -1
  11. package/dist/tools/contacts/create-contact.js +13 -7
  12. package/dist/tools/contacts/create-contact.js.map +1 -1
  13. package/dist/tools/contacts/get-contact-by-id.js +6 -7
  14. package/dist/tools/contacts/get-contact-by-id.js.map +1 -1
  15. package/dist/tools/contacts/list-contact-fields.js +5 -3
  16. package/dist/tools/contacts/list-contact-fields.js.map +1 -1
  17. package/dist/tools/contacts/list-contacts.js +11 -6
  18. package/dist/tools/contacts/list-contacts.js.map +1 -1
  19. package/dist/tools/contacts/search-contacts.js +20 -0
  20. package/dist/tools/contacts/search-contacts.js.map +1 -0
  21. package/dist/tools/contacts/update-contact-field.js +12 -7
  22. package/dist/tools/contacts/update-contact-field.js.map +1 -1
  23. package/dist/tools/conversations/filter-conversations.js +11 -7
  24. package/dist/tools/conversations/filter-conversations.js.map +1 -1
  25. package/dist/tools/conversations/mark-conversation-read.js +4 -6
  26. package/dist/tools/conversations/mark-conversation-read.js.map +1 -1
  27. package/dist/tools/conversations/update-conversation-labels.js +10 -9
  28. package/dist/tools/conversations/update-conversation-labels.js.map +1 -1
  29. package/dist/tools/index.js +4 -0
  30. package/dist/tools/index.js.map +1 -1
  31. package/dist/tools/labels/list-labels.js +7 -4
  32. package/dist/tools/labels/list-labels.js.map +1 -1
  33. package/dist/tools/messages/create-internal-comment.js +9 -8
  34. package/dist/tools/messages/create-internal-comment.js.map +1 -1
  35. package/dist/tools/messages/get-messages.js +9 -7
  36. package/dist/tools/messages/get-messages.js.map +1 -1
  37. package/dist/tools/messages/list-internal-comments.js +8 -8
  38. package/dist/tools/messages/list-internal-comments.js.map +1 -1
  39. package/dist/tools/messages/search-messages.js +20 -0
  40. package/dist/tools/messages/search-messages.js.map +1 -0
  41. package/dist/tools/messages/send-plain-text-message.js +9 -8
  42. package/dist/tools/messages/send-plain-text-message.js.map +1 -1
  43. package/dist/tools/responses.js +271 -0
  44. package/dist/tools/responses.js.map +1 -0
  45. package/dist/tools/teams/list-teams.js +10 -5
  46. package/dist/tools/teams/list-teams.js.map +1 -1
  47. package/dist/tools/tickets/close-ticket.js +17 -10
  48. package/dist/tools/tickets/close-ticket.js.map +1 -1
  49. package/dist/tools/tickets/get-ticket-by-id.js +8 -8
  50. package/dist/tools/tickets/get-ticket-by-id.js.map +1 -1
  51. package/dist/tools/tickets/list-ticket-fields.js +7 -4
  52. package/dist/tools/tickets/list-ticket-fields.js.map +1 -1
  53. package/dist/tools/tickets/list-tickets.js +22 -22
  54. package/dist/tools/tickets/list-tickets.js.map +1 -1
  55. package/dist/tools/tickets/update-ticket-field.js +15 -8
  56. package/dist/tools/tickets/update-ticket-field.js.map +1 -1
  57. package/dist/tools/users/list-users.js +8 -5
  58. package/dist/tools/users/list-users.js.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,271 @@
1
+ import { z } from 'zod';
2
+ const openObject = () => z.looseObject({});
3
+ export const channel = z.enum([
4
+ 'line',
5
+ 'instagram',
6
+ 'facebook',
7
+ 'lazada',
8
+ 'shopee',
9
+ 'tiktok',
10
+ 'drunken_lullabies',
11
+ 'whatsapp',
12
+ 'widget',
13
+ 'gmail',
14
+ 'outlook',
15
+ ]);
16
+ const relatedChannel = z.looseObject({
17
+ id: z.string().optional(),
18
+ name: z.string().optional(),
19
+ channel: z.string().optional(),
20
+ });
21
+ const relatedUser = z.looseObject({
22
+ id: z.string().optional(),
23
+ name: z.string().optional(),
24
+ });
25
+ const relatedSeller = z.looseObject({
26
+ userId: z.string().optional(),
27
+ name: z.string().optional(),
28
+ roleId: z.string().optional(),
29
+ });
30
+ export const ticket = z.looseObject({
31
+ id: z.string().optional(),
32
+ ticketNumber: z.string().optional(),
33
+ accountId: z.string().optional(),
34
+ account: relatedChannel.optional(),
35
+ conversationId: z.string().optional(),
36
+ conversation: relatedChannel.optional(),
37
+ contactId: z.string().optional(),
38
+ channel: channel.optional(),
39
+ isOpen: z.boolean().optional(),
40
+ openedAt: z.string().optional(),
41
+ closedAt: z.string().optional(),
42
+ reopenedAt: z.string().optional(),
43
+ assigneeUserId: z.string().optional().describe('User UUID (User.userId).'),
44
+ assignee: relatedUser.optional(),
45
+ handledBy: z.string().optional().describe('User UUID of whoever closed it.'),
46
+ handledByUser: relatedUser.optional(),
47
+ isFollowUp: z.boolean().optional(),
48
+ isSpam: z.boolean().optional(),
49
+ ticketFields: openObject()
50
+ .optional()
51
+ .describe('Keyed by ticket field id, plus isConverted, salesRevenue, aiCsat, aiSummary.'),
52
+ ticketFieldsUpdatedAt: z
53
+ .string()
54
+ .optional()
55
+ .describe('Echo back on the next updateTicketField or it is rejected with 409.'),
56
+ createdAt: z.string().optional(),
57
+ updatedAt: z.string().optional(),
58
+ });
59
+ export const ticketField = z.looseObject({
60
+ id: z.string().optional(),
61
+ name: z
62
+ .string()
63
+ .optional()
64
+ .describe('Label shown in the app. Match on this.'),
65
+ description: z.string().optional(),
66
+ displayType: z.string().optional(),
67
+ dataType: z
68
+ .string()
69
+ .optional()
70
+ .describe('Values must match: string, number, boolean or date.'),
71
+ sortOrder: z.number().optional(),
72
+ selectOptions: z
73
+ .array(openObject())
74
+ .optional()
75
+ .describe('Permitted values for select fields.'),
76
+ regex: z.string().optional(),
77
+ isRequired: z.boolean().optional(),
78
+ showConditions: z.array(openObject()).optional(),
79
+ maxItems: z.number().optional(),
80
+ active: z.boolean().optional(),
81
+ accounts: z.array(openObject()).optional(),
82
+ createdAt: z.string().optional(),
83
+ updatedAt: z.string().optional(),
84
+ });
85
+ export const conversation = z.looseObject({
86
+ id: z.string().optional(),
87
+ accountId: z.string().optional(),
88
+ account: relatedChannel.optional(),
89
+ channel: channel.optional(),
90
+ displayName: z.string().optional(),
91
+ contactId: z.string().optional(),
92
+ referenceId: z
93
+ .string()
94
+ .optional()
95
+ .describe("The channel's own conversation id."),
96
+ labelIds: z.array(z.string()).optional(),
97
+ isSpam: z.boolean().optional(),
98
+ unreadMsgCnt: z.number().optional(),
99
+ allMsgCnt: z.number().optional(),
100
+ emailSubject: z.string().optional(),
101
+ lastRecipientMsgDate: z.string().optional(),
102
+ lastMsg: z
103
+ .looseObject({
104
+ snippet: z.string().optional(),
105
+ sentByRecipient: z.boolean().optional(),
106
+ sentAt: z.string().optional(),
107
+ })
108
+ .optional(),
109
+ createdAt: z.string().optional(),
110
+ updatedAt: z.string().optional(),
111
+ });
112
+ export const contact = z.looseObject({
113
+ id: z.string().optional(),
114
+ fullName: z.string().optional(),
115
+ firstName: z.string().optional(),
116
+ lastName: z.string().optional(),
117
+ email: z.string().optional(),
118
+ phone: z.string().optional(),
119
+ secondaryPhones: z.array(z.string()).optional(),
120
+ secondaryEmails: z.array(z.string()).optional(),
121
+ addresses: z.array(z.string()).optional(),
122
+ note: z.string().optional(),
123
+ customFields: openObject().optional().describe('Keyed by contact field id.'),
124
+ customFieldsUpdatedAt: z
125
+ .string()
126
+ .optional()
127
+ .describe('Echo back as updatedAt on the next updateContactField. Absent means send updatedAt instead.'),
128
+ createdAt: z.string().optional(),
129
+ updatedAt: z.string().optional(),
130
+ });
131
+ export const contactField = z.looseObject({
132
+ id: z.string().optional(),
133
+ name: z
134
+ .string()
135
+ .optional()
136
+ .describe('Label shown in the app. Match on this.'),
137
+ description: z.string().optional(),
138
+ displayType: z.string().optional(),
139
+ dataType: z
140
+ .string()
141
+ .optional()
142
+ .describe('Values must match: string, number, boolean or date.'),
143
+ active: z.boolean().optional(),
144
+ sortOrder: z.number().optional(),
145
+ selectOptions: z
146
+ .array(openObject())
147
+ .optional()
148
+ .describe('Permitted values for select fields.'),
149
+ regex: z.string().optional(),
150
+ maxItems: z.number().optional(),
151
+ });
152
+ export const contactSearchHit = z.looseObject({
153
+ id: z.string().optional(),
154
+ fullName: z.string().optional(),
155
+ phone: z.string().optional(),
156
+ email: z.string().optional(),
157
+ secondaryPhones: z.array(z.string()).optional(),
158
+ secondaryEmails: z.array(z.string()).optional(),
159
+ addresses: z.array(z.string()).optional(),
160
+ note: z.string().optional(),
161
+ matchedFields: z
162
+ .array(z.string())
163
+ .optional()
164
+ .describe('Which fields matched.'),
165
+ });
166
+ export const message = z.looseObject({
167
+ id: z.string().optional(),
168
+ conversationId: z.string().optional(),
169
+ text: z.string().optional(),
170
+ messageDirection: z
171
+ .enum(['inbound', 'outbound'])
172
+ .optional()
173
+ .describe('inbound is from the contact, outbound from the store.'),
174
+ messageCategory: z.string().optional(),
175
+ type: z.string().optional(),
176
+ sender: openObject().optional(),
177
+ sentAt: z.string().optional(),
178
+ conversation: relatedChannel.optional(),
179
+ account: relatedChannel.optional(),
180
+ sentBy: relatedSeller.optional(),
181
+ });
182
+ export const messageSearchHit = z.looseObject({
183
+ id: z.string().optional(),
184
+ conversationId: z.string().optional(),
185
+ text: z.string().optional(),
186
+ sentByRecipient: z
187
+ .boolean()
188
+ .optional()
189
+ .describe('true when the contact sent it.'),
190
+ sentAt: z.string().optional(),
191
+ score: z.number().optional().describe('Relevance score.'),
192
+ });
193
+ export const internalComment = z.looseObject({
194
+ id: z.string().optional(),
195
+ conversationId: z.string().optional(),
196
+ conversation: relatedChannel.optional(),
197
+ accountId: z.string().optional(),
198
+ account: relatedChannel.optional(),
199
+ authorUserId: z.string().optional(),
200
+ noteData: z
201
+ .looseObject({
202
+ text: z.string().optional(),
203
+ createdBy: z.union([z.string(), relatedSeller]).optional(),
204
+ tagText: z.string().optional(),
205
+ mediaUrl: z.string().optional(),
206
+ })
207
+ .optional(),
208
+ sentAt: z.string().optional(),
209
+ createdAt: z.string().optional(),
210
+ updatedAt: z.string().optional(),
211
+ });
212
+ export const user = z.looseObject({
213
+ id: z.string().optional().describe('Seat record id. Filters nothing.'),
214
+ name: z.string().optional(),
215
+ userId: z
216
+ .string()
217
+ .optional()
218
+ .describe('User UUID. What assignment, handledBy and the team filter match on.'),
219
+ roleId: z.string().optional(),
220
+ role: z
221
+ .looseObject({ id: z.string().optional(), name: z.string().optional() })
222
+ .optional(),
223
+ });
224
+ export const label = z.looseObject({
225
+ id: z.string().optional(),
226
+ label: z.string().optional().describe('The label text.'),
227
+ color: z.string().optional(),
228
+ fbAdId: z.string().optional(),
229
+ whatsAppAdId: z.string().optional(),
230
+ metaPostId: z.string().optional(),
231
+ whatsAppBroadcastId: z.string().optional(),
232
+ isSystemLabel: z.boolean().optional(),
233
+ });
234
+ export const team = z.looseObject({
235
+ id: z.string().optional(),
236
+ name: z.string().optional(),
237
+ description: z.string().optional(),
238
+ users: z
239
+ .array(z.union([z.string(), relatedUser]))
240
+ .optional()
241
+ .describe('User ids, or { id, name } under expand=users.'),
242
+ });
243
+ export const account = z.looseObject({
244
+ id: z.string().optional(),
245
+ channel: channel.optional(),
246
+ name: z.string().optional(),
247
+ status: z
248
+ .enum(['healthy', 'unhealthy', 'disconnected'])
249
+ .optional()
250
+ .describe('Sending on anything but healthy may fail at the channel.'),
251
+ lastAuthorizedAt: z.string().optional(),
252
+ metadata: openObject().optional(),
253
+ });
254
+ export const acknowledgement = z
255
+ .looseObject({ message: z.string().optional() })
256
+ .describe('Acknowledgement only. Re-read the resource to confirm the result.');
257
+ const pagination = z.looseObject({
258
+ pageSize: z.string().optional(),
259
+ nextCursor: z
260
+ .string()
261
+ .optional()
262
+ .describe('Pass back as cursor for the next page. Absent on the last page.'),
263
+ });
264
+ export function envelope(data, dataDescription, options = {}) {
265
+ return z.looseObject({
266
+ status: z.number().describe('HTTP status from the Open API.'),
267
+ data: data.describe(dataDescription),
268
+ ...(options.paginated ? { pagination: pagination.optional() } : {}),
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pE,CAAC;AAEJ,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,iEAAiE,CAClE;CACJ,CAAC,CAAC;AAOH,MAAM,UAAU,QAAQ,CACtB,IAAO,EACP,eAAuB,EACvB,UAAmC,EAAE;IAErC,OAAO,CAAC,CAAC,WAAW,CAAC;QACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QAC7D,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;QACpC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpE,CAAC,CAAC;AACL,CAAC"}
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { describeHttpRequest, expand, paginationFields, paginationQueryKeys, } from '../common.js';
2
+ import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ import { envelope, team } from '../responses.js';
3
4
  const queryKeys = ['userId', ...paginationQueryKeys];
4
5
  export const listTeams = {
5
6
  name: 'listTeams',
6
7
  title: 'List teams',
7
- description: `Required scope: teams:read. ${describeHttpRequest('GET', '/v1/teams', queryKeys)} Teams for the store. Pass userId to return only teams containing that user. Pass expand=users to return member { id, name }.`,
8
+ description: 'Page through the teams on the store and their members. Pass userId to return only the teams containing that user. There is no team filter on tickets — to scope a ticket query to a team, read its members here and pass their UUIDs as listTickets assigneeUserIds. Requires the teams:read scope.',
9
+ scope: 'teams:read',
8
10
  method: 'GET',
9
11
  path: '/v1/teams',
10
12
  queryKeys,
@@ -13,10 +15,13 @@ export const listTeams = {
13
15
  .string()
14
16
  .min(1)
15
17
  .optional()
16
- .describe('Query parameter. Return only teams containing this user (UUID).'),
18
+ .describe('Return only teams containing this user UUID.'),
17
19
  ...paginationFields,
18
- expand: expand('Pass users to return each member as { id, name } when that user exists on the store.'),
20
+ expand: expand(['users'], 'Return each member as { id, name } when that user still exists on the store.'),
19
21
  }),
20
- annotations: { readOnlyHint: true },
22
+ outputSchema: envelope(z.array(team), 'A page of teams.', {
23
+ paginated: true,
24
+ }),
25
+ annotations: { readOnlyHint: true, openWorldHint: true },
21
26
  };
22
27
  //# sourceMappingURL=list-teams.js.map
@@ -1 +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,mBAAmB,EACnB,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,+BAA+B,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,+HAA+H;IAC7N,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,WAAW;IACjB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CACP,iEAAiE,CAClE;QACH,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,sFAAsF,CACvF;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
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;AACtB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,SAAS,GAAiB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,qSAAqS;IACvS,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,WAAW;IACjB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,8CAA8C,CAAC;QAC3D,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,CAAC,OAAO,CAAC,EACT,8EAA8E,CAC/E;KACF,CAAC;IACF,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,kBAAkB,EAAE;QACxD,SAAS,EAAE,IAAI;KAChB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;CACzD,CAAC"}
@@ -1,40 +1,47 @@
1
1
  import { z } from 'zod';
2
- import { describeHttpRequest, expand, fieldValue, } from '../common.js';
2
+ import { expand, fieldValue } from '../common.js';
3
+ import { envelope, ticket } from '../responses.js';
3
4
  const queryKeys = ['expand'];
4
5
  export const closeTicket = {
5
6
  name: 'closeTicket',
6
7
  title: 'Close a ticket',
7
- description: `Required scope: tickets:write. ${describeHttpRequest('PATCH', '/v1/tickets/close', queryKeys)} Close a ticket. You can record who handled it, conversion details, and ticket field values in the same request.`,
8
+ description: 'Close a ticket, optionally recording who handled it, whether it converted, and any ticket field values in the same request. Closing ends the ticket that fronts the conversation, so confirm with the user before calling it. handledBy is a user UUID — the userId from listUsers, not the id beside it. Requires the tickets:write scope.',
9
+ scope: 'tickets:write',
8
10
  method: 'PATCH',
9
11
  path: '/v1/tickets/close',
10
12
  queryKeys,
11
13
  inputSchema: z.object({
12
- expand: expand('Related objects to include on the closed ticket: account, conversation, assignee, handledBy.'),
13
- ticketId: z.string().min(1).describe('JSON body. The ID of the ticket.'),
14
+ expand: expand(['account', 'conversation', 'assignee', 'handledBy'], 'Replace these ids on the returned ticket with the named object.'),
15
+ ticketId: z.string().min(1).describe('The ID of the ticket.'),
14
16
  handledBy: z
15
17
  .string()
16
18
  .min(1)
17
19
  .optional()
18
- .describe('JSON body. UUID of the user who handled the ticket.'),
20
+ .describe('User UUID of whoever handled the ticket, from listUsers userId.'),
19
21
  isConverted: z
20
22
  .boolean()
21
23
  .optional()
22
- .describe('JSON body. Whether the conversation led to a conversion.'),
24
+ .describe('Whether the conversation led to a conversion.'),
23
25
  totalRevenue: z
24
26
  .number()
25
27
  .min(0)
26
28
  .optional()
27
- .describe('JSON body. Conversion revenue recorded on close.'),
29
+ .describe('Conversion revenue recorded on close.'),
28
30
  currency: z
29
31
  .string()
30
32
  .optional()
31
- .describe('JSON body. Currency of the conversion revenue.'),
33
+ .describe('Currency of the conversion revenue.'),
32
34
  ticketFields: z
33
35
  .object({})
34
36
  .catchall(fieldValue)
35
37
  .optional()
36
- .describe('JSON body. Ticket field values to set when closing, keyed by field id. Must be a non-empty object when sent.'),
38
+ .describe('Ticket field values to set while closing, keyed by field id from listTicketFields. Must be non-empty when sent.'),
37
39
  }),
38
- annotations: { readOnlyHint: false, destructiveHint: true },
40
+ outputSchema: envelope(ticket, 'The ticket after it was closed.'),
41
+ annotations: {
42
+ readOnlyHint: false,
43
+ destructiveHint: true,
44
+ openWorldHint: true,
45
+ },
39
46
  };
40
47
  //# sourceMappingURL=close-ticket.js.map
@@ -1 +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,EACL,mBAAmB,EACnB,MAAM,EACN,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,QAAQ,CAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,CAAC,kHAAkH;IAC7N,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,mBAAmB;IACzB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CACZ,8FAA8F,CAC/F;QACD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QACxE,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,qDAAqD,CAAC;QAClE,WAAW,EAAE,CAAC;aACX,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CAAC,0DAA0D,CAAC;QACvE,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,gDAAgD,CAAC;QAC7D,YAAY,EAAE,CAAC;aACZ,MAAM,CAAC,EAAE,CAAC;aACV,QAAQ,CAAC,UAAU,CA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CAAuC,CAAC;QACpD,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qCAAqC,CAAC;QAClD,YAAY,EAAE,CAAC;aACZ,MAAM,CAAC,EAAE,CAAC;aACV,QAAQ,CAAC,UAAU,CAAC;aACpB,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;KACJ,CAAC;IACF,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,iCAAiC,CAAC;IACjE,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,IAAI;KACpB;CACF,CAAC"}
@@ -1,20 +1,20 @@
1
1
  import { z } from 'zod';
2
- import { describeHttpRequest, expand } from '../common.js';
2
+ import { expand } from '../common.js';
3
+ import { envelope, ticket } from '../responses.js';
3
4
  const queryKeys = ['ticketId', 'expand'];
4
5
  export const getTicketById = {
5
6
  name: 'getTicketById',
6
7
  title: 'Get a ticket by ID',
7
- description: `Required scope: tickets:read. ${describeHttpRequest('GET', '/v1/tickets', queryKeys)} Fetch a single ticket. Pass expand=account,conversation,assignee,handledBy to replace those ids with names.`,
8
+ description: 'Fetch one ticket by id, including its custom field values and the conversationId and contactId that the message and contact tools need. Read this before updateTicketField or closeTicket: the response carries the ticketFieldsUpdatedAt those calls must echo back. Requires the tickets:read scope.',
9
+ scope: 'tickets:read',
8
10
  method: 'GET',
9
11
  path: '/v1/tickets',
10
12
  queryKeys,
11
13
  inputSchema: z.object({
12
- ticketId: z
13
- .string()
14
- .min(1)
15
- .describe('Query parameter. The ID of the ticket.'),
16
- expand: expand('Comma-separated related objects to include: account, conversation, assignee, handledBy.'),
14
+ ticketId: z.string().min(1).describe('The ID of the ticket.'),
15
+ expand: expand(['account', 'conversation', 'assignee', 'handledBy'], 'Replace these ids with the named object, saving a follow-up call.'),
17
16
  }),
18
- annotations: { readOnlyHint: true },
17
+ outputSchema: envelope(ticket, 'The ticket.'),
18
+ annotations: { readOnlyHint: true, openWorldHint: true },
19
19
  };
20
20
  //# sourceMappingURL=get-ticket-by-id.js.map
@@ -1 +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,mBAAmB,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAE9E,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,iCAAiC,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,CAAC,8GAA8G;IAChN,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,aAAa;IACnB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,MAAM,EAAE,MAAM,CACZ,yFAAyF,CAC1F;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
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;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,wSAAwS;IAC1S,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,aAAa;IACnB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAC7D,MAAM,EAAE,MAAM,CACZ,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,CAAC,EACpD,mEAAmE,CACpE;KACF,CAAC;IACF,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC7C,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;CACzD,CAAC"}
@@ -1,16 +1,19 @@
1
1
  import { z } from 'zod';
2
- import { describeHttpRequest, expand } from '../common.js';
2
+ import { expand } from '../common.js';
3
+ import { envelope, ticketField } from '../responses.js';
3
4
  const queryKeys = ['expand'];
4
5
  export const listTicketFields = {
5
6
  name: 'listTicketFields',
6
7
  title: 'List ticket fields',
7
- description: `Required scope: tickets:read. ${describeHttpRequest('GET', '/v1/tickets/fields', queryKeys)} Full catalog of custom ticket field definitions, in display order. Not paginated. Pass expand=accounts to include the accounts each field applies to.`,
8
+ description: "Full catalog of the store's custom ticket field definitions, in display order. Not paginated. Call this first whenever a request names a field by its label — the ids, data types and select options here are what updateTicketField and the listTickets advancedFilters.ticketFields filter take. Requires the tickets:read scope.",
9
+ scope: 'tickets:read',
8
10
  method: 'GET',
9
11
  path: '/v1/tickets/fields',
10
12
  queryKeys,
11
13
  inputSchema: z.object({
12
- expand: expand('Pass accounts to include the accounts each field applies to.'),
14
+ expand: expand(['accounts'], 'Include the accounts each field applies to.'),
13
15
  }),
14
- annotations: { readOnlyHint: true },
16
+ outputSchema: envelope(z.array(ticketField), 'Every ticket field definition on the store, in display order.'),
17
+ annotations: { readOnlyHint: true, openWorldHint: true },
15
18
  };
16
19
  //# sourceMappingURL=list-ticket-fields.js.map
@@ -1 +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,mBAAmB,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAE9E,MAAM,SAAS,GAAG,CAAC,QAAQ,CAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,iCAAiC,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,EAAE,SAAS,CAAC,wJAAwJ;IACjQ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS;IACT,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"}
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;AACzD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,SAAS,GAAG,CAAC,QAAQ,CAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,qUAAqU;IACvU,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,EAAE,6CAA6C,CAAC;KAC5E,CAAC;IACF,YAAY,EAAE,QAAQ,CACpB,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,EACpB,+DAA+D,CAChE;IACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;CACzD,CAAC"}
@@ -1,37 +1,39 @@
1
1
  import { z } from 'zod';
2
- import { describeHttpRequest, expand, fieldValue, paginationFields, paginationQueryKeys, } from '../common.js';
2
+ import { expand, fieldValue, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ import { envelope, ticket } from '../responses.js';
3
4
  const TICKET_FILTER_ARRAY_MAX = 20;
4
5
  export const listTickets = {
5
6
  name: 'listTickets',
6
7
  title: 'List tickets',
7
- description: `Required scope: tickets:read. ${describeHttpRequest('POST', '/v1/tickets/list', paginationQueryKeys)} Page through tickets, newest message first. An omitted or empty JSON body returns open, non-spam tickets that are not snoozed. When conversationId is set and statuses is omitted, open and closed tickets for that conversation are returned. Do not send assigneeUserIds together with unassigned: true.`,
8
+ description: 'The main way into the store: page through tickets, newest message first, and read the conversationId and contactId off them to reach messages, labels and contacts. Send no filters at all for the current queue — open, non-spam, not snoozed. Setting conversationId with statuses omitted returns every ticket on that thread instead, open and closed. assigneeUserIds and handledByUserIds take user UUIDs, the userId from listUsers rather than the id beside it, and assigneeUserIds cannot be combined with unassigned: true. Requires the tickets:read scope.',
9
+ scope: 'tickets:read',
8
10
  method: 'POST',
9
11
  path: '/v1/tickets/list',
10
12
  queryKeys: paginationQueryKeys,
11
13
  inputSchema: z.object({
12
14
  ...paginationFields,
13
- expand: expand('Pass account,conversation,assignee,handledBy to replace those ids with names.'),
15
+ expand: expand(['account', 'conversation', 'assignee', 'handledBy'], 'Replace these ids on every ticket with the named object, saving a follow-up call.'),
14
16
  statuses: z
15
17
  .array(z.enum(['open', 'closed']))
16
18
  .optional()
17
- .describe('JSON body. Open and/or closed tickets. Omit to return open tickets only. When conversationId is set, omitting statuses returns every status for that conversation.'),
19
+ .describe('Open and/or closed tickets. Omit to return open tickets only. When conversationId is set, omitting statuses returns every status for that conversation.'),
18
20
  conversationId: z
19
21
  .string()
20
22
  .min(1)
21
23
  .optional()
22
- .describe('JSON body. Restrict results to tickets belonging to this conversation.'),
24
+ .describe('Restrict results to tickets belonging to this conversation.'),
23
25
  accountIds: z
24
26
  .array(z.string())
25
27
  .optional()
26
- .describe('JSON body. Restrict results to these account IDs.'),
28
+ .describe('Restrict results to these account IDs, from listAccounts.'),
27
29
  assigneeUserIds: z
28
30
  .array(z.string())
29
31
  .optional()
30
- .describe('JSON body. Restrict results to these assignee user IDs. Cannot be combined with unassigned: true.'),
32
+ .describe('Restrict results to these assignee user UUIDs (User.userId). Cannot be combined with unassigned: true.'),
31
33
  handledByUserIds: z
32
34
  .array(z.string())
33
35
  .optional()
34
- .describe('JSON body. Restrict results to tickets handled by these user IDs.'),
36
+ .describe('Restrict results to tickets handled by these user UUIDs (User.userId).'),
35
37
  resolutionStatuses: z
36
38
  .array(z.enum([
37
39
  'none',
@@ -41,19 +43,16 @@ export const listTickets = {
41
43
  'ai_partial_resolution',
42
44
  ]))
43
45
  .optional()
44
- .describe('JSON body. Restrict results to these resolution statuses.'),
46
+ .describe('Restrict results to these resolution statuses.'),
45
47
  unassigned: z
46
48
  .boolean()
47
49
  .optional()
48
- .describe('JSON body. When true, only tickets with no assignee. Cannot be combined with assigneeUserIds.'),
49
- isFollowUp: z
50
- .boolean()
51
- .optional()
52
- .describe('JSON body. Filter by follow-up flag.'),
50
+ .describe('When true, only tickets with no assignee. Cannot be combined with assigneeUserIds.'),
51
+ isFollowUp: z.boolean().optional().describe('Filter by follow-up flag.'),
53
52
  isSpam: z
54
53
  .boolean()
55
54
  .optional()
56
- .describe('JSON body. Filter by spam flag. Defaults to non-spam tickets when omitted.'),
55
+ .describe('Filter by spam flag. Defaults to non-spam tickets when omitted.'),
57
56
  advancedFilters: z
58
57
  .object({
59
58
  labels: z
@@ -66,12 +65,12 @@ export const listTickets = {
66
65
  labelIds: z.array(z.string()).min(1).max(TICKET_FILTER_ARRAY_MAX),
67
66
  })
68
67
  .optional()
69
- .describe('JSON body. Filter tickets by conversation labels.'),
68
+ .describe('Filter tickets by conversation labels. Label ids come from listLabels.'),
70
69
  ticketFields: z
71
70
  .array(z.object({
72
71
  ticketFieldId: z
73
72
  .string()
74
- .describe('Custom field id, or a system key: aiCsat, aiSummary, salesRevenue, isConverted.'),
73
+ .describe('Custom field id from listTicketFields, or a system key: aiCsat, aiSummary, salesRevenue, isConverted.'),
75
74
  operator: z.enum([
76
75
  'equal',
77
76
  'not_equal',
@@ -99,13 +98,13 @@ export const listTickets = {
99
98
  .describe('Upper bound for between. Required with min when operator is between.'),
100
99
  }))
101
100
  .optional()
102
- .describe('JSON body. Filter on custom ticket fields or system fields.'),
101
+ .describe('Filter on custom ticket fields or system fields.'),
103
102
  waitingForReply: z
104
103
  .object({
105
104
  value: z.number().int().min(1).max(43200),
106
105
  })
107
106
  .optional()
108
- .describe('JSON body. Tickets where the buyer has been waiting at least this many minutes (1–43200).'),
107
+ .describe('Tickets where the buyer has been waiting at least this many minutes (1–43200).'),
109
108
  openedAt: z
110
109
  .object({
111
110
  operator: z.enum(['between', 'greater_than', 'less_than']),
@@ -123,11 +122,12 @@ export const listTickets = {
123
122
  .describe('ISO 8601 date-time. Upper bound when operator is between.'),
124
123
  })
125
124
  .optional()
126
- .describe('JSON body. Filter by ticket opened-at time.'),
125
+ .describe('Filter by ticket opened-at time.'),
127
126
  })
128
127
  .optional()
129
- .describe('JSON body. Optional extra filters on labels, ticket fields, waiting time, and opened-at.'),
128
+ .describe('Optional extra filters on labels, ticket fields, waiting time, and opened-at.'),
130
129
  }),
131
- annotations: { readOnlyHint: true },
130
+ outputSchema: envelope(z.array(ticket), 'A page of tickets, newest message first.', { paginated: true }),
131
+ annotations: { readOnlyHint: true, openWorldHint: true },
132
132
  };
133
133
  //# sourceMappingURL=list-tickets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-tickets.js","sourceRoot":"","sources":["../../../src/tools/tickets/list-tickets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,iCAAiC,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,6SAA6S;IAC/Z,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,kBAAkB;IACxB,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,+EAA+E,CAChF;QACD,QAAQ,EAAE,CAAC;aACR,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;aACjC,QAAQ,EAAE;aACV,QAAQ,CACP,oKAAoK,CACrK;QACH,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CACP,wEAAwE,CACzE;QACH,UAAU,EAAE,CAAC;aACV,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CAAC,mDAAmD,CAAC;QAChE,eAAe,EAAE,CAAC;aACf,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,Q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