@zaapi/open-api-mcp 1.0.1 → 1.1.1

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 (45) hide show
  1. package/dist/tools/accounts/list-accounts.js +6 -4
  2. package/dist/tools/accounts/list-accounts.js.map +1 -1
  3. package/dist/tools/common.js +33 -5
  4. package/dist/tools/common.js.map +1 -1
  5. package/dist/tools/contacts/create-contact.js +21 -6
  6. package/dist/tools/contacts/create-contact.js.map +1 -1
  7. package/dist/tools/contacts/get-contact-by-id.js +8 -3
  8. package/dist/tools/contacts/get-contact-by-id.js.map +1 -1
  9. package/dist/tools/contacts/list-contact-fields.js +4 -2
  10. package/dist/tools/contacts/list-contact-fields.js.map +1 -1
  11. package/dist/tools/contacts/list-contacts.js +13 -6
  12. package/dist/tools/contacts/list-contacts.js.map +1 -1
  13. package/dist/tools/contacts/update-contact-field.js +14 -6
  14. package/dist/tools/contacts/update-contact-field.js.map +1 -1
  15. package/dist/tools/conversations/filter-conversations.js +23 -18
  16. package/dist/tools/conversations/filter-conversations.js.map +1 -1
  17. package/dist/tools/conversations/mark-conversation-read.js +8 -3
  18. package/dist/tools/conversations/mark-conversation-read.js.map +1 -1
  19. package/dist/tools/conversations/update-conversation-labels.js +24 -14
  20. package/dist/tools/conversations/update-conversation-labels.js.map +1 -1
  21. package/dist/tools/labels/list-labels.js +10 -4
  22. package/dist/tools/labels/list-labels.js.map +1 -1
  23. package/dist/tools/messages/create-internal-comment.js +12 -4
  24. package/dist/tools/messages/create-internal-comment.js.map +1 -1
  25. package/dist/tools/messages/get-messages.js +30 -20
  26. package/dist/tools/messages/get-messages.js.map +1 -1
  27. package/dist/tools/messages/list-internal-comments.js +8 -4
  28. package/dist/tools/messages/list-internal-comments.js.map +1 -1
  29. package/dist/tools/messages/send-plain-text-message.js +13 -4
  30. package/dist/tools/messages/send-plain-text-message.js.map +1 -1
  31. package/dist/tools/teams/list-teams.js +9 -4
  32. package/dist/tools/teams/list-teams.js.map +1 -1
  33. package/dist/tools/tickets/close-ticket.js +29 -10
  34. package/dist/tools/tickets/close-ticket.js.map +1 -1
  35. package/dist/tools/tickets/get-ticket-by-id.js +9 -5
  36. package/dist/tools/tickets/get-ticket-by-id.js.map +1 -1
  37. package/dist/tools/tickets/list-ticket-fields.js +4 -3
  38. package/dist/tools/tickets/list-ticket-fields.js.map +1 -1
  39. package/dist/tools/tickets/list-tickets.js +70 -25
  40. package/dist/tools/tickets/list-tickets.js.map +1 -1
  41. package/dist/tools/tickets/update-ticket-field.js +12 -8
  42. package/dist/tools/tickets/update-ticket-field.js.map +1 -1
  43. package/dist/tools/users/list-users.js +10 -5
  44. package/dist/tools/users/list-users.js.map +1 -1
  45. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
1
  import { z } from 'zod';
