@lcap/nasl 3.7.3-beta.1 → 3.8.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/.mocharc.js +0 -1
  2. package/out/automate/engine/utils.js +6 -1
  3. package/out/automate/engine/utils.js.map +1 -1
  4. package/out/bak/translator.js +37 -0
  5. package/out/bak/translator.js.map +1 -1
  6. package/out/breakpoint/shared/utils.d.ts +1 -0
  7. package/out/breakpoint/shared/utils.js +1 -1
  8. package/out/breakpoint/shared/utils.js.map +1 -1
  9. package/out/common/BaseNode.d.ts +11 -0
  10. package/out/common/BaseNode.js +101 -5
  11. package/out/common/BaseNode.js.map +1 -1
  12. package/out/concepts/Annotatable__.d.ts +109 -0
  13. package/out/concepts/Annotatable__.js +161 -0
  14. package/out/concepts/Annotatable__.js.map +1 -0
  15. package/out/concepts/AnnotationProperty__.d.ts +48 -0
  16. package/out/concepts/AnnotationProperty__.js +74 -0
  17. package/out/concepts/AnnotationProperty__.js.map +1 -0
  18. package/out/concepts/Annotation__.d.ts +128 -0
  19. package/out/concepts/Annotation__.js +248 -0
  20. package/out/concepts/Annotation__.js.map +1 -0
  21. package/out/concepts/App__.d.ts +14 -26
  22. package/out/concepts/App__.js +50 -20
  23. package/out/concepts/App__.js.map +1 -1
  24. package/out/concepts/ApplyAnnotation__.d.ts +87 -0
  25. package/out/concepts/ApplyAnnotation__.js +140 -0
  26. package/out/concepts/ApplyAnnotation__.js.map +1 -0
  27. package/out/concepts/Argument__.d.ts +19 -0
  28. package/out/concepts/Argument__.js +126 -0
  29. package/out/concepts/Argument__.js.map +1 -1
  30. package/out/concepts/AssigneeV2__.d.ts +169 -0
  31. package/out/concepts/AssigneeV2__.js +176 -1
  32. package/out/concepts/AssigneeV2__.js.map +1 -1
  33. package/out/concepts/AuthLogicForCallInterface__.js +1 -1
  34. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  35. package/out/concepts/AuthLogic__.js +1 -1
  36. package/out/concepts/AuthLogic__.js.map +1 -1
  37. package/out/concepts/BooleanLiteral__.d.ts +1 -0
  38. package/out/concepts/BooleanLiteral__.js +9 -0
  39. package/out/concepts/BooleanLiteral__.js.map +1 -1
  40. package/out/concepts/BusinessLogic__.js +1 -1
  41. package/out/concepts/BusinessLogic__.js.map +1 -1
  42. package/out/concepts/CallFunction__.js +1 -1
  43. package/out/concepts/CallFunction__.js.map +1 -1
  44. package/out/concepts/CallLogic__.d.ts +15 -0
  45. package/out/concepts/CallLogic__.js +149 -17
  46. package/out/concepts/CallLogic__.js.map +1 -1
  47. package/out/concepts/ConnectorLogic__.js +1 -1
  48. package/out/concepts/ConnectorLogic__.js.map +1 -1
  49. package/out/concepts/DatabaseTypeAnnotation__.d.ts +0 -2
  50. package/out/concepts/DatabaseTypeAnnotation__.js +0 -20
  51. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  52. package/out/concepts/DepartmentManagerV2__.d.ts +29 -0
  53. package/out/concepts/DepartmentManagerV2__.js +56 -0
  54. package/out/concepts/DepartmentManagerV2__.js.map +1 -0
  55. package/out/concepts/DepartmentV2__.d.ts +33 -0
  56. package/out/concepts/DepartmentV2__.js +63 -0
  57. package/out/concepts/DepartmentV2__.js.map +1 -0
  58. package/out/concepts/DirectManagerV2__.d.ts +25 -0
  59. package/out/concepts/DirectManagerV2__.js +53 -0
  60. package/out/concepts/DirectManagerV2__.js.map +1 -0
  61. package/out/concepts/End__.js +9 -1
  62. package/out/concepts/End__.js.map +1 -1
  63. package/out/concepts/EntityProperty__.js +0 -2
  64. package/out/concepts/EntityProperty__.js.map +1 -1
  65. package/out/concepts/Entity__.d.ts +2 -2
  66. package/out/concepts/Entity__.js +4 -7
  67. package/out/concepts/Entity__.js.map +1 -1
  68. package/out/concepts/EnumItem__.d.ts +1 -12
  69. package/out/concepts/EnumItem__.js +17 -49
  70. package/out/concepts/EnumItem__.js.map +1 -1
  71. package/out/concepts/EnumSelectSetter__.d.ts +4 -0
  72. package/out/concepts/EnumSelectSetter__.js +7 -0
  73. package/out/concepts/EnumSelectSetter__.js.map +1 -1
  74. package/out/concepts/Enum__.js +1 -4
  75. package/out/concepts/Enum__.js.map +1 -1
  76. package/out/concepts/ForEachStatement__.js +1 -1
  77. package/out/concepts/ForEachStatement__.js.map +1 -1
  78. package/out/concepts/FrontendLibrary__.d.ts +52 -48
  79. package/out/concepts/FrontendLibrary__.js +45 -36
  80. package/out/concepts/FrontendLibrary__.js.map +1 -1
  81. package/out/concepts/FrontendType__.d.ts +4 -0
  82. package/out/concepts/FrontendType__.js +7 -0
  83. package/out/concepts/FrontendType__.js.map +1 -1
  84. package/out/concepts/Frontend__.d.ts +2 -0
  85. package/out/concepts/Frontend__.js +21 -2
  86. package/out/concepts/Frontend__.js.map +1 -1
  87. package/out/concepts/HistoryProcessV2__.js +4 -1
  88. package/out/concepts/HistoryProcessV2__.js.map +1 -1
  89. package/out/concepts/I18nInfo__.d.ts +0 -1
  90. package/out/concepts/I18nInfo__.js +0 -7
  91. package/out/concepts/I18nInfo__.js.map +1 -1
  92. package/out/concepts/Identifier__.d.ts +2 -0
  93. package/out/concepts/Identifier__.js +31 -0
  94. package/out/concepts/Identifier__.js.map +1 -1
  95. package/out/concepts/IfStatement__.js +2 -2
  96. package/out/concepts/IfStatement__.js.map +1 -1
  97. package/out/concepts/Interface__.js +1 -4
  98. package/out/concepts/Interface__.js.map +1 -1
  99. package/out/concepts/LogicItem__.d.ts +1 -1
  100. package/out/concepts/LogicItem__.js.map +1 -1
  101. package/out/concepts/Logic__.d.ts +16 -1
  102. package/out/concepts/Logic__.js +133 -15
  103. package/out/concepts/Logic__.js.map +1 -1
  104. package/out/concepts/ManagerV2__.d.ts +34 -0
  105. package/out/concepts/ManagerV2__.js +61 -0
  106. package/out/concepts/ManagerV2__.js.map +1 -0
  107. package/out/concepts/MatchCase__.d.ts +2 -2
  108. package/out/concepts/MatchCase__.js +7 -7
  109. package/out/concepts/MatchCase__.js.map +1 -1
  110. package/out/concepts/MemberExpression__.js +1 -0
  111. package/out/concepts/MemberExpression__.js.map +1 -1
  112. package/out/concepts/Module__.d.ts +88 -0
  113. package/out/concepts/Module__.js +85 -0
  114. package/out/concepts/Module__.js.map +1 -1
  115. package/out/concepts/OperatePermissionV2__.d.ts +1 -1
  116. package/out/concepts/OperatePermissionV2__.js.map +1 -1
  117. package/out/concepts/Param__.d.ts +4 -0
  118. package/out/concepts/Param__.js +13 -21
  119. package/out/concepts/Param__.js.map +1 -1
  120. package/out/concepts/ProcessElementV2__.d.ts +6 -1
  121. package/out/concepts/ProcessElementV2__.js +20 -0
  122. package/out/concepts/ProcessElementV2__.js.map +1 -1
  123. package/out/concepts/ProcessElement__.d.ts +7 -0
  124. package/out/concepts/ProcessElement__.js +47 -0
  125. package/out/concepts/ProcessElement__.js.map +1 -1
  126. package/out/concepts/ProcessV2__.d.ts +1 -34
  127. package/out/concepts/ProcessV2__.js +3 -70
  128. package/out/concepts/ProcessV2__.js.map +1 -1
  129. package/out/concepts/QueryFromExpression__.js +2 -2
  130. package/out/concepts/QueryFromExpression__.js.map +1 -1
  131. package/out/concepts/QueryJoinExpression__.js +2 -2
  132. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  133. package/out/concepts/StaticString__.d.ts +0 -4
  134. package/out/concepts/StaticString__.js +0 -11
  135. package/out/concepts/StaticString__.js.map +1 -1
  136. package/out/concepts/StructureProperty__.d.ts +1 -0
  137. package/out/concepts/StructureProperty__.js +14 -5
  138. package/out/concepts/StructureProperty__.js.map +1 -1
  139. package/out/concepts/Structure__.d.ts +4 -0
  140. package/out/concepts/Structure__.js +6 -9
  141. package/out/concepts/Structure__.js.map +1 -1
  142. package/out/concepts/SubLogic__.d.ts +418 -0
  143. package/out/concepts/SubLogic__.js +992 -0
  144. package/out/concepts/SubLogic__.js.map +1 -0
  145. package/out/concepts/Theme__.d.ts +9 -0
  146. package/out/concepts/Theme__.js +10 -0
  147. package/out/concepts/Theme__.js.map +1 -1
  148. package/out/concepts/Transactional__.d.ts +0 -1
  149. package/out/concepts/Transactional__.js +0 -7
  150. package/out/concepts/Transactional__.js.map +1 -1
  151. package/out/concepts/TypeAnnotation__.js +18 -0
  152. package/out/concepts/TypeAnnotation__.js.map +1 -1
  153. package/out/concepts/TypeParam__.d.ts +1 -0
  154. package/out/concepts/TypeParam__.js.map +1 -1
  155. package/out/concepts/ValidationRule__.d.ts +6 -1
  156. package/out/concepts/ValidationRule__.js +6 -1
  157. package/out/concepts/ValidationRule__.js.map +1 -1
  158. package/out/concepts/ViewElement__.d.ts +8 -2
  159. package/out/concepts/ViewElement__.js +213 -32
  160. package/out/concepts/ViewElement__.js.map +1 -1
  161. package/out/concepts/View__.d.ts +10 -2
  162. package/out/concepts/View__.js +129 -17
  163. package/out/concepts/View__.js.map +1 -1
  164. package/out/concepts/basics/stdlib/nasl.processV2.d.ts +2 -0
  165. package/out/concepts/basics/stdlib/nasl.processV2.js +50 -4
  166. package/out/concepts/basics/stdlib/nasl.processV2.js.map +1 -1
  167. package/out/concepts/basics/types/index.d.ts +1 -1
  168. package/out/concepts/basics/types/index.js +2 -1
  169. package/out/concepts/basics/types/index.js.map +1 -1
  170. package/out/concepts/index__.d.ts +9 -0
  171. package/out/concepts/index__.js +9 -0
  172. package/out/concepts/index__.js.map +1 -1
  173. package/out/concepts/utils/asserts.d.ts +409 -0
  174. package/out/concepts/utils/asserts.js +564 -14
  175. package/out/concepts/utils/asserts.js.map +1 -1
  176. package/out/concepts/utils/types.d.ts +33 -2
  177. package/out/generator/genBundleFiles.d.ts +13 -9
  178. package/out/generator/genBundleFiles.js +383 -63
  179. package/out/generator/genBundleFiles.js.map +1 -1
  180. package/out/generator/genMetaData.js +2 -0
  181. package/out/generator/genMetaData.js.map +1 -1
  182. package/out/generator/release-body/body.js +1 -0
  183. package/out/generator/release-body/body.js.map +1 -1
  184. package/out/generator/release-body/utils.d.ts +15 -7
  185. package/out/generator/release-body/utils.js +50 -7
  186. package/out/generator/release-body/utils.js.map +1 -1
  187. package/out/natural/genNaturalTS.js +2 -4
  188. package/out/natural/genNaturalTS.js.map +1 -1
  189. package/out/natural/getContext/index.js +0 -2
  190. package/out/natural/getContext/index.js.map +1 -1
  191. package/out/natural/transformTS2UI.js.map +1 -1
  192. package/out/natural/transformTSCode.d.ts +1 -1
  193. package/out/natural/transformTSCode.js.map +1 -1
  194. package/out/server/extendBaseNode.js +9 -0
  195. package/out/server/extendBaseNode.js.map +1 -1
  196. package/out/server/getLogics.js +10 -6
  197. package/out/server/getLogics.js.map +1 -1
  198. package/out/server/getMemberIdentifier.js +6 -0
  199. package/out/server/getMemberIdentifier.js.map +1 -1
  200. package/out/server/getProcessesV2.d.ts +3 -2
  201. package/out/server/getProcessesV2.js +15 -6
  202. package/out/server/getProcessesV2.js.map +1 -1
  203. package/out/server/naslServer.d.ts +5 -1
  204. package/out/server/naslServer.js +120 -30
  205. package/out/server/naslServer.js.map +1 -1
  206. package/out/server/translator.js +4 -0
  207. package/out/server/translator.js.map +1 -1
  208. package/out/service/storage/init.d.ts +2 -1
  209. package/out/service/storage/init.js +28 -71
  210. package/out/service/storage/init.js.map +1 -1
  211. package/out/templator/genCreateBlock.d.ts +6 -2
  212. package/out/templator/genCreateBlock.js +25 -8
  213. package/out/templator/genCreateBlock.js.map +1 -1
  214. package/out/templator/genCurdEditMultipleKeyBlock.d.ts +22 -0
  215. package/out/templator/genCurdEditMultipleKeyBlock.js +60 -1
  216. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  217. package/out/templator/genCurdMultipleKeyBlock.d.ts +13 -3
  218. package/out/templator/genCurdMultipleKeyBlock.js +29 -23
  219. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  220. package/out/templator/genGetBlock.d.ts +1 -1
  221. package/out/templator/genGetBlock.js +3 -2
  222. package/out/templator/genGetBlock.js.map +1 -1
  223. package/out/templator/genListViewBlock.d.ts +1 -1
  224. package/out/templator/genListViewBlock.js +3 -2
  225. package/out/templator/genListViewBlock.js.map +1 -1
  226. package/out/templator/genSelectBlock.d.ts +1 -1
  227. package/out/templator/genSelectBlock.js +3 -2
  228. package/out/templator/genSelectBlock.js.map +1 -1
  229. package/out/templator/genTableBlock.d.ts +9 -4
  230. package/out/templator/genTableBlock.js +31 -17
  231. package/out/templator/genTableBlock.js.map +1 -1
  232. package/out/templator/genUpdateBlock.d.ts +2 -2
  233. package/out/templator/genUpdateBlock.js +11 -11
  234. package/out/templator/genUpdateBlock.js.map +1 -1
  235. package/out/translator/types.d.ts +0 -4
  236. package/out/translator/utils.d.ts +0 -1
  237. package/out/translator/utils.js +1 -6
  238. package/out/translator/utils.js.map +1 -1
  239. package/out/utils/delay/index.d.ts +0 -0
  240. package/out/utils/delay/index.js +1 -0
  241. package/out/utils/delay/index.js.map +1 -0
  242. package/out/utils/env.d.ts +0 -4
  243. package/out/utils/env.js +3 -6
  244. package/out/utils/env.js.map +1 -1
  245. package/out/utils/index.d.ts +3 -2
  246. package/out/utils/index.js +18 -14
  247. package/out/utils/index.js.map +1 -1
  248. package/out/utils/time-slicing/controller.js.map +1 -1
  249. package/out/utils/types.d.ts +0 -17
  250. package/package.json +27 -20
  251. package/sandbox/stdlib/extension.component.ts +29 -0
  252. package/sandbox/stdlib/nasl.process.ts +17 -0
  253. package/sandbox/stdlib/nasl.processV2.ts +10 -5
  254. package/sandbox/stdlib/nasl.util.ts +3 -1
  255. package/src/automate/engine/utils.js +7 -2
  256. package/src/bak/translator.js +42 -1
  257. package/src/breakpoint/shared/utils.ts +2 -1
  258. package/src/common/BaseNode.ts +117 -5
  259. package/src/concepts/Annotatable__.ts +263 -0
  260. package/src/concepts/AnnotationProperty__.ts +102 -0
  261. package/src/concepts/Annotation__.ts +344 -0
  262. package/src/concepts/App__.ts +917 -26
  263. package/src/concepts/ApplyAnnotation__.ts +198 -0
  264. package/src/concepts/Argument__.ts +145 -1
  265. package/src/concepts/AssigneeV2__.ts +387 -1
  266. package/src/concepts/AuthLogicForCallInterface__.ts +1 -1
  267. package/src/concepts/AuthLogic__.ts +1 -1
  268. package/src/concepts/BooleanLiteral__.ts +9 -1
  269. package/src/concepts/BusinessLogic__.ts +1 -1
  270. package/src/concepts/CallFunction__.ts +1 -1
  271. package/src/concepts/CallLogic__.ts +153 -16
  272. package/src/concepts/ConnectorLogic__.ts +1 -1
  273. package/src/concepts/DatabaseTypeAnnotation__.ts +0 -11
  274. package/src/concepts/DepartmentManagerV2__.ts +70 -0
  275. package/src/concepts/DepartmentV2__.ts +75 -0
  276. package/src/concepts/DirectManagerV2__.ts +65 -0
  277. package/src/concepts/End__.ts +10 -1
  278. package/src/concepts/EntityProperty__.ts +0 -5
  279. package/src/concepts/Entity__.ts +5 -9
  280. package/src/concepts/EnumItem__.ts +16 -65
  281. package/src/concepts/EnumSelectSetter__.ts +6 -0
  282. package/src/concepts/Enum__.ts +1 -6
  283. package/src/concepts/ForEachStatement__.ts +1 -1
  284. package/src/concepts/FrontendLibrary__.ts +88 -80
  285. package/src/concepts/FrontendType__.ts +6 -0
  286. package/src/concepts/Frontend__.ts +26 -3
  287. package/src/concepts/HistoryProcessV2__.ts +5 -0
  288. package/src/concepts/I18nInfo__.ts +0 -5
  289. package/src/concepts/Identifier__.ts +32 -0
  290. package/src/concepts/IfStatement__.ts +2 -2
  291. package/src/concepts/Interface__.ts +1 -6
  292. package/src/concepts/LogicItem__.ts +1 -0
  293. package/src/concepts/Logic__.ts +140 -17
  294. package/src/concepts/ManagerV2__.ts +78 -0
  295. package/src/concepts/MatchCase__.ts +9 -8
  296. package/src/concepts/MemberExpression__.ts +1 -0
  297. package/src/concepts/Module__.ts +194 -0
  298. package/src/concepts/OperatePermissionV2__.ts +1 -1
  299. package/src/concepts/Param__.ts +17 -20
  300. package/src/concepts/ProcessElementV2__.ts +23 -0
  301. package/src/concepts/ProcessElement__.ts +18 -0
  302. package/src/concepts/ProcessV2__.ts +4 -70
  303. package/src/concepts/QueryFromExpression__.ts +2 -2
  304. package/src/concepts/QueryJoinExpression__.ts +2 -2
  305. package/src/concepts/StaticString__.ts +0 -13
  306. package/src/concepts/StructureProperty__.ts +16 -7
  307. package/src/concepts/Structure__.ts +10 -11
  308. package/src/concepts/SubLogic__.ts +1516 -0
  309. package/src/concepts/Theme__.ts +9 -0
  310. package/src/concepts/Transactional__.ts +0 -5
  311. package/src/concepts/TriggerLauncher__.ts +1 -1
  312. package/src/concepts/TypeAnnotation__.ts +17 -0
  313. package/src/concepts/TypeParam__.ts +3 -0
  314. package/src/concepts/ValidationRule__.ts +6 -1
  315. package/src/concepts/ViewElement__.ts +224 -34
  316. package/src/concepts/View__.ts +135 -22
  317. package/src/concepts/basics/stdlib/nasl.processV2.ts +56 -3
  318. package/src/concepts/basics/types/index.ts +1 -1
  319. package/src/concepts/index__.ts +9 -0
  320. package/src/concepts/utils/asserts.ts +595 -0
  321. package/src/concepts/utils/types.ts +53 -0
  322. package/src/generator/genBundleFiles.ts +408 -68
  323. package/src/generator/genMetaData.ts +3 -0
  324. package/src/generator/release-body/body.ts +1 -0
  325. package/src/generator/release-body/utils.ts +159 -55
  326. package/src/natural/genNaturalTS.ts +3 -5
  327. package/src/natural/getContext/index.ts +0 -2
  328. package/src/natural/transformTS2UI.ts +5 -2
  329. package/src/natural/transformTSCode.ts +2 -2
  330. package/src/server/extendBaseNode.ts +11 -2
  331. package/src/server/getLogics.ts +9 -7
  332. package/src/server/getMemberIdentifier.ts +7 -0
  333. package/src/server/getProcessesV2.ts +16 -6
  334. package/src/server/naslServer.ts +133 -30
  335. package/src/server/translator.ts +4 -0
  336. package/src/service/storage/init.ts +52 -97
  337. package/src/templator/genCreateBlock.ts +35 -14
  338. package/src/templator/genCurdEditMultipleKeyBlock.ts +65 -1
  339. package/src/templator/genCurdMultipleKeyBlock.ts +42 -23
  340. package/src/templator/genGetBlock.ts +4 -3
  341. package/src/templator/genListViewBlock.ts +3 -3
  342. package/src/templator/genSelectBlock.ts +4 -2
  343. package/src/templator/genTableBlock.ts +32 -17
  344. package/src/templator/genUpdateBlock.ts +21 -18
  345. package/src/translator/types.ts +0 -4
  346. package/src/translator/utils.ts +0 -6
  347. package/src/utils/delay/index.ts +0 -0
  348. package/src/utils/env.ts +4 -5
  349. package/src/utils/index.ts +16 -4
  350. package/src/utils/time-slicing/controller.ts +1 -0
  351. package/src/utils/types.ts +0 -20
  352. package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -1
  353. package/ts-worker/bundle.js +1 -1
  354. package/ts-worker/src/index.js +1 -0
  355. package/out/utils/language-cache/constant.d.ts +0 -18
  356. package/out/utils/language-cache/constant.js +0 -35
  357. package/out/utils/language-cache/constant.js.map +0 -1
  358. package/out/utils/language-cache/index.d.ts +0 -2
  359. package/out/utils/language-cache/index.js +0 -19
  360. package/out/utils/language-cache/index.js.map +0 -1
  361. package/out/utils/language-cache/nasl.d.ts +0 -10
  362. package/out/utils/language-cache/nasl.js +0 -98
  363. package/out/utils/language-cache/nasl.js.map +0 -1
  364. package/out/utils/language-cache/types.d.ts +0 -44
  365. package/out/utils/language-cache/types.js +0 -4
  366. package/out/utils/language-cache/types.js.map +0 -1
  367. package/src/utils/language-cache/constant.ts +0 -37
  368. package/src/utils/language-cache/index.ts +0 -2
  369. package/src/utils/language-cache/nasl.ts +0 -83
  370. package/src/utils/language-cache/types.ts +0 -48
