simplify3x-connect 0.0.0-stage → 0.28.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 (363) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -3
  3. package/dist/acText.d.ts +12 -0
  4. package/dist/acText.d.ts.map +1 -0
  5. package/dist/acText.js +44 -0
  6. package/dist/acText.js.map +1 -0
  7. package/dist/adapters/factory.d.ts +25 -0
  8. package/dist/adapters/factory.d.ts.map +1 -0
  9. package/dist/adapters/factory.js +55 -0
  10. package/dist/adapters/factory.js.map +1 -0
  11. package/dist/adapters/http.d.ts +62 -0
  12. package/dist/adapters/http.d.ts.map +1 -0
  13. package/dist/adapters/http.js +138 -0
  14. package/dist/adapters/http.js.map +1 -0
  15. package/dist/adapters/remoteMcp/adapter.d.ts +112 -0
  16. package/dist/adapters/remoteMcp/adapter.d.ts.map +1 -0
  17. package/dist/adapters/remoteMcp/adapter.js +259 -0
  18. package/dist/adapters/remoteMcp/adapter.js.map +1 -0
  19. package/dist/adapters/simplifyqa/adapter.d.ts +1390 -0
  20. package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -0
  21. package/dist/adapters/simplifyqa/adapter.js +9126 -0
  22. package/dist/adapters/simplifyqa/adapter.js.map +1 -0
  23. package/dist/adapters/simplifyqa/apiFailureReason.d.ts +11 -0
  24. package/dist/adapters/simplifyqa/apiFailureReason.d.ts.map +1 -0
  25. package/dist/adapters/simplifyqa/apiFailureReason.js +35 -0
  26. package/dist/adapters/simplifyqa/apiFailureReason.js.map +1 -0
  27. package/dist/adapters/simplifyqa/desktopConditions.d.ts +50 -0
  28. package/dist/adapters/simplifyqa/desktopConditions.d.ts.map +1 -0
  29. package/dist/adapters/simplifyqa/desktopConditions.js +95 -0
  30. package/dist/adapters/simplifyqa/desktopConditions.js.map +1 -0
  31. package/dist/adapters/simplifyqa/executionFailures.d.ts +59 -0
  32. package/dist/adapters/simplifyqa/executionFailures.d.ts.map +1 -0
  33. package/dist/adapters/simplifyqa/executionFailures.js +641 -0
  34. package/dist/adapters/simplifyqa/executionFailures.js.map +1 -0
  35. package/dist/adapters/simplifyqa/failureCategory.d.ts +26 -0
  36. package/dist/adapters/simplifyqa/failureCategory.d.ts.map +1 -0
  37. package/dist/adapters/simplifyqa/failureCategory.js +208 -0
  38. package/dist/adapters/simplifyqa/failureCategory.js.map +1 -0
  39. package/dist/adapters/simplifyqa/failureReport.d.ts +50 -0
  40. package/dist/adapters/simplifyqa/failureReport.d.ts.map +1 -0
  41. package/dist/adapters/simplifyqa/failureReport.js +383 -0
  42. package/dist/adapters/simplifyqa/failureReport.js.map +1 -0
  43. package/dist/adapters/simplifyqa/failureTypes.d.ts +193 -0
  44. package/dist/adapters/simplifyqa/failureTypes.d.ts.map +1 -0
  45. package/dist/adapters/simplifyqa/failureTypes.js +8 -0
  46. package/dist/adapters/simplifyqa/failureTypes.js.map +1 -0
  47. package/dist/adapters/simplifyqa/flow.d.ts +58 -0
  48. package/dist/adapters/simplifyqa/flow.d.ts.map +1 -0
  49. package/dist/adapters/simplifyqa/flow.js +335 -0
  50. package/dist/adapters/simplifyqa/flow.js.map +1 -0
  51. package/dist/adapters/simplifyqa/functionMatch.d.ts +53 -0
  52. package/dist/adapters/simplifyqa/functionMatch.d.ts.map +1 -0
  53. package/dist/adapters/simplifyqa/functionMatch.js +110 -0
  54. package/dist/adapters/simplifyqa/functionMatch.js.map +1 -0
  55. package/dist/adapters/simplifyqa/heal/apply.d.ts +59 -0
  56. package/dist/adapters/simplifyqa/heal/apply.d.ts.map +1 -0
  57. package/dist/adapters/simplifyqa/heal/apply.js +213 -0
  58. package/dist/adapters/simplifyqa/heal/apply.js.map +1 -0
  59. package/dist/adapters/simplifyqa/heal/diagnose.d.ts +24 -0
  60. package/dist/adapters/simplifyqa/heal/diagnose.d.ts.map +1 -0
  61. package/dist/adapters/simplifyqa/heal/diagnose.js +211 -0
  62. package/dist/adapters/simplifyqa/heal/diagnose.js.map +1 -0
  63. package/dist/adapters/simplifyqa/heal/index.d.ts +37 -0
  64. package/dist/adapters/simplifyqa/heal/index.d.ts.map +1 -0
  65. package/dist/adapters/simplifyqa/heal/index.js +83 -0
  66. package/dist/adapters/simplifyqa/heal/index.js.map +1 -0
  67. package/dist/adapters/simplifyqa/heal/plan.d.ts +67 -0
  68. package/dist/adapters/simplifyqa/heal/plan.d.ts.map +1 -0
  69. package/dist/adapters/simplifyqa/heal/plan.js +338 -0
  70. package/dist/adapters/simplifyqa/heal/plan.js.map +1 -0
  71. package/dist/adapters/simplifyqa/heal/store.d.ts +10 -0
  72. package/dist/adapters/simplifyqa/heal/store.d.ts.map +1 -0
  73. package/dist/adapters/simplifyqa/heal/store.js +40 -0
  74. package/dist/adapters/simplifyqa/heal/store.js.map +1 -0
  75. package/dist/adapters/simplifyqa/mapLimit.d.ts +3 -0
  76. package/dist/adapters/simplifyqa/mapLimit.d.ts.map +1 -0
  77. package/dist/adapters/simplifyqa/mapLimit.js +14 -0
  78. package/dist/adapters/simplifyqa/mapLimit.js.map +1 -0
  79. package/dist/adapters/simplifyqa/mapper.d.ts +159 -0
  80. package/dist/adapters/simplifyqa/mapper.d.ts.map +1 -0
  81. package/dist/adapters/simplifyqa/mapper.js +1767 -0
  82. package/dist/adapters/simplifyqa/mapper.js.map +1 -0
  83. package/dist/adapters/simplifyqa/planTree.d.ts +31 -0
  84. package/dist/adapters/simplifyqa/planTree.d.ts.map +1 -0
  85. package/dist/adapters/simplifyqa/planTree.js +110 -0
  86. package/dist/adapters/simplifyqa/planTree.js.map +1 -0
  87. package/dist/adapters/simplifyqa/searchEngine.d.ts +254 -0
  88. package/dist/adapters/simplifyqa/searchEngine.d.ts.map +1 -0
  89. package/dist/adapters/simplifyqa/searchEngine.js +1248 -0
  90. package/dist/adapters/simplifyqa/searchEngine.js.map +1 -0
  91. package/dist/adapters/simplifyqa/searchRegistry.d.ts +117 -0
  92. package/dist/adapters/simplifyqa/searchRegistry.d.ts.map +1 -0
  93. package/dist/adapters/simplifyqa/searchRegistry.js +1664 -0
  94. package/dist/adapters/simplifyqa/searchRegistry.js.map +1 -0
  95. package/dist/adapters/simplifyqa/searchResolve.d.ts +84 -0
  96. package/dist/adapters/simplifyqa/searchResolve.d.ts.map +1 -0
  97. package/dist/adapters/simplifyqa/searchResolve.js +319 -0
  98. package/dist/adapters/simplifyqa/searchResolve.js.map +1 -0
  99. package/dist/adapters/simplifyqa/stepDiagnostics.d.ts +25 -0
  100. package/dist/adapters/simplifyqa/stepDiagnostics.d.ts.map +1 -0
  101. package/dist/adapters/simplifyqa/stepDiagnostics.js +89 -0
  102. package/dist/adapters/simplifyqa/stepDiagnostics.js.map +1 -0
  103. package/dist/adapters/simplifyqa/stepRules.d.ts +91 -0
  104. package/dist/adapters/simplifyqa/stepRules.d.ts.map +1 -0
  105. package/dist/adapters/simplifyqa/stepRules.js +228 -0
  106. package/dist/adapters/simplifyqa/stepRules.js.map +1 -0
  107. package/dist/adapters/types.d.ts +514 -0
  108. package/dist/adapters/types.d.ts.map +1 -0
  109. package/dist/adapters/types.js +2 -0
  110. package/dist/adapters/types.js.map +1 -0
  111. package/dist/adapters/walnut/actionTypes.d.ts +16 -0
  112. package/dist/adapters/walnut/actionTypes.d.ts.map +1 -0
  113. package/dist/adapters/walnut/actionTypes.js +178 -0
  114. package/dist/adapters/walnut/actionTypes.js.map +1 -0
  115. package/dist/adapters/walnut/adapter.d.ts +235 -0
  116. package/dist/adapters/walnut/adapter.d.ts.map +1 -0
  117. package/dist/adapters/walnut/adapter.js +1120 -0
  118. package/dist/adapters/walnut/adapter.js.map +1 -0
  119. package/dist/adapters/walnut/mapper.d.ts +55 -0
  120. package/dist/adapters/walnut/mapper.d.ts.map +1 -0
  121. package/dist/adapters/walnut/mapper.js +364 -0
  122. package/dist/adapters/walnut/mapper.js.map +1 -0
  123. package/dist/cli.d.ts +3 -0
  124. package/dist/cli.d.ts.map +1 -0
  125. package/dist/cli.js +38 -0
  126. package/dist/cli.js.map +1 -0
  127. package/dist/config.d.ts +109 -0
  128. package/dist/config.d.ts.map +1 -0
  129. package/dist/config.js +272 -0
  130. package/dist/config.js.map +1 -0
  131. package/dist/connection.d.ts +105 -0
  132. package/dist/connection.d.ts.map +1 -0
  133. package/dist/connection.js +255 -0
  134. package/dist/connection.js.map +1 -0
  135. package/dist/domain/heal.d.ts +163 -0
  136. package/dist/domain/heal.d.ts.map +1 -0
  137. package/dist/domain/heal.js +55 -0
  138. package/dist/domain/heal.js.map +1 -0
  139. package/dist/domain/types.d.ts +1328 -0
  140. package/dist/domain/types.d.ts.map +1 -0
  141. package/dist/domain/types.js +8 -0
  142. package/dist/domain/types.js.map +1 -0
  143. package/dist/domain/validate.d.ts +3 -0
  144. package/dist/domain/validate.d.ts.map +1 -0
  145. package/dist/domain/validate.js +67 -0
  146. package/dist/domain/validate.js.map +1 -0
  147. package/dist/drafts/apiPatch.d.ts +9 -0
  148. package/dist/drafts/apiPatch.d.ts.map +1 -0
  149. package/dist/drafts/apiPatch.js +27 -0
  150. package/dist/drafts/apiPatch.js.map +1 -0
  151. package/dist/drafts/bulk.d.ts +24 -0
  152. package/dist/drafts/bulk.d.ts.map +1 -0
  153. package/dist/drafts/bulk.js +44 -0
  154. package/dist/drafts/bulk.js.map +1 -0
  155. package/dist/drafts/duplicate.d.ts +12 -0
  156. package/dist/drafts/duplicate.d.ts.map +1 -0
  157. package/dist/drafts/duplicate.js +59 -0
  158. package/dist/drafts/duplicate.js.map +1 -0
  159. package/dist/drafts/store.d.ts +91 -0
  160. package/dist/drafts/store.d.ts.map +1 -0
  161. package/dist/drafts/store.js +244 -0
  162. package/dist/drafts/store.js.map +1 -0
  163. package/dist/gateway.d.ts +37 -0
  164. package/dist/gateway.d.ts.map +1 -0
  165. package/dist/gateway.js +71 -0
  166. package/dist/gateway.js.map +1 -0
  167. package/dist/httpMain.d.ts +3 -0
  168. package/dist/httpMain.d.ts.map +1 -0
  169. package/dist/httpMain.js +20 -0
  170. package/dist/httpMain.js.map +1 -0
  171. package/dist/index.d.ts +3 -0
  172. package/dist/index.d.ts.map +1 -0
  173. package/dist/index.js +46 -0
  174. package/dist/index.js.map +1 -0
  175. package/dist/initAgents.d.ts +2 -0
  176. package/dist/initAgents.d.ts.map +1 -0
  177. package/dist/initAgents.js +508 -0
  178. package/dist/initAgents.js.map +1 -0
  179. package/dist/log.d.ts +17 -0
  180. package/dist/log.d.ts.map +1 -0
  181. package/dist/log.js +49 -0
  182. package/dist/log.js.map +1 -0
  183. package/dist/mcpResult.d.ts +39 -0
  184. package/dist/mcpResult.d.ts.map +1 -0
  185. package/dist/mcpResult.js +19 -0
  186. package/dist/mcpResult.js.map +1 -0
  187. package/dist/mount.d.ts +33 -0
  188. package/dist/mount.d.ts.map +1 -0
  189. package/dist/mount.js +213 -0
  190. package/dist/mount.js.map +1 -0
  191. package/dist/paramTokens.d.ts +18 -0
  192. package/dist/paramTokens.d.ts.map +1 -0
  193. package/dist/paramTokens.js +50 -0
  194. package/dist/paramTokens.js.map +1 -0
  195. package/dist/projectStore.d.ts +5 -0
  196. package/dist/projectStore.d.ts.map +1 -0
  197. package/dist/projectStore.js +60 -0
  198. package/dist/projectStore.js.map +1 -0
  199. package/dist/requestConnection.d.ts +22 -0
  200. package/dist/requestConnection.d.ts.map +1 -0
  201. package/dist/requestConnection.js +50 -0
  202. package/dist/requestConnection.js.map +1 -0
  203. package/dist/serve.d.ts +10 -0
  204. package/dist/serve.d.ts.map +1 -0
  205. package/dist/serve.js +37 -0
  206. package/dist/serve.js.map +1 -0
  207. package/dist/server.d.ts +41 -0
  208. package/dist/server.d.ts.map +1 -0
  209. package/dist/server.js +370 -0
  210. package/dist/server.js.map +1 -0
  211. package/dist/tools/actionCatalog.d.ts +24 -0
  212. package/dist/tools/actionCatalog.d.ts.map +1 -0
  213. package/dist/tools/actionCatalog.js +56 -0
  214. package/dist/tools/actionCatalog.js.map +1 -0
  215. package/dist/tools/attachment.tools.d.ts +15 -0
  216. package/dist/tools/attachment.tools.d.ts.map +1 -0
  217. package/dist/tools/attachment.tools.js +104 -0
  218. package/dist/tools/attachment.tools.js.map +1 -0
  219. package/dist/tools/backlog.tools.d.ts +13 -0
  220. package/dist/tools/backlog.tools.d.ts.map +1 -0
  221. package/dist/tools/backlog.tools.js +690 -0
  222. package/dist/tools/backlog.tools.js.map +1 -0
  223. package/dist/tools/connection.tools.d.ts +16 -0
  224. package/dist/tools/connection.tools.d.ts.map +1 -0
  225. package/dist/tools/connection.tools.js +120 -0
  226. package/dist/tools/connection.tools.js.map +1 -0
  227. package/dist/tools/defects.tools.d.ts +7 -0
  228. package/dist/tools/defects.tools.d.ts.map +1 -0
  229. package/dist/tools/defects.tools.js +108 -0
  230. package/dist/tools/defects.tools.js.map +1 -0
  231. package/dist/tools/discovery.tools.d.ts +23 -0
  232. package/dist/tools/discovery.tools.d.ts.map +1 -0
  233. package/dist/tools/discovery.tools.js +1746 -0
  234. package/dist/tools/discovery.tools.js.map +1 -0
  235. package/dist/tools/executionPlan.tools.d.ts +14 -0
  236. package/dist/tools/executionPlan.tools.d.ts.map +1 -0
  237. package/dist/tools/executionPlan.tools.js +184 -0
  238. package/dist/tools/executionPlan.tools.js.map +1 -0
  239. package/dist/tools/failure.tools.d.ts +14 -0
  240. package/dist/tools/failure.tools.d.ts.map +1 -0
  241. package/dist/tools/failure.tools.js +65 -0
  242. package/dist/tools/failure.tools.js.map +1 -0
  243. package/dist/tools/formulas.tools.d.ts +7 -0
  244. package/dist/tools/formulas.tools.d.ts.map +1 -0
  245. package/dist/tools/formulas.tools.js +84 -0
  246. package/dist/tools/formulas.tools.js.map +1 -0
  247. package/dist/tools/functionReuse.d.ts +77 -0
  248. package/dist/tools/functionReuse.d.ts.map +1 -0
  249. package/dist/tools/functionReuse.js +384 -0
  250. package/dist/tools/functionReuse.js.map +1 -0
  251. package/dist/tools/gapAnalysis.tools.d.ts +31 -0
  252. package/dist/tools/gapAnalysis.tools.d.ts.map +1 -0
  253. package/dist/tools/gapAnalysis.tools.js +287 -0
  254. package/dist/tools/gapAnalysis.tools.js.map +1 -0
  255. package/dist/tools/heal.tools.d.ts +20 -0
  256. package/dist/tools/heal.tools.d.ts.map +1 -0
  257. package/dist/tools/heal.tools.js +268 -0
  258. package/dist/tools/heal.tools.js.map +1 -0
  259. package/dist/tools/impactAnalysis.tools.d.ts +17 -0
  260. package/dist/tools/impactAnalysis.tools.d.ts.map +1 -0
  261. package/dist/tools/impactAnalysis.tools.js +352 -0
  262. package/dist/tools/impactAnalysis.tools.js.map +1 -0
  263. package/dist/tools/markdown.d.ts +13 -0
  264. package/dist/tools/markdown.d.ts.map +1 -0
  265. package/dist/tools/markdown.js +145 -0
  266. package/dist/tools/markdown.js.map +1 -0
  267. package/dist/tools/objects.tools.d.ts +7 -0
  268. package/dist/tools/objects.tools.d.ts.map +1 -0
  269. package/dist/tools/objects.tools.js +458 -0
  270. package/dist/tools/objects.tools.js.map +1 -0
  271. package/dist/tools/pipeline.tools.d.ts +11 -0
  272. package/dist/tools/pipeline.tools.d.ts.map +1 -0
  273. package/dist/tools/pipeline.tools.js +100 -0
  274. package/dist/tools/pipeline.tools.js.map +1 -0
  275. package/dist/tools/preference.tools.d.ts +15 -0
  276. package/dist/tools/preference.tools.d.ts.map +1 -0
  277. package/dist/tools/preference.tools.js +114 -0
  278. package/dist/tools/preference.tools.js.map +1 -0
  279. package/dist/tools/privileges.tools.d.ts +65 -0
  280. package/dist/tools/privileges.tools.d.ts.map +1 -0
  281. package/dist/tools/privileges.tools.js +186 -0
  282. package/dist/tools/privileges.tools.js.map +1 -0
  283. package/dist/tools/project.tools.d.ts +13 -0
  284. package/dist/tools/project.tools.d.ts.map +1 -0
  285. package/dist/tools/project.tools.js +199 -0
  286. package/dist/tools/project.tools.js.map +1 -0
  287. package/dist/tools/query.tools.d.ts +23 -0
  288. package/dist/tools/query.tools.d.ts.map +1 -0
  289. package/dist/tools/query.tools.js +368 -0
  290. package/dist/tools/query.tools.js.map +1 -0
  291. package/dist/tools/recording.tools.d.ts +58 -0
  292. package/dist/tools/recording.tools.d.ts.map +1 -0
  293. package/dist/tools/recording.tools.js +1050 -0
  294. package/dist/tools/recording.tools.js.map +1 -0
  295. package/dist/tools/recordingNames.d.ts +3 -0
  296. package/dist/tools/recordingNames.d.ts.map +1 -0
  297. package/dist/tools/recordingNames.js +16 -0
  298. package/dist/tools/recordingNames.js.map +1 -0
  299. package/dist/tools/report.tools.d.ts +12 -0
  300. package/dist/tools/report.tools.d.ts.map +1 -0
  301. package/dist/tools/report.tools.js +104 -0
  302. package/dist/tools/report.tools.js.map +1 -0
  303. package/dist/tools/run.tools.d.ts +25 -0
  304. package/dist/tools/run.tools.d.ts.map +1 -0
  305. package/dist/tools/run.tools.js +1295 -0
  306. package/dist/tools/run.tools.js.map +1 -0
  307. package/dist/tools/schemas.d.ts +860 -0
  308. package/dist/tools/schemas.d.ts.map +1 -0
  309. package/dist/tools/schemas.js +220 -0
  310. package/dist/tools/schemas.js.map +1 -0
  311. package/dist/tools/storySync.tools.d.ts +167 -0
  312. package/dist/tools/storySync.tools.d.ts.map +1 -0
  313. package/dist/tools/storySync.tools.js +678 -0
  314. package/dist/tools/storySync.tools.js.map +1 -0
  315. package/dist/tools/suiteManage.tools.d.ts +14 -0
  316. package/dist/tools/suiteManage.tools.d.ts.map +1 -0
  317. package/dist/tools/suiteManage.tools.js +112 -0
  318. package/dist/tools/suiteManage.tools.js.map +1 -0
  319. package/dist/tools/tasks.tools.d.ts +7 -0
  320. package/dist/tools/tasks.tools.d.ts.map +1 -0
  321. package/dist/tools/tasks.tools.js +101 -0
  322. package/dist/tools/tasks.tools.js.map +1 -0
  323. package/dist/tools/tcEditPublisher.d.ts +29 -0
  324. package/dist/tools/tcEditPublisher.d.ts.map +1 -0
  325. package/dist/tools/tcEditPublisher.js +61 -0
  326. package/dist/tools/tcEditPublisher.js.map +1 -0
  327. package/dist/tools/testCaseLint.d.ts +5 -0
  328. package/dist/tools/testCaseLint.d.ts.map +1 -0
  329. package/dist/tools/testCaseLint.js +112 -0
  330. package/dist/tools/testCaseLint.js.map +1 -0
  331. package/dist/tools/testPlan.tools.d.ts +12 -0
  332. package/dist/tools/testPlan.tools.d.ts.map +1 -0
  333. package/dist/tools/testPlan.tools.js +104 -0
  334. package/dist/tools/testPlan.tools.js.map +1 -0
  335. package/dist/tools/testcase.tools.d.ts +86 -0
  336. package/dist/tools/testcase.tools.d.ts.map +1 -0
  337. package/dist/tools/testcase.tools.js +1591 -0
  338. package/dist/tools/testcase.tools.js.map +1 -0
  339. package/dist/tools/testdata.tools.d.ts +7 -0
  340. package/dist/tools/testdata.tools.d.ts.map +1 -0
  341. package/dist/tools/testdata.tools.js +636 -0
  342. package/dist/tools/testdata.tools.js.map +1 -0
  343. package/dist/tools/xlsx.d.ts +8 -0
  344. package/dist/tools/xlsx.d.ts.map +1 -0
  345. package/dist/tools/xlsx.js +113 -0
  346. package/dist/tools/xlsx.js.map +1 -0
  347. package/dist/vendor/actionSignatures.d.ts +117 -0
  348. package/dist/vendor/actionSignatures.d.ts.map +1 -0
  349. package/dist/vendor/actionSignatures.js +420 -0
  350. package/dist/vendor/actionSignatures.js.map +1 -0
  351. package/dist/vendor/logger.d.ts +43 -0
  352. package/dist/vendor/logger.d.ts.map +1 -0
  353. package/dist/vendor/logger.js +184 -0
  354. package/dist/vendor/logger.js.map +1 -0
  355. package/dist/version.d.ts +10 -0
  356. package/dist/version.d.ts.map +1 -0
  357. package/dist/version.js +10 -0
  358. package/dist/version.js.map +1 -0
  359. package/dist/versionName.d.ts +21 -0
  360. package/dist/versionName.d.ts.map +1 -0
  361. package/dist/versionName.js +48 -0
  362. package/dist/versionName.js.map +1 -0
  363. package/package.json +62 -6