2
- import { paginationFields } from '../common.js';
2
+ import { describeHttpRequest, paginationFields, } from '../common.js';
3
+ const queryKeys = ['channel', 'pageSize', 'cursor'];
3
4
  export const listAccounts = {
4
5
  name: 'listAccounts',
5
6
  title: 'List accounts',
6
- description: 'Required scope: accounts:read. Page through the channel accounts connected to the store. Only active accounts are returned. Filter to a single channel when needed. Use status to tell whether an account is currently healthy.',
7
+ description: `Required scope: accounts:read. ${describeHttpRequest('GET', '/v1/accounts', queryKeys)} Page through the channel accounts connected to the store. Only active accounts are returned. Filter to a single channel when needed. Each account includes a status of healthy, unhealthy, or disconnected.`,
7
8
  method: 'GET',
8
9
  path: '/v1/accounts',
9
- queryKeys: ['channel', 'pageSize', 'cursor'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
12
  channel: z
12
13
  .enum([
@@ -16,13 +17,14 @@ export const listAccounts = {
16
17
  'lazada',
17
18
  'shopee',
18
19
  'tiktok',
20
+ 'drunken_lullabies',
19
21
  'whatsapp',
20
22
  'widget',
21
23
  'gmail',
22
24
  'outlook',
23
25
  ])
24
26
  .optional()
25
- .describe('Return only the accounts on this channel.'),
27
+ .describe('Query parameter. Return only the accounts on this channel.'),
26
28
  ...paginationFields,
27
29
  }),
28
30
  annotations: { readOnlyHint: true },
@@ -1 +1 @@
1
- {"version":3,"file":"list-accounts.js","sourceRoot":"","sources":["../../../src/tools/accounts/list-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAqB,MAAM,cAAc,CAAC;AAEnE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,iOAAiO;IACnO,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,CAAC;aACP,IAAI,CAAC;YACJ,MAAM;YACN,WAAW;YACX,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,QAAQ;YACR,UAAU;YACV,QAAQ;YACR,OAAO;YACP,SAAS;SACV,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,CAAC,2CAA2C,CAAC;QACxD,GAAG,gBAAgB;KACpB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
1
+ {"version":3,"file":"list-accounts.js","sourceRoot":"","sources":["../../../src/tools/accounts/list-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAE7D,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,CAAC,8MAA8M;IAClT,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,CAAC;aACP,IAAI,CAAC;YACJ,MAAM;YACN,WAAW;YACX,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,QAAQ;YACR,mBAAmB;YACnB,UAAU;YACV,QAAQ;YACR,OAAO;YACP,SAAS;SACV,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;QACzE,GAAG,gBAAgB;KACpB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,25 +1,53 @@
1
1
  import { z } from 'zod';
2
+ export function describeHttpRequest(method, path, queryKeys) {
3
+ const query = queryKeys.length > 0
4
+ ? `Query parameters: ${queryKeys.join(', ')}.`
5
+ : 'There are no query parameters.';
6
+ const body = method === 'GET'
7
+ ? 'There is no JSON body.'
8
+ : queryKeys.length === 0
9
+ ? 'All arguments are sent as a JSON body.'
10
+ : 'All other arguments are sent as a JSON body.';
11
+ return `${method} ${path}. ${query} ${body}`;
12
+ }
2
13
  export const pageSize = z
3
14
  .number()
4
15
  .int()
5
16
  .min(1)
6
17
  .max(50)
7
18
  .optional()
8
- .describe('Items per page. Defaults to 20. Maximum 50.');
19
+ .describe('Query parameter. Items per page. Defaults to 20. Maximum 50.');
9
20
  export const messagePageSize = z
10
21
  .number()
11
22
  .int()
12
23
  .min(1)
13
24
  .max(15)
14
- .describe('Items per page. Required — the default of 20 exceeds the maximum 15 on this endpoint.');
25
+ .optional()
26
+ .describe('Query parameter. Items per page. Defaults to 15. Maximum 15.');
15
27
  export const cursor = z
16
28
  .string()
17
29
  .optional()
18
- .describe('Opaque token from the previous page x-pagination-next-cursor header.');
30
+ .describe('Query parameter. Opaque token from the previous page x-pagination-next-cursor header.');
31
+ export const fieldValue = z.union([
32
+ z.string(),
33
+ z.number(),
34
+ z.boolean(),
35
+ z.null(),
36
+ z.array(z.string()),
37
+ z.array(z.number()),
38
+ ]);
19
39
  export const expand = (description) => z
20
- .union([z.string(), z.array(z.string())])
40
+ .preprocess((value) => {
41
+ if (typeof value !== 'string') {
42
+ return value;
43
+ }
44
+ return value
45
+ .split(',')
46
+ .map((name) => name.trim())
47
+ .filter(Boolean);
48
+ }, z.array(z.string()))
21
49
  .optional()
22
- .describe(description);
50
+ .describe(`Query parameter. ${description}`);
23
51
  export const paginationQueryKeys = ['pageSize', 'cursor', 'expand'];
24
52
  export const paginationFields = {
25
53
  pageSize,
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/tools/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,GAAG,EAAE;KACL,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,QAAQ,EAAE;KACV,QAAQ,CAAC,6CAA6C,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,EAAE;KACR,GAAG,EAAE;KACL,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,QAAQ,CACP,uFAAuF,CACxF,CAAC;AAEJ,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,sEAAsE,CACvE,CAAC;AAEJ,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,WAAmB,EAAE,EAAE,CAC5C,CAAC;KACE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACxC,QAAQ,EAAE;KACV,Q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MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,uFAAuF,CACxF,CAAC;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,OAAO,EAAE;IACX,CAAC,CAAC,IAAI,EAAE;IACR,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,WAAmB,EAAE,EAAE,CAC5C,CAAC;KACE,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;IACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KACtB,QAAQ,EAAE;KACV,QAAQ,CAAC,oBAAoB,WAAW,EAAE,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,MAAM;CACP,CAAC"}
@@ -1,20 +1,35 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const createContact = {
3
5
  name: 'createContact',
4
6
  title: 'Create a contact',
5
- description: 'Required scope: contacts:write. Create a contact. A contact whose email or phone already exists is rejected with 409.',
7
+ description: `Required scope: contacts:write. ${describeHttpRequest('POST', '/v1/contacts', queryKeys)} Create a contact. A contact whose email or phone already exists on the store is rejected with 409.`,
6
8
  method: 'POST',
7
9
  path: '/v1/contacts',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- firstName: z.string().max(50),
11
- lastName: z.string().max(50).optional(),
12
- email: z.string().email().max(100).optional(),
12
+ firstName: z
13
+ .string()
14
+ .min(1)
15
+ .max(50)
16
+ .describe('JSON body. First name of the contact. Maximum 50 characters.'),
17
+ lastName: z
18
+ .string()
19
+ .max(50)
20
+ .optional()
21
+ .describe('JSON body. Last name of the contact. Maximum 50 characters.'),
22
+ email: z
23
+ .string()
24
+ .email()
25
+ .max(100)
26
+ .optional()
27
+ .describe('JSON body. Primary email address. Maximum 100 characters.'),
13
28
  phone: z
14
29
  .string()
15
30
  .max(15)
16
31
  .optional()
17
- .describe('Primary phone number in E.164 format.'),
32
+ .describe('JSON body. Primary phone number in E.164 format. Maximum 15 characters.'),
18
33
  }),
19
34
  annotations: { readOnlyHint: false, destructiveHint: false },
20
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"create-contact.js","sourceRoot":"","sources":["../../../src/tools/contacts/create-contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,uHAAuH;IACzH,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EA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AE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,EAAE,CAAC;aACP,QAAQ,EAAE;aACV,QAAQ,CACP,yEAAyE,CAC1E;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,13 +1,18 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = ['contactId'];
2
4
  export const getContactById = {
3
5
  name: 'getContactById',
4
6
  title: 'Get a contact by ID',
5
- description: 'Required scope: contacts:read. Fetch a single contact, including custom field values.',
7
+ description: `Required scope: contacts:read. ${describeHttpRequest('GET', '/v1/contacts', queryKeys)} Fetch a single contact, including custom field values.`,
6
8
  method: 'GET',
7
9
  path: '/v1/contacts',
8
- queryKeys: ['contactId'],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- contactId: z.string(),
12
+ contactId: z
13
+ .string()
14
+ .min(1)
15
+ .describe('Query parameter. The ID of the contact.'),
11
16
  }),
12
17
  annotations: { readOnlyHint: true },
13
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-contact-by-id.js","sourceRoot":"","sources":["../../../src/tools/contacts/get-contact-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,uFAAuF;IACzF,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,CAAC,WAAW,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;KACtB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
1
+ {"version":3,"file":"get-contact-by-id.js","sourceRoot":"","sources":["../../../src/tools/contacts/get-contact-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,CAAC,WAAW,CAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,CAAC,yDAAyD;IAC7J,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,yCAAyC,CAAC;KACvD,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const listContactFields = {
3
5
  name: 'listContactFields',
4
6
  title: 'List contact fields',
5
- description: 'Required scope: contacts:read. Fetch contact field definitions for the store.',
7
+ description: `Required scope: contacts:read. ${describeHttpRequest('GET', '/v1/contacts/fields', queryKeys)} Full catalog of contact field definitions for the store. Not paginated.`,
6
8
  method: 'GET',
7
9
  path: '/v1/contacts/fields',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({}),
10
12
  annotations: { readOnlyHint: true },
11
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list-contact-fields.js","sourceRoot":"","sources":["../../../src/tools/contacts/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"}
1
+ {"version":3,"file":"list-contact-fields.js","sourceRoot":"","sources":["../../../src/tools/contacts/list-contact-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,EAAW,CAAC;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,EAAE,SAAS,CAAC,0EAA0E;IACrL,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,qBAAqB;IAC3B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,21 +1,28 @@
1
1
  import { z } from 'zod';
2
- import { paginationFields } from '../common.js';
2
+ import { describeHttpRequest, paginationFields, } from '../common.js';
3
+ const queryKeys = ['pageSize', 'cursor'];
3
4
  export const listContacts = {
4
5
  name: 'listContacts',
5
6
  title: 'List contacts',
6
- description: 'Required scope: contacts:read. Search and page through contacts, most recently updated first.',
7
+ description: `Required scope: contacts:read. ${describeHttpRequest('POST', '/v1/contacts/list', queryKeys)} Search and page through contacts, most recently updated first.`,
7
8
  method: 'POST',
8
9
  path: '/v1/contacts/list',
9
- queryKeys: ['pageSize', 'cursor'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
12
  ...paginationFields,
12
13
  search: z
13
14
  .string()
14
15
  .max(100)
15
16
  .optional()
16
- .describe('Free-text search across name, email, and phone.'),
17
- updatedAfter: z.string().optional(),
18
- updatedBefore: z.string().optional(),
17
+ .describe('JSON body. Free-text search across name, email, and phone. Maximum 100 characters.'),
18
+ updatedAfter: z
19
+ .string()
20
+ .optional()
21
+ .describe('JSON body. ISO 8601 date-time. Return only contacts updated on or after this time.'),
22
+ updatedBefore: z
23
+ .string()
24
+ .optional()
25
+ .describe('JSON body. ISO 8601 date-time. Return only contacts updated before this time.'),
19
26
  }),
20
27
  annotations: { readOnlyHint: true },
21
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list-contacts.js","sourceRoot":"","sources":["../../../src/tools/contacts/list-contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAqB,MAAM,cAAc,CAAC;AAEnE,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"}
1
+ {"version":3,"file":"list-contacts.js","sourceRoot":"","sources":["../../../src/tools/contacts/list-contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,CAAC,iEAAiE;IAC3K,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,mBAAmB;IACzB,SAAS;IACT,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,CACP,oFAAoF,CACrF;QACH,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,oFAAoF,CACrF;QACH,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,+EAA+E,CAChF;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,16 +1,24 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest, fieldValue, } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const updateContactField = {
3
5
  name: 'updateContactField',
4
6
  title: 'Update a contact field value',
5
- description: 'Required scope: contacts:write. Set or clear a custom field. Pass the customFieldsUpdatedAt you last read as updatedAt; a mismatch is rejected.',
7
+ description: `Required scope: contacts:write. ${describeHttpRequest('PATCH', '/v1/contacts/fields', queryKeys)} Set or clear a custom field. Pass the customFieldsUpdatedAt you last read as updatedAt; a mismatch is rejected with 409.`,
6
8
  method: 'PATCH',
7
9
  path: '/v1/contacts/fields',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- contactId: z.string(),
11
- contactFieldId: z.string(),
12
- value: z.any().nullable(),
13
- updatedAt: z.string(),
12
+ contactId: z.string().min(1).describe('JSON body. The ID of the contact.'),
13
+ contactFieldId: z
14
+ .string()
15
+ .min(1)
16
+ .describe('JSON body. The ID of the contact field to update.'),
17
+ value: fieldValue.describe('JSON body. New value for the field. Send null to clear it. Must match the field definition.'),
18
+ updatedAt: z
19
+ .string()
20
+ .min(1)
21
+ .describe('JSON body. ISO 8601 date-time. Pass customFieldsUpdatedAt from the last read, or the contact updatedAt when customFieldsUpdatedAt is absent.'),
14
22
  }),
15
23
  annotations: { readOnlyHint: false, destructiveHint: false },
16
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"update-contact-field.js","sourceRoot":"","sources":["../../../src/tools/contacts/update-contact-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,iJAAiJ;IACnJ,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,qBAAqB;IAC3B,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;KACtB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
1
+ {"version":3,"file":"update-contact-field.js","sourceRoot":"","sources":["../../../src/tools/contacts/update-contact-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,EAAW,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,mCAAmC,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,EAAE,SAAS,CAAC,2HAA2H;IACzO,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,qBAAqB;IAC3B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QAC1E,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,mDAAmD,CAAC;QAChE,KAAK,EAAE,UAAU,CAAC,QAAQ,CACxB,6FAA6F,CAC9F;QACD,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,8IAA8I,CAC/I;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,27 +1,32 @@
1
1
  import { z } from 'zod';
2
- import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
3
- const filterConversationsExpand = expand('Pass account to replace accountId with { id, name, channel }.');
2
+ import { describeHttpRequest, expand, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ const queryKeys = ['conversationId', 'contactId', ...paginationQueryKeys];
4
+ const filterConversationsExpand = expand('Pass account to replace accountId with { id, name, channel }. assignee is not valid on conversations.');
4
5
  export const filterConversations = {
5
6
  name: 'filterConversations',
6
7
  title: 'Filter conversations by ID or contact',
7
- description: 'Required scope: conversations:read. Send conversationId and/or contactId — at least one is required. Paginate with pageSize and cursor. Pass expand=account to replace accountId.',
8
+ description: `Required scope: conversations:read. ${describeHttpRequest('GET', '/v1/conversations', queryKeys)} Send conversationId and/or contactId — at least one is required. Paginate with pageSize (max 50) and cursor. Pass expand=account to replace accountId.`,
8
9
  method: 'GET',
9
10
  path: '/v1/conversations',
10
- queryKeys: ['conversationId', 'contactId', ...paginationQueryKeys],
11
- inputSchema: z.union([
12
- z.object({
13
- conversationId: z.string().min(1),
14
- contactId: z.string().min(1).optional(),
15
- ...paginationFields,
16
- expand: filterConversationsExpand,
17
- }),
18
- z.object({
19
- contactId: z.string().min(1),
20
- conversationId: z.string().min(1).optional(),
21
- ...paginationFields,
22
- expand: filterConversationsExpand,
23
- }),
24
- ]),
11
+ queryKeys,
12
+ inputSchema: z
13
+ .object({
14
+ conversationId: z
15
+ .string()
16
+ .min(1)
17
+ .optional()
18
+ .describe('Query parameter. The ID of the conversation.'),
19
+ contactId: z
20
+ .string()
21
+ .min(1)
22
+ .optional()
23
+ .describe('Query parameter. The ID of the contact.'),
24
+ ...paginationFields,
25
+ expand: filterConversationsExpand,
26
+ })
27
+ .refine((value) => Boolean(value.conversationId || value.contactId), {
28
+ message: 'Send conversationId and/or contactId.',
29
+ }),
25
30
  annotations: { readOnlyHint: true },
26
31
  };
27
32
  //# sourceMappingURL=filter-conversations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-conversations.js","sourceRoot":"","sources":["../../../src/tools/conversations/filter-conversations.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,yBAAyB,GAAG,MAAM,CACtC,+DAA+D,CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,uCAAuC;IAC9C,WAAW,EACT,mLAAmL;IACrL,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,CAAC,gBAAgB,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC;IAClE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,MAAM,CAAC;YACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACvC,GAAG,gBAAgB;YACnB,MAAM,EAAE,yBAAyB;SAClC,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC5C,GAAG,gBAAgB;YACnB,MAAM,EAAE,yBAAyB;SAClC,CAAC;KACH,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
1
+ {"version":3,"file":"filter-conversations.js","sourceRoot":"","sources":["../../../src/tools/conversations/filter-conversations.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,gBAAgB,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC,CAAC;AAE1E,MAAM,yBAAyB,GAAG,MAAM,CACtC,uGAAuG,CACxG,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,uCAAuC;IAC9C,WAAW,EAAE,uCAAuC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,EAAE,SAAS,CAAC,yJAAyJ;IACvQ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,mBAAmB;IACzB,SAAS;IACT,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,8CAA8C,CAAC;QAC3D,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,yCAAyC,CAAC;QACtD,GAAG,gBAAgB;QACnB,MAAM,EAAE,yBAAyB;KAClC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE;QACnE,OAAO,EAAE,uCAAuC;KACjD,CAAC;IACJ,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,13 +1,18 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const markConversationRead = {
3
5
  name: 'markConversationRead',
4
6
  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.",
7
+ description: `Required scope: conversations:write. ${describeHttpRequest('PATCH', '/v1/conversations/read', queryKeys)} Clears the unread count on the conversation's open ticket. Idempotent. A conversation with no open ticket returns 404.`,
6
8
  method: 'PATCH',
7
9
  path: '/v1/conversations/read',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- conversationId: z.string(),
12
+ conversationId: z
13
+ .string()
14
+ .min(1)
15
+ .describe('JSON body. The ID of the conversation.'),
11
16
  }),
12
17
  annotations: {
13
18
  readOnlyHint: false,
@@ -1 +1 @@
1
- {"version":3,"file":"mark-conversation-read.js","sourceRoot":"","sources":["../../../src/tools/conversations/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"}
1
+ {"version":3,"file":"mark-conversation-read.js","sourceRoot":"","sources":["../../../src/tools/conversations/mark-conversation-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,EAAW,CAAC;AAE9B,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,wCAAwC,mBAAmB,CAAC,OAAO,EAAE,wBAAwB,EAAE,SAAS,CAAC,yHAAyH;IAC/O,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,wBAAwB;IAC9B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;KACtD,CAAC;IACF,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC"}
@@ -1,23 +1,33 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
4
+ const MAX_LABELS_PER_REQUEST = 10;
2
5
  export const updateConversationLabels = {
3
6
  name: 'updateConversationLabels',
4
7
  title: 'Update conversation labels',
5
- description: 'Required scope: conversations:write. Add and/or remove up to 10 labels. At least one of addLabels or removeLabels is required.',
8
+ description: `Required scope: conversations:write. ${describeHttpRequest('PATCH', '/v1/conversations/labels', queryKeys)} Add and/or remove up to 10 labels. At least one of addLabels or removeLabels is required. Labels already applied (or not applied) are ignored.`,
6
9
  method: 'PATCH',
7
10
  path: '/v1/conversations/labels',
8
- queryKeys: [],
9
- inputSchema: z.union([
10
- z.object({
11
- conversationId: z.string().min(1),
12
- addLabels: z.array(z.string()).min(1).max(10),
13
- removeLabels: z.array(z.string()).max(10).optional(),
14
- }),
15
- z.object({
16
- conversationId: z.string().min(1),
17
- removeLabels: z.array(z.string()).min(1).max(10),
18
- addLabels: z.array(z.string()).max(10).optional(),
19
- }),
20
- ]),
11
+ queryKeys,
12
+ inputSchema: z
13
+ .object({
14
+ conversationId: z
15
+ .string()
16
+ .min(1)
17
+ .describe('JSON body. The ID of the conversation.'),
18
+ addLabels: z
19
+ .array(z.string())
20
+ .max(MAX_LABELS_PER_REQUEST)
21
+ .optional()
22
+ .describe('JSON body. Existing label IDs to add. Maximum 10.'),
23
+ removeLabels: z
24
+ .array(z.string())
25
+ .max(MAX_LABELS_PER_REQUEST)
26
+ .optional()
27
+ .describe('JSON body. Existing label IDs to remove. Maximum 10.'),
28
+ })
29
+ .refine((value) => (value.addLabels?.length ?? 0) > 0 ||
30
+ (value.removeLabels?.length ?? 0) > 0, { message: 'Send addLabels and/or removeLabels.' }),
21
31
  annotations: { readOnlyHint: false, destructiveHint: false },
22
32
  };
23
33
  //# sourceMappingURL=update-conversation-labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-conversation-labels.js","sourceRoot":"","sources":["../../../src/tools/conversations/update-conversation-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,IAAI,EAAE,0BAA0B;IAChC,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,gIAAgI;IAClI,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,0BAA0B;IAChC,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,MAAM,CAAC;YACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACrD,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YAChD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SAClD,CAAC;KACH,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
1
+ {"version":3,"file":"update-conversation-labels.js","sourceRoot":"","sources":["../../../src/tools/conversations/update-conversation-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,EAAW,CAAC;AAC9B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,IAAI,EAAE,0BAA0B;IAChC,KAAK,EAAE,4BAA4B;IACnC,WAAW,EAAE,wCAAwC,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,EAAE,SAAS,CAAC,iJAAiJ;IACzQ,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,0BAA0B;IAChC,SAAS;IACT,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,SAAS,EAAE,CAAC;aACT,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,GAAG,CAAC,sBAAsB,CAAC;aAC3B,QAAQ,EAAE;aACV,QAAQ,CAAC,mDAAmD,CAAC;QAChE,YAAY,EAAE,CAAC;aACZ,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,GAAG,CAAC,sBAAsB,CAAC;aAC3B,QAAQ,EAAE;aACV,QAAQ,CAAC,sDAAsD,CAAC;KACpE,CAAC;SACD,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;QAClC,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,EACvC,EAAE,OAAO,EAAE,qCAAqC,EAAE,CACnD;IACH,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,14 +1,20 @@
1
1
  import { z } from 'zod';
2
- import { paginationFields } from '../common.js';
2
+ import { describeHttpRequest, paginationFields, } from '../common.js';
3
+ const queryKeys = ['searchTerm', 'pageSize', 'cursor'];
3
4
  export const listLabels = {
4
5
  name: 'listLabels',
5
6
  title: 'List labels',
6
- description: 'Required scope: labels:read. Labels for the store, most recently updated first. searchTerm must be 3–100 characters.',
7
+ description: `Required scope: labels:read. ${describeHttpRequest('GET', '/v1/labels', queryKeys)} Labels for the store, most recently updated first. searchTerm must be 3–100 characters. Whitespace-only searchTerm is treated as omitted.`,
7
8
  method: 'GET',
8
9
  path: '/v1/labels',
9
- queryKeys: ['searchTerm', 'pageSize', 'cursor'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- searchTerm: z.string().min(3).max(100).optional(),
12
+ searchTerm: z
13
+ .string()
14
+ .min(3)
15
+ .max(100)
16
+ .optional()
17
+ .describe('Query parameter. Optional case-insensitive search on the label text. 3–100 characters.'),
12
18
  ...paginationFields,
13
19
  }),
14
20
  annotations: { readOnlyHint: true },
@@ -1 +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"}
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,EACL,mBAAmB,EACnB,gBAAgB,GAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAEhE,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gCAAgC,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,4IAA4I;IAC5O,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wFAAwF,CACzF;QACH,GAAG,gBAAgB;KACpB,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,14 +1,22 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const createInternalComment = {
3
5
  name: 'createInternalComment',
4
6
  title: 'Add an internal comment',
5
- description: 'Required scope: messages:write. Add a seller-private note. Not sent to the customer.',
7
+ description: `Required scope: messages:write. ${describeHttpRequest('POST', '/v1/messages/internal-comments', queryKeys)} Add a seller-private note. Not sent to the customer.`,
6
8
  method: 'POST',
7
9
  path: '/v1/messages/internal-comments',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- conversationId: z.string(),
11
- text: z.string(),
12
+ conversationId: z
13
+ .string()
14
+ .min(1)
15
+ .describe('JSON body. The ID of the conversation.'),
16
+ text: z
17
+ .string()
18
+ .min(1)
19
+ .describe('JSON body. Internal comment text. Not sent to the customer.'),
12
20
  }),
13
21
  annotations: { readOnlyHint: false, destructiveHint: false },
14
22
  };
@@ -1 +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"}
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;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,EAAW,CAAC;AAE9B,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,mCAAmC,mBAAmB,CAAC,MAAM,EAAE,gCAAgC,EAAE,SAAS,CAAC,uDAAuD;IAC/K,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,gCAAgC;IACtC,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,6DAA6D,CAAC;KAC3E,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,29 +1,39 @@
1
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.');
2
+ import { cursor, describeHttpRequest, expand, messagePageSize, } from '../common.js';
3
+ const queryKeys = [
4
+ 'conversationId',
5
+ 'ticketId',
6
+ 'pageSize',
7
+ 'cursor',
8
+ 'expand',
9
+ ];
10
+ const getMessagesExpand = expand('Pass sentBy,conversation,account to add related names. Those ids stay on the message.');
4
11
  export const getMessages = {
5
12
  name: 'getMessages',
6
13
  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 is required, max 15.',
14
+ description: `Required scope: messages:read. ${describeHttpRequest('GET', '/v1/messages', queryKeys)} Customer-facing messages, newest first. Events and internal comments are excluded. Send conversationId and/or ticketId — at least one is required. When ticketId is set, results are limited to that ticket's time window. pageSize defaults to 15 and cannot exceed 15.`,
8
15
  method: 'GET',
9
16
  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
- ]),
17
+ queryKeys,
18
+ inputSchema: z
19
+ .object({
20
+ conversationId: z
21
+ .string()
22
+ .min(1)
23
+ .optional()
24
+ .describe('Query parameter. The ID of the conversation.'),
25
+ ticketId: z
26
+ .string()
27
+ .min(1)
28
+ .optional()
29
+ .describe("Query parameter. The ID of the ticket. When set, results are limited to that ticket's time window."),
30
+ pageSize: messagePageSize,
31
+ cursor,
32
+ expand: getMessagesExpand,
33
+ })
34
+ .refine((value) => Boolean(value.conversationId || value.ticketId), {
35
+ message: 'Send conversationId and/or ticketId.',
36
+ }),
27
37
  annotations: { readOnlyHint: true },
28
38
  };
29
39
  //# sourceMappingURL=get-messages.js.map
@@ -1 +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,sKAAsK;IACxK,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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AE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,8CAA8C,CAAC;QAC3D,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CACP,oGAAoG,CACrG;QACH,QAAQ,EAAE,eAAe;QACzB,MAAM;QACN,MAAM,EAAE,iBAAiB;KAC1B,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE;QAClE,OAAO,EAAE,sCAAsC;KAChD,CAAC;IACJ,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,14 +1,18 @@
1
1
  import { z } from 'zod';
2
- import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
2
+ import { describeHttpRequest, expand, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ const queryKeys = ['conversationId', ...paginationQueryKeys];
3
4
  export const listInternalComments = {
4
5
  name: 'listInternalComments',
5
6
  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
+ description: `Required scope: messages:read. ${describeHttpRequest('GET', '/v1/messages/internal-comments', queryKeys)} Seller-private notes on a conversation, newest first. These do not reach the customer. Paginate with pageSize (max 50) and cursor.`,
7
8
  method: 'GET',
8
9
  path: '/v1/messages/internal-comments',
9
- queryKeys: ['conversationId', ...paginationQueryKeys],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- conversationId: z.string(),
12
+ conversationId: z
13
+ .string()
14
+ .min(1)
15
+ .describe('Query parameter. The ID of the conversation.'),
12
16
  ...paginationFields,
13
17
  expand: expand('Pass createdBy,conversation,account to resolve related names.'),
14
18
  }),
@@ -1 +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"}
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,mBAAmB,EACnB,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,gBAAgB,EAAE,GAAG,mBAAmB,CAAC,CAAC;AAE7D,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,KAAK,EAAE,gCAAgC,EAAE,SAAS,CAAC,qIAAqI;IAC3P,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,gCAAgC;IACtC,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,8CAA8C,CAAC;QAC3D,GAAG,gBAAgB;QACnB,MAAM,EAAE,MAAM,CACZ,+DAA+D,CAChE;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,14 +1,23 @@
1
1
  import { z } from 'zod';
2
+ import { describeHttpRequest } from '../common.js';
3
+ const queryKeys = [];
2
4
  export const sendPlainTextMessage = {
3
5
  name: 'sendPlainTextMessage',
4
6
  title: 'Send a plain text message',
5
- description: 'Required scope: messages:write. Send plain text to the customer on a conversation.',
7
+ description: `Required scope: messages:write. ${describeHttpRequest('POST', '/v1/messages/plain-text', queryKeys)} Send plain text to the customer on a conversation.`,
6
8
  method: 'POST',
7
9
  path: '/v1/messages/plain-text',
8
- queryKeys: [],
10
+ queryKeys,
9
11
  inputSchema: z.object({
10
- conversationId: z.string(),
11
- text: z.string(),
12
+ conversationId: z
13
+ .string()
14
+ .min(1)
15
+ .describe('JSON body. The ID of the conversation.'),
16
+ text: z
17
+ .string()
18
+ .min(1)
19
+ .max(1000)
20
+ .describe('JSON body. Plain text to send to the customer. Maximum 1000 characters.'),
12
21
  }),
13
22
  annotations: { readOnlyHint: false, destructiveHint: false },
14
23
  };
@@ -1 +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"}
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;AACxB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAEtE,MAAM,SAAS,GAAG,EAAW,CAAC;AAE9B,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE,mCAAmC,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,EAAE,SAAS,CAAC,qDAAqD;IACtK,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,yBAAyB;IAC/B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,QAAQ,CACP,yEAAyE,CAC1E;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,14 +1,19 @@
1
1
  import { z } from 'zod';
2
- import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
2
+ import { describeHttpRequest, expand, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ const queryKeys = ['userId', ...paginationQueryKeys];
3
4
  export const listTeams = {
4
5
  name: 'listTeams',
5
6
  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
+ 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 }.`,
7
8
  method: 'GET',
8
9
  path: '/v1/teams',
9
- queryKeys: ['userId', ...paginationQueryKeys],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- userId: z.string().uuid().optional(),
12
+ userId: z
13
+ .string()
14
+ .min(1)
15
+ .optional()
16
+ .describe('Query parameter. Return only teams containing this user (UUID).'),
12
17
  ...paginationFields,
13
18
  expand: expand('Pass users to return each member as { id, name } when that user exists on the store.'),
14
19
  }),
@@ -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,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"}
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,20 +1,39 @@
1
1
  import { z } from 'zod';
2
- import { expand } from '../common.js';
2
+ import { describeHttpRequest, expand, fieldValue, } from '../common.js';
3
+ const queryKeys = ['expand'];
3
4
  export const closeTicket = {
4
5
  name: 'closeTicket',
5
6
  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
+ 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.`,
7
8
  method: 'PATCH',
8
9
  path: '/v1/tickets/close',
9
- queryKeys: ['expand'],
10
+ queryKeys,
10
11
  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(),
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
+ handledBy: z
15
+ .string()
16
+ .min(1)
17
+ .optional()
18
+ .describe('JSON body. UUID of the user who handled the ticket.'),
19
+ isConverted: z
20
+ .boolean()
21
+ .optional()
22
+ .describe('JSON body. Whether the conversation led to a conversion.'),
23
+ totalRevenue: z
24
+ .number()
25
+ .min(0)
26
+ .optional()
27
+ .describe('JSON body. Conversion revenue recorded on close.'),
28
+ currency: z
29
+ .string()
30
+ .optional()
31
+ .describe('JSON body. Currency of the conversion revenue.'),
32
+ ticketFields: z
33
+ .object({})
34
+ .catchall(fieldValue)
35
+ .optional()
36
+ .describe('JSON body. Ticket field values to set when closing, keyed by field id. Must be a non-empty object when sent.'),
18
37
  }),
19
38
  annotations: { readOnlyHint: false, destructiveHint: true },
20
39
  };
@@ -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,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,EA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;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,CAAC;aACpB,QAAQ,EAAE;aACV,QAAQ,CACP,8GAA8G,CAC/G;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;CAC5D,CAAC"}
@@ -1,15 +1,19 @@
1
1
  import { z } from 'zod';
2
- import { expand } from '../common.js';
2
+ import { describeHttpRequest, expand } from '../common.js';
3
+ const queryKeys = ['ticketId', 'expand'];
3
4
  export const getTicketById = {
4
5
  name: 'getTicketById',
5
6
  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
+ 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.`,
7
8
  method: 'GET',
8
9
  path: '/v1/tickets',
9
- queryKeys: ['ticketId', 'expand'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- ticketId: z.string().describe('The ID of the ticket'),
12
- expand: expand('Comma-separated related objects to include.'),
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.'),
13
17
  }),
14
18
  annotations: { readOnlyHint: true },
15
19
  };
@@ -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,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"}
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,12 +1,13 @@
1
1
  import { z } from 'zod';
2
- import { expand } from '../common.js';
2
+ import { describeHttpRequest, expand } from '../common.js';
3
+ const queryKeys = ['expand'];
3
4
  export const listTicketFields = {
4
5
  name: 'listTicketFields',
5
6
  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
+ 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.`,
7
8
  method: 'GET',
8
9
  path: '/v1/tickets/fields',
9
- queryKeys: ['expand'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
12
  expand: expand('Pass accounts to include the accounts each field applies to.'),
12
13
  }),
@@ -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,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"}
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,9 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { expand, paginationFields, paginationQueryKeys, } from '../common.js';
2
+ import { describeHttpRequest, expand, fieldValue, paginationFields, paginationQueryKeys, } from '../common.js';
3
+ const TICKET_FILTER_ARRAY_MAX = 20;
3
4
  export const listTickets = {
4
5
  name: 'listTickets',
5
6
  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. 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.',
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.`,
7
8
  method: 'POST',
8
9
  path: '/v1/tickets/list',
9
10
  queryKeys: paginationQueryKeys,
@@ -13,11 +14,24 @@ export const listTickets = {
13
14
  statuses: z
14
15
  .array(z.enum(['open', 'closed']))
15
16
  .optional()
16
- .describe('Omit to return open tickets only. When conversationId is set, omitting statuses returns every status for that conversation.'),
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(),
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.'),
18
+ conversationId: z
19
+ .string()
20
+ .min(1)
21
+ .optional()
22
+ .describe('JSON body. Restrict results to tickets belonging to this conversation.'),
23
+ accountIds: z
24
+ .array(z.string())
25
+ .optional()
26
+ .describe('JSON body. Restrict results to these account IDs.'),
27
+ assigneeUserIds: z
28
+ .array(z.string())
29
+ .optional()
30
+ .describe('JSON body. Restrict results to these assignee user IDs. Cannot be combined with unassigned: true.'),
31
+ handledByUserIds: z
32
+ .array(z.string())
33
+ .optional()
34
+ .describe('JSON body. Restrict results to tickets handled by these user IDs.'),
21
35
  resolutionStatuses: z
22
36
  .array(z.enum([
23
37
  'none',
@@ -26,10 +40,20 @@ export const listTickets = {
26
40
  'ai_full_resolution',
27
41
  'ai_partial_resolution',
28
42
  ]))
29
- .optional(),
30
- unassigned: z.boolean().optional(),
31
- isFollowUp: z.boolean().optional(),
32
- isSpam: z.boolean().optional(),
43
+ .optional()
44
+ .describe('JSON body. Restrict results to these resolution statuses.'),
45
+ unassigned: z
46
+ .boolean()
47
+ .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.'),
53
+ isSpam: z
54
+ .boolean()
55
+ .optional()
56
+ .describe('JSON body. Filter by spam flag. Defaults to non-spam tickets when omitted.'),
33
57
  advancedFilters: z
34
58
  .object({
35
59
  labels: z
@@ -39,12 +63,15 @@ export const listTickets = {
39
63
  'contains_all',
40
64
  'does_not_contain_any',
41
65
  ]),
42
- labelIds: z.array(z.string()).min(1).max(10),
66
+ labelIds: z.array(z.string()).min(1).max(TICKET_FILTER_ARRAY_MAX),
43
67
  })
44
- .optional(),
68
+ .optional()
69
+ .describe('JSON body. Filter tickets by conversation labels.'),
45
70
  ticketFields: z
46
71
  .array(z.object({
47
- ticketFieldId: z.string(),
72
+ ticketFieldId: z
73
+ .string()
74
+ .describe('Custom field id, or a system key: aiCsat, aiSummary, salesRevenue, isConverted.'),
48
75
  operator: z.enum([
49
76
  'equal',
50
77
  'not_equal',
@@ -61,27 +88,45 @@ export const listTickets = {
61
88
  'less_than_or_equal',
62
89
  'between',
63
90
  ]),
64
- value: z.any().optional(),
65
- min: z.any().optional(),
66
- max: z.any().optional(),
91
+ value: fieldValue
92
+ .optional()
93
+ .describe('Required except for between. A single value, or an array for is_one_of / contains_* operators.'),
94
+ min: fieldValue
95
+ .optional()
96
+ .describe('Lower bound for between. Required with max when operator is between.'),
97
+ max: fieldValue
98
+ .optional()
99
+ .describe('Upper bound for between. Required with min when operator is between.'),
67
100
  }))
68
- .max(10)
69
- .optional(),
101
+ .optional()
102
+ .describe('JSON body. Filter on custom ticket fields or system fields.'),
70
103
  waitingForReply: z
71
104
  .object({
72
105
  value: z.number().int().min(1).max(43200),
73
106
  })
74
- .optional(),
107
+ .optional()
108
+ .describe('JSON body. Tickets where the buyer has been waiting at least this many minutes (1–43200).'),
75
109
  openedAt: z
76
110
  .object({
77
111
  operator: z.enum(['between', 'greater_than', 'less_than']),
78
- value: z.string().optional(),
79
- min: z.string().optional(),
80
- max: z.string().optional(),
112
+ value: z
113
+ .string()
114
+ .optional()
115
+ .describe('ISO 8601 date-time. Used with greater_than and less_than.'),
116
+ min: z
117
+ .string()
118
+ .optional()
119
+ .describe('ISO 8601 date-time. Lower bound when operator is between.'),
120
+ max: z
121
+ .string()
122
+ .optional()
123
+ .describe('ISO 8601 date-time. Upper bound when operator is between.'),
81
124
  })
82
- .optional(),
125
+ .optional()
126
+ .describe('JSON body. Filter by ticket opened-at time.'),
83
127
  })
84
- .optional(),
128
+ .optional()
129
+ .describe('JSON body. Optional extra filters on labels, ticket fields, waiting time, and opened-at.'),
85
130
  }),
86
131
  annotations: { readOnlyHint: true },
87
132
  };
@@ -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,MAAM,EACN,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,uTAAuT;IACzT,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,6HAA6H,CAC9H;QACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC1C,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC/C,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,C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C,KAAK,CAAC;aAC1C,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CACP,2FAA2F,CAC5F;YACH,QAAQ,EAAE,CAAC;iBACR,MAAM,CAAC;gBACN,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;gBAC1D,KAAK,EAAE,CAAC;qBACL,MAAM,EAAE;qBACR,QAAQ,EAAE;qBACV,QAAQ,CACP,2DAA2D,CAC5D;gBACH,GAAG,EAAE,CAAC;qBACH,MAAM,EAAE;qBACR,QAAQ,EAAE;qBACV,QAAQ,CACP,2DAA2D,CAC5D;gBACH,GAAG,EAAE,CAAC;qBACH,MAAM,EAAE;qBACR,QAAQ,EAAE;qBACV,QAAQ,CACP,2DAA2D,CAC5D;aACJ,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,6CAA6C,CAAC;SAC3D,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,CACP,0FAA0F,CAC3F;KACJ,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
@@ -1,21 +1,25 @@
1
1
  import { z } from 'zod';
2
- import { expand } from '../common.js';
2
+ import { describeHttpRequest, expand, fieldValue, } from '../common.js';
3
+ const queryKeys = ['expand'];
3
4
  export const updateTicketField = {
4
5
  name: 'updateTicketField',
5
6
  title: 'Update a ticket field value',
6
- description: 'Required scope: tickets:write. Set or clear one field on a ticket. Send null as newValue to unset. Send ticketFieldsUpdatedAt from the last read; a mismatch returns 409.',
7
+ description: `Required scope: tickets:write. ${describeHttpRequest('PATCH', '/v1/tickets/fields', queryKeys)} Set or clear one field on a ticket. Send null as newValue to unset. Send ticketFieldsUpdatedAt from the last read; a mismatch returns 409.`,
7
8
  method: 'PATCH',
8
9
  path: '/v1/tickets/fields',
9
- queryKeys: ['expand'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- expand: expand('Related objects to include on the updated ticket.'),
12
- ticketId: z.string(),
13
- ticketFieldId: z.string(),
12
+ expand: expand('Related objects to include on the updated ticket: account, conversation, assignee, handledBy.'),
13
+ ticketId: z.string().min(1).describe('JSON body. The ID of the ticket.'),
14
+ ticketFieldId: z
15
+ .string()
16
+ .min(1)
17
+ .describe('JSON body. The ID of the ticket field.'),
14
18
  ticketFieldsUpdatedAt: z
15
19
  .string()
16
20
  .optional()
17
- .describe('Omit if the ticket has never had a field update.'),
18
- newValue: z.any().nullable(),
21
+ .describe('JSON body. ISO 8601 date-time from the last read. Omit if the ticket has never had a field update.'),
22
+ newValue: fieldValue.describe('JSON body. The new field value. Send null to unset.'),
19
23
  }),
20
24
  annotations: { readOnlyHint: false, destructiveHint: false },
21
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"update-ticket-field.js","sourceRoot":"","sources":["../../../src/tools/tickets/update-ticket-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,2KAA2K;IAC7K,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC,mDAAmD,CAAC;QACnE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,qBAAqB,EAAE,CAAC;aACrB,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAC7B,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
1
+ {"version":3,"file":"update-ticket-field.js","sourceRoot":"","sources":["../../../src/tools/tickets/update-ticket-field.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,iBAAiB,GAAiB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,kCAAkC,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,EAAE,SAAS,CAAC,6IAA6I;IACzP,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,oBAAoB;IAC1B,SAAS;IACT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CACZ,+FAA+F,CAChG;QACD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QACxE,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,qBAAqB,EAAE,CAAC;aACrB,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,oGAAoG,CACrG;QACH,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAC3B,qDAAqD,CACtD;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;CAC7D,CAAC"}
@@ -1,15 +1,20 @@
1
1
  import { z } from 'zod';
2
- import { expand } from '../common.js';
2
+ import { describeHttpRequest, expand } from '../common.js';
3
+ const queryKeys = ['userId', 'expand'];
3
4
  export const listUsers = {
4
5
  name: 'listUsers',
5
6
  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
+ description: `Required scope: users:read. ${describeHttpRequest('GET', '/v1/users', queryKeys)} Full list of users on the store. Not paginated. Optionally filter to one userId (UUID). Pass expand=role to include { id, name } for the role.`,
7
8
  method: 'GET',
8
9
  path: '/v1/users',
9
- queryKeys: ['userId', 'expand'],
10
+ queryKeys,
10
11
  inputSchema: z.object({
11
- userId: z.string().uuid().optional(),
12
- expand: expand('Pass role to include { id, name } and omit roleId.'),
12
+ userId: z
13
+ .string()
14
+ .min(1)
15
+ .optional()
16
+ .describe('Query parameter. Restrict to this user (UUID).'),
17
+ expand: expand('Pass role to include { id, name } for the role. Without expand, the response keeps roleId.'),
13
18
  }),
14
19
  annotations: { readOnlyHint: true },
15
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list-users.js","sourceRoot":"","sources":["../../../src/tools/users/list-users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,cAAc,CAAC;AAEzD,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"}
1
+ {"version":3,"file":"list-users.js","sourceRoot":"","sources":["../../../src/tools/users/list-users.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,EAAE,QAAQ,CAAU,CAAC;AAEhD,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,iJAAiJ;IAC/O,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,gDAAgD,CAAC;QAC7D,MAAM,EAAE,MAAM,CACZ,4FAA4F,CAC7F;KACF,CAAC;IACF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaapi/open-api-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for the Zaapi Open API",
5
5
  "homepage": "https://github.com/Zaapi/zaapi-open-api-mcp#readme",
6
6
  "bugs": {