@@ -1,3 +1,7 @@
1
+ import type { Annotation } from '../Annotation__';
2
+ import type { AnnotationProperty } from '../AnnotationProperty__';
3
+ import type { Annotatable } from '../Annotatable__';
4
+ import type { ApplyAnnotation } from '../ApplyAnnotation__';
1
5
  import type { App } from '../App__';
2
6
  import type { Module } from '../Module__';
3
7
  import type { Namespace } from '../Namespace__';
@@ -58,6 +62,7 @@ import type { BackendVariable } from '../BackendVariable__';
58
62
  import type { FrontendVariable } from '../FrontendVariable__';
59
63
  import type { Constant } from '../Constant__';
60
64
  import type { LogicItem } from '../LogicItem__';
65
+ import type { SubLogic } from '../SubLogic__';
61
66
  import type { Function } from '../Function__';
62
67
  import type { AnonymousFunction } from '../AnonymousFunction__';
63
68
  import type { ImportedInterface } from '../ImportedInterface__';
@@ -161,6 +166,10 @@ import type { FieldPermissionV2 } from '../FieldPermissionV2__';
161
166
  import type { ProcessElementV2 } from '../ProcessElementV2__';
162
167
  import type { OperatePermissionV2 } from '../OperatePermissionV2__';
163
168
  import type { AssigneeV2 } from '../AssigneeV2__';
