@sonisoft/now-sdk-ext-core 2.2.1 → 2.5.1
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/dist/comm/http/RequestHandler.js +7 -11
- package/dist/comm/http/RequestHandler.js.map +1 -1
- package/dist/comm/http/TableAPIRequest.js +3 -10
- package/dist/comm/http/TableAPIRequest.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/sn/BackgroundScriptExecutor.d.ts +34 -0
- package/dist/sn/BackgroundScriptExecutor.js +96 -0
- package/dist/sn/BackgroundScriptExecutor.js.map +1 -1
- package/dist/sn/aggregate/AggregateModels.d.ts +89 -0
- package/dist/sn/aggregate/AggregateModels.js +5 -0
- package/dist/sn/aggregate/AggregateModels.js.map +1 -0
- package/dist/sn/aggregate/AggregateQuery.d.ts +50 -0
- package/dist/sn/aggregate/AggregateQuery.js +144 -0
- package/dist/sn/aggregate/AggregateQuery.js.map +1 -0
- package/dist/sn/application/ApplicationManager.d.ts +58 -1
- package/dist/sn/application/ApplicationManager.js +202 -11
- package/dist/sn/application/ApplicationManager.js.map +1 -1
- package/dist/sn/application/StoreApplicationModels.d.ts +99 -0
- package/dist/sn/application/StoreApplicationModels.js +2 -0
- package/dist/sn/application/StoreApplicationModels.js.map +1 -0
- package/dist/sn/attachment/AttachmentManager.d.ts +32 -0
- package/dist/sn/attachment/AttachmentManager.js +87 -0
- package/dist/sn/attachment/AttachmentManager.js.map +1 -0
- package/dist/sn/attachment/AttachmentModels.d.ts +28 -0
- package/dist/sn/attachment/AttachmentModels.js +2 -0
- package/dist/sn/attachment/AttachmentModels.js.map +1 -0
- package/dist/sn/batch/BatchModels.d.ts +90 -0
- package/dist/sn/batch/BatchModels.js +5 -0
- package/dist/sn/batch/BatchModels.js.map +1 -0
- package/dist/sn/batch/BatchOperations.d.ts +40 -0
- package/dist/sn/batch/BatchOperations.js +169 -0
- package/dist/sn/batch/BatchOperations.js.map +1 -0
- package/dist/sn/batch/QueryBatchModels.d.ts +93 -0
- package/dist/sn/batch/QueryBatchModels.js +5 -0
- package/dist/sn/batch/QueryBatchModels.js.map +1 -0
- package/dist/sn/batch/QueryBatchOperations.d.ts +41 -0
- package/dist/sn/batch/QueryBatchOperations.js +195 -0
- package/dist/sn/batch/QueryBatchOperations.js.map +1 -0
- package/dist/sn/cmdb/CMDBModels.d.ts +141 -0
- package/dist/sn/cmdb/CMDBModels.js +5 -0
- package/dist/sn/cmdb/CMDBModels.js.map +1 -0
- package/dist/sn/cmdb/CMDBRelationships.d.ts +60 -0
- package/dist/sn/cmdb/CMDBRelationships.js +286 -0
- package/dist/sn/cmdb/CMDBRelationships.js.map +1 -0
- package/dist/sn/discovery/DiscoveryModels.d.ts +160 -0
- package/dist/sn/discovery/DiscoveryModels.js +5 -0
- package/dist/sn/discovery/DiscoveryModels.js.map +1 -0
- package/dist/sn/discovery/InstanceDiscovery.d.ts +45 -0
- package/dist/sn/discovery/InstanceDiscovery.js +163 -0
- package/dist/sn/discovery/InstanceDiscovery.js.map +1 -0
- package/dist/sn/health/HealthModels.d.ts +124 -0
- package/dist/sn/health/HealthModels.js +5 -0
- package/dist/sn/health/HealthModels.js.map +1 -0
- package/dist/sn/health/InstanceHealth.d.ts +58 -0
- package/dist/sn/health/InstanceHealth.js +221 -0
- package/dist/sn/health/InstanceHealth.js.map +1 -0
- package/dist/sn/schema/SchemaDiscovery.d.ts +68 -0
- package/dist/sn/schema/SchemaDiscovery.js +346 -0
- package/dist/sn/schema/SchemaDiscovery.js.map +1 -0
- package/dist/sn/schema/SchemaModels.d.ts +277 -0
- package/dist/sn/schema/SchemaModels.js +5 -0
- package/dist/sn/schema/SchemaModels.js.map +1 -0
- package/dist/sn/scope/ScopeManager.d.ts +51 -0
- package/dist/sn/scope/ScopeManager.js +182 -0
- package/dist/sn/scope/ScopeManager.js.map +1 -0
- package/dist/sn/scope/ScopeModels.d.ts +72 -0
- package/dist/sn/scope/ScopeModels.js +5 -0
- package/dist/sn/scope/ScopeModels.js.map +1 -0
- package/dist/sn/scriptsync/ScriptSync.d.ts +38 -0
- package/dist/sn/scriptsync/ScriptSync.js +266 -0
- package/dist/sn/scriptsync/ScriptSync.js.map +1 -0
- package/dist/sn/scriptsync/ScriptSyncModels.d.ts +55 -0
- package/dist/sn/scriptsync/ScriptSyncModels.js +8 -0
- package/dist/sn/scriptsync/ScriptSyncModels.js.map +1 -0
- package/dist/sn/scriptsync/ScriptWatcher.d.ts +30 -0
- package/dist/sn/scriptsync/ScriptWatcher.js +74 -0
- package/dist/sn/scriptsync/ScriptWatcher.js.map +1 -0
- package/dist/sn/task/TaskModels.d.ts +85 -0
- package/dist/sn/task/TaskModels.js +5 -0
- package/dist/sn/task/TaskModels.js.map +1 -0
- package/dist/sn/task/TaskOperations.d.ts +63 -0
- package/dist/sn/task/TaskOperations.js +195 -0
- package/dist/sn/task/TaskOperations.js.map +1 -0
- package/dist/sn/updateset/UpdateSetManager.d.ts +78 -0
- package/dist/sn/updateset/UpdateSetManager.js +396 -0
- package/dist/sn/updateset/UpdateSetManager.js.map +1 -0
- package/dist/sn/updateset/UpdateSetModels.d.ts +188 -0
- package/dist/sn/updateset/UpdateSetModels.js +5 -0
- package/dist/sn/updateset/UpdateSetModels.js.map +1 -0
- package/dist/sn/workflow/WorkflowManager.d.ts +81 -0
- package/dist/sn/workflow/WorkflowManager.js +388 -0
- package/dist/sn/workflow/WorkflowManager.js.map +1 -0
- package/dist/sn/workflow/WorkflowModels.d.ts +242 -0
- package/dist/sn/workflow/WorkflowModels.js +5 -0
- package/dist/sn/workflow/WorkflowModels.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Models for workflow management operations in ServiceNow.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Options for creating a workflow record.
|
|
6
|
+
*/
|
|
7
|
+
export interface CreateWorkflowOptions {
|
|
8
|
+
/** Name of the workflow */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Description of the workflow */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Whether this is a template workflow */
|
|
13
|
+
template?: boolean;
|
|
14
|
+
/** Access level (e.g., "public", "package_private") */
|
|
15
|
+
access?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result of creating a workflow.
|
|
19
|
+
*/
|
|
20
|
+
export interface CreateWorkflowResult {
|
|
21
|
+
/** The sys_id of the created workflow */
|
|
22
|
+
workflowSysId: string;
|
|
23
|
+
/** The name of the created workflow */
|
|
24
|
+
name: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for creating a workflow version.
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateWorkflowVersionOptions {
|
|
30
|
+
/** Name of the workflow version */
|
|
31
|
+
name: string;
|
|
32
|
+
/** The sys_id of the parent workflow */
|
|
33
|
+
workflowSysId: string;
|
|
34
|
+
/** The table this workflow version applies to (e.g., "incident") */
|
|
35
|
+
table: string;
|
|
36
|
+
/** Description of the workflow version */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** Whether the version is active */
|
|
39
|
+
active?: boolean;
|
|
40
|
+
/** Whether the version is published */
|
|
41
|
+
published?: boolean;
|
|
42
|
+
/** Condition expression for triggering the workflow */
|
|
43
|
+
condition?: string;
|
|
44
|
+
/** Execution order */
|
|
45
|
+
order?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of creating a workflow version.
|
|
49
|
+
*/
|
|
50
|
+
export interface CreateWorkflowVersionResult {
|
|
51
|
+
/** The sys_id of the created workflow version */
|
|
52
|
+
versionSysId: string;
|
|
53
|
+
/** The name of the created workflow version */
|
|
54
|
+
name: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Options for creating a workflow activity.
|
|
58
|
+
*/
|
|
59
|
+
export interface CreateActivityOptions {
|
|
60
|
+
/** Name of the activity */
|
|
61
|
+
name: string;
|
|
62
|
+
/** The sys_id of the workflow version this activity belongs to */
|
|
63
|
+
workflowVersionSysId: string;
|
|
64
|
+
/** The sys_id of the activity definition (type of activity) */
|
|
65
|
+
activityDefinitionSysId?: string;
|
|
66
|
+
/** X position on the workflow canvas */
|
|
67
|
+
x?: number;
|
|
68
|
+
/** Y position on the workflow canvas */
|
|
69
|
+
y?: number;
|
|
70
|
+
/** Width on the workflow canvas */
|
|
71
|
+
width?: number;
|
|
72
|
+
/** Height on the workflow canvas */
|
|
73
|
+
height?: number;
|
|
74
|
+
/** Script content for the activity */
|
|
75
|
+
script?: string;
|
|
76
|
+
/** Activity variables (JSON string or comma-separated key=value pairs) */
|
|
77
|
+
vars?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Result of creating a workflow activity.
|
|
81
|
+
*/
|
|
82
|
+
export interface CreateActivityResult {
|
|
83
|
+
/** The sys_id of the created activity */
|
|
84
|
+
activitySysId: string;
|
|
85
|
+
/** The name of the created activity */
|
|
86
|
+
name: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Options for creating a workflow transition between activities.
|
|
90
|
+
*/
|
|
91
|
+
export interface CreateTransitionOptions {
|
|
92
|
+
/** The sys_id of the source activity */
|
|
93
|
+
fromActivitySysId: string;
|
|
94
|
+
/** The sys_id of the target activity */
|
|
95
|
+
toActivitySysId: string;
|
|
96
|
+
/** The sys_id of an optional condition record */
|
|
97
|
+
conditionSysId?: string;
|
|
98
|
+
/** Execution order of this transition */
|
|
99
|
+
order?: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Result of creating a workflow transition.
|
|
103
|
+
*/
|
|
104
|
+
export interface CreateTransitionResult {
|
|
105
|
+
/** The sys_id of the created transition */
|
|
106
|
+
transitionSysId: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Options for creating a workflow condition.
|
|
110
|
+
*/
|
|
111
|
+
export interface CreateConditionOptions {
|
|
112
|
+
/** The sys_id of the activity this condition belongs to */
|
|
113
|
+
activitySysId: string;
|
|
114
|
+
/** Name of the condition */
|
|
115
|
+
name: string;
|
|
116
|
+
/** Description of the condition */
|
|
117
|
+
description?: string;
|
|
118
|
+
/** Condition expression */
|
|
119
|
+
condition?: string;
|
|
120
|
+
/** Execution order */
|
|
121
|
+
order?: number;
|
|
122
|
+
/** Whether this is an else condition */
|
|
123
|
+
elseFlag?: boolean;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Result of creating a workflow condition.
|
|
127
|
+
*/
|
|
128
|
+
export interface CreateConditionResult {
|
|
129
|
+
/** The sys_id of the created condition */
|
|
130
|
+
conditionSysId: string;
|
|
131
|
+
/** The name of the created condition */
|
|
132
|
+
name: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Options for publishing a workflow version.
|
|
136
|
+
*/
|
|
137
|
+
export interface PublishWorkflowOptions {
|
|
138
|
+
/** The sys_id of the workflow version to publish */
|
|
139
|
+
versionSysId: string;
|
|
140
|
+
/** The sys_id of the start activity */
|
|
141
|
+
startActivitySysId: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Specification for a single activity in a complete workflow.
|
|
145
|
+
*/
|
|
146
|
+
export interface ActivitySpec {
|
|
147
|
+
/** Optional unique identifier used for referencing in transitions */
|
|
148
|
+
id?: string;
|
|
149
|
+
/** Name of the activity */
|
|
150
|
+
name: string;
|
|
151
|
+
/** Script content for the activity */
|
|
152
|
+
script?: string;
|
|
153
|
+
/** The activity type / definition sys_id */
|
|
154
|
+
activityType?: string;
|
|
155
|
+
/** X position on the workflow canvas */
|
|
156
|
+
x?: number;
|
|
157
|
+
/** Y position on the workflow canvas */
|
|
158
|
+
y?: number;
|
|
159
|
+
/** Width on the workflow canvas */
|
|
160
|
+
width?: number;
|
|
161
|
+
/** Height on the workflow canvas */
|
|
162
|
+
height?: number;
|
|
163
|
+
/** Activity variables */
|
|
164
|
+
vars?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Specification for a transition between activities in a complete workflow.
|
|
168
|
+
*/
|
|
169
|
+
export interface TransitionSpec {
|
|
170
|
+
/** The id or name of the source activity */
|
|
171
|
+
from: string;
|
|
172
|
+
/** The id or name of the target activity */
|
|
173
|
+
to: string;
|
|
174
|
+
/** Optional condition sys_id for this transition */
|
|
175
|
+
conditionSysId?: string;
|
|
176
|
+
/** Execution order */
|
|
177
|
+
order?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Complete specification for creating a workflow with all its components.
|
|
181
|
+
*/
|
|
182
|
+
export interface CompleteWorkflowSpec {
|
|
183
|
+
/** Name of the workflow */
|
|
184
|
+
name: string;
|
|
185
|
+
/** Description of the workflow */
|
|
186
|
+
description?: string;
|
|
187
|
+
/** The table this workflow applies to (e.g., "incident") */
|
|
188
|
+
table: string;
|
|
189
|
+
/** Whether this is a template workflow */
|
|
190
|
+
template?: boolean;
|
|
191
|
+
/** Access level */
|
|
192
|
+
access?: string;
|
|
193
|
+
/** Whether the workflow version is active */
|
|
194
|
+
active?: boolean;
|
|
195
|
+
/** Condition expression for triggering the workflow */
|
|
196
|
+
condition?: string;
|
|
197
|
+
/** The activities in this workflow */
|
|
198
|
+
activities: ActivitySpec[];
|
|
199
|
+
/** The transitions between activities */
|
|
200
|
+
transitions?: TransitionSpec[];
|
|
201
|
+
/** Whether to publish the workflow after creation */
|
|
202
|
+
publish?: boolean;
|
|
203
|
+
/** The id or name of the start activity (required if publish=true) */
|
|
204
|
+
startActivity?: string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Result of creating a complete workflow.
|
|
208
|
+
*/
|
|
209
|
+
export interface CompleteWorkflowResult {
|
|
210
|
+
/** The sys_id of the created workflow */
|
|
211
|
+
workflowSysId: string;
|
|
212
|
+
/** The sys_id of the created workflow version */
|
|
213
|
+
versionSysId: string;
|
|
214
|
+
/** Map of activity id/index keys to their created sys_ids */
|
|
215
|
+
activitySysIds: Record<string, string>;
|
|
216
|
+
/** Array of created transition sys_ids */
|
|
217
|
+
transitionSysIds: string[];
|
|
218
|
+
/** Whether the workflow was published */
|
|
219
|
+
published: boolean;
|
|
220
|
+
/** The start activity key, if published */
|
|
221
|
+
startActivity?: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* A generic ServiceNow record with sys_id and additional fields.
|
|
225
|
+
*/
|
|
226
|
+
export interface WorkflowRecord {
|
|
227
|
+
sys_id: string;
|
|
228
|
+
name?: string;
|
|
229
|
+
[key: string]: unknown;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Response containing a single workflow-related record.
|
|
233
|
+
*/
|
|
234
|
+
export interface WorkflowRecordResponse {
|
|
235
|
+
result: WorkflowRecord;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Response containing a list of workflow-related records.
|
|
239
|
+
*/
|
|
240
|
+
export interface WorkflowRecordListResponse {
|
|
241
|
+
result: WorkflowRecord[];
|
|
242
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowModels.js","sourceRoot":"","sources":["../../../src/sn/workflow/WorkflowModels.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonisoft/now-sdk-ext-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Comprehensive TypeScript library extending ServiceNow SDK with application management, ATF testing, real-time log monitoring, AMB event subscriptions, and automation tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"servicenow",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"types": "./dist/index.d.ts",
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@servicenow/glide": "^26.0.1",
|
|
60
|
-
"@servicenow/sdk": "
|
|
61
|
-
"@servicenow/sdk-build-core": "
|
|
62
|
-
"@servicenow/sdk-cli": "
|
|
60
|
+
"@servicenow/sdk": "4.2.0",
|
|
61
|
+
"@servicenow/sdk-build-core": "4.0.2",
|
|
62
|
+
"@servicenow/sdk-cli": "4.2.0",
|
|
63
63
|
"@servicenow/sdk-cli-core": "3.0.2",
|
|
64
|
-
"@servicenow/sdk-core": "
|
|
64
|
+
"@servicenow/sdk-core": "4.2.0",
|
|
65
65
|
"@ts-morph/common": "^0.24.0",
|
|
66
66
|
"@types/mock-fs": "^4.13.4",
|
|
67
67
|
"@types/node-gzip": "^1.1.3",
|