@@ -0,0 +1,1664 @@
1
+ /**
2
+ * SimplifyQA collection registry — the single source of truth for the generic `sqa_query` tool.
3
+ *
4
+ * Every SQA collection read is the same protocol:
5
+ * POST /<module>/<collection>/search
6
+ * { searchFields: [...], startIndex, limit, selectFields?, skipStartIndex? }
7
+ * -> { totalCount, data: [...] }
8
+ *
9
+ * What differs per collection: the path, the project-scope column, the field keys, and the
10
+ * relations. All of that lives here so one tool can query every collection.
11
+ *
12
+ * Field provenance (checked against the backend repos on 2026-10-23):
13
+ * - Default fields come from `project-management/src/fields/default_fields.json` + the runtime
14
+ * `fields` collection (`GET /pm/fields/{parentId}`).
15
+ * - `priority` is a default field only on features/stories/tasks/defects. Test cases, functions,
16
+ * suites, epics, releases and sprints have no `priority`.
17
+ * - `status` is not a default field on any PM/TM collection. Defects store the workflow value in
18
+ * `state` (Joi labels it "Status"); test cases/functions use `reviewApproveStatus`; executions
19
+ * have a real `status`.
20
+ * - Custom fields live in `customFields.<key>`; the key is resolved through
21
+ * `GET /pm/fields/{parentId}?fieldType=allFields&projectId=...`.
22
+ *
23
+ * `deleted: false` is sent on EVERY collection, as the AI assistant's reads exclude deleted rows; a
24
+ * caller cannot widen it. The backend does not add it (see `searchUtil.addTypesAndPrepareQuery`,
25
+ * which only adds customerId).
26
+ */
27
+ // ---------------------------------------------------------------------------
28
+ // Spelling helpers (keeps the registry readable).
29
+ // ---------------------------------------------------------------------------
30
+ const EQ = ['eq', 'in'];
31
+ const STR = ['eq', 'contains', 'ne'];
32
+ const NUM = ['eq', 'in', 'ne', 'gt', 'gte', 'lt', 'lte'];
33
+ // `exists` is unusable on SQA booleans (the backend puts { $exists } inside $nor).
34
+ const BOOL = ['eq', 'ne'];
35
+ const DATE = ['eq', 'ne', 'gt', 'gte', 'lt', 'lte'];
36
+ const ARR = ['in', 'not_in'];
37
+ // Fields whose value a word is translated for: lists are allowed (several states / technologies).
38
+ const CHOICE = ['eq', 'in', 'ne', 'not_in', 'contains'];
39
+ /** A configured workflow/priority/severity option (see SqaField.resolve). */
40
+ const LIFECYCLE = ['string', CHOICE, { resolve: 'lifecycle' }];
41
+ /** The AI assistant's catalogue enums for test cases (semantic/data/fields_generated.json). */
42
+ const TC_TYPE = ['string', CHOICE, {
43
+ resolve: 'enum',
44
+ enumValues: ['WEB', 'ANDROID', 'IOS', 'API', 'DESKTOP', 'SAP', 'MAINFRAME', 'DATABASE', 'HYBRID'],
45
+ enumGroups: { MOBILE: ['ANDROID', 'IOS'] },
46
+ }];
47
+ const EXECUTION_TYPE = ['string', CHOICE, { resolve: 'enum', enumValues: ['MANUAL', 'AUTOMATION', 'DUO'] }];
48
+ function fields(defs) {
49
+ const out = {};
50
+ for (const [key, def] of Object.entries(defs)) {
51
+ const [type, ops, extra] = def;
52
+ out[key] = { key, type, ops, ...(extra ?? {}) };
53
+ }
54
+ return out;
55
+ }
56
+ // ---------------------------------------------------------------------------
57
+ // Collections.
58
+ // ---------------------------------------------------------------------------
59
+ export const SQA_COLLECTIONS = {
60
+ projects: {
61
+ name: 'projects',
62
+ aliases: ['project'],
63
+ description: 'Tenant projects — the root scope for test cases, backlog, runs and settings. Readable with no ' +
64
+ 'project selected. An admin sees every project in the tenant; `member:true` keeps only the ones you have a role in, ' +
65
+ 'and each row then carries your `roleId` + `roleName` in that project.',
66
+ usedFor: 'How many / which projects; resolve a project name/id before qa_switch_project (use member:true for the user\'s own).',
67
+ visibility: 'Only the projects you have access to. An admin sees every project in the account.',
68
+ method: 'POST',
69
+ searchPath: '/pm/project/search',
70
+ scope: 'none',
71
+ softDelete: 'deleted',
72
+ idField: 'id',
73
+ keyField: 'code',
74
+ labelField: 'name',
75
+ defaultSelect: ['id', 'code', 'name'],
76
+ totalCountReliable: false,
77
+ fields: fields({
78
+ id: ['number', NUM],
79
+ code: ['string', STR],
80
+ name: ['string', STR],
81
+ // Not stored: the adapter turns it into `id in <your role projects>` (/pm/projectuserrole).
82
+ member: ['boolean', BOOL, { label: 'You have a role in it' }],
83
+ businessUnitId: ['number', EQ, { label: 'Business unit' }],
84
+ createdBy: ['number', EQ],
85
+ updatedBy: ['number', EQ],
86
+ createdAt: ['date', DATE],
87
+ updatedAt: ['date', DATE],
88
+ deleted: ['boolean', BOOL],
89
+ }),
90
+ },
91
+ testcases: {
92
+ name: 'testcases',
93
+ aliases: ['testcase', 'tc', 'test', 'tests'],
94
+ description: 'Saved test cases (manual or automated; WEB/API/ANDROID/DATABASE/MAINFRAME/...).',
95
+ usedFor: 'List/read test cases, find by module/story/type, and drive executions or defects.',
96
+ parentId: 5,
97
+ searchPath: '/tm/testcase/search',
98
+ getPath: '/tm/testcase/getById/{id}',
99
+ scope: 'project',
100
+ softDelete: 'deleted',
101
+ idField: 'id',
102
+ keyField: 'code',
103
+ labelField: 'name',
104
+ defaultSelect: ['id', 'code', 'name', 'tcType', 'executionType', 'moduleId', 'userstoryId', 'obsolete', 'reviewApproveStatus'],
105
+ hiddenUnlessAsked: ['obsolete'],
106
+ fields: fields({
107
+ id: ['number', NUM],
108
+ code: ['string', STR],
109
+ name: ['string', STR],
110
+ tcType: TC_TYPE,
111
+ executionType: EXECUTION_TYPE,
112
+ moduleId: ['number', EQ, { label: 'Module' }],
113
+ userstoryId: ['number', EQ, { label: 'User Story' }],
114
+ createdBy: ['number', EQ],
115
+ updatedBy: ['number', EQ],
116
+ obsolete: ['boolean', BOOL],
117
+ reviewApproveStatus: ['string', STR],
118
+ isHybrid: ['boolean', BOOL],
119
+ updateVersion: ['number', NUM],
120
+ tags: ['array', ARR],
121
+ suiteId: ['array', ARR],
122
+ defectId: ['array', ARR],
123
+ description: ['string', STR],
124
+ prerequisite: ['string', STR],
125
+ createdAt: ['date', DATE],
126
+ updatedAt: ['date', DATE],
127
+ deleted: ['boolean', BOOL],
128
+ projectId: ['number', EQ],
129
+ // NOTE: priority/status/stepCount are NOT stored on SQA testcase rows. Do not add them.
130
+ }),
131
+ relations: {
132
+ linkedIssues: {
133
+ kind: 'query', to: 'tcLinkages', localField: 'id', remoteField: 'parentId',
134
+ where: { parentType: 'TC' },
135
+ description: 'Linked issues of this test case (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
136
+ },
137
+ steps: {
138
+ kind: 'subresource', localField: 'id',
139
+ subresourcePath: '/tm/testcase/steps',
140
+ subresourceParams: { tcfnId: 'id', type: 'TC' },
141
+ description: 'Step rows for the test case (optionally a specific version).',
142
+ },
143
+ versions: {
144
+ kind: 'query', to: 'versions', localField: 'id', remoteField: 'parentId',
145
+ where: { parentType: 'TC' },
146
+ description: 'All versions (tcfn_version rows) of this test case.',
147
+ },
148
+ attachments: {
149
+ kind: 'query', to: 'attachments', localField: 'id', remoteField: 'parentId',
150
+ where: { parentType: 'TC' },
151
+ description: 'Files attached to this test case. `url` is a direct download path (prefix QA_BASE_URL).',
152
+ },
153
+ executions: {
154
+ kind: 'query', to: 'executions', localField: 'id', remoteField: 'executionTypeId',
155
+ // The executions collection stores `type: "TESTCASE"` (not "TC") — verified live.
156
+ where: { type: 'TESTCASE' },
157
+ description: 'Runs of this test case (newest first if you sort id desc). `type` is TESTCASE on the wire.',
158
+ },
159
+ defects: {
160
+ kind: 'query', to: 'defects', localField: 'id', remoteField: 'selectedTestCase.testcaseId',
161
+ arrayContains: true,
162
+ description: 'Defects raised against / linked to this test case.',
163
+ },
164
+ suites: {
165
+ kind: 'query', to: 'suites', localField: 'id', remoteField: 'testCases.testcaseId',
166
+ arrayContains: true,
167
+ description: 'Suites that contain this test case.',
168
+ },
169
+ testdata: {
170
+ kind: 'query', to: 'testdata', localField: 'id', remoteField: 'testcaseId',
171
+ description: 'Test-data iterations for this test case.',
172
+ },
173
+ module: {
174
+ kind: 'through', to: 'modules', localField: 'moduleId', remoteField: 'id',
175
+ description: 'The module/folder this test case lives in.',
176
+ },
177
+ story: {
178
+ kind: 'through', to: 'stories', localField: 'userstoryId', remoteField: 'id',
179
+ description: 'The user story this test case is linked to (if any).',
180
+ },
181
+ },
182
+ },
183
+ functions: {
184
+ name: 'functions',
185
+ aliases: ['function', 'fn', 'reusable'],
186
+ description: 'Reusable step groups stored in the same tcfn collection as test cases (type=FN).',
187
+ usedFor: 'List/read reusable functions, their versions and steps.',
188
+ parentId: 6,
189
+ searchPath: '/tm/function/search',
190
+ getPath: '/tm/function/{id}/{projectId}',
191
+ scope: 'project',
192
+ softDelete: 'deleted',
193
+ idField: 'id',
194
+ keyField: 'code',
195
+ labelField: 'name',
196
+ defaultSelect: ['id', 'code', 'name', 'fnType', 'executionType', 'moduleId', 'reviewApproveStatus'],
197
+ fields: fields({
198
+ id: ['number', NUM],
199
+ code: ['string', STR],
200
+ name: ['string', STR],
201
+ fnType: ['string', STR],
202
+ executionType: ['string', STR],
203
+ moduleId: ['number', EQ, { label: 'Module' }],
204
+ reviewApproveStatus: ['string', STR],
205
+ createdBy: ['number', EQ],
206
+ updatedBy: ['number', EQ],
207
+ tags: ['array', ARR],
208
+ createdAt: ['date', DATE],
209
+ updatedAt: ['date', DATE],
210
+ deleted: ['boolean', BOOL],
211
+ projectId: ['number', EQ],
212
+ }),
213
+ relations: {
214
+ linkedIssues: {
215
+ kind: 'query', to: 'tcLinkages', localField: 'id', remoteField: 'parentId',
216
+ where: { parentType: 'FN' },
217
+ description: 'Linked issues of this function (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
218
+ },
219
+ steps: {
220
+ kind: 'subresource', localField: 'id',
221
+ subresourcePath: '/tm/function/steps',
222
+ subresourceParams: { tcfnId: 'id', type: 'FN' },
223
+ description: 'Step rows for the function (the newest version when versionId is omitted).',
224
+ },
225
+ versions: {
226
+ kind: 'query', to: 'versions', localField: 'id', remoteField: 'parentId',
227
+ where: { parentType: 'FN' },
228
+ description: 'All versions of this function.',
229
+ },
230
+ attachments: {
231
+ kind: 'query', to: 'attachments', localField: 'id', remoteField: 'parentId',
232
+ where: { parentType: 'FN' },
233
+ description: 'Files attached to this function. `url` is a direct download path (prefix QA_BASE_URL).',
234
+ },
235
+ module: {
236
+ kind: 'through', to: 'modules', localField: 'moduleId', remoteField: 'id',
237
+ description: 'The module/folder this function lives in.',
238
+ },
239
+ },
240
+ },
241
+ suites: {
242
+ name: 'suites',
243
+ aliases: ['suite', 'test suite'],
244
+ description: 'Ordered collections of test cases used for batch execution.',
245
+ usedFor: 'List/read suites, their member test cases, and their runs.',
246
+ parentId: 7,
247
+ searchPath: '/tm/suites/search',
248
+ getPath: '/tm/suites/{id}',
249
+ scope: 'project',
250
+ softDelete: 'deleted',
251
+ idField: 'id',
252
+ keyField: 'code',
253
+ labelField: 'name',
254
+ defaultSelect: ['id', 'code', 'name', 'suiteType', 'state'],
255
+ fields: fields({
256
+ id: ['number', NUM],
257
+ code: ['string', STR],
258
+ name: ['string', STR],
259
+ suiteType: ['string', STR],
260
+ state: ['string', STR],
261
+ 'testCases.testcaseId': ['array', ARR, { label: 'Test Case' }],
262
+ createdBy: ['number', EQ],
263
+ updatedBy: ['number', EQ],
264
+ createdAt: ['date', DATE],
265
+ updatedAt: ['date', DATE],
266
+ deleted: ['boolean', BOOL],
267
+ projectId: ['number', EQ],
268
+ }),
269
+ relations: {
270
+ testcases: {
271
+ kind: 'through', to: 'testcases', localField: 'testCases[].testcaseId', remoteField: 'id',
272
+ description: 'Member test cases, in suite order.',
273
+ },
274
+ executions: {
275
+ kind: 'query', to: 'executions', localField: 'id', remoteField: 'executionTypeId',
276
+ where: { type: 'SUITE' },
277
+ description: 'Runs of this suite (newest first if you sort id desc).',
278
+ },
279
+ },
280
+ },
281
+ stories: {
282
+ name: 'stories',
283
+ aliases: ['story', 'userstory', 'user story', 'us'],
284
+ description: 'User stories with acceptance criteria — the backlog/PM unit that test cases, defects and tasks link to.',
285
+ usedFor: 'List/read stories, filter by epic/feature/release/sprint/module/owner, and follow their test cases/defects/tasks.',
286
+ parentId: 3,
287
+ searchPath: '/pm/userstory/search',
288
+ getPath: '/pm/userstory/{id}',
289
+ scope: 'project',
290
+ softDelete: 'deleted',
291
+ idField: 'id',
292
+ keyField: 'code',
293
+ labelField: 'name',
294
+ defaultSelect: ['id', 'code', 'name', 'state', 'priority', 'moduleId', 'epicId', 'featureId', 'releaseId', 'iterationId', 'ownerId'],
295
+ versioned: true,
296
+ fields: fields({
297
+ id: ['number', NUM],
298
+ code: ['string', STR],
299
+ name: ['string', STR],
300
+ state: LIFECYCLE,
301
+ priority: LIFECYCLE,
302
+ type: ['string', STR],
303
+ moduleId: ['number', EQ, { label: 'Module' }],
304
+ epicId: ['number', EQ, { label: 'Epic' }],
305
+ featureId: ['number', EQ, { label: 'Feature' }],
306
+ releaseId: ['number', EQ, { label: 'Release' }],
307
+ iterationId: ['number', EQ, { label: 'Sprint' }],
308
+ ownerId: ['number', EQ],
309
+ createdBy: ['number', EQ],
310
+ updatedBy: ['number', EQ],
311
+ deploymentStatus: ['string', STR],
312
+ tags: ['array', ARR],
313
+ teamId: ['array', ARR],
314
+ plannedStartDate: ['date', DATE],
315
+ plannedEndDate: ['date', DATE],
316
+ createdAt: ['date', DATE],
317
+ updatedAt: ['date', DATE],
318
+ deleted: ['boolean', BOOL],
319
+ projectId: ['number', EQ],
320
+ }),
321
+ relations: {
322
+ linkedIssues: {
323
+ kind: 'query', to: 'linkages', localField: 'id', remoteField: 'parentId',
324
+ where: { parentType: 'US' },
325
+ description: 'Linked issues of this user story (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
326
+ },
327
+ testcases: {
328
+ kind: 'query', to: 'testcases', localField: 'id', remoteField: 'userstoryId',
329
+ description: 'Test cases linked to this story.',
330
+ },
331
+ attachments: {
332
+ kind: 'query', to: 'attachments', localField: 'id', remoteField: 'parentId',
333
+ where: { parentType: 'US' },
334
+ description: 'Files attached to this story. `url` is a direct download path (prefix QA_BASE_URL).',
335
+ },
336
+ defects: {
337
+ kind: 'query', to: 'defects', localField: 'id', remoteField: 'userstoryId',
338
+ description: 'Defects linked to this story.',
339
+ },
340
+ tasks: {
341
+ kind: 'query', to: 'tasks', localField: 'id', remoteField: 'userstoryId',
342
+ description: 'Tasks linked to this story.',
343
+ },
344
+ epic: {
345
+ kind: 'through', to: 'epics', localField: 'epicId', remoteField: 'id',
346
+ description: 'The parent epic.',
347
+ },
348
+ feature: {
349
+ kind: 'through', to: 'features', localField: 'featureId', remoteField: 'id',
350
+ description: 'The parent feature.',
351
+ },
352
+ release: {
353
+ kind: 'through', to: 'releases', localField: 'releaseId', remoteField: 'id',
354
+ description: 'The release this story belongs to.',
355
+ },
356
+ sprint: {
357
+ kind: 'through', to: 'sprints', localField: 'iterationId', remoteField: 'id',
358
+ description: 'The sprint (iterationId) this story belongs to.',
359
+ },
360
+ module: {
361
+ kind: 'through', to: 'modules', localField: 'moduleId', remoteField: 'id',
362
+ description: 'The module/folder this story belongs to.',
363
+ },
364
+ },
365
+ },
366
+ epics: {
367
+ name: 'epics',
368
+ aliases: ['epic', 'ep'],
369
+ description: 'Top-level backlog themes that group features and stories.',
370
+ usedFor: 'List/read epics and follow their features/stories.',
371
+ parentId: 1,
372
+ searchPath: '/pm/epic/search',
373
+ getPath: '/pm/epic/{id}',
374
+ scope: 'projectIds',
375
+ softDelete: 'deleted',
376
+ idField: 'id',
377
+ keyField: 'code',
378
+ labelField: 'name',
379
+ defaultSelect: ['id', 'code', 'name', 'state', 'ownerId', 'projectIds'],
380
+ versioned: true,
381
+ fields: fields({
382
+ id: ['number', NUM],
383
+ code: ['string', STR],
384
+ name: ['string', STR],
385
+ state: LIFECYCLE,
386
+ ownerId: ['number', EQ],
387
+ createdBy: ['number', EQ],
388
+ updatedBy: ['number', EQ],
389
+ projectIds: ['array', ARR],
390
+ tags: ['array', ARR],
391
+ teamId: ['array', ARR],
392
+ plannedStartDate: ['date', DATE],
393
+ plannedEndDate: ['date', DATE],
394
+ createdAt: ['date', DATE],
395
+ updatedAt: ['date', DATE],
396
+ deleted: ['boolean', BOOL],
397
+ }),
398
+ relations: {
399
+ linkedIssues: {
400
+ kind: 'query', to: 'linkages', localField: 'id', remoteField: 'parentId',
401
+ where: { parentType: 'EP' },
402
+ description: 'Linked issues of this epic (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
403
+ },
404
+ features: {
405
+ kind: 'query', to: 'features', localField: 'id', remoteField: 'epicId',
406
+ description: 'Features under this epic.',
407
+ },
408
+ stories: {
409
+ kind: 'query', to: 'stories', localField: 'id', remoteField: 'epicId',
410
+ description: 'Stories under this epic.',
411
+ },
412
+ },
413
+ },
414
+ features: {
415
+ name: 'features',
416
+ aliases: ['feature', 'ft'],
417
+ description: 'Features — children of epics that group user stories.',
418
+ usedFor: 'List/read features and follow their stories.',
419
+ parentId: 2,
420
+ searchPath: '/pm/feature/search',
421
+ getPath: '/pm/feature/{id}',
422
+ scope: 'projectIds',
423
+ softDelete: 'deleted',
424
+ idField: 'id',
425
+ keyField: 'code',
426
+ labelField: 'name',
427
+ defaultSelect: ['id', 'code', 'name', 'state', 'priority', 'epicId', 'ownerId', 'projectIds'],
428
+ fields: fields({
429
+ id: ['number', NUM],
430
+ code: ['string', STR],
431
+ name: ['string', STR],
432
+ state: LIFECYCLE,
433
+ priority: LIFECYCLE,
434
+ epicId: ['number', EQ, { label: 'Epic' }],
435
+ ownerId: ['number', EQ],
436
+ createdBy: ['number', EQ],
437
+ updatedBy: ['number', EQ],
438
+ projectIds: ['array', ARR],
439
+ tags: ['array', ARR],
440
+ teamId: ['array', ARR],
441
+ plannedStartDate: ['date', DATE],
442
+ plannedEndDate: ['date', DATE],
443
+ createdAt: ['date', DATE],
444
+ updatedAt: ['date', DATE],
445
+ deleted: ['boolean', BOOL],
446
+ }),
447
+ relations: {
448
+ linkedIssues: {
449
+ kind: 'query', to: 'linkages', localField: 'id', remoteField: 'parentId',
450
+ where: { parentType: 'FT' },
451
+ description: 'Linked issues of this feature (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
452
+ },
453
+ stories: {
454
+ kind: 'query', to: 'stories', localField: 'id', remoteField: 'featureId',
455
+ description: 'Stories under this feature.',
456
+ },
457
+ epic: {
458
+ kind: 'through', to: 'epics', localField: 'epicId', remoteField: 'id',
459
+ description: 'The parent epic.',
460
+ },
461
+ },
462
+ },
463
+ modules: {
464
+ name: 'modules',
465
+ aliases: ['module', 'folder', 'tree'],
466
+ description: 'Folder tree used to organise test cases, functions and objects.',
467
+ usedFor: 'List/read the module tree and find test cases/functions/objects by module.',
468
+ searchPath: '/pm/module/search',
469
+ getPath: '/pm/module/{id}',
470
+ scope: 'project',
471
+ softDelete: 'deleted',
472
+ idField: 'id',
473
+ keyField: 'code',
474
+ labelField: 'name',
475
+ defaultSelect: ['id', 'code', 'name', 'parentId', 'isRoot', 'childIds'],
476
+ maxLimit: 1000,
477
+ fields: fields({
478
+ id: ['number', NUM],
479
+ code: ['string', STR],
480
+ name: ['string', STR],
481
+ parentId: ['number', EQ],
482
+ isRoot: ['boolean', BOOL],
483
+ createdBy: ['number', EQ],
484
+ updatedBy: ['number', EQ],
485
+ createdAt: ['date', DATE],
486
+ updatedAt: ['date', DATE],
487
+ deleted: ['boolean', BOOL],
488
+ projectId: ['number', EQ],
489
+ }),
490
+ relations: {
491
+ children: {
492
+ kind: 'query', to: 'modules', localField: 'id', remoteField: 'parentId',
493
+ description: 'Direct child modules.',
494
+ },
495
+ testcases: {
496
+ kind: 'query', to: 'testcases', localField: 'id', remoteField: 'moduleId',
497
+ description: 'Test cases filed under this module.',
498
+ },
499
+ functions: {
500
+ kind: 'query', to: 'functions', localField: 'id', remoteField: 'moduleId',
501
+ description: 'Functions filed under this module.',
502
+ },
503
+ objects: {
504
+ kind: 'query', to: 'objects', localField: 'id', remoteField: 'moduleId',
505
+ description: 'Objects filed under this module.',
506
+ },
507
+ },
508
+ },
509
+ releases: {
510
+ name: 'releases',
511
+ aliases: ['release', 'rel'],
512
+ description: 'Release containers that group sprints and stories.',
513
+ usedFor: 'List/read releases and follow their sprints/stories.',
514
+ parentId: 11,
515
+ searchPath: '/pm/release/search',
516
+ scope: 'projectIds',
517
+ softDelete: 'deleted',
518
+ idField: 'id',
519
+ keyField: 'code',
520
+ labelField: 'name',
521
+ defaultSelect: ['id', 'code', 'name', 'state', 'projectIds', 'ownerIds'],
522
+ fields: fields({
523
+ id: ['number', NUM],
524
+ code: ['string', STR],
525
+ name: ['string', STR],
526
+ state: ['string', STR],
527
+ ownerIds: ['array', ARR],
528
+ projectIds: ['array', ARR],
529
+ plannedStartDate: ['date', DATE],
530
+ plannedEndDate: ['date', DATE],
531
+ actualStartDate: ['date', DATE],
532
+ actualEndDate: ['date', DATE],
533
+ createdBy: ['number', EQ],
534
+ updatedBy: ['number', EQ],
535
+ createdAt: ['date', DATE],
536
+ updatedAt: ['date', DATE],
537
+ deleted: ['boolean', BOOL],
538
+ }),
539
+ relations: {
540
+ sprints: {
541
+ kind: 'query', to: 'sprints', localField: 'id', remoteField: 'releaseId',
542
+ description: 'Sprints in this release.',
543
+ },
544
+ stories: {
545
+ kind: 'query', to: 'stories', localField: 'id', remoteField: 'releaseId',
546
+ description: 'Stories in this release.',
547
+ },
548
+ },
549
+ },
550
+ sprints: {
551
+ name: 'sprints',
552
+ aliases: ['sprint', 'iteration'],
553
+ description: 'Iterations inside a release — only sprints whose release belongs to the active project ' +
554
+ '(a sprint has no project of its own); `allProjects:true` reads the sprints of all your projects. ' +
555
+ 'On the wire, stories link to a sprint via `iterationId`.',
556
+ usedFor: 'List/read sprints and follow their stories.',
557
+ parentId: 12,
558
+ searchPath: '/pm/sprint/search',
559
+ // The backend's /pm/sprint/search filters by customer only, so without this a non-admin got every
560
+ // sprint in the customer.
561
+ scope: 'release',
562
+ softDelete: 'deleted',
563
+ idField: 'id',
564
+ keyField: 'code',
565
+ labelField: 'name',
566
+ defaultSelect: ['id', 'code', 'name', 'releaseId', 'state', 'ownerIds'],
567
+ fields: fields({
568
+ id: ['number', NUM],
569
+ code: ['string', STR],
570
+ name: ['string', STR],
571
+ releaseId: ['number', EQ, { label: 'Release' }],
572
+ state: ['string', STR],
573
+ ownerIds: ['array', ARR],
574
+ plannedStartDate: ['date', DATE],
575
+ plannedEndDate: ['date', DATE],
576
+ actualStartDate: ['date', DATE],
577
+ actualEndDate: ['date', DATE],
578
+ createdBy: ['number', EQ],
579
+ updatedBy: ['number', EQ],
580
+ createdAt: ['date', DATE],
581
+ updatedAt: ['date', DATE],
582
+ deleted: ['boolean', BOOL],
583
+ }),
584
+ relations: {
585
+ stories: {
586
+ kind: 'query', to: 'stories', localField: 'id', remoteField: 'iterationId',
587
+ description: 'Stories in this sprint (stories call the sprint `iterationId`).',
588
+ },
589
+ release: {
590
+ kind: 'through', to: 'releases', localField: 'releaseId', remoteField: 'id',
591
+ description: 'The parent release.',
592
+ },
593
+ },
594
+ },
595
+ defects: {
596
+ name: 'defects',
597
+ aliases: ['defect', 'bug', 'bugs'],
598
+ description: 'Bugs/defects, raised manually or from an execution, and linked to test cases and stories.',
599
+ usedFor: 'List/read defects, filter by state/severity/priority/assignee, and follow their test cases/tasks.',
600
+ parentId: 9,
601
+ searchPath: '/pm/defect/search',
602
+ scope: 'project',
603
+ softDelete: 'deleted',
604
+ idField: 'id',
605
+ keyField: 'code',
606
+ labelField: 'name',
607
+ defaultSelect: ['id', 'code', 'name', 'state', 'severity', 'priority', 'ownerId', 'userstoryId', 'selectedTestCase'],
608
+ fields: fields({
609
+ id: ['number', NUM],
610
+ code: ['string', STR],
611
+ name: ['string', STR],
612
+ state: ['string', CHOICE, { resolve: 'lifecycle', label: 'Status' }],
613
+ severity: LIFECYCLE,
614
+ priority: LIFECYCLE,
615
+ ownerId: ['array', ARR],
616
+ userstoryId: ['number', EQ, { label: 'User Story' }],
617
+ 'selectedTestCase.testcaseId': ['array', ARR, { label: 'Test Case' }],
618
+ moduleId: ['number', EQ, { label: 'Module' }],
619
+ featureId: ['number', EQ, { label: 'Feature' }],
620
+ releaseId: ['number', EQ, { label: 'Release' }],
621
+ iterationId: ['number', EQ, { label: 'Sprint' }],
622
+ type: ['string', STR],
623
+ category: ['string', STR],
624
+ environment: ['string', STR],
625
+ createdBy: ['number', EQ],
626
+ updatedBy: ['number', EQ],
627
+ plannedStartDate: ['date', DATE],
628
+ plannedEndDate: ['date', DATE],
629
+ closedDate: ['date', DATE],
630
+ createdAt: ['date', DATE],
631
+ updatedAt: ['date', DATE],
632
+ deleted: ['boolean', BOOL],
633
+ projectId: ['number', EQ],
634
+ }),
635
+ relations: {
636
+ linkedIssues: {
637
+ kind: 'query', to: 'linkages', localField: 'id', remoteField: 'parentId',
638
+ where: { parentType: 'DE' },
639
+ description: 'Linked issues of this defect (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
640
+ },
641
+ testcases: {
642
+ kind: 'through', to: 'testcases', localField: 'selectedTestCase[].testcaseId', remoteField: 'id',
643
+ description: 'Test cases this defect is linked to.',
644
+ },
645
+ tasks: {
646
+ kind: 'query', to: 'tasks', localField: 'id', remoteField: 'defectId',
647
+ description: 'Tasks raised for this defect.',
648
+ },
649
+ story: {
650
+ kind: 'through', to: 'stories', localField: 'userstoryId', remoteField: 'id',
651
+ description: 'The user story this defect belongs to.',
652
+ },
653
+ },
654
+ },
655
+ tasks: {
656
+ name: 'tasks',
657
+ aliases: ['task'],
658
+ description: 'Project-management work items that can hang off a user story or a defect.',
659
+ usedFor: 'List/read tasks, filter by state/priority/assignee/story/defect.',
660
+ parentId: 4,
661
+ searchPath: '/pm/task/search',
662
+ scope: 'project',
663
+ softDelete: 'deleted',
664
+ idField: 'id',
665
+ keyField: 'code',
666
+ labelField: 'name',
667
+ defaultSelect: ['id', 'code', 'name', 'state', 'priority', 'ownerId', 'userstoryId', 'defectId'],
668
+ fields: fields({
669
+ id: ['number', NUM],
670
+ code: ['string', STR],
671
+ name: ['string', STR],
672
+ state: LIFECYCLE,
673
+ priority: LIFECYCLE,
674
+ ownerId: ['array', ARR],
675
+ userstoryId: ['number', EQ, { label: 'User Story' }],
676
+ defectId: ['number', EQ, { label: 'Defect' }],
677
+ releaseId: ['number', EQ, { label: 'Release' }],
678
+ iterationId: ['number', EQ, { label: 'Sprint' }],
679
+ type: ['string', STR],
680
+ createdBy: ['number', EQ],
681
+ updatedBy: ['number', EQ],
682
+ plannedStartDate: ['date', DATE],
683
+ plannedEndDate: ['date', DATE],
684
+ createdAt: ['date', DATE],
685
+ updatedAt: ['date', DATE],
686
+ deleted: ['boolean', BOOL],
687
+ projectId: ['number', EQ],
688
+ }),
689
+ relations: {
690
+ linkedIssues: {
691
+ kind: 'query', to: 'linkages', localField: 'id', remoteField: 'parentId',
692
+ where: { parentType: 'TA' },
693
+ description: 'Linked issues of this task (the Linkages panel): each row names the linked item by destinationCode + parentName and the link by linkTypeKey.',
694
+ },
695
+ defect: {
696
+ kind: 'through', to: 'defects', localField: 'defectId', remoteField: 'id',
697
+ description: 'The defect this task belongs to.',
698
+ },
699
+ story: {
700
+ kind: 'through', to: 'stories', localField: 'userstoryId', remoteField: 'id',
701
+ description: 'The user story this task belongs to.',
702
+ },
703
+ },
704
+ },
705
+ attachments: {
706
+ name: 'attachments',
707
+ aliases: ['attachment', 'file', 'files', 'upload', 'uploaded file'],
708
+ description: 'Files uploaded against an artifact (user story / test case / function) — screenshots, PDFs, ' +
709
+ 'spreadsheets. Every row carries a direct download `url`.',
710
+ usedFor: 'Find the file attached to a story (typically a testdata or test-scenario sheet) and hand its ' +
711
+ '`url` to whoever needs it. Filter by parentId + parentType, or follow stories → attachments.',
712
+ // Customer-wide on purpose: the backend scopes by customerId, but attachments do NOT always
713
+ // carry a projectId (files saved by the TM service omit it), so a project-scoped read would
714
+ // silently hide them. Filter by projectId when it matters.
715
+ searchPath: '/pm/attachment/search',
716
+ scope: 'none',
717
+ softDelete: 'deleted',
718
+ idField: 'id',
719
+ labelField: 'original_name',
720
+ defaultSelect: ['id', 'parentId', 'parentType', 'original_name', 'type', 'size', 'fileSize', 'projectId', 'url', 'createdAt'],
721
+ fields: fields({
722
+ id: ['string', STR],
723
+ parentId: ['number', NUM, { label: 'Artifact id' }],
724
+ parentType: ['string', CHOICE, { label: 'Artifact type (US / TC / FN)' }],
725
+ original_name: ['string', STR, { label: 'File name' }],
726
+ name: ['string', STR, { label: 'Stored file name' }],
727
+ type: ['string', STR, { label: 'Extension' }],
728
+ size: ['number', NUM, { label: 'Bytes' }],
729
+ fileSize: ['string', STR, { label: 'Human-readable size' }],
730
+ projectId: ['number', EQ],
731
+ createdBy: ['number', EQ],
732
+ createdAt: ['date', DATE],
733
+ updatedAt: ['date', DATE],
734
+ deleted: ['boolean', BOOL],
735
+ // Selectable, never filterable: this is returned so the caller can fetch the file.
736
+ url: ['string', [], { label: 'Download path — prefix with QA_BASE_URL' }],
737
+ }),
738
+ },
739
+ // Linked issues ("Linkages" panel on epic / feature / story / task / defect / test case / function).
740
+ // A link is stored twice, once per side (PM linkages.service saveLinkIssues writes the mirror row):
741
+ // rows whose parent is an epic/feature/story/task/defect live in PM, rows whose parent is a test case
742
+ // or function live in TM (/tm/linkages). `parentName` is the LINKED item's name (UI linkages.component).
743
+ linkages: {
744
+ name: 'linkages',
745
+ aliases: ['linkage', 'link', 'links', 'linked issue', 'linked issues', 'issue links', 'related items'],
746
+ description: 'Linked issues of epics (EP), features (FT), user stories (US), tasks (TA) and defects (DE): one row ' +
747
+ 'per link, from the item `parentType`+`parentId` to the linked item `destinationCode` ' +
748
+ '(EP/FT/US/TA/DE/TC/FN-<n>), named by `parentName`. `linkTypeKey` is the link type (see linkTypes). ' +
749
+ 'Links whose parent is a TEST CASE or FUNCTION are in tcLinkages.',
750
+ usedFor: 'What is linked to an item: where parentType + parentId (or follow epics/features/stories/tasks/defects -> ' +
751
+ 'linkedIssues). Which items link TO something: where destinationCode (e.g. "TC-7577"); every link is ' +
752
+ 'stored on both sides, so this finds all epics/features/stories/tasks/defects linked to it.',
753
+ searchPath: '/pm/linkages/search',
754
+ scope: 'project',
755
+ softDelete: 'deleted',
756
+ idField: 'id',
757
+ labelField: 'destinationCode',
758
+ defaultSelect: ['id', 'parentType', 'parentId', 'linkTypeKey', 'destinationCode', 'parentName', 'destinationType', 'destinationId', 'projectId'],
759
+ fields: fields({
760
+ id: ['string', STR],
761
+ parentId: ['number', NUM, { label: 'Item id' }],
762
+ parentType: ['string', CHOICE, { label: 'Item type (EP / FT / US / TA / DE)' }],
763
+ destinationId: ['number', NUM, { label: 'Linked item id' }],
764
+ destinationCode: ['string', CHOICE, { label: 'Linked item code' }],
765
+ destinationType: ['string', CHOICE, { label: 'Linked item type (EP / FT / US / TA / DE / TC / FN)' }],
766
+ parentName: ['string', STR, { label: 'Linked item name' }],
767
+ linkId: ['string', STR, { label: 'Link type id (linkTypes, a uuid)' }],
768
+ linkTypeKey: ['string', CHOICE, { label: 'Link type' }],
769
+ linkType: ['string', CHOICE, { label: 'Direction (inwardType / outwardType)' }],
770
+ jiraIssueKey: ['string', STR],
771
+ projectId: ['number', EQ],
772
+ createdBy: ['number', EQ],
773
+ updatedBy: ['number', EQ],
774
+ createdAt: ['date', DATE],
775
+ updatedAt: ['date', DATE],
776
+ deleted: ['boolean', BOOL],
777
+ }),
778
+ },
779
+ tcLinkages: {
780
+ name: 'tcLinkages',
781
+ aliases: ['testcase linkages', 'test case links', 'function linkages', 'function links', 'tc linkages'],
782
+ description: 'Linked issues of TEST CASES (TC) and FUNCTIONS (FN): same row shape as linkages, stored by the test ' +
783
+ 'management service. `parentType` TC/FN + `parentId` is the test case / function; `destinationCode` the ' +
784
+ 'linked item (any type, including other test cases and functions).',
785
+ usedFor: 'What a test case or function is linked to (or follow testcases/functions -> linkedIssues); which test ' +
786
+ 'cases / functions link TO an item: where destinationCode.',
787
+ searchPath: '/tm/linkages/search',
788
+ scope: 'project',
789
+ softDelete: 'deleted',
790
+ idField: 'id',
791
+ labelField: 'destinationCode',
792
+ defaultSelect: ['id', 'parentType', 'parentId', 'linkTypeKey', 'destinationCode', 'parentName', 'destinationType', 'destinationId', 'projectId'],
793
+ fields: fields({
794
+ id: ['string', STR],
795
+ parentId: ['number', NUM, { label: 'Test case / function id' }],
796
+ parentType: ['string', CHOICE, { label: 'TC / FN' }],
797
+ destinationId: ['number', NUM, { label: 'Linked item id' }],
798
+ destinationCode: ['string', CHOICE, { label: 'Linked item code' }],
799
+ destinationType: ['string', CHOICE, { label: 'Linked item type' }],
800
+ parentName: ['string', STR, { label: 'Linked item name' }],
801
+ linkId: ['string', STR, { label: 'Link type id (linkTypes, a uuid)' }],
802
+ linkTypeKey: ['string', CHOICE, { label: 'Link type' }],
803
+ linkType: ['string', CHOICE, { label: 'Direction (inwardType / outwardType)' }],
804
+ projectId: ['number', EQ],
805
+ createdBy: ['number', EQ],
806
+ createdAt: ['date', DATE],
807
+ updatedAt: ['date', DATE],
808
+ deleted: ['boolean', BOOL],
809
+ }),
810
+ },
811
+ // The configured link types: `/pm/fields/10?fieldType=linkages` (UI linkages.component getDefaultFields).
812
+ linkTypes: {
813
+ name: 'linkTypes',
814
+ aliases: ['link type', 'link types', 'linkage type', 'linkage types', 'relationship types'],
815
+ description: 'Link types configured for the project (admin -> Fields layout -> Linkages). Each row has an ' +
816
+ '`inwardType` and an `outwardType` ({key, value}, e.g. "is blocked by" / "blocks"); a link row stores ' +
817
+ 'the key of one side as `linkTypeKey` and this row id as `linkId`.',
818
+ usedFor: 'Turn a linkTypeKey into its label, or list the link types an item can use.',
819
+ method: 'GET',
820
+ searchPath: '/pm/fields/10?fieldType=linkages&projectId={projectId}',
821
+ scope: 'none',
822
+ softDelete: 'deleted',
823
+ idField: 'id',
824
+ labelField: 'name',
825
+ defaultSelect: ['id', 'name', 'inwardType', 'outwardType'],
826
+ fields: fields({
827
+ id: ['string', STR],
828
+ name: ['string', STR],
829
+ key: ['string', STR],
830
+ inwardType: ['object', [], { label: 'Inward {key, value}' }],
831
+ outwardType: ['object', [], { label: 'Outward {key, value}' }],
832
+ deleted: ['boolean', BOOL],
833
+ }),
834
+ },
835
+ users: {
836
+ name: 'users',
837
+ aliases: ['user', 'people'],
838
+ description: 'Users visible to you (see visibility) — resolve names/emails to numeric ids for owner/createdBy filters.',
839
+ usedFor: 'Look up a person before filtering by ownerId/createdBy/updatedBy; list the members of a project with where:[{field:"projectIds",value:<projectId>}].',
840
+ visibility: 'Only the users who share at least one project with you. An admin sees every user in the account.',
841
+ searchPath: '/pm/users/search',
842
+ scope: 'none',
843
+ softDelete: 'deleted',
844
+ idField: 'id',
845
+ keyField: 'username',
846
+ labelField: 'name',
847
+ defaultSelect: ['id', 'name', 'username', 'email', 'active', 'status'],
848
+ fields: fields({
849
+ id: ['number', NUM],
850
+ name: ['string', STR],
851
+ username: ['string', STR],
852
+ email: ['string', STR],
853
+ active: ['boolean', BOOL],
854
+ status: ['string', STR],
855
+ userType: ['string', STR],
856
+ // Members of a project: { field:"projectIds", value:<projectId> }. Not a stored user field — the
857
+ // adapter resolves it from project_user_role (admin, or a member of that project, only).
858
+ projectIds: ['number', NUM, { label: 'Member of project' }],
859
+ createdAt: ['date', DATE],
860
+ deleted: ['boolean', BOOL],
861
+ }),
862
+ },
863
+ objects: {
864
+ name: 'objects',
865
+ aliases: ['object', 'locator', 'object repository'],
866
+ description: 'Object repository — named locators used by test steps.',
867
+ usedFor: 'List/read objects, find by module/technology/template, and resolve parameter references.',
868
+ searchPath: '/tm/object/search',
869
+ getPath: '/tm/object/{id}',
870
+ scope: 'project',
871
+ softDelete: 'deleted',
872
+ idField: 'id',
873
+ keyField: 'code',
874
+ labelField: 'disname',
875
+ defaultSelect: ['id', 'code', 'disname', 'description', 'moduleId', 'objecttemplateId', 'technology', 'parameterId'],
876
+ fields: fields({
877
+ id: ['number', NUM],
878
+ code: ['string', STR],
879
+ disname: ['string', STR, { label: 'Name' }],
880
+ description: ['string', STR],
881
+ moduleId: ['number', EQ, { label: 'Module' }],
882
+ objecttemplateId: ['number', EQ],
883
+ technology: ['string', STR],
884
+ parameterId: ['number', EQ],
885
+ createdBy: ['number', EQ],
886
+ updatedBy: ['number', EQ],
887
+ createdAt: ['date', DATE],
888
+ updatedAt: ['date', DATE],
889
+ deleted: ['boolean', BOOL],
890
+ projectId: ['number', EQ],
891
+ }),
892
+ relations: {
893
+ module: {
894
+ kind: 'through', to: 'modules', localField: 'moduleId', remoteField: 'id',
895
+ description: 'The module this object lives in.',
896
+ },
897
+ template: {
898
+ kind: 'through', to: 'objectTemplates', localField: 'objecttemplateId', remoteField: 'id',
899
+ description: 'The technology template for this object.',
900
+ },
901
+ parameter: {
902
+ kind: 'through', to: 'parameters', localField: 'parameterId', remoteField: 'id',
903
+ description: 'The parameter bound to this object (if any).',
904
+ },
905
+ },
906
+ },
907
+ objectTemplates: {
908
+ name: 'objectTemplates',
909
+ aliases: ['objecttemplate', 'templates'],
910
+ description: 'Technology templates (WEB/ANDROID/IOS/...) that define object shape.',
911
+ usedFor: 'Resolve an object technology/template before creating or filtering objects.',
912
+ searchPath: '/tm/objectTemplate/search',
913
+ scope: 'none',
914
+ softDelete: 'deleted',
915
+ idField: 'id',
916
+ keyField: 'code',
917
+ labelField: 'name',
918
+ defaultSelect: ['id', 'code', 'name', 'disname'],
919
+ fields: fields({
920
+ id: ['number', NUM],
921
+ code: ['string', STR],
922
+ name: ['string', STR],
923
+ disname: ['string', STR],
924
+ createdAt: ['date', DATE],
925
+ deleted: ['boolean', BOOL],
926
+ }),
927
+ relations: {
928
+ objects: {
929
+ kind: 'query', to: 'objects', localField: 'id', remoteField: 'objecttemplateId',
930
+ description: 'Objects using this template.',
931
+ },
932
+ },
933
+ },
934
+ parameters: {
935
+ name: 'parameters',
936
+ aliases: ['parameter', 'param', 'params'],
937
+ description: 'Test-data parameters. Values are bound per iteration in `testdata`.',
938
+ usedFor: 'List/read parameters, filter by module/type, and resolve parameter references.',
939
+ searchPath: '/tm/parameter/search',
940
+ scope: 'project',
941
+ softDelete: 'deleted',
942
+ idField: 'id',
943
+ keyField: 'code',
944
+ labelField: 'name',
945
+ defaultSelect: ['id', 'code', 'name', 'type', 'parameterType', 'moduleId', 'defaultValue'],
946
+ maxLimit: 1000,
947
+ fields: fields({
948
+ id: ['number', NUM],
949
+ code: ['string', STR],
950
+ name: ['string', STR],
951
+ type: ['string', STR],
952
+ parameterType: ['string', STR],
953
+ moduleId: ['number', EQ, { label: 'Module' }],
954
+ isEncrypted: ['boolean', BOOL],
955
+ protected: ['boolean', BOOL],
956
+ unique: ['boolean', BOOL],
957
+ createdBy: ['number', EQ],
958
+ createdAt: ['date', DATE],
959
+ deleted: ['boolean', BOOL],
960
+ projectId: ['number', EQ],
961
+ }),
962
+ relations: {
963
+ objects: {
964
+ kind: 'query', to: 'objects', localField: 'id', remoteField: 'parameterId',
965
+ description: 'Objects bound to this parameter.',
966
+ },
967
+ },
968
+ },
969
+ actions: {
970
+ name: 'actions',
971
+ aliases: ['action', 'catalog'],
972
+ description: 'Action catalog (click/type/API/...) referenced by test steps via id/uniqueId.',
973
+ usedFor: 'Resolve action ids/uniqueIds when inspecting steps.',
974
+ searchPath: '/tm/action/search',
975
+ scope: 'none',
976
+ softDelete: 'deleted',
977
+ idField: 'id',
978
+ keyField: 'uniqueId',
979
+ labelField: 'name',
980
+ defaultSelect: ['id', 'code', 'name', 'disname', 'uniqueId', 'type', 'groupName', 'objectRequired'],
981
+ maxLimit: 1000,
982
+ fields: fields({
983
+ id: ['number', NUM],
984
+ code: ['string', STR],
985
+ name: ['string', STR],
986
+ disname: ['string', STR],
987
+ uniqueId: ['string', STR],
988
+ type: ['string', STR],
989
+ groupName: ['string', STR],
990
+ objectRequired: ['boolean', BOOL],
991
+ deprecated: ['boolean', BOOL],
992
+ projectId: ['number', EQ],
993
+ deleted: ['boolean', BOOL],
994
+ }),
995
+ },
996
+ versions: {
997
+ name: 'versions',
998
+ aliases: ['version', 'tcfnversion'],
999
+ description: 'Version rows for test cases/functions (`parentType` TC/FN).',
1000
+ usedFor: 'List/read versions of a test case or function.',
1001
+ searchPath: '/tm/tcfnversion/search',
1002
+ scope: 'project',
1003
+ softDelete: 'deleted',
1004
+ idField: 'id',
1005
+ keyField: 'name',
1006
+ labelField: 'name',
1007
+ defaultSelect: ['id', 'name', 'parentType', 'parentId', 'executionType', 'reviewApproveStatus'],
1008
+ fields: fields({
1009
+ id: ['string', STR],
1010
+ name: ['string', STR],
1011
+ parentType: ['string', STR],
1012
+ parentId: ['number', EQ],
1013
+ executionType: ['string', STR],
1014
+ reviewApproveStatus: ['string', STR],
1015
+ createdBy: ['number', EQ],
1016
+ createdAt: ['date', DATE],
1017
+ updatedAt: ['date', DATE],
1018
+ deleted: ['boolean', BOOL],
1019
+ projectId: ['number', EQ],
1020
+ }),
1021
+ },
1022
+ testdata: {
1023
+ name: 'testdata',
1024
+ aliases: ['test data', 'iteration', 'iterations'],
1025
+ description: 'Test-data iteration rows for a test case version + environment; `data[]` maps paramId to value.',
1026
+ usedFor: 'Find the actual parameter values used by a run/version/iteration.',
1027
+ searchPath: '/tm/testdata/searchItr',
1028
+ scope: 'project',
1029
+ softDelete: 'deleted',
1030
+ idField: 'id',
1031
+ keyField: 'name',
1032
+ labelField: 'name',
1033
+ defaultSelect: ['id', 'name', 'testcaseId', 'versionId', 'type', 'environmentType', 'executionType', 'sequenceNo'],
1034
+ maxLimit: 1000,
1035
+ fields: fields({
1036
+ id: ['string', STR],
1037
+ name: ['string', STR],
1038
+ testcaseId: ['number', EQ, { label: 'Test Case' }],
1039
+ versionId: ['string', STR],
1040
+ type: ['string', STR],
1041
+ environmentType: ['string', STR],
1042
+ executionType: ['string', STR],
1043
+ sequenceNo: ['number', NUM],
1044
+ parentId: ['string', STR],
1045
+ createdBy: ['number', EQ],
1046
+ createdAt: ['date', DATE],
1047
+ deleted: ['boolean', BOOL],
1048
+ projectId: ['number', EQ],
1049
+ }),
1050
+ relations: {
1051
+ testcase: {
1052
+ kind: 'through', to: 'testcases', localField: 'testcaseId', remoteField: 'id',
1053
+ description: 'The test case this iteration belongs to.',
1054
+ },
1055
+ version: {
1056
+ kind: 'through', to: 'versions', localField: 'versionId', remoteField: 'id',
1057
+ description: 'The TC version this iteration belongs to.',
1058
+ },
1059
+ },
1060
+ },
1061
+ // Fields from test-management `validators/execution-plan.validation.js` (create/update schema);
1062
+ // codes are PL-<n> (`utils/sequenceUtil.js`). Not "ep" — that alias is epics.
1063
+ executionPlans: {
1064
+ name: 'executionPlans',
1065
+ aliases: ['executionplan', 'executionplans', 'execution plan', 'execution plans', 'plan', 'plans', 'pl'],
1066
+ description: 'Execution plans (PL-…): a planned set of test cases to run, tied to a release/sprint and an environment.',
1067
+ usedFor: 'List/count plans by release, sprint, environment or planner, and follow a plan to its runs.',
1068
+ searchPath: '/tm/executionplan/search',
1069
+ getPath: '/tm/executionplan/{id}',
1070
+ scope: 'project',
1071
+ softDelete: 'deleted',
1072
+ idField: 'id',
1073
+ keyField: 'code',
1074
+ labelField: 'name',
1075
+ defaultSelect: ['id', 'code', 'name', 'releaseId', 'iterationId', 'environmentType', 'plannedStartDate', 'plannedEndDate'],
1076
+ fields: fields({
1077
+ id: ['number', NUM],
1078
+ code: ['string', STR],
1079
+ name: ['string', STR],
1080
+ releaseId: ['number', EQ, { label: 'Release' }],
1081
+ iterationId: ['number', EQ, { label: 'Sprint' }],
1082
+ environmentType: ['string', STR, { label: 'Environment' }],
1083
+ teamIds: ['array', ARR, { label: 'Teams' }],
1084
+ planners: ['array', ARR, { label: 'Planners' }],
1085
+ reviewApproveStatus: ['string', STR],
1086
+ autoReExecCount: ['number', NUM],
1087
+ autoDefectLog: ['boolean', BOOL],
1088
+ terminateOnFailure: ['boolean', BOOL],
1089
+ newBrowserSession: ['boolean', BOOL],
1090
+ plannedStartDate: ['date', DATE],
1091
+ plannedEndDate: ['date', DATE],
1092
+ createdBy: ['number', EQ],
1093
+ updatedBy: ['number', EQ],
1094
+ createdAt: ['date', DATE],
1095
+ updatedAt: ['date', DATE],
1096
+ deleted: ['boolean', BOOL],
1097
+ projectId: ['number', EQ],
1098
+ }),
1099
+ relations: {
1100
+ executions: {
1101
+ kind: 'query', to: 'executions', localField: 'id', remoteField: 'executionTypeId',
1102
+ where: { type: 'EXECUTIONPLAN' },
1103
+ description: 'Runs of this plan (sort id desc for the latest). `type` is EXECUTIONPLAN on the wire.',
1104
+ },
1105
+ release: {
1106
+ kind: 'through', to: 'releases', localField: 'releaseId', remoteField: 'id',
1107
+ description: 'The release this plan belongs to (if any).',
1108
+ },
1109
+ sprint: {
1110
+ kind: 'through', to: 'sprints', localField: 'iterationId', remoteField: 'id',
1111
+ description: 'The sprint this plan belongs to (if any).',
1112
+ },
1113
+ entries: {
1114
+ kind: 'query', to: 'planEntries', localField: 'id', remoteField: 'execPlanId',
1115
+ description: 'The test cases planned in this plan (one row per test case entry).',
1116
+ },
1117
+ },
1118
+ },
1119
+ // The rows inside an execution plan — test-management `execplantestcases`
1120
+ // (fields: validators/exec-plan-testcases.validator.js). `code`/`tcName` are the test case's.
1121
+ planEntries: {
1122
+ name: 'planEntries',
1123
+ aliases: ['planentry', 'planentries', 'plan entry', 'plan entries', 'execplantestcases', 'execution plan entry', 'execution plan entries'],
1124
+ description: 'Test cases planned inside an execution plan, with the assignee, technology, source and latest result.',
1125
+ usedFor: 'Which test cases are in a plan, who they are assigned to, and how each is set to run.',
1126
+ searchPath: '/tm/execplantestcases/search',
1127
+ scope: 'project',
1128
+ softDelete: 'deleted',
1129
+ idField: 'id',
1130
+ keyField: 'code',
1131
+ labelField: 'tcName',
1132
+ defaultSelect: ['id', 'code', 'tcName', 'execPlanId', 'testcaseId', 'tcType', 'executionType', 'expAssignedTo', 'status', 'result'],
1133
+ fields: fields({
1134
+ id: ['string', EQ],
1135
+ code: ['string', STR, { label: 'Test case code' }],
1136
+ tcName: ['string', STR, { label: 'Test case name' }],
1137
+ tcDesc: ['string', STR],
1138
+ execPlanId: ['number', EQ, { label: 'Execution plan' }],
1139
+ testcaseId: ['number', EQ, { label: 'Test case' }],
1140
+ tcVersionId: ['string', EQ],
1141
+ stepId: ['string', EQ],
1142
+ tcType: TC_TYPE,
1143
+ executionType: EXECUTION_TYPE,
1144
+ expAssignedTo: ['number', EQ, { label: 'Assigned to' }],
1145
+ expAssignedDate: ['date', DATE],
1146
+ sourceType: ['string', CHOICE, { resolve: 'enum', enumValues: ['scenario', 'suite', 'testcase', 'module', 'userstory'] }],
1147
+ sourceId: ['number', EQ],
1148
+ moduleId: ['number', EQ, { label: 'Module' }],
1149
+ status: ['string', STR],
1150
+ result: ['string', STR],
1151
+ seq: ['number', NUM],
1152
+ executionId: ['number', EQ],
1153
+ createdBy: ['number', EQ],
1154
+ updatedBy: ['number', EQ],
1155
+ createdAt: ['date', DATE],
1156
+ updatedAt: ['date', DATE],
1157
+ deleted: ['boolean', BOOL],
1158
+ projectId: ['number', EQ],
1159
+ }),
1160
+ relations: {
1161
+ plan: { kind: 'through', to: 'executionPlans', localField: 'execPlanId', remoteField: 'id', description: 'The plan this entry belongs to.' },
1162
+ testcase: { kind: 'through', to: 'testcases', localField: 'testcaseId', remoteField: 'id', description: 'The planned test case.' },
1163
+ },
1164
+ },
1165
+ // pipelines service `pipelines` collection; codes from its sequence util.
1166
+ pipelines: {
1167
+ name: 'pipelines',
1168
+ aliases: ['pipeline', 'pipelines', 'pipline', 'piplines'],
1169
+ description: 'CI/CD pipelines that run a test case, suite or execution plan (pipelineType TC / SU / EP).',
1170
+ usedFor: 'List pipelines by type, mode, environment, release or sprint.',
1171
+ searchPath: '/pl/pipelines/search',
1172
+ scope: 'project',
1173
+ softDelete: 'deleted',
1174
+ idField: 'id',
1175
+ keyField: 'code',
1176
+ labelField: 'name',
1177
+ defaultSelect: ['id', 'code', 'name', 'pipelineType', 'executionMode', 'executionStyle', 'environment', 'status'],
1178
+ fields: fields({
1179
+ id: ['number', NUM],
1180
+ code: ['string', STR],
1181
+ name: ['string', STR],
1182
+ pipelineType: ['string', CHOICE, { resolve: 'enum', enumValues: ['TC', 'SU', 'EP'] }],
1183
+ executionMode: ['string', CHOICE, { resolve: 'enum', enumValues: ['cloud', 'local'] }],
1184
+ executionStyle: ['string', CHOICE, { resolve: 'enum', enumValues: ['serial', 'parallel'] }],
1185
+ mode: ['string', CHOICE, { resolve: 'enum', enumValues: ['VM', 'AZURE'] }],
1186
+ status: ['string', STR],
1187
+ 'platForm.name': ['string', STR, { label: 'Platform' }],
1188
+ environment: ['string', STR],
1189
+ releaseId: ['number', EQ, { label: 'Release' }],
1190
+ iterationId: ['number', EQ, { label: 'Sprint' }],
1191
+ createdBy: ['number', EQ],
1192
+ updatedBy: ['number', EQ],
1193
+ createdAt: ['date', DATE],
1194
+ updatedAt: ['date', DATE],
1195
+ deleted: ['boolean', BOOL],
1196
+ projectId: ['number', EQ],
1197
+ }),
1198
+ },
1199
+ // test-management `runtime_parameters`: one row per key (validators: key, value, projectId).
1200
+ runtimeParameters: {
1201
+ name: 'runtimeParameters',
1202
+ aliases: ['runtimeparameter', 'runtimeparameters', 'runtime parameter', 'runtime parameters', 'runtime param', 'runtime params'],
1203
+ description: 'Project runtime parameters — key/value pairs available to every run.',
1204
+ usedFor: 'Look up a runtime parameter by key, or list them.',
1205
+ searchPath: '/tm/runtime_parameters/search',
1206
+ scope: 'project',
1207
+ softDelete: 'deleted',
1208
+ idField: 'id',
1209
+ keyField: 'key',
1210
+ labelField: 'key',
1211
+ defaultSelect: ['id', 'key', 'value'],
1212
+ fields: fields({
1213
+ id: ['string', EQ],
1214
+ key: ['string', STR],
1215
+ value: ['string', STR],
1216
+ createdBy: ['number', EQ],
1217
+ updatedBy: ['number', EQ],
1218
+ createdAt: ['date', DATE],
1219
+ updatedAt: ['date', DATE],
1220
+ deleted: ['boolean', BOOL],
1221
+ projectId: ['number', EQ],
1222
+ }),
1223
+ },
1224
+ // scheduler service `scheduler` (validators/schedulerValidation.js).
1225
+ schedules: {
1226
+ name: 'schedules',
1227
+ aliases: ['schedule', 'schedules', 'scheduler', 'schedulers'],
1228
+ description: 'Scheduled runs of a test case, suite or plan (schedulerType TC / SU / EP) with recurrence and last result.',
1229
+ usedFor: 'Which schedules exist, when they run next, and how their last run went.',
1230
+ searchPath: '/sh/scheduler/search',
1231
+ scope: 'project',
1232
+ softDelete: 'deleted',
1233
+ idField: 'id',
1234
+ keyField: 'code',
1235
+ labelField: 'name',
1236
+ defaultSelect: ['id', 'code', 'name', 'schedulerType', 'recurrenceType', 'status', 'nextRecurrenceTime', 'lastExecutionTime', 'lastExecutionStatus', 'createdBy'],
1237
+ fields: fields({
1238
+ id: ['number', NUM],
1239
+ code: ['string', STR],
1240
+ name: ['string', STR],
1241
+ schedulerType: ['string', CHOICE, { resolve: 'enum', enumValues: ['TC', 'SU', 'EP'] }],
1242
+ recurrenceType: ['string', CHOICE, { resolve: 'enum', enumValues: ['ONCE', 'HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY', 'EVERY_5_MINUTES'] }],
1243
+ status: ['string', CHOICE, { resolve: 'enum', enumValues: ['NOT STARTED', 'AWAITING NEXT RUN', 'QUEUED', 'COMPLETED', 'CANCELLED'] }],
1244
+ lastExecutionStatus: ['string', CHOICE, { resolve: 'enum', enumValues: ['PASSED', 'FAILED'] }],
1245
+ lastExecutionId: ['number', EQ],
1246
+ lastFailureReason: ['string', STR],
1247
+ executionMode: ['string', CHOICE, { resolve: 'enum', enumValues: ['local', 'cloud'] }],
1248
+ executionStyle: ['string', CHOICE, { resolve: 'enum', enumValues: ['serial', 'parallel'] }],
1249
+ mode: ['string', CHOICE, { resolve: 'enum', enumValues: ['VM', 'AZURE'] }],
1250
+ 'platForm.technologyType': ['string', STR, { label: 'Technology' }],
1251
+ 'platForm.name': ['string', STR, { label: 'Platform' }],
1252
+ environment: ['string', STR],
1253
+ releaseId: ['number', EQ, { label: 'Release' }],
1254
+ iterationId: ['number', EQ, { label: 'Sprint' }],
1255
+ parentCode: ['string', STR, { label: 'Scheduled item code' }],
1256
+ parentName: ['string', STR, { label: 'Scheduled item name' }],
1257
+ cancelled: ['boolean', BOOL],
1258
+ 'retryConfig.retryEnabled': ['boolean', BOOL],
1259
+ nextRecurrenceTime: ['date', DATE],
1260
+ lastExecutionTime: ['date', DATE],
1261
+ scheduleStartDate: ['date', DATE],
1262
+ scheduleEndDate: ['date', DATE],
1263
+ createdBy: ['number', EQ],
1264
+ updatedBy: ['number', EQ],
1265
+ createdAt: ['date', DATE],
1266
+ updatedAt: ['date', DATE],
1267
+ deleted: ['boolean', BOOL],
1268
+ projectId: ['number', EQ],
1269
+ }),
1270
+ relations: {
1271
+ history: {
1272
+ kind: 'query', to: 'scheduleHistory', localField: 'id', remoteField: 'id',
1273
+ description: 'Audit history of this schedule (created, triggered, completed, failed …).',
1274
+ },
1275
+ },
1276
+ },
1277
+ // scheduler `scheduler_history`: each row is a SNAPSHOT of the schedule (same `id`) plus the event
1278
+ // in `_audit` (queue/schedulerQueue.js createAuditEntry).
1279
+ scheduleHistory: {
1280
+ name: 'scheduleHistory',
1281
+ aliases: ['schedulehistory', 'schedule history', 'scheduler history', 'schedule runs'],
1282
+ description: 'History of SCHEDULER runs only: one row per schedule event (a snapshot of the schedule + `_audit`). ' +
1283
+ 'NOT the application activity / audit log (who did what, logins, user changes) — that is not available here; ' +
1284
+ 'never use this collection to answer an activity-log question.',
1285
+ usedFor: 'When a schedule last triggered, failed or completed, and why.',
1286
+ searchPath: '/sh/scheduler_history/search',
1287
+ scope: 'project',
1288
+ softDelete: 'deleted',
1289
+ idField: 'id',
1290
+ keyField: 'code',
1291
+ labelField: 'name',
1292
+ defaultSelect: ['id', 'code', 'name', 'status', 'lastFailureReason', '_audit'],
1293
+ fields: fields({
1294
+ id: ['number', EQ, { label: 'Schedule id' }],
1295
+ code: ['string', STR],
1296
+ name: ['string', STR],
1297
+ status: ['string', STR],
1298
+ lastFailureReason: ['string', STR],
1299
+ '_audit.event': ['string', STR, { label: 'Event' }],
1300
+ '_audit.source': ['string', STR],
1301
+ '_audit.reason': ['string', STR],
1302
+ '_audit.timestamp': ['date', DATE, { label: 'When' }],
1303
+ '_audit.recurrenceTime': ['date', DATE],
1304
+ projectId: ['number', EQ],
1305
+ }),
1306
+ },
1307
+ // test-management `scenarioFolder` (validators/scenario*.js); codes TP-<n>.
1308
+ testPlans: {
1309
+ name: 'testPlans',
1310
+ aliases: ['testplan', 'testplans', 'test plan', 'test plans', 'scenario', 'scenarios', 'scenario folder'],
1311
+ description: 'Test plans (TP-…): a folder tree of suites and test cases.',
1312
+ usedFor: 'List test plans, walk the folder tree, and see which suites / test cases a plan holds.',
1313
+ searchPath: '/tm/scenario/search',
1314
+ getPath: '/tm/scenario/{id}',
1315
+ scope: 'project',
1316
+ softDelete: 'deleted',
1317
+ idField: 'id',
1318
+ keyField: 'code',
1319
+ labelField: 'name',
1320
+ defaultSelect: ['id', 'code', 'name', 'isRoot', 'parentId', 'childIds', 'suiteIds', 'createdBy', 'updatedAt'],
1321
+ // A test plan is a TOP-LEVEL folder: counting every folder said 26 plans where the project has
1322
+ // 16 (ai-assistant list_test_plans). Asking about specific folders, sub-folders or membership
1323
+ // ("which test plan holds TC-X") sees every folder.
1324
+ defaultFilter: {
1325
+ where: { isRoot: true },
1326
+ unless: ['isRoot', 'id', 'code', 'parentId', 'parentIds', 'childIds', 'leafNode', 'suiteIds', 'testcaseIds.id'],
1327
+ },
1328
+ folderTree: true,
1329
+ fields: fields({
1330
+ id: ['number', NUM],
1331
+ code: ['string', STR],
1332
+ name: ['string', STR],
1333
+ isRoot: ['boolean', BOOL],
1334
+ leafNode: ['boolean', BOOL],
1335
+ parentId: ['number', EQ, { label: 'Parent folder' }],
1336
+ parentIds: ['array', ARR],
1337
+ childIds: ['array', ARR],
1338
+ suiteIds: ['array', ARR, { label: 'Suites' }],
1339
+ 'testcaseIds.id': ['array', ARR, { label: 'Test cases' }],
1340
+ createdBy: ['number', EQ],
1341
+ updatedBy: ['number', EQ],
1342
+ createdAt: ['date', DATE],
1343
+ updatedAt: ['date', DATE],
1344
+ deleted: ['boolean', BOOL],
1345
+ projectId: ['number', EQ],
1346
+ }),
1347
+ relations: {
1348
+ children: {
1349
+ kind: 'through', to: 'testPlans', localField: 'id', remoteField: 'id', tree: 'children',
1350
+ description: 'Direct sub-folders (read from both childIds and parentId).',
1351
+ },
1352
+ suites: { kind: 'through', to: 'suites', localField: 'suiteIds', remoteField: 'id', description: 'Suites filed directly in this folder.' },
1353
+ testcases: { kind: 'through', to: 'testcases', localField: 'testcaseIds[].id', remoteField: 'id', description: 'Test cases filed directly in this folder.' },
1354
+ allSuites: {
1355
+ kind: 'through', to: 'suites', localField: 'suiteIds', remoteField: 'id', tree: 'subtree',
1356
+ description: 'Suites in this folder AND every sub-folder below it (what the plan holds).',
1357
+ },
1358
+ allTestcases: {
1359
+ kind: 'through', to: 'testcases', localField: 'testcaseIds[].id', remoteField: 'id', tree: 'subtree',
1360
+ description: 'Test cases in this folder AND every sub-folder below it (what the plan holds).',
1361
+ },
1362
+ },
1363
+ },
1364
+ // project-management `tags`: one row PER TAGGING — one label name is many rows (ids), so a
1365
+ // label is matched by name, never by a single id. Fields: validators/label*.js.
1366
+ tags: {
1367
+ name: 'tags',
1368
+ aliases: ['tag', 'label', 'labels'],
1369
+ description: 'Labels (tags). One label is stored as many rows — one per tagging — sharing its name.',
1370
+ usedFor: 'List the labels in use; work items reference them by id in `tags`.',
1371
+ searchPath: '/pm/tags/search',
1372
+ getPath: '/pm/tags/{id}',
1373
+ scope: 'project',
1374
+ softDelete: 'deleted',
1375
+ idField: 'id',
1376
+ labelField: 'name',
1377
+ defaultSelect: ['id', 'name', 'color'],
1378
+ fields: fields({
1379
+ id: ['number', NUM],
1380
+ name: ['string', STR],
1381
+ color: ['string', STR],
1382
+ createdBy: ['number', EQ],
1383
+ createdAt: ['date', DATE],
1384
+ deleted: ['boolean', BOOL],
1385
+ projectId: ['number', EQ],
1386
+ }),
1387
+ },
1388
+ // project-management `team`: customer-wide (no project field); codes TM-<n>. Fields: validators/team*.js.
1389
+ teams: {
1390
+ name: 'teams',
1391
+ aliases: ['team'],
1392
+ description: 'Teams (TM-…): named groups of users, customer-wide. Work items and plans reference them in `teamIds`.',
1393
+ usedFor: 'Who is in a team, and resolving a team name for a `teamIds` filter.',
1394
+ searchPath: '/pm/team/search',
1395
+ scope: 'none',
1396
+ softDelete: 'deleted',
1397
+ idField: 'id',
1398
+ keyField: 'code',
1399
+ labelField: 'name',
1400
+ defaultSelect: ['id', 'code', 'name', 'users', 'description'],
1401
+ fields: fields({
1402
+ id: ['number', NUM],
1403
+ code: ['string', STR],
1404
+ name: ['string', STR],
1405
+ users: ['array', ARR, { label: 'Members' }],
1406
+ description: ['string', STR],
1407
+ jiraTeamId: ['string', STR],
1408
+ createdBy: ['number', EQ],
1409
+ createdAt: ['date', DATE],
1410
+ deleted: ['boolean', BOOL],
1411
+ }),
1412
+ },
1413
+ groups: {
1414
+ name: 'groups',
1415
+ aliases: ['group', 'email group', 'email groups'],
1416
+ description: 'Email recipient groups, per project: SimplifyQA users plus outside contacts (non-users).',
1417
+ usedFor: 'Who is in an email group used by the share / email dialog on work items and test assets.',
1418
+ searchPath: '/pm/group/search',
1419
+ scope: 'project',
1420
+ softDelete: 'deleted',
1421
+ idField: 'id',
1422
+ labelField: 'name',
1423
+ defaultSelect: ['id', 'name', 'users', 'nonUsers'],
1424
+ fields: fields({
1425
+ id: ['number', NUM],
1426
+ name: ['string', STR],
1427
+ users: ['array', ARR, { label: 'Members' }],
1428
+ nonUsers: ['array', ARR, { label: 'Outside contacts' }],
1429
+ createdBy: ['number', EQ],
1430
+ createdAt: ['date', DATE],
1431
+ deleted: ['boolean', BOOL],
1432
+ }),
1433
+ relations: {
1434
+ members: {
1435
+ kind: 'through', to: 'users', localField: 'users',
1436
+ description: 'The SimplifyQA users in this group.',
1437
+ },
1438
+ },
1439
+ },
1440
+ businessUnits: {
1441
+ name: 'businessUnits',
1442
+ aliases: ['businessUnit', 'business unit', 'business units', 'bu'],
1443
+ description: 'Business units of the tenant (customer-wide). Projects belong to one via `businessUnitId`. ' +
1444
+ 'A plain list also shows "Default Business Unit" (id null) when some of YOUR projects have none, as the ' +
1445
+ 'header does; its projects: op:"related", id:"default", relation:"projects".',
1446
+ usedFor: 'List business units and the projects in each.',
1447
+ searchPath: '/pm/business_unit/search',
1448
+ scope: 'none',
1449
+ softDelete: 'deleted',
1450
+ idField: 'id',
1451
+ labelField: 'name',
1452
+ defaultSelect: ['id', 'name', 'description'],
1453
+ fields: fields({
1454
+ id: ['number', NUM],
1455
+ name: ['string', STR],
1456
+ description: ['string', STR],
1457
+ createdBy: ['number', EQ],
1458
+ createdAt: ['date', DATE],
1459
+ deleted: ['boolean', BOOL],
1460
+ }),
1461
+ relations: {
1462
+ projects: {
1463
+ kind: 'query', to: 'projects', localField: 'id', remoteField: 'businessUnitId',
1464
+ description: 'Projects in this business unit.',
1465
+ },
1466
+ },
1467
+ },
1468
+ executions: {
1469
+ name: 'executions',
1470
+ aliases: ['execution', 'run', 'runs'],
1471
+ description: 'Run headers for suites/test cases, with status/result and embedded execution items.',
1472
+ usedFor: 'Find the latest run, inspect status/results, and follow a run to its step results.',
1473
+ searchPath: '/exec/execution/search',
1474
+ scope: 'project',
1475
+ softDelete: 'deleted',
1476
+ idField: 'id',
1477
+ keyField: 'code',
1478
+ labelField: 'code',
1479
+ defaultSelect: ['id', 'code', 'type', 'executionTypeId', 'status', 'result', 'executionCategory', 'mode', 'environmentType', 'iterationId', 'releaseId', 'childExecution', 'parentExecutionId', 'startTime', 'endTime'],
1480
+ fields: fields({
1481
+ id: ['number', NUM],
1482
+ code: ['string', STR],
1483
+ // Live values: TESTCASE | SUITE | EXECUTIONPLAN | WORKFLOWBUILDER (not "TC").
1484
+ type: ['string', STR, { label: 'Type (TESTCASE | SUITE | EXECUTIONPLAN | WORKFLOWBUILDER)' }],
1485
+ executionTypeId: ['number', EQ],
1486
+ status: ['string', STR],
1487
+ result: ['string', STR],
1488
+ executionCategory: ['string', STR],
1489
+ mode: ['string', STR],
1490
+ environmentType: ['string', STR],
1491
+ iterationId: ['number', EQ],
1492
+ releaseId: ['number', EQ],
1493
+ agentId: ['number', EQ],
1494
+ childExecution: ['boolean', BOOL],
1495
+ parentExecutionId: ['number', EQ],
1496
+ executionType: ['string', STR],
1497
+ startTime: ['date', DATE],
1498
+ endTime: ['date', DATE],
1499
+ createdBy: ['number', EQ],
1500
+ createdAt: ['date', DATE],
1501
+ deleted: ['boolean', BOOL],
1502
+ projectId: ['number', EQ],
1503
+ }),
1504
+ relations: {
1505
+ steps: {
1506
+ kind: 'subresource', localField: 'id',
1507
+ subresourcePath: '/reports/execution/getstepResult',
1508
+ description: 'Per-step results for this run (executionId/executionRunId/parentId).',
1509
+ },
1510
+ },
1511
+ },
1512
+ machineResources: {
1513
+ name: 'machineResources',
1514
+ aliases: ['cloud runners', 'runners', 'cloud'],
1515
+ description: 'Cloud runner machines available for execution.',
1516
+ usedFor: 'Pick a cloud runner for a run.',
1517
+ searchPath: '/pm/machineResources/search',
1518
+ scope: 'project',
1519
+ softDelete: 'deleted',
1520
+ idField: 'id',
1521
+ keyField: 'id',
1522
+ labelField: 'displayName',
1523
+ defaultSelect: ['id', 'displayName', 'name', 'status', 'type', 'parentId'],
1524
+ fields: fields({
1525
+ id: ['number', NUM],
1526
+ displayName: ['string', STR],
1527
+ name: ['string', STR],
1528
+ status: ['string', STR],
1529
+ type: ['string', STR],
1530
+ parentId: ['number', EQ],
1531
+ projectId: ['number', EQ],
1532
+ }),
1533
+ },
1534
+ machineRegistration: {
1535
+ name: 'machineRegistration',
1536
+ aliases: ['local agents', 'agents', 'machines'],
1537
+ description: 'Registered local agents (machines) that can execute runs.',
1538
+ usedFor: 'Pick a local/remote agent for a run.',
1539
+ searchPath: '/tm/machineRegistration/search',
1540
+ scope: 'none',
1541
+ softDelete: 'deleted',
1542
+ idField: 'id',
1543
+ keyField: 'machineName',
1544
+ labelField: 'machineName',
1545
+ defaultSelect: ['id', 'machineName', 'systemName', 'platform', 'ipAddress', 'macAddress', 'active'],
1546
+ fields: fields({
1547
+ // Live ids are 32-char hex strings, not numbers.
1548
+ id: ['string', STR],
1549
+ machineName: ['string', STR],
1550
+ systemName: ['string', STR],
1551
+ platform: ['string', STR],
1552
+ ipAddress: ['string', STR],
1553
+ macAddress: ['string', STR],
1554
+ active: ['boolean', BOOL],
1555
+ deleted: ['boolean', BOOL],
1556
+ }),
1557
+ },
1558
+ mobileDevices: {
1559
+ name: 'mobileDevices',
1560
+ aliases: ['devices', 'mobile', 'emulators'],
1561
+ description: 'Real devices, emulators and simulators registered for mobile execution.',
1562
+ usedFor: 'Pick a device for an ANDROID/IOS run.',
1563
+ searchPath: '/tm/mobileDevices/search',
1564
+ scope: 'project',
1565
+ softDelete: 'deleted',
1566
+ idField: 'id',
1567
+ keyField: 'deviceId',
1568
+ labelField: 'deviceName',
1569
+ defaultSelect: ['id', 'deviceId', 'deviceName', 'deviceType', 'osVersion', 'technologyType', 'agentId', 'active'],
1570
+ fields: fields({
1571
+ // Live ids are UUIDs, not numbers.
1572
+ id: ['string', STR],
1573
+ deviceId: ['string', STR],
1574
+ deviceName: ['string', STR],
1575
+ deviceType: ['string', STR],
1576
+ osVersion: ['string', STR],
1577
+ technologyType: ['string', STR],
1578
+ agentId: ['number', EQ],
1579
+ active: ['boolean', BOOL],
1580
+ createdAt: ['date', DATE],
1581
+ deleted: ['boolean', BOOL],
1582
+ projectId: ['number', EQ],
1583
+ }),
1584
+ },
1585
+ environments: {
1586
+ name: 'environments',
1587
+ aliases: ['environment', 'env', 'envs'],
1588
+ description: 'Environment keys used by test data (`general` is the default).',
1589
+ usedFor: 'Pick an environment when reading/writing test data.',
1590
+ method: 'GET',
1591
+ searchPath: '/pm/fields/8?fieldType=environment&projectId={projectId}',
1592
+ scope: 'none',
1593
+ softDelete: 'deleted',
1594
+ idField: 'id',
1595
+ keyField: 'key',
1596
+ labelField: 'name',
1597
+ defaultSelect: ['id', 'key', 'name'],
1598
+ fields: fields({
1599
+ id: ['string', STR],
1600
+ key: ['string', STR],
1601
+ name: ['string', STR],
1602
+ deleted: ['boolean', BOOL],
1603
+ }),
1604
+ },
1605
+ };
1606
+ // ---------------------------------------------------------------------------
1607
+ // Reference fields — which stored ids can be named by name, code or "me" (resolve:'ref').
1608
+ // Same field name means the same target on every collection listed, so it is declared once.
1609
+ // ---------------------------------------------------------------------------
1610
+ const REF_FIELDS = {
1611
+ createdBy: 'users',
1612
+ updatedBy: 'users',
1613
+ ownerId: 'users',
1614
+ moduleId: 'modules',
1615
+ releaseId: 'releases',
1616
+ iterationId: 'sprints',
1617
+ tags: 'tags',
1618
+ userstoryId: 'stories',
1619
+ epicId: 'epics',
1620
+ featureId: 'features',
1621
+ defectId: 'defects',
1622
+ 'selectedTestCase.testcaseId': 'testcases',
1623
+ 'testCases.testcaseId': 'testcases',
1624
+ planners: 'users',
1625
+ expAssignedTo: 'users',
1626
+ users: 'users',
1627
+ teamIds: 'teams', // execution plans
1628
+ teamId: 'teams', // stories / epics / features (an array, despite the name)
1629
+ execPlanId: 'executionPlans',
1630
+ testcaseId: 'testcases',
1631
+ suiteIds: 'suites',
1632
+ 'testcaseIds.id': 'testcases',
1633
+ };
1634
+ const REF_COLLECTIONS = [
1635
+ 'testcases', 'functions', 'suites', 'stories', 'epics', 'features', 'defects', 'tasks', 'executionPlans',
1636
+ 'planEntries', 'pipelines', 'schedules', 'testPlans', 'teams',
1637
+ ];
1638
+ for (const name of REF_COLLECTIONS) {
1639
+ for (const f of Object.values(SQA_COLLECTIONS[name].fields)) {
1640
+ const refTo = REF_FIELDS[f.key];
1641
+ if (refTo)
1642
+ Object.assign(f, { resolve: 'ref', refTo });
1643
+ }
1644
+ }
1645
+ // ---------------------------------------------------------------------------
1646
+ // Lookup helpers.
1647
+ // ---------------------------------------------------------------------------
1648
+ const ALIAS_INDEX = (() => {
1649
+ const out = {};
1650
+ for (const c of Object.values(SQA_COLLECTIONS)) {
1651
+ out[c.name.toLowerCase()] = c.name;
1652
+ for (const a of c.aliases)
1653
+ out[a.toLowerCase()] = c.name;
1654
+ }
1655
+ return out;
1656
+ })();
1657
+ export function resolveCollection(name) {
1658
+ const canonical = ALIAS_INDEX[name.trim().toLowerCase()];
1659
+ return canonical ? SQA_COLLECTIONS[canonical] : undefined;
1660
+ }
1661
+ export function collectionNames() {
1662
+ return Object.keys(SQA_COLLECTIONS);
1663
+ }
1664
+ //# sourceMappingURL=searchRegistry.js.map