nowaikit 2.5.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.
Potentially problematic release.
This version of nowaikit might be problematic. Click here for more details.
- package/.env.example +96 -0
- package/LICENSE +21 -0
- package/README.md +1253 -0
- package/desktop/renderer/dist/apple-touch-icon.png +0 -0
- package/desktop/renderer/dist/assets/index-Bb0ncZQl.css +1 -0
- package/desktop/renderer/dist/assets/index-MlBBSUMZ.js +49 -0
- package/desktop/renderer/dist/favicon-32.png +0 -0
- package/desktop/renderer/dist/favicon.svg +18 -0
- package/desktop/renderer/dist/index.html +18 -0
- package/desktop/serve.js +449 -0
- package/dist/cli/auth.d.ts +14 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +179 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/config-store.d.ts +28 -0
- package/dist/cli/config-store.d.ts.map +1 -0
- package/dist/cli/config-store.js +64 -0
- package/dist/cli/config-store.js.map +1 -0
- package/dist/cli/detect-clients.d.ts +16 -0
- package/dist/cli/detect-clients.d.ts.map +1 -0
- package/dist/cli/detect-clients.js +151 -0
- package/dist/cli/detect-clients.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +193 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/setup.d.ts +4 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +575 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/writers/index.d.ts +9 -0
- package/dist/cli/writers/index.d.ts.map +1 -0
- package/dist/cli/writers/index.js +140 -0
- package/dist/cli/writers/index.js.map +1 -0
- package/dist/prompts/index.d.ts +25 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +38 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/itsm.d.ts +20 -0
- package/dist/prompts/itsm.d.ts.map +1 -0
- package/dist/prompts/itsm.js +110 -0
- package/dist/prompts/itsm.js.map +1 -0
- package/dist/prompts/user-prompts.d.ts +3 -0
- package/dist/prompts/user-prompts.d.ts.map +1 -0
- package/dist/prompts/user-prompts.js +35 -0
- package/dist/prompts/user-prompts.js.map +1 -0
- package/dist/resources/index.d.ts +26 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +99 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +129 -0
- package/dist/server.js.map +1 -0
- package/dist/servicenow/client.d.ts +135 -0
- package/dist/servicenow/client.d.ts.map +1 -0
- package/dist/servicenow/client.js +803 -0
- package/dist/servicenow/client.js.map +1 -0
- package/dist/servicenow/instances.d.ts +28 -0
- package/dist/servicenow/instances.d.ts.map +1 -0
- package/dist/servicenow/instances.js +204 -0
- package/dist/servicenow/instances.js.map +1 -0
- package/dist/servicenow/types.d.ts +574 -0
- package/dist/servicenow/types.d.ts.map +1 -0
- package/dist/servicenow/types.js +3 -0
- package/dist/servicenow/types.js.map +1 -0
- package/dist/tools/agile.d.ts +225 -0
- package/dist/tools/agile.d.ts.map +1 -0
- package/dist/tools/agile.js +205 -0
- package/dist/tools/agile.js.map +1 -0
- package/dist/tools/app-studio.d.ts +139 -0
- package/dist/tools/app-studio.d.ts.map +1 -0
- package/dist/tools/app-studio.js +139 -0
- package/dist/tools/app-studio.js.map +1 -0
- package/dist/tools/atf.d.ts +144 -0
- package/dist/tools/atf.d.ts.map +1 -0
- package/dist/tools/atf.js +186 -0
- package/dist/tools/atf.js.map +1 -0
- package/dist/tools/catalog.d.ts +628 -0
- package/dist/tools/catalog.d.ts.map +1 -0
- package/dist/tools/catalog.js +397 -0
- package/dist/tools/catalog.js.map +1 -0
- package/dist/tools/change.d.ts +347 -0
- package/dist/tools/change.d.ts.map +1 -0
- package/dist/tools/change.js +213 -0
- package/dist/tools/change.js.map +1 -0
- package/dist/tools/core.d.ts +540 -0
- package/dist/tools/core.d.ts.map +1 -0
- package/dist/tools/core.js +373 -0
- package/dist/tools/core.js.map +1 -0
- package/dist/tools/csm.d.ts +401 -0
- package/dist/tools/csm.d.ts.map +1 -0
- package/dist/tools/csm.js +255 -0
- package/dist/tools/csm.js.map +1 -0
- package/dist/tools/deployment.d.ts +366 -0
- package/dist/tools/deployment.d.ts.map +1 -0
- package/dist/tools/deployment.js +181 -0
- package/dist/tools/deployment.js.map +1 -0
- package/dist/tools/devops.d.ts +236 -0
- package/dist/tools/devops.d.ts.map +1 -0
- package/dist/tools/devops.js +207 -0
- package/dist/tools/devops.js.map +1 -0
- package/dist/tools/flow.d.ts +496 -0
- package/dist/tools/flow.d.ts.map +1 -0
- package/dist/tools/flow.js +348 -0
- package/dist/tools/flow.js.map +1 -0
- package/dist/tools/hrsd.d.ts +789 -0
- package/dist/tools/hrsd.d.ts.map +1 -0
- package/dist/tools/hrsd.js +377 -0
- package/dist/tools/hrsd.js.map +1 -0
- package/dist/tools/incident.d.ts +256 -0
- package/dist/tools/incident.d.ts.map +1 -0
- package/dist/tools/incident.js +163 -0
- package/dist/tools/incident.js.map +1 -0
- package/dist/tools/index.d.ts +11514 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +276 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integration.d.ts +603 -0
- package/dist/tools/integration.d.ts.map +1 -0
- package/dist/tools/integration.js +510 -0
- package/dist/tools/integration.js.map +1 -0
- package/dist/tools/itam.d.ts +462 -0
- package/dist/tools/itam.d.ts.map +1 -0
- package/dist/tools/itam.js +306 -0
- package/dist/tools/itam.js.map +1 -0
- package/dist/tools/knowledge.d.ts +187 -0
- package/dist/tools/knowledge.d.ts.map +1 -0
- package/dist/tools/knowledge.js +161 -0
- package/dist/tools/knowledge.js.map +1 -0
- package/dist/tools/ml.d.ts +263 -0
- package/dist/tools/ml.d.ts.map +1 -0
- package/dist/tools/ml.js +251 -0
- package/dist/tools/ml.js.map +1 -0
- package/dist/tools/mobile.d.ts +352 -0
- package/dist/tools/mobile.d.ts.map +1 -0
- package/dist/tools/mobile.js +122 -0
- package/dist/tools/mobile.js.map +1 -0
- package/dist/tools/notification.d.ts +590 -0
- package/dist/tools/notification.d.ts.map +1 -0
- package/dist/tools/notification.js +382 -0
- package/dist/tools/notification.js.map +1 -0
- package/dist/tools/now-assist.d.ts +300 -0
- package/dist/tools/now-assist.d.ts.map +1 -0
- package/dist/tools/now-assist.js +227 -0
- package/dist/tools/now-assist.js.map +1 -0
- package/dist/tools/performance.d.ts +447 -0
- package/dist/tools/performance.d.ts.map +1 -0
- package/dist/tools/performance.js +473 -0
- package/dist/tools/performance.js.map +1 -0
- package/dist/tools/portal.d.ts +530 -0
- package/dist/tools/portal.d.ts.map +1 -0
- package/dist/tools/portal.js +425 -0
- package/dist/tools/portal.js.map +1 -0
- package/dist/tools/problem.d.ts +110 -0
- package/dist/tools/problem.d.ts.map +1 -0
- package/dist/tools/problem.js +100 -0
- package/dist/tools/problem.js.map +1 -0
- package/dist/tools/reporting.d.ts +825 -0
- package/dist/tools/reporting.d.ts.map +1 -0
- package/dist/tools/reporting.js +460 -0
- package/dist/tools/reporting.js.map +1 -0
- package/dist/tools/script.d.ts +714 -0
- package/dist/tools/script.d.ts.map +1 -0
- package/dist/tools/script.js +629 -0
- package/dist/tools/script.js.map +1 -0
- package/dist/tools/security.d.ts +794 -0
- package/dist/tools/security.d.ts.map +1 -0
- package/dist/tools/security.js +425 -0
- package/dist/tools/security.js.map +1 -0
- package/dist/tools/sys-properties.d.ts +315 -0
- package/dist/tools/sys-properties.d.ts.map +1 -0
- package/dist/tools/sys-properties.js +372 -0
- package/dist/tools/sys-properties.js.map +1 -0
- package/dist/tools/task.d.ts +82 -0
- package/dist/tools/task.d.ts.map +1 -0
- package/dist/tools/task.js +96 -0
- package/dist/tools/task.js.map +1 -0
- package/dist/tools/updateset.d.ts +159 -0
- package/dist/tools/updateset.d.ts.map +1 -0
- package/dist/tools/updateset.js +212 -0
- package/dist/tools/updateset.js.map +1 -0
- package/dist/tools/user.d.ts +206 -0
- package/dist/tools/user.d.ts.map +1 -0
- package/dist/tools/user.js +163 -0
- package/dist/tools/user.js.map +1 -0
- package/dist/tools/va.d.ts +217 -0
- package/dist/tools/va.d.ts.map +1 -0
- package/dist/tools/va.js +178 -0
- package/dist/tools/va.js.map +1 -0
- package/dist/tools/workspace.d.ts +565 -0
- package/dist/tools/workspace.d.ts.map +1 -0
- package/dist/tools/workspace.js +201 -0
- package/dist/tools/workspace.js.map +1 -0
- package/dist/tools-manifest.json +7852 -0
- package/dist/utils/errors.d.ts +6 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +11 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logging.d.ts +7 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +15 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/permissions.d.ts +21 -0
- package/dist/utils/permissions.d.ts.map +1 -0
- package/dist/utils/permissions.js +54 -0
- package/dist/utils/permissions.js.map +1 -0
- package/instances.example.json +71 -0
- package/package.json +110 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
import { ServiceNowError } from '../utils/errors.js';
|
|
2
|
+
import { requireScripting } from '../utils/permissions.js';
|
|
3
|
+
export function getScriptToolDefinitions() {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
name: 'list_business_rules',
|
|
7
|
+
description: 'List business rules (requires SCRIPTING_ENABLED=true)',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
table: { type: 'string', description: 'Filter by table name' },
|
|
12
|
+
active: { type: 'boolean', description: 'Filter to active rules only' },
|
|
13
|
+
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
14
|
+
},
|
|
15
|
+
required: [],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'get_business_rule',
|
|
20
|
+
description: 'Get full details and script body of a business rule (requires SCRIPTING_ENABLED=true)',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
sys_id: { type: 'string', description: 'System ID of the business rule' },
|
|
25
|
+
},
|
|
26
|
+
required: ['sys_id'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'create_business_rule',
|
|
31
|
+
description: 'Create a new business rule (requires SCRIPTING_ENABLED=true). ServiceNow supports ES2021 async/await in scripts.',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
name: { type: 'string', description: 'Rule name' },
|
|
36
|
+
table: { type: 'string', description: 'Table this rule applies to' },
|
|
37
|
+
when: { type: 'string', description: '"before" | "after" | "async" | "display"' },
|
|
38
|
+
script: { type: 'string', description: 'Server-side JavaScript. ServiceNow supports ES2021 (async/await, ?., ??).' },
|
|
39
|
+
condition: { type: 'string', description: 'Optional condition script' },
|
|
40
|
+
active: { type: 'boolean', description: 'Whether to activate the rule (default: true)' },
|
|
41
|
+
order: { type: 'number', description: 'Execution order (default: 100)' },
|
|
42
|
+
},
|
|
43
|
+
required: ['name', 'table', 'when', 'script'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'update_business_rule',
|
|
48
|
+
description: 'Update a business rule (requires SCRIPTING_ENABLED=true)',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
sys_id: { type: 'string', description: 'System ID of the rule' },
|
|
53
|
+
fields: { type: 'object', description: 'Key-value pairs to update (name, script, active, condition, etc.)' },
|
|
54
|
+
},
|
|
55
|
+
required: ['sys_id', 'fields'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'list_script_includes',
|
|
60
|
+
description: 'List script includes (requires SCRIPTING_ENABLED=true)',
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
query: { type: 'string', description: 'Filter (e.g., "nameLIKEUtil")' },
|
|
65
|
+
active: { type: 'boolean', description: 'Filter to active includes' },
|
|
66
|
+
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
67
|
+
},
|
|
68
|
+
required: [],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'get_script_include',
|
|
73
|
+
description: 'Get full script body of a script include (requires SCRIPTING_ENABLED=true)',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
sys_id_or_name: { type: 'string', description: 'Script include sys_id or api_name' },
|
|
78
|
+
},
|
|
79
|
+
required: ['sys_id_or_name'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'create_script_include',
|
|
84
|
+
description: 'Create a new script include (requires SCRIPTING_ENABLED=true)',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
name: { type: 'string', description: 'Script include name' },
|
|
89
|
+
script: { type: 'string', description: 'Script body (class definition). ServiceNow supports ES2021.' },
|
|
90
|
+
api_name: { type: 'string', description: 'API name used to call this from other scripts' },
|
|
91
|
+
access: { type: 'string', description: '"public" or "package_private" (default: "public")' },
|
|
92
|
+
active: { type: 'boolean', description: 'Whether to activate (default: true)' },
|
|
93
|
+
},
|
|
94
|
+
required: ['name', 'script'],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'update_script_include',
|
|
99
|
+
description: 'Update a script include (requires SCRIPTING_ENABLED=true)',
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
properties: {
|
|
103
|
+
sys_id: { type: 'string', description: 'System ID of the script include' },
|
|
104
|
+
fields: { type: 'object', description: 'Key-value pairs to update' },
|
|
105
|
+
},
|
|
106
|
+
required: ['sys_id', 'fields'],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'list_client_scripts',
|
|
111
|
+
description: 'List client scripts (requires SCRIPTING_ENABLED=true)',
|
|
112
|
+
inputSchema: {
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties: {
|
|
115
|
+
table: { type: 'string', description: 'Filter by table name' },
|
|
116
|
+
type: { type: 'string', description: '"onLoad" | "onChange" | "onSubmit" | "onCellEdit"' },
|
|
117
|
+
active: { type: 'boolean', description: 'Filter to active scripts' },
|
|
118
|
+
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
119
|
+
},
|
|
120
|
+
required: [],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'get_client_script',
|
|
125
|
+
description: 'Get full details and script body of a client script (requires SCRIPTING_ENABLED=true)',
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
sys_id: { type: 'string', description: 'System ID of the client script' },
|
|
130
|
+
},
|
|
131
|
+
required: ['sys_id'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'list_changesets',
|
|
136
|
+
description: 'List update sets (changesets) (requires SCRIPTING_ENABLED=true)',
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: {
|
|
140
|
+
state: { type: 'string', description: 'Filter by state: "in progress", "complete", "ignore"' },
|
|
141
|
+
limit: { type: 'number', description: 'Max results (default: 20)' },
|
|
142
|
+
},
|
|
143
|
+
required: [],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'get_changeset',
|
|
148
|
+
description: 'Get details of an update set (requires SCRIPTING_ENABLED=true)',
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: 'object',
|
|
151
|
+
properties: {
|
|
152
|
+
sys_id_or_name: { type: 'string', description: 'Update set sys_id or name' },
|
|
153
|
+
},
|
|
154
|
+
required: ['sys_id_or_name'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'commit_changeset',
|
|
159
|
+
description: 'Commit an update set (requires SCRIPTING_ENABLED=true)',
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {
|
|
163
|
+
sys_id: { type: 'string', description: 'System ID of the update set' },
|
|
164
|
+
},
|
|
165
|
+
required: ['sys_id'],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'publish_changeset',
|
|
170
|
+
description: 'Publish/export an update set to XML for deployment (requires SCRIPTING_ENABLED=true)',
|
|
171
|
+
inputSchema: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
properties: {
|
|
174
|
+
sys_id: { type: 'string', description: 'System ID of the update set' },
|
|
175
|
+
},
|
|
176
|
+
required: ['sys_id'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
// ── Client Script CRUD ───────────────────────────────────────────────────
|
|
180
|
+
{
|
|
181
|
+
name: 'create_client_script',
|
|
182
|
+
description: 'Create a new client script (onLoad, onChange, onSubmit, onCellEdit) (requires SCRIPTING_ENABLED=true)',
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: 'object',
|
|
185
|
+
properties: {
|
|
186
|
+
name: { type: 'string', description: 'Script name' },
|
|
187
|
+
table: { type: 'string', description: 'Table this client script applies to' },
|
|
188
|
+
type: { type: 'string', description: '"onLoad" | "onChange" | "onSubmit" | "onCellEdit"' },
|
|
189
|
+
script: { type: 'string', description: 'Client-side JavaScript. Use g_form, g_user, etc.' },
|
|
190
|
+
field_name: { type: 'string', description: 'Field name (required for onChange/onCellEdit)' },
|
|
191
|
+
active: { type: 'boolean', description: 'Whether to activate the script (default: true)' },
|
|
192
|
+
global: { type: 'boolean', description: 'Run script globally (default: false)' },
|
|
193
|
+
},
|
|
194
|
+
required: ['name', 'table', 'type', 'script'],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'update_client_script',
|
|
199
|
+
description: 'Update an existing client script (requires SCRIPTING_ENABLED=true)',
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: 'object',
|
|
202
|
+
properties: {
|
|
203
|
+
sys_id: { type: 'string', description: 'Client script sys_id' },
|
|
204
|
+
fields: { type: 'object', description: 'Fields to update (script, active, name, type, etc.)' },
|
|
205
|
+
},
|
|
206
|
+
required: ['sys_id', 'fields'],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
// ── UI Policies ──────────────────────────────────────────────────────────
|
|
210
|
+
{
|
|
211
|
+
name: 'list_ui_policies',
|
|
212
|
+
description: 'List UI Policies for a table (field visibility, mandatory, read-only rules) (requires SCRIPTING_ENABLED=true)',
|
|
213
|
+
inputSchema: {
|
|
214
|
+
type: 'object',
|
|
215
|
+
properties: {
|
|
216
|
+
table: { type: 'string', description: 'Filter by table name' },
|
|
217
|
+
active: { type: 'boolean', description: 'Filter to active policies only' },
|
|
218
|
+
limit: { type: 'number', description: 'Max results (default: 25)' },
|
|
219
|
+
},
|
|
220
|
+
required: [],
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: 'get_ui_policy',
|
|
225
|
+
description: 'Get full details and conditions of a UI Policy (requires SCRIPTING_ENABLED=true)',
|
|
226
|
+
inputSchema: {
|
|
227
|
+
type: 'object',
|
|
228
|
+
properties: {
|
|
229
|
+
sys_id: { type: 'string', description: 'UI Policy sys_id' },
|
|
230
|
+
},
|
|
231
|
+
required: ['sys_id'],
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'create_ui_policy',
|
|
236
|
+
description: 'Create a new UI Policy to control field behavior dynamically (requires SCRIPTING_ENABLED=true)',
|
|
237
|
+
inputSchema: {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: {
|
|
240
|
+
short_description: { type: 'string', description: 'Policy description' },
|
|
241
|
+
table: { type: 'string', description: 'Table to apply this policy on' },
|
|
242
|
+
conditions: { type: 'string', description: 'Encoded query conditions that trigger the policy' },
|
|
243
|
+
script: { type: 'string', description: 'Optional script to run when conditions are met' },
|
|
244
|
+
active: { type: 'boolean', description: 'Whether to activate immediately (default: true)' },
|
|
245
|
+
run_scripts: { type: 'boolean', description: 'Run script in addition to UI actions (default: false)' },
|
|
246
|
+
},
|
|
247
|
+
required: ['short_description', 'table'],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
// ── UI Actions ───────────────────────────────────────────────────────────
|
|
251
|
+
{
|
|
252
|
+
name: 'list_ui_actions',
|
|
253
|
+
description: 'List UI Actions (buttons, context menus, related links) for a table (requires SCRIPTING_ENABLED=true)',
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: 'object',
|
|
256
|
+
properties: {
|
|
257
|
+
table: { type: 'string', description: 'Filter by table name' },
|
|
258
|
+
type: { type: 'string', description: 'Filter by type: button, context_menu, related_link, list_link, list_button, list_context_menu' },
|
|
259
|
+
active: { type: 'boolean', description: 'Filter to active actions only' },
|
|
260
|
+
limit: { type: 'number', description: 'Max results (default: 25)' },
|
|
261
|
+
},
|
|
262
|
+
required: [],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: 'get_ui_action',
|
|
267
|
+
description: 'Get full details and script of a UI Action (requires SCRIPTING_ENABLED=true)',
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: 'object',
|
|
270
|
+
properties: {
|
|
271
|
+
sys_id: { type: 'string', description: 'UI Action sys_id' },
|
|
272
|
+
},
|
|
273
|
+
required: ['sys_id'],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'create_ui_action',
|
|
278
|
+
description: 'Create a new UI Action (button or link) on a form (requires SCRIPTING_ENABLED=true)',
|
|
279
|
+
inputSchema: {
|
|
280
|
+
type: 'object',
|
|
281
|
+
properties: {
|
|
282
|
+
name: { type: 'string', description: 'Button/link label visible to users' },
|
|
283
|
+
table: { type: 'string', description: 'Table to add this action on' },
|
|
284
|
+
action_name: { type: 'string', description: 'Internal action name (no spaces)' },
|
|
285
|
+
script: { type: 'string', description: 'Server-side script to execute when clicked' },
|
|
286
|
+
type: { type: 'string', description: '"button" | "context_menu" | "related_link" | "list_button"' },
|
|
287
|
+
condition: { type: 'string', description: 'Condition to show/hide the action' },
|
|
288
|
+
active: { type: 'boolean', description: 'Whether to activate immediately (default: true)' },
|
|
289
|
+
form_button: { type: 'boolean', description: 'Show on form (default: true)' },
|
|
290
|
+
list_button: { type: 'boolean', description: 'Show on list (default: false)' },
|
|
291
|
+
},
|
|
292
|
+
required: ['name', 'table', 'action_name'],
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'update_ui_action',
|
|
297
|
+
description: 'Update an existing UI Action (requires SCRIPTING_ENABLED=true)',
|
|
298
|
+
inputSchema: {
|
|
299
|
+
type: 'object',
|
|
300
|
+
properties: {
|
|
301
|
+
sys_id: { type: 'string', description: 'UI Action sys_id' },
|
|
302
|
+
fields: { type: 'object', description: 'Fields to update (name, script, active, condition, etc.)' },
|
|
303
|
+
},
|
|
304
|
+
required: ['sys_id', 'fields'],
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
// ── ACL Management ───────────────────────────────────────────────────────
|
|
308
|
+
{
|
|
309
|
+
name: 'list_acls',
|
|
310
|
+
description: 'List Access Control rules (ACLs) — who can read/write/create/delete records (requires SCRIPTING_ENABLED=true)',
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: 'object',
|
|
313
|
+
properties: {
|
|
314
|
+
table: { type: 'string', description: 'Filter ACLs by table name' },
|
|
315
|
+
operation: { type: 'string', description: 'Filter by operation: read, write, create, delete, execute' },
|
|
316
|
+
active: { type: 'boolean', description: 'Filter to active ACLs only' },
|
|
317
|
+
limit: { type: 'number', description: 'Max results (default: 25)' },
|
|
318
|
+
},
|
|
319
|
+
required: [],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: 'get_acl',
|
|
324
|
+
description: 'Get full details of an ACL rule including its script and role requirements (requires SCRIPTING_ENABLED=true)',
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: 'object',
|
|
327
|
+
properties: {
|
|
328
|
+
sys_id: { type: 'string', description: 'ACL sys_id' },
|
|
329
|
+
},
|
|
330
|
+
required: ['sys_id'],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: 'create_acl',
|
|
335
|
+
description: 'Create a new ACL rule to control access to a table or field (requires SCRIPTING_ENABLED=true)',
|
|
336
|
+
inputSchema: {
|
|
337
|
+
type: 'object',
|
|
338
|
+
properties: {
|
|
339
|
+
name: { type: 'string', description: 'ACL name (typically "table.field" or "table.*")' },
|
|
340
|
+
type: { type: 'string', description: '"record" | "field" | "rest_endpoint" | "soap_endpoint"' },
|
|
341
|
+
operation: { type: 'string', description: '"read" | "write" | "create" | "delete" | "execute"' },
|
|
342
|
+
admin_overrides: { type: 'boolean', description: 'Allow admin to override (default: true)' },
|
|
343
|
+
active: { type: 'boolean', description: 'Whether to activate immediately (default: true)' },
|
|
344
|
+
script: { type: 'string', description: 'Optional condition script (return true to allow)' },
|
|
345
|
+
roles: { type: 'string', description: 'Comma-separated roles required (e.g. "admin,itil")' },
|
|
346
|
+
description: { type: 'string', description: 'Description of this access rule' },
|
|
347
|
+
},
|
|
348
|
+
required: ['name', 'operation'],
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: 'update_acl',
|
|
353
|
+
description: 'Update an existing ACL rule (requires SCRIPTING_ENABLED=true)',
|
|
354
|
+
inputSchema: {
|
|
355
|
+
type: 'object',
|
|
356
|
+
properties: {
|
|
357
|
+
sys_id: { type: 'string', description: 'ACL sys_id' },
|
|
358
|
+
fields: { type: 'object', description: 'Fields to update (active, script, roles, condition, etc.)' },
|
|
359
|
+
},
|
|
360
|
+
required: ['sys_id', 'fields'],
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
}
|
|
365
|
+
export async function executeScriptToolCall(client, name, args) {
|
|
366
|
+
requireScripting();
|
|
367
|
+
switch (name) {
|
|
368
|
+
case 'list_business_rules': {
|
|
369
|
+
let query = '';
|
|
370
|
+
if (args.active !== undefined)
|
|
371
|
+
query = `active=${args.active}`;
|
|
372
|
+
if (args.table)
|
|
373
|
+
query = query ? `${query}^collection=${args.table}` : `collection=${args.table}`;
|
|
374
|
+
const resp = await client.queryRecords({ table: 'sys_script', query: query || undefined, limit: args.limit || 20, fields: 'sys_id,name,collection,when,active,order,sys_updated_on' });
|
|
375
|
+
return { count: resp.count, business_rules: resp.records, note: 'ServiceNow supports ES2021 (async/await, ?., ??) in script bodies' };
|
|
376
|
+
}
|
|
377
|
+
case 'get_business_rule': {
|
|
378
|
+
if (!args.sys_id)
|
|
379
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
380
|
+
return await client.getRecord('sys_script', args.sys_id);
|
|
381
|
+
}
|
|
382
|
+
case 'create_business_rule': {
|
|
383
|
+
if (!args.name || !args.table || !args.when || !args.script)
|
|
384
|
+
throw new ServiceNowError('name, table, when, and script are required', 'INVALID_REQUEST');
|
|
385
|
+
const data = { name: args.name, collection: args.table, when: args.when, script: args.script, condition: args.condition, active: args.active !== false, order: args.order || 100 };
|
|
386
|
+
const result = await client.createRecord('sys_script', data);
|
|
387
|
+
return { ...result, summary: `Created business rule ${args.name}`, note: 'GlideEncrypter is deprecated in recent releases; use new sn_si.Vault or keystore APIs instead' };
|
|
388
|
+
}
|
|
389
|
+
case 'update_business_rule': {
|
|
390
|
+
if (!args.sys_id || !args.fields)
|
|
391
|
+
throw new ServiceNowError('sys_id and fields are required', 'INVALID_REQUEST');
|
|
392
|
+
const result = await client.updateRecord('sys_script', args.sys_id, args.fields);
|
|
393
|
+
return { ...result, summary: `Updated business rule ${args.sys_id}` };
|
|
394
|
+
}
|
|
395
|
+
case 'list_script_includes': {
|
|
396
|
+
let query = '';
|
|
397
|
+
if (args.active !== undefined)
|
|
398
|
+
query = `active=${args.active}`;
|
|
399
|
+
if (args.query)
|
|
400
|
+
query = query ? `${query}^${args.query}` : args.query;
|
|
401
|
+
const resp = await client.queryRecords({ table: 'sys_script_include', query: query || undefined, limit: args.limit || 20, fields: 'sys_id,name,api_name,active,access,sys_updated_on' });
|
|
402
|
+
return { count: resp.count, script_includes: resp.records };
|
|
403
|
+
}
|
|
404
|
+
case 'get_script_include': {
|
|
405
|
+
if (!args.sys_id_or_name)
|
|
406
|
+
throw new ServiceNowError('sys_id_or_name is required', 'INVALID_REQUEST');
|
|
407
|
+
if (/^[0-9a-f]{32}$/i.test(args.sys_id_or_name)) {
|
|
408
|
+
return await client.getRecord('sys_script_include', args.sys_id_or_name);
|
|
409
|
+
}
|
|
410
|
+
const resp = await client.queryRecords({ table: 'sys_script_include', query: `api_name=${args.sys_id_or_name}^ORname=${args.sys_id_or_name}`, limit: 1 });
|
|
411
|
+
if (resp.count === 0)
|
|
412
|
+
throw new ServiceNowError(`Script include not found: ${args.sys_id_or_name}`, 'NOT_FOUND');
|
|
413
|
+
return resp.records[0];
|
|
414
|
+
}
|
|
415
|
+
case 'create_script_include': {
|
|
416
|
+
if (!args.name || !args.script)
|
|
417
|
+
throw new ServiceNowError('name and script are required', 'INVALID_REQUEST');
|
|
418
|
+
const data = { name: args.name, script: args.script, api_name: args.api_name || args.name, access: args.access || 'public', active: args.active !== false };
|
|
419
|
+
const result = await client.createRecord('sys_script_include', data);
|
|
420
|
+
return { ...result, summary: `Created script include ${args.name}`, note: 'ES2021 (async/await, ?., ??) supported in the latest release' };
|
|
421
|
+
}
|
|
422
|
+
case 'update_script_include': {
|
|
423
|
+
if (!args.sys_id || !args.fields)
|
|
424
|
+
throw new ServiceNowError('sys_id and fields are required', 'INVALID_REQUEST');
|
|
425
|
+
return await client.updateRecord('sys_script_include', args.sys_id, args.fields);
|
|
426
|
+
}
|
|
427
|
+
case 'list_client_scripts': {
|
|
428
|
+
let query = '';
|
|
429
|
+
if (args.active !== undefined)
|
|
430
|
+
query = `active=${args.active}`;
|
|
431
|
+
if (args.table)
|
|
432
|
+
query = query ? `${query}^table=${args.table}` : `table=${args.table}`;
|
|
433
|
+
if (args.type)
|
|
434
|
+
query = query ? `${query}^type=${args.type}` : `type=${args.type}`;
|
|
435
|
+
const resp = await client.queryRecords({ table: 'sys_script_client', query: query || undefined, limit: args.limit || 20, fields: 'sys_id,name,table,type,active,sys_updated_on' });
|
|
436
|
+
return { count: resp.count, client_scripts: resp.records };
|
|
437
|
+
}
|
|
438
|
+
case 'get_client_script': {
|
|
439
|
+
if (!args.sys_id)
|
|
440
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
441
|
+
return await client.getRecord('sys_script_client', args.sys_id);
|
|
442
|
+
}
|
|
443
|
+
case 'list_changesets': {
|
|
444
|
+
let query = '';
|
|
445
|
+
if (args.state)
|
|
446
|
+
query = `state=${args.state}`;
|
|
447
|
+
const resp = await client.queryRecords({ table: 'sys_update_set', query: query || undefined, limit: args.limit || 20, fields: 'sys_id,name,state,description,application,sys_updated_on' });
|
|
448
|
+
return { count: resp.count, changesets: resp.records, note: 'Latest ReleaseOps provides automated deployment pipelines for changesets' };
|
|
449
|
+
}
|
|
450
|
+
case 'get_changeset': {
|
|
451
|
+
if (!args.sys_id_or_name)
|
|
452
|
+
throw new ServiceNowError('sys_id_or_name is required', 'INVALID_REQUEST');
|
|
453
|
+
if (/^[0-9a-f]{32}$/i.test(args.sys_id_or_name)) {
|
|
454
|
+
return await client.getRecord('sys_update_set', args.sys_id_or_name);
|
|
455
|
+
}
|
|
456
|
+
const resp = await client.queryRecords({ table: 'sys_update_set', query: `name=${args.sys_id_or_name}^ORsys_id=${args.sys_id_or_name}`, limit: 1 });
|
|
457
|
+
if (resp.count === 0)
|
|
458
|
+
throw new ServiceNowError(`Changeset not found: ${args.sys_id_or_name}`, 'NOT_FOUND');
|
|
459
|
+
return resp.records[0];
|
|
460
|
+
}
|
|
461
|
+
case 'commit_changeset': {
|
|
462
|
+
if (!args.sys_id)
|
|
463
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
464
|
+
const result = await client.updateRecord('sys_update_set', args.sys_id, { state: 'complete' });
|
|
465
|
+
return { ...result, summary: `Committed changeset ${args.sys_id}` };
|
|
466
|
+
}
|
|
467
|
+
case 'publish_changeset': {
|
|
468
|
+
if (!args.sys_id)
|
|
469
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
470
|
+
const result = await client.updateRecord('sys_update_set', args.sys_id, { state: 'complete' });
|
|
471
|
+
return { ...result, summary: `Published changeset ${args.sys_id}` };
|
|
472
|
+
}
|
|
473
|
+
// ── Client Script CRUD ───────────────────────────────────────────────────
|
|
474
|
+
case 'create_client_script': {
|
|
475
|
+
if (!args.name || !args.table || !args.type || !args.script)
|
|
476
|
+
throw new ServiceNowError('name, table, type, and script are required', 'INVALID_REQUEST');
|
|
477
|
+
const data = {
|
|
478
|
+
name: args.name,
|
|
479
|
+
table: args.table,
|
|
480
|
+
type: args.type,
|
|
481
|
+
script: args.script,
|
|
482
|
+
active: args.active !== false,
|
|
483
|
+
global: args.global ?? false,
|
|
484
|
+
};
|
|
485
|
+
if (args.field_name)
|
|
486
|
+
data.field_name = args.field_name;
|
|
487
|
+
const result = await client.createRecord('sys_script_client', data);
|
|
488
|
+
return { ...result, summary: `Created client script "${args.name}" (${args.type}) on table "${args.table}"` };
|
|
489
|
+
}
|
|
490
|
+
case 'update_client_script': {
|
|
491
|
+
if (!args.sys_id || !args.fields)
|
|
492
|
+
throw new ServiceNowError('sys_id and fields are required', 'INVALID_REQUEST');
|
|
493
|
+
const result = await client.updateRecord('sys_script_client', args.sys_id, args.fields);
|
|
494
|
+
return { ...result, summary: `Updated client script ${args.sys_id}` };
|
|
495
|
+
}
|
|
496
|
+
// ── UI Policies ──────────────────────────────────────────────────────────
|
|
497
|
+
case 'list_ui_policies': {
|
|
498
|
+
let query = '';
|
|
499
|
+
if (args.active !== undefined)
|
|
500
|
+
query = `active=${args.active}`;
|
|
501
|
+
if (args.table)
|
|
502
|
+
query = query ? `${query}^model_table=${args.table}` : `model_table=${args.table}`;
|
|
503
|
+
const resp = await client.queryRecords({
|
|
504
|
+
table: 'sys_ui_policy',
|
|
505
|
+
query: query || undefined,
|
|
506
|
+
limit: args.limit || 25,
|
|
507
|
+
fields: 'sys_id,short_description,model_table,active,conditions,sys_updated_on',
|
|
508
|
+
});
|
|
509
|
+
return { count: resp.count, ui_policies: resp.records };
|
|
510
|
+
}
|
|
511
|
+
case 'get_ui_policy': {
|
|
512
|
+
if (!args.sys_id)
|
|
513
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
514
|
+
return await client.getRecord('sys_ui_policy', args.sys_id);
|
|
515
|
+
}
|
|
516
|
+
case 'create_ui_policy': {
|
|
517
|
+
if (!args.short_description || !args.table)
|
|
518
|
+
throw new ServiceNowError('short_description and table are required', 'INVALID_REQUEST');
|
|
519
|
+
const data = {
|
|
520
|
+
short_description: args.short_description,
|
|
521
|
+
model_table: args.table,
|
|
522
|
+
active: args.active !== false,
|
|
523
|
+
run_scripts: args.run_scripts ?? false,
|
|
524
|
+
};
|
|
525
|
+
if (args.conditions)
|
|
526
|
+
data.conditions = args.conditions;
|
|
527
|
+
if (args.script)
|
|
528
|
+
data.script = args.script;
|
|
529
|
+
const result = await client.createRecord('sys_ui_policy', data);
|
|
530
|
+
return { ...result, summary: `Created UI policy "${args.short_description}" on table "${args.table}"` };
|
|
531
|
+
}
|
|
532
|
+
// ── UI Actions ───────────────────────────────────────────────────────────
|
|
533
|
+
case 'list_ui_actions': {
|
|
534
|
+
let query = '';
|
|
535
|
+
if (args.active !== undefined)
|
|
536
|
+
query = `active=${args.active}`;
|
|
537
|
+
if (args.table)
|
|
538
|
+
query = query ? `${query}^table=${args.table}` : `table=${args.table}`;
|
|
539
|
+
if (args.type)
|
|
540
|
+
query = query ? `${query}^action_type=${args.type}` : `action_type=${args.type}`;
|
|
541
|
+
const resp = await client.queryRecords({
|
|
542
|
+
table: 'sys_ui_action',
|
|
543
|
+
query: query || undefined,
|
|
544
|
+
limit: args.limit || 25,
|
|
545
|
+
fields: 'sys_id,name,table,action_type,active,form_button,list_button,sys_updated_on',
|
|
546
|
+
});
|
|
547
|
+
return { count: resp.count, ui_actions: resp.records };
|
|
548
|
+
}
|
|
549
|
+
case 'get_ui_action': {
|
|
550
|
+
if (!args.sys_id)
|
|
551
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
552
|
+
return await client.getRecord('sys_ui_action', args.sys_id);
|
|
553
|
+
}
|
|
554
|
+
case 'create_ui_action': {
|
|
555
|
+
if (!args.name || !args.table || !args.action_name)
|
|
556
|
+
throw new ServiceNowError('name, table, and action_name are required', 'INVALID_REQUEST');
|
|
557
|
+
const data = {
|
|
558
|
+
name: args.name,
|
|
559
|
+
table: args.table,
|
|
560
|
+
action_name: args.action_name,
|
|
561
|
+
active: args.active !== false,
|
|
562
|
+
form_button: args.form_button !== false,
|
|
563
|
+
list_button: args.list_button ?? false,
|
|
564
|
+
};
|
|
565
|
+
if (args.script)
|
|
566
|
+
data.script = args.script;
|
|
567
|
+
if (args.condition)
|
|
568
|
+
data.condition = args.condition;
|
|
569
|
+
if (args.type)
|
|
570
|
+
data.action_type = args.type;
|
|
571
|
+
const result = await client.createRecord('sys_ui_action', data);
|
|
572
|
+
return { ...result, summary: `Created UI action "${args.name}" on table "${args.table}"` };
|
|
573
|
+
}
|
|
574
|
+
case 'update_ui_action': {
|
|
575
|
+
if (!args.sys_id || !args.fields)
|
|
576
|
+
throw new ServiceNowError('sys_id and fields are required', 'INVALID_REQUEST');
|
|
577
|
+
const result = await client.updateRecord('sys_ui_action', args.sys_id, args.fields);
|
|
578
|
+
return { ...result, summary: `Updated UI action ${args.sys_id}` };
|
|
579
|
+
}
|
|
580
|
+
// ── ACL Management ───────────────────────────────────────────────────────
|
|
581
|
+
case 'list_acls': {
|
|
582
|
+
let query = '';
|
|
583
|
+
if (args.active !== undefined)
|
|
584
|
+
query = `active=${args.active}`;
|
|
585
|
+
if (args.table)
|
|
586
|
+
query = query ? `${query}^name=${args.table}.*^ORname=${args.table}` : `nameLIKE${args.table}`;
|
|
587
|
+
if (args.operation)
|
|
588
|
+
query = query ? `${query}^operation=${args.operation}` : `operation=${args.operation}`;
|
|
589
|
+
const resp = await client.queryRecords({
|
|
590
|
+
table: 'sys_security_acl',
|
|
591
|
+
query: query || undefined,
|
|
592
|
+
limit: args.limit || 25,
|
|
593
|
+
fields: 'sys_id,name,type,operation,active,admin_overrides,sys_updated_on',
|
|
594
|
+
});
|
|
595
|
+
return { count: resp.count, acls: resp.records };
|
|
596
|
+
}
|
|
597
|
+
case 'get_acl': {
|
|
598
|
+
if (!args.sys_id)
|
|
599
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
600
|
+
return await client.getRecord('sys_security_acl', args.sys_id);
|
|
601
|
+
}
|
|
602
|
+
case 'create_acl': {
|
|
603
|
+
if (!args.name || !args.operation)
|
|
604
|
+
throw new ServiceNowError('name and operation are required', 'INVALID_REQUEST');
|
|
605
|
+
const data = {
|
|
606
|
+
name: args.name,
|
|
607
|
+
operation: args.operation,
|
|
608
|
+
type: args.type || 'record',
|
|
609
|
+
active: args.active !== false,
|
|
610
|
+
admin_overrides: args.admin_overrides !== false,
|
|
611
|
+
};
|
|
612
|
+
if (args.script)
|
|
613
|
+
data.script = args.script;
|
|
614
|
+
if (args.description)
|
|
615
|
+
data.description = args.description;
|
|
616
|
+
const result = await client.createRecord('sys_security_acl', data);
|
|
617
|
+
return { ...result, summary: `Created ACL "${args.name}" for operation "${args.operation}"` };
|
|
618
|
+
}
|
|
619
|
+
case 'update_acl': {
|
|
620
|
+
if (!args.sys_id || !args.fields)
|
|
621
|
+
throw new ServiceNowError('sys_id and fields are required', 'INVALID_REQUEST');
|
|
622
|
+
const result = await client.updateRecord('sys_security_acl', args.sys_id, args.fields);
|
|
623
|
+
return { ...result, summary: `Updated ACL ${args.sys_id}` };
|
|
624
|
+
}
|
|
625
|
+
default:
|
|
626
|
+
return null;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
//# sourceMappingURL=script.js.map
|