@voxslopuli/teamdynamix-mcp 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@voxslopuli/teamdynamix-mcp",
18
- version: "0.5.6",
18
+ version: "0.5.8",
19
19
  private: false,
20
20
  description: "A production-ready TypeScript MCP server for TeamDynamix",
21
21
  keywords: [
@@ -408,6 +408,27 @@ var init_client_factory = __esm({
408
408
  getTicket(appId, ticketId) {
409
409
  return this.sdk().then((s) => s.tickets.appIdTicketsId({ params: { path: { appId, id: ticketId } } }));
410
410
  }
411
+ /**
412
+ * One agent request: ticket + feed. The two API reads run in parallel and
413
+ * the feed is attached as a `feed` subfield on the returned ticket object
414
+ * (newest-first, replies expanded per entry, capped by repliesEntryLimit).
415
+ * With `includeFeed: false` the feed read is skipped entirely and the bare
416
+ * ticket is returned (single request, no `feed` key). Errors from either
417
+ * read propagate; no write occurs.
418
+ */
419
+ async getTicketWithFeed(appId, ticketId, opts = {}) {
420
+ if (opts.includeFeed === false) {
421
+ return this.getTicket(appId, ticketId);
422
+ }
423
+ const [ticket, feed] = await Promise.all([
424
+ this.getTicket(appId, ticketId),
425
+ this.getTicketFeed(appId, ticketId, opts)
426
+ ]);
427
+ if (ticket && typeof ticket === "object") {
428
+ return { ...ticket, feed };
429
+ }
430
+ return { ticket, feed };
431
+ }
411
432
  searchTickets(appId, body) {
412
433
  return this.sdk().then(async (s) => {
413
434
  const payload = await s.tickets.appIdTicketsSearch({
@@ -1834,11 +1855,17 @@ function registerTeamDynamixTicketsGateway(server2) {
1834
1855
  }
1835
1856
  case "get_ticket": {
1836
1857
  const parsed = parsePayload(
1837
- z4.object({ app_id: TeamDynamixAppIdSchema, ticket_id: z4.number().int().positive() }),
1858
+ z4.object({
1859
+ app_id: TeamDynamixAppIdSchema,
1860
+ ticket_id: z4.number().int().positive(),
1861
+ include_feed: z4.boolean().optional().default(true)
1862
+ }),
1838
1863
  payload,
1839
1864
  action
1840
1865
  );
1841
- const ticket = await client.getTicket(parsed.app_id, parsed.ticket_id);
1866
+ const ticket = await client.getTicketWithFeed(parsed.app_id, parsed.ticket_id, {
1867
+ includeFeed: parsed.include_feed
1868
+ });
1842
1869
  return toSuccessResponse(ticket, response_format);
1843
1870
  }
1844
1871
  case "search_tickets": {