snow-flow 8.36.0 → 8.36.2

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 +1 @@
1
- {"version":3,"file":"enterprise-docs-generator.js","sourceRoot":"","sources":["../../src/cli/enterprise-docs-generator.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAMH,wEA8BC;AAlCD;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,eAAyB;IACtE,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,eAAe,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAE7D,IAAI,YAAY,GAAG,+EAA+E,CAAC;IACnG,YAAY,IAAI,4CAA4C,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACvH,YAAY,IAAI,oIAAoI,CAAC;IAErJ,wBAAwB;IACxB,IAAI,OAAO,EAAE,CAAC;QACZ,YAAY,IAAI,wBAAwB,EAAE,CAAC;IAC7C,CAAC;IAED,gCAAgC;IAChC,IAAI,OAAO,EAAE,CAAC;QACZ,YAAY,IAAI,+BAA+B,EAAE,CAAC;IACpD,CAAC;IAED,8BAA8B;IAC9B,IAAI,aAAa,EAAE,CAAC;QAClB,YAAY,IAAI,8BAA8B,EAAE,CAAC;IACnD,CAAC;IAED,8BAA8B;IAC9B,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,YAAY,IAAI,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,wBAAwB;IAC/B,OAAO;;;;;;;;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AAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { toolDefinition as snow_query_filter_def, execute as snow_query_filter_exec } from './snow_query_filter.js';
2
2
  export { toolDefinition as snow_date_filter_def, execute as snow_date_filter_exec } from './snow_date_filter.js';
3
3
  export { toolDefinition as snow_field_filter_def, execute as snow_field_filter_exec } from './snow_field_filter.js';
4
+ export { toolDefinition as snow_create_saved_filter_def, execute as snow_create_saved_filter_exec } from './snow_create_saved_filter.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACjH,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACjH,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,IAAI,4BAA4B,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.snow_field_filter_exec = exports.snow_field_filter_def = exports.snow_date_filter_exec = exports.snow_date_filter_def = exports.snow_query_filter_exec = exports.snow_query_filter_def = void 0;
3
+ exports.snow_create_saved_filter_exec = exports.snow_create_saved_filter_def = exports.snow_field_filter_exec = exports.snow_field_filter_def = exports.snow_date_filter_exec = exports.snow_date_filter_def = exports.snow_query_filter_exec = exports.snow_query_filter_def = void 0;
4
4
  var snow_query_filter_js_1 = require("./snow_query_filter.js");
5
5
  Object.defineProperty(exports, "snow_query_filter_def", { enumerable: true, get: function () { return snow_query_filter_js_1.toolDefinition; } });
6
6
  Object.defineProperty(exports, "snow_query_filter_exec", { enumerable: true, get: function () { return snow_query_filter_js_1.execute; } });
@@ -10,4 +10,7 @@ Object.defineProperty(exports, "snow_date_filter_exec", { enumerable: true, get:
10
10
  var snow_field_filter_js_1 = require("./snow_field_filter.js");
11
11
  Object.defineProperty(exports, "snow_field_filter_def", { enumerable: true, get: function () { return snow_field_filter_js_1.toolDefinition; } });
12
12
  Object.defineProperty(exports, "snow_field_filter_exec", { enumerable: true, get: function () { return snow_field_filter_js_1.execute; } });
13
+ var snow_create_saved_filter_js_1 = require("./snow_create_saved_filter.js");
14
+ Object.defineProperty(exports, "snow_create_saved_filter_def", { enumerable: true, get: function () { return snow_create_saved_filter_js_1.toolDefinition; } });
15
+ Object.defineProperty(exports, "snow_create_saved_filter_exec", { enumerable: true, get: function () { return snow_create_saved_filter_js_1.execute; } });
13
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/index.ts"],"names":[],"mappings":";;;AAAA,+DAAoH;AAA3G,6HAAA,cAAc,OAAyB;AAAE,8HAAA,OAAO,OAA0B;AACnF,6DAAiH;AAAxG,2HAAA,cAAc,OAAwB;AAAE,4HAAA,OAAO,OAAyB;AACjF,+DAAoH;AAA3G,6HAAA,cAAc,OAAyB;AAAE,8HAAA,OAAO,OAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/index.ts"],"names":[],"mappings":";;;AAAA,+DAAoH;AAA3G,6HAAA,cAAc,OAAyB;AAAE,8HAAA,OAAO,OAA0B;AACnF,6DAAiH;AAAxG,2HAAA,cAAc,OAAwB;AAAE,4HAAA,OAAO,OAAyB;AACjF,+DAAoH;AAA3G,6HAAA,cAAc,OAAyB;AAAE,8HAAA,OAAO,OAA0B;AACnF,6EAAyI;AAAhI,2IAAA,cAAc,OAAgC;AAAE,4IAAA,OAAO,OAAiC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * snow_create_saved_filter
3
+ *
4
+ * Creates a saved filter (sys_filter) that users can select in ServiceNow list views.
5
+ * Saved filters store encoded queries and can be user-specific or global.
6
+ */
7
+ import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
8
+ export declare const toolDefinition: MCPToolDefinition;
9
+ export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
10
+ export declare const version = "1.0.0";
11
+ export declare const author = "Snow-Flow Team";
12
+ //# sourceMappingURL=snow_create_saved_filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_create_saved_filter.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/snow_create_saved_filter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAkD5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwCxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /**
3
+ * snow_create_saved_filter
4
+ *
5
+ * Creates a saved filter (sys_filter) that users can select in ServiceNow list views.
6
+ * Saved filters store encoded queries and can be user-specific or global.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.author = exports.version = exports.toolDefinition = void 0;
10
+ exports.execute = execute;
11
+ const auth_js_1 = require("../../shared/auth.js");
12
+ const error_handler_js_1 = require("../../shared/error-handler.js");
13
+ exports.toolDefinition = {
14
+ name: 'snow_create_saved_filter',
15
+ description: 'Create a saved filter for any ServiceNow table that appears in the filter dropdown',
16
+ // Metadata for tool discovery (not sent to LLM)
17
+ category: 'development',
18
+ subcategory: 'ui',
19
+ use_cases: ['filters', 'saved-filters', 'list-views', 'ui-customization'],
20
+ complexity: 'beginner',
21
+ frequency: 'high',
22
+ // Permission enforcement
23
+ // Classification: WRITE - Create operation - modifies data
24
+ permission: 'write',
25
+ allowedRoles: ['developer', 'admin'],
26
+ inputSchema: {
27
+ type: 'object',
28
+ properties: {
29
+ name: {
30
+ type: 'string',
31
+ description: 'Filter name that appears in the dropdown (e.g., "My Active High Priority Items")'
32
+ },
33
+ table: {
34
+ type: 'string',
35
+ description: 'Table name this filter applies to (e.g., "incident", "change_request")'
36
+ },
37
+ filter: {
38
+ type: 'string',
39
+ description: 'Encoded query string (e.g., "active=true^priority=1")'
40
+ },
41
+ user: {
42
+ type: 'string',
43
+ description: 'User sys_id or username - leave empty for global filter visible to all users'
44
+ },
45
+ roles: {
46
+ type: 'string',
47
+ description: 'Comma-separated role names required to see this filter (e.g., "itil,admin")'
48
+ },
49
+ order: {
50
+ type: 'number',
51
+ description: 'Sort order in the filter dropdown (lower numbers appear first)',
52
+ default: 100
53
+ },
54
+ active: {
55
+ type: 'boolean',
56
+ default: true,
57
+ description: 'Whether the filter is active and visible'
58
+ }
59
+ },
60
+ required: ['name', 'table', 'filter']
61
+ }
62
+ };
63
+ async function execute(args, context) {
64
+ const { name, table, filter, user, roles, order = 100, active = true } = args;
65
+ try {
66
+ const client = await (0, auth_js_1.getAuthenticatedClient)(context);
67
+ const filterData = {
68
+ name,
69
+ table,
70
+ filter,
71
+ order,
72
+ active
73
+ };
74
+ if (user) {
75
+ filterData.user = user;
76
+ }
77
+ if (roles) {
78
+ filterData.roles = roles;
79
+ }
80
+ const response = await client.post('/api/now/table/sys_filter', filterData);
81
+ return (0, error_handler_js_1.createSuccessResult)({
82
+ created: true,
83
+ saved_filter: response.data.result,
84
+ message: `Saved filter "${name}" created for ${table} table. ${user ? 'User-specific filter.' : 'Global filter visible to all users.'}`
85
+ });
86
+ }
87
+ catch (error) {
88
+ return (0, error_handler_js_1.createErrorResult)(error.message);
89
+ }
90
+ }
91
+ exports.version = '1.0.0';
92
+ exports.author = 'Snow-Flow Team';
93
+ //# sourceMappingURL=snow_create_saved_filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_create_saved_filter.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/filters/snow_create_saved_filter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA0DH,0BAwCC;AA/FD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,oFAAoF;IACjG,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,CAAC;IACzE,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,2DAA2D;IAC3D,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAk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mB,EAAC;YACzB,OAAO,EAAE,IAAI;YACb,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM;YAClC,OAAO,EAAE,iBAAiB,IAAI,iBAAiB,KAAK,WAAW,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,qCAAqC,EAAE;SACxI,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oCAAiB,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,gBAAgB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { toolDefinition as snow_create_list_view_def, execute as snow_create_list_view_exec } from './snow_create_list_view.js';
2
2
  export { toolDefinition as snow_add_list_column_def, execute as snow_add_list_column_exec } from './snow_add_list_column.js';
3
3
  export { toolDefinition as snow_create_related_list_def, execute as snow_create_related_list_exec } from './snow_create_related_list.js';
4
+ export { toolDefinition as snow_create_list_layout_def, execute as snow_create_list_layout_exec } from './snow_create_list_layout.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAChI,OAAO,EAAE,cAAc,IAAI,wBAAwB,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC7H,OAAO,EAAE,cAAc,IAAI,4BAA4B,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAChI,OAAO,EAAE,cAAc,IAAI,wBAAwB,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC7H,OAAO,EAAE,cAAc,IAAI,4BAA4B,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACzI,OAAO,EAAE,cAAc,IAAI,2BAA2B,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.snow_create_related_list_exec = exports.snow_create_related_list_def = exports.snow_add_list_column_exec = exports.snow_add_list_column_def = exports.snow_create_list_view_exec = exports.snow_create_list_view_def = void 0;
3
+ exports.snow_create_list_layout_exec = exports.snow_create_list_layout_def = exports.snow_create_related_list_exec = exports.snow_create_related_list_def = exports.snow_add_list_column_exec = exports.snow_add_list_column_def = exports.snow_create_list_view_exec = exports.snow_create_list_view_def = void 0;
4
4
  var snow_create_list_view_js_1 = require("./snow_create_list_view.js");
5
5
  Object.defineProperty(exports, "snow_create_list_view_def", { enumerable: true, get: function () { return snow_create_list_view_js_1.toolDefinition; } });
6
6
  Object.defineProperty(exports, "snow_create_list_view_exec", { enumerable: true, get: function () { return snow_create_list_view_js_1.execute; } });
@@ -10,4 +10,7 @@ Object.defineProperty(exports, "snow_add_list_column_exec", { enumerable: true,
10
10
  var snow_create_related_list_js_1 = require("./snow_create_related_list.js");
11
11
  Object.defineProperty(exports, "snow_create_related_list_def", { enumerable: true, get: function () { return snow_create_related_list_js_1.toolDefinition; } });
12
12
  Object.defineProperty(exports, "snow_create_related_list_exec", { enumerable: true, get: function () { return snow_create_related_list_js_1.execute; } });
13
+ var snow_create_list_layout_js_1 = require("./snow_create_list_layout.js");
14
+ Object.defineProperty(exports, "snow_create_list_layout_def", { enumerable: true, get: function () { return snow_create_list_layout_js_1.toolDefinition; } });
15
+ Object.defineProperty(exports, "snow_create_list_layout_exec", { enumerable: true, get: function () { return snow_create_list_layout_js_1.execute; } });
13
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/index.ts"],"names":[],"mappings":";;;AAAA,uEAAgI;AAAvH,qIAAA,cAAc,OAA6B;AAAE,sIAAA,OAAO,OAA8B;AAC3F,qEAA6H;AAApH,mIAAA,cAAc,OAA4B;AAAE,oIAAA,OAAO,OAA6B;AACzF,6EAAyI;AAAhI,2IAAA,cAAc,OAAgC;AAAE,4IAAA,OAAO,OAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/index.ts"],"names":[],"mappings":";;;AAAA,uEAAgI;AAAvH,qIAAA,cAAc,OAA6B;AAAE,sIAAA,OAAO,OAA8B;AAC3F,qEAA6H;AAApH,mIAAA,cAAc,OAA4B;AAAE,oIAAA,OAAO,OAA6B;AACzF,6EAAyI;AAAhI,2IAAA,cAAc,OAAgC;AAAE,4IAAA,OAAO,OAAiC;AACjG,2EAAsI;AAA7H,yIAAA,cAAc,OAA+B;AAAE,0IAAA,OAAO,OAAgC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * snow_create_list_layout
3
+ *
4
+ * Creates a complete list layout (sys_ui_list) with multiple columns for any ServiceNow table.
5
+ * This defines which fields appear in list views and their order/width.
6
+ */
7
+ import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
8
+ export declare const toolDefinition: MCPToolDefinition;
9
+ export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
10
+ export declare const version = "1.0.0";
11
+ export declare const author = "Snow-Flow Team";
12
+ //# sourceMappingURL=snow_create_list_layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_create_list_layout.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/snow_create_list_layout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBA2D5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiFxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ /**
3
+ * snow_create_list_layout
4
+ *
5
+ * Creates a complete list layout (sys_ui_list) with multiple columns for any ServiceNow table.
6
+ * This defines which fields appear in list views and their order/width.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.author = exports.version = exports.toolDefinition = void 0;
10
+ exports.execute = execute;
11
+ const auth_js_1 = require("../../shared/auth.js");
12
+ const error_handler_js_1 = require("../../shared/error-handler.js");
13
+ exports.toolDefinition = {
14
+ name: 'snow_create_list_layout',
15
+ description: 'Create a complete list layout with multiple columns for any ServiceNow table',
16
+ // Metadata for tool discovery (not sent to LLM)
17
+ category: 'development',
18
+ subcategory: 'ui',
19
+ use_cases: ['lists', 'list-layouts', 'views', 'ui-customization', 'columns'],
20
+ complexity: 'intermediate',
21
+ frequency: 'high',
22
+ // Permission enforcement
23
+ // Classification: WRITE - Create operation - modifies data
24
+ permission: 'write',
25
+ allowedRoles: ['developer', 'admin'],
26
+ inputSchema: {
27
+ type: 'object',
28
+ properties: {
29
+ table: {
30
+ type: 'string',
31
+ description: 'Table name this layout applies to (e.g., "incident", "change_request")'
32
+ },
33
+ view: {
34
+ type: 'string',
35
+ description: 'View name - use "" (empty string) for default view, "mobile" for mobile view, or custom view name',
36
+ default: ''
37
+ },
38
+ columns: {
39
+ type: 'array',
40
+ description: 'Array of column definitions with field names, positions, and optional widths',
41
+ items: {
42
+ type: 'object',
43
+ properties: {
44
+ field: {
45
+ type: 'string',
46
+ description: 'Field name to display (e.g., "number", "short_description", "priority")'
47
+ },
48
+ position: {
49
+ type: 'number',
50
+ description: 'Column position (0 = first column, 1 = second, etc.)'
51
+ },
52
+ width: {
53
+ type: 'number',
54
+ description: 'Column width in pixels (optional, defaults to auto)'
55
+ }
56
+ },
57
+ required: ['field', 'position']
58
+ }
59
+ },
60
+ relationship: {
61
+ type: 'string',
62
+ description: 'For related lists, specify the relationship field (e.g., "parent" for child records)'
63
+ },
64
+ parent: {
65
+ type: 'string',
66
+ description: 'For related lists, specify the parent table name'
67
+ }
68
+ },
69
+ required: ['table', 'columns']
70
+ }
71
+ };
72
+ async function execute(args, context) {
73
+ const { table, view = '', columns, relationship, parent } = args;
74
+ try {
75
+ const client = await (0, auth_js_1.getAuthenticatedClient)(context);
76
+ // Validate columns array
77
+ if (!Array.isArray(columns) || columns.length === 0) {
78
+ return (0, error_handler_js_1.createErrorResult)('columns must be a non-empty array');
79
+ }
80
+ // Sort columns by position to ensure correct order
81
+ const sortedColumns = [...columns].sort((a, b) => a.position - b.position);
82
+ const createdColumns = [];
83
+ const errors = [];
84
+ // Create each column in sys_ui_list
85
+ for (const column of sortedColumns) {
86
+ try {
87
+ const columnData = {
88
+ name: table,
89
+ element: column.field,
90
+ position: column.position
91
+ };
92
+ // Add optional fields
93
+ if (view !== undefined)
94
+ columnData.view = view;
95
+ if (column.width)
96
+ columnData.width = column.width;
97
+ if (relationship)
98
+ columnData.relationship = relationship;
99
+ if (parent)
100
+ columnData.parent = parent;
101
+ const response = await client.post('/api/now/table/sys_ui_list', columnData);
102
+ createdColumns.push({
103
+ field: column.field,
104
+ position: column.position,
105
+ sys_id: response.data.result.sys_id
106
+ });
107
+ }
108
+ catch (error) {
109
+ errors.push(`Failed to create column ${column.field}: ${error.message}`);
110
+ }
111
+ }
112
+ // Build response
113
+ const isRelatedList = !!relationship && !!parent;
114
+ const viewDescription = view ? `view "${view}"` : 'default view';
115
+ const layoutType = isRelatedList ? `related list (${parent}.${relationship})` : 'main list';
116
+ if (errors.length > 0) {
117
+ return (0, error_handler_js_1.createSuccessResult)({
118
+ created: true,
119
+ partial_success: true,
120
+ table,
121
+ view,
122
+ layout_type: layoutType,
123
+ columns_created: createdColumns.length,
124
+ columns_failed: errors.length,
125
+ created_columns: createdColumns,
126
+ errors,
127
+ message: `List layout partially created for ${table} ${layoutType}, ${viewDescription}. ${createdColumns.length}/${columns.length} columns created successfully.`
128
+ });
129
+ }
130
+ return (0, error_handler_js_1.createSuccessResult)({
131
+ created: true,
132
+ table,
133
+ view,
134
+ layout_type: layoutType,
135
+ columns_count: createdColumns.length,
136
+ columns: createdColumns,
137
+ message: `List layout created for ${table} ${layoutType}, ${viewDescription} with ${createdColumns.length} columns.`
138
+ });
139
+ }
140
+ catch (error) {
141
+ return (0, error_handler_js_1.createErrorResult)(error.message);
142
+ }
143
+ }
144
+ exports.version = '1.0.0';
145
+ exports.author = 'Snow-Flow Team';
146
+ //# sourceMappingURL=snow_create_list_layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_create_list_layout.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/lists/snow_create_list_layout.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAmEH,0BAiFC;AAjJD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,8EAA8E;IAC3F,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,CAAC;IAC5E,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,2DAA2D;IAC3D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,CAAC;IAC1C,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "8.36.0",
3
+ "version": "8.36.2",
4
4
  "description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 393 Optimized Tools • 2 MCP Servers • Multi-agent orchestration • Use ANY AI coding assistant (ML tools moved to Enterprise)",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",