@transcend-io/mcp-server-workflows 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -82,4 +82,4 @@ See [CONTRIBUTING.md](../../../CONTRIBUTING.md#mcp-servers) for workspace layout
82
82
 
83
83
  ## Related packages
84
84
 
85
- Also available as part of the unified [`@transcend-io/mcp-server`](../mcp-server/README.md) which includes all domains. See the [root README](../../../README.md#mcp-servers) for the full list.
85
+ Also available as part of the unified [`@transcend-io/mcp`](../mcp/README.md) which includes all domains. See the [root README](../../../README.md#mcp-servers) for the full list.
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { n as getWorkflowTools, t as WorkflowsMixin } from "./graphql-BE3vRhqA.mjs";
3
- import { TranscendRestClient, createMCPServer } from "@transcend-io/mcp-server-core";
2
+ import { n as getWorkflowTools, t as WorkflowsMixin } from "./graphql-oANS0b0T.mjs";
3
+ import { TranscendRestClient, createMCPServer } from "@transcend-io/mcp-server-base";
4
4
  //#region src/cli.ts
5
5
  createMCPServer({
6
6
  name: "transcend-mcp-workflows",
package/dist/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-core';\n\nimport { WorkflowsMixin } from './graphql.js';\nimport { getWorkflowTools } from './tools/index.js';\n\ncreateMCPServer({\n name: 'transcend-mcp-workflows',\n version: '1.0.0',\n getTools: getWorkflowTools,\n createClients: (auth, sombraUrl, graphqlUrl) => ({\n rest: new TranscendRestClient(auth, sombraUrl),\n graphql: new WorkflowsMixin(auth, graphqlUrl),\n }),\n});\n"],"mappings":";;;;AAMA,gBAAgB;CACd,MAAM;CACN,SAAS;CACT,UAAU;CACV,gBAAgB,MAAM,WAAW,gBAAgB;EAC/C,MAAM,IAAI,oBAAoB,MAAM,UAAU;EAC9C,SAAS,IAAI,eAAe,MAAM,WAAW;EAC9C;CACF,CAAC"}
1
+ {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-base';\n\nimport { WorkflowsMixin } from './graphql.js';\nimport { getWorkflowTools } from './tools/index.js';\n\ncreateMCPServer({\n name: 'transcend-mcp-workflows',\n version: '1.0.0',\n getTools: getWorkflowTools,\n createClients: (auth, sombraUrl, graphqlUrl) => ({\n rest: new TranscendRestClient(auth, sombraUrl),\n graphql: new WorkflowsMixin(auth, graphqlUrl),\n }),\n});\n"],"mappings":";;;;AAMA,gBAAgB;CACd,MAAM;CACN,SAAS;CACT,UAAU;CACV,gBAAgB,MAAM,WAAW,gBAAgB;EAC/C,MAAM,IAAI,oBAAoB,MAAM,UAAU;EAC9C,SAAS,IAAI,eAAe,MAAM,WAAW;EAC9C;CACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { PaginationSchema, TranscendGraphQLBase, createListResult, createToolResult, defineTool, z } from "@transcend-io/mcp-server-core";
1
+ import { PaginationSchema, TranscendGraphQLBase, createListResult, createToolResult, defineTool, z } from "@transcend-io/mcp-server-base";
2
2
  //#region src/tools/workflows_list.ts
3
3
  const ListWorkflowsSchema = PaginationSchema.extend({ cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)") });
4
4
  function createWorkflowsListTool(clients) {
@@ -201,4 +201,4 @@ var WorkflowsMixin = class extends TranscendGraphQLBase {
201
201
  //#endregion
202
202
  export { ListWorkflowsSchema as a, ListEmailTemplatesSchema as i, getWorkflowTools as n, UpdateWorkflowConfigSchema as r, WorkflowsMixin as t };
203
203
 
204
- //# sourceMappingURL=graphql-BE3vRhqA.mjs.map
204
+ //# sourceMappingURL=graphql-oANS0b0T.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-BE3vRhqA.mjs","names":[],"sources":["../src/tools/workflows_list.ts","../src/tools/workflows_list_email_templates.ts","../src/tools/workflows_update_config.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import {\n createListResult,\n defineTool,\n PaginationSchema,\n z,\n type ToolClients,\n} from '@transcend-io/mcp-server-core';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const ListWorkflowsSchema = PaginationSchema.extend({\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListWorkflowsInput = z.infer<typeof ListWorkflowsSchema>;\n\nexport function createWorkflowsListTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_list',\n description:\n 'List all workflows configured in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Workflows',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListWorkflowsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listWorkflows({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import {\n createListResult,\n defineTool,\n PaginationSchema,\n z,\n type ToolClients,\n} from '@transcend-io/mcp-server-core';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const ListEmailTemplatesSchema = PaginationSchema.extend({\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n offset: z.coerce\n .number()\n .min(0)\n .optional()\n .default(0)\n .describe('Number of results to skip (default: 0)'),\n});\nexport type ListEmailTemplatesInput = z.infer<typeof ListEmailTemplatesSchema>;\n\nexport function createWorkflowsListEmailTemplatesTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_list_email_templates',\n description:\n 'List all email templates used in workflows and communications. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Workflows',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListEmailTemplatesSchema,\n handler: async ({ limit, offset }) => {\n const result = await graphql.listEmailTemplates({\n first: limit,\n offset,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-core';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const UpdateWorkflowConfigSchema = z.object({\n workflow_config_id: z\n .string()\n .describe('ID of the workflow config to update (use workflows_list to find config IDs)'),\n title: z.string().optional().describe('New title for the workflow'),\n subtitle: z.string().optional().describe('New subtitle for the workflow'),\n description: z.string().optional().describe('New description for the workflow'),\n show_in_privacy_center: z\n .boolean()\n .optional()\n .describe('Whether to show this workflow in the Privacy Center'),\n});\nexport type UpdateWorkflowConfigInput = z.infer<typeof UpdateWorkflowConfigSchema>;\n\nexport function createWorkflowsUpdateConfigTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_update_config',\n description:\n 'Update the configuration for a workflow (title, subtitle, description, privacy center visibility)',\n category: 'Workflows',\n readOnly: false,\n confirmationHint: 'Updates the workflow configuration',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },\n zodSchema: UpdateWorkflowConfigSchema,\n handler: async ({\n workflow_config_id,\n title,\n subtitle,\n description,\n show_in_privacy_center,\n }) => {\n const updates: {\n title?: string;\n subtitle?: string;\n description?: string;\n showInPrivacyCenter?: boolean;\n } = {};\n\n if (title !== undefined) {\n updates.title = title;\n }\n if (subtitle !== undefined) {\n updates.subtitle = subtitle;\n }\n if (description !== undefined) {\n updates.description = description;\n }\n if (show_in_privacy_center !== undefined) {\n updates.showInPrivacyCenter = show_in_privacy_center;\n }\n\n const result = await graphql.updateWorkflowConfig(workflow_config_id, updates);\n\n return createToolResult(true, {\n workflowConfig: result,\n message: 'Workflow configuration updated successfully',\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-core';\n\nimport { createWorkflowsListTool } from './workflows_list.js';\nimport { createWorkflowsListEmailTemplatesTool } from './workflows_list_email_templates.js';\nimport { createWorkflowsUpdateConfigTool } from './workflows_update_config.js';\n\nexport function getWorkflowTools(clients: ToolClients): ToolDefinition[] {\n return [\n createWorkflowsListTool(clients),\n createWorkflowsUpdateConfigTool(clients),\n createWorkflowsListEmailTemplatesTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type EmailTemplate,\n type ListOptions,\n type PaginatedResponse,\n type Workflow,\n type WorkflowConfig,\n} from '@transcend-io/mcp-server-core';\n\nexport class WorkflowsMixin extends TranscendGraphQLBase {\n async listWorkflows(options?: ListOptions): Promise<PaginatedResponse<Workflow>> {\n const query = `\n query ListWorkflows($first: Int) {\n workflows(first: $first) {\n nodes {\n id\n title {\n defaultMessage\n }\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ workflows: { nodes: Workflow[]; totalCount: number } }>(\n query,\n { first: Math.min(options?.first || 50, 100) },\n );\n return {\n nodes: data.workflows.nodes,\n pageInfo: {\n hasNextPage: data.workflows.nodes.length < data.workflows.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.workflows.totalCount,\n };\n }\n\n async updateWorkflowConfig(\n workflowConfigId: string,\n updates: {\n title?: string;\n subtitle?: string;\n description?: string;\n showInPrivacyCenter?: boolean;\n },\n ): Promise<WorkflowConfig> {\n const mutation = `\n mutation UpdateWorkflowConfig($input: UpdateWorkflowConfigInput!) {\n updateWorkflowConfig(input: $input) {\n workflowConfig {\n id\n title {\n defaultMessage\n }\n subtitle {\n defaultMessage\n }\n description {\n defaultMessage\n }\n showInPrivacyCenter\n }\n }\n }\n `;\n const input = { workflowConfigId, ...updates };\n const data = await this.makeRequest<{\n updateWorkflowConfig: {\n workflowConfig: {\n id: string;\n title: { defaultMessage: string } | null;\n subtitle: { defaultMessage: string } | null;\n description: { defaultMessage: string } | null;\n showInPrivacyCenter: boolean;\n };\n };\n }>(mutation, { input });\n const wc = data.updateWorkflowConfig.workflowConfig;\n return {\n id: wc.id,\n title: wc.title?.defaultMessage || '',\n subtitle: wc.subtitle?.defaultMessage || '',\n description: wc.description?.defaultMessage || '',\n showInPrivacyCenter: wc.showInPrivacyCenter,\n };\n }\n\n async listEmailTemplates(options?: ListOptions): Promise<PaginatedResponse<EmailTemplate>> {\n const query = `\n query ListTemplates($first: Int, $offset: Int) {\n templates(first: $first, offset: $offset) {\n nodes {\n id\n title\n type\n isRequired\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n templates: {\n nodes: Array<{ id: string; title: string; type: string; isRequired: boolean }>;\n totalCount: number;\n };\n }>(query, {\n first: Math.min(options?.first || 50, 100),\n offset: options?.offset || 0,\n });\n const templates: EmailTemplate[] = data.templates.nodes.map((t) => ({\n id: t.id,\n name: t.title,\n subject: '',\n type: t.type,\n locale: '',\n isActive: t.isRequired,\n createdAt: '',\n updatedAt: '',\n }));\n return {\n nodes: templates,\n pageInfo: {\n hasNextPage: templates.length < data.templates.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.templates.totalCount,\n };\n }\n}\n"],"mappings":";;AAUA,MAAa,sBAAsB,iBAAiB,OAAO,EACzD,QAAQ,EACL,QAAQ,CACR,UAAU,CACV,SAAS,6DAA6D,EAC1E,CAAC;AAGF,SAAgB,wBAAwB,SAAsB;CAC5D,MAAM,UAAU,QAAQ;AACxB,QAAO,WAAW;EAChB,MAAM;EACN,aACE;EACF,UAAU;EACV,UAAU;EACV,aAAa;GAAE,cAAc;GAAM,iBAAiB;GAAO,gBAAgB;GAAM;EACjF,WAAW;EACX,SAAS,OAAO,EAAE,OAAO,aAAa;GACpC,MAAM,SAAS,MAAM,QAAQ,cAAc;IACzC,OAAO;IACP,OAAO;IACR,CAAC;AAEF,UAAO,iBAAiB,OAAO,OAAO;IACpC,YAAY,OAAO;IACnB,aAAa,OAAO,UAAU;IAC/B,CAAC;;EAEL,CA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AC;EACF,MAAM,YAA6B,KAAK,UAAU,MAAM,KAAK,OAAO;GAClE,IAAI,EAAE;GACN,MAAM,EAAE;GACR,SAAS;GACT,MAAM,EAAE;GACR,QAAQ;GACR,UAAU,EAAE;GACZ,WAAW;GACX,WAAW;GACZ,EAAE;AACH,SAAO;GACL,OAAO;GACP,UAAU;IACR,aAAa,UAAU,SAAS,KAAK,UAAU;IAC/C,iBAAiB;IAClB;GACD,YAAY,KAAK,UAAU;GAC5B"}
1
+ {"version":3,"file":"graphql-oANS0b0T.mjs","names":[],"sources":["../src/tools/workflows_list.ts","../src/tools/workflows_list_email_templates.ts","../src/tools/workflows_update_config.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import {\n createListResult,\n defineTool,\n PaginationSchema,\n z,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const ListWorkflowsSchema = PaginationSchema.extend({\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListWorkflowsInput = z.infer<typeof ListWorkflowsSchema>;\n\nexport function createWorkflowsListTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_list',\n description:\n 'List all workflows configured in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Workflows',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListWorkflowsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listWorkflows({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import {\n createListResult,\n defineTool,\n PaginationSchema,\n z,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const ListEmailTemplatesSchema = PaginationSchema.extend({\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n offset: z.coerce\n .number()\n .min(0)\n .optional()\n .default(0)\n .describe('Number of results to skip (default: 0)'),\n});\nexport type ListEmailTemplatesInput = z.infer<typeof ListEmailTemplatesSchema>;\n\nexport function createWorkflowsListEmailTemplatesTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_list_email_templates',\n description:\n 'List all email templates used in workflows and communications. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Workflows',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListEmailTemplatesSchema,\n handler: async ({ limit, offset }) => {\n const result = await graphql.listEmailTemplates({\n first: limit,\n offset,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { WorkflowsMixin } from '../graphql.js';\n\nexport const UpdateWorkflowConfigSchema = z.object({\n workflow_config_id: z\n .string()\n .describe('ID of the workflow config to update (use workflows_list to find config IDs)'),\n title: z.string().optional().describe('New title for the workflow'),\n subtitle: z.string().optional().describe('New subtitle for the workflow'),\n description: z.string().optional().describe('New description for the workflow'),\n show_in_privacy_center: z\n .boolean()\n .optional()\n .describe('Whether to show this workflow in the Privacy Center'),\n});\nexport type UpdateWorkflowConfigInput = z.infer<typeof UpdateWorkflowConfigSchema>;\n\nexport function createWorkflowsUpdateConfigTool(clients: ToolClients) {\n const graphql = clients.graphql as WorkflowsMixin;\n return defineTool({\n name: 'workflows_update_config',\n description:\n 'Update the configuration for a workflow (title, subtitle, description, privacy center visibility)',\n category: 'Workflows',\n readOnly: false,\n confirmationHint: 'Updates the workflow configuration',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },\n zodSchema: UpdateWorkflowConfigSchema,\n handler: async ({\n workflow_config_id,\n title,\n subtitle,\n description,\n show_in_privacy_center,\n }) => {\n const updates: {\n title?: string;\n subtitle?: string;\n description?: string;\n showInPrivacyCenter?: boolean;\n } = {};\n\n if (title !== undefined) {\n updates.title = title;\n }\n if (subtitle !== undefined) {\n updates.subtitle = subtitle;\n }\n if (description !== undefined) {\n updates.description = description;\n }\n if (show_in_privacy_center !== undefined) {\n updates.showInPrivacyCenter = show_in_privacy_center;\n }\n\n const result = await graphql.updateWorkflowConfig(workflow_config_id, updates);\n\n return createToolResult(true, {\n workflowConfig: result,\n message: 'Workflow configuration updated successfully',\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-base';\n\nimport { createWorkflowsListTool } from './workflows_list.js';\nimport { createWorkflowsListEmailTemplatesTool } from './workflows_list_email_templates.js';\nimport { createWorkflowsUpdateConfigTool } from './workflows_update_config.js';\n\nexport function getWorkflowTools(clients: ToolClients): ToolDefinition[] {\n return [\n createWorkflowsListTool(clients),\n createWorkflowsUpdateConfigTool(clients),\n createWorkflowsListEmailTemplatesTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type EmailTemplate,\n type ListOptions,\n type PaginatedResponse,\n type Workflow,\n type WorkflowConfig,\n} from '@transcend-io/mcp-server-base';\n\nexport class WorkflowsMixin extends TranscendGraphQLBase {\n async listWorkflows(options?: ListOptions): Promise<PaginatedResponse<Workflow>> {\n const query = `\n query ListWorkflows($first: Int) {\n workflows(first: $first) {\n nodes {\n id\n title {\n defaultMessage\n }\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ workflows: { nodes: Workflow[]; totalCount: number } }>(\n query,\n { first: Math.min(options?.first || 50, 100) },\n );\n return {\n nodes: data.workflows.nodes,\n pageInfo: {\n hasNextPage: data.workflows.nodes.length < data.workflows.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.workflows.totalCount,\n };\n }\n\n async updateWorkflowConfig(\n workflowConfigId: string,\n updates: {\n title?: string;\n subtitle?: string;\n description?: string;\n showInPrivacyCenter?: boolean;\n },\n ): Promise<WorkflowConfig> {\n const mutation = `\n mutation UpdateWorkflowConfig($input: UpdateWorkflowConfigInput!) {\n updateWorkflowConfig(input: $input) {\n workflowConfig {\n id\n title {\n defaultMessage\n }\n subtitle {\n defaultMessage\n }\n description {\n defaultMessage\n }\n showInPrivacyCenter\n }\n }\n }\n `;\n const input = { workflowConfigId, ...updates };\n const data = await this.makeRequest<{\n updateWorkflowConfig: {\n workflowConfig: {\n id: string;\n title: { defaultMessage: string } | null;\n subtitle: { defaultMessage: string } | null;\n description: { defaultMessage: string } | null;\n showInPrivacyCenter: boolean;\n };\n };\n }>(mutation, { input });\n const wc = data.updateWorkflowConfig.workflowConfig;\n return {\n id: wc.id,\n title: wc.title?.defaultMessage || '',\n subtitle: wc.subtitle?.defaultMessage || '',\n description: wc.description?.defaultMessage || '',\n showInPrivacyCenter: wc.showInPrivacyCenter,\n };\n }\n\n async listEmailTemplates(options?: ListOptions): Promise<PaginatedResponse<EmailTemplate>> {\n const query = `\n query ListTemplates($first: Int, $offset: Int) {\n templates(first: $first, offset: $offset) {\n nodes {\n id\n title\n type\n isRequired\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n templates: {\n nodes: Array<{ id: string; title: string; type: string; isRequired: boolean }>;\n totalCount: number;\n };\n }>(query, {\n first: Math.min(options?.first || 50, 100),\n offset: options?.offset || 0,\n });\n const templates: EmailTemplate[] = data.templates.nodes.map((t) => ({\n id: t.id,\n name: t.title,\n subject: '',\n type: t.type,\n locale: '',\n isActive: t.isRequired,\n createdAt: '',\n updatedAt: '',\n }));\n return {\n nodes: templates,\n pageInfo: {\n hasNextPage: templates.length < data.templates.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.templates.totalCount,\n };\n }\n}\n"],"mappings":";;AAUA,MAAa,sBAAsB,iBAAiB,OAAO,EACzD,QAAQ,EACL,QAAQ,CACR,UAAU,CACV,SAAS,6DAA6D,EAC1E,CAAC;AAGF,SAAgB,wBAAwB,SAAsB;CAC5D,MAAM,U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AAO,CAAC,EACP,qBAAqB;AACrC,SAAO;GACL,IAAI,GAAG;GACP,OAAO,GAAG,OAAO,kBAAkB;GACnC,UAAU,GAAG,UAAU,kBAAkB;GACzC,aAAa,GAAG,aAAa,kBAAkB;GAC/C,qBAAqB,GAAG;GACzB;;CAGH,MAAM,mBAAmB,SAAkE;EAczF,MAAM,OAAO,MAAM,KAAK,YAbV;;;;;;;;;;;;OAkBJ;GACR,OAAO,KAAK,IAAI,SAAS,SAAS,IAAI,IAAI;GAC1C,QAAQ,SAAS,UAAU;GAC5B,CAAC;EACF,MAAM,YAA6B,KAAK,UAAU,MAAM,KAAK,OAAO;GAClE,IAAI,EAAE;GACN,MAAM,EAAE;GACR,SAAS;GACT,MAAM,EAAE;GACR,QAAQ;GACR,UAAU,EAAE;GACZ,WAAW;GACX,WAAW;GACZ,EAAE;AACH,SAAO;GACL,OAAO;GACP,UAAU;IACR,aAAa,UAAU,SAAS,KAAK,UAAU;IAC/C,iBAAiB;IAClB;GACD,YAAY,KAAK,UAAU;GAC5B"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { EmailTemplate, ListOptions, PaginatedResponse, ToolClients, ToolDefinition, TranscendGraphQLBase, Workflow, WorkflowConfig, z } from "@transcend-io/mcp-server-core";
1
+ import { EmailTemplate, ListOptions, PaginatedResponse, ToolClients, ToolDefinition, TranscendGraphQLBase, Workflow, WorkflowConfig, z } from "@transcend-io/mcp-server-base";
2
2
 
3
3
  //#region src/tools/index.d.ts
4
4
  declare function getWorkflowTools(clients: ToolClients): ToolDefinition[];
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ListWorkflowsSchema, i as ListEmailTemplatesSchema, n as getWorkflowTools, r as UpdateWorkflowConfigSchema, t as WorkflowsMixin } from "./graphql-BE3vRhqA.mjs";
1
+ import { a as ListWorkflowsSchema, i as ListEmailTemplatesSchema, n as getWorkflowTools, r as UpdateWorkflowConfigSchema, t as WorkflowsMixin } from "./graphql-oANS0b0T.mjs";
2
2
  export { ListEmailTemplatesSchema, ListWorkflowsSchema, UpdateWorkflowConfigSchema, WorkflowsMixin, getWorkflowTools };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transcend-io/mcp-server-workflows",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Transcend MCP Server — Workflows tools.",
5
5
  "homepage": "https://github.com/transcend-io/tools/tree/main/packages/mcp/mcp-server-workflows",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@modelcontextprotocol/sdk": "catalog:",
41
- "@transcend-io/mcp-server-core": "workspace:*",
41
+ "@transcend-io/mcp-server-base": "workspace:*",
42
42
  "zod": "catalog:"
43
43
  },
44
44
  "devDependencies": {