169
+ import type { DepartmentV2 } from '../DepartmentV2__';
170
+ import type { ManagerV2 } from '../ManagerV2__';
171
+ import type { DirectManagerV2 } from '../DirectManagerV2__';
172
+ import type { DepartmentManagerV2 } from '../DepartmentManagerV2__';
164
173
  import type { FlowConditionV2 } from '../FlowConditionV2__';
165
174
  import type { ApprovalPolicyV2 } from '../ApprovalPolicyV2__';
166
175
  import type { SequentialPolicyV2 } from '../SequentialPolicyV2__';
@@ -204,6 +213,51 @@ export function assertFileNode<T extends BaseNode>(node: T): asserts node is T &
204
213
 
205
214
  //=========== 以下为严格类型判断 ===========
206
215
 
216
+ /**
217
+ * 严格判断输入为 Annotation 节点
218
+ *
219
+ * @description 仅判断节点本身,不包含继承类
220
+ * @example
221
+ * ```ts
222
+ * if (isStrictAnnotation(node)) {
223
+ * // 在这个花括号内,node 的类型为 Annotation
224
+ * }
225
+ * ```
226
+ */
227
+ export function isStrictAnnotation(node: unknown): node is Annotation {
228
+ return isBaseNode(node) && node.concept === 'Annotation';
229
+ }
230
+
231
+ /**
232
+ * 严格判断输入为 AnnotationProperty 节点
233
+ *
234
+ * @description 仅判断节点本身,不包含继承类
235
+ * @example
236
+ * ```ts
237
+ * if (isStrictAnnotationProperty(node)) {
238
+ * // 在这个花括号内,node 的类型为 AnnotationProperty
239
+ * }
240
+ * ```
241
+ */
242
+ export function isStrictAnnotationProperty(node: unknown): node is AnnotationProperty {
243
+ return isBaseNode(node) && node.concept === 'AnnotationProperty';
244
+ }
245
+
246
+ /**
247
+ * 严格判断输入为 ApplyAnnotation 节点
248
+ *
249
+ * @description 仅判断节点本身,不包含继承类
250
+ * @example
251
+ * ```ts
252
+ * if (isStrictApplyAnnotation(node)) {
253
+ * // 在这个花括号内,node 的类型为 ApplyAnnotation
254
+ * }
255
+ * ```
256
+ */
257
+ export function isStrictApplyAnnotation(node: unknown): node is ApplyAnnotation {
258
+ return isBaseNode(node) && node.concept === 'ApplyAnnotation';
259
+ }
260
+
207
261
  /**
208
262
  * 严格判断输入为 App 节点
209
263
  *
@@ -1059,6 +1113,21 @@ export function isStrictConstant(node: unknown): node is Constant {
1059
1113
  return isBaseNode(node) && node.concept === 'Constant';
1060
1114
  }
1061
1115
 
1116
+ /**
1117
+ * 严格判断输入为 SubLogic 节点
1118
+ *
1119
+ * @description 仅判断节点本身,不包含继承类
1120
+ * @example
1121
+ * ```ts
1122
+ * if (isStrictSubLogic(node)) {
1123
+ * // 在这个花括号内,node 的类型为 SubLogic
1124
+ * }
1125
+ * ```
1126
+ */
1127
+ export function isStrictSubLogic(node: unknown): node is SubLogic {
1128
+ return isBaseNode(node) && node.concept === 'SubLogic';
1129
+ }
1130
+
1062
1131
  /**
1063
1132
  * 严格判断输入为 Function 节点
1064
1133
  *
@@ -2559,6 +2628,51 @@ export function isStrictAssigneeV2(node: unknown): node is AssigneeV2 {
2559
2628
  return isBaseNode(node) && node.concept === 'AssigneeV2';
2560
2629
  }
2561
2630
 
2631
+ /**
2632
+ * 严格判断输入为 DepartmentV2 节点
2633
+ *
2634
+ * @description 仅判断节点本身,不包含继承类
2635
+ * @example
2636
+ * ```ts
2637
+ * if (isStrictDepartmentV2(node)) {
2638
+ * // 在这个花括号内,node 的类型为 DepartmentV2
2639
+ * }
2640
+ * ```
2641
+ */
2642
+ export function isStrictDepartmentV2(node: unknown): node is DepartmentV2 {
2643
+ return isBaseNode(node) && node.concept === 'DepartmentV2';
2644
+ }
2645
+
2646
+ /**
2647
+ * 严格判断输入为 DirectManagerV2 节点
2648
+ *
2649
+ * @description 仅判断节点本身,不包含继承类
2650
+ * @example
2651
+ * ```ts
2652
+ * if (isStrictDirectManagerV2(node)) {
2653
+ * // 在这个花括号内,node 的类型为 DirectManagerV2
2654
+ * }
2655
+ * ```
2656
+ */
2657
+ export function isStrictDirectManagerV2(node: unknown): node is DirectManagerV2 {
2658
+ return isBaseNode(node) && node.concept === 'DirectManagerV2';
2659
+ }
2660
+
2661
+ /**
2662
+ * 严格判断输入为 DepartmentManagerV2 节点
2663
+ *
2664
+ * @description 仅判断节点本身,不包含继承类
2665
+ * @example
2666
+ * ```ts
2667
+ * if (isStrictDepartmentManagerV2(node)) {
2668
+ * // 在这个花括号内,node 的类型为 DepartmentManagerV2
2669
+ * }
2670
+ * ```
2671
+ */
2672
+ export function isStrictDepartmentManagerV2(node: unknown): node is DepartmentManagerV2 {
2673
+ return isBaseNode(node) && node.concept === 'DepartmentManagerV2';
2674
+ }
2675
+
2562
2676
  /**
2563
2677
  * 严格判断输入为 FlowConditionV2 节点
2564
2678
  *
@@ -2623,6 +2737,98 @@ export function isStrictOrSignPolicyV2(node: unknown): node is OrSignPolicyV2 {
2623
2737
 
2624
2738
  //=========== 以下为继承类型判断 ===========
2625
2739
 
2740
+ /**
2741
+ * 判断输入为 Annotation 节点实例
2742
+ *
2743
+ * @description 包含节点类以及节点继承类的判断
2744
+ * @description 等价于`instanceof`运算,Annotation 节点没有继承类,此判断等价于`isStrictAnnotation`
2745
+ * @example
2746
+ * ```ts
2747
+ * if (isAnnotation(node)) {
2748
+ * // 在这个花括号内,node 的类型是 Annotation 或者 Annotation 继承类型
2749
+ * }
2750
+ * ```
2751
+ */
2752
+ export function isAnnotation(node: unknown): node is Annotation {
2753
+ return (
2754
+ isBaseNode(node) &&
2755
+ (
2756
+ node.concept === 'Annotation'
2757
+ )
2758
+ );
2759
+ }
2760
+
2761
+ /**
2762
+ * 判断输入为 AnnotationProperty 节点实例
2763
+ *
2764
+ * @description 包含节点类以及节点继承类的判断
2765
+ * @description 等价于`instanceof`运算,AnnotationProperty 节点没有继承类,此判断等价于`isStrictAnnotationProperty`
2766
+ * @example
2767
+ * ```ts
2768
+ * if (isAnnotationProperty(node)) {
2769
+ * // 在这个花括号内,node 的类型是 AnnotationProperty 或者 AnnotationProperty 继承类型
2770
+ * }
2771
+ * ```
2772
+ */
2773
+ export function isAnnotationProperty(node: unknown): node is AnnotationProperty {
2774
+ return (
2775
+ isBaseNode(node) &&
2776
+ (
2777
+ node.concept === 'AnnotationProperty'
2778
+ )
2779
+ );
2780
+ }
2781
+
2782
+ /**
2783
+ * 判断输入为 Annotatable 节点实例
2784
+ *
2785
+ * @description 包含节点类以及节点继承类的判断
2786
+ * @description 等价于`instanceof`运算
2787
+ * @example
2788
+ * ```ts
2789
+ * if (isAnnotatable(node)) {
2790
+ * // 在这个花括号内,node 的类型是 Annotatable 或者 Annotatable 继承类型
2791
+ * }
2792
+ * ```
2793
+ */
2794
+ export function isAnnotatable(node: unknown): node is types.AnnotatableNode {
2795
+ return (
2796
+ isBaseNode(node) &&
2797
+ (
2798
+ node.concept === 'Annotatable' ||
2799
+ node.concept === 'Entity' ||
2800
+ node.concept === 'View' ||
2801
+ node.concept === 'ViewElement' ||
2802
+ node.concept === 'Logic' ||
2803
+ node.concept === 'AuthLogic' ||
2804
+ node.concept === 'AuthLogicForCallInterface' ||
2805
+ node.concept === 'BusinessLogic' ||
2806
+ node.concept === 'ConnectorLogic'
2807
+ )
2808
+ );
2809
+ }
2810
+
2811
+ /**
2812
+ * 判断输入为 ApplyAnnotation 节点实例
2813
+ *
2814
+ * @description 包含节点类以及节点继承类的判断
2815
+ * @description 等价于`instanceof`运算,ApplyAnnotation 节点没有继承类,此判断等价于`isStrictApplyAnnotation`
2816
+ * @example
2817
+ * ```ts
2818
+ * if (isApplyAnnotation(node)) {
2819
+ * // 在这个花括号内,node 的类型是 ApplyAnnotation 或者 ApplyAnnotation 继承类型
2820
+ * }
2821
+ * ```
2822
+ */
2823
+ export function isApplyAnnotation(node: unknown): node is ApplyAnnotation {
2824
+ return (
2825
+ isBaseNode(node) &&
2826
+ (
2827
+ node.concept === 'ApplyAnnotation'
2828
+ )
2829
+ );
2830
+ }
2831
+
2626
2832
  /**
2627
2833
  * 判断输入为 App 节点实例
2628
2834
  *
@@ -3898,6 +4104,7 @@ export function isLogicItem(node: unknown): node is types.LogicItemNode {
3898
4104
  isBaseNode(node) &&
3899
4105
  (
3900
4106
  node.concept === 'LogicItem' ||
4107
+ node.concept === 'SubLogic' ||
3901
4108
  node.concept === 'AnonymousFunction' ||
3902
4109
  node.concept === 'Abort' ||
3903
4110
  node.concept === 'Start' ||
@@ -3959,6 +4166,27 @@ export function isLogicItem(node: unknown): node is types.LogicItemNode {
3959
4166
  );
3960
4167
  }
3961
4168
 
4169
+ /**
4170
+ * 判断输入为 SubLogic 节点实例
4171
+ *
4172
+ * @description 包含节点类以及节点继承类的判断
4173
+ * @description 等价于`instanceof`运算,SubLogic 节点没有继承类,此判断等价于`isStrictSubLogic`
4174
+ * @example
4175
+ * ```ts
4176
+ * if (isSubLogic(node)) {
4177
+ * // 在这个花括号内,node 的类型是 SubLogic 或者 SubLogic 继承类型
4178
+ * }
4179
+ * ```
4180
+ */
4181
+ export function isSubLogic(node: unknown): node is SubLogic {
4182
+ return (
4183
+ isBaseNode(node) &&
4184
+ (
4185
+ node.concept === 'SubLogic'
4186
+ )
4187
+ );
4188
+ }
4189
+
3962
4190
  /**
3963
4191
  * 判断输入为 Function 节点实例
3964
4192
  *
@@ -6135,6 +6363,92 @@ export function isAssigneeV2(node: unknown): node is AssigneeV2 {
6135
6363
  );
6136
6364
  }
6137
6365
 
6366
+ /**
6367
+ * 判断输入为 DepartmentV2 节点实例
6368
+ *
6369
+ * @description 包含节点类以及节点继承类的判断
6370
+ * @description 等价于`instanceof`运算,DepartmentV2 节点没有继承类,此判断等价于`isStrictDepartmentV2`
6371
+ * @example
6372
+ * ```ts
6373
+ * if (isDepartmentV2(node)) {
6374
+ * // 在这个花括号内,node 的类型是 DepartmentV2 或者 DepartmentV2 继承类型
6375
+ * }
6376
+ * ```
6377
+ */
6378
+ export function isDepartmentV2(node: unknown): node is DepartmentV2 {
6379
+ return (
6380
+ isBaseNode(node) &&
6381
+ (
6382
+ node.concept === 'DepartmentV2'
6383
+ )
6384
+ );
6385
+ }
6386
+
6387
+ /**
6388
+ * 判断输入为 ManagerV2 节点实例
6389
+ *
6390
+ * @description 包含节点类以及节点继承类的判断
6391
+ * @description 等价于`instanceof`运算
6392
+ * @example
6393
+ * ```ts
6394
+ * if (isManagerV2(node)) {
6395
+ * // 在这个花括号内,node 的类型是 ManagerV2 或者 ManagerV2 继承类型
6396
+ * }
6397
+ * ```
6398
+ */
6399
+ export function isManagerV2(node: unknown): node is types.ManagerV2Node {
6400
+ return (
6401
+ isBaseNode(node) &&
6402
+ (
6403
+ node.concept === 'ManagerV2' ||
6404
+ node.concept === 'DirectManagerV2' ||
6405
+ node.concept === 'DepartmentManagerV2'
6406
+ )
6407
+ );
6408
+ }
6409
+
6410
+ /**
6411
+ * 判断输入为 DirectManagerV2 节点实例
6412
+ *
6413
+ * @description 包含节点类以及节点继承类的判断
6414
+ * @description 等价于`instanceof`运算,DirectManagerV2 节点没有继承类,此判断等价于`isStrictDirectManagerV2`
6415
+ * @example
6416
+ * ```ts
6417
+ * if (isDirectManagerV2(node)) {
6418
+ * // 在这个花括号内,node 的类型是 DirectManagerV2 或者 DirectManagerV2 继承类型
6419
+ * }
6420
+ * ```
6421
+ */
6422
+ export function isDirectManagerV2(node: unknown): node is DirectManagerV2 {
6423
+ return (
6424
+ isBaseNode(node) &&
6425
+ (
6426
+ node.concept === 'DirectManagerV2'
6427
+ )
6428
+ );
6429
+ }
6430
+
6431
+ /**
6432
+ * 判断输入为 DepartmentManagerV2 节点实例
6433
+ *
6434
+ * @description 包含节点类以及节点继承类的判断
6435
+ * @description 等价于`instanceof`运算,DepartmentManagerV2 节点没有继承类,此判断等价于`isStrictDepartmentManagerV2`
6436
+ * @example
6437
+ * ```ts
6438
+ * if (isDepartmentManagerV2(node)) {
6439
+ * // 在这个花括号内,node 的类型是 DepartmentManagerV2 或者 DepartmentManagerV2 继承类型
6440
+ * }
6441
+ * ```
6442
+ */
6443
+ export function isDepartmentManagerV2(node: unknown): node is DepartmentManagerV2 {
6444
+ return (
6445
+ isBaseNode(node) &&
6446
+ (
6447
+ node.concept === 'DepartmentManagerV2'
6448
+ )
6449
+ );
6450
+ }
6451
+
6138
6452
  /**
6139
6453
  * 判断输入为 FlowConditionV2 节点实例
6140
6454
  *
@@ -6247,6 +6561,57 @@ export function isOrSignPolicyV2(node: unknown): node is OrSignPolicyV2 {
6247
6561
 
6248
6562
  //=========== 以下为严格类型断言 ===========
6249
6563
 
6564
+ /**
6565
+ * 严格断言为 Annotation 节点
6566
+ *
6567
+ * @description 仅断言节点本身,不包含继承类
6568
+ * @example
6569
+ * ```ts
6570
+ * assertStrictAnnotation(node);
6571
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 Annotation 类型
6572
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
6573
+ * ```
6574
+ */
6575
+ export function assertStrictAnnotation(node: unknown): asserts node is Annotation {
6576
+ if (!isStrictAnnotation(node)) {
6577
+ throw new Error(`Annotation 节点严格断言失败`);
6578
+ }
6579
+ }
6580
+
6581
+ /**
6582
+ * 严格断言为 AnnotationProperty 节点
6583
+ *
6584
+ * @description 仅断言节点本身,不包含继承类
6585
+ * @example
6586
+ * ```ts
6587
+ * assertStrictAnnotationProperty(node);
6588
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 AnnotationProperty 类型
6589
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
6590
+ * ```
6591
+ */
6592
+ export function assertStrictAnnotationProperty(node: unknown): asserts node is AnnotationProperty {
6593
+ if (!isStrictAnnotationProperty(node)) {
6594
+ throw new Error(`AnnotationProperty 节点严格断言失败`);
6595
+ }
6596
+ }
6597
+
6598
+ /**
6599
+ * 严格断言为 ApplyAnnotation 节点
6600
+ *
6601
+ * @description 仅断言节点本身,不包含继承类
6602
+ * @example
6603
+ * ```ts
6604
+ * assertStrictApplyAnnotation(node);
6605
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 ApplyAnnotation 类型
6606
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
6607
+ * ```
6608
+ */
6609
+ export function assertStrictApplyAnnotation(node: unknown): asserts node is ApplyAnnotation {
6610
+ if (!isStrictApplyAnnotation(node)) {
6611
+ throw new Error(`ApplyAnnotation 节点严格断言失败`);
6612
+ }
6613
+ }
6614
+
6250
6615
  /**
6251
6616
  * 严格断言为 App 节点
6252
6617
  *
@@ -7216,6 +7581,23 @@ export function assertStrictConstant(node: unknown): asserts node is Constant {
7216
7581
  }
7217
7582
  }
7218
7583
 
7584
+ /**
7585
+ * 严格断言为 SubLogic 节点
7586
+ *
7587
+ * @description 仅断言节点本身,不包含继承类
7588
+ * @example
7589
+ * ```ts
7590
+ * assertStrictSubLogic(node);
7591
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 SubLogic 类型
7592
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
7593
+ * ```
7594
+ */
7595
+ export function assertStrictSubLogic(node: unknown): asserts node is SubLogic {
7596
+ if (!isStrictSubLogic(node)) {
7597
+ throw new Error(`SubLogic 节点严格断言失败`);
7598
+ }
7599
+ }
7600
+
7219
7601
  /**
7220
7602
  * 严格断言为 Function 节点
7221
7603
  *
@@ -8916,6 +9298,57 @@ export function assertStrictAssigneeV2(node: unknown): asserts node is AssigneeV
8916
9298
  }
8917
9299
  }
8918
9300
 
9301
+ /**
9302
+ * 严格断言为 DepartmentV2 节点
9303
+ *
9304
+ * @description 仅断言节点本身,不包含继承类
9305
+ * @example
9306
+ * ```ts
9307
+ * assertStrictDepartmentV2(node);
9308
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DepartmentV2 类型
9309
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9310
+ * ```
9311
+ */
9312
+ export function assertStrictDepartmentV2(node: unknown): asserts node is DepartmentV2 {
9313
+ if (!isStrictDepartmentV2(node)) {
9314
+ throw new Error(`DepartmentV2 节点严格断言失败`);
9315
+ }
9316
+ }
9317
+
9318
+ /**
9319
+ * 严格断言为 DirectManagerV2 节点
9320
+ *
9321
+ * @description 仅断言节点本身,不包含继承类
9322
+ * @example
9323
+ * ```ts
9324
+ * assertStrictDirectManagerV2(node);
9325
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DirectManagerV2 类型
9326
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9327
+ * ```
9328
+ */
9329
+ export function assertStrictDirectManagerV2(node: unknown): asserts node is DirectManagerV2 {
9330
+ if (!isStrictDirectManagerV2(node)) {
9331
+ throw new Error(`DirectManagerV2 节点严格断言失败`);
9332
+ }
9333
+ }
9334
+
9335
+ /**
9336
+ * 严格断言为 DepartmentManagerV2 节点
9337
+ *
9338
+ * @description 仅断言节点本身,不包含继承类
9339
+ * @example
9340
+ * ```ts
9341
+ * assertStrictDepartmentManagerV2(node);
9342
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DepartmentManagerV2 类型
9343
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9344
+ * ```
9345
+ */
9346
+ export function assertStrictDepartmentManagerV2(node: unknown): asserts node is DepartmentManagerV2 {
9347
+ if (!isStrictDepartmentManagerV2(node)) {
9348
+ throw new Error(`DepartmentManagerV2 节点严格断言失败`);
9349
+ }
9350
+ }
9351
+
8919
9352
  /**
8920
9353
  * 严格断言为 FlowConditionV2 节点
8921
9354
  *
@@ -8988,6 +9421,78 @@ export function assertStrictOrSignPolicyV2(node: unknown): asserts node is OrSig
8988
9421
 
8989
9422
  //=========== 以下为继承类型断言 ===========
8990
9423
 
9424
+ /**
9425
+ * 断言为 Annotation 节点
9426
+ *
9427
+ * @description 包含节点类以及节点继承类的判断
9428
+ * @description 节点没有继承类时,等价于`assertStrictAnnotation`方法
9429
+ * @example
9430
+ * ```ts
9431
+ * assertAnnotation(node);
9432
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 Annotation 或者 Annotation 继承类型
9433
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9434
+ * ```
9435
+ */
9436
+ export function assertAnnotation(node: unknown): asserts node is Annotation {
9437
+ if (!isAnnotation(node)) {
9438
+ throw new Error(`Annotation 节点断言失败`);
9439
+ }
9440
+ }
9441
+
9442
+ /**
9443
+ * 断言为 AnnotationProperty 节点
9444
+ *
9445
+ * @description 包含节点类以及节点继承类的判断
9446
+ * @description 节点没有继承类时,等价于`assertStrictAnnotationProperty`方法
9447
+ * @example
9448
+ * ```ts
9449
+ * assertAnnotationProperty(node);
9450
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 AnnotationProperty 或者 AnnotationProperty 继承类型
9451
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9452
+ * ```
9453
+ */
9454
+ export function assertAnnotationProperty(node: unknown): asserts node is AnnotationProperty {
9455
+ if (!isAnnotationProperty(node)) {
9456
+ throw new Error(`AnnotationProperty 节点断言失败`);
9457
+ }
9458
+ }
9459
+
9460
+ /**
9461
+ * 断言为 Annotatable 节点
9462
+ *
9463
+ * @description 包含节点类以及节点继承类的判断
9464
+ * @description 节点没有继承类时,等价于`assertStrictAnnotatable`方法
9465
+ * @example
9466
+ * ```ts
9467
+ * assertAnnotatable(node);
9468
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 Annotatable 或者 Annotatable 继承类型
9469
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9470
+ * ```
9471
+ */
9472
+ export function assertAnnotatable(node: unknown): asserts node is types.AnnotatableNode {
9473
+ if (!isAnnotatable(node)) {
9474
+ throw new Error(`Annotatable 节点断言失败`);
9475
+ }
9476
+ }
9477
+
9478
+ /**
9479
+ * 断言为 ApplyAnnotation 节点
9480
+ *
9481
+ * @description 包含节点类以及节点继承类的判断
9482
+ * @description 节点没有继承类时,等价于`assertStrictApplyAnnotation`方法
9483
+ * @example
9484
+ * ```ts
9485
+ * assertApplyAnnotation(node);
9486
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 ApplyAnnotation 或者 ApplyAnnotation 继承类型
9487
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
9488
+ * ```
9489
+ */
9490
+ export function assertApplyAnnotation(node: unknown): asserts node is ApplyAnnotation {
9491
+ if (!isApplyAnnotation(node)) {
9492
+ throw new Error(`ApplyAnnotation 节点断言失败`);
9493
+ }
9494
+ }
9495
+
8991
9496
  /**
8992
9497
  * 断言为 App 节点
8993
9498
  *
@@ -10068,6 +10573,24 @@ export function assertLogicItem(node: unknown): asserts node is types.LogicItemN
10068
10573
  }
10069
10574
  }
10070
10575
 
10576
+ /**
10577
+ * 断言为 SubLogic 节点
10578
+ *
10579
+ * @description 包含节点类以及节点继承类的判断
10580
+ * @description 节点没有继承类时,等价于`assertStrictSubLogic`方法
10581
+ * @example
10582
+ * ```ts
10583
+ * assertSubLogic(node);
10584
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 SubLogic 或者 SubLogic 继承类型
10585
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
10586
+ * ```
10587
+ */
10588
+ export function assertSubLogic(node: unknown): asserts node is SubLogic {
10589
+ if (!isSubLogic(node)) {
10590
+ throw new Error(`SubLogic 节点断言失败`);
10591
+ }
10592
+ }
10593
+
10071
10594
  /**
10072
10595
  * 断言为 Function 节点
10073
10596
  *
@@ -11922,6 +12445,78 @@ export function assertAssigneeV2(node: unknown): asserts node is AssigneeV2 {
11922
12445
  }
11923
12446
  }
11924
12447
 
12448
+ /**
12449
+ * 断言为 DepartmentV2 节点
12450
+ *
12451
+ * @description 包含节点类以及节点继承类的判断
12452
+ * @description 节点没有继承类时,等价于`assertStrictDepartmentV2`方法
12453
+ * @example
12454
+ * ```ts
12455
+ * assertDepartmentV2(node);
12456
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DepartmentV2 或者 DepartmentV2 继承类型
12457
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
12458
+ * ```
12459
+ */
12460
+ export function assertDepartmentV2(node: unknown): asserts node is DepartmentV2 {
12461
+ if (!isDepartmentV2(node)) {
12462
+ throw new Error(`DepartmentV2 节点断言失败`);
12463
+ }
12464
+ }
12465
+
12466
+ /**
12467
+ * 断言为 ManagerV2 节点
12468
+ *
12469
+ * @description 包含节点类以及节点继承类的判断
12470
+ * @description 节点没有继承类时,等价于`assertStrictManagerV2`方法
12471
+ * @example
12472
+ * ```ts
12473
+ * assertManagerV2(node);
12474
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 ManagerV2 或者 ManagerV2 继承类型
12475
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
12476
+ * ```
12477
+ */
12478
+ export function assertManagerV2(node: unknown): asserts node is types.ManagerV2Node {
12479
+ if (!isManagerV2(node)) {
12480
+ throw new Error(`ManagerV2 节点断言失败`);
12481
+ }
12482
+ }
12483
+
12484
+ /**
12485
+ * 断言为 DirectManagerV2 节点
12486
+ *
12487
+ * @description 包含节点类以及节点继承类的判断
12488
+ * @description 节点没有继承类时,等价于`assertStrictDirectManagerV2`方法
12489
+ * @example
12490
+ * ```ts
12491
+ * assertDirectManagerV2(node);
12492
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DirectManagerV2 或者 DirectManagerV2 继承类型
12493
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
12494
+ * ```
12495
+ */
12496
+ export function assertDirectManagerV2(node: unknown): asserts node is DirectManagerV2 {
12497
+ if (!isDirectManagerV2(node)) {
12498
+ throw new Error(`DirectManagerV2 节点断言失败`);
12499
+ }
12500
+ }
12501
+
12502
+ /**
12503
+ * 断言为 DepartmentManagerV2 节点
12504
+ *
12505
+ * @description 包含节点类以及节点继承类的判断
12506
+ * @description 节点没有继承类时,等价于`assertStrictDepartmentManagerV2`方法
12507
+ * @example
12508
+ * ```ts
12509
+ * assertDepartmentManagerV2(node);
12510
+ * // 当前作用域内,断言语句之后,node 的类型都将会被断言为 DepartmentManagerV2 或者 DepartmentManagerV2 继承类型
12511
+ * // 断言失败会抛出错误,所以此函数是用在必须要严格限定节点类型的地方
12512
+ * ```
12513
+ */
12514
+ export function assertDepartmentManagerV2(node: unknown): asserts node is DepartmentManagerV2 {
12515
+ if (!isDepartmentManagerV2(node)) {
12516
+ throw new Error(`DepartmentManagerV2 节点断言失败`);
12517
+ }
12518
+ }
12519
+
11925
12520
  /**
11926
12521
  * 断言为 FlowConditionV2 节点
11927
12522
  *