conduyt-mcp 4.86.0 → 4.87.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.
@@ -1,3 +1,4 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { ConduytClient } from "../client.js";
3
+ export declare const SMART_VIEW_ICON_IDS: readonly ["heart", "star", "trophy", "badge", "target", "eye", "clock", "hourglass", "siren", "bolt", "fire", "rain", "funnel", "pyramid", "flag", "pin", "push-pin", "thumbs-up", "thumbs-down", "coffee", "rocket", "number-1", "number-2", "number-3", "number-4", "number-5", "number-6", "number-7", "number-8", "number-9"];
3
4
  export declare function registerSavedFilterTools(server: McpServer, client: ConduytClient): void;
@@ -26,6 +26,14 @@ const filtersSchema = z
26
26
  .union([z.array(groupSchema).max(10), z.array(ruleSchema).max(20)])
27
27
  .optional()
28
28
  .describe('Grouped filter payload (max 10 groups × 20 rules), e.g. [{"conjunction":"AND","rules":[{"field":"source","operator":"equals","value":"facebook"}]}]. A flat rule array is also accepted and saved as a single AND group. Omit for an empty filter set.');
29
+ // The 30 current Smart View icon ids in picker order (app branch fable/smart-view-icons: public/smart-view-icons/manifest.json,
30
+ // lib/smart-view-icons.ts). The 17 legacy ids the API still accepts as deprecated inputs are deliberately NOT advertised here.
31
+ export const SMART_VIEW_ICON_IDS = [
32
+ "heart", "star", "trophy", "badge", "target", "eye", "clock", "hourglass", "siren", "bolt",
33
+ "fire", "rain", "funnel", "pyramid", "flag", "pin", "push-pin", "thumbs-up", "thumbs-down", "coffee",
34
+ "rocket", "number-1", "number-2", "number-3", "number-4", "number-5", "number-6", "number-7", "number-8", "number-9",
35
+ ];
36
+ const iconSchema = (omitted) => z.enum(SMART_VIEW_ICON_IDS).optional().describe(`The view's icon, one of: ${SMART_VIEW_ICON_IDS.join(", ")}. ${omitted}. This tool accepts current ids only.`);
29
37
  export function registerSavedFilterTools(server, client) {
30
38
  server.tool("conduyt_list_saved_filters", "List YOUR saved contact filters (the web app's 'Saved' dropdown on All Contacts). Each entry has a name, the grouped filter payload, and sort. Saved filters are personal to the API key's user. Requires the 'saved-filters' scope.", {
31
39
  entity_type: z.enum(["contact"]).optional().describe("Entity type (default 'contact')"),
@@ -43,11 +51,12 @@ export function registerSavedFilterTools(server, client) {
43
51
  sortField: z.string().optional().describe("Sort field applied with the filter (default createdAt)"),
44
52
  sortOrder: z.enum(["asc", "desc"]).optional().describe("Sort direction (default desc)"),
45
53
  entityType: z.enum(["contact"]).optional().describe("Entity type (default 'contact')"),
54
+ icon: iconSchema("Omitted: default heart"),
46
55
  }, async (params) => {
47
56
  // (Smart Views 09-24) saved filters are personal Smart Views now: the same body creates one (personal for a
48
57
  // rep key; an admin key creates a SHARED view, admins have no private filters); POST /saved-filters is retired (410)
49
58
  // personal: true keeps the saved-filter contract for EVERY key (an admin key creates a private view, never a shared one)
50
- const result = await client.post("/api/v1/smart-views", { name: params.name, filters: params.filters, sortField: params.sortField, sortOrder: params.sortOrder, personal: true });
59
+ const result = await client.post("/api/v1/smart-views", { name: params.name, filters: params.filters, sortField: params.sortField, sortOrder: params.sortOrder, icon: params.icon, personal: true });
51
60
  return formatResult(result);
52
61
  });
53
62
  server.tool("conduyt_update_saved_filter", "Rename a saved filter (a personal Smart View) or replace its filters/sort. Owner-only — a personal view is its owner's for every role. Use conduyt_list_saved_filters or conduyt_list_smart_views to find the id. Requires the 'saved-filters' scope.", {
@@ -56,7 +65,8 @@ export function registerSavedFilterTools(server, client) {
56
65
  filters: filtersSchema,
57
66
  sortField: z.string().optional(),
58
67
  sortOrder: z.enum(["asc", "desc"]).optional(),
59
- }, async ({ id, name, filters, sortField, sortOrder }) => {
68
+ icon: iconSchema("Omitted: unchanged"),
69
+ }, async ({ id, name, filters, sortField, sortOrder, icon }) => {
60
70
  // Inline body (undefined fields drop out in JSON) — keeps the shape
61
71
  // readable by the contract verifier's static parser.
62
72
  const result = await client.patch(`/api/v1/smart-views/${encodeURIComponent(id)}`, {
@@ -64,6 +74,7 @@ export function registerSavedFilterTools(server, client) {
64
74
  filters,
65
75
  sortField,
66
76
  sortOrder,
77
+ icon,
67
78
  });
68
79
  return formatResult(result);
69
80
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.86.0",
3
+ "version": "4.87.0",
4
4
  "mcpName": "com.conduyt/mcp",
5
5
  "description": "MCP server for Conduyt CRM — expose CRM operations as AI-accessible tools",
6
6
  "type": "module",