@servicenow/sdk-build-plugins 4.6.0 → 4.7.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.
Files changed (286) hide show
  1. package/dist/acl-plugin.js +3 -4
  2. package/dist/acl-plugin.js.map +1 -1
  3. package/dist/applicability-plugin.js +0 -2
  4. package/dist/applicability-plugin.js.map +1 -1
  5. package/dist/application-menu-plugin.js +0 -2
  6. package/dist/application-menu-plugin.js.map +1 -1
  7. package/dist/arrow-function-plugin.js +0 -1
  8. package/dist/arrow-function-plugin.js.map +1 -1
  9. package/dist/atf/test-plugin.js +6 -10
  10. package/dist/atf/test-plugin.js.map +1 -1
  11. package/dist/basic-syntax-plugin.js +10 -4
  12. package/dist/basic-syntax-plugin.js.map +1 -1
  13. package/dist/business-rule-plugin.js +0 -1
  14. package/dist/business-rule-plugin.js.map +1 -1
  15. package/dist/call-expression-plugin.js +0 -1
  16. package/dist/call-expression-plugin.js.map +1 -1
  17. package/dist/claims-plugin.js +0 -1
  18. package/dist/claims-plugin.js.map +1 -1
  19. package/dist/client-script-plugin.js +0 -1
  20. package/dist/client-script-plugin.js.map +1 -1
  21. package/dist/column-plugin.js +120 -49
  22. package/dist/column-plugin.js.map +1 -1
  23. package/dist/cross-scope-privilege-plugin.js +0 -1
  24. package/dist/cross-scope-privilege-plugin.js.map +1 -1
  25. package/dist/dashboard/dashboard-plugin.js +0 -2
  26. package/dist/dashboard/dashboard-plugin.js.map +1 -1
  27. package/dist/data-plugin.js +0 -1
  28. package/dist/data-plugin.js.map +1 -1
  29. package/dist/data-policy-plugin.d.ts +2 -0
  30. package/dist/data-policy-plugin.js +276 -0
  31. package/dist/data-policy-plugin.js.map +1 -0
  32. package/dist/email-notification-plugin.js +2 -3
  33. package/dist/email-notification-plugin.js.map +1 -1
  34. package/dist/flow/flow-logic/flow-logic-constants.d.ts +2 -0
  35. package/dist/flow/flow-logic/flow-logic-constants.js +6 -1
  36. package/dist/flow/flow-logic/flow-logic-constants.js.map +1 -1
  37. package/dist/flow/flow-logic/flow-logic-diagnostics.js +192 -56
  38. package/dist/flow/flow-logic/flow-logic-diagnostics.js.map +1 -1
  39. package/dist/flow/flow-logic/flow-logic-plugin-helpers.d.ts +2 -1
  40. package/dist/flow/flow-logic/flow-logic-plugin-helpers.js +44 -5
  41. package/dist/flow/flow-logic/flow-logic-plugin-helpers.js.map +1 -1
  42. package/dist/flow/flow-logic/flow-logic-plugin.js +279 -29
  43. package/dist/flow/flow-logic/flow-logic-plugin.js.map +1 -1
  44. package/dist/flow/flow-logic/flow-logic-shapes.d.ts +15 -0
  45. package/dist/flow/flow-logic/flow-logic-shapes.js +25 -1
  46. package/dist/flow/flow-logic/flow-logic-shapes.js.map +1 -1
  47. package/dist/flow/plugins/approval-rules-plugin.js +0 -1
  48. package/dist/flow/plugins/approval-rules-plugin.js.map +1 -1
  49. package/dist/flow/plugins/flow-action-definition-plugin.js +804 -205
  50. package/dist/flow/plugins/flow-action-definition-plugin.js.map +1 -1
  51. package/dist/flow/plugins/flow-data-pill-plugin.js +3 -5
  52. package/dist/flow/plugins/flow-data-pill-plugin.js.map +1 -1
  53. package/dist/flow/plugins/flow-definition-plugin.js +84 -17
  54. package/dist/flow/plugins/flow-definition-plugin.js.map +1 -1
  55. package/dist/flow/plugins/flow-diagnostics-plugin.js +65 -3
  56. package/dist/flow/plugins/flow-diagnostics-plugin.js.map +1 -1
  57. package/dist/flow/plugins/flow-instance-plugin.js +13 -5
  58. package/dist/flow/plugins/flow-instance-plugin.js.map +1 -1
  59. package/dist/flow/plugins/flow-trigger-instance-plugin.js +0 -1
  60. package/dist/flow/plugins/flow-trigger-instance-plugin.js.map +1 -1
  61. package/dist/flow/plugins/inline-script-plugin.js +0 -1
  62. package/dist/flow/plugins/inline-script-plugin.js.map +1 -1
  63. package/dist/flow/plugins/step-definition-plugin.js +0 -2
  64. package/dist/flow/plugins/step-definition-plugin.js.map +1 -1
  65. package/dist/flow/plugins/step-instance-plugin.js +216 -77
  66. package/dist/flow/plugins/step-instance-plugin.js.map +1 -1
  67. package/dist/flow/plugins/trigger-plugin.js +0 -2
  68. package/dist/flow/plugins/trigger-plugin.js.map +1 -1
  69. package/dist/flow/plugins/wfa-datapill-plugin.js +0 -1
  70. package/dist/flow/plugins/wfa-datapill-plugin.js.map +1 -1
  71. package/dist/flow/utils/datapill-transformer.js +9 -5
  72. package/dist/flow/utils/datapill-transformer.js.map +1 -1
  73. package/dist/flow/utils/flow-constants.d.ts +12 -0
  74. package/dist/flow/utils/flow-constants.js +17 -3
  75. package/dist/flow/utils/flow-constants.js.map +1 -1
  76. package/dist/flow/utils/flow-io-to-record.d.ts +1 -1
  77. package/dist/flow/utils/flow-io-to-record.js +21 -13
  78. package/dist/flow/utils/flow-io-to-record.js.map +1 -1
  79. package/dist/flow/utils/flow-pill-utils.d.ts +26 -0
  80. package/dist/flow/utils/flow-pill-utils.js +50 -0
  81. package/dist/flow/utils/flow-pill-utils.js.map +1 -0
  82. package/dist/flow/utils/flow-stage-processor.d.ts +138 -0
  83. package/dist/flow/utils/flow-stage-processor.js +665 -0
  84. package/dist/flow/utils/flow-stage-processor.js.map +1 -0
  85. package/dist/flow/utils/pill-string-parser.js +28 -43
  86. package/dist/flow/utils/pill-string-parser.js.map +1 -1
  87. package/dist/flow/utils/utils.d.ts +11 -6
  88. package/dist/flow/utils/utils.js +37 -28
  89. package/dist/flow/utils/utils.js.map +1 -1
  90. package/dist/form-plugin.js +4 -14
  91. package/dist/form-plugin.js.map +1 -1
  92. package/dist/html-import-plugin.js +0 -1
  93. package/dist/html-import-plugin.js.map +1 -1
  94. package/dist/import-sets-plugin.js +0 -2
  95. package/dist/import-sets-plugin.js.map +1 -1
  96. package/dist/inbound-email-action-plugin.js +0 -1
  97. package/dist/inbound-email-action-plugin.js.map +1 -1
  98. package/dist/index.d.ts +2 -1
  99. package/dist/index.js +5 -1
  100. package/dist/index.js.map +1 -1
  101. package/dist/instance-scan-plugin.js +0 -7
  102. package/dist/instance-scan-plugin.js.map +1 -1
  103. package/dist/json-plugin.js +0 -1
  104. package/dist/json-plugin.js.map +1 -1
  105. package/dist/list-plugin.js +4 -1
  106. package/dist/list-plugin.js.map +1 -1
  107. package/dist/now-attach-plugin.js +0 -1
  108. package/dist/now-attach-plugin.js.map +1 -1
  109. package/dist/now-config-plugin.js +1 -1
  110. package/dist/now-config-plugin.js.map +1 -1
  111. package/dist/now-id-plugin.js +0 -1
  112. package/dist/now-id-plugin.js.map +1 -1
  113. package/dist/now-include-plugin.js +0 -1
  114. package/dist/now-include-plugin.js.map +1 -1
  115. package/dist/now-ref-plugin.js +0 -1
  116. package/dist/now-ref-plugin.js.map +1 -1
  117. package/dist/now-unresolved-plugin.js +0 -1
  118. package/dist/now-unresolved-plugin.js.map +1 -1
  119. package/dist/package-json-plugin.js +3 -2
  120. package/dist/package-json-plugin.js.map +1 -1
  121. package/dist/property-plugin.js +0 -2
  122. package/dist/property-plugin.js.map +1 -1
  123. package/dist/record-plugin.d.ts +2 -0
  124. package/dist/record-plugin.js +5 -4
  125. package/dist/record-plugin.js.map +1 -1
  126. package/dist/repack/lint/Rules.d.ts +1 -2
  127. package/dist/rest-api-plugin.js +6 -5
  128. package/dist/rest-api-plugin.js.map +1 -1
  129. package/dist/role-plugin.js +0 -1
  130. package/dist/role-plugin.js.map +1 -1
  131. package/dist/schedule-script/scheduled-script-plugin.js +5 -4
  132. package/dist/schedule-script/scheduled-script-plugin.js.map +1 -1
  133. package/dist/script-action-plugin.js +0 -2
  134. package/dist/script-action-plugin.js.map +1 -1
  135. package/dist/script-include-plugin.js +4 -4
  136. package/dist/script-include-plugin.js.map +1 -1
  137. package/dist/server-module-plugin/index.js +2 -3
  138. package/dist/server-module-plugin/index.js.map +1 -1
  139. package/dist/service-catalog/catalog-clientscript-plugin.js +2 -4
  140. package/dist/service-catalog/catalog-clientscript-plugin.js.map +1 -1
  141. package/dist/service-catalog/catalog-item-plugin.js +0 -2
  142. package/dist/service-catalog/catalog-item-plugin.js.map +1 -1
  143. package/dist/service-catalog/catalog-ui-policy-plugin.js +2 -4
  144. package/dist/service-catalog/catalog-ui-policy-plugin.js.map +1 -1
  145. package/dist/service-catalog/sc-record-producer-plugin.js +0 -2
  146. package/dist/service-catalog/sc-record-producer-plugin.js.map +1 -1
  147. package/dist/service-catalog/service-catalog-base.d.ts +2 -2
  148. package/dist/service-catalog/service-catalog-base.js +2 -2
  149. package/dist/service-catalog/service-catalog-base.js.map +1 -1
  150. package/dist/service-catalog/utils.js +1 -1
  151. package/dist/service-catalog/utils.js.map +1 -1
  152. package/dist/service-catalog/variable-set-plugin.js +0 -2
  153. package/dist/service-catalog/variable-set-plugin.js.map +1 -1
  154. package/dist/service-portal/angular-provider-plugin.js +0 -2
  155. package/dist/service-portal/angular-provider-plugin.js.map +1 -1
  156. package/dist/service-portal/dependency-plugin.js +3 -5
  157. package/dist/service-portal/dependency-plugin.js.map +1 -1
  158. package/dist/service-portal/header-footer-plugin.js +3 -5
  159. package/dist/service-portal/header-footer-plugin.js.map +1 -1
  160. package/dist/service-portal/menu-plugin.js +0 -1
  161. package/dist/service-portal/menu-plugin.js.map +1 -1
  162. package/dist/service-portal/page-plugin.js +0 -1
  163. package/dist/service-portal/page-plugin.js.map +1 -1
  164. package/dist/service-portal/page-route-map-plugin.js +0 -1
  165. package/dist/service-portal/page-route-map-plugin.js.map +1 -1
  166. package/dist/service-portal/portal-plugin.js +0 -2
  167. package/dist/service-portal/portal-plugin.js.map +1 -1
  168. package/dist/service-portal/theme-plugin.js +0 -2
  169. package/dist/service-portal/theme-plugin.js.map +1 -1
  170. package/dist/service-portal/widget-plugin.js +3 -5
  171. package/dist/service-portal/widget-plugin.js.map +1 -1
  172. package/dist/sla-plugin.js +0 -2
  173. package/dist/sla-plugin.js.map +1 -1
  174. package/dist/static-content-plugin.js +32 -3
  175. package/dist/static-content-plugin.js.map +1 -1
  176. package/dist/table-plugin.js +303 -66
  177. package/dist/table-plugin.js.map +1 -1
  178. package/dist/ui-action-plugin.js +26 -17
  179. package/dist/ui-action-plugin.js.map +1 -1
  180. package/dist/ui-page-plugin.js +159 -17
  181. package/dist/ui-page-plugin.js.map +1 -1
  182. package/dist/ui-policy-plugin.js +28 -97
  183. package/dist/ui-policy-plugin.js.map +1 -1
  184. package/dist/user-preference-plugin.js +0 -2
  185. package/dist/user-preference-plugin.js.map +1 -1
  186. package/dist/utils.d.ts +5 -9
  187. package/dist/utils.js +38 -11
  188. package/dist/utils.js.map +1 -1
  189. package/dist/ux-list-menu-config-plugin.js +0 -2
  190. package/dist/ux-list-menu-config-plugin.js.map +1 -1
  191. package/dist/view-plugin.js +0 -1
  192. package/dist/view-plugin.js.map +1 -1
  193. package/dist/workspace-plugin.js +0 -2
  194. package/dist/workspace-plugin.js.map +1 -1
  195. package/package.json +6 -6
  196. package/src/acl-plugin.ts +4 -5
  197. package/src/applicability-plugin.ts +0 -2
  198. package/src/application-menu-plugin.ts +0 -2
  199. package/src/arrow-function-plugin.ts +0 -1
  200. package/src/atf/test-plugin.ts +6 -11
  201. package/src/basic-syntax-plugin.ts +11 -4
  202. package/src/business-rule-plugin.ts +1 -2
  203. package/src/call-expression-plugin.ts +0 -1
  204. package/src/claims-plugin.ts +0 -1
  205. package/src/client-script-plugin.ts +1 -2
  206. package/src/column-plugin.ts +163 -76
  207. package/src/cross-scope-privilege-plugin.ts +1 -2
  208. package/src/dashboard/dashboard-plugin.ts +0 -2
  209. package/src/data-plugin.ts +0 -1
  210. package/src/data-policy-plugin.ts +333 -0
  211. package/src/email-notification-plugin.ts +8 -4
  212. package/src/flow/flow-logic/flow-logic-constants.ts +6 -0
  213. package/src/flow/flow-logic/flow-logic-diagnostics.ts +236 -58
  214. package/src/flow/flow-logic/flow-logic-plugin-helpers.ts +59 -6
  215. package/src/flow/flow-logic/flow-logic-plugin.ts +368 -38
  216. package/src/flow/flow-logic/flow-logic-shapes.ts +25 -0
  217. package/src/flow/plugins/approval-rules-plugin.ts +0 -1
  218. package/src/flow/plugins/flow-action-definition-plugin.ts +940 -208
  219. package/src/flow/plugins/flow-data-pill-plugin.ts +3 -5
  220. package/src/flow/plugins/flow-definition-plugin.ts +159 -26
  221. package/src/flow/plugins/flow-diagnostics-plugin.ts +89 -3
  222. package/src/flow/plugins/flow-instance-plugin.ts +26 -12
  223. package/src/flow/plugins/flow-trigger-instance-plugin.ts +0 -1
  224. package/src/flow/plugins/inline-script-plugin.ts +0 -1
  225. package/src/flow/plugins/step-definition-plugin.ts +0 -2
  226. package/src/flow/plugins/step-instance-plugin.ts +259 -65
  227. package/src/flow/plugins/trigger-plugin.ts +0 -2
  228. package/src/flow/plugins/wfa-datapill-plugin.ts +0 -1
  229. package/src/flow/utils/datapill-transformer.ts +13 -5
  230. package/src/flow/utils/flow-constants.ts +19 -1
  231. package/src/flow/utils/flow-io-to-record.ts +29 -19
  232. package/src/flow/utils/flow-pill-utils.ts +48 -0
  233. package/src/flow/utils/flow-stage-processor.ts +831 -0
  234. package/src/flow/utils/pill-string-parser.ts +29 -47
  235. package/src/flow/utils/utils.ts +39 -35
  236. package/src/form-plugin.ts +5 -15
  237. package/src/html-import-plugin.ts +0 -1
  238. package/src/import-sets-plugin.ts +0 -2
  239. package/src/inbound-email-action-plugin.ts +1 -2
  240. package/src/index.ts +7 -1
  241. package/src/instance-scan-plugin.ts +0 -7
  242. package/src/json-plugin.ts +0 -1
  243. package/src/list-plugin.ts +6 -2
  244. package/src/now-attach-plugin.ts +0 -1
  245. package/src/now-config-plugin.ts +1 -1
  246. package/src/now-id-plugin.ts +0 -1
  247. package/src/now-include-plugin.ts +0 -1
  248. package/src/now-ref-plugin.ts +0 -1
  249. package/src/now-unresolved-plugin.ts +0 -1
  250. package/src/package-json-plugin.ts +8 -3
  251. package/src/property-plugin.ts +0 -2
  252. package/src/record-plugin.ts +14 -6
  253. package/src/repack/lint/Rules.ts +1 -1
  254. package/src/rest-api-plugin.ts +7 -6
  255. package/src/role-plugin.ts +1 -2
  256. package/src/schedule-script/scheduled-script-plugin.ts +11 -5
  257. package/src/script-action-plugin.ts +0 -2
  258. package/src/script-include-plugin.ts +8 -4
  259. package/src/server-module-plugin/index.ts +2 -3
  260. package/src/service-catalog/catalog-clientscript-plugin.ts +2 -4
  261. package/src/service-catalog/catalog-item-plugin.ts +0 -2
  262. package/src/service-catalog/catalog-ui-policy-plugin.ts +2 -4
  263. package/src/service-catalog/sc-record-producer-plugin.ts +0 -2
  264. package/src/service-catalog/service-catalog-base.ts +2 -2
  265. package/src/service-catalog/utils.ts +1 -1
  266. package/src/service-catalog/variable-set-plugin.ts +0 -2
  267. package/src/service-portal/angular-provider-plugin.ts +0 -2
  268. package/src/service-portal/dependency-plugin.ts +0 -2
  269. package/src/service-portal/header-footer-plugin.ts +0 -2
  270. package/src/service-portal/menu-plugin.ts +1 -2
  271. package/src/service-portal/page-plugin.ts +1 -2
  272. package/src/service-portal/page-route-map-plugin.ts +1 -2
  273. package/src/service-portal/portal-plugin.ts +0 -2
  274. package/src/service-portal/theme-plugin.ts +0 -2
  275. package/src/service-portal/widget-plugin.ts +0 -2
  276. package/src/sla-plugin.ts +0 -2
  277. package/src/static-content-plugin.ts +37 -4
  278. package/src/table-plugin.ts +371 -92
  279. package/src/ui-action-plugin.ts +30 -17
  280. package/src/ui-page-plugin.ts +188 -20
  281. package/src/ui-policy-plugin.ts +33 -130
  282. package/src/user-preference-plugin.ts +0 -2
  283. package/src/utils.ts +48 -11
  284. package/src/ux-list-menu-config-plugin.ts +0 -2
  285. package/src/view-plugin.ts +0 -1
  286. package/src/workspace-plugin.ts +0 -2
