@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,47 @@
1
+ /**
2
+ * One key cannot be both a built activity and a declaration that it is not built yet.
3
+ *
4
+ * ── Why both directions ───────────────────────────────────────────────────
5
+ * declareIntendedActivity already refused a key that was installed. installActivityTemplate did not
6
+ * refuse a key that was declared, so which order a module happened to boot in decided whether the
7
+ * conflict was caught at all — declare-then-install slipped through and left the key in both
8
+ * registries.
9
+ *
10
+ * The catalog reads both and concatenates them, so the same work is drawn twice: once as working and
11
+ * once as planned, with the count strip off by one. A reader takes the planned row for work still to
12
+ * come. Nothing throws and nothing is logged.
13
+ *
14
+ * Deduplicating at the read would hide the broken state instead of preventing it, so the two
15
+ * refusals are made symmetric and the read is left alone.
16
+ *
17
+ * ── Which one wins ───────────────────────────────────────────────────────
18
+ * The built activity. A declaration says "this does not exist yet", and once it exists the
19
+ * declaration is simply stale — so both messages say to delete the declaration, and neither
20
+ * suggests removing the activity.
21
+ *
22
+ * The shapes are spelled out as key presence rather than imported: InstallableActivity carries
23
+ * type-graphql decorators, and the test runner strips types without reading them.
24
+ */
25
+ type KeyedByName = {
26
+ [key: string]: unknown;
27
+ };
28
+ /** Called when a declaration arrives. */
29
+ export declare function assertNotAlreadyInstalled(key: string, installed: KeyedByName): void;
30
+ /** Called when a template arrives. */
31
+ export declare function assertNotDeclaredIntended(key: string, intended: KeyedByName): void;
32
+ /**
33
+ * Two doors must not fold to the same slug — **their value sentences would overwrite each other.**
34
+ *
35
+ * The i18n key for a decision slot is `approval.<door>.<inputPath>` and `<door>` is the activity
36
+ * name kebab-cased, so two names differing only where the slug does not look (`Batch Release` and
37
+ * `BatchRelease`) land on one key. Then one door's sentences are drawn on the other's card, in
38
+ * whichever order the locale file happened to be written.
39
+ *
40
+ * Nothing throws when that happens and nothing is logged — the card simply says the wrong thing
41
+ * about an approval somebody is about to give. It cannot happen today, which is why it is checked
42
+ * now rather than after a door finds it.
43
+ *
44
+ * Refused where the second template arrives, so the message can name both.
45
+ */
46
+ export declare function assertDoorSlugIsFree(name: string, slugOf: (name: string) => string, installed: KeyedByName): void;
47
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertNotAlreadyInstalled = assertNotAlreadyInstalled;
4
+ exports.assertNotDeclaredIntended = assertNotDeclaredIntended;
5
+ exports.assertDoorSlugIsFree = assertDoorSlugIsFree;
6
+ /** Called when a declaration arrives. */
7
+ function assertNotAlreadyInstalled(key, installed) {
8
+ if (!installed?.[key]) {
9
+ return;
10
+ }
11
+ throw new Error(`declareIntendedActivity: "${key}" is already installed as an activity. ` +
12
+ 'Remove the declaration now that the activity exists.');
13
+ }
14
+ /** Called when a template arrives. */
15
+ function assertNotDeclaredIntended(key, intended) {
16
+ if (!intended?.[key]) {
17
+ return;
18
+ }
19
+ throw new Error(`installActivityTemplate: "${key}" is also declared as intended — work identified but not built. ` +
20
+ 'Remove the declaration now that the activity exists.');
21
+ }
22
+ /**
23
+ * Two doors must not fold to the same slug — **their value sentences would overwrite each other.**
24
+ *
25
+ * The i18n key for a decision slot is `approval.<door>.<inputPath>` and `<door>` is the activity
26
+ * name kebab-cased, so two names differing only where the slug does not look (`Batch Release` and
27
+ * `BatchRelease`) land on one key. Then one door's sentences are drawn on the other's card, in
28
+ * whichever order the locale file happened to be written.
29
+ *
30
+ * Nothing throws when that happens and nothing is logged — the card simply says the wrong thing
31
+ * about an approval somebody is about to give. It cannot happen today, which is why it is checked
32
+ * now rather than after a door finds it.
33
+ *
34
+ * Refused where the second template arrives, so the message can name both.
35
+ */
36
+ function assertDoorSlugIsFree(name, slugOf, installed) {
37
+ const slug = slugOf(name);
38
+ const taken = Object.keys(installed || {}).find(one => one !== name && slugOf(one) === slug);
39
+ if (!taken) {
40
+ return;
41
+ }
42
+ throw new Error(`activity "${name}" folds to the same door key as "${taken}" ("${slug}"). ` +
43
+ `The approval card reads its sentences from approval.${slug}.<inputPath>, so the two would ` +
44
+ `draw each other's words with nothing to say which. Give one of them a name that reads ` +
45
+ `differently, not one that only looks different.`);
46
+ }
47
+ //# sourceMappingURL=registry-conflict.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-conflict.js","sourceRoot":"","sources":["../../../server/controllers/activity-installation/registry-conflict.ts"],"names":[],"mappings":";;AA2BA,8DASC;AAGD,8DASC;AAgBD,oDAeC;AArDD,yCAAyC;AACzC,SAAgB,yBAAyB,CAAC,GAAW,EAAE,SAAsB;IAC3E,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,6BAA6B,GAAG,yCAAyC;QACvE,sDAAsD,CACzD,CAAA;AACH,CAAC;AAED,sCAAsC;AACtC,SAAgB,yBAAyB,CAAC,GAAW,EAAE,QAAqB;IAC1E,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,6BAA6B,GAAG,kEAAkE;QAChG,sDAAsD,CACzD,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,oBAAoB,CAAC,IAAY,EAAE,MAAgC,EAAE,SAAsB;IACzG,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IAEzB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAA;IAE5F,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,aAAa,IAAI,oCAAoC,KAAK,OAAO,IAAI,MAAM;QACzE,uDAAuD,IAAI,iCAAiC;QAC5F,wFAAwF;QACxF,iDAAiD,CACpD,CAAA;AACH,CAAC","sourcesContent":["/**\n * One key cannot be both a built activity and a declaration that it is not built yet.\n *\n * ── Why both directions ───────────────────────────────────────────────────\n * declareIntendedActivity already refused a key that was installed. installActivityTemplate did not\n * refuse a key that was declared, so which order a module happened to boot in decided whether the\n * conflict was caught at all — declare-then-install slipped through and left the key in both\n * registries.\n *\n * The catalog reads both and concatenates them, so the same work is drawn twice: once as working and\n * once as planned, with the count strip off by one. A reader takes the planned row for work still to\n * come. Nothing throws and nothing is logged.\n *\n * Deduplicating at the read would hide the broken state instead of preventing it, so the two\n * refusals are made symmetric and the read is left alone.\n *\n * ── Which one wins ───────────────────────────────────────────────────────\n * The built activity. A declaration says \"this does not exist yet\", and once it exists the\n * declaration is simply stale — so both messages say to delete the declaration, and neither\n * suggests removing the activity.\n *\n * The shapes are spelled out as key presence rather than imported: InstallableActivity carries\n * type-graphql decorators, and the test runner strips types without reading them.\n */\ntype KeyedByName = { [key: string]: unknown }\n\n/** Called when a declaration arrives. */\nexport function assertNotAlreadyInstalled(key: string, installed: KeyedByName): void {\n if (!installed?.[key]) {\n return\n }\n\n throw new Error(\n `declareIntendedActivity: \"${key}\" is already installed as an activity. ` +\n 'Remove the declaration now that the activity exists.'\n )\n}\n\n/** Called when a template arrives. */\nexport function assertNotDeclaredIntended(key: string, intended: KeyedByName): void {\n if (!intended?.[key]) {\n return\n }\n\n throw new Error(\n `installActivityTemplate: \"${key}\" is also declared as intended — work identified but not built. ` +\n 'Remove the declaration now that the activity exists.'\n )\n}\n\n/**\n * Two doors must not fold to the same slug — **their value sentences would overwrite each other.**\n *\n * The i18n key for a decision slot is `approval.<door>.<inputPath>` and `<door>` is the activity\n * name kebab-cased, so two names differing only where the slug does not look (`Batch Release` and\n * `BatchRelease`) land on one key. Then one door's sentences are drawn on the other's card, in\n * whichever order the locale file happened to be written.\n *\n * Nothing throws when that happens and nothing is logged — the card simply says the wrong thing\n * about an approval somebody is about to give. It cannot happen today, which is why it is checked\n * now rather than after a door finds it.\n *\n * Refused where the second template arrives, so the message can name both.\n */\nexport function assertDoorSlugIsFree(name: string, slugOf: (name: string) => string, installed: KeyedByName): void {\n const slug = slugOf(name)\n\n const taken = Object.keys(installed || {}).find(one => one !== name && slugOf(one) === slug)\n\n if (!taken) {\n return\n }\n\n throw new Error(\n `activity \"${name}\" folds to the same door key as \"${taken}\" (\"${slug}\"). ` +\n `The approval card reads its sentences from approval.${slug}.<inputPath>, so the two would ` +\n `draw each other's words with nothing to say which. Give one of them a name that reads ` +\n `differently, not one that only looks different.`\n )\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { ActivityInstance } from '../../service/activity-instance/activity-instance.js';
2
+ export declare function abort({ id, reason }: {
3
+ id: string;
4
+ reason: string;
5
+ }, context: ResolverContext): Promise<ActivityInstance>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.abort = abort;
4
+ const activity_thread_js_1 = require("../../service/activity-thread/activity-thread.js");
5
+ const activity_instance_js_1 = require("../../service/activity-instance/activity-instance.js");
6
+ const common_js_1 = require("../common.js");
7
+ const _abort_js_1 = require("../activity-thread/_abort.js");
8
+ async function abort({ id, reason }, context) {
9
+ const { domain, user, tx } = context.state;
10
+ var repository = tx.getRepository(activity_instance_js_1.ActivityInstance);
11
+ var activityInstance = await repository.findOne({
12
+ where: { domain: { id: domain.id }, id },
13
+ relations: [
14
+ 'domain',
15
+ 'activity',
16
+ 'activityThreads',
17
+ 'assigneeRoles',
18
+ 'supervisoryRole',
19
+ 'updater',
20
+ 'creator',
21
+ 'starter',
22
+ 'terminator'
23
+ ]
24
+ });
25
+ if (!activityInstance) {
26
+ throw new Error(context.t('error.activity-instance not found', {
27
+ activityInstance: id
28
+ }));
29
+ }
30
+ /*
31
+ Prerequisites for a Task to Be Aborted.
32
+ - The previous state of the task must not be End or Aborted.
33
+ */
34
+ if (activityInstance.state == activity_instance_js_1.ActivityInstanceStatus.Aborted ||
35
+ activityInstance.state == activity_instance_js_1.ActivityInstanceStatus.Ended) {
36
+ throw new Error(context.t(`error.activity-instance is already terminated`, {
37
+ id,
38
+ state: activityInstance.state
39
+ }));
40
+ }
41
+ /*
42
+ Actions to be processed when a task is aborted
43
+ - All related activity threads must be aborted.
44
+ */
45
+ const TERMINATED = [activity_thread_js_1.ActivityThreadStatus.Aborted, activity_thread_js_1.ActivityThreadStatus.Ended];
46
+ for (let activityThread of activityInstance.activityThreads) {
47
+ if (TERMINATED.includes(activityThread.state)) {
48
+ continue;
49
+ }
50
+ await (0, _abort_js_1._abort)({ activityThread, reason }, context);
51
+ }
52
+ return await repository.save({
53
+ ...activityInstance,
54
+ reason,
55
+ ...(await (0, common_js_1.evalActivityInstanceState)(id, context)),
56
+ transaction: 'abort',
57
+ updater: user,
58
+ terminatedAt: new Date(),
59
+ terminator: user
60
+ });
61
+ }
62
+ //# sourceMappingURL=abort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/abort.ts"],"names":[],"mappings":";;AAMA,sBAuEC;AA7ED,yFAAuF;AACvF,+FAA+G;AAC/G,4CAAwD;AAExD,4DAA4E;AAErE,KAAK,UAAU,KAAK,CACzB,EAAE,EAAE,EAAE,MAAM,EAAkC,EAC9C,OAAwB;IAExB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAE1C,IAAI,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,uCAAgB,CAAC,CAAA;IAEnD,IAAI,gBAAgB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;QAC9C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QACxC,SAAS,EAAE;YACT,QAAQ;YACR,UAAU;YACV,iBAAiB;YACjB,eAAe;YACf,iBAAiB;YACjB,SAAS;YACT,SAAS;YACT,SAAS;YACT,YAAY;SACb;KACF,CAAC,CAAA;IAEF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,OAAO,CAAC,CAAC,CAAC,mCAAmC,EAAE;YAC7C,gBAAgB,EAAE,EAAE;SACrB,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;MAGE;IACF,IACE,gBAAgB,CAAC,KAAK,IAAI,6CAAsB,CAAC,OAAO;QACxD,gBAAgB,CAAC,KAAK,IAAI,6CAAsB,CAAC,KAAK,EACtD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,OAAO,CAAC,CAAC,CAAC,+CAA+C,EAAE;YACzD,EAAE;YACF,KAAK,EAAE,gBAAgB,CAAC,KAAK;SAC9B,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;MAGE;IAEF,MAAM,UAAU,GAAG,CAAC,yCAAoB,CAAC,OAAO,EAAE,yCAAoB,CAAC,KAAK,CAAC,CAAA;IAE7E,KAAK,IAAI,cAAc,IAAI,gBAAgB,CAAC,eAAe,EAAE,CAAC;QAC5D,IAAI,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,SAAQ;QACV,CAAC;QAED,MAAM,IAAA,kBAAmB,EAAC,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAA;IAChE,CAAC;IAED,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC;QAC3B,GAAG,gBAAgB;QACnB,MAAM;QACN,GAAG,CAAC,MAAM,IAAA,qCAAyB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI,IAAI,EAAE;QACxB,UAAU,EAAE,IAAI;KACjB,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { ActivityThreadStatus } from '../../service/activity-thread/activity-thread.js'\nimport { ActivityInstance, ActivityInstanceStatus } from '../../service/activity-instance/activity-instance.js'\nimport { evalActivityInstanceState } from '../common.js'\n\nimport { _abort as abortActivityThread } from '../activity-thread/_abort.js'\n\nexport async function abort(\n { id, reason }: { id: string; reason: string },\n context: ResolverContext\n): Promise<ActivityInstance> {\n const { domain, user, tx } = context.state\n\n var repository = tx.getRepository(ActivityInstance)\n\n var activityInstance = await repository.findOne({\n where: { domain: { id: domain.id }, id },\n relations: [\n 'domain',\n 'activity',\n 'activityThreads',\n 'assigneeRoles',\n 'supervisoryRole',\n 'updater',\n 'creator',\n 'starter',\n 'terminator'\n ]\n })\n\n if (!activityInstance) {\n throw new Error(\n context.t('error.activity-instance not found', {\n activityInstance: id\n })\n )\n }\n\n /* \n Prerequisites for a Task to Be Aborted.\n - The previous state of the task must not be End or Aborted.\n */\n if (\n activityInstance.state == ActivityInstanceStatus.Aborted ||\n activityInstance.state == ActivityInstanceStatus.Ended\n ) {\n throw new Error(\n context.t(`error.activity-instance is already terminated`, {\n id,\n state: activityInstance.state\n })\n )\n }\n\n /* \n Actions to be processed when a task is aborted\n - All related activity threads must be aborted.\n */\n\n const TERMINATED = [ActivityThreadStatus.Aborted, ActivityThreadStatus.Ended]\n\n for (let activityThread of activityInstance.activityThreads) {\n if (TERMINATED.includes(activityThread.state)) {\n continue\n }\n\n await abortActivityThread({ activityThread, reason }, context)\n }\n\n return await repository.save({\n ...activityInstance,\n reason,\n ...(await evalActivityInstanceState(id, context)),\n transaction: 'abort',\n updater: user,\n terminatedAt: new Date(),\n terminator: user\n })\n}\n"]}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 「결재를 받겠다」는 기대를 지킬 수 있나 — **순수 판단.**
3
+ *
4
+ * ── 왜 이 자리가 필요한가 ──────────────────────────────────────────────────
5
+ * `startingType: 'post'` 는 낸 사람에게 스레드를 하나 만들고 곧바로 제출까지 간다. 결재선이 있으면
6
+ * 거기서 상신되고, **없으면 그대로 끝난다.** 끝나면 완료 콜백이 돌아 업무가 확정된다.
7
+ *
8
+ * 그 거동 자체는 틀리지 않았다 — 결재 없이 내면 끝나는 일이 있다(작업 일지 같은 것). 문제는 **내는
9
+ * 쪽이 「이건 결재를 받는다」고 믿고 냈는데 결재선이 비어 조용히 확정되는 경우**다. 오류도 없고
10
+ * 흔적도 없어서, 승인 게이트가 있는 척만 하게 된다.
11
+ *
12
+ * 그래서 기대를 낸 쪽이 말하고 여기서 지킨다. **말하지 않은 건은 지나간다** — 기존에 돌던 것이
13
+ * 하나도 달라지지 않아야 한다.
14
+ *
15
+ * ── 왜 내는 쪽에서 미리 보는 것으로는 부족한가 ────────────────────────────
16
+ * 미리 봐도 되지만 그것만으로는 부족하다. 보고 나서 내기까지 사이에 누가 결재선을 비울 수 있다.
17
+ * 내는 것과 같은 트랜잭션 안에서 보는 자리는 하나뿐이다.
18
+ */
19
+ export type ApprovalExpectation = {
20
+ ok: true;
21
+ } | {
22
+ ok: false;
23
+ because: 'approval-line-missing';
24
+ activityName: string;
25
+ };
26
+ export declare function judgeApprovalExpectation(input: {
27
+ requireApproval?: boolean;
28
+ /** 액티비티의 것을 물려받고, 초안을 다시 내는 경우 원본의 것까지 합친 **최종** 결재선. */
29
+ approvalLine?: unknown[] | null;
30
+ activityName: string;
31
+ }): ApprovalExpectation;
32
+ export declare function expectationBroken(verdict: ApprovalExpectation): verdict is Extract<ApprovalExpectation, {
33
+ ok: false;
34
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.judgeApprovalExpectation = judgeApprovalExpectation;
4
+ exports.expectationBroken = expectationBroken;
5
+ function judgeApprovalExpectation(input) {
6
+ if (!input.requireApproval) {
7
+ /* 기대를 말하지 않았다. 결재 없이 내면 끝나는 일이 정상인 앱이 있다. */
8
+ return { ok: true };
9
+ }
10
+ if (input.approvalLine?.length) {
11
+ return { ok: true };
12
+ }
13
+ return { ok: false, because: 'approval-line-missing', activityName: input.activityName };
14
+ }
15
+ function expectationBroken(verdict) {
16
+ return !verdict.ok;
17
+ }
18
+ //# sourceMappingURL=approval-expectation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-expectation.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/approval-expectation.ts"],"names":[],"mappings":";;AAsBA,4DAgBC;AAED,8CAIC;AAtBD,SAAgB,wBAAwB,CAAC,KAKxC;IACC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3B,6CAA6C;QAC7C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;QAC/B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;IACrB,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAA;AAC1F,CAAC;AAED,SAAgB,iBAAiB,CAC/B,OAA4B;IAE5B,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;AACpB,CAAC","sourcesContent":["/**\n * 「결재를 받겠다」는 기대를 지킬 수 있나 — **순수 판단.**\n *\n * ── 왜 이 자리가 필요한가 ──────────────────────────────────────────────────\n * `startingType: 'post'` 는 낸 사람에게 스레드를 하나 만들고 곧바로 제출까지 간다. 결재선이 있으면\n * 거기서 상신되고, **없으면 그대로 끝난다.** 끝나면 완료 콜백이 돌아 업무가 확정된다.\n *\n * 그 거동 자체는 틀리지 않았다 — 결재 없이 내면 끝나는 일이 있다(작업 일지 같은 것). 문제는 **내는\n * 쪽이 「이건 결재를 받는다」고 믿고 냈는데 결재선이 비어 조용히 확정되는 경우**다. 오류도 없고\n * 흔적도 없어서, 승인 게이트가 있는 척만 하게 된다.\n *\n * 그래서 기대를 낸 쪽이 말하고 여기서 지킨다. **말하지 않은 건은 지나간다** — 기존에 돌던 것이\n * 하나도 달라지지 않아야 한다.\n *\n * ── 왜 내는 쪽에서 미리 보는 것으로는 부족한가 ────────────────────────────\n * 미리 봐도 되지만 그것만으로는 부족하다. 보고 나서 내기까지 사이에 누가 결재선을 비울 수 있다.\n * 내는 것과 같은 트랜잭션 안에서 보는 자리는 하나뿐이다.\n */\nexport type ApprovalExpectation =\n | { ok: true }\n | { ok: false; because: 'approval-line-missing'; activityName: string }\n\nexport function judgeApprovalExpectation(input: {\n requireApproval?: boolean\n /** 액티비티의 것을 물려받고, 초안을 다시 내는 경우 원본의 것까지 합친 **최종** 결재선. */\n approvalLine?: unknown[] | null\n activityName: string\n}): ApprovalExpectation {\n if (!input.requireApproval) {\n /* 기대를 말하지 않았다. 결재 없이 내면 끝나는 일이 정상인 앱이 있다. */\n return { ok: true }\n }\n\n if (input.approvalLine?.length) {\n return { ok: true }\n }\n\n return { ok: false, because: 'approval-line-missing', activityName: input.activityName }\n}\n\nexport function expectationBroken(\n verdict: ApprovalExpectation\n): verdict is Extract<ApprovalExpectation, { ok: false }> {\n return !verdict.ok\n}\n"]}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The approval line a caller may hand in when drafting or issuing (ruling 2026-09-24).
3
+ *
4
+ * The approval line of an activity is set in one place, the activity's detail. A case that carries
5
+ * its own line would let whoever raises it choose who approves it - a line of references only ends
6
+ * with nobody judging, and anyone can be named. So:
7
+ *
8
+ * the activity has a line the input is absent, or the same line - else a named refusal
9
+ * the activity has none the input is taken (an ad hoc line)
10
+ *
11
+ * No exception for a manager: a per-case way around the activity's line would make the line live in
12
+ * two places.
13
+ *
14
+ * "The same" is step by step - who (value), in what capacity (participation) and in what order - not
15
+ * the objects' key order. plant's server doors pass the line of the activity they read by name, which
16
+ * is this very line, and they must keep passing.
17
+ */
18
+ type Step = {
19
+ value?: string;
20
+ approver?: {
21
+ id?: string;
22
+ } | null;
23
+ participation?: string | null;
24
+ };
25
+ export declare const LINE_IS_SET = "approval-line-is-set";
26
+ export declare function sameApprovalLine(a: readonly Step[] | null | undefined, b: readonly Step[] | null | undefined): boolean;
27
+ /** null when the input may stand; LINE_IS_SET when it would replace the activity's line. */
28
+ export declare function approvalLineInputRefusal(activityLine: readonly Step[] | null | undefined, input: readonly Step[] | null | undefined): typeof LINE_IS_SET | null;
29
+ export {};
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * The approval line a caller may hand in when drafting or issuing (ruling 2026-09-24).
4
+ *
5
+ * The approval line of an activity is set in one place, the activity's detail. A case that carries
6
+ * its own line would let whoever raises it choose who approves it - a line of references only ends
7
+ * with nobody judging, and anyone can be named. So:
8
+ *
9
+ * the activity has a line the input is absent, or the same line - else a named refusal
10
+ * the activity has none the input is taken (an ad hoc line)
11
+ *
12
+ * No exception for a manager: a per-case way around the activity's line would make the line live in
13
+ * two places.
14
+ *
15
+ * "The same" is step by step - who (value), in what capacity (participation) and in what order - not
16
+ * the objects' key order. plant's server doors pass the line of the activity they read by name, which
17
+ * is this very line, and they must keep passing.
18
+ */
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.LINE_IS_SET = void 0;
21
+ exports.sameApprovalLine = sameApprovalLine;
22
+ exports.approvalLineInputRefusal = approvalLineInputRefusal;
23
+ exports.LINE_IS_SET = 'approval-line-is-set';
24
+ /** Empty participation means approval (approval-line.ts). */
25
+ function capacity(step) {
26
+ return step?.participation === 'reference' ? 'reference' : 'approval';
27
+ }
28
+ function who(step) {
29
+ return String(step?.value || step?.approver?.id || '');
30
+ }
31
+ function sameApprovalLine(a, b) {
32
+ const left = a || [];
33
+ const right = b || [];
34
+ return left.length === right.length && left.every((step, order) => who(step) === who(right[order]) && capacity(step) === capacity(right[order]));
35
+ }
36
+ /** null when the input may stand; LINE_IS_SET when it would replace the activity's line. */
37
+ function approvalLineInputRefusal(activityLine, input) {
38
+ if (!input)
39
+ return null;
40
+ if (!activityLine?.length)
41
+ return null;
42
+ return sameApprovalLine(activityLine, input) ? null : exports.LINE_IS_SET;
43
+ }
44
+ //# sourceMappingURL=approval-line-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-line-input.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/approval-line-input.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAeH,4CAKC;AAGD,4DAQC;AA3BY,QAAA,WAAW,GAAG,sBAAsB,CAAA;AAEjD,6DAA6D;AAC7D,SAAS,QAAQ,CAAC,IAAU;IAC1B,OAAO,IAAI,EAAE,aAAa,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAA;AACvE,CAAC;AAED,SAAS,GAAG,CAAC,IAAU;IACrB,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;AACxD,CAAC;AAED,SAAgB,gBAAgB,CAAC,CAAqC,EAAE,CAAqC;IAC3G,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IACpB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,CAAA;IAErB,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAClJ,CAAC;AAED,4FAA4F;AAC5F,SAAgB,wBAAwB,CACtC,YAAgD,EAChD,KAAyC;IAEzC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IACvB,IAAI,CAAC,YAAY,EAAE,MAAM;QAAE,OAAO,IAAI,CAAA;IAEtC,OAAO,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAW,CAAA;AACnE,CAAC","sourcesContent":["/**\n * The approval line a caller may hand in when drafting or issuing (ruling 2026-09-24).\n *\n * The approval line of an activity is set in one place, the activity's detail. A case that carries\n * its own line would let whoever raises it choose who approves it - a line of references only ends\n * with nobody judging, and anyone can be named. So:\n *\n * the activity has a line the input is absent, or the same line - else a named refusal\n * the activity has none the input is taken (an ad hoc line)\n *\n * No exception for a manager: a per-case way around the activity's line would make the line live in\n * two places.\n *\n * \"The same\" is step by step - who (value), in what capacity (participation) and in what order - not\n * the objects' key order. plant's server doors pass the line of the activity they read by name, which\n * is this very line, and they must keep passing.\n */\n\ntype Step = { value?: string; approver?: { id?: string } | null; participation?: string | null }\n\nexport const LINE_IS_SET = 'approval-line-is-set'\n\n/** Empty participation means approval (approval-line.ts). */\nfunction capacity(step: Step): string {\n return step?.participation === 'reference' ? 'reference' : 'approval'\n}\n\nfunction who(step: Step): string {\n return String(step?.value || step?.approver?.id || '')\n}\n\nexport function sameApprovalLine(a: readonly Step[] | null | undefined, b: readonly Step[] | null | undefined): boolean {\n const left = a || []\n const right = b || []\n\n return left.length === right.length && left.every((step, order) => who(step) === who(right[order]) && capacity(step) === capacity(right[order]))\n}\n\n/** null when the input may stand; LINE_IS_SET when it would replace the activity's line. */\nexport function approvalLineInputRefusal(\n activityLine: readonly Step[] | null | undefined,\n input: readonly Step[] | null | undefined\n): typeof LINE_IS_SET | null {\n if (!input) return null\n if (!activityLine?.length) return null\n\n return sameApprovalLine(activityLine, input) ? null : LINE_IS_SET\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { ActivityInstance } from '../../service/activity-instance/activity-instance.js';
2
+ export declare function assign({ id, assignees, assigneeRoles, reason, dueAt }: {
3
+ id: string;
4
+ assignees?: string[];
5
+ assigneeRoles?: string[];
6
+ reason?: string;
7
+ dueAt?: Date;
8
+ }, context: ResolverContext): Promise<ActivityInstance>;
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assign = assign;
4
+ const typeorm_1 = require("typeorm");
5
+ const auth_base_1 = require("@things-factory/auth-base");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const activity_instance_js_1 = require("../../service/activity-instance/activity-instance.js");
8
+ const activity_thread_js_1 = require("../../service/activity-thread/activity-thread.js");
9
+ const assignee_pool_js_1 = require("../../service/activity-instance/assignee-pool.js");
10
+ const common_js_1 = require("../common.js");
11
+ async function assign({ id, assignees, assigneeRoles, reason, dueAt }, context) {
12
+ const { domain, user, tx } = context.state;
13
+ const repository = tx.getRepository(activity_instance_js_1.ActivityInstance);
14
+ var activityInstance = await repository.findOne({
15
+ where: { domain: { id: domain.id }, id },
16
+ relations: ['domain', 'activity', 'assigneeRoles', 'supervisoryRole', 'updater', 'creator', 'starter', 'terminator']
17
+ });
18
+ if (!activityInstance) {
19
+ throw new Error(context.t('error.activity-instance not found', {
20
+ activityInstance: id
21
+ }));
22
+ }
23
+ /*
24
+ * People or a pool, not both in one call. Given both, the case would wait for the pool and already be
25
+ * held by the people, and which of the two it means could not be read off the case afterwards.
26
+ */
27
+ if (assigneeRoles?.length && assignees?.length) {
28
+ throw new Error(context.t('error.activity-instance assign people or a role, not both', { id }));
29
+ }
30
+ if (assigneeRoles?.length) {
31
+ return await assignToPool(activityInstance, assigneeRoles, dueAt, context);
32
+ }
33
+ /*
34
+ Prerequisites for a Task to Be Assigned.
35
+ - The previous state of the task must not be Assigned.
36
+ */
37
+ if (activityInstance.state !== activity_instance_js_1.ActivityInstanceStatus.Issued &&
38
+ activityInstance.state !== activity_instance_js_1.ActivityInstanceStatus.Unassigned) {
39
+ throw new Error(context.t(`error.activity-instance should not be assigned`, {
40
+ id,
41
+ actual: activityInstance.state
42
+ }));
43
+ }
44
+ if (dueAt) {
45
+ activityInstance.dueAt = dueAt;
46
+ }
47
+ /*
48
+ * People of this domain only. By email alone a manager could hand the task to someone of another
49
+ * tenant, whose to-do list reads their own domain and would never show it. An address that is not
50
+ * here is named rather than dropped - dropped, the task went to fewer people than were asked.
51
+ */
52
+ const assignedUsers = await tx.getRepository(auth_base_1.User).find({
53
+ where: { email: (0, typeorm_1.In)(assignees || []), domains: { id: domain.id } },
54
+ relations: ['domains']
55
+ });
56
+ const missing = (assignees || []).filter(email => !assignedUsers.some(one => one.email === email));
57
+ if (missing.length) {
58
+ throw new Error(context.t('error.activity-instance assignee not in this domain', { emails: missing.join(', ') }));
59
+ }
60
+ await (0, common_js_1.createActivityThreadsForUsers)('assign', activityInstance, assignedUsers, context);
61
+ return await tx.getRepository(activity_instance_js_1.ActivityInstance).findOneBy({ id: activityInstance.id });
62
+ }
63
+ /**
64
+ * Put a case in a pool: whoever holds any one of its roles and picks it first holds it.
65
+ *
66
+ * The pool is what issue() makes when the activity names assignee roles and waits for one person -
67
+ * `assigneeRoles` on the case, `threadsMin` 1, and one unassigned thread. To-do lists and the pickable
68
+ * list read exactly that (assignee-pool.ts), so this makes the same shape and nothing else; a second
69
+ * shape would be a second pool nobody's list reads.
70
+ *
71
+ * Only a case nobody holds - `Issued`, no valid thread (common.ts evalActivityInstanceState). A case
72
+ * someone already holds is theirs; taking it back into a pool is another action, not this one.
73
+ */
74
+ async function assignToPool(activityInstance, roleIds, dueAt, context) {
75
+ const { domain, user, tx } = context.state;
76
+ const repository = tx.getRepository(activity_instance_js_1.ActivityInstance);
77
+ const { id } = activityInstance;
78
+ if (activityInstance.state !== activity_instance_js_1.ActivityInstanceStatus.Issued) {
79
+ throw new Error(context.t('error.activity-instance should not be assigned', {
80
+ id,
81
+ actual: activityInstance.state
82
+ }));
83
+ }
84
+ /*
85
+ * Roles of this domain only, each once - the same reason as people above: another tenant's pool is read
86
+ * by nobody here (assignee-pool.ts refuses by name).
87
+ */
88
+ const roles = await (0, assignee_pool_js_1.resolvePoolRoles)(roleIds, context);
89
+ /*
90
+ * A pool nobody is in is a case nobody sees. Its people are every holder of any of its roles, counted
91
+ * once each, the way issue() counts them (createActivityThreadsForAllRoleUsers).
92
+ */
93
+ if (!(0, assignee_pool_js_1.poolMembers)(roles).length) {
94
+ throw new Error(context.t('error.activity-instance role has no members', { role: roles.map(role => role.name).join(', ') }));
95
+ }
96
+ /*
97
+ * Take hold of the case first, as pick does: the UPDATE matches only a case still issued and holds its
98
+ * row to the end of this transaction. Every way into a waiting case takes this row before its threads -
99
+ * pick's UPDATE, and a member claiming the pool's waiting thread (activity-thread/check-authority.ts) - so
100
+ * whoever is second waits for the first to commit and then reads what it did. One order everywhere, so
101
+ * no two of them deadlock.
102
+ */
103
+ const claimed = await repository.update({ domain: { id: domain.id }, id, state: activity_instance_js_1.ActivityInstanceStatus.Issued }, { threadsMin: 1, updater: user, ...(dueAt ? { dueAt } : {}) });
104
+ if (!claimed.affected) {
105
+ throw new Error(context.t('error.activity-approval taken by someone else', { activityApproval: id }));
106
+ }
107
+ /*
108
+ * Nobody holds it - asked of the threads too, not only of the state. The state is worked out again only
109
+ * when a thread changes (common.ts updateActivityInstanceState); a thread someone holds under a case still
110
+ * marked issued is theirs, and the refusal rolls the UPDATE above back.
111
+ */
112
+ const threads = await tx.getRepository(activity_thread_js_1.ActivityThread).find({
113
+ where: { activityInstance: { id } },
114
+ /* A locking read is a current read - a plain one may answer from the snapshot taken before the wait. */
115
+ ...((0, shell_1.writeLockSupported)(tx) ? { lock: { mode: 'pessimistic_write' } } : {})
116
+ });
117
+ if (threads.some(thread => thread.isValid())) {
118
+ throw new Error(context.t('error.activity-approval taken by someone else', { activityApproval: id }));
119
+ }
120
+ /*
121
+ * The pool itself is a join table, not a column the UPDATE can set. Written under the hold the UPDATE took,
122
+ * and written whole: every row of this case goes, then the new list. Worked out as a difference from the
123
+ * case read above, it was a difference from a read taken before the hold - two assigns at once on postgres
124
+ * left the union of both lists, the pool of neither (measured 2026-10-20). A DELETE reads what is there
125
+ * now, so the pool is the list of whichever assign held the case last. Not a save - that would write a
126
+ * history row of a half-read case.
127
+ */
128
+ await tx
129
+ .createQueryBuilder()
130
+ .delete()
131
+ .from(assignee_pool_js_1.CASE_POOL.table)
132
+ .where(`${assignee_pool_js_1.CASE_POOL.caseColumn} = :id`, { id })
133
+ .execute();
134
+ await repository
135
+ .createQueryBuilder()
136
+ .relation(activity_instance_js_1.ActivityInstance, 'assigneeRoles')
137
+ .of(id)
138
+ .add(roles.map(role => role.id));
139
+ const pooled = await repository.findOne({
140
+ where: { id },
141
+ relations: ['domain', 'activity', 'assigneeRoles', 'supervisoryRole', 'updater', 'creator', 'starter', 'terminator']
142
+ });
143
+ /*
144
+ * A case already in a pool moves to the other pool with its one waiting thread - nobody has taken it, so
145
+ * a manager who chose the wrong role puts it right here instead of aborting the case.
146
+ */
147
+ if (!threads.some(thread => thread.state === activity_thread_js_1.ActivityThreadStatus.Unassigned)) {
148
+ await (0, common_js_1.createActivityThreadWithUnassigned)('assign', pooled, context);
149
+ }
150
+ return await repository.findOneBy({ id });
151
+ }
152
+ //# sourceMappingURL=assign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assign.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/assign.ts"],"names":[],"mappings":"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","sourcesContent":["import { In } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { writeLockSupported } from '@things-factory/shell'\n\nimport { ActivityInstance, ActivityInstanceStatus } from '../../service/activity-instance/activity-instance.js'\nimport { ActivityThread, ActivityThreadStatus } from '../../service/activity-thread/activity-thread.js'\nimport { CASE_POOL, poolMembers, resolvePoolRoles } from '../../service/activity-instance/assignee-pool.js'\nimport { createActivityThreadWithUnassigned, createActivityThreadsForUsers } from '../common.js'\n\nexport async function assign(\n {\n id,\n assignees,\n assigneeRoles,\n reason,\n dueAt\n }: { id: string; assignees?: string[]; assigneeRoles?: string[]; reason?: string; dueAt?: Date },\n context: ResolverContext\n): Promise<ActivityInstance> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(ActivityInstance)\n\n var activityInstance = await repository.findOne({\n where: { domain: { id: domain.id }, id },\n relations: ['domain', 'activity', 'assigneeRoles', 'supervisoryRole', 'updater', 'creator', 'starter', 'terminator']\n })\n\n if (!activityInstance) {\n throw new Error(\n context.t('error.activity-instance not found', {\n activityInstance: id\n })\n )\n }\n\n /*\n * People or a pool, not both in one call. Given both, the case would wait for the pool and already be\n * held by the people, and which of the two it means could not be read off the case afterwards.\n */\n if (assigneeRoles?.length && assignees?.length) {\n throw new Error(context.t('error.activity-instance assign people or a role, not both', { id }))\n }\n\n if (assigneeRoles?.length) {\n return await assignToPool(activityInstance, assigneeRoles, dueAt, context)\n }\n\n /*\n Prerequisites for a Task to Be Assigned.\n - The previous state of the task must not be Assigned.\n */\n if (\n activityInstance.state !== ActivityInstanceStatus.Issued &&\n activityInstance.state !== ActivityInstanceStatus.Unassigned\n ) {\n throw new Error(\n context.t(`error.activity-instance should not be assigned`, {\n id,\n actual: activityInstance.state\n })\n )\n }\n\n if (dueAt) {\n activityInstance.dueAt = dueAt\n }\n\n /*\n * People of this domain only. By email alone a manager could hand the task to someone of another\n * tenant, whose to-do list reads their own domain and would never show it. An address that is not\n * here is named rather than dropped - dropped, the task went to fewer people than were asked.\n */\n const assignedUsers = await tx.getRepository(User).find({\n where: { email: In(assignees || []), domains: { id: domain.id } },\n relations: ['domains']\n })\n\n const missing = (assignees || []).filter(email => !assignedUsers.some(one => one.email === email))\n\n if (missing.length) {\n throw new Error(context.t('error.activity-instance assignee not in this domain', { emails: missing.join(', ') }))\n }\n\n await createActivityThreadsForUsers('assign', activityInstance, assignedUsers, context)\n\n return await tx.getRepository(ActivityInstance).findOneBy({ id: activityInstance.id })\n}\n\n/**\n * Put a case in a pool: whoever holds any one of its roles and picks it first holds it.\n *\n * The pool is what issue() makes when the activity names assignee roles and waits for one person -\n * `assigneeRoles` on the case, `threadsMin` 1, and one unassigned thread. To-do lists and the pickable\n * list read exactly that (assignee-pool.ts), so this makes the same shape and nothing else; a second\n * shape would be a second pool nobody's list reads.\n *\n * Only a case nobody holds - `Issued`, no valid thread (common.ts evalActivityInstanceState). A case\n * someone already holds is theirs; taking it back into a pool is another action, not this one.\n */\nasync function assignToPool(\n activityInstance: ActivityInstance,\n roleIds: string[],\n dueAt: Date | undefined,\n context: ResolverContext\n): Promise<ActivityInstance> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(ActivityInstance)\n const { id } = activityInstance\n\n if (activityInstance.state !== ActivityInstanceStatus.Issued) {\n throw new Error(\n context.t('error.activity-instance should not be assigned', {\n id,\n actual: activityInstance.state\n })\n )\n }\n\n /*\n * Roles of this domain only, each once - the same reason as people above: another tenant's pool is read\n * by nobody here (assignee-pool.ts refuses by name).\n */\n const roles = await resolvePoolRoles(roleIds, context)\n\n /*\n * A pool nobody is in is a case nobody sees. Its people are every holder of any of its roles, counted\n * once each, the way issue() counts them (createActivityThreadsForAllRoleUsers).\n */\n if (!poolMembers(roles).length) {\n throw new Error(context.t('error.activity-instance role has no members', { role: roles.map(role => role.name).join(', ') }))\n }\n\n /*\n * Take hold of the case first, as pick does: the UPDATE matches only a case still issued and holds its\n * row to the end of this transaction. Every way into a waiting case takes this row before its threads -\n * pick's UPDATE, and a member claiming the pool's waiting thread (activity-thread/check-authority.ts) - so\n * whoever is second waits for the first to commit and then reads what it did. One order everywhere, so\n * no two of them deadlock.\n */\n const claimed = await repository.update(\n { domain: { id: domain.id }, id, state: ActivityInstanceStatus.Issued },\n { threadsMin: 1, updater: user, ...(dueAt ? { dueAt } : {}) }\n )\n\n if (!claimed.affected) {\n throw new Error(context.t('error.activity-approval taken by someone else', { activityApproval: id }))\n }\n\n /*\n * Nobody holds it - asked of the threads too, not only of the state. The state is worked out again only\n * when a thread changes (common.ts updateActivityInstanceState); a thread someone holds under a case still\n * marked issued is theirs, and the refusal rolls the UPDATE above back.\n */\n const threads = await tx.getRepository(ActivityThread).find({\n where: { activityInstance: { id } },\n /* A locking read is a current read - a plain one may answer from the snapshot taken before the wait. */\n ...(writeLockSupported(tx) ? { lock: { mode: 'pessimistic_write' as const } } : {})\n })\n\n if (threads.some(thread => thread.isValid())) {\n throw new Error(context.t('error.activity-approval taken by someone else', { activityApproval: id }))\n }\n\n /*\n * The pool itself is a join table, not a column the UPDATE can set. Written under the hold the UPDATE took,\n * and written whole: every row of this case goes, then the new list. Worked out as a difference from the\n * case read above, it was a difference from a read taken before the hold - two assigns at once on postgres\n * left the union of both lists, the pool of neither (measured 2026-10-20). A DELETE reads what is there\n * now, so the pool is the list of whichever assign held the case last. Not a save - that would write a\n * history row of a half-read case.\n */\n await tx\n .createQueryBuilder()\n .delete()\n .from(CASE_POOL.table)\n .where(`${CASE_POOL.caseColumn} = :id`, { id })\n .execute()\n\n await repository\n .createQueryBuilder()\n .relation(ActivityInstance, 'assigneeRoles')\n .of(id)\n .add(roles.map(role => role.id))\n\n const pooled = await repository.findOne({\n where: { id },\n relations: ['domain', 'activity', 'assigneeRoles', 'supervisoryRole', 'updater', 'creator', 'starter', 'terminator']\n })\n\n /*\n * A case already in a pool moves to the other pool with its one waiting thread - nobody has taken it, so\n * a manager who chose the wrong role puts it right here instead of aborting the case.\n */\n if (!threads.some(thread => thread.state === ActivityThreadStatus.Unassigned)) {\n await createActivityThreadWithUnassigned('assign', pooled, context)\n }\n\n return await repository.findOneBy({ id })\n}\n"]}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A role among the assignees of an activity or a case (ruling 2026-10-20).
3
+ *
4
+ * An assignee entry names one person. A role is many, and the entry made it one: issue() turned each
5
+ * entry into a person through getSystemUserFromOrgMemberItem, whose role branch answered the role's
6
+ * first user - an unordered relation, so whoever the database listed first got the work and the rest
7
+ * of the role never saw it.
8
+ *
9
+ * "Anyone of this role" already has its one place: `assigneeRoles`, on the activity and on the case.
10
+ * That is what the to-do lists and the pickable list read (my-open-threads.ts). Reading a role entry as
11
+ * that pool would make the pool live in two places, and would need rules nobody has written for a role
12
+ * entry beside different assigneeRoles, two role entries, or a role beside people. So a role entry is
13
+ * refused by name - where an activity is saved, so whoever sets it reads why, and where a case is
14
+ * issued, for a list handed in or saved before this.
15
+ *
16
+ * The approval line is not this: there a role seat is "anyone of that role may judge" and is resolved
17
+ * as such (create-approval.ts).
18
+ */
19
+ type Entry = {
20
+ type?: string | null;
21
+ } | null | undefined;
22
+ export declare const ROLE_IS_NOT_AN_ASSIGNEE = "role-is-not-an-assignee";
23
+ /** null when the list may stand; ROLE_IS_NOT_AN_ASSIGNEE when an entry names a role. */
24
+ export declare function roleAssigneeRefusal(assignees: readonly Entry[] | null | undefined): typeof ROLE_IS_NOT_AN_ASSIGNEE | null;
25
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * A role among the assignees of an activity or a case (ruling 2026-10-20).
4
+ *
5
+ * An assignee entry names one person. A role is many, and the entry made it one: issue() turned each
6
+ * entry into a person through getSystemUserFromOrgMemberItem, whose role branch answered the role's
7
+ * first user - an unordered relation, so whoever the database listed first got the work and the rest
8
+ * of the role never saw it.
9
+ *
10
+ * "Anyone of this role" already has its one place: `assigneeRoles`, on the activity and on the case.
11
+ * That is what the to-do lists and the pickable list read (my-open-threads.ts). Reading a role entry as
12
+ * that pool would make the pool live in two places, and would need rules nobody has written for a role
13
+ * entry beside different assigneeRoles, two role entries, or a role beside people. So a role entry is
14
+ * refused by name - where an activity is saved, so whoever sets it reads why, and where a case is
15
+ * issued, for a list handed in or saved before this.
16
+ *
17
+ * The approval line is not this: there a role seat is "anyone of that role may judge" and is resolved
18
+ * as such (create-approval.ts).
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.ROLE_IS_NOT_AN_ASSIGNEE = void 0;
22
+ exports.roleAssigneeRefusal = roleAssigneeRefusal;
23
+ exports.ROLE_IS_NOT_AN_ASSIGNEE = 'role-is-not-an-assignee';
24
+ /** null when the list may stand; ROLE_IS_NOT_AN_ASSIGNEE when an entry names a role. */
25
+ function roleAssigneeRefusal(assignees) {
26
+ return (assignees || []).some(entry => entry?.type === 'Role') ? exports.ROLE_IS_NOT_AN_ASSIGNEE : null;
27
+ }
28
+ //# sourceMappingURL=assignee-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignee-input.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/assignee-input.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAOH,kDAEC;AALY,QAAA,uBAAuB,GAAG,yBAAyB,CAAA;AAEhE,wFAAwF;AACxF,SAAgB,mBAAmB,CAAC,SAA8C;IAChF,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,+BAAuB,CAAC,CAAC,CAAC,IAAI,CAAA;AACjG,CAAC","sourcesContent":["/**\n * A role among the assignees of an activity or a case (ruling 2026-10-20).\n *\n * An assignee entry names one person. A role is many, and the entry made it one: issue() turned each\n * entry into a person through getSystemUserFromOrgMemberItem, whose role branch answered the role's\n * first user - an unordered relation, so whoever the database listed first got the work and the rest\n * of the role never saw it.\n *\n * \"Anyone of this role\" already has its one place: `assigneeRoles`, on the activity and on the case.\n * That is what the to-do lists and the pickable list read (my-open-threads.ts). Reading a role entry as\n * that pool would make the pool live in two places, and would need rules nobody has written for a role\n * entry beside different assigneeRoles, two role entries, or a role beside people. So a role entry is\n * refused by name - where an activity is saved, so whoever sets it reads why, and where a case is\n * issued, for a list handed in or saved before this.\n *\n * The approval line is not this: there a role seat is \"anyone of that role may judge\" and is resolved\n * as such (create-approval.ts).\n */\n\ntype Entry = { type?: string | null } | null | undefined\n\nexport const ROLE_IS_NOT_AN_ASSIGNEE = 'role-is-not-an-assignee'\n\n/** null when the list may stand; ROLE_IS_NOT_AN_ASSIGNEE when an entry names a role. */\nexport function roleAssigneeRefusal(assignees: readonly Entry[] | null | undefined): typeof ROLE_IS_NOT_AN_ASSIGNEE | null {\n return (assignees || []).some(entry => entry?.type === 'Role') ? ROLE_IS_NOT_AN_ASSIGNEE : null\n}\n"]}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Take hold of a draft before working on it - so that a discard and an issue of the same draft cannot
3
+ * both succeed.
4
+ *
5
+ * Measured on postgres (tests/discard-versus-issue.pg.test.ts): issue read the draft, a discard deleted
6
+ * it, and issue then saved what it had read - the row came back, issued, and the writer had been told it
7
+ * was thrown away. Reading and saving later holds nothing.
8
+ *
9
+ * The claim is an UPDATE that only matches a draft. It takes the row's lock on every driver (SELECT ...
10
+ * FOR UPDATE is not supported on sqlite), and the lock is held until this transaction ends:
11
+ *
12
+ * this claims first a discard waits, then finds no draft and is refused by name
13
+ * a discard is first this waits, then matches no row and is refused by name
14
+ *
15
+ * No row matched means the draft went out or was thrown away in the meantime.
16
+ */
17
+ export declare function claimDraft(id: string, context: ResolverContext): Promise<void>;