@things-factory/worklist 10.1.248 → 10.1.250

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 (724) 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 +27 -0
  11. package/dist-client/approval-progress.js +42 -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 +876 -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 +495 -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 +594 -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 +386 -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/approval-progress/approval-progress-page.d.ts +46 -0
  200. package/dist-client/pages/approval-progress/approval-progress-page.js +294 -0
  201. package/dist-client/pages/approval-progress/approval-progress-page.js.map +1 -0
  202. package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +64 -0
  203. package/dist-client/pages/installable-activity/installable-activity-list-page.js +424 -0
  204. package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -0
  205. package/dist-client/pages/installable-activity/installable-activity-model-item-list.d.ts +1 -0
  206. package/dist-client/pages/installable-activity/installable-activity-model-item-list.js +20 -0
  207. package/dist-client/pages/installable-activity/installable-activity-model-item-list.js.map +1 -0
  208. package/dist-client/pages/todo/approval-done-list-page.d.ts +42 -0
  209. package/dist-client/pages/todo/approval-done-list-page.js +365 -0
  210. package/dist-client/pages/todo/approval-done-list-page.js.map +1 -0
  211. package/dist-client/pages/todo/approval-pending-list-page.d.ts +79 -0
  212. package/dist-client/pages/todo/approval-pending-list-page.js +683 -0
  213. package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -0
  214. package/dist-client/pages/todo/done-list-calendar-page.d.ts +47 -0
  215. package/dist-client/pages/todo/done-list-calendar-page.js +379 -0
  216. package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -0
  217. package/dist-client/pages/todo/draft-list-page.d.ts +64 -0
  218. package/dist-client/pages/todo/draft-list-page.js +404 -0
  219. package/dist-client/pages/todo/draft-list-page.js.map +1 -0
  220. package/dist-client/pages/todo/list-thumbnail.d.ts +25 -0
  221. package/dist-client/pages/todo/list-thumbnail.js +25 -0
  222. package/dist-client/pages/todo/list-thumbnail.js.map +1 -0
  223. package/dist-client/pages/todo/pickable-list-page.d.ts +37 -0
  224. package/dist-client/pages/todo/pickable-list-page.js +271 -0
  225. package/dist-client/pages/todo/pickable-list-page.js.map +1 -0
  226. package/dist-client/pages/todo/todo-list-page.d.ts +66 -0
  227. package/dist-client/pages/todo/todo-list-page.js +503 -0
  228. package/dist-client/pages/todo/todo-list-page.js.map +1 -0
  229. package/dist-client/pages/todo/work-box.d.ts +52 -0
  230. package/dist-client/pages/todo/work-box.js +54 -0
  231. package/dist-client/pages/todo/work-box.js.map +1 -0
  232. package/dist-client/pages/work-door/door-links.d.ts +22 -0
  233. package/dist-client/pages/work-door/door-links.js +20 -0
  234. package/dist-client/pages/work-door/door-links.js.map +1 -0
  235. package/dist-client/pages/work-door/door-sentence.d.ts +75 -0
  236. package/dist-client/pages/work-door/door-sentence.js +107 -0
  237. package/dist-client/pages/work-door/door-sentence.js.map +1 -0
  238. package/dist-client/pages/work-door/door-words.d.ts +48 -0
  239. package/dist-client/pages/work-door/door-words.js +84 -0
  240. package/dist-client/pages/work-door/door-words.js.map +1 -0
  241. package/dist-client/route.d.ts +1 -0
  242. package/dist-client/route.js +80 -0
  243. package/dist-client/route.js.map +1 -0
  244. package/dist-client/templates/activity-approval-context-template.d.ts +3 -0
  245. package/dist-client/templates/activity-approval-context-template.js +105 -0
  246. package/dist-client/templates/activity-approval-context-template.js.map +1 -0
  247. package/dist-client/templates/activity-instance-context-template.d.ts +3 -0
  248. package/dist-client/templates/activity-instance-context-template.js +118 -0
  249. package/dist-client/templates/activity-instance-context-template.js.map +1 -0
  250. package/dist-client/templates/activity-thread-context-template.d.ts +3 -0
  251. package/dist-client/templates/activity-thread-context-template.js +74 -0
  252. package/dist-client/templates/activity-thread-context-template.js.map +1 -0
  253. package/dist-client/templates/context-panel.d.ts +26 -0
  254. package/dist-client/templates/context-panel.js +182 -0
  255. package/dist-client/templates/context-panel.js.map +1 -0
  256. package/dist-client/tsconfig.tsbuildinfo +1 -0
  257. package/dist-client/types/activity-approval.d.ts +36 -0
  258. package/dist-client/types/activity-approval.js +17 -0
  259. package/dist-client/types/activity-approval.js.map +1 -0
  260. package/dist-client/types/activity-instance-type.d.ts +77 -0
  261. package/dist-client/types/activity-instance-type.js +11 -0
  262. package/dist-client/types/activity-instance-type.js.map +1 -0
  263. package/dist-client/types/activity-instance.d.ts +72 -0
  264. package/dist-client/types/activity-instance.js +36 -0
  265. package/dist-client/types/activity-instance.js.map +1 -0
  266. package/dist-client/types/activity-model-type.d.ts +31 -0
  267. package/dist-client/types/activity-model-type.js +18 -0
  268. package/dist-client/types/activity-model-type.js.map +1 -0
  269. package/dist-client/types/activity-search-key-item-type.d.ts +6 -0
  270. package/dist-client/types/activity-search-key-item-type.js +3 -0
  271. package/dist-client/types/activity-search-key-item-type.js.map +1 -0
  272. package/dist-client/types/activity-thread-history.d.ts +28 -0
  273. package/dist-client/types/activity-thread-history.js +7 -0
  274. package/dist-client/types/activity-thread-history.js.map +1 -0
  275. package/dist-client/types/activity-thread-type.d.ts +15 -0
  276. package/dist-client/types/activity-thread-type.js +7 -0
  277. package/dist-client/types/activity-thread-type.js.map +1 -0
  278. package/dist-client/types/activity-thread.d.ts +39 -0
  279. package/dist-client/types/activity-thread.js +18 -0
  280. package/dist-client/types/activity-thread.js.map +1 -0
  281. package/dist-client/types/activity.d.ts +68 -0
  282. package/dist-client/types/activity.js +40 -0
  283. package/dist-client/types/activity.js.map +1 -0
  284. package/dist-client/types/types.d.ts +23 -0
  285. package/dist-client/types/types.js +42 -0
  286. package/dist-client/types/types.js.map +1 -0
  287. package/dist-client/when.d.ts +4 -0
  288. package/dist-client/when.js +72 -0
  289. package/dist-client/when.js.map +1 -0
  290. package/dist-client/work-calendar-sources.d.ts +96 -0
  291. package/dist-client/work-calendar-sources.js +88 -0
  292. package/dist-client/work-calendar-sources.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 +29 -0
  295. package/dist-server/controllers/activity-approval/_abort.js.map +1 -0
  296. package/dist-server/controllers/activity-approval/abort.d.ts +5 -0
  297. package/dist-server/controllers/activity-approval/abort.js +35 -0
  298. package/dist-server/controllers/activity-approval/abort.js.map +1 -0
  299. package/dist-server/controllers/activity-approval/approval-line.d.ts +138 -0
  300. package/dist-server/controllers/activity-approval/approval-line.js +185 -0
  301. package/dist-server/controllers/activity-approval/approval-line.js.map +1 -0
  302. package/dist-server/controllers/activity-approval/approve.d.ts +5 -0
  303. package/dist-server/controllers/activity-approval/approve.js +142 -0
  304. package/dist-server/controllers/activity-approval/approve.js.map +1 -0
  305. package/dist-server/controllers/activity-approval/check-authority.d.ts +8 -0
  306. package/dist-server/controllers/activity-approval/check-authority.js +29 -0
  307. package/dist-server/controllers/activity-approval/check-authority.js.map +1 -0
  308. package/dist-server/controllers/activity-approval/claim.d.ts +42 -0
  309. package/dist-server/controllers/activity-approval/claim.js +77 -0
  310. package/dist-server/controllers/activity-approval/claim.js.map +1 -0
  311. package/dist-server/controllers/activity-approval/create-approval.d.ts +41 -0
  312. package/dist-server/controllers/activity-approval/create-approval.js +85 -0
  313. package/dist-server/controllers/activity-approval/create-approval.js.map +1 -0
  314. package/dist-server/controllers/activity-approval/delegate.d.ts +23 -0
  315. package/dist-server/controllers/activity-approval/delegate.js +113 -0
  316. package/dist-server/controllers/activity-approval/delegate.js.map +1 -0
  317. package/dist-server/controllers/activity-approval/delegation.d.ts +21 -0
  318. package/dist-server/controllers/activity-approval/delegation.js +17 -0
  319. package/dist-server/controllers/activity-approval/delegation.js.map +1 -0
  320. package/dist-server/controllers/activity-approval/opinion.d.ts +10 -0
  321. package/dist-server/controllers/activity-approval/opinion.js +43 -0
  322. package/dist-server/controllers/activity-approval/opinion.js.map +1 -0
  323. package/dist-server/controllers/activity-approval/reject.d.ts +5 -0
  324. package/dist-server/controllers/activity-approval/reject.js +93 -0
  325. package/dist-server/controllers/activity-approval/reject.js.map +1 -0
  326. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.d.ts +21 -0
  327. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js +60 -0
  328. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js.map +1 -0
  329. package/dist-server/controllers/activity-approval/save.d.ts +5 -0
  330. package/dist-server/controllers/activity-approval/save.js +56 -0
  331. package/dist-server/controllers/activity-approval/save.js.map +1 -0
  332. package/dist-server/controllers/activity-approval/seat-standing.d.ts +66 -0
  333. package/dist-server/controllers/activity-approval/seat-standing.js +57 -0
  334. package/dist-server/controllers/activity-approval/seat-standing.js.map +1 -0
  335. package/dist-server/controllers/activity-installation/activity-installation-controller.d.ts +79 -0
  336. package/dist-server/controllers/activity-installation/activity-installation-controller.js +99 -0
  337. package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -0
  338. package/dist-server/controllers/activity-installation/call-webhook.d.ts +3 -0
  339. package/dist-server/controllers/activity-installation/call-webhook.js +42 -0
  340. package/dist-server/controllers/activity-installation/call-webhook.js.map +1 -0
  341. package/dist-server/controllers/activity-installation/installable-to-activity.d.ts +77 -0
  342. package/dist-server/controllers/activity-installation/installable-to-activity.js +68 -0
  343. package/dist-server/controllers/activity-installation/installable-to-activity.js.map +1 -0
  344. package/dist-server/controllers/activity-installation/registry-conflict.d.ts +47 -0
  345. package/dist-server/controllers/activity-installation/registry-conflict.js +47 -0
  346. package/dist-server/controllers/activity-installation/registry-conflict.js.map +1 -0
  347. package/dist-server/controllers/activity-instance/abort.d.ts +5 -0
  348. package/dist-server/controllers/activity-instance/abort.js +62 -0
  349. package/dist-server/controllers/activity-instance/abort.js.map +1 -0
  350. package/dist-server/controllers/activity-instance/approval-expectation.d.ts +34 -0
  351. package/dist-server/controllers/activity-instance/approval-expectation.js +18 -0
  352. package/dist-server/controllers/activity-instance/approval-expectation.js.map +1 -0
  353. package/dist-server/controllers/activity-instance/approval-line-input.d.ts +29 -0
  354. package/dist-server/controllers/activity-instance/approval-line-input.js +44 -0
  355. package/dist-server/controllers/activity-instance/approval-line-input.js.map +1 -0
  356. package/dist-server/controllers/activity-instance/assign.d.ts +8 -0
  357. package/dist-server/controllers/activity-instance/assign.js +152 -0
  358. package/dist-server/controllers/activity-instance/assign.js.map +1 -0
  359. package/dist-server/controllers/activity-instance/assignee-input.d.ts +25 -0
  360. package/dist-server/controllers/activity-instance/assignee-input.js +28 -0
  361. package/dist-server/controllers/activity-instance/assignee-input.js.map +1 -0
  362. package/dist-server/controllers/activity-instance/claim-draft.d.ts +17 -0
  363. package/dist-server/controllers/activity-instance/claim-draft.js +30 -0
  364. package/dist-server/controllers/activity-instance/claim-draft.js.map +1 -0
  365. package/dist-server/controllers/activity-instance/discard-draft.d.ts +22 -0
  366. package/dist-server/controllers/activity-instance/discard-draft.js +54 -0
  367. package/dist-server/controllers/activity-instance/discard-draft.js.map +1 -0
  368. package/dist-server/controllers/activity-instance/draft.d.ts +3 -0
  369. package/dist-server/controllers/activity-instance/draft.js +93 -0
  370. package/dist-server/controllers/activity-instance/draft.js.map +1 -0
  371. package/dist-server/controllers/activity-instance/end.d.ts +6 -0
  372. package/dist-server/controllers/activity-instance/end.js +65 -0
  373. package/dist-server/controllers/activity-instance/end.js.map +1 -0
  374. package/dist-server/controllers/activity-instance/entitlement.d.ts +25 -0
  375. package/dist-server/controllers/activity-instance/entitlement.js +110 -0
  376. package/dist-server/controllers/activity-instance/entitlement.js.map +1 -0
  377. package/dist-server/controllers/activity-instance/index.d.ts +6 -0
  378. package/dist-server/controllers/activity-instance/index.js +10 -0
  379. package/dist-server/controllers/activity-instance/index.js.map +1 -0
  380. package/dist-server/controllers/activity-instance/issue.d.ts +3 -0
  381. package/dist-server/controllers/activity-instance/issue.js +272 -0
  382. package/dist-server/controllers/activity-instance/issue.js.map +1 -0
  383. package/dist-server/controllers/activity-instance/pick.d.ts +2 -0
  384. package/dist-server/controllers/activity-instance/pick.js +112 -0
  385. package/dist-server/controllers/activity-instance/pick.js.map +1 -0
  386. package/dist-server/controllers/activity-read/assert-may-read.d.ts +20 -0
  387. package/dist-server/controllers/activity-read/assert-may-read.js +108 -0
  388. package/dist-server/controllers/activity-read/assert-may-read.js.map +1 -0
  389. package/dist-server/controllers/activity-read/participates.d.ts +41 -0
  390. package/dist-server/controllers/activity-read/participates.js +42 -0
  391. package/dist-server/controllers/activity-read/participates.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 +36 -0
  394. package/dist-server/controllers/activity-thread/_abort.js.map +1 -0
  395. package/dist-server/controllers/activity-thread/abort.d.ts +5 -0
  396. package/dist-server/controllers/activity-thread/abort.js +45 -0
  397. package/dist-server/controllers/activity-thread/abort.js.map +1 -0
  398. package/dist-server/controllers/activity-thread/check-authority.d.ts +2 -0
  399. package/dist-server/controllers/activity-thread/check-authority.js +65 -0
  400. package/dist-server/controllers/activity-thread/check-authority.js.map +1 -0
  401. package/dist-server/controllers/activity-thread/delegate.d.ts +7 -0
  402. package/dist-server/controllers/activity-thread/delegate.js +66 -0
  403. package/dist-server/controllers/activity-thread/delegate.js.map +1 -0
  404. package/dist-server/controllers/activity-thread/end.d.ts +6 -0
  405. package/dist-server/controllers/activity-thread/end.js +44 -0
  406. package/dist-server/controllers/activity-thread/end.js.map +1 -0
  407. package/dist-server/controllers/activity-thread/index.d.ts +7 -0
  408. package/dist-server/controllers/activity-thread/index.js +11 -0
  409. package/dist-server/controllers/activity-thread/index.js.map +1 -0
  410. package/dist-server/controllers/activity-thread/restart.d.ts +2 -0
  411. package/dist-server/controllers/activity-thread/restart.js +63 -0
  412. package/dist-server/controllers/activity-thread/restart.js.map +1 -0
  413. package/dist-server/controllers/activity-thread/save.d.ts +3 -0
  414. package/dist-server/controllers/activity-thread/save.js +45 -0
  415. package/dist-server/controllers/activity-thread/save.js.map +1 -0
  416. package/dist-server/controllers/activity-thread/start.d.ts +2 -0
  417. package/dist-server/controllers/activity-thread/start.js +43 -0
  418. package/dist-server/controllers/activity-thread/start.js.map +1 -0
  419. package/dist-server/controllers/activity-thread/submit.d.ts +6 -0
  420. package/dist-server/controllers/activity-thread/submit.js +90 -0
  421. package/dist-server/controllers/activity-thread/submit.js.map +1 -0
  422. package/dist-server/controllers/common.d.ts +34 -0
  423. package/dist-server/controllers/common.js +346 -0
  424. package/dist-server/controllers/common.js.map +1 -0
  425. package/dist-server/controllers/index.d.ts +5 -0
  426. package/dist-server/controllers/index.js +18 -0
  427. package/dist-server/controllers/index.js.map +1 -0
  428. package/dist-server/index.d.ts +6 -0
  429. package/dist-server/index.js +18 -0
  430. package/dist-server/index.js.map +1 -0
  431. package/dist-server/role-tasks.d.ts +2 -0
  432. package/dist-server/role-tasks.js +16 -0
  433. package/dist-server/role-tasks.js.map +1 -0
  434. package/dist-server/routes.d.ts +1 -0
  435. package/dist-server/routes.js +57 -0
  436. package/dist-server/routes.js.map +1 -0
  437. package/dist-server/service/activity/activity-decision-key-item-type.d.ts +206 -0
  438. package/dist-server/service/activity/activity-decision-key-item-type.js +182 -0
  439. package/dist-server/service/activity/activity-decision-key-item-type.js.map +1 -0
  440. package/dist-server/service/activity/activity-history.d.ts +44 -0
  441. package/dist-server/service/activity/activity-history.js +220 -0
  442. package/dist-server/service/activity/activity-history.js.map +1 -0
  443. package/dist-server/service/activity/activity-model-type.d.ts +49 -0
  444. package/dist-server/service/activity/activity-model-type.js +138 -0
  445. package/dist-server/service/activity/activity-model-type.js.map +1 -0
  446. package/dist-server/service/activity/activity-mutation.d.ts +12 -0
  447. package/dist-server/service/activity/activity-mutation.js +416 -0
  448. package/dist-server/service/activity/activity-mutation.js.map +1 -0
  449. package/dist-server/service/activity/activity-query.d.ts +24 -0
  450. package/dist-server/service/activity/activity-query.js +310 -0
  451. package/dist-server/service/activity/activity-query.js.map +1 -0
  452. package/dist-server/service/activity/activity-search-key-item-type.d.ts +6 -0
  453. package/dist-server/service/activity/activity-search-key-item-type.js +28 -0
  454. package/dist-server/service/activity/activity-search-key-item-type.js.map +1 -0
  455. package/dist-server/service/activity/activity-type.d.ts +84 -0
  456. package/dist-server/service/activity/activity-type.js +269 -0
  457. package/dist-server/service/activity/activity-type.js.map +1 -0
  458. package/dist-server/service/activity/activity.d.ts +135 -0
  459. package/dist-server/service/activity/activity.js +328 -0
  460. package/dist-server/service/activity/activity.js.map +1 -0
  461. package/dist-server/service/activity/approval-line-seats.d.ts +12 -0
  462. package/dist-server/service/activity/approval-line-seats.js +68 -0
  463. package/dist-server/service/activity/approval-line-seats.js.map +1 -0
  464. package/dist-server/service/activity/credential-field.d.ts +35 -0
  465. package/dist-server/service/activity/credential-field.js +89 -0
  466. package/dist-server/service/activity/credential-field.js.map +1 -0
  467. package/dist-server/service/activity/decision-key-declaration.d.ts +106 -0
  468. package/dist-server/service/activity/decision-key-declaration.js +181 -0
  469. package/dist-server/service/activity/decision-key-declaration.js.map +1 -0
  470. package/dist-server/service/activity/declaration-guard-subscriber.d.ts +24 -0
  471. package/dist-server/service/activity/declaration-guard-subscriber.js +46 -0
  472. package/dist-server/service/activity/declaration-guard-subscriber.js.map +1 -0
  473. package/dist-server/service/activity/event-subscriber.d.ts +7 -0
  474. package/dist-server/service/activity/event-subscriber.js +21 -0
  475. package/dist-server/service/activity/event-subscriber.js.map +1 -0
  476. package/dist-server/service/activity/freeze-decision-sentences-for.d.ts +11 -0
  477. package/dist-server/service/activity/freeze-decision-sentences-for.js +18 -0
  478. package/dist-server/service/activity/freeze-decision-sentences-for.js.map +1 -0
  479. package/dist-server/service/activity/index.d.ts +9 -0
  480. package/dist-server/service/activity/index.js +13 -0
  481. package/dist-server/service/activity/index.js.map +1 -0
  482. package/dist-server/service/activity/search-key-declaration.d.ts +38 -0
  483. package/dist-server/service/activity/search-key-declaration.js +49 -0
  484. package/dist-server/service/activity/search-key-declaration.js.map +1 -0
  485. package/dist-server/service/activity-approval/activity-approval-mutation.d.ts +8 -0
  486. package/dist-server/service/activity-approval/activity-approval-mutation.js +81 -0
  487. package/dist-server/service/activity-approval/activity-approval-mutation.js.map +1 -0
  488. package/dist-server/service/activity-approval/activity-approval-query.d.ts +42 -0
  489. package/dist-server/service/activity-approval/activity-approval-query.js +391 -0
  490. package/dist-server/service/activity-approval/activity-approval-query.js.map +1 -0
  491. package/dist-server/service/activity-approval/activity-approval-subscription.d.ts +6 -0
  492. package/dist-server/service/activity-approval/activity-approval-subscription.js +39 -0
  493. package/dist-server/service/activity-approval/activity-approval-subscription.js.map +1 -0
  494. package/dist-server/service/activity-approval/activity-approval-type.d.ts +10 -0
  495. package/dist-server/service/activity-approval/activity-approval-type.js +39 -0
  496. package/dist-server/service/activity-approval/activity-approval-type.js.map +1 -0
  497. package/dist-server/service/activity-approval/activity-approval.d.ts +67 -0
  498. package/dist-server/service/activity-approval/activity-approval.js +183 -0
  499. package/dist-server/service/activity-approval/activity-approval.js.map +1 -0
  500. package/dist-server/service/activity-approval/event-subscriber.d.ts +7 -0
  501. package/dist-server/service/activity-approval/event-subscriber.js +46 -0
  502. package/dist-server/service/activity-approval/event-subscriber.js.map +1 -0
  503. package/dist-server/service/activity-approval/index.d.ts +8 -0
  504. package/dist-server/service/activity-approval/index.js +12 -0
  505. package/dist-server/service/activity-approval/index.js.map +1 -0
  506. package/dist-server/service/activity-approval/my-pending-approvals.d.ts +33 -0
  507. package/dist-server/service/activity-approval/my-pending-approvals.js +52 -0
  508. package/dist-server/service/activity-approval/my-pending-approvals.js.map +1 -0
  509. package/dist-server/service/activity-instance/activity-instance-history.d.ts +60 -0
  510. package/dist-server/service/activity-instance/activity-instance-history.js +294 -0
  511. package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -0
  512. package/dist-server/service/activity-instance/activity-instance-mutation.d.ts +16 -0
  513. package/dist-server/service/activity-instance/activity-instance-mutation.js +185 -0
  514. package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -0
  515. package/dist-server/service/activity-instance/activity-instance-query.d.ts +27 -0
  516. package/dist-server/service/activity-instance/activity-instance-query.js +386 -0
  517. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -0
  518. package/dist-server/service/activity-instance/activity-instance-subscription.d.ts +6 -0
  519. package/dist-server/service/activity-instance/activity-instance-subscription.js +39 -0
  520. package/dist-server/service/activity-instance/activity-instance-subscription.js.map +1 -0
  521. package/dist-server/service/activity-instance/activity-instance-type.d.ts +107 -0
  522. package/dist-server/service/activity-instance/activity-instance-type.js +301 -0
  523. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -0
  524. package/dist-server/service/activity-instance/activity-instance.d.ts +81 -0
  525. package/dist-server/service/activity-instance/activity-instance.js +324 -0
  526. package/dist-server/service/activity-instance/activity-instance.js.map +1 -0
  527. package/dist-server/service/activity-instance/assignee-pool.d.ts +59 -0
  528. package/dist-server/service/activity-instance/assignee-pool.js +99 -0
  529. package/dist-server/service/activity-instance/assignee-pool.js.map +1 -0
  530. package/dist-server/service/activity-instance/draft-list-states.d.ts +39 -0
  531. package/dist-server/service/activity-instance/draft-list-states.js +51 -0
  532. package/dist-server/service/activity-instance/draft-list-states.js.map +1 -0
  533. package/dist-server/service/activity-instance/event-subscriber.d.ts +21 -0
  534. package/dist-server/service/activity-instance/event-subscriber.js +59 -0
  535. package/dist-server/service/activity-instance/event-subscriber.js.map +1 -0
  536. package/dist-server/service/activity-instance/index.d.ts +9 -0
  537. package/dist-server/service/activity-instance/index.js +13 -0
  538. package/dist-server/service/activity-instance/index.js.map +1 -0
  539. package/dist-server/service/activity-instance/request-box.d.ts +2 -0
  540. package/dist-server/service/activity-instance/request-box.js +18 -0
  541. package/dist-server/service/activity-instance/request-box.js.map +1 -0
  542. package/dist-server/service/activity-stats/activity-stats-query.d.ts +9 -0
  543. package/dist-server/service/activity-stats/activity-stats-query.js +230 -0
  544. package/dist-server/service/activity-stats/activity-stats-query.js.map +1 -0
  545. package/dist-server/service/activity-stats/activity-stats-type.d.ts +27 -0
  546. package/dist-server/service/activity-stats/activity-stats-type.js +74 -0
  547. package/dist-server/service/activity-stats/activity-stats-type.js.map +1 -0
  548. package/dist-server/service/activity-stats/event-placement.d.ts +55 -0
  549. package/dist-server/service/activity-stats/event-placement.js +82 -0
  550. package/dist-server/service/activity-stats/event-placement.js.map +1 -0
  551. package/dist-server/service/activity-stats/index.d.ts +2 -0
  552. package/dist-server/service/activity-stats/index.js +6 -0
  553. package/dist-server/service/activity-stats/index.js.map +1 -0
  554. package/dist-server/service/activity-summary/activity-summary-query.d.ts +8 -0
  555. package/dist-server/service/activity-summary/activity-summary-query.js +137 -0
  556. package/dist-server/service/activity-summary/activity-summary-query.js.map +1 -0
  557. package/dist-server/service/activity-summary/activity-summary.d.ts +6 -0
  558. package/dist-server/service/activity-summary/activity-summary.js +28 -0
  559. package/dist-server/service/activity-summary/activity-summary.js.map +1 -0
  560. package/dist-server/service/activity-summary/index.d.ts +5 -0
  561. package/dist-server/service/activity-summary/index.js +9 -0
  562. package/dist-server/service/activity-summary/index.js.map +1 -0
  563. package/dist-server/service/activity-summary/open-work.d.ts +4 -0
  564. package/dist-server/service/activity-summary/open-work.js +51 -0
  565. package/dist-server/service/activity-summary/open-work.js.map +1 -0
  566. package/dist-server/service/activity-summary/person-open-work.d.ts +17 -0
  567. package/dist-server/service/activity-summary/person-open-work.js +68 -0
  568. package/dist-server/service/activity-summary/person-open-work.js.map +1 -0
  569. package/dist-server/service/activity-template/activity-template-history.d.ts +32 -0
  570. package/dist-server/service/activity-template/activity-template-history.js +165 -0
  571. package/dist-server/service/activity-template/activity-template-history.js.map +1 -0
  572. package/dist-server/service/activity-template/activity-template-mutation.d.ts +10 -0
  573. package/dist-server/service/activity-template/activity-template-mutation.js +194 -0
  574. package/dist-server/service/activity-template/activity-template-mutation.js.map +1 -0
  575. package/dist-server/service/activity-template/activity-template-query.d.ts +14 -0
  576. package/dist-server/service/activity-template/activity-template-query.js +112 -0
  577. package/dist-server/service/activity-template/activity-template-query.js.map +1 -0
  578. package/dist-server/service/activity-template/activity-template-type.d.ts +44 -0
  579. package/dist-server/service/activity-template/activity-template-type.js +164 -0
  580. package/dist-server/service/activity-template/activity-template-type.js.map +1 -0
  581. package/dist-server/service/activity-template/activity-template.d.ts +36 -0
  582. package/dist-server/service/activity-template/activity-template.js +154 -0
  583. package/dist-server/service/activity-template/activity-template.js.map +1 -0
  584. package/dist-server/service/activity-template/event-subscriber.d.ts +7 -0
  585. package/dist-server/service/activity-template/event-subscriber.js +21 -0
  586. package/dist-server/service/activity-template/event-subscriber.js.map +1 -0
  587. package/dist-server/service/activity-template/index.d.ts +8 -0
  588. package/dist-server/service/activity-template/index.js +12 -0
  589. package/dist-server/service/activity-template/index.js.map +1 -0
  590. package/dist-server/service/activity-thread/activity-thread-history-query.d.ts +10 -0
  591. package/dist-server/service/activity-thread/activity-thread-history-query.js +69 -0
  592. package/dist-server/service/activity-thread/activity-thread-history-query.js.map +1 -0
  593. package/dist-server/service/activity-thread/activity-thread-history.d.ts +39 -0
  594. package/dist-server/service/activity-thread/activity-thread-history.js +211 -0
  595. package/dist-server/service/activity-thread/activity-thread-history.js.map +1 -0
  596. package/dist-server/service/activity-thread/activity-thread-mutation.d.ts +20 -0
  597. package/dist-server/service/activity-thread/activity-thread-mutation.js +115 -0
  598. package/dist-server/service/activity-thread/activity-thread-mutation.js.map +1 -0
  599. package/dist-server/service/activity-thread/activity-thread-query.d.ts +24 -0
  600. package/dist-server/service/activity-thread/activity-thread-query.js +276 -0
  601. package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -0
  602. package/dist-server/service/activity-thread/activity-thread-subscription.d.ts +6 -0
  603. package/dist-server/service/activity-thread/activity-thread-subscription.js +38 -0
  604. package/dist-server/service/activity-thread/activity-thread-subscription.js.map +1 -0
  605. package/dist-server/service/activity-thread/activity-thread-type.d.ts +15 -0
  606. package/dist-server/service/activity-thread/activity-thread-type.js +50 -0
  607. package/dist-server/service/activity-thread/activity-thread-type.js.map +1 -0
  608. package/dist-server/service/activity-thread/activity-thread.d.ts +47 -0
  609. package/dist-server/service/activity-thread/activity-thread.js +197 -0
  610. package/dist-server/service/activity-thread/activity-thread.js.map +1 -0
  611. package/dist-server/service/activity-thread/event-subscriber.d.ts +13 -0
  612. package/dist-server/service/activity-thread/event-subscriber.js +45 -0
  613. package/dist-server/service/activity-thread/event-subscriber.js.map +1 -0
  614. package/dist-server/service/activity-thread/index.d.ts +10 -0
  615. package/dist-server/service/activity-thread/index.js +14 -0
  616. package/dist-server/service/activity-thread/index.js.map +1 -0
  617. package/dist-server/service/activity-thread/my-open-threads.d.ts +33 -0
  618. package/dist-server/service/activity-thread/my-open-threads.js +85 -0
  619. package/dist-server/service/activity-thread/my-open-threads.js.map +1 -0
  620. package/dist-server/service/activity-thread/todo-order.d.ts +49 -0
  621. package/dist-server/service/activity-thread/todo-order.js +70 -0
  622. package/dist-server/service/activity-thread/todo-order.js.map +1 -0
  623. package/dist-server/service/approval-notice/approval-notice-rules.d.ts +67 -0
  624. package/dist-server/service/approval-notice/approval-notice-rules.js +67 -0
  625. package/dist-server/service/approval-notice/approval-notice-rules.js.map +1 -0
  626. package/dist-server/service/approval-notice/approval-notice.d.ts +11 -0
  627. package/dist-server/service/approval-notice/approval-notice.js +76 -0
  628. package/dist-server/service/approval-notice/approval-notice.js.map +1 -0
  629. package/dist-server/service/approval-progress/approval-progress-query.d.ts +14 -0
  630. package/dist-server/service/approval-progress/approval-progress-query.js +142 -0
  631. package/dist-server/service/approval-progress/approval-progress-query.js.map +1 -0
  632. package/dist-server/service/approval-progress/approval-progress-rule.d.ts +67 -0
  633. package/dist-server/service/approval-progress/approval-progress-rule.js +102 -0
  634. package/dist-server/service/approval-progress/approval-progress-rule.js.map +1 -0
  635. package/dist-server/service/approval-progress/approval-progress-type.d.ts +44 -0
  636. package/dist-server/service/approval-progress/approval-progress-type.js +172 -0
  637. package/dist-server/service/approval-progress/approval-progress-type.js.map +1 -0
  638. package/dist-server/service/approval-progress/index.d.ts +2 -0
  639. package/dist-server/service/approval-progress/index.js +6 -0
  640. package/dist-server/service/approval-progress/index.js.map +1 -0
  641. package/dist-server/service/approval-progress/waiting-on.d.ts +15 -0
  642. package/dist-server/service/approval-progress/waiting-on.js +40 -0
  643. package/dist-server/service/approval-progress/waiting-on.js.map +1 -0
  644. package/dist-server/service/index.d.ts +24 -0
  645. package/dist-server/service/index.js +80 -0
  646. package/dist-server/service/index.js.map +1 -0
  647. package/dist-server/service/installable-activity/activity-readiness.d.ts +58 -0
  648. package/dist-server/service/installable-activity/activity-readiness.js +105 -0
  649. package/dist-server/service/installable-activity/activity-readiness.js.map +1 -0
  650. package/dist-server/service/installable-activity/index.d.ts +6 -0
  651. package/dist-server/service/installable-activity/index.js +10 -0
  652. package/dist-server/service/installable-activity/index.js.map +1 -0
  653. package/dist-server/service/installable-activity/installable-activity-mutation.d.ts +11 -0
  654. package/dist-server/service/installable-activity/installable-activity-mutation.js +83 -0
  655. package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -0
  656. package/dist-server/service/installable-activity/installable-activity-query.d.ts +22 -0
  657. package/dist-server/service/installable-activity/installable-activity-query.js +127 -0
  658. package/dist-server/service/installable-activity/installable-activity-query.js.map +1 -0
  659. package/dist-server/service/installable-activity/installable-activity-type.d.ts +5 -0
  660. package/dist-server/service/installable-activity/installable-activity-type.js +21 -0
  661. package/dist-server/service/installable-activity/installable-activity-type.js.map +1 -0
  662. package/dist-server/service/installable-activity/installable-activity.d.ts +92 -0
  663. package/dist-server/service/installable-activity/installable-activity.js +140 -0
  664. package/dist-server/service/installable-activity/installable-activity.js.map +1 -0
  665. package/dist-server/service/nulls-last.d.ts +30 -0
  666. package/dist-server/service/nulls-last.js +37 -0
  667. package/dist-server/service/nulls-last.js.map +1 -0
  668. package/dist-server/service/subscription/roles-of.d.ts +9 -0
  669. package/dist-server/service/subscription/roles-of.js +17 -0
  670. package/dist-server/service/subscription/roles-of.js.map +1 -0
  671. package/dist-server/service/subscription/subscription-filters.d.ts +47 -0
  672. package/dist-server/service/subscription/subscription-filters.js +57 -0
  673. package/dist-server/service/subscription/subscription-filters.js.map +1 -0
  674. package/dist-server/service/work-door/activity-lookup.d.ts +70 -0
  675. package/dist-server/service/work-door/activity-lookup.js +110 -0
  676. package/dist-server/service/work-door/activity-lookup.js.map +1 -0
  677. package/dist-server/service/work-door/approval-line-standing.d.ts +106 -0
  678. package/dist-server/service/work-door/approval-line-standing.js +65 -0
  679. package/dist-server/service/work-door/approval-line-standing.js.map +1 -0
  680. package/dist-server/service/work-door/index.d.ts +15 -0
  681. package/dist-server/service/work-door/index.js +20 -0
  682. package/dist-server/service/work-door/index.js.map +1 -0
  683. package/dist-server/service/work-door/pass-work-door.d.ts +74 -0
  684. package/dist-server/service/work-door/pass-work-door.js +45 -0
  685. package/dist-server/service/work-door/pass-work-door.js.map +1 -0
  686. package/dist-server/service/work-door/work-door-declaration.d.ts +135 -0
  687. package/dist-server/service/work-door/work-door-declaration.js +87 -0
  688. package/dist-server/service/work-door/work-door-declaration.js.map +1 -0
  689. package/dist-server/service/work-door/work-door-event.d.ts +20 -0
  690. package/dist-server/service/work-door/work-door-event.js +25 -0
  691. package/dist-server/service/work-door/work-door-event.js.map +1 -0
  692. package/dist-server/service/work-door/work-door-journal-service.d.ts +47 -0
  693. package/dist-server/service/work-door/work-door-journal-service.js +75 -0
  694. package/dist-server/service/work-door/work-door-journal-service.js.map +1 -0
  695. package/dist-server/service/work-door/work-door-journal.d.ts +30 -0
  696. package/dist-server/service/work-door/work-door-journal.js +94 -0
  697. package/dist-server/service/work-door/work-door-journal.js.map +1 -0
  698. package/dist-server/service/work-door/work-door-not-used.d.ts +39 -0
  699. package/dist-server/service/work-door/work-door-not-used.js +86 -0
  700. package/dist-server/service/work-door/work-door-not-used.js.map +1 -0
  701. package/dist-server/service/work-door/work-door-resolver.d.ts +32 -0
  702. package/dist-server/service/work-door/work-door-resolver.js +152 -0
  703. package/dist-server/service/work-door/work-door-resolver.js.map +1 -0
  704. package/dist-server/service/work-door/work-door-service.d.ts +36 -0
  705. package/dist-server/service/work-door/work-door-service.js +127 -0
  706. package/dist-server/service/work-door/work-door-service.js.map +1 -0
  707. package/dist-server/service/work-door/work-door-type.d.ts +88 -0
  708. package/dist-server/service/work-door/work-door-type.js +206 -0
  709. package/dist-server/service/work-door/work-door-type.js.map +1 -0
  710. package/dist-server/service/work-door/work-door.d.ts +187 -0
  711. package/dist-server/service/work-door/work-door.js +119 -0
  712. package/dist-server/service/work-door/work-door.js.map +1 -0
  713. package/dist-server/tsconfig.tsbuildinfo +1 -0
  714. package/package.json +10 -10
  715. package/shared/approval-step.d.ts +21 -0
  716. package/shared/approval-step.js +55 -0
  717. package/tests/approval-progress-db.test.ts +143 -0
  718. package/things-factory.config.js +1 -0
  719. package/translations/en.json +20 -1
  720. package/translations/es.json +20 -1
  721. package/translations/ja.json +20 -1
  722. package/translations/ko.json +20 -1
  723. package/translations/ms.json +20 -1
  724. package/translations/zh.json +20 -1
