@voxslopuli/teamdynamix-mcp 0.5.5 → 0.5.6

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.5",
18
+ version: "0.5.6",
19
19
  private: false,
20
20
  description: "A production-ready TypeScript MCP server for TeamDynamix",
21
21
  keywords: [
@@ -410,14 +410,11 @@ var init_client_factory = __esm({
410
410
  }
411
411
  searchTickets(appId, body) {
412
412
  return this.sdk().then(async (s) => {
413
- const { data, error } = await s.tickets.appIdTicketsSearch({
413
+ const payload = await s.tickets.appIdTicketsSearch({
414
414
  params: { path: { appId } },
415
415
  body: mapTicketSearchBody(body)
416
416
  });
417
- if (error) {
418
- throw new Error(`Ticket search failed: ${JSON.stringify(error)}`);
419
- }
420
- const results = Array.isArray(data) ? data : [];
417
+ const results = Array.isArray(payload) ? payload : [];
421
418
  const groupFilter = parseIdListEnv(process.env["TEAMDYNAMIX_TICKET_GROUP_IDS"]);
422
419
  if (groupFilter.length === 0) return results;
423
420
  const filtered = results.filter((item) => {
@@ -539,14 +536,11 @@ var init_client_factory = __esm({
539
536
  }
540
537
  searchKbArticles(appId, body) {
541
538
  return this.sdk().then(async (s) => {
542
- const { data, error } = await s.knowledgeBase.appIdKnowledgebaseSearch({
539
+ const payload = await s.knowledgeBase.appIdKnowledgebaseSearch({
543
540
  params: { path: { appId } },
544
541
  body: sanitizeTo(body, ARTICLE_SEARCH_KEYS)
545
542
  });
546
- if (error) {
547
- throw new Error(`KB search failed: ${JSON.stringify(error)}`);
548
- }
549
- return Array.isArray(data) ? data : [];
543
+ return Array.isArray(payload) ? payload : [];
550
544
  });
551
545
  }
552
546
  listKbCategories(appId) {