@@ -159,7 +159,6 @@ function getForEachParameterName(identifierShape: IdentifierShape): string | nul
159
159
 
160
160
  export const DataPillPlugin = Plugin.create({
161
161
  name: 'DataPillPlugin',
162
- docs: [],
163
162
  shapes: [
164
163
  {
165
164
  shape: PropertyAccessShape,
@@ -207,12 +206,11 @@ export const DataPillPlugin = Plugin.create({
207
206
  const expr = span.getExpression()
208
207
  const literalText = span.getLiteralText()
209
208
 
210
- const pillShapeResult = expr.is([PropertyAccessShape, IdentifierShape])
209
+ const pillShape = expr.is([PropertyAccessShape, IdentifierShape])
211
210
  ? await transform.toSubclass(expr, DataPillPlugin) // In case of PropertyAccessShape call the toSubclass() again, which calls above handler
212
- : { success: false, value: undefined }
211
+ : undefined
213
212
 
214
- if (pillShapeResult.success) {
215
- const pillShape = pillShapeResult.value
213
+ if (pillShape) {
216
214
  if (pillShape instanceof PillShape) {
217
215
  // do not call getValue() for trigger, as this will be handled in flow-instance-plugin
218
216
  if (pillShape.getRootIdentifier() === 'trigger') {
@@ -24,9 +24,34 @@ import { gzipSync } from 'node:zlib'
24
24
  import { ArrowFunctionShape } from '../../arrow-function-plugin'
25
25
  import { NowIdShape } from '../../now-id-plugin'
26
26
  import { buildVariableShapes, complexObjectMatchesIoRecord } from '../utils/flow-io-to-record'
27
- import { FLOW_API_NAME, slugifyString, SUBFLOW_API_NAME, TRIGGER_INSTANCE_API_NAME } from '../utils/flow-constants'
27
+ import {
28
+ FLOW_API_NAME,
29
+ STAGE_API_NAME,
30
+ slugifyString,
31
+ SUBFLOW_API_NAME,
32
+ SUBFLOW_INSTANCE_API_NAME,
33
+ TRIGGER_INSTANCE_API_NAME,
34
+ } from '../utils/flow-constants'
35
+ import {
36
+ buildStageInsertionMap,
37
+ buildStageShapes,
38
+ collectSubflowDefName,
39
+ createStageCallShape,
40
+ createSubflowStageRecords,
41
+ extractStageKey,
42
+ finalizeStageRecords,
43
+ insertNestedStageShapes,
44
+ processHeaderStages,
45
+ resolveNestedStagesInline,
46
+ resolveNestedStagesForTryCatch,
47
+ } from '../utils/flow-stage-processor'
28
48
  import { generateXML } from '../utils/flow-to-xml'
29
- import { DO_IN_PARALLEL_BLOCK_SYS_ID, FLOW_LOGIC, FlowLogicSysId } from '../flow-logic/flow-logic-constants'
49
+ import {
50
+ DO_IN_PARALLEL_BLOCK_SYS_ID,
51
+ FLOW_LOGIC,
52
+ FlowLogicSysId,
53
+ TRY_CATCH_CATCH_SYS_ID,
54
+ } from '../flow-logic/flow-logic-constants'
30
55
  import { TriggerInstancePlugin } from './flow-trigger-instance-plugin'
31
56
  import { FlowLogicPlugin } from '../flow-logic/flow-logic-plugin'
32
57
  import { FlowInstancePlugin } from './flow-instance-plugin'
@@ -37,7 +62,7 @@ import {
37
62
  uuidToSysId,
38
63
  validateFlowVariableCall,
39
64
  } from '../utils/utils'
40
- import { createSdkDocEntry, getCallExpressionName } from '../../utils'
65
+ import { getCallExpressionName } from '../../utils'
41
66
  import {
42
67
  extractLabelCache,
43
68
  createDefinitionMap,
@@ -1589,7 +1614,6 @@ function postProcessAssignSubflowOutputs(
1589
1614
 
1590
1615
  export const FlowDefinitionPlugin = Plugin.create({
1591
1616
  name: 'FlowDefinitionPlugin',
1592
- docs: [createSdkDocEntry('Flow', ['sys_hub_flow'])],
1593
1617
  records: {
1594
1618
  sys_hub_flow: {
1595
1619
  relationships: {
@@ -1681,6 +1705,11 @@ export const FlowDefinitionPlugin = Plugin.create({
1681
1705
 
1682
1706
  const flowVariables = buildVariableShapes(descendants.query('sys_hub_flow_variable'), descendants)
1683
1707
 
1708
+ // Build stage shapes from sys_hub_flow_stage records
1709
+ const stageRecords = descendants.query('sys_hub_flow_stage', { flow: record.getId().getValue() })
1710
+ const stages = buildStageShapes(stageRecords)
1711
+ const stageInsertionMap = buildStageInsertionMap(stageRecords)
1712
+
1684
1713
  //Check if flow has unsupported descendants are present
1685
1714
  if (checkForUnsupportedFlowDescendants(descendants, record, logger)) {
1686
1715
  return { success: false }
@@ -1742,37 +1771,64 @@ export const FlowDefinitionPlugin = Plugin.create({
1742
1771
  // Use recordToShapeMap to access ui_id from records (datapills reference ui_id, not $id)
1743
1772
  const uuidToIdentifierMap = buildUuidToIdentifierMap(recordToShapeMap)
1744
1773
 
1745
- // For the flow body, only use top-level instances (those without parent_ui_id)
1774
+ // For the flow body, only use top-level instances (those without parent_ui_id). Also exclude Catch
1775
+ // records — they are subsumed into their paired Try's `wfa.flowLogic.tryCatch(...)` shape via
1776
+ // `connected_to`, and emitting them separately would produce a duplicate top-level statement.
1746
1777
  const topLevelInstances = allInstances
1747
1778
  .filter(
1748
1779
  (instance) =>
1749
- !instance.get('parent_ui_id').isDefined() || instance.get('parent_ui_id').getValue() === ''
1780
+ (!instance.get('parent_ui_id').isDefined() ||
1781
+ instance.get('parent_ui_id').getValue() === '') &&
1782
+ !(
1783
+ instance.getTable() === 'sys_hub_flow_logic_instance_v2' &&
1784
+ instance.get('logic_definition').asString().getValue() === TRY_CATCH_CATCH_SYS_ID
1785
+ )
1750
1786
  )
1751
1787
  .sort((a, b) => order(a) - order(b))
1752
1788
 
1753
- const instanceShapes: Shape[] = []
1789
+ // Build instance shapes (without stages) first to resolve paramName
1790
+ const rawInstanceShapes: Array<{ shape: Shape; record: Record }> = []
1754
1791
  for (const instance of topLevelInstances) {
1755
1792
  const shape = recordToShapeMap.get(instance)
1756
1793
  if (!shape) {
1757
1794
  logger.error(`Failed to find shape for instance ${instance.getId().getValue()}`)
1758
1795
  return { success: false }
1759
1796
  }
1797
+ rawInstanceShapes.push({ shape, record: instance })
1798
+ }
1799
+
1800
+ // Extract parameter name from the topmost ArrowFunction
1801
+ // This allows us to use the actual parameter name instead of hardcoding "_params"
1802
+ let paramName = DEFAULT_PARAM_NAME // Default fallback
1803
+ const firstRealShape = rawInstanceShapes[0]?.shape
1804
+ if (firstRealShape) {
1805
+ paramName = getArrowFunctionParamName(firstRealShape) || DEFAULT_PARAM_NAME
1806
+ }
1807
+
1808
+ // Insert top-level wfa.stage() calls before matching instances
1809
+ const instanceShapes: Shape[] = []
1810
+ for (const { shape, record: inst } of rawInstanceShapes) {
1811
+ const instanceOrder = order(inst)
1812
+ const stageKeys = stageInsertionMap.get(instanceOrder)
1813
+ if (stageKeys && stageKeys.length > 0) {
1814
+ for (const key of stageKeys) {
1815
+ instanceShapes.push(createStageCallShape(key, paramName, record))
1816
+ }
1817
+ stageInsertionMap.delete(instanceOrder)
1818
+ }
1760
1819
  instanceShapes.push(shape)
1761
1820
  }
1762
1821
 
1822
+ // Insert nested wfa.stage() calls inside flow logic bodies (if/elseIf/else)
1823
+ if (stageInsertionMap.size > 0) {
1824
+ insertNestedStageShapes(instanceShapes, stageInsertionMap, paramName, order)
1825
+ }
1826
+
1763
1827
  // Transform datapill expressions in instance props
1764
1828
  // This section handles TWO types of datapills:
1765
1829
  // 1. UUID-based pills: {{uuid.property}} → references to previous action/subflow instances (e.g., {{f56a03c1-18f6-4f7b-9c61-0d4ff472b334.name}} → actionInstance_1.name)
1766
1830
  // 2. Semantic pills: {{trigger.property}}, {{flow_variable.name}} → references to flow parameters (e.g., {{trigger.table_name}} → params.trigger.table_name)
1767
1831
 
1768
- // Extract parameter name from the topmost ArrowFunction
1769
- // This allows us to use the actual parameter name instead of hardcoding "params"
1770
- let paramName = DEFAULT_PARAM_NAME // Default fallback
1771
- const firstInstance = instanceShapes[0]
1772
- if (firstInstance) {
1773
- paramName = getArrowFunctionParamName(firstInstance) || DEFAULT_PARAM_NAME
1774
- }
1775
-
1776
1832
  // Process all instances (Action, Subflow, and Flow Logic) recursively
1777
1833
  // This handles datapill transformation for all instance types and their nested children
1778
1834
  instanceShapes.forEach((instanceShape: Shape, index) => {
@@ -1807,7 +1863,7 @@ export const FlowDefinitionPlugin = Plugin.create({
1807
1863
  $id: $.val(NowIdShape.from(record)),
1808
1864
  name: $,
1809
1865
  description: $.def(EMPTY_STRING),
1810
- protection: $.from('sys_policy').def(EMPTY_STRING),
1866
+ protectionPolicy: $.from('sys_policy').def(EMPTY_STRING),
1811
1867
  runAs: $.from('run_as').def(RUN_AS_DEFAULT),
1812
1868
  runWithRoles: $.from('run_with_roles')
1813
1869
  .map((r) => {
@@ -1831,6 +1887,7 @@ export const FlowDefinitionPlugin = Plugin.create({
1831
1887
  }
1832
1888
  : {}),
1833
1889
  flowVariables: $.val(flowVariables).def({}),
1890
+ ...(Object.keys(stages).length > 0 ? { stages: $.val(stages) } : {}),
1834
1891
  })),
1835
1892
  ...(isFlow ? [triggerShape, flowBody] : [flowBody]),
1836
1893
  ],
@@ -1924,12 +1981,11 @@ export const FlowDefinitionPlugin = Plugin.create({
1924
1981
  explicitId: flowConfiguration.get('$id'),
1925
1982
  properties: flowConfiguration.transform(({ $ }) => ({
1926
1983
  name: $,
1927
- internal_name: $.from('name').map((n) => slugifyString(n.getValue())),
1928
1984
  annotation: $.def(EMPTY_STRING),
1929
1985
  description: $.def(EMPTY_STRING),
1930
1986
  access: $.def(ACCESS_DEFAULT),
1931
1987
  category: $.def(EMPTY_STRING),
1932
- sys_policy: $.from('protection').def(EMPTY_STRING),
1988
+ sys_policy: $.from('protectionPolicy').def(EMPTY_STRING),
1933
1989
  run_as: $.from('runAs').def(RUN_AS_DEFAULT),
1934
1990
  generation_source: $.def(GENERATION_SOURCE),
1935
1991
  show_draft_actions: $.def(BOOLEAN_FALSE_STRING),
@@ -1955,6 +2011,10 @@ export const FlowDefinitionPlugin = Plugin.create({
1955
2011
  )
1956
2012
  }
1957
2013
 
2014
+ // Phase 1 — create sys_hub_flow_stage records for each declared stage.
2015
+ // component_indexes is not set here; computed after the body loop.
2016
+ const headerStageRecords = await processHeaderStages(flowConfiguration, flowDefinitionRecord, factory)
2017
+
1958
2018
  // ------------------------------------------------------------
1959
2019
  // Handle FlowVariables() argument (flow-level variables)
1960
2020
  // Each variable becomes a separate sys_hub_flow_variable record
@@ -2033,6 +2093,9 @@ export const FlowDefinitionPlugin = Plugin.create({
2033
2093
  let forEachMetadataMap = new Map<string, { stepNumber: number; tableName: string | null }>()
2034
2094
 
2035
2095
  let order = 1
2096
+ const pendingStages: Array<{ startActionIndex: number; key: string }> = []
2097
+ const subflowDefNames = new Map<string, string>()
2098
+
2036
2099
  for (const [, v] of (allInstances ?? []).entries()) {
2037
2100
  // Validate trigger placement: triggers must be the second argument to Flow(), not in the body
2038
2101
  const callExpr = v instanceof VariableStatementShape ? v.getInitializer() : v
@@ -2043,10 +2106,66 @@ export const FlowDefinitionPlugin = Plugin.create({
2043
2106
  )
2044
2107
  continue
2045
2108
  }
2109
+
2110
+ // Top-level wfa.stage() — record component_index and skip
2111
+ if (callExpr instanceof CallExpressionShape && callExpr.getCallee() === STAGE_API_NAME) {
2112
+ const stageKey = extractStageKey(callExpr)
2113
+ if (!stageKey) {
2114
+ diagnostics.error(
2115
+ callExpr,
2116
+ 'wfa.stage() argument must be a stage reference like params.stages.<key>.'
2117
+ )
2118
+ } else if (!headerStageRecords.has(stageKey)) {
2119
+ diagnostics.error(
2120
+ callExpr,
2121
+ `wfa.stage() references stage '${stageKey}' which is not declared in the stages config.`
2122
+ )
2123
+ } else {
2124
+ pendingStages.push({ startActionIndex: order - 1, key: stageKey })
2125
+ }
2126
+ continue
2127
+ }
2128
+
2046
2129
  const instanceRecord = await getRecordFromFlowInstaceShape(v, transform)
2047
2130
 
2048
2131
  if (instanceRecord) {
2049
- instanceRecord.flat().forEach((rec) => {
2132
+ const flatRecs = instanceRecord.flat()
2133
+
2134
+ // Resolve nested stages and collect subflow def names inline
2135
+ if (callExpr instanceof CallExpressionShape) {
2136
+ const callee = callExpr.getCallee()
2137
+ if (
2138
+ callee === FLOW_LOGIC.IF ||
2139
+ callee === FLOW_LOGIC.ELSEIF ||
2140
+ callee === FLOW_LOGIC.ELSE
2141
+ ) {
2142
+ resolveNestedStagesInline(
2143
+ callExpr,
2144
+ flatRecs,
2145
+ order,
2146
+ headerStageRecords,
2147
+ pendingStages,
2148
+ subflowDefNames,
2149
+ diagnostics
2150
+ )
2151
+ }
2152
+ if (callee === FLOW_LOGIC.TRY_CATCH) {
2153
+ resolveNestedStagesForTryCatch(
2154
+ callExpr,
2155
+ flatRecs,
2156
+ order,
2157
+ headerStageRecords,
2158
+ pendingStages,
2159
+ subflowDefNames,
2160
+ diagnostics
2161
+ )
2162
+ }
2163
+ if (callee === SUBFLOW_INSTANCE_API_NAME) {
2164
+ collectSubflowDefName(callExpr, subflowDefNames)
2165
+ }
2166
+ }
2167
+
2168
+ flatRecs.forEach((rec) => {
2050
2169
  // For subflow instances, values will be in subflow_inputs, for other instances (action/flow logic) it will be in values
2051
2170
  const inputsKey =
2052
2171
  rec.getTable() === 'sys_hub_sub_flow_instance_v2' ? 'subflow_inputs' : 'values'
@@ -2109,13 +2228,13 @@ export const FlowDefinitionPlugin = Plugin.create({
2109
2228
  forEachMetadataMap
2110
2229
  )
2111
2230
 
2112
- relatedRecords.push(
2113
- rec.merge({
2114
- flow: flowDefinitionRecord.getId().getValue(),
2115
- order: finalOrder,
2116
- [inputsKey]: gzipSync(JSON.stringify(valuesJSON)).toString('base64'),
2117
- })
2118
- )
2231
+ const mergedRec = rec.merge({
2232
+ flow: flowDefinitionRecord.getId().getValue(),
2233
+ order: finalOrder,
2234
+ [inputsKey]: gzipSync(JSON.stringify(valuesJSON)).toString('base64'),
2235
+ })
2236
+ relatedRecords.push(mergedRec)
2237
+
2119
2238
  order++
2120
2239
  })
2121
2240
  } else {
@@ -2126,6 +2245,20 @@ export const FlowDefinitionPlugin = Plugin.create({
2126
2245
  }
2127
2246
  }
2128
2247
 
2248
+ // Finalise all stage records
2249
+ const finalisedStages = finalizeStageRecords(pendingStages, headerStageRecords)
2250
+ relatedRecords.push(...finalisedStages)
2251
+
2252
+ relatedRecords.push(
2253
+ ...(await createSubflowStageRecords(
2254
+ relatedRecords,
2255
+ finalisedStages.length,
2256
+ flowDefinitionRecord,
2257
+ factory,
2258
+ subflowDefNames
2259
+ ))
2260
+ )
2261
+
2129
2262
  const labelCacheData = Array.from(labelCacheMap.values())
2130
2263
  const flowDefWithMetadata =
2131
2264
  labelCacheData.length > 0
@@ -16,6 +16,7 @@ import {
16
16
  TemplateExpressionShape,
17
17
  PropertyAccessShape,
18
18
  IdentifierShape,
19
+ DATA_HELPER_NAMES,
19
20
  type Shape,
20
21
  } from '@servicenow/sdk-build-core'
21
22
  import { isDataPillShape } from '../flow-logic/flow-logic-plugin-helpers'
@@ -45,13 +46,18 @@ import {
45
46
  TRIGGER_INSTANCE_API_NAME,
46
47
  ACTION_DEFINITION_API_NAME,
47
48
  TRIGGER_DEFINITION_API_NAME,
49
+ STAGE_API_NAME,
50
+ FLOW_STAGE_CALLEE,
48
51
  } from '../utils/flow-constants'
49
52
 
53
+ import { FLOW_LOGIC } from '../flow-logic/flow-logic-constants'
54
+ import { createFlowLogicInstanceShape } from '../flow-logic/flow-logic-shapes'
55
+
50
56
  // sendEmail action sys_id for validation
51
57
  const SEND_EMAIL_ACTION_SYS_ID = 'c1806bf4a70323008299b39f087901cb'
52
58
 
53
- import { FLOW_LOGIC } from '../flow-logic/flow-logic-constants'
54
- import { createFlowLogicInstanceShape } from '../flow-logic/flow-logic-shapes'
59
+ // Branching constructs where a trailing wfa.stage() is invalid
60
+ const BRANCHING_CONSTRUCTS: string[] = [FLOW_LOGIC.IF, FLOW_LOGIC.ELSEIF, FLOW_LOGIC.ELSE, FLOW_LOGIC.TRY_CATCH]
55
61
 
56
62
  /**
57
63
  * Helper function to check if a node is inside a Flow or Subflow body
@@ -95,7 +101,6 @@ function isInsideFlowContext(node: ts.Node): boolean {
95
101
  */
96
102
  export const FlowDiagnosticsPlugin = Plugin.create({
97
103
  name: 'FlowDiagnosticsPlugin',
98
- docs: [],
99
104
  shapes: [
100
105
  {
101
106
  shape: CallExpressionShape,
@@ -277,5 +282,86 @@ export const FlowDiagnosticsPlugin = Plugin.create({
277
282
  return { success: false }
278
283
  },
279
284
  },
285
+ {
286
+ shape: CallExpressionShape,
287
+ fileTypes: ['fluent'],
288
+ toSubclass(expr, { diagnostics }) {
289
+ if (expr.getCallee() !== STAGE_API_NAME) {
290
+ return { success: false }
291
+ }
292
+ const node = expr.getOriginalNode()
293
+
294
+ const parentForEach = findAncestorByCalleeName(node, FLOW_LOGIC.FOR_EACH)
295
+ if (parentForEach) {
296
+ diagnostics.error(
297
+ expr,
298
+ 'wfa.stage() cannot be used inside a forEach block. Move stage markers to the top level of the flow body.'
299
+ )
300
+ }
301
+ const parentDoInParallel = findAncestorByCalleeName(node, FLOW_LOGIC.DO_IN_PARALLEL)
302
+ if (parentDoInParallel) {
303
+ diagnostics.error(
304
+ expr,
305
+ 'wfa.stage() cannot be used inside a doInParallel block. Move stage markers to the top level of the flow body.'
306
+ )
307
+ }
308
+
309
+ // Stage must not be the last statement in a branching logic block or the flow body.
310
+ // A stage that trails with nothing after it has no effect.
311
+ if (!parentForEach && !parentDoInParallel) {
312
+ const stmtNode = node.getParent()
313
+ if (stmtNode) {
314
+ const isLastStatement = !stmtNode
315
+ .getNextSiblings()
316
+ .some((n: ts.Node) => !ts.Node.isCommentStatement(n))
317
+ if (isLastStatement) {
318
+ const containingArrowFn = stmtNode.getFirstAncestorByKind(ts.SyntaxKind.ArrowFunction)
319
+ if (containingArrowFn) {
320
+ const parentCallExpr = containingArrowFn.getFirstAncestorByKind(
321
+ ts.SyntaxKind.CallExpression
322
+ )
323
+ if (parentCallExpr) {
324
+ const callName = getCallExpressionName(parentCallExpr)
325
+ if (BRANCHING_CONSTRUCTS.includes(callName)) {
326
+ diagnostics.error(
327
+ expr,
328
+ 'wfa.stage() cannot be the last statement in a branching logic block (if/elseIf/else/tryCatch). A stage must be followed by at least one action or flow logic step.'
329
+ )
330
+ } else if (callName === FLOW_API_NAME || callName === SUBFLOW_API_NAME) {
331
+ diagnostics.error(
332
+ expr,
333
+ 'wfa.stage() cannot be the last statement in the flow body. A stage must be followed by at least one action or flow logic step.'
334
+ )
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+
342
+ return { success: false }
343
+ },
344
+ },
345
+ {
346
+ shape: CallExpressionShape,
347
+ fileTypes: ['fluent'],
348
+ toSubclass(expr, { diagnostics }) {
349
+ if (expr.getCallee() !== FLOW_STAGE_CALLEE) {
350
+ return { success: false }
351
+ }
352
+ const durationShape = expr.getArgument(0).asObject().get('duration', false)
353
+ const isDefined = !durationShape.if(UndefinedShape)
354
+ const isDurationCall =
355
+ durationShape.if(CallExpressionShape) &&
356
+ durationShape.as(CallExpressionShape).getCallee() === DATA_HELPER_NAMES.DURATION
357
+ if (isDefined && !isDurationCall) {
358
+ diagnostics.error(
359
+ durationShape,
360
+ "FlowStage 'duration' must use the Duration() helper, e.g. Duration({ hours: 4 }). Plain objects are not supported."
361
+ )
362
+ }
363
+ return { success: false }
364
+ },
365
+ },
280
366
  ],
281
367
  })
@@ -30,6 +30,7 @@ import {
30
30
  getDirectVariableIdentifier,
31
31
  getIdentifierFromRecord,
32
32
  getIdentifierFromShape,
33
+ getOrderSuffix,
33
34
  resolveDataPillShape,
34
35
  sysIdToUuid,
35
36
  } from '../utils/utils'
@@ -42,8 +43,8 @@ import {
42
43
  import { getAttributeValue, parseAttributesToObject } from '../utils/schema-to-flow-object'
43
44
  import {
44
45
  ActionSubflowInstanceShape,
45
- ApprovalRulesShape,
46
46
  ApprovalDueDateShape,
47
+ ApprovalRulesShape,
47
48
  InlineScriptShape,
48
49
  } from '../utils/flow-shapes'
49
50
  import { FDInlineScriptCallShape } from './inline-script-plugin'
@@ -51,21 +52,22 @@ import { FDInlineScriptCallShape } from './inline-script-plugin'
51
52
  import {
52
53
  ACTION_DEF_COLUMN_NAME,
53
54
  ACTION_INSTANCE_API_NAME,
54
- APPROVAL_RULES_DATA_TYPE_VALUE,
55
+ ACTION_TYPE_KEY_NAME,
55
56
  APPROVAL_DUE_DATE_DATA_TYPE_VALUE,
57
+ APPROVAL_DUE_DATE_INPUT_FIELD_ACTIONS,
58
+ APPROVAL_RULES_DATA_TYPE_VALUE,
59
+ CATALOG_VARIABLE_SET_TABLE,
60
+ CATALOG_VARIABLE_TABLE,
56
61
  CORE_ACTIONS_SYS_ID_NAME_MAP,
57
62
  DURATION_DATA_TYPE_VALUE,
63
+ INLINE_SCRIPT_UNSUPPORTED_FIELDS,
64
+ INLINE_SCRIPT_UNSUPPORTED_TYPES,
58
65
  SUBFLOW_INSTANCE_API_NAME,
59
66
  TEMPLATE_DATA_TYPE_VALUE,
60
67
  TIME_DATA_TYPE_VALUE,
61
68
  UNSUPPORTED_DATA_TYPES,
62
69
  UTC_TIMEZONE_VALUE,
63
- APPROVAL_DUE_DATE_INPUT_FIELD_ACTIONS,
64
- ACTION_TYPE_KEY_NAME,
65
- CATALOG_VARIABLE_TABLE,
66
- CATALOG_VARIABLE_SET_TABLE,
67
- INLINE_SCRIPT_UNSUPPORTED_TYPES,
68
- INLINE_SCRIPT_UNSUPPORTED_FIELDS,
70
+ ELEMENT_MAPPING_FIELD_ALIASES,
69
71
  } from '../utils/flow-constants'
70
72
 
71
73
  import type { ApprovalDueDateType, ApprovalRulesType } from '@servicenow/sdk-core/runtime/flow'
@@ -350,8 +352,11 @@ function buildInstanceToShape({
350
352
  args: [identifierShapeOrSysId, configArg, inputsShape],
351
353
  })
352
354
 
353
- // Generate variable name from existing source or fallback to callee + ID
354
- const order = record.get('order')?.getValue()
355
+ // Generate a variable name from an existing source or fallback to callee + ID.
356
+ // Actions inside a DoInParallel branch use composite orders like `2➛3`; strip the separator so the identifier
357
+ // stays valid JS.
358
+ const order = getOrderSuffix((record.get('order')?.getValue() as string | undefined) ?? '')
359
+
355
360
  let identifierPrefix = ''
356
361
  if (callee.toLowerCase() === ACTION_INSTANCE_API_NAME) {
357
362
  identifierPrefix = 'action'
@@ -451,7 +456,6 @@ function validateCatalogVariableOutputReferences(
451
456
 
452
457
  export const FlowInstancePlugin = Plugin.create({
453
458
  name: 'FlowInstancePlugin',
454
- docs: [],
455
459
  records: {
456
460
  sys_hub_action_instance_v2: {
457
461
  toShape: buildInstanceToShape({
@@ -488,6 +492,9 @@ export const FlowInstancePlugin = Plugin.create({
488
492
  const instanceInputs = callExpression.getInstanceProps()
489
493
  const instanceAnnotation = callExpression.getAnnotation()?.getValue()
490
494
  const instanceUUID = callExpression.getInstanceUUID()?.getValue()
495
+ const instanceConfigObj = callExpression.getArgument(1).as(ObjectShape)
496
+ const instanceShowSubflowStage =
497
+ instanceConfigObj.get('showSubflowStage').ifBoolean()?.getValue() ?? false
491
498
 
492
499
  if (!instanceInputs || !instanceSysId || !instanceParentDef) {
493
500
  diagnostics.error(
@@ -528,6 +535,7 @@ export const FlowInstancePlugin = Plugin.create({
528
535
  sysId: instanceSysId,
529
536
  annotation: instanceAnnotation,
530
537
  uuid: instanceUUID,
538
+ showSubflowStage: instanceShowSubflowStage,
531
539
  factory,
532
540
  source: callExpression,
533
541
  transform,
@@ -628,7 +636,10 @@ function buildInputsShapeFromZipped({
628
636
  }
629
637
  }
630
638
 
631
- for (const { name, value, scriptActive, script, parameter } of values) {
639
+ for (const { name: rawName, value, scriptActive, script, parameter } of values) {
640
+ // Translate platform-internal field names (e.g. __snc_dont_fail_on_error)
641
+ // to their Fluent API names (e.g. dont_fail_flow_on_error)
642
+ const name = ELEMENT_MAPPING_FIELD_ALIASES[rawName] ?? rawName
632
643
  const attributes = definitionInputs
633
644
  ?.find((v) => v.get('element').asString()?.getValue() === name)
634
645
  ?.get('attributes')
@@ -765,6 +776,7 @@ async function buildSubflowInstance({
765
776
  annotation,
766
777
  factory,
767
778
  uuid,
779
+ showSubflowStage,
768
780
  source,
769
781
  transform,
770
782
  diagnostics,
@@ -775,6 +787,7 @@ async function buildSubflowInstance({
775
787
  annotation: string | undefined
776
788
  factory: Factory
777
789
  uuid: string | undefined
790
+ showSubflowStage: boolean
778
791
  source: Source
779
792
  transform: Transform
780
793
  diagnostics: Diagnostics
@@ -794,6 +807,7 @@ async function buildSubflowInstance({
794
807
  subflow: $.val(subflowDefRecord?.getId()?.getValue() || subflowDef?.getValue() || ''),
795
808
  subflow_inputs: $.val(values),
796
809
  wait_for_completion: $.from('waitForCompletion').def(true),
810
+ show_stages: $.val(showSubflowStage),
797
811
  sys_class_name: $.val('sys_hub_sub_flow_instance_v2'),
798
812
  parent_ui_id: $.def(''),
799
813
  }))
@@ -24,7 +24,6 @@ import { isArray } from 'lodash'
24
24
 
25
25
  export const TriggerInstancePlugin = Plugin.create({
26
26
  name: 'TriggerInstancePlugin',
27
- docs: [],
28
27
  records: {
29
28
  sys_hub_trigger_instance_v2: {
30
29
  toShape(record, { logger, database }) {
@@ -47,7 +47,6 @@ export class FDInlineScriptCallShape extends CallExpressionShape {
47
47
  */
48
48
  export const InlineScriptPlugin = Plugin.create({
49
49
  name: 'InlineScriptPlugin',
50
- docs: [],
51
50
  shapes: [
52
51
  {
53
52
  shape: CallExpressionShape,
@@ -2,13 +2,11 @@ import { CallExpressionShape, Plugin } from '@servicenow/sdk-build-core'
2
2
  import { buildVariableShapes } from '../utils/flow-io-to-record'
3
3
  import { NowIdShape } from '../../now-id-plugin'
4
4
  import { generateXML } from '../utils/flow-to-xml'
5
- import { createSdkDocEntry } from '../../utils'
6
5
  /**
7
6
  * Plugin for processing StepDefinition calls
8
7
  */
9
8
  export const StepDefinitionPlugin = Plugin.create({
10
9
  name: 'StepDefinitionPlugin',
11
- docs: [createSdkDocEntry('ActionStepDefinition', ['sys_flow_step_definition'])],
12
10
  records: {
13
11
  sys_flow_step_definition: {
14
12
  relationships: {