@@ -0,0 +1,106 @@
1
+ import { Refusal } from '@things-factory/shell';
2
+ /**
3
+ * 결재선이 **차 있나** — 순수 판단. DB 도 TypeORM 도 모른다.
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ── 「있다」와 「찼다」가 다르다 ───────────────────────────────────────────
7
+ * 앞서는 `approvalLine?.length` 만 셌다. 그러면 **역할을 지목해 놓고 그 역할에 사람이 하나도 없는**
8
+ * 결재선이 「찼다」로 읽힌다. 문 현황 화면은 「이 문은 섰습니다」라고 그리고, 현장이 상신을 누르는
9
+ * 순간 워크리스트가 `approver is not set` 으로 던진다 — **준비됐다고 말해 놓고 쓸 때 터지는** 부류다.
10
+ *
11
+ * 실 테넌트에서 이것이 예외가 아니다. 미라텍에는 이 제품이 세운 역할이 하나도 없다
12
+ * (§`project_mes_roles_locked_behind_demo`). 역할을 지목한 결재선은 거기서 전부 빈 자리를 가리킨다.
13
+ *
14
+ * ── 불을 돌려주지 않는다. 그리고 **union 으로도 안 돌려준다** ────────────
15
+ * 막은 쪽이 이유를 말한다. `true`/`false` 하나면 화면이 「왜 안 되나」를 **다시 세게 되고**, 그러면
16
+ * 정의가 두 곳이 된다 — 이 판단을 한 곳으로 모은 이유가 없어진다.
17
+ *
18
+ * 그래서 처음에 `{ok:true} | {ok:false, code}` 로 두었는데, 이 패키지의 `server/tsconfig.json` 은
19
+ * **`strict: false`** 라 `strictNullChecks` 가 없고, 그러면 TS 가 **boolean 판별자로 union 을 안
20
+ * 좁힌다.** `if (r.ok) return` 뒤에서 `r.code` 를 읽으면 컴파일이 깨진다 — 하루에 소비자 둘이
21
+ * 연달아 걸렸고 그중 하나는 서버를 아예 못 뜨게 했다.
22
+ *
23
+ * 그래서 **한 객체에 선택 칸**이다. `if (standing.refusal)` 하나로 어디서나 읽힌다.
24
+ * [합의했다] ADR-0047 ⑤(개정)
25
+ *
26
+ * ```
27
+ * approval-line-missing 결재선 자체가 없다 누가 결재하는지를 정해야 한다
28
+ * approval-role-empty 역할은 있는데 사람이 없다 그 역할에 사람을 넣어야 한다
29
+ * approval-person-absent 지목한 사람이 여기 없다 다른 사람을 지목하거나 그 사람을 넣어야 한다
30
+ * ```
31
+ *
32
+ * 관리자가 할 일이 다르므로 코드가 셋이다.
33
+ *
34
+ * ── 참조는 세지 않는다 ───────────────────────────────────────────────────
35
+ * `participation: 'reference'` 는 의견만 내고 결재를 막지 않는다. 참조자 역할이 비었다고 거절하면
36
+ * **결재와 무관한 이유로** 막는 것이 된다. 참조만 있는 결재선은 결재 없이 끝나므로 「없다」로 읽는다.
37
+ *
38
+ * ── 읽는 것은 부르는 쪽이 넘긴다 ─────────────────────────────────────────
39
+ * 포트 하나를 받는다. 이 판단이 `manager` 를 받으면 TypeORM 을 알게 되어 순수 시험이 서지 않고,
40
+ * **어느 도메인으로 좁혔나**가 부르는 쪽에서 안 보이게 된다. 포트의 수명은 **판정 하나**다 — 더
41
+ * 오래 살면 역할에 사람을 넣은 직후에도 옛 답을 내놓는다.
42
+ *
43
+ * ── 사람을 직접 지목한 자리도 읽는다 ─────────────────────────────────────
44
+ * 「이 제품은 역할만 쓴다」로 닫지 않는다. 그렇게 두면 **없는 사람을 지목한 결재선이 「찼다」로
45
+ * 그려지고 상신 순간 터진다** — 역할에서 고친 그 모양이 사람 축으로 다시 나는 것이고, 「없음」이
46
+ * 안전하지 않은 쪽으로 기우는 것이다. 게다가 이 정의는 워크리스트의 `ApprovalLineItem` 을 읽는
47
+ * 공용 자리라, 다른 제품이 사람을 지목하는 날 조용히 틀린다.
48
+ *
49
+ * `Myself` · `MyDepartment` · `MySupervisor` 는 **상신할 때 그 사람으로 풀리는** 자리라 미리 셀 것이
50
+ * 없다. 부서 지목(`Department`)은 부서장이 있어야 풀리는데 그 코드는 아직 없다 — 지어내지 않는다.
51
+ *
52
+ * [합의했다] operato-application/adr/ADR-0047.md ③⑤
53
+ * ═══════════════════════════════════════════════════════════════════════════
54
+ */
55
+ /** 결재선 한 자리 — `ApprovalLineItem` 중 이 판단이 보는 칸만. */
56
+ export interface ApprovalSeat {
57
+ /** `OrgMemberTargetType` — 역할이면 `'Role'`. */
58
+ type?: string;
59
+ /** 역할이면 role id, 사람이면 user id. */
60
+ value?: string;
61
+ /** 편집기가 고른 대상. 편집기는 `value` 를 안 쓰고 여기에만 적는다(§`seatRoleId`). */
62
+ approver?: {
63
+ id?: string;
64
+ };
65
+ /** 비어 있으면 결재다(`ApprovalLineItem.participation` 의 규약). */
66
+ participation?: string;
67
+ }
68
+ export type ApprovalLineRefusal = 'approval-line-missing' | 'approval-role-empty' | 'approval-person-absent';
69
+ export interface ApprovalLineStanding {
70
+ /** 이 결재선이 지나는 자리 수. 안 서는 결재선이면 0. */
71
+ approvers: number;
72
+ /**
73
+ * 왜 안 서나 — **있으면 안 서는 것이다.** 없으면 선다.
74
+ *
75
+ * `params` 는 그 코드가 가리키는 것 하나다: 역할이 비었으면 그 역할, 사람이 없으면 그 사람.
76
+ */
77
+ refusal?: {
78
+ code: ApprovalLineRefusal;
79
+ params?: {
80
+ role?: string;
81
+ personId?: string;
82
+ };
83
+ };
84
+ }
85
+ /** A line that does not stand, as a refusal. The params are the one thing the code points at. */
86
+ export declare function approvalLineRefusal(refusal: NonNullable<ApprovalLineStanding['refusal']>): Refusal;
87
+ /** 결재선의 자리가 실제로 사람으로 풀리나 — 읽는 것은 부르는 쪽 일이다. */
88
+ export interface ApprovalSeatReader {
89
+ /** 그 역할에 사람이 하나 이상 있나. */
90
+ roleHasMembers(roleId: string): Promise<boolean>;
91
+ /** 지목한 그 사람이 이 공장에 있고 계정이 붙어 있나. */
92
+ personIsHere(personId: string): Promise<boolean>;
93
+ }
94
+ /**
95
+ * A seat's role, read the way submission reads it (`create-approval`, `resolve-judgeable-seats`).
96
+ *
97
+ * The approval line editor writes what it picked under `approver` and leaves `value` empty; seeded
98
+ * lines carry both. Reading `value` alone here drew 「결재자 없음」 on the door screen for a line that
99
+ * submits. One function, so the screen and submission cannot read a seat two ways again.
100
+ */
101
+ export declare function seatRoleId(seat?: ApprovalSeat | null): string | undefined;
102
+ /** A person seat, read the way submission reads it (`getSystemUserFromOrgMemberItem`: approver first). */
103
+ export declare function seatPersonId(seat?: ApprovalSeat | null): string | undefined;
104
+ export declare function judgeApprovalLine(line: ApprovalSeat[] | undefined | null, reader: ApprovalSeatReader): Promise<ApprovalLineStanding>;
105
+ /** 결재선에서 **역할을 지목한 자리**의 id 들 — 부르는 쪽이 미리 읽어 둘 때 쓴다. */
106
+ export declare function rolesNamedIn(line: ApprovalSeat[] | undefined | null): string[];
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.approvalLineRefusal = approvalLineRefusal;
4
+ exports.seatRoleId = seatRoleId;
5
+ exports.seatPersonId = seatPersonId;
6
+ exports.judgeApprovalLine = judgeApprovalLine;
7
+ exports.rolesNamedIn = rolesNamedIn;
8
+ const shell_1 = require("@things-factory/shell");
9
+ const LINE_REFUSAL_ENGLISH = {
10
+ 'approval-line-missing': 'this form has no approval line. set who approves it.',
11
+ 'approval-role-empty': 'nobody holds the role {role} named in the approval line. add a person to that role.',
12
+ 'approval-person-absent': 'the person named in the approval line is not in this site. name someone else in the approval line.'
13
+ };
14
+ /** A line that does not stand, as a refusal. The params are the one thing the code points at. */
15
+ function approvalLineRefusal(refusal) {
16
+ const params = { role: refusal.params?.role ?? null, personId: refusal.params?.personId ?? null };
17
+ return new shell_1.Refusal(refusal.code, params, LINE_REFUSAL_ENGLISH[refusal.code].replace('{role}', params.role ?? ''));
18
+ }
19
+ /**
20
+ * A seat's role, read the way submission reads it (`create-approval`, `resolve-judgeable-seats`).
21
+ *
22
+ * The approval line editor writes what it picked under `approver` and leaves `value` empty; seeded
23
+ * lines carry both. Reading `value` alone here drew 「결재자 없음」 on the door screen for a line that
24
+ * submits. One function, so the screen and submission cannot read a seat two ways again.
25
+ */
26
+ function seatRoleId(seat) {
27
+ return seat?.value || seat?.approver?.id || undefined;
28
+ }
29
+ /** A person seat, read the way submission reads it (`getSystemUserFromOrgMemberItem`: approver first). */
30
+ function seatPersonId(seat) {
31
+ return seat?.approver?.id || seat?.value || undefined;
32
+ }
33
+ const REFERENCE = 'reference';
34
+ const ROLE = 'Role';
35
+ const PERSON = 'Employee';
36
+ async function judgeApprovalLine(line, reader) {
37
+ const seats = (line ?? []).filter(seat => seat?.participation !== REFERENCE);
38
+ if (!seats.length) {
39
+ return { approvers: 0, refusal: { code: 'approval-line-missing' } };
40
+ }
41
+ for (const seat of seats) {
42
+ if (seat?.type === ROLE) {
43
+ const role = seatRoleId(seat);
44
+ if (!role || !(await reader.roleHasMembers(role))) {
45
+ return { approvers: 0, refusal: { code: 'approval-role-empty', params: { role: role ?? '' } } };
46
+ }
47
+ continue;
48
+ }
49
+ if (seat?.type === PERSON) {
50
+ const person = seatPersonId(seat);
51
+ if (!person || !(await reader.personIsHere(person))) {
52
+ return { approvers: 0, refusal: { code: 'approval-person-absent', params: { personId: person ?? '' } } };
53
+ }
54
+ }
55
+ }
56
+ return { approvers: seats.length };
57
+ }
58
+ /** 결재선에서 **역할을 지목한 자리**의 id 들 — 부르는 쪽이 미리 읽어 둘 때 쓴다. */
59
+ function rolesNamedIn(line) {
60
+ return (line ?? [])
61
+ .filter(seat => seat?.participation !== REFERENCE && seat?.type === ROLE)
62
+ .map(seat => seatRoleId(seat))
63
+ .filter((one) => !!one);
64
+ }
65
+ //# sourceMappingURL=approval-line-standing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-line-standing.js","sourceRoot":"","sources":["../../../server/service/work-door/approval-line-standing.ts"],"names":[],"mappings":";;AA2FA,kDAIC;AAiBD,gCAEC;AAGD,oCAEC;AAMD,8CA+BC;AAGD,oCAKC;AApKD,iDAA+C;AAoF/C,MAAM,oBAAoB,GAAwC;IAChE,uBAAuB,EAAE,sDAAsD;IAC/E,qBAAqB,EAAE,qFAAqF;IAC5G,wBAAwB,EAAE,oGAAoG;CAC/H,CAAA;AAED,iGAAiG;AACjG,SAAgB,mBAAmB,CAAC,OAAqD;IACvF,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAA;IAEjG,OAAO,IAAI,eAAO,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAA;AACnH,CAAC;AAUD;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAA0B;IACnD,OAAO,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,SAAS,CAAA;AACvD,CAAC;AAED,0GAA0G;AAC1G,SAAgB,YAAY,CAAC,IAA0B;IACrD,OAAO,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,IAAI,EAAE,KAAK,IAAI,SAAS,CAAA;AACvD,CAAC;AAED,MAAM,SAAS,GAAG,WAAW,CAAA;AAC7B,MAAM,IAAI,GAAG,MAAM,CAAA;AACnB,MAAM,MAAM,GAAG,UAAU,CAAA;AAElB,KAAK,UAAU,iBAAiB,CACrC,IAAuC,EACvC,MAA0B;IAE1B,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,SAAS,CAAC,CAAA;IAE5E,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,CAAA;IACrE,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;YAE7B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBAClD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,CAAA;YACjG,CAAC;YAED,SAAQ;QACV,CAAC;QAED,IAAI,IAAI,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;YAEjC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;gBACpD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE,CAAA;YAC1G,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,CAAA;AACpC,CAAC;AAED,wDAAwD;AACxD,SAAgB,YAAY,CAAC,IAAuC;IAClE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,SAAS,IAAI,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;SACxE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC7B,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAC1C,CAAC","sourcesContent":["import { Refusal } from '@things-factory/shell'\n\n/**\n * 결재선이 **차 있나** — 순수 판단. DB 도 TypeORM 도 모른다.\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 「있다」와 「찼다」가 다르다 ───────────────────────────────────────────\n * 앞서는 `approvalLine?.length` 만 셌다. 그러면 **역할을 지목해 놓고 그 역할에 사람이 하나도 없는**\n * 결재선이 「찼다」로 읽힌다. 문 현황 화면은 「이 문은 섰습니다」라고 그리고, 현장이 상신을 누르는\n * 순간 워크리스트가 `approver is not set` 으로 던진다 — **준비됐다고 말해 놓고 쓸 때 터지는** 부류다.\n *\n * 실 테넌트에서 이것이 예외가 아니다. 미라텍에는 이 제품이 세운 역할이 하나도 없다\n * (§`project_mes_roles_locked_behind_demo`). 역할을 지목한 결재선은 거기서 전부 빈 자리를 가리킨다.\n *\n * ── 불을 돌려주지 않는다. 그리고 **union 으로도 안 돌려준다** ────────────\n * 막은 쪽이 이유를 말한다. `true`/`false` 하나면 화면이 「왜 안 되나」를 **다시 세게 되고**, 그러면\n * 정의가 두 곳이 된다 — 이 판단을 한 곳으로 모은 이유가 없어진다.\n *\n * 그래서 처음에 `{ok:true} | {ok:false, code}` 로 두었는데, 이 패키지의 `server/tsconfig.json` 은\n * **`strict: false`** 라 `strictNullChecks` 가 없고, 그러면 TS 가 **boolean 판별자로 union 을 안\n * 좁힌다.** `if (r.ok) return` 뒤에서 `r.code` 를 읽으면 컴파일이 깨진다 — 하루에 소비자 둘이\n * 연달아 걸렸고 그중 하나는 서버를 아예 못 뜨게 했다.\n *\n * 그래서 **한 객체에 선택 칸**이다. `if (standing.refusal)` 하나로 어디서나 읽힌다.\n * [합의했다] ADR-0047 ⑤(개정)\n *\n * ```\n * approval-line-missing 결재선 자체가 없다 누가 결재하는지를 정해야 한다\n * approval-role-empty 역할은 있는데 사람이 없다 그 역할에 사람을 넣어야 한다\n * approval-person-absent 지목한 사람이 여기 없다 다른 사람을 지목하거나 그 사람을 넣어야 한다\n * ```\n *\n * 관리자가 할 일이 다르므로 코드가 셋이다.\n *\n * ── 참조는 세지 않는다 ───────────────────────────────────────────────────\n * `participation: 'reference'` 는 의견만 내고 결재를 막지 않는다. 참조자 역할이 비었다고 거절하면\n * **결재와 무관한 이유로** 막는 것이 된다. 참조만 있는 결재선은 결재 없이 끝나므로 「없다」로 읽는다.\n *\n * ── 읽는 것은 부르는 쪽이 넘긴다 ─────────────────────────────────────────\n * 포트 하나를 받는다. 이 판단이 `manager` 를 받으면 TypeORM 을 알게 되어 순수 시험이 서지 않고,\n * **어느 도메인으로 좁혔나**가 부르는 쪽에서 안 보이게 된다. 포트의 수명은 **판정 하나**다 — 더\n * 오래 살면 역할에 사람을 넣은 직후에도 옛 답을 내놓는다.\n *\n * ── 사람을 직접 지목한 자리도 읽는다 ─────────────────────────────────────\n * 「이 제품은 역할만 쓴다」로 닫지 않는다. 그렇게 두면 **없는 사람을 지목한 결재선이 「찼다」로\n * 그려지고 상신 순간 터진다** — 역할에서 고친 그 모양이 사람 축으로 다시 나는 것이고, 「없음」이\n * 안전하지 않은 쪽으로 기우는 것이다. 게다가 이 정의는 워크리스트의 `ApprovalLineItem` 을 읽는\n * 공용 자리라, 다른 제품이 사람을 지목하는 날 조용히 틀린다.\n *\n * `Myself` · `MyDepartment` · `MySupervisor` 는 **상신할 때 그 사람으로 풀리는** 자리라 미리 셀 것이\n * 없다. 부서 지목(`Department`)은 부서장이 있어야 풀리는데 그 코드는 아직 없다 — 지어내지 않는다.\n *\n * [합의했다] operato-application/adr/ADR-0047.md ③⑤\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/** 결재선 한 자리 — `ApprovalLineItem` 중 이 판단이 보는 칸만. */\nexport interface ApprovalSeat {\n /** `OrgMemberTargetType` — 역할이면 `'Role'`. */\n type?: string\n /** 역할이면 role id, 사람이면 user id. */\n value?: string\n /** 편집기가 고른 대상. 편집기는 `value` 를 안 쓰고 여기에만 적는다(§`seatRoleId`). */\n approver?: { id?: string }\n /** 비어 있으면 결재다(`ApprovalLineItem.participation` 의 규약). */\n participation?: string\n}\n\nexport type ApprovalLineRefusal = 'approval-line-missing' | 'approval-role-empty' | 'approval-person-absent'\n\nexport interface ApprovalLineStanding {\n /** 이 결재선이 지나는 자리 수. 안 서는 결재선이면 0. */\n approvers: number\n /**\n * 왜 안 서나 — **있으면 안 서는 것이다.** 없으면 선다.\n *\n * `params` 는 그 코드가 가리키는 것 하나다: 역할이 비었으면 그 역할, 사람이 없으면 그 사람.\n */\n refusal?: {\n code: ApprovalLineRefusal\n params?: { role?: string; personId?: string }\n }\n}\n\nconst LINE_REFUSAL_ENGLISH: Record<ApprovalLineRefusal, string> = {\n 'approval-line-missing': 'this form has no approval line. set who approves it.',\n 'approval-role-empty': 'nobody holds the role {role} named in the approval line. add a person to that role.',\n 'approval-person-absent': 'the person named in the approval line is not in this site. name someone else in the approval line.'\n}\n\n/** A line that does not stand, as a refusal. The params are the one thing the code points at. */\nexport function approvalLineRefusal(refusal: NonNullable<ApprovalLineStanding['refusal']>): Refusal {\n const params = { role: refusal.params?.role ?? null, personId: refusal.params?.personId ?? null }\n\n return new Refusal(refusal.code, params, LINE_REFUSAL_ENGLISH[refusal.code].replace('{role}', params.role ?? ''))\n}\n\n/** 결재선의 자리가 실제로 사람으로 풀리나 — 읽는 것은 부르는 쪽 일이다. */\nexport interface ApprovalSeatReader {\n /** 그 역할에 사람이 하나 이상 있나. */\n roleHasMembers(roleId: string): Promise<boolean>\n /** 지목한 그 사람이 이 공장에 있고 계정이 붙어 있나. */\n personIsHere(personId: string): Promise<boolean>\n}\n\n/**\n * A seat's role, read the way submission reads it (`create-approval`, `resolve-judgeable-seats`).\n *\n * The approval line editor writes what it picked under `approver` and leaves `value` empty; seeded\n * lines carry both. Reading `value` alone here drew 「결재자 없음」 on the door screen for a line that\n * submits. One function, so the screen and submission cannot read a seat two ways again.\n */\nexport function seatRoleId(seat?: ApprovalSeat | null): string | undefined {\n return seat?.value || seat?.approver?.id || undefined\n}\n\n/** A person seat, read the way submission reads it (`getSystemUserFromOrgMemberItem`: approver first). */\nexport function seatPersonId(seat?: ApprovalSeat | null): string | undefined {\n return seat?.approver?.id || seat?.value || undefined\n}\n\nconst REFERENCE = 'reference'\nconst ROLE = 'Role'\nconst PERSON = 'Employee'\n\nexport async function judgeApprovalLine(\n line: ApprovalSeat[] | undefined | null,\n reader: ApprovalSeatReader\n): Promise<ApprovalLineStanding> {\n const seats = (line ?? []).filter(seat => seat?.participation !== REFERENCE)\n\n if (!seats.length) {\n return { approvers: 0, refusal: { code: 'approval-line-missing' } }\n }\n\n for (const seat of seats) {\n if (seat?.type === ROLE) {\n const role = seatRoleId(seat)\n\n if (!role || !(await reader.roleHasMembers(role))) {\n return { approvers: 0, refusal: { code: 'approval-role-empty', params: { role: role ?? '' } } }\n }\n\n continue\n }\n\n if (seat?.type === PERSON) {\n const person = seatPersonId(seat)\n\n if (!person || !(await reader.personIsHere(person))) {\n return { approvers: 0, refusal: { code: 'approval-person-absent', params: { personId: person ?? '' } } }\n }\n }\n }\n\n return { approvers: seats.length }\n}\n\n/** 결재선에서 **역할을 지목한 자리**의 id 들 — 부르는 쪽이 미리 읽어 둘 때 쓴다. */\nexport function rolesNamedIn(line: ApprovalSeat[] | undefined | null): string[] {\n return (line ?? [])\n .filter(seat => seat?.participation !== REFERENCE && seat?.type === ROLE)\n .map(seat => seatRoleId(seat))\n .filter((one): one is string => !!one)\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import { WorkDoorNotUsed } from './work-door-not-used.js';
2
+ import { WorkDoorJournal } from './work-door-journal.js';
3
+ import { WorkDoorResolver } from './work-door-resolver.js';
4
+ export declare const entities: (typeof WorkDoorNotUsed | typeof WorkDoorJournal)[];
5
+ export declare const resolvers: (typeof WorkDoorResolver)[];
6
+ export * from './approval-line-standing.js';
7
+ export * from './activity-lookup.js';
8
+ export * from './work-door.js';
9
+ export * from './work-door-declaration.js';
10
+ export * from './work-door-journal.js';
11
+ export * from './work-door-journal-service.js';
12
+ export * from './work-door-not-used.js';
13
+ export * from './work-door-service.js';
14
+ export * from './work-door-type.js';
15
+ export * from './pass-work-door.js';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const work_door_not_used_js_1 = require("./work-door-not-used.js");
6
+ const work_door_journal_js_1 = require("./work-door-journal.js");
7
+ const work_door_resolver_js_1 = require("./work-door-resolver.js");
8
+ exports.entities = [work_door_not_used_js_1.WorkDoorNotUsed, work_door_journal_js_1.WorkDoorJournal];
9
+ exports.resolvers = [work_door_resolver_js_1.WorkDoorResolver];
10
+ tslib_1.__exportStar(require("./approval-line-standing.js"), exports);
11
+ tslib_1.__exportStar(require("./activity-lookup.js"), exports);
12
+ tslib_1.__exportStar(require("./work-door.js"), exports);
13
+ tslib_1.__exportStar(require("./work-door-declaration.js"), exports);
14
+ tslib_1.__exportStar(require("./work-door-journal.js"), exports);
15
+ tslib_1.__exportStar(require("./work-door-journal-service.js"), exports);
16
+ tslib_1.__exportStar(require("./work-door-not-used.js"), exports);
17
+ tslib_1.__exportStar(require("./work-door-service.js"), exports);
18
+ tslib_1.__exportStar(require("./work-door-type.js"), exports);
19
+ tslib_1.__exportStar(require("./pass-work-door.js"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/work-door/index.ts"],"names":[],"mappings":";;;;AAAA,mEAAyD;AACzD,iEAAwD;AACxD,mEAA0D;AAE7C,QAAA,QAAQ,GAAG,CAAC,uCAAe,EAAE,sCAAe,CAAC,CAAA;AAC7C,QAAA,SAAS,GAAG,CAAC,wCAAgB,CAAC,CAAA;AAE3C,sEAA2C;AAC3C,+DAAoC;AACpC,yDAA8B;AAC9B,qEAA0C;AAC1C,iEAAsC;AACtC,yEAA8C;AAC9C,kEAAuC;AACvC,iEAAsC;AACtC,8DAAmC;AACnC,8DAAmC","sourcesContent":["import { WorkDoorNotUsed } from './work-door-not-used.js'\nimport { WorkDoorJournal } from './work-door-journal.js'\nimport { WorkDoorResolver } from './work-door-resolver.js'\n\nexport const entities = [WorkDoorNotUsed, WorkDoorJournal]\nexport const resolvers = [WorkDoorResolver]\n\nexport * from './approval-line-standing.js'\nexport * from './activity-lookup.js'\nexport * from './work-door.js'\nexport * from './work-door-declaration.js'\nexport * from './work-door-journal.js'\nexport * from './work-door-journal-service.js'\nexport * from './work-door-not-used.js'\nexport * from './work-door-service.js'\nexport * from './work-door-type.js'\nexport * from './pass-work-door.js'\n"]}
@@ -0,0 +1,74 @@
1
+ import { EntityManager } from 'typeorm';
2
+ import { Domain, Refusal } from '@things-factory/shell';
3
+ import { User } from '@things-factory/auth-base';
4
+ import { type ApprovalLineStanding, type ApprovalSeatReader } from './approval-line-standing.js';
5
+ import { WorkDoorEvent } from './work-door-event.js';
6
+ import type { WorkDoorDeclaration } from './work-door-declaration.js';
7
+ /**
8
+ * **One place decides, and the same place writes it down** (ADR-0077 decision 1).
9
+ *
10
+ * ═══════════════════════════════════════════════════════════════════════════
11
+ * ── Why judgement and record are one call ─────────────────────────────────
12
+ * Until now each application door read the approval line itself and decided what to do, which is why
13
+ * eight of operato-plant's doors run with no line and none of them leaves a trace: the place that
14
+ * knew a step had been skipped was not the place that wrote anything down, and there were eight of
15
+ * them. Joined here, a door cannot take the `run` branch without the line being written - there is
16
+ * no branch to take that skips it.
17
+ *
18
+ * ── The transaction is not a convenience ──────────────────────────────────
19
+ * `tx` is the caller's **open** transaction, not a manager. The line and the work it describes have
20
+ * to commit together: the line first and the work failing leaves a log that says something happened
21
+ * that did not, and the reverse leaves the silent pass this log exists to end. A plain manager
22
+ * commits each statement where it stands, so passing one is the same bug the outbox sequence has
23
+ * one layer down - and there it burned 200 numbers before anyone noticed.
24
+ *
25
+ * ── `as-established` asks the door, it does not guess ─────────────────────
26
+ * A door whose branch turns on the row's own history (a non-working period withdrawn: declared
27
+ * through approval, withdrawn through approval) answers `establishedByApproval` itself. This
28
+ * function reads that one flag. Putting the judgement here would mean the worklist knew what a
29
+ * non-working period is.
30
+ * ═══════════════════════════════════════════════════════════════════════════
31
+ */
32
+ export interface WorkDoorReading {
33
+ door: WorkDoorDeclaration;
34
+ /** The activity as installed in this domain, if it is installed at all. */
35
+ activity?: {
36
+ id?: string;
37
+ approvalLine?: unknown[];
38
+ } | null;
39
+ /** What this is about, as the application names it. Two strings; nothing is read inside them. */
40
+ subject: {
41
+ kind: string;
42
+ id: string;
43
+ };
44
+ /** `as-established` doors only: did the row this is about come about through approval? */
45
+ establishedByApproval?: boolean;
46
+ /** True when this domain has declared it does not use this door. */
47
+ notUsed?: boolean;
48
+ }
49
+ export interface WorkDoorPassage {
50
+ /** The caller's open transaction - the work and the log line commit together. */
51
+ tx: EntityManager;
52
+ domain: Domain;
53
+ user?: User;
54
+ /** Reads whether a seat in the line resolves to a person. */
55
+ seats: ApprovalSeatReader;
56
+ }
57
+ export type WorkDoorVerdict =
58
+ /** The line stands. The caller raises it for approval; the instance is the record. */
59
+ {
60
+ go: 'raise';
61
+ standing: ApprovalLineStanding;
62
+ }
63
+ /** No approval here. The work happens, and this is the id of the line written about it. */
64
+ | {
65
+ go: 'run';
66
+ noted: string;
67
+ because: WorkDoorEvent.RanWithoutLine | WorkDoorEvent.RanNotUsed;
68
+ }
69
+ /** The caller is refused, in words that say what to go and fix. */
70
+ | {
71
+ go: 'refuse';
72
+ refusal: Refusal;
73
+ };
74
+ export declare function passWorkDoor(reading: WorkDoorReading, passage: WorkDoorPassage): Promise<WorkDoorVerdict>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.passWorkDoor = passWorkDoor;
4
+ const approval_line_standing_js_1 = require("./approval-line-standing.js");
5
+ const work_door_event_js_1 = require("./work-door-event.js");
6
+ const work_door_journal_service_js_1 = require("./work-door-journal-service.js");
7
+ const approval_line_standing_js_2 = require("./approval-line-standing.js");
8
+ /** A manager that is not in a transaction commits each statement where it stands. */
9
+ function assertOpenTransaction(tx) {
10
+ if (tx?.queryRunner?.isTransactionActive) {
11
+ return;
12
+ }
13
+ throw new Error('passWorkDoor: must run inside the transaction that does the work - ' +
14
+ 'a plain manager commits the log line on its own, and then the log says something happened that did not');
15
+ }
16
+ async function passWorkDoor(reading, passage) {
17
+ assertOpenTransaction(passage.tx);
18
+ const { door } = reading;
19
+ if (door.kind === 'assignment') {
20
+ throw new Error(`passWorkDoor: "${door.name}" is an assignment door, and an assignment door has no approval line - ` +
21
+ 'what it waits for is a role bound to it, which is a different question with a different answer');
22
+ }
23
+ /* Declared unused: the work happens, and the line says it was that and not an empty line. */
24
+ if (reading.notUsed) {
25
+ return await ran(work_door_event_js_1.WorkDoorEvent.RanNotUsed, reading, passage);
26
+ }
27
+ const standing = await (0, approval_line_standing_js_1.judgeApprovalLine)(reading.activity?.approvalLine, passage.seats);
28
+ if (!standing.refusal) {
29
+ return { go: 'raise', standing };
30
+ }
31
+ const whenNoLine = door.whenNoLine === 'as-established'
32
+ ? reading.establishedByApproval
33
+ ? 'refuse'
34
+ : 'run'
35
+ : door.whenNoLine;
36
+ if (whenNoLine === 'refuse') {
37
+ return { go: 'refuse', refusal: (0, approval_line_standing_js_2.approvalLineRefusal)(standing.refusal) };
38
+ }
39
+ return await ran(work_door_event_js_1.WorkDoorEvent.RanWithoutLine, reading, passage);
40
+ }
41
+ async function ran(kind, reading, passage) {
42
+ const noted = await (0, work_door_journal_service_js_1.noteWorkDoor)(passage.tx, passage.domain, { kind, door: reading.door.name, subject: reading.subject }, passage.user);
43
+ return { go: 'run', noted: noted.id, because: kind };
44
+ }
45
+ //# sourceMappingURL=pass-work-door.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pass-work-door.js","sourceRoot":"","sources":["../../../server/service/work-door/pass-work-door.ts"],"names":[],"mappings":";;AA6EA,oCAyCC;AAjHD,2EAAmH;AACnH,6DAAoD;AACpD,iFAA6D;AAC7D,2EAAiE;AAyDjE,qFAAqF;AACrF,SAAS,qBAAqB,CAAC,EAAoC;IACjE,IAAK,EAA0D,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;QAClG,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,qEAAqE;QACnE,wGAAwG,CAC3G,CAAA;AACH,CAAC;AAEM,KAAK,UAAU,YAAY,CAChC,OAAwB,EACxB,OAAwB;IAExB,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAEjC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IAExB,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,kBAAkB,IAAI,CAAC,IAAI,yEAAyE;YAClG,gGAAgG,CACnG,CAAA;IACH,CAAC;IAED,6FAA6F;IAC7F,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,MAAM,GAAG,CAAC,kCAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9D,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,IAAA,6CAAiB,EACtC,OAAO,CAAC,QAAQ,EAAE,YAAuD,EACzE,OAAO,CAAC,KAAK,CACd,CAAA;IAED,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;IAClC,CAAC;IAED,MAAM,UAAU,GACd,IAAI,CAAC,UAAU,KAAK,gBAAgB;QAClC,CAAC,CAAC,OAAO,CAAC,qBAAqB;YAC7B,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,KAAK;QACT,CAAC,CAAC,IAAI,CAAC,UAAU,CAAA;IAErB,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAA,+CAAmB,EAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAA;IACzE,CAAC;IAED,OAAO,MAAM,GAAG,CAAC,kCAAa,CAAC,cAAc,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAClE,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,IAA6D,EAC7D,OAAwB,EACxB,OAAwB;IAExB,MAAM,KAAK,GAAG,MAAM,IAAA,2CAAY,EAC9B,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,MAAM,EACd,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAC3D,OAAO,CAAC,IAAI,CACb,CAAA;IAED,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AACtD,CAAC","sourcesContent":["import { EntityManager } from 'typeorm'\n\nimport { Domain, Refusal } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nimport { judgeApprovalLine, type ApprovalLineStanding, type ApprovalSeatReader } from './approval-line-standing.js'\nimport { WorkDoorEvent } from './work-door-event.js'\nimport { noteWorkDoor } from './work-door-journal-service.js'\nimport { approvalLineRefusal } from './approval-line-standing.js'\nimport type { WorkDoorDeclaration } from './work-door-declaration.js'\n\n/**\n * **One place decides, and the same place writes it down** (ADR-0077 decision 1).\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── Why judgement and record are one call ─────────────────────────────────\n * Until now each application door read the approval line itself and decided what to do, which is why\n * eight of operato-plant's doors run with no line and none of them leaves a trace: the place that\n * knew a step had been skipped was not the place that wrote anything down, and there were eight of\n * them. Joined here, a door cannot take the `run` branch without the line being written - there is\n * no branch to take that skips it.\n *\n * ── The transaction is not a convenience ──────────────────────────────────\n * `tx` is the caller's **open** transaction, not a manager. The line and the work it describes have\n * to commit together: the line first and the work failing leaves a log that says something happened\n * that did not, and the reverse leaves the silent pass this log exists to end. A plain manager\n * commits each statement where it stands, so passing one is the same bug the outbox sequence has\n * one layer down - and there it burned 200 numbers before anyone noticed.\n *\n * ── `as-established` asks the door, it does not guess ─────────────────────\n * A door whose branch turns on the row's own history (a non-working period withdrawn: declared\n * through approval, withdrawn through approval) answers `establishedByApproval` itself. This\n * function reads that one flag. Putting the judgement here would mean the worklist knew what a\n * non-working period is.\n * ═══════════════════════════════════════════════════════════════════════════\n */\nexport interface WorkDoorReading {\n door: WorkDoorDeclaration\n /** The activity as installed in this domain, if it is installed at all. */\n activity?: { id?: string; approvalLine?: unknown[] } | null\n /** What this is about, as the application names it. Two strings; nothing is read inside them. */\n subject: { kind: string; id: string }\n /** `as-established` doors only: did the row this is about come about through approval? */\n establishedByApproval?: boolean\n /** True when this domain has declared it does not use this door. */\n notUsed?: boolean\n}\n\nexport interface WorkDoorPassage {\n /** The caller's open transaction - the work and the log line commit together. */\n tx: EntityManager\n domain: Domain\n user?: User\n /** Reads whether a seat in the line resolves to a person. */\n seats: ApprovalSeatReader\n}\n\nexport type WorkDoorVerdict =\n /** The line stands. The caller raises it for approval; the instance is the record. */\n | { go: 'raise'; standing: ApprovalLineStanding }\n /** No approval here. The work happens, and this is the id of the line written about it. */\n | { go: 'run'; noted: string; because: WorkDoorEvent.RanWithoutLine | WorkDoorEvent.RanNotUsed }\n /** The caller is refused, in words that say what to go and fix. */\n | { go: 'refuse'; refusal: Refusal }\n\n/** A manager that is not in a transaction commits each statement where it stands. */\nfunction assertOpenTransaction(tx: EntityManager | undefined | null): void {\n if ((tx as { queryRunner?: { isTransactionActive?: boolean } })?.queryRunner?.isTransactionActive) {\n return\n }\n\n throw new Error(\n 'passWorkDoor: must run inside the transaction that does the work - ' +\n 'a plain manager commits the log line on its own, and then the log says something happened that did not'\n )\n}\n\nexport async function passWorkDoor(\n reading: WorkDoorReading,\n passage: WorkDoorPassage\n): Promise<WorkDoorVerdict> {\n assertOpenTransaction(passage.tx)\n\n const { door } = reading\n\n if (door.kind === 'assignment') {\n throw new Error(\n `passWorkDoor: \"${door.name}\" is an assignment door, and an assignment door has no approval line - ` +\n 'what it waits for is a role bound to it, which is a different question with a different answer'\n )\n }\n\n /* Declared unused: the work happens, and the line says it was that and not an empty line. */\n if (reading.notUsed) {\n return await ran(WorkDoorEvent.RanNotUsed, reading, passage)\n }\n\n const standing = await judgeApprovalLine(\n reading.activity?.approvalLine as Parameters<typeof judgeApprovalLine>[0],\n passage.seats\n )\n\n if (!standing.refusal) {\n return { go: 'raise', standing }\n }\n\n const whenNoLine =\n door.whenNoLine === 'as-established'\n ? reading.establishedByApproval\n ? 'refuse'\n : 'run'\n : door.whenNoLine\n\n if (whenNoLine === 'refuse') {\n return { go: 'refuse', refusal: approvalLineRefusal(standing.refusal) }\n }\n\n return await ran(WorkDoorEvent.RanWithoutLine, reading, passage)\n}\n\nasync function ran(\n kind: WorkDoorEvent.RanWithoutLine | WorkDoorEvent.RanNotUsed,\n reading: WorkDoorReading,\n passage: WorkDoorPassage\n): Promise<WorkDoorVerdict> {\n const noted = await noteWorkDoor(\n passage.tx,\n passage.domain,\n { kind, door: reading.door.name, subject: reading.subject },\n passage.user\n )\n\n return { go: 'run', noted: noted.id, because: kind }\n}\n"]}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * **What an application declares about its own work doors** (ADR-0069 decision 3, ADR-0077).
3
+ *
4
+ * ═══════════════════════════════════════════════════════════════════════════
5
+ * ── Who says what ─────────────────────────────────────────────────────────
6
+ * The form is installed by the product at boot, and the plant fills in who approves it. Filling it
7
+ * in is the declaration that this factory uses that step. So two facts have two owners:
8
+ *
9
+ * ```
10
+ * the list of doors, and what each one is the application - it declares them here
11
+ * whether a door stands in this domain the worklist - it reads the activity and its line
12
+ * ```
13
+ *
14
+ * An application registers its list; the screens and the judgement live here. Without that split the
15
+ * worklist would have to know operato-plant's activities, and every application would carry its own
16
+ * copy of the same screen (operato-warehouse asked for it second, which is what moved this).
17
+ *
18
+ * ── Registration happens at module import ─────────────────────────────────
19
+ * Not on a bootstrap hook. A hook runs after the schema is built, which is too late for anything the
20
+ * schema or a boot-time install reads - `declareAxes` in auth-base carries the same warning.
21
+ *
22
+ * ── Nobody declares a label ───────────────────────────────────────────────
23
+ * The screen's label key is computed from `name` (`activityTKey(name, 'label')`), the same key the
24
+ * activity catalog reads. A declared key used to ride here, and operato-plant built it from the
25
+ * PascalCase name while its translations are kebab-cased - the door screen printed twenty-four raw
26
+ * keys (:4000, 2026-09-24). A key nobody picks is a key nobody can pick wrong.
27
+ * ═══════════════════════════════════════════════════════════════════════════
28
+ */
29
+ /**
30
+ * What happens when the approval line is empty. **This records what each door already does** - it is
31
+ * not a new policy (ADR-0077 decision 1).
32
+ *
33
+ * - `run` - the work happens and the approval step is skipped. The worklist writes a line saying so;
34
+ * until that record existed there was no way to tell it from a factory that approved it.
35
+ * - `refuse` - the caller is refused and told why the line does not stand.
36
+ * - `as-established` - the branch depends on **the row's own history**: a period declared through
37
+ * approval is withdrawn through approval, and one that stood without approval is simply removed.
38
+ * Only a door whose branch turns on the row may use this, and both branches are tested. The
39
+ * judgement stays with the door; the worklist asks it which way this row goes.
40
+ */
41
+ export type WhenNoLine = 'refuse' | 'run' | 'as-established';
42
+ /**
43
+ * Why a door refuses rather than running. Two doors that both refuse can refuse for different
44
+ * reasons, and an administrator reads the reason to know whether filling the line is the fix.
45
+ *
46
+ * - `irreversible` - what the door does cannot be taken back (`mutation-reversibility`).
47
+ * - `approval-is-the-act` - the door's whole work **is** the approval. Letting it through with no
48
+ * line would put an unsigned controlled document on the floor.
49
+ * - `lowers-a-control` - the door lowers a control that stands: turning document control off, or
50
+ * moving a maintenance due date. Such a door refuses whatever its reversibility says, because the
51
+ * time that passed under the lowered control does not come back.
52
+ */
53
+ export type WhenNoLineBecause = 'irreversible' | 'approval-is-the-act' | 'lowers-a-control';
54
+ interface DoorBase {
55
+ /** The form name - the same key the callback is found by. Labels change; this does not. */
56
+ name: string;
57
+ /**
58
+ * @deprecated **Not read.** The label key is computed from `name`. Kept optional only so a
59
+ * declaration built against the previous release still compiles; operato-plant and
60
+ * operato-warehouse drop it, and then this line goes (worklist-ux-handoff, 2026-09-24).
61
+ */
62
+ labelKey?: string;
63
+ /**
64
+ * This door borrows another door's approval line. Written once, in one place: two doors carrying
65
+ * the same line as a value drift, and then turning a control on and off are approved by different
66
+ * people (ADR-0047 ⑨).
67
+ */
68
+ lineFollows?: string;
69
+ }
70
+ type ApprovalDoor = DoorBase & {
71
+ kind: 'approval';
72
+ } & ({
73
+ whenNoLine: 'run';
74
+ because?: never;
75
+ } | {
76
+ whenNoLine: 'refuse' | 'as-established';
77
+ because: WhenNoLineBecause;
78
+ });
79
+ /**
80
+ * `whenNoLine?: never` is the point of this type: an assignment door has no approval line, so the
81
+ * field cannot be written here at all. Left optional it would be filled in one day with a value that
82
+ * reads true and means nothing.
83
+ */
84
+ type AssignmentDoor = DoorBase & {
85
+ kind: 'assignment';
86
+ whenNoLine?: never;
87
+ because?: never;
88
+ };
89
+ export type WorkDoorDeclaration = ApprovalDoor | AssignmentDoor;
90
+ export interface WorkDoorRegistration {
91
+ /** The declaring module, as its package's short name. It groups the screen and names the source. */
92
+ module: string;
93
+ doors: readonly WorkDoorDeclaration[];
94
+ /**
95
+ * The role seats this module offers, by name.
96
+ *
97
+ * An approval line points at roles, so a domain with none of them cannot build one - and today
98
+ * that is found out on the form screen, too late. The door screen counts how many of these stand
99
+ * here and says what to do first. A domain's own roles are not counted: this number answers "of
100
+ * what the product offered", and a line built from other roles works just as well.
101
+ */
102
+ seats?: readonly string[];
103
+ }
104
+ /**
105
+ * An application declares its doors. Called at module import time, once per module.
106
+ *
107
+ * Re-registering the same module replaces it rather than appending: a module imported twice under a
108
+ * watch rebuild would otherwise show every door twice, and a screen that double-counts the doors
109
+ * that need attention is one nobody trusts.
110
+ */
111
+ export declare function registerWorkDoors(registration: WorkDoorRegistration): void;
112
+ /** Every registration in this installation, in registration order. */
113
+ export declare function registeredWorkDoors(): WorkDoorRegistration[];
114
+ /** Every declared door, flattened, in registration order. */
115
+ export declare function declaredDoors(): WorkDoorDeclaration[];
116
+ /** Every role seat the declaring modules offer, by name, without repeats. */
117
+ export declare function offeredSeatNames(): string[];
118
+ /** One door by form name, whichever module declared it. */
119
+ export declare function declaredDoor(name: string): WorkDoorDeclaration | undefined;
120
+ /**
121
+ * **Can this door be declared unused?** Not when it refuses on an empty line (ADR-0077 decision 3).
122
+ *
123
+ * "We do not use this door" means the work runs with no approval step (`ran-not-used`). `refuse`
124
+ * means the work cannot stand without an approval line. The two cannot hold for one door, and each of
125
+ * the three reasons says why: what an `irreversible` door does cannot be taken back, an
126
+ * `approval-is-the-act` door's work is the approval, and a `lowers-a-control` door lowers a control
127
+ * that stands. Accepting the declaration would leave the door screen showing the door as off while
128
+ * the product still demands approval - or, if the product honoured it, run those three kinds of work
129
+ * unapproved.
130
+ *
131
+ * Answers the reason, so the refusal can say which one. `run`, `as-established` and assignment doors
132
+ * answer nothing - they can be declared unused as before.
133
+ */
134
+ export declare function whyNotUsedCannotBeDeclared(door: WorkDoorDeclaration): WhenNoLineBecause | undefined;
135
+ export {};
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * **What an application declares about its own work doors** (ADR-0069 decision 3, ADR-0077).
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ── Who says what ─────────────────────────────────────────────────────────
7
+ * The form is installed by the product at boot, and the plant fills in who approves it. Filling it
8
+ * in is the declaration that this factory uses that step. So two facts have two owners:
9
+ *
10
+ * ```
11
+ * the list of doors, and what each one is the application - it declares them here
12
+ * whether a door stands in this domain the worklist - it reads the activity and its line
13
+ * ```
14
+ *
15
+ * An application registers its list; the screens and the judgement live here. Without that split the
16
+ * worklist would have to know operato-plant's activities, and every application would carry its own
17
+ * copy of the same screen (operato-warehouse asked for it second, which is what moved this).
18
+ *
19
+ * ── Registration happens at module import ─────────────────────────────────
20
+ * Not on a bootstrap hook. A hook runs after the schema is built, which is too late for anything the
21
+ * schema or a boot-time install reads - `declareAxes` in auth-base carries the same warning.
22
+ *
23
+ * ── Nobody declares a label ───────────────────────────────────────────────
24
+ * The screen's label key is computed from `name` (`activityTKey(name, 'label')`), the same key the
25
+ * activity catalog reads. A declared key used to ride here, and operato-plant built it from the
26
+ * PascalCase name while its translations are kebab-cased - the door screen printed twenty-four raw
27
+ * keys (:4000, 2026-09-24). A key nobody picks is a key nobody can pick wrong.
28
+ * ═══════════════════════════════════════════════════════════════════════════
29
+ */
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.registerWorkDoors = registerWorkDoors;
32
+ exports.registeredWorkDoors = registeredWorkDoors;
33
+ exports.declaredDoors = declaredDoors;
34
+ exports.offeredSeatNames = offeredSeatNames;
35
+ exports.declaredDoor = declaredDoor;
36
+ exports.whyNotUsedCannotBeDeclared = whyNotUsedCannotBeDeclared;
37
+ const registered = new Map();
38
+ /**
39
+ * An application declares its doors. Called at module import time, once per module.
40
+ *
41
+ * Re-registering the same module replaces it rather than appending: a module imported twice under a
42
+ * watch rebuild would otherwise show every door twice, and a screen that double-counts the doors
43
+ * that need attention is one nobody trusts.
44
+ */
45
+ function registerWorkDoors(registration) {
46
+ registered.set(registration.module, registration);
47
+ }
48
+ /** Every registration in this installation, in registration order. */
49
+ function registeredWorkDoors() {
50
+ return [...registered.values()];
51
+ }
52
+ /** Every declared door, flattened, in registration order. */
53
+ function declaredDoors() {
54
+ return [...registered.values()].flatMap(one => [...one.doors]);
55
+ }
56
+ /** Every role seat the declaring modules offer, by name, without repeats. */
57
+ function offeredSeatNames() {
58
+ return [...new Set([...registered.values()].flatMap(one => [...(one.seats ?? [])]))];
59
+ }
60
+ /** One door by form name, whichever module declared it. */
61
+ function declaredDoor(name) {
62
+ for (const registration of registered.values()) {
63
+ const found = registration.doors.find(door => door.name === name);
64
+ if (found) {
65
+ return found;
66
+ }
67
+ }
68
+ return undefined;
69
+ }
70
+ /**
71
+ * **Can this door be declared unused?** Not when it refuses on an empty line (ADR-0077 decision 3).
72
+ *
73
+ * "We do not use this door" means the work runs with no approval step (`ran-not-used`). `refuse`
74
+ * means the work cannot stand without an approval line. The two cannot hold for one door, and each of
75
+ * the three reasons says why: what an `irreversible` door does cannot be taken back, an
76
+ * `approval-is-the-act` door's work is the approval, and a `lowers-a-control` door lowers a control
77
+ * that stands. Accepting the declaration would leave the door screen showing the door as off while
78
+ * the product still demands approval - or, if the product honoured it, run those three kinds of work
79
+ * unapproved.
80
+ *
81
+ * Answers the reason, so the refusal can say which one. `run`, `as-established` and assignment doors
82
+ * answer nothing - they can be declared unused as before.
83
+ */
84
+ function whyNotUsedCannotBeDeclared(door) {
85
+ return door.kind === 'approval' && door.whenNoLine === 'refuse' ? door.because : undefined;
86
+ }
87
+ //# sourceMappingURL=work-door-declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-door-declaration.js","sourceRoot":"","sources":["../../../server/service/work-door/work-door-declaration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;AAoFH,8CAEC;AAGD,kDAEC;AAGD,sCAEC;AAGD,4CAEC;AAGD,oCAUC;AAgBD,gEAEC;AAzDD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAA;AAE1D;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,YAAkC;IAClE,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AACnD,CAAC;AAED,sEAAsE;AACtE,SAAgB,mBAAmB;IACjC,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;AACjC,CAAC;AAED,6DAA6D;AAC7D,SAAgB,aAAa;IAC3B,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;AAChE,CAAC;AAED,6EAA6E;AAC7E,SAAgB,gBAAgB;IAC9B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACtF,CAAC;AAED,2DAA2D;AAC3D,SAAgB,YAAY,CAAC,IAAY;IACvC,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;QAEjE,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,0BAA0B,CAAC,IAAyB;IAClE,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5F,CAAC","sourcesContent":["/**\n * **What an application declares about its own work doors** (ADR-0069 decision 3, ADR-0077).\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── Who says what ─────────────────────────────────────────────────────────\n * The form is installed by the product at boot, and the plant fills in who approves it. Filling it\n * in is the declaration that this factory uses that step. So two facts have two owners:\n *\n * ```\n * the list of doors, and what each one is the application - it declares them here\n * whether a door stands in this domain the worklist - it reads the activity and its line\n * ```\n *\n * An application registers its list; the screens and the judgement live here. Without that split the\n * worklist would have to know operato-plant's activities, and every application would carry its own\n * copy of the same screen (operato-warehouse asked for it second, which is what moved this).\n *\n * ── Registration happens at module import ─────────────────────────────────\n * Not on a bootstrap hook. A hook runs after the schema is built, which is too late for anything the\n * schema or a boot-time install reads - `declareAxes` in auth-base carries the same warning.\n *\n * ── Nobody declares a label ───────────────────────────────────────────────\n * The screen's label key is computed from `name` (`activityTKey(name, 'label')`), the same key the\n * activity catalog reads. A declared key used to ride here, and operato-plant built it from the\n * PascalCase name while its translations are kebab-cased - the door screen printed twenty-four raw\n * keys (:4000, 2026-09-24). A key nobody picks is a key nobody can pick wrong.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/**\n * What happens when the approval line is empty. **This records what each door already does** - it is\n * not a new policy (ADR-0077 decision 1).\n *\n * - `run` - the work happens and the approval step is skipped. The worklist writes a line saying so;\n * until that record existed there was no way to tell it from a factory that approved it.\n * - `refuse` - the caller is refused and told why the line does not stand.\n * - `as-established` - the branch depends on **the row's own history**: a period declared through\n * approval is withdrawn through approval, and one that stood without approval is simply removed.\n * Only a door whose branch turns on the row may use this, and both branches are tested. The\n * judgement stays with the door; the worklist asks it which way this row goes.\n */\nexport type WhenNoLine = 'refuse' | 'run' | 'as-established'\n\n/**\n * Why a door refuses rather than running. Two doors that both refuse can refuse for different\n * reasons, and an administrator reads the reason to know whether filling the line is the fix.\n *\n * - `irreversible` - what the door does cannot be taken back (`mutation-reversibility`).\n * - `approval-is-the-act` - the door's whole work **is** the approval. Letting it through with no\n * line would put an unsigned controlled document on the floor.\n * - `lowers-a-control` - the door lowers a control that stands: turning document control off, or\n * moving a maintenance due date. Such a door refuses whatever its reversibility says, because the\n * time that passed under the lowered control does not come back.\n */\nexport type WhenNoLineBecause = 'irreversible' | 'approval-is-the-act' | 'lowers-a-control'\n\ninterface DoorBase {\n /** The form name - the same key the callback is found by. Labels change; this does not. */\n name: string\n /**\n * @deprecated **Not read.** The label key is computed from `name`. Kept optional only so a\n * declaration built against the previous release still compiles; operato-plant and\n * operato-warehouse drop it, and then this line goes (worklist-ux-handoff, 2026-09-24).\n */\n labelKey?: string\n /**\n * This door borrows another door's approval line. Written once, in one place: two doors carrying\n * the same line as a value drift, and then turning a control on and off are approved by different\n * people (ADR-0047 ⑨).\n */\n lineFollows?: string\n}\n\ntype ApprovalDoor = DoorBase & { kind: 'approval' } & (\n | { whenNoLine: 'run'; because?: never }\n | { whenNoLine: 'refuse' | 'as-established'; because: WhenNoLineBecause }\n )\n\n/**\n * `whenNoLine?: never` is the point of this type: an assignment door has no approval line, so the\n * field cannot be written here at all. Left optional it would be filled in one day with a value that\n * reads true and means nothing.\n */\ntype AssignmentDoor = DoorBase & { kind: 'assignment'; whenNoLine?: never; because?: never }\n\nexport type WorkDoorDeclaration = ApprovalDoor | AssignmentDoor\n\nexport interface WorkDoorRegistration {\n /** The declaring module, as its package's short name. It groups the screen and names the source. */\n module: string\n doors: readonly WorkDoorDeclaration[]\n /**\n * The role seats this module offers, by name.\n *\n * An approval line points at roles, so a domain with none of them cannot build one - and today\n * that is found out on the form screen, too late. The door screen counts how many of these stand\n * here and says what to do first. A domain's own roles are not counted: this number answers \"of\n * what the product offered\", and a line built from other roles works just as well.\n */\n seats?: readonly string[]\n}\n\nconst registered = new Map<string, WorkDoorRegistration>()\n\n/**\n * An application declares its doors. Called at module import time, once per module.\n *\n * Re-registering the same module replaces it rather than appending: a module imported twice under a\n * watch rebuild would otherwise show every door twice, and a screen that double-counts the doors\n * that need attention is one nobody trusts.\n */\nexport function registerWorkDoors(registration: WorkDoorRegistration): void {\n registered.set(registration.module, registration)\n}\n\n/** Every registration in this installation, in registration order. */\nexport function registeredWorkDoors(): WorkDoorRegistration[] {\n return [...registered.values()]\n}\n\n/** Every declared door, flattened, in registration order. */\nexport function declaredDoors(): WorkDoorDeclaration[] {\n return [...registered.values()].flatMap(one => [...one.doors])\n}\n\n/** Every role seat the declaring modules offer, by name, without repeats. */\nexport function offeredSeatNames(): string[] {\n return [...new Set([...registered.values()].flatMap(one => [...(one.seats ?? [])]))]\n}\n\n/** One door by form name, whichever module declared it. */\nexport function declaredDoor(name: string): WorkDoorDeclaration | undefined {\n for (const registration of registered.values()) {\n const found = registration.doors.find(door => door.name === name)\n\n if (found) {\n return found\n }\n }\n\n return undefined\n}\n\n/**\n * **Can this door be declared unused?** Not when it refuses on an empty line (ADR-0077 decision 3).\n *\n * \"We do not use this door\" means the work runs with no approval step (`ran-not-used`). `refuse`\n * means the work cannot stand without an approval line. The two cannot hold for one door, and each of\n * the three reasons says why: what an `irreversible` door does cannot be taken back, an\n * `approval-is-the-act` door's work is the approval, and a `lowers-a-control` door lowers a control\n * that stands. Accepting the declaration would leave the door screen showing the door as off while\n * the product still demands approval - or, if the product honoured it, run those three kinds of work\n * unapproved.\n *\n * Answers the reason, so the refusal can say which one. `run`, `as-established` and assignment doors\n * answer nothing - they can be declared unused as before.\n */\nexport function whyNotUsedCannotBeDeclared(door: WorkDoorDeclaration): WhenNoLineBecause | undefined {\n return door.kind === 'approval' && door.whenNoLine === 'refuse' ? door.because : undefined\n}\n"]}