@things-factory/worklist 10.1.248 → 10.1.249

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 (696) hide show
  1. package/dist-client/activity-cells.d.ts +21 -0
  2. package/dist-client/activity-cells.js +117 -0
  3. package/dist-client/activity-cells.js.map +1 -0
  4. package/dist-client/activity-state-counts.d.ts +6 -0
  5. package/dist-client/activity-state-counts.js +23 -0
  6. package/dist-client/activity-state-counts.js.map +1 -0
  7. package/dist-client/activity-summary-generator.d.ts +2 -0
  8. package/dist-client/activity-summary-generator.js +155 -0
  9. package/dist-client/activity-summary-generator.js.map +1 -0
  10. package/dist-client/approval-progress.d.ts +18 -0
  11. package/dist-client/approval-progress.js +31 -0
  12. package/dist-client/approval-progress.js.map +1 -0
  13. package/dist-client/bootstrap.d.ts +5 -0
  14. package/dist-client/bootstrap.js +63 -0
  15. package/dist-client/bootstrap.js.map +1 -0
  16. package/dist-client/chip-counts.d.ts +7 -0
  17. package/dist-client/chip-counts.js +11 -0
  18. package/dist-client/chip-counts.js.map +1 -0
  19. package/dist-client/chip-filters.d.ts +60 -0
  20. package/dist-client/chip-filters.js +102 -0
  21. package/dist-client/chip-filters.js.map +1 -0
  22. package/dist-client/components/activity-/bowner-view.d.ts +1 -0
  23. package/dist-client/components/activity-/bowner-view.js +104 -0
  24. package/dist-client/components/activity-/bowner-view.js.map +1 -0
  25. package/dist-client/components/activity-approval-ribon.d.ts +31 -0
  26. package/dist-client/components/activity-approval-ribon.js +103 -0
  27. package/dist-client/components/activity-approval-ribon.js.map +1 -0
  28. package/dist-client/components/activity-fields.d.ts +77 -0
  29. package/dist-client/components/activity-fields.js +424 -0
  30. package/dist-client/components/activity-fields.js.map +1 -0
  31. package/dist-client/components/activity-instance-preview.d.ts +2 -0
  32. package/dist-client/components/activity-instance-preview.js +177 -0
  33. package/dist-client/components/activity-instance-preview.js.map +1 -0
  34. package/dist-client/components/activity-instance-ribon.d.ts +32 -0
  35. package/dist-client/components/activity-instance-ribon.js +91 -0
  36. package/dist-client/components/activity-instance-ribon.js.map +1 -0
  37. package/dist-client/components/activity-intro-view.d.ts +1 -0
  38. package/dist-client/components/activity-intro-view.js +104 -0
  39. package/dist-client/components/activity-intro-view.js.map +1 -0
  40. package/dist-client/components/activity-reporter-view.d.ts +1 -0
  41. package/dist-client/components/activity-reporter-view.js +103 -0
  42. package/dist-client/components/activity-reporter-view.js.map +1 -0
  43. package/dist-client/components/activity-starter-form.d.ts +19 -0
  44. package/dist-client/components/activity-starter-form.js +264 -0
  45. package/dist-client/components/activity-starter-form.js.map +1 -0
  46. package/dist-client/components/activity-thread-ribon.d.ts +38 -0
  47. package/dist-client/components/activity-thread-ribon.js +95 -0
  48. package/dist-client/components/activity-thread-ribon.js.map +1 -0
  49. package/dist-client/components/activity-thread-timeline.d.ts +28 -0
  50. package/dist-client/components/activity-thread-timeline.js +339 -0
  51. package/dist-client/components/activity-thread-timeline.js.map +1 -0
  52. package/dist-client/components/can-pick.d.ts +15 -0
  53. package/dist-client/components/can-pick.js +16 -0
  54. package/dist-client/components/can-pick.js.map +1 -0
  55. package/dist-client/components/decision-content.d.ts +35 -0
  56. package/dist-client/components/decision-content.js +331 -0
  57. package/dist-client/components/decision-content.js.map +1 -0
  58. package/dist-client/components/decision-slots.d.ts +153 -0
  59. package/dist-client/components/decision-slots.js +152 -0
  60. package/dist-client/components/decision-slots.js.map +1 -0
  61. package/dist-client/components/mutation-outcome.d.ts +57 -0
  62. package/dist-client/components/mutation-outcome.js +78 -0
  63. package/dist-client/components/mutation-outcome.js.map +1 -0
  64. package/dist-client/components/say-outcome.d.ts +25 -0
  65. package/dist-client/components/say-outcome.js +51 -0
  66. package/dist-client/components/say-outcome.js.map +1 -0
  67. package/dist-client/components/state-ribon.d.ts +48 -0
  68. package/dist-client/components/state-ribon.js +225 -0
  69. package/dist-client/components/state-ribon.js.map +1 -0
  70. package/dist-client/components/timeline-entries.d.ts +38 -0
  71. package/dist-client/components/timeline-entries.js +62 -0
  72. package/dist-client/components/timeline-entries.js.map +1 -0
  73. package/dist-client/components/work-box-groups.d.ts +25 -0
  74. package/dist-client/components/work-box-groups.js +98 -0
  75. package/dist-client/components/work-box-groups.js.map +1 -0
  76. package/dist-client/due.d.ts +16 -0
  77. package/dist-client/due.js +78 -0
  78. package/dist-client/due.js.map +1 -0
  79. package/dist-client/entity360/person-open-work-section.d.ts +23 -0
  80. package/dist-client/entity360/person-open-work-section.js +79 -0
  81. package/dist-client/entity360/person-open-work-section.js.map +1 -0
  82. package/dist-client/grist-editor/grist-editor-activity-search-key.d.ts +12 -0
  83. package/dist-client/grist-editor/grist-editor-activity-search-key.js +70 -0
  84. package/dist-client/grist-editor/grist-editor-activity-search-key.js.map +1 -0
  85. package/dist-client/grist-editor/grist-renderer-activity-search-key.d.ts +3 -0
  86. package/dist-client/grist-editor/grist-renderer-activity-search-key.js +25 -0
  87. package/dist-client/grist-editor/grist-renderer-activity-search-key.js.map +1 -0
  88. package/dist-client/grist-editor/popup-activity-search-keys-input.d.ts +17 -0
  89. package/dist-client/grist-editor/popup-activity-search-keys-input.js +175 -0
  90. package/dist-client/grist-editor/popup-activity-search-keys-input.js.map +1 -0
  91. package/dist-client/index.d.ts +6 -0
  92. package/dist-client/index.js +7 -0
  93. package/dist-client/index.js.map +1 -0
  94. package/dist-client/my-work-menus.d.ts +90 -0
  95. package/dist-client/my-work-menus.js +20 -0
  96. package/dist-client/my-work-menus.js.map +1 -0
  97. package/dist-client/pages/activity/activity-list-page.d.ts +53 -0
  98. package/dist-client/pages/activity/activity-list-page.js +600 -0
  99. package/dist-client/pages/activity/activity-list-page.js.map +1 -0
  100. package/dist-client/pages/activity/activity-model-item-list.d.ts +24 -0
  101. package/dist-client/pages/activity/activity-model-item-list.js +292 -0
  102. package/dist-client/pages/activity/activity-model-item-list.js.map +1 -0
  103. package/dist-client/pages/activity/activity-page.d.ts +56 -0
  104. package/dist-client/pages/activity/activity-page.js +396 -0
  105. package/dist-client/pages/activity/activity-page.js.map +1 -0
  106. package/dist-client/pages/activity/activity-partial-view.d.ts +13 -0
  107. package/dist-client/pages/activity/activity-partial-view.js +56 -0
  108. package/dist-client/pages/activity/activity-partial-view.js.map +1 -0
  109. package/dist-client/pages/activity/assignee-roles-cell.d.ts +32 -0
  110. package/dist-client/pages/activity/assignee-roles-cell.js +26 -0
  111. package/dist-client/pages/activity/assignee-roles-cell.js.map +1 -0
  112. package/dist-client/pages/activity/starter-list-page.d.ts +31 -0
  113. package/dist-client/pages/activity/starter-list-page.js +172 -0
  114. package/dist-client/pages/activity/starter-list-page.js.map +1 -0
  115. package/dist-client/pages/activity-approval/activity-approval-importer.d.ts +23 -0
  116. package/dist-client/pages/activity-approval/activity-approval-importer.js +94 -0
  117. package/dist-client/pages/activity-approval/activity-approval-importer.js.map +1 -0
  118. package/dist-client/pages/activity-approval/activity-approval-list-page.d.ts +55 -0
  119. package/dist-client/pages/activity-approval/activity-approval-list-page.js +253 -0
  120. package/dist-client/pages/activity-approval/activity-approval-list-page.js.map +1 -0
  121. package/dist-client/pages/activity-approval/activity-approval-page.d.ts +158 -0
  122. package/dist-client/pages/activity-approval/activity-approval-page.js +875 -0
  123. package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -0
  124. package/dist-client/pages/activity-approval/approval-gate.d.ts +29 -0
  125. package/dist-client/pages/activity-approval/approval-gate.js +21 -0
  126. package/dist-client/pages/activity-approval/approval-gate.js.map +1 -0
  127. package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +31 -0
  128. package/dist-client/pages/activity-catalog/activity-catalog-page.js +420 -0
  129. package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -0
  130. package/dist-client/pages/activity-catalog/activity-detail-actions.d.ts +34 -0
  131. package/dist-client/pages/activity-catalog/activity-detail-actions.js +18 -0
  132. package/dist-client/pages/activity-catalog/activity-detail-actions.js.map +1 -0
  133. package/dist-client/pages/activity-catalog/activity-detail-page.d.ts +90 -0
  134. package/dist-client/pages/activity-catalog/activity-detail-page.js +525 -0
  135. package/dist-client/pages/activity-catalog/activity-detail-page.js.map +1 -0
  136. package/dist-client/pages/activity-catalog/activity-guide.d.ts +16 -0
  137. package/dist-client/pages/activity-catalog/activity-guide.js +5 -0
  138. package/dist-client/pages/activity-catalog/activity-guide.js.map +1 -0
  139. package/dist-client/pages/activity-catalog/activity-panels.d.ts +80 -0
  140. package/dist-client/pages/activity-catalog/activity-panels.js +53 -0
  141. package/dist-client/pages/activity-catalog/activity-panels.js.map +1 -0
  142. package/dist-client/pages/activity-catalog/activity-stage.d.ts +31 -0
  143. package/dist-client/pages/activity-catalog/activity-stage.js +44 -0
  144. package/dist-client/pages/activity-catalog/activity-stage.js.map +1 -0
  145. package/dist-client/pages/activity-instance/activity-instance-list-page.d.ts +42 -0
  146. package/dist-client/pages/activity-instance/activity-instance-list-page.js +306 -0
  147. package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -0
  148. package/dist-client/pages/activity-instance/activity-instance-search-page.d.ts +69 -0
  149. package/dist-client/pages/activity-instance/activity-instance-search-page.js +309 -0
  150. package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -0
  151. package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +54 -0
  152. package/dist-client/pages/activity-instance/activity-instance-start-page.js +557 -0
  153. package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -0
  154. package/dist-client/pages/activity-instance/activity-instance-view.d.ts +36 -0
  155. package/dist-client/pages/activity-instance/activity-instance-view.js +494 -0
  156. package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -0
  157. package/dist-client/pages/activity-instance/discard-offer.d.ts +11 -0
  158. package/dist-client/pages/activity-instance/discard-offer.js +11 -0
  159. package/dist-client/pages/activity-instance/discard-offer.js.map +1 -0
  160. package/dist-client/pages/activity-stats/activity-stats-importer.d.ts +23 -0
  161. package/dist-client/pages/activity-stats/activity-stats-importer.js +94 -0
  162. package/dist-client/pages/activity-stats/activity-stats-importer.js.map +1 -0
  163. package/dist-client/pages/activity-stats/activity-stats-list-page.d.ts +55 -0
  164. package/dist-client/pages/activity-stats/activity-stats-list-page.js +253 -0
  165. package/dist-client/pages/activity-stats/activity-stats-list-page.js.map +1 -0
  166. package/dist-client/pages/activity-store/activity-store-page.d.ts +41 -0
  167. package/dist-client/pages/activity-store/activity-store-page.js +210 -0
  168. package/dist-client/pages/activity-store/activity-store-page.js.map +1 -0
  169. package/dist-client/pages/activity-supervisor/reporter-list-page.d.ts +30 -0
  170. package/dist-client/pages/activity-supervisor/reporter-list-page.js +190 -0
  171. package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -0
  172. package/dist-client/pages/activity-template/activity-template-importer.d.ts +11 -0
  173. package/dist-client/pages/activity-template/activity-template-importer.js +98 -0
  174. package/dist-client/pages/activity-template/activity-template-importer.js.map +1 -0
  175. package/dist-client/pages/activity-template/activity-template-list-page.d.ts +53 -0
  176. package/dist-client/pages/activity-template/activity-template-list-page.js +377 -0
  177. package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -0
  178. package/dist-client/pages/activity-template/activity-template-model-item-list.d.ts +1 -0
  179. package/dist-client/pages/activity-template/activity-template-model-item-list.js +41 -0
  180. package/dist-client/pages/activity-template/activity-template-model-item-list.js.map +1 -0
  181. package/dist-client/pages/activity-thread/activity-thread-importer.d.ts +11 -0
  182. package/dist-client/pages/activity-thread/activity-thread-importer.js +96 -0
  183. package/dist-client/pages/activity-thread/activity-thread-importer.js.map +1 -0
  184. package/dist-client/pages/activity-thread/activity-thread-list-page.d.ts +52 -0
  185. package/dist-client/pages/activity-thread/activity-thread-list-page.js +248 -0
  186. package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -0
  187. package/dist-client/pages/activity-thread/activity-thread-page.d.ts +91 -0
  188. package/dist-client/pages/activity-thread/activity-thread-page.js +593 -0
  189. package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -0
  190. package/dist-client/pages/activity-thread/activity-thread-view-page.d.ts +56 -0
  191. package/dist-client/pages/activity-thread/activity-thread-view-page.js +385 -0
  192. package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -0
  193. package/dist-client/pages/activity-thread/activity-thread-view.d.ts +31 -0
  194. package/dist-client/pages/activity-thread/activity-thread-view.js +134 -0
  195. package/dist-client/pages/activity-thread/activity-thread-view.js.map +1 -0
  196. package/dist-client/pages/activity-thread/thread-sections.d.ts +34 -0
  197. package/dist-client/pages/activity-thread/thread-sections.js +36 -0
  198. package/dist-client/pages/activity-thread/thread-sections.js.map +1 -0
  199. package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +64 -0
  200. package/dist-client/pages/installable-activity/installable-activity-list-page.js +424 -0
  201. package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -0
  202. package/dist-client/pages/installable-activity/installable-activity-model-item-list.d.ts +1 -0
  203. package/dist-client/pages/installable-activity/installable-activity-model-item-list.js +20 -0
  204. package/dist-client/pages/installable-activity/installable-activity-model-item-list.js.map +1 -0
  205. package/dist-client/pages/todo/approval-done-list-page.d.ts +42 -0
  206. package/dist-client/pages/todo/approval-done-list-page.js +365 -0
  207. package/dist-client/pages/todo/approval-done-list-page.js.map +1 -0
  208. package/dist-client/pages/todo/approval-pending-list-page.d.ts +79 -0
  209. package/dist-client/pages/todo/approval-pending-list-page.js +683 -0
  210. package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -0
  211. package/dist-client/pages/todo/done-list-calendar-page.d.ts +47 -0
  212. package/dist-client/pages/todo/done-list-calendar-page.js +379 -0
  213. package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -0
  214. package/dist-client/pages/todo/draft-list-page.d.ts +64 -0
  215. package/dist-client/pages/todo/draft-list-page.js +404 -0
  216. package/dist-client/pages/todo/draft-list-page.js.map +1 -0
  217. package/dist-client/pages/todo/list-thumbnail.d.ts +25 -0
  218. package/dist-client/pages/todo/list-thumbnail.js +25 -0
  219. package/dist-client/pages/todo/list-thumbnail.js.map +1 -0
  220. package/dist-client/pages/todo/pickable-list-page.d.ts +37 -0
  221. package/dist-client/pages/todo/pickable-list-page.js +271 -0
  222. package/dist-client/pages/todo/pickable-list-page.js.map +1 -0
  223. package/dist-client/pages/todo/todo-list-page.d.ts +66 -0
  224. package/dist-client/pages/todo/todo-list-page.js +503 -0
  225. package/dist-client/pages/todo/todo-list-page.js.map +1 -0
  226. package/dist-client/pages/todo/work-box.d.ts +52 -0
  227. package/dist-client/pages/todo/work-box.js +54 -0
  228. package/dist-client/pages/todo/work-box.js.map +1 -0
  229. package/dist-client/pages/work-door/door-links.d.ts +22 -0
  230. package/dist-client/pages/work-door/door-links.js +20 -0
  231. package/dist-client/pages/work-door/door-links.js.map +1 -0
  232. package/dist-client/pages/work-door/door-sentence.d.ts +75 -0
  233. package/dist-client/pages/work-door/door-sentence.js +107 -0
  234. package/dist-client/pages/work-door/door-sentence.js.map +1 -0
  235. package/dist-client/pages/work-door/door-words.d.ts +48 -0
  236. package/dist-client/pages/work-door/door-words.js +84 -0
  237. package/dist-client/pages/work-door/door-words.js.map +1 -0
  238. package/dist-client/route.d.ts +1 -0
  239. package/dist-client/route.js +77 -0
  240. package/dist-client/route.js.map +1 -0
  241. package/dist-client/templates/activity-approval-context-template.d.ts +3 -0
  242. package/dist-client/templates/activity-approval-context-template.js +105 -0
  243. package/dist-client/templates/activity-approval-context-template.js.map +1 -0
  244. package/dist-client/templates/activity-instance-context-template.d.ts +3 -0
  245. package/dist-client/templates/activity-instance-context-template.js +118 -0
  246. package/dist-client/templates/activity-instance-context-template.js.map +1 -0
  247. package/dist-client/templates/activity-thread-context-template.d.ts +3 -0
  248. package/dist-client/templates/activity-thread-context-template.js +74 -0
  249. package/dist-client/templates/activity-thread-context-template.js.map +1 -0
  250. package/dist-client/templates/context-panel.d.ts +26 -0
  251. package/dist-client/templates/context-panel.js +182 -0
  252. package/dist-client/templates/context-panel.js.map +1 -0
  253. package/dist-client/tsconfig.tsbuildinfo +1 -0
  254. package/dist-client/types/activity-approval.d.ts +36 -0
  255. package/dist-client/types/activity-approval.js +17 -0
  256. package/dist-client/types/activity-approval.js.map +1 -0
  257. package/dist-client/types/activity-instance-type.d.ts +77 -0
  258. package/dist-client/types/activity-instance-type.js +11 -0
  259. package/dist-client/types/activity-instance-type.js.map +1 -0
  260. package/dist-client/types/activity-instance.d.ts +72 -0
  261. package/dist-client/types/activity-instance.js +36 -0
  262. package/dist-client/types/activity-instance.js.map +1 -0
  263. package/dist-client/types/activity-model-type.d.ts +31 -0
  264. package/dist-client/types/activity-model-type.js +18 -0
  265. package/dist-client/types/activity-model-type.js.map +1 -0
  266. package/dist-client/types/activity-search-key-item-type.d.ts +6 -0
  267. package/dist-client/types/activity-search-key-item-type.js +3 -0
  268. package/dist-client/types/activity-search-key-item-type.js.map +1 -0
  269. package/dist-client/types/activity-thread-history.d.ts +28 -0
  270. package/dist-client/types/activity-thread-history.js +7 -0
  271. package/dist-client/types/activity-thread-history.js.map +1 -0
  272. package/dist-client/types/activity-thread-type.d.ts +15 -0
  273. package/dist-client/types/activity-thread-type.js +7 -0
  274. package/dist-client/types/activity-thread-type.js.map +1 -0
  275. package/dist-client/types/activity-thread.d.ts +39 -0
  276. package/dist-client/types/activity-thread.js +18 -0
  277. package/dist-client/types/activity-thread.js.map +1 -0
  278. package/dist-client/types/activity.d.ts +68 -0
  279. package/dist-client/types/activity.js +40 -0
  280. package/dist-client/types/activity.js.map +1 -0
  281. package/dist-client/types/types.d.ts +23 -0
  282. package/dist-client/types/types.js +42 -0
  283. package/dist-client/types/types.js.map +1 -0
  284. package/dist-client/when.d.ts +4 -0
  285. package/dist-client/when.js +72 -0
  286. package/dist-client/when.js.map +1 -0
  287. package/dist-client/work-calendar-sources.d.ts +96 -0
  288. package/dist-client/work-calendar-sources.js +88 -0
  289. package/dist-client/work-calendar-sources.js.map +1 -0
  290. package/dist-server/controllers/activity-approval/_abort.d.ts +5 -0
  291. package/dist-server/controllers/activity-approval/_abort.js +29 -0
  292. package/dist-server/controllers/activity-approval/_abort.js.map +1 -0
  293. package/dist-server/controllers/activity-approval/abort.d.ts +5 -0
  294. package/dist-server/controllers/activity-approval/abort.js +35 -0
  295. package/dist-server/controllers/activity-approval/abort.js.map +1 -0
  296. package/dist-server/controllers/activity-approval/approval-line.d.ts +138 -0
  297. package/dist-server/controllers/activity-approval/approval-line.js +186 -0
  298. package/dist-server/controllers/activity-approval/approval-line.js.map +1 -0
  299. package/dist-server/controllers/activity-approval/approve.d.ts +5 -0
  300. package/dist-server/controllers/activity-approval/approve.js +142 -0
  301. package/dist-server/controllers/activity-approval/approve.js.map +1 -0
  302. package/dist-server/controllers/activity-approval/check-authority.d.ts +8 -0
  303. package/dist-server/controllers/activity-approval/check-authority.js +29 -0
  304. package/dist-server/controllers/activity-approval/check-authority.js.map +1 -0
  305. package/dist-server/controllers/activity-approval/claim.d.ts +42 -0
  306. package/dist-server/controllers/activity-approval/claim.js +77 -0
  307. package/dist-server/controllers/activity-approval/claim.js.map +1 -0
  308. package/dist-server/controllers/activity-approval/create-approval.d.ts +41 -0
  309. package/dist-server/controllers/activity-approval/create-approval.js +85 -0
  310. package/dist-server/controllers/activity-approval/create-approval.js.map +1 -0
  311. package/dist-server/controllers/activity-approval/delegate.d.ts +23 -0
  312. package/dist-server/controllers/activity-approval/delegate.js +113 -0
  313. package/dist-server/controllers/activity-approval/delegate.js.map +1 -0
  314. package/dist-server/controllers/activity-approval/delegation.d.ts +21 -0
  315. package/dist-server/controllers/activity-approval/delegation.js +17 -0
  316. package/dist-server/controllers/activity-approval/delegation.js.map +1 -0
  317. package/dist-server/controllers/activity-approval/opinion.d.ts +10 -0
  318. package/dist-server/controllers/activity-approval/opinion.js +43 -0
  319. package/dist-server/controllers/activity-approval/opinion.js.map +1 -0
  320. package/dist-server/controllers/activity-approval/reject.d.ts +5 -0
  321. package/dist-server/controllers/activity-approval/reject.js +93 -0
  322. package/dist-server/controllers/activity-approval/reject.js.map +1 -0
  323. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.d.ts +21 -0
  324. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js +60 -0
  325. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js.map +1 -0
  326. package/dist-server/controllers/activity-approval/save.d.ts +5 -0
  327. package/dist-server/controllers/activity-approval/save.js +56 -0
  328. package/dist-server/controllers/activity-approval/save.js.map +1 -0
  329. package/dist-server/controllers/activity-approval/seat-standing.d.ts +66 -0
  330. package/dist-server/controllers/activity-approval/seat-standing.js +57 -0
  331. package/dist-server/controllers/activity-approval/seat-standing.js.map +1 -0
  332. package/dist-server/controllers/activity-installation/activity-installation-controller.d.ts +79 -0
  333. package/dist-server/controllers/activity-installation/activity-installation-controller.js +99 -0
  334. package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -0
  335. package/dist-server/controllers/activity-installation/call-webhook.d.ts +3 -0
  336. package/dist-server/controllers/activity-installation/call-webhook.js +42 -0
  337. package/dist-server/controllers/activity-installation/call-webhook.js.map +1 -0
  338. package/dist-server/controllers/activity-installation/installable-to-activity.d.ts +77 -0
  339. package/dist-server/controllers/activity-installation/installable-to-activity.js +68 -0
  340. package/dist-server/controllers/activity-installation/installable-to-activity.js.map +1 -0
  341. package/dist-server/controllers/activity-installation/registry-conflict.d.ts +47 -0
  342. package/dist-server/controllers/activity-installation/registry-conflict.js +47 -0
  343. package/dist-server/controllers/activity-installation/registry-conflict.js.map +1 -0
  344. package/dist-server/controllers/activity-instance/abort.d.ts +5 -0
  345. package/dist-server/controllers/activity-instance/abort.js +62 -0
  346. package/dist-server/controllers/activity-instance/abort.js.map +1 -0
  347. package/dist-server/controllers/activity-instance/approval-expectation.d.ts +34 -0
  348. package/dist-server/controllers/activity-instance/approval-expectation.js +18 -0
  349. package/dist-server/controllers/activity-instance/approval-expectation.js.map +1 -0
  350. package/dist-server/controllers/activity-instance/approval-line-input.d.ts +29 -0
  351. package/dist-server/controllers/activity-instance/approval-line-input.js +44 -0
  352. package/dist-server/controllers/activity-instance/approval-line-input.js.map +1 -0
  353. package/dist-server/controllers/activity-instance/assign.d.ts +8 -0
  354. package/dist-server/controllers/activity-instance/assign.js +152 -0
  355. package/dist-server/controllers/activity-instance/assign.js.map +1 -0
  356. package/dist-server/controllers/activity-instance/assignee-input.d.ts +25 -0
  357. package/dist-server/controllers/activity-instance/assignee-input.js +28 -0
  358. package/dist-server/controllers/activity-instance/assignee-input.js.map +1 -0
  359. package/dist-server/controllers/activity-instance/claim-draft.d.ts +17 -0
  360. package/dist-server/controllers/activity-instance/claim-draft.js +30 -0
  361. package/dist-server/controllers/activity-instance/claim-draft.js.map +1 -0
  362. package/dist-server/controllers/activity-instance/discard-draft.d.ts +22 -0
  363. package/dist-server/controllers/activity-instance/discard-draft.js +54 -0
  364. package/dist-server/controllers/activity-instance/discard-draft.js.map +1 -0
  365. package/dist-server/controllers/activity-instance/draft.d.ts +3 -0
  366. package/dist-server/controllers/activity-instance/draft.js +93 -0
  367. package/dist-server/controllers/activity-instance/draft.js.map +1 -0
  368. package/dist-server/controllers/activity-instance/end.d.ts +6 -0
  369. package/dist-server/controllers/activity-instance/end.js +65 -0
  370. package/dist-server/controllers/activity-instance/end.js.map +1 -0
  371. package/dist-server/controllers/activity-instance/entitlement.d.ts +25 -0
  372. package/dist-server/controllers/activity-instance/entitlement.js +110 -0
  373. package/dist-server/controllers/activity-instance/entitlement.js.map +1 -0
  374. package/dist-server/controllers/activity-instance/index.d.ts +6 -0
  375. package/dist-server/controllers/activity-instance/index.js +10 -0
  376. package/dist-server/controllers/activity-instance/index.js.map +1 -0
  377. package/dist-server/controllers/activity-instance/issue.d.ts +3 -0
  378. package/dist-server/controllers/activity-instance/issue.js +272 -0
  379. package/dist-server/controllers/activity-instance/issue.js.map +1 -0
  380. package/dist-server/controllers/activity-instance/pick.d.ts +2 -0
  381. package/dist-server/controllers/activity-instance/pick.js +112 -0
  382. package/dist-server/controllers/activity-instance/pick.js.map +1 -0
  383. package/dist-server/controllers/activity-read/assert-may-read.d.ts +20 -0
  384. package/dist-server/controllers/activity-read/assert-may-read.js +108 -0
  385. package/dist-server/controllers/activity-read/assert-may-read.js.map +1 -0
  386. package/dist-server/controllers/activity-read/participates.d.ts +41 -0
  387. package/dist-server/controllers/activity-read/participates.js +42 -0
  388. package/dist-server/controllers/activity-read/participates.js.map +1 -0
  389. package/dist-server/controllers/activity-thread/_abort.d.ts +5 -0
  390. package/dist-server/controllers/activity-thread/_abort.js +36 -0
  391. package/dist-server/controllers/activity-thread/_abort.js.map +1 -0
  392. package/dist-server/controllers/activity-thread/abort.d.ts +5 -0
  393. package/dist-server/controllers/activity-thread/abort.js +45 -0
  394. package/dist-server/controllers/activity-thread/abort.js.map +1 -0
  395. package/dist-server/controllers/activity-thread/check-authority.d.ts +2 -0
  396. package/dist-server/controllers/activity-thread/check-authority.js +65 -0
  397. package/dist-server/controllers/activity-thread/check-authority.js.map +1 -0
  398. package/dist-server/controllers/activity-thread/delegate.d.ts +7 -0
  399. package/dist-server/controllers/activity-thread/delegate.js +66 -0
  400. package/dist-server/controllers/activity-thread/delegate.js.map +1 -0
  401. package/dist-server/controllers/activity-thread/end.d.ts +6 -0
  402. package/dist-server/controllers/activity-thread/end.js +44 -0
  403. package/dist-server/controllers/activity-thread/end.js.map +1 -0
  404. package/dist-server/controllers/activity-thread/index.d.ts +7 -0
  405. package/dist-server/controllers/activity-thread/index.js +11 -0
  406. package/dist-server/controllers/activity-thread/index.js.map +1 -0
  407. package/dist-server/controllers/activity-thread/restart.d.ts +2 -0
  408. package/dist-server/controllers/activity-thread/restart.js +63 -0
  409. package/dist-server/controllers/activity-thread/restart.js.map +1 -0
  410. package/dist-server/controllers/activity-thread/save.d.ts +3 -0
  411. package/dist-server/controllers/activity-thread/save.js +45 -0
  412. package/dist-server/controllers/activity-thread/save.js.map +1 -0
  413. package/dist-server/controllers/activity-thread/start.d.ts +2 -0
  414. package/dist-server/controllers/activity-thread/start.js +43 -0
  415. package/dist-server/controllers/activity-thread/start.js.map +1 -0
  416. package/dist-server/controllers/activity-thread/submit.d.ts +6 -0
  417. package/dist-server/controllers/activity-thread/submit.js +90 -0
  418. package/dist-server/controllers/activity-thread/submit.js.map +1 -0
  419. package/dist-server/controllers/common.d.ts +34 -0
  420. package/dist-server/controllers/common.js +346 -0
  421. package/dist-server/controllers/common.js.map +1 -0
  422. package/dist-server/controllers/index.d.ts +5 -0
  423. package/dist-server/controllers/index.js +18 -0
  424. package/dist-server/controllers/index.js.map +1 -0
  425. package/dist-server/index.d.ts +6 -0
  426. package/dist-server/index.js +18 -0
  427. package/dist-server/index.js.map +1 -0
  428. package/dist-server/role-tasks.d.ts +2 -0
  429. package/dist-server/role-tasks.js +16 -0
  430. package/dist-server/role-tasks.js.map +1 -0
  431. package/dist-server/routes.d.ts +1 -0
  432. package/dist-server/routes.js +57 -0
  433. package/dist-server/routes.js.map +1 -0
  434. package/dist-server/service/activity/activity-decision-key-item-type.d.ts +206 -0
  435. package/dist-server/service/activity/activity-decision-key-item-type.js +182 -0
  436. package/dist-server/service/activity/activity-decision-key-item-type.js.map +1 -0
  437. package/dist-server/service/activity/activity-history.d.ts +44 -0
  438. package/dist-server/service/activity/activity-history.js +220 -0
  439. package/dist-server/service/activity/activity-history.js.map +1 -0
  440. package/dist-server/service/activity/activity-model-type.d.ts +49 -0
  441. package/dist-server/service/activity/activity-model-type.js +138 -0
  442. package/dist-server/service/activity/activity-model-type.js.map +1 -0
  443. package/dist-server/service/activity/activity-mutation.d.ts +12 -0
  444. package/dist-server/service/activity/activity-mutation.js +416 -0
  445. package/dist-server/service/activity/activity-mutation.js.map +1 -0
  446. package/dist-server/service/activity/activity-query.d.ts +24 -0
  447. package/dist-server/service/activity/activity-query.js +310 -0
  448. package/dist-server/service/activity/activity-query.js.map +1 -0
  449. package/dist-server/service/activity/activity-search-key-item-type.d.ts +6 -0
  450. package/dist-server/service/activity/activity-search-key-item-type.js +28 -0
  451. package/dist-server/service/activity/activity-search-key-item-type.js.map +1 -0
  452. package/dist-server/service/activity/activity-type.d.ts +84 -0
  453. package/dist-server/service/activity/activity-type.js +269 -0
  454. package/dist-server/service/activity/activity-type.js.map +1 -0
  455. package/dist-server/service/activity/activity.d.ts +135 -0
  456. package/dist-server/service/activity/activity.js +328 -0
  457. package/dist-server/service/activity/activity.js.map +1 -0
  458. package/dist-server/service/activity/approval-line-seats.d.ts +12 -0
  459. package/dist-server/service/activity/approval-line-seats.js +68 -0
  460. package/dist-server/service/activity/approval-line-seats.js.map +1 -0
  461. package/dist-server/service/activity/credential-field.d.ts +35 -0
  462. package/dist-server/service/activity/credential-field.js +89 -0
  463. package/dist-server/service/activity/credential-field.js.map +1 -0
  464. package/dist-server/service/activity/decision-key-declaration.d.ts +106 -0
  465. package/dist-server/service/activity/decision-key-declaration.js +181 -0
  466. package/dist-server/service/activity/decision-key-declaration.js.map +1 -0
  467. package/dist-server/service/activity/declaration-guard-subscriber.d.ts +24 -0
  468. package/dist-server/service/activity/declaration-guard-subscriber.js +46 -0
  469. package/dist-server/service/activity/declaration-guard-subscriber.js.map +1 -0
  470. package/dist-server/service/activity/event-subscriber.d.ts +7 -0
  471. package/dist-server/service/activity/event-subscriber.js +21 -0
  472. package/dist-server/service/activity/event-subscriber.js.map +1 -0
  473. package/dist-server/service/activity/freeze-decision-sentences-for.d.ts +11 -0
  474. package/dist-server/service/activity/freeze-decision-sentences-for.js +18 -0
  475. package/dist-server/service/activity/freeze-decision-sentences-for.js.map +1 -0
  476. package/dist-server/service/activity/index.d.ts +9 -0
  477. package/dist-server/service/activity/index.js +13 -0
  478. package/dist-server/service/activity/index.js.map +1 -0
  479. package/dist-server/service/activity/search-key-declaration.d.ts +38 -0
  480. package/dist-server/service/activity/search-key-declaration.js +49 -0
  481. package/dist-server/service/activity/search-key-declaration.js.map +1 -0
  482. package/dist-server/service/activity-approval/activity-approval-mutation.d.ts +8 -0
  483. package/dist-server/service/activity-approval/activity-approval-mutation.js +81 -0
  484. package/dist-server/service/activity-approval/activity-approval-mutation.js.map +1 -0
  485. package/dist-server/service/activity-approval/activity-approval-query.d.ts +42 -0
  486. package/dist-server/service/activity-approval/activity-approval-query.js +391 -0
  487. package/dist-server/service/activity-approval/activity-approval-query.js.map +1 -0
  488. package/dist-server/service/activity-approval/activity-approval-subscription.d.ts +6 -0
  489. package/dist-server/service/activity-approval/activity-approval-subscription.js +39 -0
  490. package/dist-server/service/activity-approval/activity-approval-subscription.js.map +1 -0
  491. package/dist-server/service/activity-approval/activity-approval-type.d.ts +10 -0
  492. package/dist-server/service/activity-approval/activity-approval-type.js +39 -0
  493. package/dist-server/service/activity-approval/activity-approval-type.js.map +1 -0
  494. package/dist-server/service/activity-approval/activity-approval.d.ts +67 -0
  495. package/dist-server/service/activity-approval/activity-approval.js +183 -0
  496. package/dist-server/service/activity-approval/activity-approval.js.map +1 -0
  497. package/dist-server/service/activity-approval/event-subscriber.d.ts +7 -0
  498. package/dist-server/service/activity-approval/event-subscriber.js +46 -0
  499. package/dist-server/service/activity-approval/event-subscriber.js.map +1 -0
  500. package/dist-server/service/activity-approval/index.d.ts +8 -0
  501. package/dist-server/service/activity-approval/index.js +12 -0
  502. package/dist-server/service/activity-approval/index.js.map +1 -0
  503. package/dist-server/service/activity-approval/my-pending-approvals.d.ts +33 -0
  504. package/dist-server/service/activity-approval/my-pending-approvals.js +52 -0
  505. package/dist-server/service/activity-approval/my-pending-approvals.js.map +1 -0
  506. package/dist-server/service/activity-instance/activity-instance-history.d.ts +60 -0
  507. package/dist-server/service/activity-instance/activity-instance-history.js +294 -0
  508. package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -0
  509. package/dist-server/service/activity-instance/activity-instance-mutation.d.ts +16 -0
  510. package/dist-server/service/activity-instance/activity-instance-mutation.js +185 -0
  511. package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -0
  512. package/dist-server/service/activity-instance/activity-instance-query.d.ts +27 -0
  513. package/dist-server/service/activity-instance/activity-instance-query.js +386 -0
  514. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -0
  515. package/dist-server/service/activity-instance/activity-instance-subscription.d.ts +6 -0
  516. package/dist-server/service/activity-instance/activity-instance-subscription.js +39 -0
  517. package/dist-server/service/activity-instance/activity-instance-subscription.js.map +1 -0
  518. package/dist-server/service/activity-instance/activity-instance-type.d.ts +107 -0
  519. package/dist-server/service/activity-instance/activity-instance-type.js +301 -0
  520. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -0
  521. package/dist-server/service/activity-instance/activity-instance.d.ts +81 -0
  522. package/dist-server/service/activity-instance/activity-instance.js +324 -0
  523. package/dist-server/service/activity-instance/activity-instance.js.map +1 -0
  524. package/dist-server/service/activity-instance/assignee-pool.d.ts +59 -0
  525. package/dist-server/service/activity-instance/assignee-pool.js +99 -0
  526. package/dist-server/service/activity-instance/assignee-pool.js.map +1 -0
  527. package/dist-server/service/activity-instance/draft-list-states.d.ts +39 -0
  528. package/dist-server/service/activity-instance/draft-list-states.js +51 -0
  529. package/dist-server/service/activity-instance/draft-list-states.js.map +1 -0
  530. package/dist-server/service/activity-instance/event-subscriber.d.ts +21 -0
  531. package/dist-server/service/activity-instance/event-subscriber.js +59 -0
  532. package/dist-server/service/activity-instance/event-subscriber.js.map +1 -0
  533. package/dist-server/service/activity-instance/index.d.ts +9 -0
  534. package/dist-server/service/activity-instance/index.js +13 -0
  535. package/dist-server/service/activity-instance/index.js.map +1 -0
  536. package/dist-server/service/activity-instance/request-box.d.ts +2 -0
  537. package/dist-server/service/activity-instance/request-box.js +18 -0
  538. package/dist-server/service/activity-instance/request-box.js.map +1 -0
  539. package/dist-server/service/activity-stats/activity-stats-query.d.ts +9 -0
  540. package/dist-server/service/activity-stats/activity-stats-query.js +230 -0
  541. package/dist-server/service/activity-stats/activity-stats-query.js.map +1 -0
  542. package/dist-server/service/activity-stats/activity-stats-type.d.ts +27 -0
  543. package/dist-server/service/activity-stats/activity-stats-type.js +74 -0
  544. package/dist-server/service/activity-stats/activity-stats-type.js.map +1 -0
  545. package/dist-server/service/activity-stats/event-placement.d.ts +55 -0
  546. package/dist-server/service/activity-stats/event-placement.js +82 -0
  547. package/dist-server/service/activity-stats/event-placement.js.map +1 -0
  548. package/dist-server/service/activity-stats/index.d.ts +2 -0
  549. package/dist-server/service/activity-stats/index.js +6 -0
  550. package/dist-server/service/activity-stats/index.js.map +1 -0
  551. package/dist-server/service/activity-summary/activity-summary-query.d.ts +8 -0
  552. package/dist-server/service/activity-summary/activity-summary-query.js +137 -0
  553. package/dist-server/service/activity-summary/activity-summary-query.js.map +1 -0
  554. package/dist-server/service/activity-summary/activity-summary.d.ts +6 -0
  555. package/dist-server/service/activity-summary/activity-summary.js +28 -0
  556. package/dist-server/service/activity-summary/activity-summary.js.map +1 -0
  557. package/dist-server/service/activity-summary/index.d.ts +5 -0
  558. package/dist-server/service/activity-summary/index.js +9 -0
  559. package/dist-server/service/activity-summary/index.js.map +1 -0
  560. package/dist-server/service/activity-summary/open-work.d.ts +4 -0
  561. package/dist-server/service/activity-summary/open-work.js +51 -0
  562. package/dist-server/service/activity-summary/open-work.js.map +1 -0
  563. package/dist-server/service/activity-summary/person-open-work.d.ts +17 -0
  564. package/dist-server/service/activity-summary/person-open-work.js +68 -0
  565. package/dist-server/service/activity-summary/person-open-work.js.map +1 -0
  566. package/dist-server/service/activity-template/activity-template-history.d.ts +32 -0
  567. package/dist-server/service/activity-template/activity-template-history.js +165 -0
  568. package/dist-server/service/activity-template/activity-template-history.js.map +1 -0
  569. package/dist-server/service/activity-template/activity-template-mutation.d.ts +10 -0
  570. package/dist-server/service/activity-template/activity-template-mutation.js +194 -0
  571. package/dist-server/service/activity-template/activity-template-mutation.js.map +1 -0
  572. package/dist-server/service/activity-template/activity-template-query.d.ts +14 -0
  573. package/dist-server/service/activity-template/activity-template-query.js +112 -0
  574. package/dist-server/service/activity-template/activity-template-query.js.map +1 -0
  575. package/dist-server/service/activity-template/activity-template-type.d.ts +44 -0
  576. package/dist-server/service/activity-template/activity-template-type.js +164 -0
  577. package/dist-server/service/activity-template/activity-template-type.js.map +1 -0
  578. package/dist-server/service/activity-template/activity-template.d.ts +36 -0
  579. package/dist-server/service/activity-template/activity-template.js +154 -0
  580. package/dist-server/service/activity-template/activity-template.js.map +1 -0
  581. package/dist-server/service/activity-template/event-subscriber.d.ts +7 -0
  582. package/dist-server/service/activity-template/event-subscriber.js +21 -0
  583. package/dist-server/service/activity-template/event-subscriber.js.map +1 -0
  584. package/dist-server/service/activity-template/index.d.ts +8 -0
  585. package/dist-server/service/activity-template/index.js +12 -0
  586. package/dist-server/service/activity-template/index.js.map +1 -0
  587. package/dist-server/service/activity-thread/activity-thread-history-query.d.ts +10 -0
  588. package/dist-server/service/activity-thread/activity-thread-history-query.js +69 -0
  589. package/dist-server/service/activity-thread/activity-thread-history-query.js.map +1 -0
  590. package/dist-server/service/activity-thread/activity-thread-history.d.ts +39 -0
  591. package/dist-server/service/activity-thread/activity-thread-history.js +211 -0
  592. package/dist-server/service/activity-thread/activity-thread-history.js.map +1 -0
  593. package/dist-server/service/activity-thread/activity-thread-mutation.d.ts +20 -0
  594. package/dist-server/service/activity-thread/activity-thread-mutation.js +115 -0
  595. package/dist-server/service/activity-thread/activity-thread-mutation.js.map +1 -0
  596. package/dist-server/service/activity-thread/activity-thread-query.d.ts +24 -0
  597. package/dist-server/service/activity-thread/activity-thread-query.js +276 -0
  598. package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -0
  599. package/dist-server/service/activity-thread/activity-thread-subscription.d.ts +6 -0
  600. package/dist-server/service/activity-thread/activity-thread-subscription.js +38 -0
  601. package/dist-server/service/activity-thread/activity-thread-subscription.js.map +1 -0
  602. package/dist-server/service/activity-thread/activity-thread-type.d.ts +15 -0
  603. package/dist-server/service/activity-thread/activity-thread-type.js +50 -0
  604. package/dist-server/service/activity-thread/activity-thread-type.js.map +1 -0
  605. package/dist-server/service/activity-thread/activity-thread.d.ts +47 -0
  606. package/dist-server/service/activity-thread/activity-thread.js +197 -0
  607. package/dist-server/service/activity-thread/activity-thread.js.map +1 -0
  608. package/dist-server/service/activity-thread/event-subscriber.d.ts +13 -0
  609. package/dist-server/service/activity-thread/event-subscriber.js +45 -0
  610. package/dist-server/service/activity-thread/event-subscriber.js.map +1 -0
  611. package/dist-server/service/activity-thread/index.d.ts +10 -0
  612. package/dist-server/service/activity-thread/index.js +14 -0
  613. package/dist-server/service/activity-thread/index.js.map +1 -0
  614. package/dist-server/service/activity-thread/my-open-threads.d.ts +33 -0
  615. package/dist-server/service/activity-thread/my-open-threads.js +85 -0
  616. package/dist-server/service/activity-thread/my-open-threads.js.map +1 -0
  617. package/dist-server/service/activity-thread/todo-order.d.ts +49 -0
  618. package/dist-server/service/activity-thread/todo-order.js +70 -0
  619. package/dist-server/service/activity-thread/todo-order.js.map +1 -0
  620. package/dist-server/service/approval-notice/approval-notice-rules.d.ts +67 -0
  621. package/dist-server/service/approval-notice/approval-notice-rules.js +67 -0
  622. package/dist-server/service/approval-notice/approval-notice-rules.js.map +1 -0
  623. package/dist-server/service/approval-notice/approval-notice.d.ts +11 -0
  624. package/dist-server/service/approval-notice/approval-notice.js +76 -0
  625. package/dist-server/service/approval-notice/approval-notice.js.map +1 -0
  626. package/dist-server/service/index.d.ts +23 -0
  627. package/dist-server/service/index.js +75 -0
  628. package/dist-server/service/index.js.map +1 -0
  629. package/dist-server/service/installable-activity/activity-readiness.d.ts +58 -0
  630. package/dist-server/service/installable-activity/activity-readiness.js +105 -0
  631. package/dist-server/service/installable-activity/activity-readiness.js.map +1 -0
  632. package/dist-server/service/installable-activity/index.d.ts +6 -0
  633. package/dist-server/service/installable-activity/index.js +10 -0
  634. package/dist-server/service/installable-activity/index.js.map +1 -0
  635. package/dist-server/service/installable-activity/installable-activity-mutation.d.ts +11 -0
  636. package/dist-server/service/installable-activity/installable-activity-mutation.js +83 -0
  637. package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -0
  638. package/dist-server/service/installable-activity/installable-activity-query.d.ts +22 -0
  639. package/dist-server/service/installable-activity/installable-activity-query.js +127 -0
  640. package/dist-server/service/installable-activity/installable-activity-query.js.map +1 -0
  641. package/dist-server/service/installable-activity/installable-activity-type.d.ts +5 -0
  642. package/dist-server/service/installable-activity/installable-activity-type.js +21 -0
  643. package/dist-server/service/installable-activity/installable-activity-type.js.map +1 -0
  644. package/dist-server/service/installable-activity/installable-activity.d.ts +92 -0
  645. package/dist-server/service/installable-activity/installable-activity.js +140 -0
  646. package/dist-server/service/installable-activity/installable-activity.js.map +1 -0
  647. package/dist-server/service/nulls-last.d.ts +30 -0
  648. package/dist-server/service/nulls-last.js +37 -0
  649. package/dist-server/service/nulls-last.js.map +1 -0
  650. package/dist-server/service/subscription/roles-of.d.ts +9 -0
  651. package/dist-server/service/subscription/roles-of.js +17 -0
  652. package/dist-server/service/subscription/roles-of.js.map +1 -0
  653. package/dist-server/service/subscription/subscription-filters.d.ts +47 -0
  654. package/dist-server/service/subscription/subscription-filters.js +57 -0
  655. package/dist-server/service/subscription/subscription-filters.js.map +1 -0
  656. package/dist-server/service/work-door/activity-lookup.d.ts +70 -0
  657. package/dist-server/service/work-door/activity-lookup.js +110 -0
  658. package/dist-server/service/work-door/activity-lookup.js.map +1 -0
  659. package/dist-server/service/work-door/approval-line-standing.d.ts +106 -0
  660. package/dist-server/service/work-door/approval-line-standing.js +65 -0
  661. package/dist-server/service/work-door/approval-line-standing.js.map +1 -0
  662. package/dist-server/service/work-door/index.d.ts +15 -0
  663. package/dist-server/service/work-door/index.js +20 -0
  664. package/dist-server/service/work-door/index.js.map +1 -0
  665. package/dist-server/service/work-door/pass-work-door.d.ts +74 -0
  666. package/dist-server/service/work-door/pass-work-door.js +45 -0
  667. package/dist-server/service/work-door/pass-work-door.js.map +1 -0
  668. package/dist-server/service/work-door/work-door-declaration.d.ts +135 -0
  669. package/dist-server/service/work-door/work-door-declaration.js +87 -0
  670. package/dist-server/service/work-door/work-door-declaration.js.map +1 -0
  671. package/dist-server/service/work-door/work-door-event.d.ts +20 -0
  672. package/dist-server/service/work-door/work-door-event.js +25 -0
  673. package/dist-server/service/work-door/work-door-event.js.map +1 -0
  674. package/dist-server/service/work-door/work-door-journal-service.d.ts +47 -0
  675. package/dist-server/service/work-door/work-door-journal-service.js +75 -0
  676. package/dist-server/service/work-door/work-door-journal-service.js.map +1 -0
  677. package/dist-server/service/work-door/work-door-journal.d.ts +30 -0
  678. package/dist-server/service/work-door/work-door-journal.js +94 -0
  679. package/dist-server/service/work-door/work-door-journal.js.map +1 -0
  680. package/dist-server/service/work-door/work-door-not-used.d.ts +39 -0
  681. package/dist-server/service/work-door/work-door-not-used.js +86 -0
  682. package/dist-server/service/work-door/work-door-not-used.js.map +1 -0
  683. package/dist-server/service/work-door/work-door-resolver.d.ts +32 -0
  684. package/dist-server/service/work-door/work-door-resolver.js +152 -0
  685. package/dist-server/service/work-door/work-door-resolver.js.map +1 -0
  686. package/dist-server/service/work-door/work-door-service.d.ts +36 -0
  687. package/dist-server/service/work-door/work-door-service.js +127 -0
  688. package/dist-server/service/work-door/work-door-service.js.map +1 -0
  689. package/dist-server/service/work-door/work-door-type.d.ts +88 -0
  690. package/dist-server/service/work-door/work-door-type.js +206 -0
  691. package/dist-server/service/work-door/work-door-type.js.map +1 -0
  692. package/dist-server/service/work-door/work-door.d.ts +187 -0
  693. package/dist-server/service/work-door/work-door.js +119 -0
  694. package/dist-server/service/work-door/work-door.js.map +1 -0
  695. package/dist-server/tsconfig.tsbuildinfo +1 -0
  696. package/package.json +2 -2
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Refuses a decisionKeys declaration that cannot draw, and computes the i18n keys an activity's
3
+ * sentences are read from.
4
+ *
5
+ * ── This path is read from outside ────────────────────────────────────────
6
+ * operato-plant's tests import this file by its built path,
7
+ * `@things-factory/worklist/dist-server/service/activity/decision-key-declaration.js`, for
8
+ * DECISION_ROLES, doorSlug and activityTKey. Moving or renaming it breaks those tests, so treat the
9
+ * path as public.
10
+ *
11
+ * Refusing a declaration that cannot draw:
12
+ *
13
+ * Same reasoning as search keys: a declaration that does not work should fail where it arrives, not
14
+ * where someone opens an approval. The difference is what "not working" means here — nothing is
15
+ * dropped by a save, so the failure would be a screen that quietly draws less than it was told to.
16
+ *
17
+ * The shape is spelled out rather than imported. ActivityDecisionKeyItem carries type-graphql
18
+ * decorators and the test runner strips types without reading them, so importing the declared class
19
+ * pulls type-graphql in and the test file fails to load.
20
+ */
21
+ type DecisionKeyDeclaration = {
22
+ role?: string;
23
+ inputPath?: string;
24
+ valueTKey?: string;
25
+ params?: {
26
+ [name: string]: string;
27
+ };
28
+ };
29
+ /** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */
30
+ export declare const DECISION_ROLES: readonly ["headline", "subject", "reversibility", "reason", "evidence", "currentState", "consequence"];
31
+ /**
32
+ * The roles that may appear more than once.
33
+ *
34
+ * An approval can change several things at once — plant's priority change pushes some orders back
35
+ * and moves others ahead — and those are separate consequences, not one merged sentence. Grounds
36
+ * come in several the same way: which inspection, against which spec, decided when.
37
+ *
38
+ * Every other role names a single value. Two headlines would leave the screen picking one with
39
+ * nothing to say why.
40
+ *
41
+ * Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch
42
+ * — an observation, and past — while this is a prediction, and future.
43
+ */
44
+ export declare const REPEATABLE_ROLES: readonly ["consequence", "evidence"];
45
+ /**
46
+ * The door's part of a value key — the activity's name, kebab-cased.
47
+ *
48
+ * ── Why computed and not declared ─────────────────────────────────────────
49
+ * A declared key is a key table, and a key table is what a computed key exists to avoid: nobody
50
+ * writing a new door picks a key, so none of them can be picked wrong, and a test can count every
51
+ * key that exists rather than every key somebody remembered to register.
52
+ *
53
+ * It is safe to hang this on `name` because `name` cannot move — it is the key the callback is
54
+ * found by, and renaming it makes an approval finish with nothing happening. A key derived from a
55
+ * fixed name is fixed.
56
+ *
57
+ * ── The boundary rule ─────────────────────────────────────────────────────
58
+ * Activity names come in two shapes and this repository has both: 'MES Disposition Approval' and
59
+ * 'BatchRelease'. Splitting only on spaces would leave `batchrelease` beside `mes-disposition-
60
+ * approval`; splitting on every capital would turn 'MES' into `m-e-s`. So the split is between a
61
+ * lowercase or digit and a capital, and between a run of capitals and a capitalised word — the same
62
+ * rule `secretEnvName` uses, written after HOOKSECRET and HOOK_SECRET drifted apart.
63
+ */
64
+ export declare function doorSlug(activityName: string): string;
65
+ /**
66
+ * The i18n key for one slot's **value sentence** — `approval.<door>.<inputPath>`.
67
+ *
68
+ * `inputPath` and not `role`: a door repeats `consequence`, so two slots in one door would collide
69
+ * on role and the later sentence would silently take the earlier one's key. `inputPath` is the one
70
+ * thing already unique within a door, and it is already written in the declaration.
71
+ */
72
+ export declare function decisionValueKey(activityName: string, inputPath: string): string;
73
+ /**
74
+ * The i18n key for an activity's own sentences — `activity.<door>.label`, `activity.<door>.guide.<n>`.
75
+ *
76
+ * Computed from `name` for the reason decisionValueKey is: nobody picks the key, so none is picked
77
+ * wrong, and an app's test can walk its declarations and count every key that must exist.
78
+ *
79
+ * The server sends the result (Activity.labelTKey, InstallableActivity.labelTKey and guideTKeys);
80
+ * screens draw `t(labelTKey, { defaultValue: label })` and never rebuild the slug. A client file that
81
+ * imported this one would move the whole client build under dist-client/client/.
82
+ *
83
+ * `description` has no key. It is the developers' English line and is not shown to the person
84
+ * doing the work.
85
+ *
86
+ * Guide lines are keyed by position. Inserting a line shifts every later translation by one, and a
87
+ * count of keys does not notice — change guide and its translations in the same edit.
88
+ */
89
+ export declare function activityTKey(activityName: string, part: 'label' | 'readiness-notes'): string;
90
+ export declare function activityTKey(activityName: string, part: 'guide' | 'readiness-gap', index: number): string;
91
+ /**
92
+ * One key per guide line, **always as many as there are lines.** The screen pairs the two arrays
93
+ * by position; a shorter key list would send the last lines out untranslated with nothing to show it.
94
+ */
95
+ export declare function activityGuideTKeys(activityName: string, guide: string[] | undefined | null): string[];
96
+ /**
97
+ * The same for what a module declares about its own readiness.
98
+ *
99
+ * The catalog screen draws `readiness.gaps` and `readiness.notes` as sentences, and those come out
100
+ * of a catalog that is built at boot, before anyone's locale is known. So the module keeps writing
101
+ * sentences and the screen reads a translation of them, exactly as it does for label and guide
102
+ * (ADR-0054: the sentence is chosen where `context.t` is).
103
+ */
104
+ export declare function activityReadinessGapTKeys(activityName: string, gaps: string[] | undefined | null): string[];
105
+ export declare function assertDecisionKeysAreUsable(decisionKeys: DecisionKeyDeclaration[] | undefined, activityName?: string): void;
106
+ export {};
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REPEATABLE_ROLES = exports.DECISION_ROLES = void 0;
4
+ exports.doorSlug = doorSlug;
5
+ exports.decisionValueKey = decisionValueKey;
6
+ exports.activityTKey = activityTKey;
7
+ exports.activityGuideTKeys = activityGuideTKeys;
8
+ exports.activityReadinessGapTKeys = activityReadinessGapTKeys;
9
+ exports.assertDecisionKeysAreUsable = assertDecisionKeysAreUsable;
10
+ /** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */
11
+ exports.DECISION_ROLES = [
12
+ 'headline',
13
+ 'subject',
14
+ 'reversibility',
15
+ 'reason',
16
+ 'evidence',
17
+ 'currentState',
18
+ 'consequence'
19
+ ];
20
+ /**
21
+ * The roles that may appear more than once.
22
+ *
23
+ * An approval can change several things at once — plant's priority change pushes some orders back
24
+ * and moves others ahead — and those are separate consequences, not one merged sentence. Grounds
25
+ * come in several the same way: which inspection, against which spec, decided when.
26
+ *
27
+ * Every other role names a single value. Two headlines would leave the screen picking one with
28
+ * nothing to say why.
29
+ *
30
+ * Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch
31
+ * — an observation, and past — while this is a prediction, and future.
32
+ */
33
+ exports.REPEATABLE_ROLES = ['consequence', 'evidence'];
34
+ /**
35
+ * The door's part of a value key — the activity's name, kebab-cased.
36
+ *
37
+ * ── Why computed and not declared ─────────────────────────────────────────
38
+ * A declared key is a key table, and a key table is what a computed key exists to avoid: nobody
39
+ * writing a new door picks a key, so none of them can be picked wrong, and a test can count every
40
+ * key that exists rather than every key somebody remembered to register.
41
+ *
42
+ * It is safe to hang this on `name` because `name` cannot move — it is the key the callback is
43
+ * found by, and renaming it makes an approval finish with nothing happening. A key derived from a
44
+ * fixed name is fixed.
45
+ *
46
+ * ── The boundary rule ─────────────────────────────────────────────────────
47
+ * Activity names come in two shapes and this repository has both: 'MES Disposition Approval' and
48
+ * 'BatchRelease'. Splitting only on spaces would leave `batchrelease` beside `mes-disposition-
49
+ * approval`; splitting on every capital would turn 'MES' into `m-e-s`. So the split is between a
50
+ * lowercase or digit and a capital, and between a run of capitals and a capitalised word — the same
51
+ * rule `secretEnvName` uses, written after HOOKSECRET and HOOK_SECRET drifted apart.
52
+ */
53
+ function doorSlug(activityName) {
54
+ return String(activityName ?? '')
55
+ .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
56
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
57
+ .replace(/[^A-Za-z0-9]+/g, '-')
58
+ .toLowerCase()
59
+ .replace(/^-+|-+$/g, '');
60
+ }
61
+ /**
62
+ * The i18n key for one slot's **value sentence** — `approval.<door>.<inputPath>`.
63
+ *
64
+ * `inputPath` and not `role`: a door repeats `consequence`, so two slots in one door would collide
65
+ * on role and the later sentence would silently take the earlier one's key. `inputPath` is the one
66
+ * thing already unique within a door, and it is already written in the declaration.
67
+ */
68
+ function decisionValueKey(activityName, inputPath) {
69
+ return `approval.${doorSlug(activityName)}.${inputPath}`;
70
+ }
71
+ function activityTKey(activityName, part, index) {
72
+ const door = `activity.${doorSlug(activityName)}`;
73
+ switch (part) {
74
+ case 'guide':
75
+ return `${door}.guide.${index}`;
76
+ case 'readiness-gap':
77
+ return `${door}.readiness-gap.${index}`;
78
+ case 'readiness-notes':
79
+ return `${door}.readiness-notes`;
80
+ default:
81
+ return `${door}.label`;
82
+ }
83
+ }
84
+ /**
85
+ * One key per guide line, **always as many as there are lines.** The screen pairs the two arrays
86
+ * by position; a shorter key list would send the last lines out untranslated with nothing to show it.
87
+ */
88
+ function activityGuideTKeys(activityName, guide) {
89
+ return (guide || []).map((_, index) => activityTKey(activityName, 'guide', index));
90
+ }
91
+ /**
92
+ * The same for what a module declares about its own readiness.
93
+ *
94
+ * The catalog screen draws `readiness.gaps` and `readiness.notes` as sentences, and those come out
95
+ * of a catalog that is built at boot, before anyone's locale is known. So the module keeps writing
96
+ * sentences and the screen reads a translation of them, exactly as it does for label and guide
97
+ * (ADR-0054: the sentence is chosen where `context.t` is).
98
+ */
99
+ function activityReadinessGapTKeys(activityName, gaps) {
100
+ return (gaps || []).map((_, index) => activityTKey(activityName, 'readiness-gap', index));
101
+ }
102
+ function assertDecisionKeysAreUsable(decisionKeys, activityName) {
103
+ if (!decisionKeys?.length) {
104
+ return;
105
+ }
106
+ const named = activityName ? `activity "${activityName}"` : 'this activity';
107
+ const unknown = decisionKeys.filter(key => !exports.DECISION_ROLES.includes(String(key?.role ?? '')));
108
+ if (unknown.length) {
109
+ throw new Error(`${named} declares decision keys with a role the approval screen does not know: ` +
110
+ `${unknown.map(key => `"${key?.role ?? ''}"`).join(', ')}. ` +
111
+ `Known roles are ${exports.DECISION_ROLES.join(', ')}. A role outside that set draws nothing.`);
112
+ }
113
+ const pathless = decisionKeys.filter(key => !String(key?.inputPath ?? '').trim());
114
+ if (pathless.length) {
115
+ throw new Error(`${named} declares ${pathless.length} decision key(s) with no inputPath. ` +
116
+ `A decision key names the value it draws; without a path there is nothing to read.`);
117
+ }
118
+ /*
119
+ * An index or a wildcard resolves to nothing at draw time and the slot would report "the path led
120
+ * nowhere" — which reads as a payload that disagrees with the declaration, when the truth is that
121
+ * the declaration used a path language that does not exist. Refusing here says which it was.
122
+ */
123
+ const notPaths = decisionKeys.filter(key => /[[\]*]/.test(String(key?.inputPath ?? '')));
124
+ if (notPaths.length) {
125
+ throw new Error(`${named} declares decision keys whose inputPath is not a plain dotted path: ` +
126
+ `${notPaths.map(key => `"${key?.inputPath ?? ''}"`).join(', ')}. ` +
127
+ `Dots only — no array index and no wildcard. Point at the list itself; drawing its items is ` +
128
+ `the slot's work.`);
129
+ }
130
+ const repeated = exports.DECISION_ROLES.filter(role => !exports.REPEATABLE_ROLES.includes(role) &&
131
+ decisionKeys.filter(key => key?.role === role).length > 1);
132
+ if (repeated.length) {
133
+ throw new Error(`${named} declares more than one "${repeated.join('", "')}" decision key. ` +
134
+ `Only ${exports.REPEATABLE_ROLES.map(role => `"${role}"`).join(' and ')} may repeat — an approval can ` +
135
+ `change several things at once, and grounds come in several. The screen would draw one of the ` +
136
+ `others and could not say which.`);
137
+ }
138
+ /*
139
+ * A sentence may only be built from values that were snapshotted, so every params value is an
140
+ * inputPath and reads by the same rules. Wanting a value with no field behind it means the field
141
+ * is missing, not that params needs a second source — the two hold each other up: without the
142
+ * value the sentence cannot be rebuilt, and a value a sentence uses is guaranteed to stay.
143
+ *
144
+ * Only the right side has a rule. The names on the left belong to the sentence and are the
145
+ * locale file's business.
146
+ */
147
+ const badParams = [];
148
+ for (const key of decisionKeys) {
149
+ for (const [name, path] of Object.entries(key?.params || {})) {
150
+ const said = String(path ?? '');
151
+ if (!said.trim()) {
152
+ badParams.push(`"${name}" (empty)`);
153
+ }
154
+ else if (/[[\]*]/.test(said)) {
155
+ badParams.push(`"${name}": "${said}"`);
156
+ }
157
+ }
158
+ }
159
+ if (badParams.length) {
160
+ throw new Error(`${named} declares sentence params that are not plain dotted paths into the input: ` +
161
+ `${badParams.join(', ')}. Every params value is an inputPath — a sentence is built only from ` +
162
+ `values the request froze, so a value with nowhere to read it from is a missing field.`);
163
+ }
164
+ if (!activityName) {
165
+ return;
166
+ }
167
+ /*
168
+ * The key is computed, so a declared one that disagrees is a typo that would draw `approval.…` on
169
+ * the card. Checking it here rather than trusting the writer is the whole reason it is computed.
170
+ */
171
+ const wrongKey = decisionKeys.filter(key => key?.valueTKey && key.valueTKey !== decisionValueKey(activityName, String(key?.inputPath ?? '')));
172
+ if (wrongKey.length) {
173
+ throw new Error(`${named} declares value keys that are not the computed ones: ` +
174
+ `${wrongKey
175
+ .map(key => `"${key?.valueTKey}" (expected "${decisionValueKey(activityName, String(key?.inputPath ?? ''))}")`)
176
+ .join(', ')}. ` +
177
+ `The key is approval.<door>.<inputPath> and nobody picks it — a key nobody can pick is a key ` +
178
+ `nobody can pick wrong.`);
179
+ }
180
+ }
181
+ //# sourceMappingURL=decision-key-declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision-key-declaration.js","sourceRoot":"","sources":["../../../server/service/activity/decision-key-declaration.ts"],"names":[],"mappings":";;;AAwEA,4BAOC;AASD,4CAEC;AAoBD,oCAiBC;AAMD,gDAEC;AAUD,8DAEC;AAED,kEAmHC;AA7OD,iGAAiG;AACpF,QAAA,cAAc,GAAG;IAC5B,UAAU;IACV,SAAS;IACT,eAAe;IACf,QAAQ;IACR,UAAU;IACV,cAAc;IACd,aAAa;CACL,CAAA;AAEV;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAA;AAEpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,QAAQ,CAAC,YAAoB;IAC3C,OAAO,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;SAC9B,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC;SACzC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,WAAW,EAAE;SACb,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,YAAoB,EAAE,SAAiB;IACtE,OAAO,YAAY,QAAQ,CAAC,YAAY,CAAC,IAAI,SAAS,EAAE,CAAA;AAC1D,CAAC;AAoBD,SAAgB,YAAY,CAC1B,YAAoB,EACpB,IAA6D,EAC7D,KAAc;IAEd,MAAM,IAAI,GAAG,YAAY,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAA;IAEjD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,GAAG,IAAI,UAAU,KAAK,EAAE,CAAA;QACjC,KAAK,eAAe;YAClB,OAAO,GAAG,IAAI,kBAAkB,KAAK,EAAE,CAAA;QACzC,KAAK,iBAAiB;YACpB,OAAO,GAAG,IAAI,kBAAkB,CAAA;QAClC;YACE,OAAO,GAAG,IAAI,QAAQ,CAAA;IAC1B,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,YAAoB,EAAE,KAAkC;IACzF,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;AACpF,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CAAC,YAAoB,EAAE,IAAiC;IAC/F,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC,CAAA;AAC3F,CAAC;AAED,SAAgB,2BAA2B,CACzC,YAAkD,EAClD,YAAqB;IAErB,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;QAC1B,OAAM;IACR,CAAC;IAED,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,GAAG,CAAC,CAAC,CAAC,eAAe,CAAA;IAE3E,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAE,sBAAoC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAEpH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,yEAAyE;YAC/E,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAC5D,mBAAmB,sBAAc,CAAC,IAAI,CAAC,IAAI,CAAC,0CAA0C,CACzF,CAAA;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IAEjF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,aAAa,QAAQ,CAAC,MAAM,sCAAsC;YACxE,mFAAmF,CACtF,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAExF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sEAAsE;YAC5E,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,SAAS,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAClE,6FAA6F;YAC7F,kBAAkB,CACrB,CAAA;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,sBAAc,CAAC,MAAM,CACpC,IAAI,CAAC,EAAE,CACL,CAAE,wBAAsC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvD,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAC5D,CAAA;IAED,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,4BAA4B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YACzE,QAAQ,wBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC;YAC/F,+FAA+F;YAC/F,iCAAiC,CACpC,CAAA;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,SAAS,GAAa,EAAE,CAAA;IAE9B,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAC/B,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;YAE/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;gBACjB,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC,CAAA;YACrC,CAAC;iBAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/B,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,GAAG,CAAC,CAAA;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,4EAA4E;YAClF,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,uEAAuE;YAC9F,uFAAuF,CAC1F,CAAA;IACH,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAM;IACR,CAAC;IAED;;;OAGG;IACH,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAClC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,IAAI,GAAG,CAAC,SAAS,KAAK,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,CACxG,CAAA;IAED,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,uDAAuD;YAC7D,GAAG,QAAQ;iBACR,GAAG,CACF,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,SAAS,gBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAC1G;iBACA,IAAI,CAAC,IAAI,CAAC,IAAI;YACjB,8FAA8F;YAC9F,wBAAwB,CAC3B,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * Refuses a decisionKeys declaration that cannot draw, and computes the i18n keys an activity's\n * sentences are read from.\n *\n * ── This path is read from outside ────────────────────────────────────────\n * operato-plant's tests import this file by its built path,\n * `@things-factory/worklist/dist-server/service/activity/decision-key-declaration.js`, for\n * DECISION_ROLES, doorSlug and activityTKey. Moving or renaming it breaks those tests, so treat the\n * path as public.\n *\n * Refusing a declaration that cannot draw:\n *\n * Same reasoning as search keys: a declaration that does not work should fail where it arrives, not\n * where someone opens an approval. The difference is what \"not working\" means here — nothing is\n * dropped by a save, so the failure would be a screen that quietly draws less than it was told to.\n *\n * The shape is spelled out rather than imported. ActivityDecisionKeyItem carries type-graphql\n * decorators and the test runner strips types without reading them, so importing the declared class\n * pulls type-graphql in and the test file fails to load.\n */\ntype DecisionKeyDeclaration = {\n role?: string\n inputPath?: string\n valueTKey?: string\n params?: { [name: string]: string }\n}\n\n/** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */\nexport const DECISION_ROLES = [\n 'headline',\n 'subject',\n 'reversibility',\n 'reason',\n 'evidence',\n 'currentState',\n 'consequence'\n] as const\n\n/**\n * The roles that may appear more than once.\n *\n * An approval can change several things at once — plant's priority change pushes some orders back\n * and moves others ahead — and those are separate consequences, not one merged sentence. Grounds\n * come in several the same way: which inspection, against which spec, decided when.\n *\n * Every other role names a single value. Two headlines would leave the screen picking one with\n * nothing to say why.\n *\n * Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch\n * — an observation, and past — while this is a prediction, and future.\n */\nexport const REPEATABLE_ROLES = ['consequence', 'evidence'] as const\n\n/**\n * The door's part of a value key — the activity's name, kebab-cased.\n *\n * ── Why computed and not declared ─────────────────────────────────────────\n * A declared key is a key table, and a key table is what a computed key exists to avoid: nobody\n * writing a new door picks a key, so none of them can be picked wrong, and a test can count every\n * key that exists rather than every key somebody remembered to register.\n *\n * It is safe to hang this on `name` because `name` cannot move — it is the key the callback is\n * found by, and renaming it makes an approval finish with nothing happening. A key derived from a\n * fixed name is fixed.\n *\n * ── The boundary rule ─────────────────────────────────────────────────────\n * Activity names come in two shapes and this repository has both: 'MES Disposition Approval' and\n * 'BatchRelease'. Splitting only on spaces would leave `batchrelease` beside `mes-disposition-\n * approval`; splitting on every capital would turn 'MES' into `m-e-s`. So the split is between a\n * lowercase or digit and a capital, and between a run of capitals and a capitalised word — the same\n * rule `secretEnvName` uses, written after HOOKSECRET and HOOK_SECRET drifted apart.\n */\nexport function doorSlug(activityName: string): string {\n return String(activityName ?? '')\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')\n .replace(/[^A-Za-z0-9]+/g, '-')\n .toLowerCase()\n .replace(/^-+|-+$/g, '')\n}\n\n/**\n * The i18n key for one slot's **value sentence** — `approval.<door>.<inputPath>`.\n *\n * `inputPath` and not `role`: a door repeats `consequence`, so two slots in one door would collide\n * on role and the later sentence would silently take the earlier one's key. `inputPath` is the one\n * thing already unique within a door, and it is already written in the declaration.\n */\nexport function decisionValueKey(activityName: string, inputPath: string): string {\n return `approval.${doorSlug(activityName)}.${inputPath}`\n}\n\n/**\n * The i18n key for an activity's own sentences — `activity.<door>.label`, `activity.<door>.guide.<n>`.\n *\n * Computed from `name` for the reason decisionValueKey is: nobody picks the key, so none is picked\n * wrong, and an app's test can walk its declarations and count every key that must exist.\n *\n * The server sends the result (Activity.labelTKey, InstallableActivity.labelTKey and guideTKeys);\n * screens draw `t(labelTKey, { defaultValue: label })` and never rebuild the slug. A client file that\n * imported this one would move the whole client build under dist-client/client/.\n *\n * `description` has no key. It is the developers' English line and is not shown to the person\n * doing the work.\n *\n * Guide lines are keyed by position. Inserting a line shifts every later translation by one, and a\n * count of keys does not notice — change guide and its translations in the same edit.\n */\nexport function activityTKey(activityName: string, part: 'label' | 'readiness-notes'): string\nexport function activityTKey(activityName: string, part: 'guide' | 'readiness-gap', index: number): string\nexport function activityTKey(\n activityName: string,\n part: 'label' | 'guide' | 'readiness-notes' | 'readiness-gap',\n index?: number\n): string {\n const door = `activity.${doorSlug(activityName)}`\n\n switch (part) {\n case 'guide':\n return `${door}.guide.${index}`\n case 'readiness-gap':\n return `${door}.readiness-gap.${index}`\n case 'readiness-notes':\n return `${door}.readiness-notes`\n default:\n return `${door}.label`\n }\n}\n\n/**\n * One key per guide line, **always as many as there are lines.** The screen pairs the two arrays\n * by position; a shorter key list would send the last lines out untranslated with nothing to show it.\n */\nexport function activityGuideTKeys(activityName: string, guide: string[] | undefined | null): string[] {\n return (guide || []).map((_, index) => activityTKey(activityName, 'guide', index))\n}\n\n/**\n * The same for what a module declares about its own readiness.\n *\n * The catalog screen draws `readiness.gaps` and `readiness.notes` as sentences, and those come out\n * of a catalog that is built at boot, before anyone's locale is known. So the module keeps writing\n * sentences and the screen reads a translation of them, exactly as it does for label and guide\n * (ADR-0054: the sentence is chosen where `context.t` is).\n */\nexport function activityReadinessGapTKeys(activityName: string, gaps: string[] | undefined | null): string[] {\n return (gaps || []).map((_, index) => activityTKey(activityName, 'readiness-gap', index))\n}\n\nexport function assertDecisionKeysAreUsable(\n decisionKeys: DecisionKeyDeclaration[] | undefined,\n activityName?: string\n): void {\n if (!decisionKeys?.length) {\n return\n }\n\n const named = activityName ? `activity \"${activityName}\"` : 'this activity'\n\n const unknown = decisionKeys.filter(key => !(DECISION_ROLES as readonly string[]).includes(String(key?.role ?? '')))\n\n if (unknown.length) {\n throw new Error(\n `${named} declares decision keys with a role the approval screen does not know: ` +\n `${unknown.map(key => `\"${key?.role ?? ''}\"`).join(', ')}. ` +\n `Known roles are ${DECISION_ROLES.join(', ')}. A role outside that set draws nothing.`\n )\n }\n\n const pathless = decisionKeys.filter(key => !String(key?.inputPath ?? '').trim())\n\n if (pathless.length) {\n throw new Error(\n `${named} declares ${pathless.length} decision key(s) with no inputPath. ` +\n `A decision key names the value it draws; without a path there is nothing to read.`\n )\n }\n\n /*\n * An index or a wildcard resolves to nothing at draw time and the slot would report \"the path led\n * nowhere\" — which reads as a payload that disagrees with the declaration, when the truth is that\n * the declaration used a path language that does not exist. Refusing here says which it was.\n */\n const notPaths = decisionKeys.filter(key => /[[\\]*]/.test(String(key?.inputPath ?? '')))\n\n if (notPaths.length) {\n throw new Error(\n `${named} declares decision keys whose inputPath is not a plain dotted path: ` +\n `${notPaths.map(key => `\"${key?.inputPath ?? ''}\"`).join(', ')}. ` +\n `Dots only — no array index and no wildcard. Point at the list itself; drawing its items is ` +\n `the slot's work.`\n )\n }\n\n const repeated = DECISION_ROLES.filter(\n role =>\n !(REPEATABLE_ROLES as readonly string[]).includes(role) &&\n decisionKeys.filter(key => key?.role === role).length > 1\n )\n\n if (repeated.length) {\n throw new Error(\n `${named} declares more than one \"${repeated.join('\", \"')}\" decision key. ` +\n `Only ${REPEATABLE_ROLES.map(role => `\"${role}\"`).join(' and ')} may repeat — an approval can ` +\n `change several things at once, and grounds come in several. The screen would draw one of the ` +\n `others and could not say which.`\n )\n }\n\n /*\n * A sentence may only be built from values that were snapshotted, so every params value is an\n * inputPath and reads by the same rules. Wanting a value with no field behind it means the field\n * is missing, not that params needs a second source — the two hold each other up: without the\n * value the sentence cannot be rebuilt, and a value a sentence uses is guaranteed to stay.\n *\n * Only the right side has a rule. The names on the left belong to the sentence and are the\n * locale file's business.\n */\n const badParams: string[] = []\n\n for (const key of decisionKeys) {\n for (const [name, path] of Object.entries(key?.params || {})) {\n const said = String(path ?? '')\n\n if (!said.trim()) {\n badParams.push(`\"${name}\" (empty)`)\n } else if (/[[\\]*]/.test(said)) {\n badParams.push(`\"${name}\": \"${said}\"`)\n }\n }\n }\n\n if (badParams.length) {\n throw new Error(\n `${named} declares sentence params that are not plain dotted paths into the input: ` +\n `${badParams.join(', ')}. Every params value is an inputPath — a sentence is built only from ` +\n `values the request froze, so a value with nowhere to read it from is a missing field.`\n )\n }\n\n if (!activityName) {\n return\n }\n\n /*\n * The key is computed, so a declared one that disagrees is a typo that would draw `approval.…` on\n * the card. Checking it here rather than trusting the writer is the whole reason it is computed.\n */\n const wrongKey = decisionKeys.filter(\n key => key?.valueTKey && key.valueTKey !== decisionValueKey(activityName, String(key?.inputPath ?? ''))\n )\n\n if (wrongKey.length) {\n throw new Error(\n `${named} declares value keys that are not the computed ones: ` +\n `${wrongKey\n .map(\n key => `\"${key?.valueTKey}\" (expected \"${decisionValueKey(activityName, String(key?.inputPath ?? ''))}\")`\n )\n .join(', ')}. ` +\n `The key is approval.<door>.<inputPath> and nobody picks it — a key nobody can pick is a key ` +\n `nobody can pick wrong.`\n )\n }\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import { EntitySubscriberInterface, InsertEvent, UpdateEvent } from 'typeorm';
2
+ import { Activity } from './activity.js';
3
+ /**
4
+ * **One place, because there are five ways in.**
5
+ *
6
+ * Activities are saved by createActivity, updateActivity, multipleUpsertActivities, the importer,
7
+ * and installActivity. A check written at each of those is not a rule — it is five things to
8
+ * remember, and the sixth way in arrives without it.
9
+ *
10
+ * TypeORM's subscriber is the seam every one of them passes through. Throwing here aborts the
11
+ * transaction, so a refused model is never half-written.
12
+ *
13
+ * A template carrying such a field is caught here too: installActivity saves an Activity from it.
14
+ *
15
+ * What is refused here are declarations that cannot work — not policy about what an activity may
16
+ * mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would
17
+ * otherwise be accepted, dropped, and reported as saved.
18
+ */
19
+ export declare class ActivityDeclarationGuardSubscriber implements EntitySubscriberInterface<Activity> {
20
+ listenTo(): typeof Activity;
21
+ beforeInsert(event: InsertEvent<Activity>): void;
22
+ beforeUpdate(event: UpdateEvent<Activity>): void;
23
+ private assertDeclarable;
24
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityDeclarationGuardSubscriber = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const activity_js_1 = require("./activity.js");
7
+ const credential_field_js_1 = require("./credential-field.js");
8
+ const search_key_declaration_js_1 = require("./search-key-declaration.js");
9
+ const decision_key_declaration_js_1 = require("./decision-key-declaration.js");
10
+ /**
11
+ * **One place, because there are five ways in.**
12
+ *
13
+ * Activities are saved by createActivity, updateActivity, multipleUpsertActivities, the importer,
14
+ * and installActivity. A check written at each of those is not a rule — it is five things to
15
+ * remember, and the sixth way in arrives without it.
16
+ *
17
+ * TypeORM's subscriber is the seam every one of them passes through. Throwing here aborts the
18
+ * transaction, so a refused model is never half-written.
19
+ *
20
+ * A template carrying such a field is caught here too: installActivity saves an Activity from it.
21
+ *
22
+ * What is refused here are declarations that cannot work — not policy about what an activity may
23
+ * mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would
24
+ * otherwise be accepted, dropped, and reported as saved.
25
+ */
26
+ let ActivityDeclarationGuardSubscriber = class ActivityDeclarationGuardSubscriber {
27
+ listenTo() {
28
+ return activity_js_1.Activity;
29
+ }
30
+ beforeInsert(event) {
31
+ this.assertDeclarable(event.entity);
32
+ }
33
+ beforeUpdate(event) {
34
+ this.assertDeclarable(event.entity);
35
+ }
36
+ assertDeclarable(activity) {
37
+ (0, credential_field_js_1.assertNoCredentialField)(activity?.model, activity?.name);
38
+ (0, search_key_declaration_js_1.assertSearchKeysAreUsable)(activity?.searchKeys, activity?.name);
39
+ (0, decision_key_declaration_js_1.assertDecisionKeysAreUsable)(activity?.decisionKeys, activity?.name);
40
+ }
41
+ };
42
+ exports.ActivityDeclarationGuardSubscriber = ActivityDeclarationGuardSubscriber;
43
+ exports.ActivityDeclarationGuardSubscriber = ActivityDeclarationGuardSubscriber = tslib_1.__decorate([
44
+ (0, typeorm_1.EventSubscriber)()
45
+ ], ActivityDeclarationGuardSubscriber);
46
+ //# sourceMappingURL=declaration-guard-subscriber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declaration-guard-subscriber.js","sourceRoot":"","sources":["../../../server/service/activity/declaration-guard-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAE9F,+CAAwC;AACxC,+DAA+D;AAC/D,2EAAuE;AACvE,+EAA2E;AAE3E;;;;;;;;;;;;;;;GAeG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC7C,QAAQ;QACN,OAAO,sBAAQ,CAAA;IACjB,CAAC;IAED,YAAY,CAAC,KAA4B;QACvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,YAAY,CAAC,KAA4B;QACvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAkB,CAAC,CAAA;IACjD,CAAC;IAEO,gBAAgB,CAAC,QAAmB;QAC1C,IAAA,6CAAuB,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QACxD,IAAA,qDAAyB,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QAC/D,IAAA,yDAA2B,EAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;IACrE,CAAC;CACF,CAAA;AAlBY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,yBAAe,GAAE;GACL,kCAAkC,CAkB9C","sourcesContent":["import { EntitySubscriberInterface, EventSubscriber, InsertEvent, UpdateEvent } from 'typeorm'\n\nimport { Activity } from './activity.js'\nimport { assertNoCredentialField } from './credential-field.js'\nimport { assertSearchKeysAreUsable } from './search-key-declaration.js'\nimport { assertDecisionKeysAreUsable } from './decision-key-declaration.js'\n\n/**\n * **One place, because there are five ways in.**\n *\n * Activities are saved by createActivity, updateActivity, multipleUpsertActivities, the importer,\n * and installActivity. A check written at each of those is not a rule — it is five things to\n * remember, and the sixth way in arrives without it.\n *\n * TypeORM's subscriber is the seam every one of them passes through. Throwing here aborts the\n * transaction, so a refused model is never half-written.\n *\n * A template carrying such a field is caught here too: installActivity saves an Activity from it.\n *\n * What is refused here are declarations that cannot work — not policy about what an activity may\n * mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would\n * otherwise be accepted, dropped, and reported as saved.\n */\n@EventSubscriber()\nexport class ActivityDeclarationGuardSubscriber implements EntitySubscriberInterface<Activity> {\n listenTo() {\n return Activity\n }\n\n beforeInsert(event: InsertEvent<Activity>) {\n this.assertDeclarable(event.entity)\n }\n\n beforeUpdate(event: UpdateEvent<Activity>) {\n this.assertDeclarable(event.entity as Activity)\n }\n\n private assertDeclarable(activity?: Activity) {\n assertNoCredentialField(activity?.model, activity?.name)\n assertSearchKeysAreUsable(activity?.searchKeys, activity?.name)\n assertDecisionKeysAreUsable(activity?.decisionKeys, activity?.name)\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
+ import { Activity } from './activity.js';
3
+ import { ActivityHistory } from './activity-history.js';
4
+ export declare class ActivityHistoryEntitySubscriber extends HistoryEntitySubscriber<Activity, ActivityHistory> {
5
+ get entity(): typeof Activity;
6
+ get historyEntity(): typeof ActivityHistory;
7
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityHistoryEntitySubscriber = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const typeorm_history_1 = require("@operato/typeorm-history");
7
+ const activity_js_1 = require("./activity.js");
8
+ const activity_history_js_1 = require("./activity-history.js");
9
+ let ActivityHistoryEntitySubscriber = class ActivityHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
10
+ get entity() {
11
+ return activity_js_1.Activity;
12
+ }
13
+ get historyEntity() {
14
+ return activity_history_js_1.ActivityHistory;
15
+ }
16
+ };
17
+ exports.ActivityHistoryEntitySubscriber = ActivityHistoryEntitySubscriber;
18
+ exports.ActivityHistoryEntitySubscriber = ActivityHistoryEntitySubscriber = tslib_1.__decorate([
19
+ (0, typeorm_1.EventSubscriber)()
20
+ ], ActivityHistoryEntitySubscriber);
21
+ //# sourceMappingURL=event-subscriber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/activity/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,+CAAwC;AACxC,+DAAuD;AAGhD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,yCAAkD;IACrG,IAAW,MAAM;QACf,OAAO,sBAAQ,CAAA;IACjB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,qCAAe,CAAA;IACxB,CAAC;CAEF,CAAA;AATY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,yBAAe,GAAE;GACL,+BAA+B,CAS3C","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Activity } from './activity.js'\nimport { ActivityHistory } from './activity-history.js'\n\n@EventSubscriber()\nexport class ActivityHistoryEntitySubscriber extends HistoryEntitySubscriber<Activity, ActivityHistory> {\n public get entity() {\n return Activity\n }\n\n public get historyEntity() {\n return ActivityHistory\n }\n\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { DecisionSentenceKey } from '../../../shared/decision-sentences.js';
2
+ /**
3
+ * An approval input with its value sentences frozen **in one language**, read from the server's translations.
4
+ *
5
+ * ── Why here (2026-10-11, chief architect ruling) ──────────────────────────
6
+ * plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),
7
+ * 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives
8
+ * here and the applications call it. The translator does not fall back to another language: a sentence missing in
9
+ * `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.
10
+ */
11
+ export declare function freezeDecisionSentencesFor<T>(decisionKeys: DecisionSentenceKey[] | null | undefined, input: T, locale: string): T;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.freezeDecisionSentencesFor = freezeDecisionSentencesFor;
4
+ const translator_1 = require("@things-factory/i18n-base/translator");
5
+ const decision_sentences_js_1 = require("../../../shared/decision-sentences.js");
6
+ /**
7
+ * An approval input with its value sentences frozen **in one language**, read from the server's translations.
8
+ *
9
+ * ── Why here (2026-10-11, chief architect ruling) ──────────────────────────
10
+ * plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),
11
+ * 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives
12
+ * here and the applications call it. The translator does not fall back to another language: a sentence missing in
13
+ * `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.
14
+ */
15
+ function freezeDecisionSentencesFor(decisionKeys, input, locale) {
16
+ return (0, decision_sentences_js_1.freezeDecisionSentences)(decisionKeys, input, (0, translator_1.translatorFor)(locale), locale);
17
+ }
18
+ //# sourceMappingURL=freeze-decision-sentences-for.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"freeze-decision-sentences-for.js","sourceRoot":"","sources":["../../../server/service/activity/freeze-decision-sentences-for.ts"],"names":[],"mappings":";;AAcA,gEAMC;AApBD,qEAAoE;AAEpE,iFAA+E;AAG/E;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACxC,YAAsD,EACtD,KAAQ,EACR,MAAc;IAEd,OAAO,IAAA,+CAAuB,EAAC,YAAY,EAAE,KAAK,EAAE,IAAA,0BAAa,EAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;AACpF,CAAC","sourcesContent":["import { translatorFor } from '@things-factory/i18n-base/translator'\n\nimport { freezeDecisionSentences } from '../../../shared/decision-sentences.js'\nimport type { DecisionSentenceKey } from '../../../shared/decision-sentences.js'\n\n/**\n * An approval input with its value sentences frozen **in one language**, read from the server's translations.\n *\n * ── Why here (2026-10-11, chief architect ruling) ──────────────────────────\n * plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),\n * 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives\n * here and the applications call it. The translator does not fall back to another language: a sentence missing in\n * `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.\n */\nexport function freezeDecisionSentencesFor<T>(\n decisionKeys: DecisionSentenceKey[] | null | undefined,\n input: T,\n locale: string\n): T {\n return freezeDecisionSentences(decisionKeys, input, translatorFor(locale), locale)\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import { Activity } from "./activity.js";
2
+ import { ActivityHistory } from "./activity-history.js";
3
+ import { ActivityMutation } from "./activity-mutation.js";
4
+ import { ActivityQuery } from "./activity-query.js";
5
+ import { ActivityHistoryEntitySubscriber } from "./event-subscriber.js";
6
+ import { ActivityDeclarationGuardSubscriber } from "./declaration-guard-subscriber.js";
7
+ export declare const entities: (typeof Activity | typeof ActivityHistory)[];
8
+ export declare const resolvers: (typeof ActivityMutation | typeof ActivityQuery)[];
9
+ export declare const subscribers: (typeof ActivityHistoryEntitySubscriber | typeof ActivityDeclarationGuardSubscriber)[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscribers = exports.resolvers = exports.entities = void 0;
4
+ const activity_js_1 = require("./activity.js");
5
+ const activity_history_js_1 = require("./activity-history.js");
6
+ const activity_mutation_js_1 = require("./activity-mutation.js");
7
+ const activity_query_js_1 = require("./activity-query.js");
8
+ const event_subscriber_js_1 = require("./event-subscriber.js");
9
+ const declaration_guard_subscriber_js_1 = require("./declaration-guard-subscriber.js");
10
+ exports.entities = [activity_js_1.Activity, activity_history_js_1.ActivityHistory];
11
+ exports.resolvers = [activity_query_js_1.ActivityQuery, activity_mutation_js_1.ActivityMutation];
12
+ exports.subscribers = [event_subscriber_js_1.ActivityHistoryEntitySubscriber, declaration_guard_subscriber_js_1.ActivityDeclarationGuardSubscriber];
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/activity/index.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAAuD;AACvD,iEAAyD;AACzD,2DAAmD;AACnD,+DAAuE;AACvE,uFAAsF;AAEzE,QAAA,QAAQ,GAAG,CAAC,sBAAQ,EAAE,qCAAe,CAAC,CAAA;AACtC,QAAA,SAAS,GAAG,CAAC,iCAAa,EAAE,uCAAgB,CAAC,CAAA;AAC7C,QAAA,WAAW,GAAG,CAAC,qDAA+B,EAAE,oEAAkC,CAAC,CAAA","sourcesContent":["import { Activity } from \"./activity.js\"\nimport { ActivityHistory } from \"./activity-history.js\"\nimport { ActivityMutation } from \"./activity-mutation.js\"\nimport { ActivityQuery } from \"./activity-query.js\"\nimport { ActivityHistoryEntitySubscriber } from \"./event-subscriber.js\"\nimport { ActivityDeclarationGuardSubscriber } from \"./declaration-guard-subscriber.js\"\n\nexport const entities = [Activity, ActivityHistory]\nexport const resolvers = [ActivityQuery, ActivityMutation]\nexport const subscribers = [ActivityHistoryEntitySubscriber, ActivityDeclarationGuardSubscriber]\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The shape this rule needs, spelled out rather than imported.
3
+ *
4
+ * ActivitySearchKeyItem carries type-graphql decorators, and the test runner parses TypeScript by
5
+ * stripping types — it reads neither a decorator nor an enum. Importing the declared class pulls
6
+ * type-graphql in and the whole test file fails to load, which is what happened when this module
7
+ * first imported it (2026-09-09). A rule about a field's text needs only the field.
8
+ */
9
+ type SearchKeyDeclaration = {
10
+ inputKey?: string;
11
+ };
12
+ /**
13
+ * How many search keys an activity may declare.
14
+ *
15
+ * fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has
16
+ * key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to
17
+ * key06, a column that does not exist. A spread save drops a field it does not recognise and reports
18
+ * success, which means the declaration looks accepted, the value is never stored, and searching on
19
+ * that axis answers zero rows with no error anywhere.
20
+ *
21
+ * Nothing declares six today: twelve declarations across four repositories, the largest three
22
+ * (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find
23
+ * out.
24
+ */
25
+ export declare const MOST_SEARCH_KEYS = 5;
26
+ /**
27
+ * Why a dotted key cannot work here.
28
+ *
29
+ * fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by
30
+ * its first element because the value goes into a searchable column. A dot in that name looks up a
31
+ * property literally called "shift.passes", finds nothing, and the axis is quietly left unfilled.
32
+ *
33
+ * ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value
34
+ * to draw rather than one to index. The two names are different so that using the wrong one is
35
+ * visible rather than silent. (2026-09-09, architect's ruling)
36
+ */
37
+ export declare function assertSearchKeysAreUsable(searchKeys: SearchKeyDeclaration[] | undefined, activityName?: string): void;
38
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MOST_SEARCH_KEYS = void 0;
4
+ exports.assertSearchKeysAreUsable = assertSearchKeysAreUsable;
5
+ /**
6
+ * How many search keys an activity may declare.
7
+ *
8
+ * fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has
9
+ * key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to
10
+ * key06, a column that does not exist. A spread save drops a field it does not recognise and reports
11
+ * success, which means the declaration looks accepted, the value is never stored, and searching on
12
+ * that axis answers zero rows with no error anywhere.
13
+ *
14
+ * Nothing declares six today: twelve declarations across four repositories, the largest three
15
+ * (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find
16
+ * out.
17
+ */
18
+ exports.MOST_SEARCH_KEYS = 5;
19
+ /**
20
+ * Why a dotted key cannot work here.
21
+ *
22
+ * fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by
23
+ * its first element because the value goes into a searchable column. A dot in that name looks up a
24
+ * property literally called "shift.passes", finds nothing, and the axis is quietly left unfilled.
25
+ *
26
+ * ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value
27
+ * to draw rather than one to index. The two names are different so that using the wrong one is
28
+ * visible rather than silent. (2026-09-09, architect's ruling)
29
+ */
30
+ function assertSearchKeysAreUsable(searchKeys, activityName) {
31
+ if (!searchKeys?.length) {
32
+ return;
33
+ }
34
+ const named = activityName ? `activity "${activityName}"` : 'this activity';
35
+ if (searchKeys.length > exports.MOST_SEARCH_KEYS) {
36
+ throw new Error(`${named} declares ${searchKeys.length} search keys, and an activity instance has only ` +
37
+ `${exports.MOST_SEARCH_KEYS} columns to hold them (key01..key0${exports.MOST_SEARCH_KEYS}). ` +
38
+ `Keys past the ${exports.MOST_SEARCH_KEYS}th would be dropped without an error and searching on ` +
39
+ `them would answer zero rows.`);
40
+ }
41
+ const dotted = searchKeys.filter(key => String(key?.inputKey ?? '').includes('.'));
42
+ if (dotted.length) {
43
+ throw new Error(`${named} declares search keys whose inputKey holds a path: ` +
44
+ `${dotted.map(key => `"${key.inputKey}"`).join(', ')}. ` +
45
+ `A search key names one top-level key of the input, because its value goes into a searchable ` +
46
+ `column. Use ActivityDecisionKeyItem.inputPath for a value nested inside the input.`);
47
+ }
48
+ }
49
+ //# sourceMappingURL=search-key-declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-key-declaration.js","sourceRoot":"","sources":["../../../server/service/activity/search-key-declaration.ts"],"names":[],"mappings":";;;AAoCA,8DA0BC;AApDD;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG,CAAC,CAAA;AAEjC;;;;;;;;;;GAUG;AACH,SAAgB,yBAAyB,CAAC,UAA8C,EAAE,YAAqB;IAC7G,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,GAAG,CAAC,CAAC,CAAC,eAAe,CAAA;IAE3E,IAAI,UAAU,CAAC,MAAM,GAAG,wBAAgB,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,aAAa,UAAU,CAAC,MAAM,kDAAkD;YACtF,GAAG,wBAAgB,qCAAqC,wBAAgB,KAAK;YAC7E,iBAAiB,wBAAgB,wDAAwD;YACzF,8BAA8B,CACjC,CAAA;IACH,CAAC;IAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;IAElF,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,qDAAqD;YAC3D,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACxD,8FAA8F;YAC9F,oFAAoF,CACvF,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * The shape this rule needs, spelled out rather than imported.\n *\n * ActivitySearchKeyItem carries type-graphql decorators, and the test runner parses TypeScript by\n * stripping types — it reads neither a decorator nor an enum. Importing the declared class pulls\n * type-graphql in and the whole test file fails to load, which is what happened when this module\n * first imported it (2026-09-09). A rule about a field's text needs only the field.\n */\ntype SearchKeyDeclaration = { inputKey?: string }\n\n/**\n * How many search keys an activity may declare.\n *\n * fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has\n * key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to\n * key06, a column that does not exist. A spread save drops a field it does not recognise and reports\n * success, which means the declaration looks accepted, the value is never stored, and searching on\n * that axis answers zero rows with no error anywhere.\n *\n * Nothing declares six today: twelve declarations across four repositories, the largest three\n * (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find\n * out.\n */\nexport const MOST_SEARCH_KEYS = 5\n\n/**\n * Why a dotted key cannot work here.\n *\n * fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by\n * its first element because the value goes into a searchable column. A dot in that name looks up a\n * property literally called \"shift.passes\", finds nothing, and the axis is quietly left unfilled.\n *\n * ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value\n * to draw rather than one to index. The two names are different so that using the wrong one is\n * visible rather than silent. (2026-09-09, architect's ruling)\n */\nexport function assertSearchKeysAreUsable(searchKeys: SearchKeyDeclaration[] | undefined, activityName?: string): void {\n if (!searchKeys?.length) {\n return\n }\n\n const named = activityName ? `activity \"${activityName}\"` : 'this activity'\n\n if (searchKeys.length > MOST_SEARCH_KEYS) {\n throw new Error(\n `${named} declares ${searchKeys.length} search keys, and an activity instance has only ` +\n `${MOST_SEARCH_KEYS} columns to hold them (key01..key0${MOST_SEARCH_KEYS}). ` +\n `Keys past the ${MOST_SEARCH_KEYS}th would be dropped without an error and searching on ` +\n `them would answer zero rows.`\n )\n }\n\n const dotted = searchKeys.filter(key => String(key?.inputKey ?? '').includes('.'))\n\n if (dotted.length) {\n throw new Error(\n `${named} declares search keys whose inputKey holds a path: ` +\n `${dotted.map(key => `\"${key.inputKey}\"`).join(', ')}. ` +\n `A search key names one top-level key of the input, because its value goes into a searchable ` +\n `column. Use ActivityDecisionKeyItem.inputPath for a value nested inside the input.`\n )\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { ObjectRef } from '@things-factory/shell';
2
+ import { ActivityApproval } from './activity-approval.js';
3
+ export declare class ActivityApprovalMutation {
4
+ saveActivityApproval(id: string, comment: string, context: ResolverContext): Promise<ActivityApproval>;
5
+ approveActivityApproval(id: string, comment: string, context: ResolverContext): Promise<ActivityApproval>;
6
+ rejectActivityApproval(id: string, comment: string, context: ResolverContext): Promise<ActivityApproval>;
7
+ delegateActivityApproval(id: string, to: ObjectRef, comment: string, context: ResolverContext): Promise<ActivityApproval>;
8
+ }