@ketvietlab/ketsuite 0.1.2 → 0.1.5

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 (2615) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +15 -1
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +59 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/deployment.d.ts +5 -0
  8. package/dist/deployment.d.ts.map +1 -0
  9. package/dist/deployment.js +155 -0
  10. package/dist/deployment.js.map +1 -0
  11. package/dist/development.d.ts +8 -0
  12. package/dist/development.d.ts.map +1 -0
  13. package/dist/development.js +40 -0
  14. package/dist/development.js.map +1 -0
  15. package/dist/index.d.ts +84 -6
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +72 -6
  18. package/dist/index.js.map +1 -1
  19. package/dist/modules/account/analytics.d.ts +32 -0
  20. package/dist/modules/account/analytics.d.ts.map +1 -0
  21. package/dist/modules/account/analytics.js +457 -0
  22. package/dist/modules/account/analytics.js.map +1 -0
  23. package/dist/modules/account/assets-costing.d.ts +4 -0
  24. package/dist/modules/account/assets-costing.d.ts.map +1 -0
  25. package/dist/modules/account/assets-costing.js +1134 -0
  26. package/dist/modules/account/assets-costing.js.map +1 -0
  27. package/dist/modules/account/audit.d.ts +3 -0
  28. package/dist/modules/account/audit.d.ts.map +1 -0
  29. package/dist/modules/account/audit.js +14 -0
  30. package/dist/modules/account/audit.js.map +1 -0
  31. package/dist/modules/account/books.d.ts +4 -0
  32. package/dist/modules/account/books.d.ts.map +1 -0
  33. package/dist/modules/account/books.js +150 -0
  34. package/dist/modules/account/books.js.map +1 -0
  35. package/dist/modules/account/cash-receivables.d.ts +3 -0
  36. package/dist/modules/account/cash-receivables.d.ts.map +1 -0
  37. package/dist/modules/account/cash-receivables.js +1087 -0
  38. package/dist/modules/account/cash-receivables.js.map +1 -0
  39. package/dist/modules/account/close.d.ts +4 -0
  40. package/dist/modules/account/close.d.ts.map +1 -0
  41. package/dist/modules/account/close.js +343 -0
  42. package/dist/modules/account/close.js.map +1 -0
  43. package/dist/modules/account/date.d.ts +21 -0
  44. package/dist/modules/account/date.d.ts.map +1 -0
  45. package/dist/modules/account/date.js +70 -0
  46. package/dist/modules/account/date.js.map +1 -0
  47. package/dist/modules/account/functions.d.ts +131 -3
  48. package/dist/modules/account/functions.d.ts.map +1 -1
  49. package/dist/modules/account/functions.js +2570 -389
  50. package/dist/modules/account/functions.js.map +1 -1
  51. package/dist/modules/account/index.d.ts +1 -2
  52. package/dist/modules/account/index.d.ts.map +1 -1
  53. package/dist/modules/account/index.js +403 -8
  54. package/dist/modules/account/index.js.map +1 -1
  55. package/dist/modules/account/models.d.ts.map +1 -1
  56. package/dist/modules/account/models.js +748 -0
  57. package/dist/modules/account/models.js.map +1 -1
  58. package/dist/modules/account/money.d.ts +60 -0
  59. package/dist/modules/account/money.d.ts.map +1 -0
  60. package/dist/modules/account/money.js +237 -0
  61. package/dist/modules/account/money.js.map +1 -0
  62. package/dist/modules/account/open-items.d.ts +3 -0
  63. package/dist/modules/account/open-items.d.ts.map +1 -0
  64. package/dist/modules/account/open-items.js +390 -0
  65. package/dist/modules/account/open-items.js.map +1 -0
  66. package/dist/modules/account/opening.d.ts +3 -0
  67. package/dist/modules/account/opening.d.ts.map +1 -0
  68. package/dist/modules/account/opening.js +323 -0
  69. package/dist/modules/account/opening.js.map +1 -0
  70. package/dist/modules/account/period.d.ts +21 -0
  71. package/dist/modules/account/period.d.ts.map +1 -0
  72. package/dist/modules/account/period.js +155 -0
  73. package/dist/modules/account/period.js.map +1 -0
  74. package/dist/modules/account/relations.d.ts.map +1 -1
  75. package/dist/modules/account/relations.js +46 -0
  76. package/dist/modules/account/relations.js.map +1 -1
  77. package/dist/modules/account/reports.d.ts +4 -0
  78. package/dist/modules/account/reports.d.ts.map +1 -0
  79. package/dist/modules/account/reports.js +125 -0
  80. package/dist/modules/account/reports.js.map +1 -0
  81. package/dist/modules/account/setup.d.ts +3 -1
  82. package/dist/modules/account/setup.d.ts.map +1 -1
  83. package/dist/modules/account/setup.js +45 -160
  84. package/dist/modules/account/setup.js.map +1 -1
  85. package/dist/modules/account_activity_backend/index.d.ts.map +1 -1
  86. package/dist/modules/account_activity_backend/index.js +0 -1
  87. package/dist/modules/account_activity_backend/index.js.map +1 -1
  88. package/dist/modules/account_backend/index.js +3339 -494
  89. package/dist/modules/account_backend/index.js.map +1 -1
  90. package/dist/modules/account_backend/overview.d.ts +92 -0
  91. package/dist/modules/account_backend/overview.d.ts.map +1 -0
  92. package/dist/modules/account_backend/overview.js +257 -0
  93. package/dist/modules/account_backend/overview.js.map +1 -0
  94. package/dist/modules/account_backend/relation-control.d.ts +48 -0
  95. package/dist/modules/account_backend/relation-control.d.ts.map +1 -0
  96. package/dist/modules/account_backend/relation-control.js +67 -0
  97. package/dist/modules/account_backend/relation-control.js.map +1 -0
  98. package/dist/modules/account_backend/screens/account-defaults.d.ts +28 -0
  99. package/dist/modules/account_backend/screens/account-defaults.d.ts.map +1 -0
  100. package/dist/modules/account_backend/screens/account-defaults.js +60 -0
  101. package/dist/modules/account_backend/screens/account-defaults.js.map +1 -0
  102. package/dist/modules/account_backend/screens/account-form.d.ts +16 -0
  103. package/dist/modules/account_backend/screens/account-form.d.ts.map +1 -0
  104. package/dist/modules/account_backend/screens/account-form.js +53 -0
  105. package/dist/modules/account_backend/screens/account-form.js.map +1 -0
  106. package/dist/modules/account_backend/screens/accounting-books.d.ts +15 -0
  107. package/dist/modules/account_backend/screens/accounting-books.d.ts.map +1 -0
  108. package/dist/modules/account_backend/screens/accounting-books.js +86 -0
  109. package/dist/modules/account_backend/screens/accounting-books.js.map +1 -0
  110. package/dist/modules/account_backend/screens/accounts-list.d.ts +50 -0
  111. package/dist/modules/account_backend/screens/accounts-list.d.ts.map +1 -0
  112. package/dist/modules/account_backend/screens/accounts-list.js +66 -0
  113. package/dist/modules/account_backend/screens/accounts-list.js.map +1 -0
  114. package/dist/modules/account_backend/screens/customer-invoice-form.d.ts +13 -0
  115. package/dist/modules/account_backend/screens/customer-invoice-form.d.ts.map +1 -0
  116. package/dist/modules/account_backend/screens/customer-invoice-form.js +20 -0
  117. package/dist/modules/account_backend/screens/customer-invoice-form.js.map +1 -0
  118. package/dist/modules/account_backend/screens/customer-invoices-list.d.ts +62 -0
  119. package/dist/modules/account_backend/screens/customer-invoices-list.d.ts.map +1 -0
  120. package/dist/modules/account_backend/screens/customer-invoices-list.js +82 -0
  121. package/dist/modules/account_backend/screens/customer-invoices-list.js.map +1 -0
  122. package/dist/modules/account_backend/screens/general-ledger.d.ts +24 -0
  123. package/dist/modules/account_backend/screens/general-ledger.d.ts.map +1 -0
  124. package/dist/modules/account_backend/screens/general-ledger.js +73 -0
  125. package/dist/modules/account_backend/screens/general-ledger.js.map +1 -0
  126. package/dist/modules/account_backend/screens/index.d.ts +27 -0
  127. package/dist/modules/account_backend/screens/index.d.ts.map +1 -0
  128. package/dist/modules/account_backend/screens/index.js +27 -0
  129. package/dist/modules/account_backend/screens/index.js.map +1 -0
  130. package/dist/modules/account_backend/screens/journal-entries-list.d.ts +48 -0
  131. package/dist/modules/account_backend/screens/journal-entries-list.d.ts.map +1 -0
  132. package/dist/modules/account_backend/screens/journal-entries-list.js +58 -0
  133. package/dist/modules/account_backend/screens/journal-entries-list.js.map +1 -0
  134. package/dist/modules/account_backend/screens/journal-entry-create.d.ts +14 -0
  135. package/dist/modules/account_backend/screens/journal-entry-create.d.ts.map +1 -0
  136. package/dist/modules/account_backend/screens/journal-entry-create.js +41 -0
  137. package/dist/modules/account_backend/screens/journal-entry-create.js.map +1 -0
  138. package/dist/modules/account_backend/screens/journal-form.d.ts +15 -0
  139. package/dist/modules/account_backend/screens/journal-form.d.ts.map +1 -0
  140. package/dist/modules/account_backend/screens/journal-form.js +53 -0
  141. package/dist/modules/account_backend/screens/journal-form.js.map +1 -0
  142. package/dist/modules/account_backend/screens/journals-list.d.ts +51 -0
  143. package/dist/modules/account_backend/screens/journals-list.d.ts.map +1 -0
  144. package/dist/modules/account_backend/screens/journals-list.js +70 -0
  145. package/dist/modules/account_backend/screens/journals-list.js.map +1 -0
  146. package/dist/modules/account_backend/screens/move-detail.d.ts +26 -0
  147. package/dist/modules/account_backend/screens/move-detail.d.ts.map +1 -0
  148. package/dist/modules/account_backend/screens/move-detail.js +130 -0
  149. package/dist/modules/account_backend/screens/move-detail.js.map +1 -0
  150. package/dist/modules/account_backend/screens/opening-balances.d.ts +28 -0
  151. package/dist/modules/account_backend/screens/opening-balances.d.ts.map +1 -0
  152. package/dist/modules/account_backend/screens/opening-balances.js +96 -0
  153. package/dist/modules/account_backend/screens/opening-balances.js.map +1 -0
  154. package/dist/modules/account_backend/screens/overview.d.ts +62 -0
  155. package/dist/modules/account_backend/screens/overview.d.ts.map +1 -0
  156. package/dist/modules/account_backend/screens/overview.js +215 -0
  157. package/dist/modules/account_backend/screens/overview.js.map +1 -0
  158. package/dist/modules/account_backend/screens/partner-statement.d.ts +26 -0
  159. package/dist/modules/account_backend/screens/partner-statement.d.ts.map +1 -0
  160. package/dist/modules/account_backend/screens/partner-statement.js +82 -0
  161. package/dist/modules/account_backend/screens/partner-statement.js.map +1 -0
  162. package/dist/modules/account_backend/screens/payment-form.d.ts +14 -0
  163. package/dist/modules/account_backend/screens/payment-form.d.ts.map +1 -0
  164. package/dist/modules/account_backend/screens/payment-form.js +21 -0
  165. package/dist/modules/account_backend/screens/payment-form.js.map +1 -0
  166. package/dist/modules/account_backend/screens/payment-term-form.d.ts +25 -0
  167. package/dist/modules/account_backend/screens/payment-term-form.d.ts.map +1 -0
  168. package/dist/modules/account_backend/screens/payment-term-form.js +96 -0
  169. package/dist/modules/account_backend/screens/payment-term-form.js.map +1 -0
  170. package/dist/modules/account_backend/screens/payment-terms-list.d.ts +23 -0
  171. package/dist/modules/account_backend/screens/payment-terms-list.d.ts.map +1 -0
  172. package/dist/modules/account_backend/screens/payment-terms-list.js +104 -0
  173. package/dist/modules/account_backend/screens/payment-terms-list.js.map +1 -0
  174. package/dist/modules/account_backend/screens/payments-list.d.ts +62 -0
  175. package/dist/modules/account_backend/screens/payments-list.d.ts.map +1 -0
  176. package/dist/modules/account_backend/screens/payments-list.js +71 -0
  177. package/dist/modules/account_backend/screens/payments-list.js.map +1 -0
  178. package/dist/modules/account_backend/screens/period-closes.d.ts +21 -0
  179. package/dist/modules/account_backend/screens/period-closes.d.ts.map +1 -0
  180. package/dist/modules/account_backend/screens/period-closes.js +123 -0
  181. package/dist/modules/account_backend/screens/period-closes.js.map +1 -0
  182. package/dist/modules/account_backend/screens/shared.d.ts +16 -0
  183. package/dist/modules/account_backend/screens/shared.d.ts.map +1 -0
  184. package/dist/modules/account_backend/screens/shared.js +15 -0
  185. package/dist/modules/account_backend/screens/shared.js.map +1 -0
  186. package/dist/modules/account_backend/screens/tax-form.d.ts +14 -0
  187. package/dist/modules/account_backend/screens/tax-form.d.ts.map +1 -0
  188. package/dist/modules/account_backend/screens/tax-form.js +25 -0
  189. package/dist/modules/account_backend/screens/tax-form.js.map +1 -0
  190. package/dist/modules/account_backend/screens/taxes-list.d.ts +55 -0
  191. package/dist/modules/account_backend/screens/taxes-list.d.ts.map +1 -0
  192. package/dist/modules/account_backend/screens/taxes-list.js +83 -0
  193. package/dist/modules/account_backend/screens/taxes-list.js.map +1 -0
  194. package/dist/modules/account_backend/screens/trial-balance.d.ts +19 -0
  195. package/dist/modules/account_backend/screens/trial-balance.d.ts.map +1 -0
  196. package/dist/modules/account_backend/screens/trial-balance.js +75 -0
  197. package/dist/modules/account_backend/screens/trial-balance.js.map +1 -0
  198. package/dist/modules/account_backend/screens/vendor-bill-form.d.ts +13 -0
  199. package/dist/modules/account_backend/screens/vendor-bill-form.d.ts.map +1 -0
  200. package/dist/modules/account_backend/screens/vendor-bill-form.js +20 -0
  201. package/dist/modules/account_backend/screens/vendor-bill-form.js.map +1 -0
  202. package/dist/modules/account_backend/screens/vendor-bills-list.d.ts +62 -0
  203. package/dist/modules/account_backend/screens/vendor-bills-list.d.ts.map +1 -0
  204. package/dist/modules/account_backend/screens/vendor-bills-list.js +84 -0
  205. package/dist/modules/account_backend/screens/vendor-bills-list.js.map +1 -0
  206. package/dist/modules/account_mail_backend/index.d.ts.map +1 -1
  207. package/dist/modules/account_mail_backend/index.js +0 -1
  208. package/dist/modules/account_mail_backend/index.js.map +1 -1
  209. package/dist/modules/account_partner/index.js +0 -2
  210. package/dist/modules/account_partner/index.js.map +1 -1
  211. package/dist/modules/account_partner_backend/index.d.ts +1 -1
  212. package/dist/modules/account_partner_backend/index.d.ts.map +1 -1
  213. package/dist/modules/account_partner_backend/index.js +2 -3
  214. package/dist/modules/account_partner_backend/index.js.map +1 -1
  215. package/dist/modules/account_partner_backend/routes.d.ts.map +1 -1
  216. package/dist/modules/account_partner_backend/routes.js +19 -25
  217. package/dist/modules/account_partner_backend/routes.js.map +1 -1
  218. package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts +20 -0
  219. package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts.map +1 -0
  220. package/dist/modules/account_partner_backend/screens/accounting-terms.js +63 -0
  221. package/dist/modules/account_partner_backend/screens/accounting-terms.js.map +1 -0
  222. package/dist/modules/account_partner_backend/screens/index.d.ts +2 -0
  223. package/dist/modules/account_partner_backend/screens/index.d.ts.map +1 -0
  224. package/dist/modules/account_partner_backend/screens/index.js +2 -0
  225. package/dist/modules/account_partner_backend/screens/index.js.map +1 -0
  226. package/dist/modules/account_staff_channel/channel-routes.d.ts +2 -0
  227. package/dist/modules/account_staff_channel/channel-routes.d.ts.map +1 -0
  228. package/dist/modules/account_staff_channel/channel-routes.js +776 -0
  229. package/dist/modules/account_staff_channel/channel-routes.js.map +1 -0
  230. package/dist/modules/account_staff_channel/functions.d.ts.map +1 -0
  231. package/dist/modules/account_staff_channel/functions.js +143 -0
  232. package/dist/modules/account_staff_channel/functions.js.map +1 -0
  233. package/dist/modules/account_staff_channel/index.d.ts +5 -0
  234. package/dist/modules/account_staff_channel/index.d.ts.map +1 -0
  235. package/dist/modules/account_staff_channel/index.js +42 -0
  236. package/dist/modules/account_staff_channel/index.js.map +1 -0
  237. package/dist/modules/account_staff_channel/models.d.ts.map +1 -0
  238. package/dist/modules/account_staff_channel/models.js +30 -0
  239. package/dist/modules/account_staff_channel/models.js.map +1 -0
  240. package/dist/modules/activity/index.d.ts.map +1 -1
  241. package/dist/modules/activity/index.js +0 -1
  242. package/dist/modules/activity/index.js.map +1 -1
  243. package/dist/modules/activity_backend/index.d.ts +1 -1
  244. package/dist/modules/activity_backend/index.d.ts.map +1 -1
  245. package/dist/modules/activity_backend/index.js +3 -12
  246. package/dist/modules/activity_backend/index.js.map +1 -1
  247. package/dist/modules/activity_backend/routes.d.ts.map +1 -1
  248. package/dist/modules/activity_backend/routes.js +36 -22
  249. package/dist/modules/activity_backend/routes.js.map +1 -1
  250. package/dist/modules/activity_backend/screens/activities-list.d.ts +15 -0
  251. package/dist/modules/activity_backend/screens/activities-list.d.ts.map +1 -0
  252. package/dist/modules/activity_backend/screens/activities-list.js +40 -0
  253. package/dist/modules/activity_backend/screens/activities-list.js.map +1 -0
  254. package/dist/modules/activity_backend/screens/index.d.ts +2 -0
  255. package/dist/modules/activity_backend/screens/index.d.ts.map +1 -0
  256. package/dist/modules/activity_backend/screens/index.js +2 -0
  257. package/dist/modules/activity_backend/screens/index.js.map +1 -0
  258. package/dist/modules/address/data/VN/NOTICE.md +1 -1
  259. package/dist/modules/address/index.d.ts.map +1 -1
  260. package/dist/modules/address/index.js +0 -1
  261. package/dist/modules/address/index.js.map +1 -1
  262. package/dist/modules/address_backend/index.d.ts +1 -1
  263. package/dist/modules/address_backend/index.d.ts.map +1 -1
  264. package/dist/modules/address_backend/index.js +1 -3
  265. package/dist/modules/address_backend/index.js.map +1 -1
  266. package/dist/modules/address_backend/routes.d.ts.map +1 -1
  267. package/dist/modules/address_backend/routes.js +20 -27
  268. package/dist/modules/address_backend/routes.js.map +1 -1
  269. package/dist/modules/address_backend/screens/catalogs-list.d.ts +14 -0
  270. package/dist/modules/address_backend/screens/catalogs-list.d.ts.map +1 -0
  271. package/dist/modules/address_backend/screens/catalogs-list.js +38 -0
  272. package/dist/modules/address_backend/screens/catalogs-list.js.map +1 -0
  273. package/dist/modules/address_backend/screens/country-browser.d.ts +12 -0
  274. package/dist/modules/address_backend/screens/country-browser.d.ts.map +1 -0
  275. package/dist/modules/address_backend/screens/country-browser.js +74 -0
  276. package/dist/modules/address_backend/screens/country-browser.js.map +1 -0
  277. package/dist/modules/address_backend/screens/index.d.ts +4 -0
  278. package/dist/modules/address_backend/screens/index.d.ts.map +1 -0
  279. package/dist/modules/address_backend/screens/index.js +3 -0
  280. package/dist/modules/address_backend/screens/index.js.map +1 -0
  281. package/dist/modules/address_backend/screens/types.d.ts +20 -0
  282. package/dist/modules/address_backend/screens/types.d.ts.map +1 -0
  283. package/dist/modules/address_backend/screens/types.js.map +1 -0
  284. package/dist/modules/attendance/channel-routes.d.ts +2 -0
  285. package/dist/modules/attendance/channel-routes.d.ts.map +1 -0
  286. package/dist/modules/attendance/channel-routes.js +223 -0
  287. package/dist/modules/attendance/channel-routes.js.map +1 -0
  288. package/dist/modules/attendance/functions.d.ts.map +1 -1
  289. package/dist/modules/attendance/functions.js +171 -22
  290. package/dist/modules/attendance/functions.js.map +1 -1
  291. package/dist/modules/attendance/index.d.ts.map +1 -1
  292. package/dist/modules/attendance/index.js +4 -2
  293. package/dist/modules/attendance/index.js.map +1 -1
  294. package/dist/modules/attendance/messages.d.ts +6 -0
  295. package/dist/modules/attendance/messages.d.ts.map +1 -1
  296. package/dist/modules/attendance/messages.js +6 -0
  297. package/dist/modules/attendance/messages.js.map +1 -1
  298. package/dist/modules/attendance/models.d.ts.map +1 -1
  299. package/dist/modules/attendance/models.js +1 -0
  300. package/dist/modules/attendance/models.js.map +1 -1
  301. package/dist/modules/attendance_backend/index.d.ts +3 -1
  302. package/dist/modules/attendance_backend/index.d.ts.map +1 -1
  303. package/dist/modules/attendance_backend/index.js +65 -4
  304. package/dist/modules/attendance_backend/index.js.map +1 -1
  305. package/dist/modules/attendance_backend/routes.d.ts.map +1 -1
  306. package/dist/modules/attendance_backend/routes.js +240 -53
  307. package/dist/modules/attendance_backend/routes.js.map +1 -1
  308. package/dist/modules/attendance_backend/screens/credentials.d.ts +32 -0
  309. package/dist/modules/attendance_backend/screens/credentials.d.ts.map +1 -0
  310. package/dist/modules/attendance_backend/screens/credentials.js +84 -0
  311. package/dist/modules/attendance_backend/screens/credentials.js.map +1 -0
  312. package/dist/modules/attendance_backend/screens/index.d.ts +4 -0
  313. package/dist/modules/attendance_backend/screens/index.d.ts.map +1 -0
  314. package/dist/modules/attendance_backend/screens/index.js +4 -0
  315. package/dist/modules/attendance_backend/screens/index.js.map +1 -0
  316. package/dist/modules/attendance_backend/screens/my-work.d.ts +35 -0
  317. package/dist/modules/attendance_backend/screens/my-work.d.ts.map +1 -0
  318. package/dist/modules/attendance_backend/screens/my-work.js +189 -0
  319. package/dist/modules/attendance_backend/screens/my-work.js.map +1 -0
  320. package/dist/modules/attendance_backend/screens/period.d.ts +22 -0
  321. package/dist/modules/attendance_backend/screens/period.d.ts.map +1 -0
  322. package/dist/modules/attendance_backend/screens/period.js +85 -0
  323. package/dist/modules/attendance_backend/screens/period.js.map +1 -0
  324. package/dist/modules/attendance_backend/screens.d.ts +0 -4
  325. package/dist/modules/attendance_backend/screens.d.ts.map +1 -1
  326. package/dist/modules/attendance_backend/screens.js +1 -209
  327. package/dist/modules/attendance_backend/screens.js.map +1 -1
  328. package/dist/modules/backend/catalogue.d.ts.map +1 -1
  329. package/dist/modules/backend/catalogue.js +53 -115
  330. package/dist/modules/backend/catalogue.js.map +1 -1
  331. package/dist/modules/backend/chart.d.ts +42 -0
  332. package/dist/modules/backend/chart.d.ts.map +1 -0
  333. package/dist/modules/backend/chart.js +39 -0
  334. package/dist/modules/backend/chart.js.map +1 -0
  335. package/dist/modules/backend/design/HANDOFF.md +118 -38
  336. package/dist/modules/backend/design/auth.css +463 -0
  337. package/dist/modules/backend/design/brand/logo-dark.png +0 -0
  338. package/dist/modules/backend/design/brand/logo-light.png +0 -0
  339. package/dist/modules/backend/design/charts.css +229 -0
  340. package/dist/modules/backend/design/client/chart.d.mts +31 -0
  341. package/dist/modules/backend/design/client/chart.d.mts.map +1 -0
  342. package/dist/modules/backend/design/client/chart.mjs +23 -0
  343. package/dist/modules/backend/design/client/chart.mjs.map +7 -0
  344. package/dist/modules/backend/design/client/relation-select.d.mts +6 -1
  345. package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -1
  346. package/dist/modules/backend/design/client/relation-select.mjs +2 -7
  347. package/dist/modules/backend/design/client/relation-select.mjs.map +7 -1
  348. package/dist/modules/backend/design/client/table-selection.d.mts +7 -0
  349. package/dist/modules/backend/design/client/table-selection.d.mts.map +1 -0
  350. package/dist/modules/backend/design/client/table-selection.mjs +2 -0
  351. package/dist/modules/backend/design/client/table-selection.mjs.map +7 -0
  352. package/dist/modules/backend/design/content.css +809 -0
  353. package/dist/modules/backend/design/controls.css +451 -0
  354. package/dist/modules/backend/design/design-system.css +2 -0
  355. package/dist/modules/backend/design/forms.css +1156 -0
  356. package/dist/modules/backend/design/foundation.css +423 -0
  357. package/dist/modules/backend/design/lists.css +1462 -0
  358. package/dist/modules/backend/design/record.css +526 -0
  359. package/dist/modules/backend/design/responsive.css +326 -0
  360. package/dist/modules/backend/design/tokens.css +317 -92
  361. package/dist/modules/backend/forms.d.ts +38 -1
  362. package/dist/modules/backend/forms.d.ts.map +1 -1
  363. package/dist/modules/backend/forms.js +29 -0
  364. package/dist/modules/backend/forms.js.map +1 -1
  365. package/dist/modules/backend/index.d.ts +14 -6
  366. package/dist/modules/backend/index.d.ts.map +1 -1
  367. package/dist/modules/backend/index.js +33 -16
  368. package/dist/modules/backend/index.js.map +1 -1
  369. package/dist/modules/backend/islands.d.ts.map +1 -1
  370. package/dist/modules/backend/islands.js +22 -4
  371. package/dist/modules/backend/islands.js.map +1 -1
  372. package/dist/modules/backend/joints.d.ts +1 -1
  373. package/dist/modules/backend/joints.d.ts.map +1 -1
  374. package/dist/modules/backend/joints.js +14 -6
  375. package/dist/modules/backend/joints.js.map +1 -1
  376. package/dist/modules/backend/list-search.d.ts +33 -0
  377. package/dist/modules/backend/list-search.d.ts.map +1 -0
  378. package/dist/modules/backend/list-search.js +232 -0
  379. package/dist/modules/backend/list-search.js.map +1 -0
  380. package/dist/modules/backend/menus.d.ts.map +1 -1
  381. package/dist/modules/backend/menus.js +3 -12
  382. package/dist/modules/backend/menus.js.map +1 -1
  383. package/dist/modules/backend/messages.d.ts +1 -1
  384. package/dist/modules/backend/messages.d.ts.map +1 -1
  385. package/dist/modules/backend/messages.js +86 -35
  386. package/dist/modules/backend/messages.js.map +1 -1
  387. package/dist/modules/backend/paging.d.ts +1 -1
  388. package/dist/modules/backend/paging.d.ts.map +1 -1
  389. package/dist/modules/backend/paging.js +1 -1
  390. package/dist/modules/backend/paging.js.map +1 -1
  391. package/dist/modules/backend/relation-select.d.ts +2 -57
  392. package/dist/modules/backend/relation-select.d.ts.map +1 -1
  393. package/dist/modules/backend/relation-select.js +2 -0
  394. package/dist/modules/backend/relation-select.js.map +1 -1
  395. package/dist/modules/backend/routes.d.ts +1 -8
  396. package/dist/modules/backend/routes.d.ts.map +1 -1
  397. package/dist/modules/backend/routes.js +36 -111
  398. package/dist/modules/backend/routes.js.map +1 -1
  399. package/dist/modules/backend/screen.d.ts +130 -0
  400. package/dist/modules/backend/screen.d.ts.map +1 -0
  401. package/dist/modules/backend/screen.js +205 -0
  402. package/dist/modules/backend/screen.js.map +1 -0
  403. package/dist/modules/backend/screens.d.ts +11 -14
  404. package/dist/modules/backend/screens.d.ts.map +1 -1
  405. package/dist/modules/backend/screens.js +13 -70
  406. package/dist/modules/backend/screens.js.map +1 -1
  407. package/dist/modules/business_report_staff_channel/channel-routes.d.ts +2 -0
  408. package/dist/modules/business_report_staff_channel/channel-routes.d.ts.map +1 -0
  409. package/dist/modules/business_report_staff_channel/channel-routes.js +438 -0
  410. package/dist/modules/business_report_staff_channel/channel-routes.js.map +1 -0
  411. package/dist/modules/business_report_staff_channel/index.d.ts +5 -0
  412. package/dist/modules/business_report_staff_channel/index.d.ts.map +1 -0
  413. package/dist/modules/business_report_staff_channel/index.js +18 -0
  414. package/dist/modules/business_report_staff_channel/index.js.map +1 -0
  415. package/dist/modules/calendar/index.d.ts.map +1 -1
  416. package/dist/modules/calendar/index.js +0 -1
  417. package/dist/modules/calendar/index.js.map +1 -1
  418. package/dist/modules/calendar/recurrence.d.ts.map +1 -1
  419. package/dist/modules/calendar/recurrence.js +3 -11
  420. package/dist/modules/calendar/recurrence.js.map +1 -1
  421. package/dist/modules/calendar_activity/index.d.ts.map +1 -1
  422. package/dist/modules/calendar_activity/index.js +0 -2
  423. package/dist/modules/calendar_activity/index.js.map +1 -1
  424. package/dist/modules/calendar_backend/index.d.ts +1 -1
  425. package/dist/modules/calendar_backend/index.d.ts.map +1 -1
  426. package/dist/modules/calendar_backend/index.js +1 -3
  427. package/dist/modules/calendar_backend/index.js.map +1 -1
  428. package/dist/modules/calendar_backend/routes.d.ts.map +1 -1
  429. package/dist/modules/calendar_backend/routes.js +10 -22
  430. package/dist/modules/calendar_backend/routes.js.map +1 -1
  431. package/dist/modules/calendar_backend/screens/calendar.d.ts +5 -0
  432. package/dist/modules/calendar_backend/screens/calendar.d.ts.map +1 -0
  433. package/dist/modules/calendar_backend/screens/calendar.js +10 -0
  434. package/dist/modules/calendar_backend/screens/calendar.js.map +1 -0
  435. package/dist/modules/calendar_backend/screens/index.d.ts +2 -0
  436. package/dist/modules/calendar_backend/screens/index.d.ts.map +1 -0
  437. package/dist/modules/calendar_backend/screens/index.js +2 -0
  438. package/dist/modules/calendar_backend/screens/index.js.map +1 -0
  439. package/dist/modules/calendar_mail_transport/index.d.ts.map +1 -1
  440. package/dist/modules/calendar_mail_transport/index.js +0 -2
  441. package/dist/modules/calendar_mail_transport/index.js.map +1 -1
  442. package/dist/modules/channel_api/core.d.ts +283 -0
  443. package/dist/modules/channel_api/core.d.ts.map +1 -0
  444. package/dist/modules/channel_api/core.js +615 -0
  445. package/dist/modules/channel_api/core.js.map +1 -0
  446. package/dist/modules/channel_api/customer.d.ts +21 -0
  447. package/dist/modules/channel_api/customer.d.ts.map +1 -0
  448. package/dist/modules/channel_api/customer.js +368 -0
  449. package/dist/modules/channel_api/customer.js.map +1 -0
  450. package/dist/modules/channel_api/index.d.ts +6 -0
  451. package/dist/modules/channel_api/index.d.ts.map +1 -0
  452. package/dist/modules/channel_api/index.js +66 -0
  453. package/dist/modules/channel_api/index.js.map +1 -0
  454. package/dist/modules/channel_api/openapi.d.ts +17 -0
  455. package/dist/modules/channel_api/openapi.d.ts.map +1 -0
  456. package/dist/modules/channel_api/openapi.js +105 -0
  457. package/dist/modules/channel_api/openapi.js.map +1 -0
  458. package/dist/modules/channel_api/staff.d.ts +7 -0
  459. package/dist/modules/channel_api/staff.d.ts.map +1 -0
  460. package/dist/modules/channel_api/staff.js +209 -0
  461. package/dist/modules/channel_api/staff.js.map +1 -0
  462. package/dist/modules/company/functions.d.ts.map +1 -1
  463. package/dist/modules/company/functions.js +93 -12
  464. package/dist/modules/company/functions.js.map +1 -1
  465. package/dist/modules/company/index.js +3 -3
  466. package/dist/modules/company/index.js.map +1 -1
  467. package/dist/modules/company/messages.d.ts +8 -0
  468. package/dist/modules/company/messages.d.ts.map +1 -1
  469. package/dist/modules/company/messages.js +8 -0
  470. package/dist/modules/company/messages.js.map +1 -1
  471. package/dist/modules/company/models.d.ts +2 -2
  472. package/dist/modules/company/models.d.ts.map +1 -1
  473. package/dist/modules/company/models.js +12 -2
  474. package/dist/modules/company/models.js.map +1 -1
  475. package/dist/modules/company_backend/index.d.ts +2 -1
  476. package/dist/modules/company_backend/index.d.ts.map +1 -1
  477. package/dist/modules/company_backend/index.js +25 -4
  478. package/dist/modules/company_backend/index.js.map +1 -1
  479. package/dist/modules/company_backend/routes.d.ts.map +1 -1
  480. package/dist/modules/company_backend/routes.js +314 -96
  481. package/dist/modules/company_backend/routes.js.map +1 -1
  482. package/dist/modules/company_backend/screens/branch-form.d.ts +18 -0
  483. package/dist/modules/company_backend/screens/branch-form.d.ts.map +1 -0
  484. package/dist/modules/company_backend/screens/branch-form.js +63 -0
  485. package/dist/modules/company_backend/screens/branch-form.js.map +1 -0
  486. package/dist/modules/company_backend/screens/companies-list.d.ts +18 -0
  487. package/dist/modules/company_backend/screens/companies-list.d.ts.map +1 -0
  488. package/dist/modules/company_backend/screens/companies-list.js +49 -0
  489. package/dist/modules/company_backend/screens/companies-list.js.map +1 -0
  490. package/dist/modules/company_backend/screens/company-form.d.ts +25 -0
  491. package/dist/modules/company_backend/screens/company-form.d.ts.map +1 -0
  492. package/dist/modules/company_backend/screens/company-form.js +159 -0
  493. package/dist/modules/company_backend/screens/company-form.js.map +1 -0
  494. package/dist/modules/company_backend/screens/context.d.ts +30 -0
  495. package/dist/modules/company_backend/screens/context.d.ts.map +1 -0
  496. package/dist/modules/company_backend/screens/context.js +48 -0
  497. package/dist/modules/company_backend/screens/context.js.map +1 -0
  498. package/dist/modules/company_backend/screens/hierarchy.d.ts +16 -0
  499. package/dist/modules/company_backend/screens/hierarchy.d.ts.map +1 -0
  500. package/dist/modules/company_backend/screens/hierarchy.js +41 -0
  501. package/dist/modules/company_backend/screens/hierarchy.js.map +1 -0
  502. package/dist/modules/company_backend/screens/index.d.ts +7 -0
  503. package/dist/modules/company_backend/screens/index.d.ts.map +1 -0
  504. package/dist/modules/company_backend/screens/index.js +6 -0
  505. package/dist/modules/company_backend/screens/index.js.map +1 -0
  506. package/dist/modules/company_backend/screens/types.d.ts +22 -0
  507. package/dist/modules/company_backend/screens/types.d.ts.map +1 -0
  508. package/dist/modules/company_backend/screens/types.js +2 -0
  509. package/dist/modules/company_backend/screens/types.js.map +1 -0
  510. package/dist/modules/crm/functions.d.ts +1 -1
  511. package/dist/modules/crm/functions.d.ts.map +1 -1
  512. package/dist/modules/crm/functions.js +534 -75
  513. package/dist/modules/crm/functions.js.map +1 -1
  514. package/dist/modules/crm/index.d.ts +2 -1
  515. package/dist/modules/crm/index.d.ts.map +1 -1
  516. package/dist/modules/crm/index.js +3 -4
  517. package/dist/modules/crm/index.js.map +1 -1
  518. package/dist/modules/crm/jobs.d.ts +10 -0
  519. package/dist/modules/crm/jobs.d.ts.map +1 -1
  520. package/dist/modules/crm/jobs.js +50 -1
  521. package/dist/modules/crm/jobs.js.map +1 -1
  522. package/dist/modules/crm/messages.d.ts +14 -1
  523. package/dist/modules/crm/messages.d.ts.map +1 -1
  524. package/dist/modules/crm/messages.js +26 -0
  525. package/dist/modules/crm/messages.js.map +1 -1
  526. package/dist/modules/crm/models.d.ts.map +1 -1
  527. package/dist/modules/crm/models.js +25 -0
  528. package/dist/modules/crm/models.js.map +1 -1
  529. package/dist/modules/crm/operations.d.ts +110 -1
  530. package/dist/modules/crm/operations.d.ts.map +1 -1
  531. package/dist/modules/crm/operations.js +612 -84
  532. package/dist/modules/crm/operations.js.map +1 -1
  533. package/dist/modules/crm_backend/client/crm-kanban-view.d.mts.map +1 -1
  534. package/dist/modules/crm_backend/client/crm-kanban-view.mjs +132 -32
  535. package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -1
  536. package/dist/modules/crm_backend/client/crm.css +398 -63
  537. package/dist/modules/crm_backend/index.d.ts.map +1 -1
  538. package/dist/modules/crm_backend/index.js +12 -4
  539. package/dist/modules/crm_backend/index.js.map +1 -1
  540. package/dist/modules/crm_backend/messages.d.ts +212 -0
  541. package/dist/modules/crm_backend/messages.d.ts.map +1 -1
  542. package/dist/modules/crm_backend/messages.js +212 -0
  543. package/dist/modules/crm_backend/messages.js.map +1 -1
  544. package/dist/modules/crm_backend/relation-control.d.ts +51 -0
  545. package/dist/modules/crm_backend/relation-control.d.ts.map +1 -0
  546. package/dist/modules/crm_backend/relation-control.js +107 -0
  547. package/dist/modules/crm_backend/relation-control.js.map +1 -0
  548. package/dist/modules/crm_backend/routes.d.ts.map +1 -1
  549. package/dist/modules/crm_backend/routes.js +1068 -260
  550. package/dist/modules/crm_backend/routes.js.map +1 -1
  551. package/dist/modules/crm_backend/screens/activity-planner.d.ts +22 -0
  552. package/dist/modules/crm_backend/screens/activity-planner.d.ts.map +1 -0
  553. package/dist/modules/crm_backend/screens/activity-planner.js +159 -0
  554. package/dist/modules/crm_backend/screens/activity-planner.js.map +1 -0
  555. package/dist/modules/crm_backend/screens/case-create.d.ts +15 -0
  556. package/dist/modules/crm_backend/screens/case-create.d.ts.map +1 -0
  557. package/dist/modules/crm_backend/screens/case-create.js +19 -0
  558. package/dist/modules/crm_backend/screens/case-create.js.map +1 -0
  559. package/dist/modules/crm_backend/screens/case-detail.d.ts +46 -0
  560. package/dist/modules/crm_backend/screens/case-detail.d.ts.map +1 -0
  561. package/dist/modules/crm_backend/screens/case-detail.js +506 -0
  562. package/dist/modules/crm_backend/screens/case-detail.js.map +1 -0
  563. package/dist/modules/crm_backend/screens/cases-list.d.ts +16 -0
  564. package/dist/modules/crm_backend/screens/cases-list.d.ts.map +1 -0
  565. package/dist/modules/crm_backend/screens/cases-list.js +86 -0
  566. package/dist/modules/crm_backend/screens/cases-list.js.map +1 -0
  567. package/dist/modules/crm_backend/screens/configuration.d.ts +28 -0
  568. package/dist/modules/crm_backend/screens/configuration.d.ts.map +1 -0
  569. package/dist/modules/crm_backend/screens/configuration.js +115 -0
  570. package/dist/modules/crm_backend/screens/configuration.js.map +1 -0
  571. package/dist/modules/crm_backend/screens/index.d.ts +14 -0
  572. package/dist/modules/crm_backend/screens/index.d.ts.map +1 -0
  573. package/dist/modules/crm_backend/screens/index.js +8 -0
  574. package/dist/modules/crm_backend/screens/index.js.map +1 -0
  575. package/dist/modules/crm_backend/screens/leaderboard.d.ts +12 -0
  576. package/dist/modules/crm_backend/screens/leaderboard.d.ts.map +1 -0
  577. package/dist/modules/crm_backend/screens/leaderboard.js +89 -0
  578. package/dist/modules/crm_backend/screens/leaderboard.js.map +1 -0
  579. package/dist/modules/crm_backend/screens/pipeline.d.ts +21 -0
  580. package/dist/modules/crm_backend/screens/pipeline.d.ts.map +1 -0
  581. package/dist/modules/crm_backend/screens/pipeline.js +22 -0
  582. package/dist/modules/crm_backend/screens/pipeline.js.map +1 -0
  583. package/dist/modules/crm_sale/index.d.ts.map +1 -1
  584. package/dist/modules/crm_sale/index.js +3 -4
  585. package/dist/modules/crm_sale/index.js.map +1 -1
  586. package/dist/modules/crm_sale/messages.d.ts +3 -1
  587. package/dist/modules/crm_sale/messages.d.ts.map +1 -1
  588. package/dist/modules/crm_sale/messages.js +4 -0
  589. package/dist/modules/crm_sale/messages.js.map +1 -1
  590. package/dist/modules/crm_sale/sale-functions.d.ts +8 -1
  591. package/dist/modules/crm_sale/sale-functions.d.ts.map +1 -1
  592. package/dist/modules/crm_sale/sale-functions.js +184 -55
  593. package/dist/modules/crm_sale/sale-functions.js.map +1 -1
  594. package/dist/modules/crm_staff_channel/channel-routes.d.ts +2 -0
  595. package/dist/modules/crm_staff_channel/channel-routes.d.ts.map +1 -0
  596. package/dist/modules/crm_staff_channel/channel-routes.js +777 -0
  597. package/dist/modules/crm_staff_channel/channel-routes.js.map +1 -0
  598. package/dist/modules/crm_staff_channel/index.d.ts +5 -0
  599. package/dist/modules/crm_staff_channel/index.d.ts.map +1 -0
  600. package/dist/modules/crm_staff_channel/index.js +30 -0
  601. package/dist/modules/crm_staff_channel/index.js.map +1 -0
  602. package/dist/modules/crm_website/functions.d.ts.map +1 -1
  603. package/dist/modules/crm_website/functions.js +89 -10
  604. package/dist/modules/crm_website/functions.js.map +1 -1
  605. package/dist/modules/crm_website/index.js +1 -2
  606. package/dist/modules/crm_website/index.js.map +1 -1
  607. package/dist/modules/crm_website/messages.d.ts +4 -1
  608. package/dist/modules/crm_website/messages.d.ts.map +1 -1
  609. package/dist/modules/crm_website/messages.js +6 -0
  610. package/dist/modules/crm_website/messages.js.map +1 -1
  611. package/dist/modules/crm_website/models.d.ts.map +1 -1
  612. package/dist/modules/crm_website/models.js +18 -0
  613. package/dist/modules/crm_website/models.js.map +1 -1
  614. package/dist/modules/crm_website/routes.d.ts.map +1 -1
  615. package/dist/modules/crm_website/routes.js +44 -12
  616. package/dist/modules/crm_website/routes.js.map +1 -1
  617. package/dist/modules/crm_website/screens.d.ts +7 -1
  618. package/dist/modules/crm_website/screens.d.ts.map +1 -1
  619. package/dist/modules/crm_website/screens.js +13 -8
  620. package/dist/modules/crm_website/screens.js.map +1 -1
  621. package/dist/modules/flow/functions.d.ts +3 -0
  622. package/dist/modules/flow/functions.d.ts.map +1 -0
  623. package/dist/modules/flow/functions.js +1876 -0
  624. package/dist/modules/flow/functions.js.map +1 -0
  625. package/dist/modules/flow/index.d.ts +12 -0
  626. package/dist/modules/flow/index.d.ts.map +1 -0
  627. package/dist/modules/flow/index.js +30 -0
  628. package/dist/modules/flow/index.js.map +1 -0
  629. package/dist/modules/flow/jobs.d.ts +3 -0
  630. package/dist/modules/flow/jobs.d.ts.map +1 -0
  631. package/dist/modules/flow/jobs.js +136 -0
  632. package/dist/modules/flow/jobs.js.map +1 -0
  633. package/dist/modules/flow/membership.d.ts +72 -0
  634. package/dist/modules/flow/membership.d.ts.map +1 -0
  635. package/dist/modules/flow/membership.js +182 -0
  636. package/dist/modules/flow/membership.js.map +1 -0
  637. package/dist/modules/flow/messages.d.ts +79 -0
  638. package/dist/modules/flow/messages.d.ts.map +1 -0
  639. package/dist/modules/flow/messages.js +152 -0
  640. package/dist/modules/flow/messages.js.map +1 -0
  641. package/dist/modules/flow/models.d.ts +3 -0
  642. package/dist/modules/flow/models.d.ts.map +1 -0
  643. package/dist/modules/flow/models.js +453 -0
  644. package/dist/modules/flow/models.js.map +1 -0
  645. package/dist/modules/flow/operations.d.ts +414 -0
  646. package/dist/modules/flow/operations.d.ts.map +1 -0
  647. package/dist/modules/flow/operations.js +1671 -0
  648. package/dist/modules/flow/operations.js.map +1 -0
  649. package/dist/modules/flow/pages.d.ts +146 -0
  650. package/dist/modules/flow/pages.d.ts.map +1 -0
  651. package/dist/modules/flow/pages.js +394 -0
  652. package/dist/modules/flow/pages.js.map +1 -0
  653. package/dist/modules/flow/projects.d.ts +41 -0
  654. package/dist/modules/flow/projects.d.ts.map +1 -0
  655. package/dist/modules/flow/projects.js +74 -0
  656. package/dist/modules/flow/projects.js.map +1 -0
  657. package/dist/modules/flow/search.d.ts +57 -0
  658. package/dist/modules/flow/search.d.ts.map +1 -0
  659. package/dist/modules/flow/search.js +110 -0
  660. package/dist/modules/flow/search.js.map +1 -0
  661. package/dist/modules/flow/types.d.ts +17 -0
  662. package/dist/modules/flow/types.d.ts.map +1 -0
  663. package/dist/modules/flow/types.js +13 -0
  664. package/dist/modules/flow/types.js.map +1 -0
  665. package/dist/modules/flow_backend/functions.d.ts +3 -0
  666. package/dist/modules/flow_backend/functions.d.ts.map +1 -0
  667. package/dist/modules/flow_backend/functions.js +162 -0
  668. package/dist/modules/flow_backend/functions.js.map +1 -0
  669. package/dist/modules/flow_backend/index.d.ts +3 -0
  670. package/dist/modules/flow_backend/index.d.ts.map +1 -0
  671. package/dist/modules/flow_backend/index.js +96 -0
  672. package/dist/modules/flow_backend/index.js.map +1 -0
  673. package/dist/modules/flow_backend/islands.d.ts +3 -0
  674. package/dist/modules/flow_backend/islands.d.ts.map +1 -0
  675. package/dist/modules/flow_backend/islands.js +31 -0
  676. package/dist/modules/flow_backend/islands.js.map +1 -0
  677. package/dist/modules/flow_backend/messages.d.ts +248 -0
  678. package/dist/modules/flow_backend/messages.d.ts.map +1 -0
  679. package/dist/modules/flow_backend/messages.js +470 -0
  680. package/dist/modules/flow_backend/messages.js.map +1 -0
  681. package/dist/modules/flow_backend/relation-control.d.ts +53 -0
  682. package/dist/modules/flow_backend/relation-control.d.ts.map +1 -0
  683. package/dist/modules/flow_backend/relation-control.js +106 -0
  684. package/dist/modules/flow_backend/relation-control.js.map +1 -0
  685. package/dist/modules/flow_backend/routes.d.ts +3 -0
  686. package/dist/modules/flow_backend/routes.d.ts.map +1 -0
  687. package/dist/modules/flow_backend/routes.js +2519 -0
  688. package/dist/modules/flow_backend/routes.js.map +1 -0
  689. package/dist/modules/flow_backend/screens/all-epics.d.ts +19 -0
  690. package/dist/modules/flow_backend/screens/all-epics.d.ts.map +1 -0
  691. package/dist/modules/flow_backend/screens/all-epics.js +59 -0
  692. package/dist/modules/flow_backend/screens/all-epics.js.map +1 -0
  693. package/dist/modules/flow_backend/screens/all-pages.d.ts +19 -0
  694. package/dist/modules/flow_backend/screens/all-pages.d.ts.map +1 -0
  695. package/dist/modules/flow_backend/screens/all-pages.js +65 -0
  696. package/dist/modules/flow_backend/screens/all-pages.js.map +1 -0
  697. package/dist/modules/flow_backend/screens/board.d.ts +5 -0
  698. package/dist/modules/flow_backend/screens/board.d.ts.map +1 -0
  699. package/dist/modules/flow_backend/screens/board.js +7 -0
  700. package/dist/modules/flow_backend/screens/board.js.map +1 -0
  701. package/dist/modules/flow_backend/screens/epic-detail.d.ts +22 -0
  702. package/dist/modules/flow_backend/screens/epic-detail.d.ts.map +1 -0
  703. package/dist/modules/flow_backend/screens/epic-detail.js +41 -0
  704. package/dist/modules/flow_backend/screens/epic-detail.js.map +1 -0
  705. package/dist/modules/flow_backend/screens/gantt.d.ts +21 -0
  706. package/dist/modules/flow_backend/screens/gantt.d.ts.map +1 -0
  707. package/dist/modules/flow_backend/screens/gantt.js +42 -0
  708. package/dist/modules/flow_backend/screens/gantt.js.map +1 -0
  709. package/dist/modules/flow_backend/screens/index.d.ts +29 -0
  710. package/dist/modules/flow_backend/screens/index.d.ts.map +1 -0
  711. package/dist/modules/flow_backend/screens/index.js +23 -0
  712. package/dist/modules/flow_backend/screens/index.js.map +1 -0
  713. package/dist/modules/flow_backend/screens/issue-detail.d.ts +38 -0
  714. package/dist/modules/flow_backend/screens/issue-detail.d.ts.map +1 -0
  715. package/dist/modules/flow_backend/screens/issue-detail.js +336 -0
  716. package/dist/modules/flow_backend/screens/issue-detail.js.map +1 -0
  717. package/dist/modules/flow_backend/screens/issues.d.ts +34 -0
  718. package/dist/modules/flow_backend/screens/issues.d.ts.map +1 -0
  719. package/dist/modules/flow_backend/screens/issues.js +118 -0
  720. package/dist/modules/flow_backend/screens/issues.js.map +1 -0
  721. package/dist/modules/flow_backend/screens/map.d.ts +13 -0
  722. package/dist/modules/flow_backend/screens/map.d.ts.map +1 -0
  723. package/dist/modules/flow_backend/screens/map.js +16 -0
  724. package/dist/modules/flow_backend/screens/map.js.map +1 -0
  725. package/dist/modules/flow_backend/screens/my-work.d.ts +42 -0
  726. package/dist/modules/flow_backend/screens/my-work.d.ts.map +1 -0
  727. package/dist/modules/flow_backend/screens/my-work.js +157 -0
  728. package/dist/modules/flow_backend/screens/my-work.js.map +1 -0
  729. package/dist/modules/flow_backend/screens/nav.d.ts +3 -0
  730. package/dist/modules/flow_backend/screens/nav.d.ts.map +1 -0
  731. package/dist/modules/flow_backend/screens/nav.js +79 -0
  732. package/dist/modules/flow_backend/screens/nav.js.map +1 -0
  733. package/dist/modules/flow_backend/screens/page-detail.d.ts +31 -0
  734. package/dist/modules/flow_backend/screens/page-detail.d.ts.map +1 -0
  735. package/dist/modules/flow_backend/screens/page-detail.js +113 -0
  736. package/dist/modules/flow_backend/screens/page-detail.js.map +1 -0
  737. package/dist/modules/flow_backend/screens/project-create.d.ts +26 -0
  738. package/dist/modules/flow_backend/screens/project-create.d.ts.map +1 -0
  739. package/dist/modules/flow_backend/screens/project-create.js +56 -0
  740. package/dist/modules/flow_backend/screens/project-create.js.map +1 -0
  741. package/dist/modules/flow_backend/screens/project-epics.d.ts +33 -0
  742. package/dist/modules/flow_backend/screens/project-epics.d.ts.map +1 -0
  743. package/dist/modules/flow_backend/screens/project-epics.js +90 -0
  744. package/dist/modules/flow_backend/screens/project-epics.js.map +1 -0
  745. package/dist/modules/flow_backend/screens/project-pages.d.ts +34 -0
  746. package/dist/modules/flow_backend/screens/project-pages.d.ts.map +1 -0
  747. package/dist/modules/flow_backend/screens/project-pages.js +66 -0
  748. package/dist/modules/flow_backend/screens/project-pages.js.map +1 -0
  749. package/dist/modules/flow_backend/screens/project-settings.d.ts +69 -0
  750. package/dist/modules/flow_backend/screens/project-settings.d.ts.map +1 -0
  751. package/dist/modules/flow_backend/screens/project-settings.js +248 -0
  752. package/dist/modules/flow_backend/screens/project-settings.js.map +1 -0
  753. package/dist/modules/flow_backend/screens/projects-list.d.ts +30 -0
  754. package/dist/modules/flow_backend/screens/projects-list.d.ts.map +1 -0
  755. package/dist/modules/flow_backend/screens/projects-list.js +121 -0
  756. package/dist/modules/flow_backend/screens/projects-list.js.map +1 -0
  757. package/dist/modules/flow_backend/screens/shared.d.ts +28 -0
  758. package/dist/modules/flow_backend/screens/shared.d.ts.map +1 -0
  759. package/dist/modules/flow_backend/screens/shared.js +46 -0
  760. package/dist/modules/flow_backend/screens/shared.js.map +1 -0
  761. package/dist/modules/flow_backend/screens/sprints.d.ts +33 -0
  762. package/dist/modules/flow_backend/screens/sprints.d.ts.map +1 -0
  763. package/dist/modules/flow_backend/screens/sprints.js +159 -0
  764. package/dist/modules/flow_backend/screens/sprints.js.map +1 -0
  765. package/dist/modules/flow_staff_channel/channel-routes.d.ts +2 -0
  766. package/dist/modules/flow_staff_channel/channel-routes.d.ts.map +1 -0
  767. package/dist/modules/flow_staff_channel/channel-routes.js +425 -0
  768. package/dist/modules/flow_staff_channel/channel-routes.js.map +1 -0
  769. package/dist/modules/flow_staff_channel/index.d.ts +5 -0
  770. package/dist/modules/flow_staff_channel/index.d.ts.map +1 -0
  771. package/dist/modules/flow_staff_channel/index.js +30 -0
  772. package/dist/modules/flow_staff_channel/index.js.map +1 -0
  773. package/dist/modules/hospitality_billing/functions.d.ts +18 -0
  774. package/dist/modules/hospitality_billing/functions.d.ts.map +1 -0
  775. package/dist/modules/hospitality_billing/functions.js +426 -0
  776. package/dist/modules/hospitality_billing/functions.js.map +1 -0
  777. package/dist/modules/hospitality_billing/index.d.ts +3 -0
  778. package/dist/modules/hospitality_billing/index.d.ts.map +1 -0
  779. package/dist/modules/hospitality_billing/index.js +25 -0
  780. package/dist/modules/hospitality_billing/index.js.map +1 -0
  781. package/dist/modules/hospitality_billing/jobs.d.ts +17 -0
  782. package/dist/modules/hospitality_billing/jobs.d.ts.map +1 -0
  783. package/dist/modules/hospitality_billing/jobs.js +83 -0
  784. package/dist/modules/hospitality_billing/jobs.js.map +1 -0
  785. package/dist/modules/hospitality_billing/menus.d.ts +9 -0
  786. package/dist/modules/hospitality_billing/menus.d.ts.map +1 -0
  787. package/dist/modules/hospitality_billing/menus.js +25 -0
  788. package/dist/modules/hospitality_billing/menus.js.map +1 -0
  789. package/dist/modules/hospitality_billing/messages.d.ts +3 -0
  790. package/dist/modules/hospitality_billing/messages.d.ts.map +1 -0
  791. package/dist/modules/hospitality_billing/messages.js +163 -0
  792. package/dist/modules/hospitality_billing/messages.js.map +1 -0
  793. package/dist/modules/hospitality_billing/models.d.ts +3 -0
  794. package/dist/modules/hospitality_billing/models.d.ts.map +1 -0
  795. package/dist/modules/hospitality_billing/models.js +65 -0
  796. package/dist/modules/hospitality_billing/models.js.map +1 -0
  797. package/dist/modules/hospitality_billing/routes.d.ts +3 -0
  798. package/dist/modules/hospitality_billing/routes.d.ts.map +1 -0
  799. package/dist/modules/hospitality_billing/routes.js +189 -0
  800. package/dist/modules/hospitality_billing/routes.js.map +1 -0
  801. package/dist/modules/hospitality_billing/screens/billing.d.ts +3 -0
  802. package/dist/modules/hospitality_billing/screens/billing.d.ts.map +1 -0
  803. package/dist/modules/hospitality_billing/screens/billing.js +20 -0
  804. package/dist/modules/hospitality_billing/screens/billing.js.map +1 -0
  805. package/dist/modules/hospitality_billing/screens/charge-rules.d.ts +12 -0
  806. package/dist/modules/hospitality_billing/screens/charge-rules.d.ts.map +1 -0
  807. package/dist/modules/hospitality_billing/screens/charge-rules.js +86 -0
  808. package/dist/modules/hospitality_billing/screens/charge-rules.js.map +1 -0
  809. package/dist/modules/hospitality_billing/screens/index.d.ts +4 -0
  810. package/dist/modules/hospitality_billing/screens/index.d.ts.map +1 -0
  811. package/dist/modules/hospitality_billing/screens/index.js +4 -0
  812. package/dist/modules/hospitality_billing/screens/index.js.map +1 -0
  813. package/dist/modules/hospitality_billing/screens/page-frame.d.ts +14 -0
  814. package/dist/modules/hospitality_billing/screens/page-frame.d.ts.map +1 -0
  815. package/dist/modules/hospitality_billing/screens/page-frame.js +6 -0
  816. package/dist/modules/hospitality_billing/screens/page-frame.js.map +1 -0
  817. package/dist/modules/hospitality_billing/screens/shared.d.ts +64 -0
  818. package/dist/modules/hospitality_billing/screens/shared.d.ts.map +1 -0
  819. package/dist/modules/hospitality_billing/screens/shared.js +117 -0
  820. package/dist/modules/hospitality_billing/screens/shared.js.map +1 -0
  821. package/dist/modules/hospitality_core/calendar.d.ts.map +1 -1
  822. package/dist/modules/hospitality_core/calendar.js +2 -1
  823. package/dist/modules/hospitality_core/calendar.js.map +1 -1
  824. package/dist/modules/hospitality_core/functions.d.ts.map +1 -1
  825. package/dist/modules/hospitality_core/functions.js +114 -14
  826. package/dist/modules/hospitality_core/functions.js.map +1 -1
  827. package/dist/modules/hospitality_core/index.d.ts +2 -2
  828. package/dist/modules/hospitality_core/index.d.ts.map +1 -1
  829. package/dist/modules/hospitality_core/index.js +3 -2
  830. package/dist/modules/hospitality_core/index.js.map +1 -1
  831. package/dist/modules/hospitality_core/inventory.d.ts +53 -4
  832. package/dist/modules/hospitality_core/inventory.d.ts.map +1 -1
  833. package/dist/modules/hospitality_core/inventory.js +121 -14
  834. package/dist/modules/hospitality_core/inventory.js.map +1 -1
  835. package/dist/modules/hospitality_core/menus.d.ts.map +1 -1
  836. package/dist/modules/hospitality_core/menus.js +31 -0
  837. package/dist/modules/hospitality_core/menus.js.map +1 -1
  838. package/dist/modules/hospitality_core/messages.d.ts.map +1 -1
  839. package/dist/modules/hospitality_core/messages.js +427 -183
  840. package/dist/modules/hospitality_core/messages.js.map +1 -1
  841. package/dist/modules/hospitality_core/models.d.ts +1 -1
  842. package/dist/modules/hospitality_core/models.d.ts.map +1 -1
  843. package/dist/modules/hospitality_core/models.js +47 -2
  844. package/dist/modules/hospitality_core/models.js.map +1 -1
  845. package/dist/modules/hospitality_core/night-audit.d.ts +1 -0
  846. package/dist/modules/hospitality_core/night-audit.d.ts.map +1 -1
  847. package/dist/modules/hospitality_core/night-audit.js +46 -1
  848. package/dist/modules/hospitality_core/night-audit.js.map +1 -1
  849. package/dist/modules/hospitality_core/online-booking.d.ts +5 -0
  850. package/dist/modules/hospitality_core/online-booking.d.ts.map +1 -0
  851. package/dist/modules/hospitality_core/online-booking.js +775 -0
  852. package/dist/modules/hospitality_core/online-booking.js.map +1 -0
  853. package/dist/modules/hospitality_core/operations.d.ts +21 -1
  854. package/dist/modules/hospitality_core/operations.d.ts.map +1 -1
  855. package/dist/modules/hospitality_core/operations.js +549 -74
  856. package/dist/modules/hospitality_core/operations.js.map +1 -1
  857. package/dist/modules/hospitality_core/routes.d.ts.map +1 -1
  858. package/dist/modules/hospitality_core/routes.js +526 -107
  859. package/dist/modules/hospitality_core/routes.js.map +1 -1
  860. package/dist/modules/hospitality_core/screens/amenities.d.ts +10 -0
  861. package/dist/modules/hospitality_core/screens/amenities.d.ts.map +1 -0
  862. package/dist/modules/hospitality_core/screens/amenities.js +65 -0
  863. package/dist/modules/hospitality_core/screens/amenities.js.map +1 -0
  864. package/dist/modules/hospitality_core/screens/building-detail.d.ts +3 -0
  865. package/dist/modules/hospitality_core/screens/building-detail.d.ts.map +1 -0
  866. package/dist/modules/hospitality_core/screens/building-detail.js +69 -0
  867. package/dist/modules/hospitality_core/screens/building-detail.js.map +1 -0
  868. package/dist/modules/hospitality_core/screens/check-out-prep.d.ts +46 -0
  869. package/dist/modules/hospitality_core/screens/check-out-prep.d.ts.map +1 -0
  870. package/dist/modules/hospitality_core/screens/check-out-prep.js +133 -0
  871. package/dist/modules/hospitality_core/screens/check-out-prep.js.map +1 -0
  872. package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts +7 -0
  873. package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts.map +1 -0
  874. package/dist/modules/hospitality_core/screens/cleaning-task-detail.js +109 -0
  875. package/dist/modules/hospitality_core/screens/cleaning-task-detail.js.map +1 -0
  876. package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts +20 -0
  877. package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts.map +1 -0
  878. package/dist/modules/hospitality_core/screens/cleaning-tasks.js +139 -0
  879. package/dist/modules/hospitality_core/screens/cleaning-tasks.js.map +1 -0
  880. package/dist/modules/hospitality_core/screens/content.d.ts +3 -0
  881. package/dist/modules/hospitality_core/screens/content.d.ts.map +1 -0
  882. package/dist/modules/hospitality_core/screens/content.js +114 -0
  883. package/dist/modules/hospitality_core/screens/content.js.map +1 -0
  884. package/dist/modules/hospitality_core/screens/floor-detail.d.ts +3 -0
  885. package/dist/modules/hospitality_core/screens/floor-detail.d.ts.map +1 -0
  886. package/dist/modules/hospitality_core/screens/floor-detail.js +74 -0
  887. package/dist/modules/hospitality_core/screens/floor-detail.js.map +1 -0
  888. package/dist/modules/hospitality_core/screens/folio-detail.d.ts +3 -0
  889. package/dist/modules/hospitality_core/screens/folio-detail.d.ts.map +1 -0
  890. package/dist/modules/hospitality_core/screens/folio-detail.js +140 -0
  891. package/dist/modules/hospitality_core/screens/folio-detail.js.map +1 -0
  892. package/dist/modules/hospitality_core/screens/folios.d.ts +3 -0
  893. package/dist/modules/hospitality_core/screens/folios.d.ts.map +1 -0
  894. package/dist/modules/hospitality_core/screens/folios.js +7 -0
  895. package/dist/modules/hospitality_core/screens/folios.js.map +1 -0
  896. package/dist/modules/hospitality_core/screens/front-desk.d.ts +35 -0
  897. package/dist/modules/hospitality_core/screens/front-desk.d.ts.map +1 -0
  898. package/dist/modules/hospitality_core/screens/front-desk.js +195 -0
  899. package/dist/modules/hospitality_core/screens/front-desk.js.map +1 -0
  900. package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts +3 -0
  901. package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts.map +1 -0
  902. package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js +121 -0
  903. package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js.map +1 -0
  904. package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts +9 -0
  905. package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts.map +1 -0
  906. package/dist/modules/hospitality_core/screens/housekeeping-rooms.js +54 -0
  907. package/dist/modules/hospitality_core/screens/housekeeping-rooms.js.map +1 -0
  908. package/dist/modules/hospitality_core/screens/index.d.ts +35 -0
  909. package/dist/modules/hospitality_core/screens/index.d.ts.map +1 -0
  910. package/dist/modules/hospitality_core/screens/index.js +34 -0
  911. package/dist/modules/hospitality_core/screens/index.js.map +1 -0
  912. package/dist/modules/hospitality_core/screens/inventory.d.ts +8 -0
  913. package/dist/modules/hospitality_core/screens/inventory.d.ts.map +1 -0
  914. package/dist/modules/hospitality_core/screens/inventory.js +122 -0
  915. package/dist/modules/hospitality_core/screens/inventory.js.map +1 -0
  916. package/dist/modules/hospitality_core/screens/new-property.d.ts +3 -0
  917. package/dist/modules/hospitality_core/screens/new-property.d.ts.map +1 -0
  918. package/dist/modules/hospitality_core/screens/new-property.js +8 -0
  919. package/dist/modules/hospitality_core/screens/new-property.js.map +1 -0
  920. package/dist/modules/hospitality_core/screens/new-room-type.d.ts +3 -0
  921. package/dist/modules/hospitality_core/screens/new-room-type.d.ts.map +1 -0
  922. package/dist/modules/hospitality_core/screens/new-room-type.js +8 -0
  923. package/dist/modules/hospitality_core/screens/new-room-type.js.map +1 -0
  924. package/dist/modules/hospitality_core/screens/new-room.d.ts +3 -0
  925. package/dist/modules/hospitality_core/screens/new-room.d.ts.map +1 -0
  926. package/dist/modules/hospitality_core/screens/new-room.js +8 -0
  927. package/dist/modules/hospitality_core/screens/new-room.js.map +1 -0
  928. package/dist/modules/hospitality_core/screens/night-audit.d.ts +10 -0
  929. package/dist/modules/hospitality_core/screens/night-audit.d.ts.map +1 -0
  930. package/dist/modules/hospitality_core/screens/night-audit.js +67 -0
  931. package/dist/modules/hospitality_core/screens/night-audit.js.map +1 -0
  932. package/dist/modules/hospitality_core/screens/page-frame.d.ts +15 -0
  933. package/dist/modules/hospitality_core/screens/page-frame.d.ts.map +1 -0
  934. package/dist/modules/hospitality_core/screens/page-frame.js +10 -0
  935. package/dist/modules/hospitality_core/screens/page-frame.js.map +1 -0
  936. package/dist/modules/hospitality_core/screens/policies.d.ts +10 -0
  937. package/dist/modules/hospitality_core/screens/policies.d.ts.map +1 -0
  938. package/dist/modules/hospitality_core/screens/policies.js +72 -0
  939. package/dist/modules/hospitality_core/screens/policies.js.map +1 -0
  940. package/dist/modules/hospitality_core/screens/properties.d.ts +7 -0
  941. package/dist/modules/hospitality_core/screens/properties.d.ts.map +1 -0
  942. package/dist/modules/hospitality_core/screens/properties.js +45 -0
  943. package/dist/modules/hospitality_core/screens/properties.js.map +1 -0
  944. package/dist/modules/hospitality_core/screens/property-detail.d.ts +3 -0
  945. package/dist/modules/hospitality_core/screens/property-detail.d.ts.map +1 -0
  946. package/dist/modules/hospitality_core/screens/property-detail.js +92 -0
  947. package/dist/modules/hospitality_core/screens/property-detail.js.map +1 -0
  948. package/dist/modules/hospitality_core/screens/rate-plans.d.ts +10 -0
  949. package/dist/modules/hospitality_core/screens/rate-plans.d.ts.map +1 -0
  950. package/dist/modules/hospitality_core/screens/rate-plans.js +123 -0
  951. package/dist/modules/hospitality_core/screens/rate-plans.js.map +1 -0
  952. package/dist/modules/hospitality_core/screens/reservation-detail.d.ts +11 -0
  953. package/dist/modules/hospitality_core/screens/reservation-detail.d.ts.map +1 -0
  954. package/dist/modules/hospitality_core/screens/reservation-detail.js +244 -0
  955. package/dist/modules/hospitality_core/screens/reservation-detail.js.map +1 -0
  956. package/dist/modules/hospitality_core/screens/reservations.d.ts +17 -0
  957. package/dist/modules/hospitality_core/screens/reservations.d.ts.map +1 -0
  958. package/dist/modules/hospitality_core/screens/reservations.js +166 -0
  959. package/dist/modules/hospitality_core/screens/reservations.js.map +1 -0
  960. package/dist/modules/hospitality_core/screens/room-detail.d.ts +3 -0
  961. package/dist/modules/hospitality_core/screens/room-detail.d.ts.map +1 -0
  962. package/dist/modules/hospitality_core/screens/room-detail.js +75 -0
  963. package/dist/modules/hospitality_core/screens/room-detail.js.map +1 -0
  964. package/dist/modules/hospitality_core/screens/room-type-detail.d.ts +3 -0
  965. package/dist/modules/hospitality_core/screens/room-type-detail.d.ts.map +1 -0
  966. package/dist/modules/hospitality_core/screens/room-type-detail.js +91 -0
  967. package/dist/modules/hospitality_core/screens/room-type-detail.js.map +1 -0
  968. package/dist/modules/hospitality_core/screens/room-types.d.ts +3 -0
  969. package/dist/modules/hospitality_core/screens/room-types.d.ts.map +1 -0
  970. package/dist/modules/hospitality_core/screens/room-types.js +61 -0
  971. package/dist/modules/hospitality_core/screens/room-types.js.map +1 -0
  972. package/dist/modules/hospitality_core/screens/rooms.d.ts +10 -0
  973. package/dist/modules/hospitality_core/screens/rooms.d.ts.map +1 -0
  974. package/dist/modules/hospitality_core/screens/rooms.js +150 -0
  975. package/dist/modules/hospitality_core/screens/rooms.js.map +1 -0
  976. package/dist/modules/hospitality_core/screens/services.d.ts +18 -0
  977. package/dist/modules/hospitality_core/screens/services.d.ts.map +1 -0
  978. package/dist/modules/hospitality_core/screens/services.js +196 -0
  979. package/dist/modules/hospitality_core/screens/services.js.map +1 -0
  980. package/dist/modules/hospitality_core/screens/shared.d.ts +789 -0
  981. package/dist/modules/hospitality_core/screens/shared.d.ts.map +1 -0
  982. package/dist/modules/hospitality_core/screens/shared.js +1607 -0
  983. package/dist/modules/hospitality_core/screens/shared.js.map +1 -0
  984. package/dist/modules/hospitality_core/screens/stay-detail.d.ts +3 -0
  985. package/dist/modules/hospitality_core/screens/stay-detail.d.ts.map +1 -0
  986. package/dist/modules/hospitality_core/screens/stay-detail.js +233 -0
  987. package/dist/modules/hospitality_core/screens/stay-detail.js.map +1 -0
  988. package/dist/modules/hospitality_core/screens/stay-notices.d.ts +9 -0
  989. package/dist/modules/hospitality_core/screens/stay-notices.d.ts.map +1 -0
  990. package/dist/modules/hospitality_core/screens/stay-notices.js +87 -0
  991. package/dist/modules/hospitality_core/screens/stay-notices.js.map +1 -0
  992. package/dist/modules/hospitality_core/screens/stays.d.ts +3 -0
  993. package/dist/modules/hospitality_core/screens/stays.d.ts.map +1 -0
  994. package/dist/modules/hospitality_core/screens/stays.js +7 -0
  995. package/dist/modules/hospitality_core/screens/stays.js.map +1 -0
  996. package/dist/modules/hospitality_core/screens/tape-chart.d.ts +7 -0
  997. package/dist/modules/hospitality_core/screens/tape-chart.d.ts.map +1 -0
  998. package/dist/modules/hospitality_core/screens/tape-chart.js +99 -0
  999. package/dist/modules/hospitality_core/screens/tape-chart.js.map +1 -0
  1000. package/dist/modules/hospitality_core/services.d.ts +48 -0
  1001. package/dist/modules/hospitality_core/services.d.ts.map +1 -1
  1002. package/dist/modules/hospitality_core/services.js +203 -30
  1003. package/dist/modules/hospitality_core/services.js.map +1 -1
  1004. package/dist/modules/hospitality_core/stay-notices.js +2 -2
  1005. package/dist/modules/hospitality_core/stay-notices.js.map +1 -1
  1006. package/dist/modules/hospitality_core/types.d.ts +26 -5
  1007. package/dist/modules/hospitality_core/types.d.ts.map +1 -1
  1008. package/dist/modules/hospitality_core/types.js +47 -5
  1009. package/dist/modules/hospitality_core/types.js.map +1 -1
  1010. package/dist/modules/hospitality_staff_channel/channel-routes.d.ts +2 -0
  1011. package/dist/modules/hospitality_staff_channel/channel-routes.d.ts.map +1 -0
  1012. package/dist/modules/hospitality_staff_channel/channel-routes.js +1216 -0
  1013. package/dist/modules/hospitality_staff_channel/channel-routes.js.map +1 -0
  1014. package/dist/modules/hospitality_staff_channel/index.d.ts +5 -0
  1015. package/dist/modules/hospitality_staff_channel/index.d.ts.map +1 -0
  1016. package/dist/modules/hospitality_staff_channel/index.js +34 -0
  1017. package/dist/modules/hospitality_staff_channel/index.js.map +1 -0
  1018. package/dist/modules/hr/functions.d.ts.map +1 -1
  1019. package/dist/modules/hr/functions.js +108 -44
  1020. package/dist/modules/hr/functions.js.map +1 -1
  1021. package/dist/modules/hr/index.d.ts.map +1 -1
  1022. package/dist/modules/hr/index.js +0 -1
  1023. package/dist/modules/hr/index.js.map +1 -1
  1024. package/dist/modules/hr_backend/index.d.ts +2 -1
  1025. package/dist/modules/hr_backend/index.d.ts.map +1 -1
  1026. package/dist/modules/hr_backend/index.js +39 -7
  1027. package/dist/modules/hr_backend/index.js.map +1 -1
  1028. package/dist/modules/hr_backend/routes.d.ts.map +1 -1
  1029. package/dist/modules/hr_backend/routes.js +279 -42
  1030. package/dist/modules/hr_backend/routes.js.map +1 -1
  1031. package/dist/modules/hr_backend/screens/employee-form.d.ts +28 -0
  1032. package/dist/modules/hr_backend/screens/employee-form.d.ts.map +1 -0
  1033. package/dist/modules/hr_backend/screens/employee-form.js +110 -0
  1034. package/dist/modules/hr_backend/screens/employee-form.js.map +1 -0
  1035. package/dist/modules/hr_backend/screens/employees-list.d.ts +22 -0
  1036. package/dist/modules/hr_backend/screens/employees-list.d.ts.map +1 -0
  1037. package/dist/modules/hr_backend/screens/employees-list.js +53 -0
  1038. package/dist/modules/hr_backend/screens/employees-list.js.map +1 -0
  1039. package/dist/modules/hr_backend/screens/index.d.ts +5 -0
  1040. package/dist/modules/hr_backend/screens/index.d.ts.map +1 -0
  1041. package/dist/modules/hr_backend/screens/index.js +5 -0
  1042. package/dist/modules/hr_backend/screens/index.js.map +1 -0
  1043. package/dist/modules/hr_backend/screens/leaves-list.d.ts +22 -0
  1044. package/dist/modules/hr_backend/screens/leaves-list.d.ts.map +1 -0
  1045. package/dist/modules/hr_backend/screens/leaves-list.js +78 -0
  1046. package/dist/modules/hr_backend/screens/leaves-list.js.map +1 -0
  1047. package/dist/modules/hr_backend/screens/roster.d.ts +19 -0
  1048. package/dist/modules/hr_backend/screens/roster.d.ts.map +1 -0
  1049. package/dist/modules/hr_backend/screens/roster.js +83 -0
  1050. package/dist/modules/hr_backend/screens/roster.js.map +1 -0
  1051. package/dist/modules/inventory_staff_channel/channel-routes.d.ts +2 -0
  1052. package/dist/modules/inventory_staff_channel/channel-routes.d.ts.map +1 -0
  1053. package/dist/modules/inventory_staff_channel/channel-routes.js +713 -0
  1054. package/dist/modules/inventory_staff_channel/channel-routes.js.map +1 -0
  1055. package/dist/modules/inventory_staff_channel/index.d.ts +5 -0
  1056. package/dist/modules/inventory_staff_channel/index.d.ts.map +1 -0
  1057. package/dist/modules/inventory_staff_channel/index.js +38 -0
  1058. package/dist/modules/inventory_staff_channel/index.js.map +1 -0
  1059. package/dist/modules/livedoc/documents.d.ts +48 -0
  1060. package/dist/modules/livedoc/documents.d.ts.map +1 -0
  1061. package/dist/modules/livedoc/documents.js +99 -0
  1062. package/dist/modules/livedoc/documents.js.map +1 -0
  1063. package/dist/modules/livedoc/functions.d.ts +3 -0
  1064. package/dist/modules/livedoc/functions.d.ts.map +1 -0
  1065. package/dist/modules/livedoc/functions.js +47 -0
  1066. package/dist/modules/livedoc/functions.js.map +1 -0
  1067. package/dist/modules/livedoc/index.d.ts +22 -0
  1068. package/dist/modules/livedoc/index.d.ts.map +1 -0
  1069. package/dist/modules/livedoc/index.js +37 -0
  1070. package/dist/modules/livedoc/index.js.map +1 -0
  1071. package/dist/modules/livedoc/islands.d.ts +3 -0
  1072. package/dist/modules/livedoc/islands.d.ts.map +1 -0
  1073. package/dist/modules/livedoc/islands.js +22 -0
  1074. package/dist/modules/livedoc/islands.js.map +1 -0
  1075. package/dist/modules/livedoc/routes.d.ts +11 -0
  1076. package/dist/modules/livedoc/routes.d.ts.map +1 -0
  1077. package/dist/modules/livedoc/routes.js +232 -0
  1078. package/dist/modules/livedoc/routes.js.map +1 -0
  1079. package/dist/modules/livedoc/sync.d.ts +124 -0
  1080. package/dist/modules/livedoc/sync.d.ts.map +1 -0
  1081. package/dist/modules/livedoc/sync.js +218 -0
  1082. package/dist/modules/livedoc/sync.js.map +1 -0
  1083. package/dist/modules/loyalty/admin-functions.d.ts.map +1 -1
  1084. package/dist/modules/loyalty/admin-functions.js +42 -6
  1085. package/dist/modules/loyalty/admin-functions.js.map +1 -1
  1086. package/dist/modules/loyalty/engine.d.ts +1 -0
  1087. package/dist/modules/loyalty/engine.d.ts.map +1 -1
  1088. package/dist/modules/loyalty/engine.js +88 -28
  1089. package/dist/modules/loyalty/engine.js.map +1 -1
  1090. package/dist/modules/loyalty/index.d.ts.map +1 -1
  1091. package/dist/modules/loyalty/index.js +10 -2
  1092. package/dist/modules/loyalty/index.js.map +1 -1
  1093. package/dist/modules/loyalty/ledger.d.ts.map +1 -1
  1094. package/dist/modules/loyalty/ledger.js +11 -0
  1095. package/dist/modules/loyalty/ledger.js.map +1 -1
  1096. package/dist/modules/loyalty/membership-functions.d.ts.map +1 -1
  1097. package/dist/modules/loyalty/membership-functions.js +23 -7
  1098. package/dist/modules/loyalty/membership-functions.js.map +1 -1
  1099. package/dist/modules/loyalty/messages.d.ts +8 -0
  1100. package/dist/modules/loyalty/messages.d.ts.map +1 -1
  1101. package/dist/modules/loyalty/messages.js +8 -0
  1102. package/dist/modules/loyalty/messages.js.map +1 -1
  1103. package/dist/modules/loyalty/models.d.ts.map +1 -1
  1104. package/dist/modules/loyalty/models.js +20 -0
  1105. package/dist/modules/loyalty/models.js.map +1 -1
  1106. package/dist/modules/loyalty/order-functions.d.ts +16 -1
  1107. package/dist/modules/loyalty/order-functions.d.ts.map +1 -1
  1108. package/dist/modules/loyalty/order-functions.js +513 -291
  1109. package/dist/modules/loyalty/order-functions.js.map +1 -1
  1110. package/dist/modules/loyalty/stats.d.ts +17 -0
  1111. package/dist/modules/loyalty/stats.d.ts.map +1 -0
  1112. package/dist/modules/loyalty/stats.js +178 -0
  1113. package/dist/modules/loyalty/stats.js.map +1 -0
  1114. package/dist/modules/loyalty/stored-value.d.ts +42 -0
  1115. package/dist/modules/loyalty/stored-value.d.ts.map +1 -0
  1116. package/dist/modules/loyalty/stored-value.js +368 -0
  1117. package/dist/modules/loyalty/stored-value.js.map +1 -0
  1118. package/dist/modules/loyalty/types.d.ts +6 -4
  1119. package/dist/modules/loyalty/types.d.ts.map +1 -1
  1120. package/dist/modules/loyalty/types.js +1 -1
  1121. package/dist/modules/loyalty/types.js.map +1 -1
  1122. package/dist/modules/loyalty_backend/index.js +443 -172
  1123. package/dist/modules/loyalty_backend/index.js.map +1 -1
  1124. package/dist/modules/loyalty_backend/messages.d.ts +58 -1
  1125. package/dist/modules/loyalty_backend/messages.d.ts.map +1 -1
  1126. package/dist/modules/loyalty_backend/messages.js +114 -0
  1127. package/dist/modules/loyalty_backend/messages.js.map +1 -1
  1128. package/dist/modules/loyalty_backend/screens/index.d.ts +90 -0
  1129. package/dist/modules/loyalty_backend/screens/index.d.ts.map +1 -0
  1130. package/dist/modules/loyalty_backend/screens/index.js +912 -0
  1131. package/dist/modules/loyalty_backend/screens/index.js.map +1 -0
  1132. package/dist/modules/loyalty_backend/screens/page-frame.d.ts +14 -0
  1133. package/dist/modules/loyalty_backend/screens/page-frame.d.ts.map +1 -0
  1134. package/dist/modules/loyalty_backend/screens/page-frame.js +13 -0
  1135. package/dist/modules/loyalty_backend/screens/page-frame.js.map +1 -0
  1136. package/dist/modules/loyalty_pos/channel.d.ts +2 -0
  1137. package/dist/modules/loyalty_pos/channel.d.ts.map +1 -0
  1138. package/dist/modules/loyalty_pos/channel.js +270 -0
  1139. package/dist/modules/loyalty_pos/channel.js.map +1 -0
  1140. package/dist/modules/loyalty_pos/functions.d.ts +11 -17
  1141. package/dist/modules/loyalty_pos/functions.d.ts.map +1 -1
  1142. package/dist/modules/loyalty_pos/functions.js +454 -94
  1143. package/dist/modules/loyalty_pos/functions.js.map +1 -1
  1144. package/dist/modules/loyalty_pos/index.js +6 -16
  1145. package/dist/modules/loyalty_pos/index.js.map +1 -1
  1146. package/dist/modules/loyalty_pos/jobs.d.ts +3 -0
  1147. package/dist/modules/loyalty_pos/jobs.d.ts.map +1 -0
  1148. package/dist/modules/loyalty_pos/jobs.js +30 -0
  1149. package/dist/modules/loyalty_pos/jobs.js.map +1 -0
  1150. package/dist/modules/loyalty_sale/functions.d.ts +2 -2
  1151. package/dist/modules/loyalty_sale/functions.d.ts.map +1 -1
  1152. package/dist/modules/loyalty_sale/functions.js +53 -34
  1153. package/dist/modules/loyalty_sale/functions.js.map +1 -1
  1154. package/dist/modules/loyalty_sale/index.js +0 -2
  1155. package/dist/modules/loyalty_sale/index.js.map +1 -1
  1156. package/dist/modules/mail/functions.d.ts.map +1 -1
  1157. package/dist/modules/mail/functions.js +48 -6
  1158. package/dist/modules/mail/functions.js.map +1 -1
  1159. package/dist/modules/mail/index.d.ts.map +1 -1
  1160. package/dist/modules/mail/index.js +0 -1
  1161. package/dist/modules/mail/index.js.map +1 -1
  1162. package/dist/modules/mail/operations.d.ts +19 -0
  1163. package/dist/modules/mail/operations.d.ts.map +1 -1
  1164. package/dist/modules/mail/operations.js +69 -0
  1165. package/dist/modules/mail/operations.js.map +1 -1
  1166. package/dist/modules/mail_backend/index.d.ts +1 -1
  1167. package/dist/modules/mail_backend/index.d.ts.map +1 -1
  1168. package/dist/modules/mail_backend/index.js +5 -14
  1169. package/dist/modules/mail_backend/index.js.map +1 -1
  1170. package/dist/modules/mail_backend/islands.js +2 -2
  1171. package/dist/modules/mail_backend/islands.js.map +1 -1
  1172. package/dist/modules/mail_backend/routes.d.ts.map +1 -1
  1173. package/dist/modules/mail_backend/routes.js +25 -20
  1174. package/dist/modules/mail_backend/routes.js.map +1 -1
  1175. package/dist/modules/mail_backend/screens/inbox-list.d.ts +9 -0
  1176. package/dist/modules/mail_backend/screens/inbox-list.d.ts.map +1 -0
  1177. package/dist/modules/mail_backend/screens/inbox-list.js +13 -0
  1178. package/dist/modules/mail_backend/screens/inbox-list.js.map +1 -0
  1179. package/dist/modules/mail_backend/screens/index.d.ts +3 -0
  1180. package/dist/modules/mail_backend/screens/index.d.ts.map +1 -0
  1181. package/dist/modules/mail_backend/screens/index.js +2 -0
  1182. package/dist/modules/mail_backend/screens/index.js.map +1 -0
  1183. package/dist/modules/mail_inbound/index.d.ts.map +1 -1
  1184. package/dist/modules/mail_inbound/index.js +0 -1
  1185. package/dist/modules/mail_inbound/index.js.map +1 -1
  1186. package/dist/modules/mail_inbound_backend/index.d.ts +1 -1
  1187. package/dist/modules/mail_inbound_backend/index.d.ts.map +1 -1
  1188. package/dist/modules/mail_inbound_backend/index.js +3 -12
  1189. package/dist/modules/mail_inbound_backend/index.js.map +1 -1
  1190. package/dist/modules/mail_inbound_backend/routes.d.ts.map +1 -1
  1191. package/dist/modules/mail_inbound_backend/routes.js +6 -21
  1192. package/dist/modules/mail_inbound_backend/routes.js.map +1 -1
  1193. package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts +8 -0
  1194. package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts.map +1 -0
  1195. package/dist/modules/mail_inbound_backend/screens/inbound-list.js +20 -0
  1196. package/dist/modules/mail_inbound_backend/screens/inbound-list.js.map +1 -0
  1197. package/dist/modules/mail_inbound_backend/screens/index.d.ts +3 -0
  1198. package/dist/modules/mail_inbound_backend/screens/index.d.ts.map +1 -0
  1199. package/dist/modules/mail_inbound_backend/screens/index.js +2 -0
  1200. package/dist/modules/mail_inbound_backend/screens/index.js.map +1 -0
  1201. package/dist/modules/mail_staff_channel/channel-routes.d.ts +2 -0
  1202. package/dist/modules/mail_staff_channel/channel-routes.d.ts.map +1 -0
  1203. package/dist/modules/mail_staff_channel/channel-routes.js +183 -0
  1204. package/dist/modules/mail_staff_channel/channel-routes.js.map +1 -0
  1205. package/dist/modules/mail_staff_channel/index.d.ts +5 -0
  1206. package/dist/modules/mail_staff_channel/index.d.ts.map +1 -0
  1207. package/dist/modules/mail_staff_channel/index.js +28 -0
  1208. package/dist/modules/mail_staff_channel/index.js.map +1 -0
  1209. package/dist/modules/mail_transport/index.d.ts.map +1 -1
  1210. package/dist/modules/mail_transport/index.js +0 -1
  1211. package/dist/modules/mail_transport/index.js.map +1 -1
  1212. package/dist/modules/mail_transport_backend/index.d.ts +1 -1
  1213. package/dist/modules/mail_transport_backend/index.d.ts.map +1 -1
  1214. package/dist/modules/mail_transport_backend/index.js +3 -12
  1215. package/dist/modules/mail_transport_backend/index.js.map +1 -1
  1216. package/dist/modules/mail_transport_backend/routes.d.ts.map +1 -1
  1217. package/dist/modules/mail_transport_backend/routes.js +23 -22
  1218. package/dist/modules/mail_transport_backend/routes.js.map +1 -1
  1219. package/dist/modules/mail_transport_backend/screens/index.d.ts +3 -0
  1220. package/dist/modules/mail_transport_backend/screens/index.d.ts.map +1 -0
  1221. package/dist/modules/mail_transport_backend/screens/index.js +2 -0
  1222. package/dist/modules/mail_transport_backend/screens/index.js.map +1 -0
  1223. package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts +9 -0
  1224. package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts.map +1 -0
  1225. package/dist/modules/mail_transport_backend/screens/outbox-list.js +29 -0
  1226. package/dist/modules/mail_transport_backend/screens/outbox-list.js.map +1 -0
  1227. package/dist/modules/manufacturing/functions.d.ts +3 -0
  1228. package/dist/modules/manufacturing/functions.d.ts.map +1 -0
  1229. package/dist/modules/manufacturing/functions.js +912 -0
  1230. package/dist/modules/manufacturing/functions.js.map +1 -0
  1231. package/dist/modules/manufacturing/index.d.ts +6 -0
  1232. package/dist/modules/manufacturing/index.d.ts.map +1 -0
  1233. package/dist/modules/manufacturing/index.js +42 -0
  1234. package/dist/modules/manufacturing/index.js.map +1 -0
  1235. package/dist/modules/manufacturing/models.d.ts +8 -0
  1236. package/dist/modules/manufacturing/models.d.ts.map +1 -0
  1237. package/dist/modules/manufacturing/models.js +145 -0
  1238. package/dist/modules/manufacturing/models.js.map +1 -0
  1239. package/dist/modules/manufacturing/relations.d.ts.map +1 -0
  1240. package/dist/modules/manufacturing/relations.js +37 -0
  1241. package/dist/modules/manufacturing/relations.js.map +1 -0
  1242. package/dist/modules/manufacturing/types.d.ts +7 -0
  1243. package/dist/modules/manufacturing/types.d.ts.map +1 -0
  1244. package/dist/modules/manufacturing/types.js +11 -0
  1245. package/dist/modules/manufacturing/types.js.map +1 -0
  1246. package/dist/modules/manufacturing_backend/index.d.ts +5 -0
  1247. package/dist/modules/manufacturing_backend/index.d.ts.map +1 -0
  1248. package/dist/modules/manufacturing_backend/index.js +146 -0
  1249. package/dist/modules/manufacturing_backend/index.js.map +1 -0
  1250. package/dist/modules/manufacturing_backend/routes.d.ts +3 -0
  1251. package/dist/modules/manufacturing_backend/routes.d.ts.map +1 -0
  1252. package/dist/modules/manufacturing_backend/routes.js +477 -0
  1253. package/dist/modules/manufacturing_backend/routes.js.map +1 -0
  1254. package/dist/modules/manufacturing_backend/screens/bom-create.d.ts +15 -0
  1255. package/dist/modules/manufacturing_backend/screens/bom-create.d.ts.map +1 -0
  1256. package/dist/modules/manufacturing_backend/screens/bom-create.js +39 -0
  1257. package/dist/modules/manufacturing_backend/screens/bom-create.js.map +1 -0
  1258. package/dist/modules/manufacturing_backend/screens/boms-list.d.ts +18 -0
  1259. package/dist/modules/manufacturing_backend/screens/boms-list.d.ts.map +1 -0
  1260. package/dist/modules/manufacturing_backend/screens/boms-list.js +36 -0
  1261. package/dist/modules/manufacturing_backend/screens/boms-list.js.map +1 -0
  1262. package/dist/modules/manufacturing_backend/screens/index.d.ts +8 -0
  1263. package/dist/modules/manufacturing_backend/screens/index.d.ts.map +1 -0
  1264. package/dist/modules/manufacturing_backend/screens/index.js +8 -0
  1265. package/dist/modules/manufacturing_backend/screens/index.js.map +1 -0
  1266. package/dist/modules/manufacturing_backend/screens/order-create.d.ts +13 -0
  1267. package/dist/modules/manufacturing_backend/screens/order-create.d.ts.map +1 -0
  1268. package/dist/modules/manufacturing_backend/screens/order-create.js +20 -0
  1269. package/dist/modules/manufacturing_backend/screens/order-create.js.map +1 -0
  1270. package/dist/modules/manufacturing_backend/screens/order-execution.d.ts +7 -0
  1271. package/dist/modules/manufacturing_backend/screens/order-execution.d.ts.map +1 -0
  1272. package/dist/modules/manufacturing_backend/screens/order-execution.js +129 -0
  1273. package/dist/modules/manufacturing_backend/screens/order-execution.js.map +1 -0
  1274. package/dist/modules/manufacturing_backend/screens/orders-list.d.ts +21 -0
  1275. package/dist/modules/manufacturing_backend/screens/orders-list.d.ts.map +1 -0
  1276. package/dist/modules/manufacturing_backend/screens/orders-list.js +49 -0
  1277. package/dist/modules/manufacturing_backend/screens/orders-list.js.map +1 -0
  1278. package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts +24 -0
  1279. package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts.map +1 -0
  1280. package/dist/modules/manufacturing_backend/screens/work-center-form.js +80 -0
  1281. package/dist/modules/manufacturing_backend/screens/work-center-form.js.map +1 -0
  1282. package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts +23 -0
  1283. package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts.map +1 -0
  1284. package/dist/modules/manufacturing_backend/screens/work-centers-list.js +61 -0
  1285. package/dist/modules/manufacturing_backend/screens/work-centers-list.js.map +1 -0
  1286. package/dist/modules/oauth/index.d.ts.map +1 -1
  1287. package/dist/modules/oauth/index.js +0 -1
  1288. package/dist/modules/oauth/index.js.map +1 -1
  1289. package/dist/modules/oauth/models.d.ts.map +1 -1
  1290. package/dist/modules/oauth/models.js +2 -1
  1291. package/dist/modules/oauth/models.js.map +1 -1
  1292. package/dist/modules/oauth_backend/index.d.ts +1 -1
  1293. package/dist/modules/oauth_backend/index.d.ts.map +1 -1
  1294. package/dist/modules/oauth_backend/index.js +3 -5
  1295. package/dist/modules/oauth_backend/index.js.map +1 -1
  1296. package/dist/modules/oauth_backend/messages.d.ts +4 -0
  1297. package/dist/modules/oauth_backend/messages.d.ts.map +1 -1
  1298. package/dist/modules/oauth_backend/messages.js +4 -0
  1299. package/dist/modules/oauth_backend/messages.js.map +1 -1
  1300. package/dist/modules/oauth_backend/routes.d.ts.map +1 -1
  1301. package/dist/modules/oauth_backend/routes.js +28 -30
  1302. package/dist/modules/oauth_backend/routes.js.map +1 -1
  1303. package/dist/modules/oauth_backend/screens/index.d.ts +66 -0
  1304. package/dist/modules/oauth_backend/screens/index.d.ts.map +1 -0
  1305. package/dist/modules/oauth_backend/screens/index.js +306 -0
  1306. package/dist/modules/oauth_backend/screens/index.js.map +1 -0
  1307. package/dist/modules/partner/functions.d.ts.map +1 -1
  1308. package/dist/modules/partner/functions.js +74 -6
  1309. package/dist/modules/partner/functions.js.map +1 -1
  1310. package/dist/modules/partner/index.d.ts.map +1 -1
  1311. package/dist/modules/partner/index.js +0 -1
  1312. package/dist/modules/partner/index.js.map +1 -1
  1313. package/dist/modules/partner/models.d.ts +4 -4
  1314. package/dist/modules/partner/models.d.ts.map +1 -1
  1315. package/dist/modules/partner/models.js +9 -7
  1316. package/dist/modules/partner/models.js.map +1 -1
  1317. package/dist/modules/partner/types.d.ts +2 -2
  1318. package/dist/modules/partner/types.js +2 -2
  1319. package/dist/modules/partner_backend/client/address-view.mjs +5 -5
  1320. package/dist/modules/partner_backend/client/address-view.mjs.map +1 -1
  1321. package/dist/modules/partner_backend/client/address.css +22 -10
  1322. package/dist/modules/partner_backend/client/partner.css +116 -0
  1323. package/dist/modules/partner_backend/index.d.ts +1 -1
  1324. package/dist/modules/partner_backend/index.d.ts.map +1 -1
  1325. package/dist/modules/partner_backend/index.js +34 -4
  1326. package/dist/modules/partner_backend/index.js.map +1 -1
  1327. package/dist/modules/partner_backend/menus.js +2 -2
  1328. package/dist/modules/partner_backend/menus.js.map +1 -1
  1329. package/dist/modules/partner_backend/routes.d.ts +3 -1
  1330. package/dist/modules/partner_backend/routes.d.ts.map +1 -1
  1331. package/dist/modules/partner_backend/routes.js +236 -91
  1332. package/dist/modules/partner_backend/routes.js.map +1 -1
  1333. package/dist/modules/partner_backend/screens/form.d.ts +21 -0
  1334. package/dist/modules/partner_backend/screens/form.d.ts.map +1 -0
  1335. package/dist/modules/partner_backend/screens/form.js +101 -0
  1336. package/dist/modules/partner_backend/screens/form.js.map +1 -0
  1337. package/dist/modules/partner_backend/screens/index.d.ts +5 -0
  1338. package/dist/modules/partner_backend/screens/index.d.ts.map +1 -0
  1339. package/dist/modules/partner_backend/screens/index.js +4 -0
  1340. package/dist/modules/partner_backend/screens/index.js.map +1 -0
  1341. package/dist/modules/partner_backend/screens/list.d.ts +6 -0
  1342. package/dist/modules/partner_backend/screens/list.d.ts.map +1 -0
  1343. package/dist/modules/partner_backend/screens/list.js +94 -0
  1344. package/dist/modules/partner_backend/screens/list.js.map +1 -0
  1345. package/dist/modules/partner_backend/screens/new.d.ts +5 -0
  1346. package/dist/modules/partner_backend/screens/new.d.ts.map +1 -0
  1347. package/dist/modules/partner_backend/screens/new.js +58 -0
  1348. package/dist/modules/partner_backend/screens/new.js.map +1 -0
  1349. package/dist/modules/partner_backend/screens/types.d.ts +44 -0
  1350. package/dist/modules/partner_backend/screens/types.d.ts.map +1 -0
  1351. package/dist/modules/partner_backend/screens/types.js +2 -0
  1352. package/dist/modules/partner_backend/screens/types.js.map +1 -0
  1353. package/dist/modules/partner_mail_backend/index.d.ts +5 -0
  1354. package/dist/modules/partner_mail_backend/index.d.ts.map +1 -0
  1355. package/dist/modules/partner_mail_backend/index.js +29 -0
  1356. package/dist/modules/partner_mail_backend/index.js.map +1 -0
  1357. package/dist/modules/pos/functions.d.ts +18 -2
  1358. package/dist/modules/pos/functions.d.ts.map +1 -1
  1359. package/dist/modules/pos/functions.js +3279 -345
  1360. package/dist/modules/pos/functions.js.map +1 -1
  1361. package/dist/modules/pos/index.d.ts +2 -1
  1362. package/dist/modules/pos/index.d.ts.map +1 -1
  1363. package/dist/modules/pos/index.js +5 -5
  1364. package/dist/modules/pos/index.js.map +1 -1
  1365. package/dist/modules/pos/models.d.ts.map +1 -1
  1366. package/dist/modules/pos/models.js +189 -1
  1367. package/dist/modules/pos/models.js.map +1 -1
  1368. package/dist/modules/pos/relations.d.ts.map +1 -1
  1369. package/dist/modules/pos/relations.js +11 -0
  1370. package/dist/modules/pos/relations.js.map +1 -1
  1371. package/dist/modules/pos_backend/index.js +182 -154
  1372. package/dist/modules/pos_backend/index.js.map +1 -1
  1373. package/dist/modules/pos_backend/screens.d.ts +1 -0
  1374. package/dist/modules/pos_backend/screens.d.ts.map +1 -1
  1375. package/dist/modules/pos_backend/screens.js +28 -38
  1376. package/dist/modules/pos_backend/screens.js.map +1 -1
  1377. package/dist/modules/pos_channel/catalog.d.ts +27 -0
  1378. package/dist/modules/pos_channel/catalog.d.ts.map +1 -0
  1379. package/dist/modules/pos_channel/catalog.js +310 -0
  1380. package/dist/modules/pos_channel/catalog.js.map +1 -0
  1381. package/dist/modules/pos_channel/index.d.ts +7 -0
  1382. package/dist/modules/pos_channel/index.d.ts.map +1 -0
  1383. package/dist/modules/pos_channel/index.js +61 -0
  1384. package/dist/modules/pos_channel/index.js.map +1 -0
  1385. package/dist/modules/pos_channel/offline.d.ts +66 -0
  1386. package/dist/modules/pos_channel/offline.d.ts.map +1 -0
  1387. package/dist/modules/pos_channel/offline.js +16 -0
  1388. package/dist/modules/pos_channel/offline.js.map +1 -0
  1389. package/dist/modules/pos_channel/operations.d.ts +422 -0
  1390. package/dist/modules/pos_channel/operations.d.ts.map +1 -0
  1391. package/dist/modules/pos_channel/operations.js +1781 -0
  1392. package/dist/modules/pos_channel/operations.js.map +1 -0
  1393. package/dist/modules/pos_channel/sync.d.ts +6 -0
  1394. package/dist/modules/pos_channel/sync.d.ts.map +1 -0
  1395. package/dist/modules/pos_channel/sync.js +1161 -0
  1396. package/dist/modules/pos_channel/sync.js.map +1 -0
  1397. package/dist/modules/pricing/index.d.ts.map +1 -1
  1398. package/dist/modules/pricing/index.js +3 -4
  1399. package/dist/modules/pricing/index.js.map +1 -1
  1400. package/dist/modules/pricing_backend/index.js +135 -78
  1401. package/dist/modules/pricing_backend/index.js.map +1 -1
  1402. package/dist/modules/pricing_backend/screens/index.d.ts +5 -0
  1403. package/dist/modules/pricing_backend/screens/index.d.ts.map +1 -0
  1404. package/dist/modules/pricing_backend/screens/index.js +4 -0
  1405. package/dist/modules/pricing_backend/screens/index.js.map +1 -0
  1406. package/dist/modules/pricing_backend/screens/pricelist-create.d.ts +10 -0
  1407. package/dist/modules/pricing_backend/screens/pricelist-create.d.ts.map +1 -0
  1408. package/dist/modules/pricing_backend/screens/pricelist-create.js +30 -0
  1409. package/dist/modules/pricing_backend/screens/pricelist-create.js.map +1 -0
  1410. package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts +15 -0
  1411. package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts.map +1 -0
  1412. package/dist/modules/pricing_backend/screens/pricelist-detail.js +164 -0
  1413. package/dist/modules/pricing_backend/screens/pricelist-detail.js.map +1 -0
  1414. package/dist/modules/pricing_backend/screens/pricelists-list.d.ts +11 -0
  1415. package/dist/modules/pricing_backend/screens/pricelists-list.d.ts.map +1 -0
  1416. package/dist/modules/pricing_backend/screens/pricelists-list.js +27 -0
  1417. package/dist/modules/pricing_backend/screens/pricelists-list.js.map +1 -0
  1418. package/dist/modules/pricing_backend/screens/shared.d.ts +21 -0
  1419. package/dist/modules/pricing_backend/screens/shared.d.ts.map +1 -0
  1420. package/dist/modules/pricing_backend/screens/shared.js +3 -0
  1421. package/dist/modules/pricing_backend/screens/shared.js.map +1 -0
  1422. package/dist/modules/product/functions.d.ts.map +1 -1
  1423. package/dist/modules/product/functions.js +679 -50
  1424. package/dist/modules/product/functions.js.map +1 -1
  1425. package/dist/modules/product/index.d.ts +2 -0
  1426. package/dist/modules/product/index.d.ts.map +1 -1
  1427. package/dist/modules/product/index.js +2 -2
  1428. package/dist/modules/product/index.js.map +1 -1
  1429. package/dist/modules/product/models.d.ts +1 -1
  1430. package/dist/modules/product/models.d.ts.map +1 -1
  1431. package/dist/modules/product/models.js +27 -4
  1432. package/dist/modules/product/models.js.map +1 -1
  1433. package/dist/modules/product/relations.d.ts.map +1 -1
  1434. package/dist/modules/product/relations.js +4 -0
  1435. package/dist/modules/product/relations.js.map +1 -1
  1436. package/dist/modules/product/sellable.d.ts +26 -0
  1437. package/dist/modules/product/sellable.d.ts.map +1 -0
  1438. package/dist/modules/product/sellable.js +56 -0
  1439. package/dist/modules/product/sellable.js.map +1 -0
  1440. package/dist/modules/product/types.d.ts +2 -2
  1441. package/dist/modules/product/views.d.ts.map +1 -1
  1442. package/dist/modules/product/views.js +5 -1
  1443. package/dist/modules/product/views.js.map +1 -1
  1444. package/dist/modules/product_activity_backend/index.d.ts.map +1 -1
  1445. package/dist/modules/product_activity_backend/index.js +2 -3
  1446. package/dist/modules/product_activity_backend/index.js.map +1 -1
  1447. package/dist/modules/product_backend/client/media-upload-view.d.mts.map +1 -1
  1448. package/dist/modules/product_backend/client/media-upload-view.mjs +1 -0
  1449. package/dist/modules/product_backend/client/media-upload-view.mjs.map +1 -1
  1450. package/dist/modules/product_backend/client/product.css +964 -0
  1451. package/dist/modules/product_backend/index.d.ts +5 -6
  1452. package/dist/modules/product_backend/index.d.ts.map +1 -1
  1453. package/dist/modules/product_backend/index.js +203 -14
  1454. package/dist/modules/product_backend/index.js.map +1 -1
  1455. package/dist/modules/product_backend/menus.js +2 -2
  1456. package/dist/modules/product_backend/menus.js.map +1 -1
  1457. package/dist/modules/product_backend/relation-control.d.ts +85 -0
  1458. package/dist/modules/product_backend/relation-control.d.ts.map +1 -0
  1459. package/dist/modules/product_backend/relation-control.js +129 -0
  1460. package/dist/modules/product_backend/relation-control.js.map +1 -0
  1461. package/dist/modules/product_backend/routes.d.ts.map +1 -1
  1462. package/dist/modules/product_backend/routes.js +502 -196
  1463. package/dist/modules/product_backend/routes.js.map +1 -1
  1464. package/dist/modules/product_backend/screens/attributes.d.ts +7 -0
  1465. package/dist/modules/product_backend/screens/attributes.d.ts.map +1 -0
  1466. package/dist/modules/product_backend/screens/attributes.js +66 -0
  1467. package/dist/modules/product_backend/screens/attributes.js.map +1 -0
  1468. package/dist/modules/product_backend/screens/create.d.ts +16 -0
  1469. package/dist/modules/product_backend/screens/create.d.ts.map +1 -0
  1470. package/dist/modules/product_backend/screens/create.js +86 -0
  1471. package/dist/modules/product_backend/screens/create.js.map +1 -0
  1472. package/dist/modules/product_backend/screens/detail.d.ts +87 -0
  1473. package/dist/modules/product_backend/screens/detail.d.ts.map +1 -0
  1474. package/dist/modules/product_backend/screens/detail.js +381 -0
  1475. package/dist/modules/product_backend/screens/detail.js.map +1 -0
  1476. package/dist/modules/product_backend/screens/favorite.d.ts +6 -0
  1477. package/dist/modules/product_backend/screens/favorite.d.ts.map +1 -0
  1478. package/dist/modules/product_backend/screens/favorite.js +43 -0
  1479. package/dist/modules/product_backend/screens/favorite.js.map +1 -0
  1480. package/dist/modules/product_backend/screens/index.d.ts +10 -0
  1481. package/dist/modules/product_backend/screens/index.d.ts.map +1 -0
  1482. package/dist/modules/product_backend/screens/index.js +7 -0
  1483. package/dist/modules/product_backend/screens/index.js.map +1 -0
  1484. package/dist/modules/product_backend/screens/list.d.ts +54 -0
  1485. package/dist/modules/product_backend/screens/list.d.ts.map +1 -0
  1486. package/dist/modules/product_backend/screens/list.js +124 -0
  1487. package/dist/modules/product_backend/screens/list.js.map +1 -0
  1488. package/dist/modules/product_backend/screens/variant.d.ts +9 -0
  1489. package/dist/modules/product_backend/screens/variant.d.ts.map +1 -0
  1490. package/dist/modules/product_backend/screens/variant.js +113 -0
  1491. package/dist/modules/product_backend/screens/variant.js.map +1 -0
  1492. package/dist/modules/product_mail_backend/index.d.ts.map +1 -1
  1493. package/dist/modules/product_mail_backend/index.js +2 -3
  1494. package/dist/modules/product_mail_backend/index.js.map +1 -1
  1495. package/dist/modules/product_media/functions.d.ts.map +1 -1
  1496. package/dist/modules/product_media/functions.js +59 -6
  1497. package/dist/modules/product_media/functions.js.map +1 -1
  1498. package/dist/modules/product_media/index.js +0 -1
  1499. package/dist/modules/product_media/index.js.map +1 -1
  1500. package/dist/modules/product_variant_activity_backend/index.d.ts.map +1 -1
  1501. package/dist/modules/product_variant_activity_backend/index.js +2 -3
  1502. package/dist/modules/product_variant_activity_backend/index.js.map +1 -1
  1503. package/dist/modules/product_variant_mail_backend/index.d.ts.map +1 -1
  1504. package/dist/modules/product_variant_mail_backend/index.js +2 -3
  1505. package/dist/modules/product_variant_mail_backend/index.js.map +1 -1
  1506. package/dist/modules/purchase/functions.d.ts.map +1 -1
  1507. package/dist/modules/purchase/functions.js +852 -225
  1508. package/dist/modules/purchase/functions.js.map +1 -1
  1509. package/dist/modules/purchase/index.d.ts.map +1 -1
  1510. package/dist/modules/purchase/index.js +30 -5
  1511. package/dist/modules/purchase/index.js.map +1 -1
  1512. package/dist/modules/purchase/models.d.ts.map +1 -1
  1513. package/dist/modules/purchase/models.js +1 -0
  1514. package/dist/modules/purchase/models.js.map +1 -1
  1515. package/dist/modules/purchase/reports.d.ts +4 -0
  1516. package/dist/modules/purchase/reports.d.ts.map +1 -0
  1517. package/dist/modules/purchase/reports.js +86 -0
  1518. package/dist/modules/purchase/reports.js.map +1 -0
  1519. package/dist/modules/purchase_backend/index.js +513 -112
  1520. package/dist/modules/purchase_backend/index.js.map +1 -1
  1521. package/dist/modules/purchase_backend/screens/index.d.ts +10 -0
  1522. package/dist/modules/purchase_backend/screens/index.d.ts.map +1 -0
  1523. package/dist/modules/purchase_backend/screens/index.js +10 -0
  1524. package/dist/modules/purchase_backend/screens/index.js.map +1 -0
  1525. package/dist/modules/purchase_backend/screens/order-detail.d.ts +31 -0
  1526. package/dist/modules/purchase_backend/screens/order-detail.d.ts.map +1 -0
  1527. package/dist/modules/purchase_backend/screens/order-detail.js +204 -0
  1528. package/dist/modules/purchase_backend/screens/order-detail.js.map +1 -0
  1529. package/dist/modules/purchase_backend/screens/order-list-shared.d.ts +7 -0
  1530. package/dist/modules/purchase_backend/screens/order-list-shared.d.ts.map +1 -0
  1531. package/dist/modules/purchase_backend/screens/order-list-shared.js +58 -0
  1532. package/dist/modules/purchase_backend/screens/order-list-shared.js.map +1 -0
  1533. package/dist/modules/purchase_backend/screens/overview.d.ts +19 -0
  1534. package/dist/modules/purchase_backend/screens/overview.d.ts.map +1 -0
  1535. package/dist/modules/purchase_backend/screens/overview.js +52 -0
  1536. package/dist/modules/purchase_backend/screens/overview.js.map +1 -0
  1537. package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts +14 -0
  1538. package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts.map +1 -0
  1539. package/dist/modules/purchase_backend/screens/purchase-orders-list.js +26 -0
  1540. package/dist/modules/purchase_backend/screens/purchase-orders-list.js.map +1 -0
  1541. package/dist/modules/purchase_backend/screens/rfq-create.d.ts +16 -0
  1542. package/dist/modules/purchase_backend/screens/rfq-create.d.ts.map +1 -0
  1543. package/dist/modules/purchase_backend/screens/rfq-create.js +24 -0
  1544. package/dist/modules/purchase_backend/screens/rfq-create.js.map +1 -0
  1545. package/dist/modules/purchase_backend/screens/rfqs-list.d.ts +18 -0
  1546. package/dist/modules/purchase_backend/screens/rfqs-list.d.ts.map +1 -0
  1547. package/dist/modules/purchase_backend/screens/rfqs-list.js +28 -0
  1548. package/dist/modules/purchase_backend/screens/rfqs-list.js.map +1 -0
  1549. package/dist/modules/purchase_backend/screens/shared.d.ts +18 -0
  1550. package/dist/modules/purchase_backend/screens/shared.d.ts.map +1 -0
  1551. package/dist/modules/purchase_backend/screens/shared.js +30 -0
  1552. package/dist/modules/purchase_backend/screens/shared.js.map +1 -0
  1553. package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts +20 -0
  1554. package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts.map +1 -0
  1555. package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js +25 -0
  1556. package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js.map +1 -0
  1557. package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts +33 -0
  1558. package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts.map +1 -0
  1559. package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js +73 -0
  1560. package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js.map +1 -0
  1561. package/dist/modules/purchase_staff_channel/channel-routes.d.ts +2 -0
  1562. package/dist/modules/purchase_staff_channel/channel-routes.d.ts.map +1 -0
  1563. package/dist/modules/purchase_staff_channel/channel-routes.js +119 -0
  1564. package/dist/modules/purchase_staff_channel/channel-routes.js.map +1 -0
  1565. package/dist/modules/purchase_staff_channel/index.d.ts +8 -0
  1566. package/dist/modules/purchase_staff_channel/index.d.ts.map +1 -0
  1567. package/dist/modules/purchase_staff_channel/index.js +45 -0
  1568. package/dist/modules/purchase_staff_channel/index.js.map +1 -0
  1569. package/dist/modules/purchase_staff_channel/order-routes.d.ts +2 -0
  1570. package/dist/modules/purchase_staff_channel/order-routes.d.ts.map +1 -0
  1571. package/dist/modules/purchase_staff_channel/order-routes.js +743 -0
  1572. package/dist/modules/purchase_staff_channel/order-routes.js.map +1 -0
  1573. package/dist/modules/purchase_staff_channel/product-routes.d.ts +2 -0
  1574. package/dist/modules/purchase_staff_channel/product-routes.d.ts.map +1 -0
  1575. package/dist/modules/purchase_staff_channel/product-routes.js +183 -0
  1576. package/dist/modules/purchase_staff_channel/product-routes.js.map +1 -0
  1577. package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts +2 -0
  1578. package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts.map +1 -0
  1579. package/dist/modules/purchase_staff_channel/vendor-bill-routes.js +189 -0
  1580. package/dist/modules/purchase_staff_channel/vendor-bill-routes.js.map +1 -0
  1581. package/dist/modules/quality/functions.d.ts +3 -0
  1582. package/dist/modules/quality/functions.d.ts.map +1 -0
  1583. package/dist/modules/quality/functions.js +381 -0
  1584. package/dist/modules/quality/functions.js.map +1 -0
  1585. package/dist/modules/quality/index.d.ts +5 -0
  1586. package/dist/modules/quality/index.d.ts.map +1 -0
  1587. package/dist/modules/quality/index.js +19 -0
  1588. package/dist/modules/quality/index.js.map +1 -0
  1589. package/dist/modules/quality/models.d.ts +3 -0
  1590. package/dist/modules/quality/models.d.ts.map +1 -0
  1591. package/dist/modules/quality/models.js +91 -0
  1592. package/dist/modules/quality/models.js.map +1 -0
  1593. package/dist/modules/quality_staff_channel/channel-routes.d.ts +2 -0
  1594. package/dist/modules/quality_staff_channel/channel-routes.d.ts.map +1 -0
  1595. package/dist/modules/quality_staff_channel/channel-routes.js +484 -0
  1596. package/dist/modules/quality_staff_channel/channel-routes.js.map +1 -0
  1597. package/dist/modules/quality_staff_channel/index.d.ts +5 -0
  1598. package/dist/modules/quality_staff_channel/index.d.ts.map +1 -0
  1599. package/dist/modules/quality_staff_channel/index.js +30 -0
  1600. package/dist/modules/quality_staff_channel/index.js.map +1 -0
  1601. package/dist/modules/report/functions.d.ts +3 -0
  1602. package/dist/modules/report/functions.d.ts.map +1 -0
  1603. package/dist/modules/report/functions.js +197 -0
  1604. package/dist/modules/report/functions.js.map +1 -0
  1605. package/dist/modules/report/index.d.ts +3 -0
  1606. package/dist/modules/report/index.d.ts.map +1 -0
  1607. package/dist/modules/report/index.js +21 -0
  1608. package/dist/modules/report/index.js.map +1 -0
  1609. package/dist/modules/report/jobs.d.ts +3 -0
  1610. package/dist/modules/report/jobs.d.ts.map +1 -0
  1611. package/dist/modules/report/jobs.js +18 -0
  1612. package/dist/modules/report/jobs.js.map +1 -0
  1613. package/dist/modules/report/models.d.ts +3 -0
  1614. package/dist/modules/report/models.d.ts.map +1 -0
  1615. package/dist/modules/report/models.js +45 -0
  1616. package/dist/modules/report/models.js.map +1 -0
  1617. package/dist/modules/report/routes.d.ts +19 -0
  1618. package/dist/modules/report/routes.d.ts.map +1 -0
  1619. package/dist/modules/report/routes.js +138 -0
  1620. package/dist/modules/report/routes.js.map +1 -0
  1621. package/dist/modules/report_backend/index.d.ts +3 -0
  1622. package/dist/modules/report_backend/index.d.ts.map +1 -0
  1623. package/dist/modules/report_backend/index.js +67 -0
  1624. package/dist/modules/report_backend/index.js.map +1 -0
  1625. package/dist/modules/report_backend/routes.d.ts +10 -0
  1626. package/dist/modules/report_backend/routes.d.ts.map +1 -0
  1627. package/dist/modules/report_backend/routes.js +87 -0
  1628. package/dist/modules/report_backend/routes.js.map +1 -0
  1629. package/dist/modules/report_backend/screens/index.d.ts +13 -0
  1630. package/dist/modules/report_backend/screens/index.d.ts.map +1 -0
  1631. package/dist/modules/report_backend/screens/index.js +91 -0
  1632. package/dist/modules/report_backend/screens/index.js.map +1 -0
  1633. package/dist/modules/sale/functions.d.ts.map +1 -1
  1634. package/dist/modules/sale/functions.js +806 -238
  1635. package/dist/modules/sale/functions.js.map +1 -1
  1636. package/dist/modules/sale/index.d.ts.map +1 -1
  1637. package/dist/modules/sale/index.js +44 -5
  1638. package/dist/modules/sale/index.js.map +1 -1
  1639. package/dist/modules/sale/models.d.ts.map +1 -1
  1640. package/dist/modules/sale/models.js +47 -1
  1641. package/dist/modules/sale/models.js.map +1 -1
  1642. package/dist/modules/sale/relations.d.ts.map +1 -1
  1643. package/dist/modules/sale/relations.js +6 -0
  1644. package/dist/modules/sale/relations.js.map +1 -1
  1645. package/dist/modules/sale/reports.d.ts +4 -0
  1646. package/dist/modules/sale/reports.d.ts.map +1 -0
  1647. package/dist/modules/sale/reports.js +132 -0
  1648. package/dist/modules/sale/reports.js.map +1 -0
  1649. package/dist/modules/sale/scope.d.ts +31 -0
  1650. package/dist/modules/sale/scope.d.ts.map +1 -0
  1651. package/dist/modules/sale/scope.js +34 -0
  1652. package/dist/modules/sale/scope.js.map +1 -0
  1653. package/dist/modules/sale_activity_backend/index.d.ts.map +1 -1
  1654. package/dist/modules/sale_activity_backend/index.js +0 -1
  1655. package/dist/modules/sale_activity_backend/index.js.map +1 -1
  1656. package/dist/modules/sale_backend/index.js +338 -121
  1657. package/dist/modules/sale_backend/index.js.map +1 -1
  1658. package/dist/modules/sale_backend/screens/index.d.ts +9 -0
  1659. package/dist/modules/sale_backend/screens/index.d.ts.map +1 -0
  1660. package/dist/modules/sale_backend/screens/index.js +9 -0
  1661. package/dist/modules/sale_backend/screens/index.js.map +1 -0
  1662. package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts +14 -0
  1663. package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts.map +1 -0
  1664. package/dist/modules/sale_backend/screens/invoicing-policies-list.js +48 -0
  1665. package/dist/modules/sale_backend/screens/invoicing-policies-list.js.map +1 -0
  1666. package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts +14 -0
  1667. package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts.map +1 -0
  1668. package/dist/modules/sale_backend/screens/invoicing-policy-create.js +38 -0
  1669. package/dist/modules/sale_backend/screens/invoicing-policy-create.js.map +1 -0
  1670. package/dist/modules/sale_backend/screens/order-detail.d.ts +43 -0
  1671. package/dist/modules/sale_backend/screens/order-detail.d.ts.map +1 -0
  1672. package/dist/modules/sale_backend/screens/order-detail.js +226 -0
  1673. package/dist/modules/sale_backend/screens/order-detail.js.map +1 -0
  1674. package/dist/modules/sale_backend/screens/overview.d.ts +31 -0
  1675. package/dist/modules/sale_backend/screens/overview.d.ts.map +1 -0
  1676. package/dist/modules/sale_backend/screens/overview.js +73 -0
  1677. package/dist/modules/sale_backend/screens/overview.js.map +1 -0
  1678. package/dist/modules/sale_backend/screens/quotation-create.d.ts +13 -0
  1679. package/dist/modules/sale_backend/screens/quotation-create.d.ts.map +1 -0
  1680. package/dist/modules/sale_backend/screens/quotation-create.js +19 -0
  1681. package/dist/modules/sale_backend/screens/quotation-create.js.map +1 -0
  1682. package/dist/modules/sale_backend/screens/quotations-list.d.ts +25 -0
  1683. package/dist/modules/sale_backend/screens/quotations-list.d.ts.map +1 -0
  1684. package/dist/modules/sale_backend/screens/quotations-list.js +96 -0
  1685. package/dist/modules/sale_backend/screens/quotations-list.js.map +1 -0
  1686. package/dist/modules/sale_backend/screens/sales-orders-list.d.ts +25 -0
  1687. package/dist/modules/sale_backend/screens/sales-orders-list.d.ts.map +1 -0
  1688. package/dist/modules/sale_backend/screens/sales-orders-list.js +100 -0
  1689. package/dist/modules/sale_backend/screens/sales-orders-list.js.map +1 -0
  1690. package/dist/modules/sale_backend/screens/shared.d.ts +4 -0
  1691. package/dist/modules/sale_backend/screens/shared.d.ts.map +1 -0
  1692. package/dist/modules/sale_backend/screens/shared.js +4 -0
  1693. package/dist/modules/sale_backend/screens/shared.js.map +1 -0
  1694. package/dist/modules/sale_mail_backend/index.d.ts.map +1 -1
  1695. package/dist/modules/sale_mail_backend/index.js +0 -1
  1696. package/dist/modules/sale_mail_backend/index.js.map +1 -1
  1697. package/dist/modules/sale_staff_channel/channel-routes.d.ts +2 -0
  1698. package/dist/modules/sale_staff_channel/channel-routes.d.ts.map +1 -0
  1699. package/dist/modules/sale_staff_channel/channel-routes.js +285 -0
  1700. package/dist/modules/sale_staff_channel/channel-routes.js.map +1 -0
  1701. package/dist/modules/sale_staff_channel/index.d.ts +7 -0
  1702. package/dist/modules/sale_staff_channel/index.d.ts.map +1 -0
  1703. package/dist/modules/sale_staff_channel/index.js +44 -0
  1704. package/dist/modules/sale_staff_channel/index.js.map +1 -0
  1705. package/dist/modules/sale_staff_channel/order-routes.d.ts +2 -0
  1706. package/dist/modules/sale_staff_channel/order-routes.d.ts.map +1 -0
  1707. package/dist/modules/sale_staff_channel/order-routes.js +647 -0
  1708. package/dist/modules/sale_staff_channel/order-routes.js.map +1 -0
  1709. package/dist/modules/sale_staff_channel/product-routes.d.ts +2 -0
  1710. package/dist/modules/sale_staff_channel/product-routes.d.ts.map +1 -0
  1711. package/dist/modules/sale_staff_channel/product-routes.js +183 -0
  1712. package/dist/modules/sale_staff_channel/product-routes.js.map +1 -0
  1713. package/dist/modules/stock/functions.d.ts.map +1 -1
  1714. package/dist/modules/stock/functions.js +1239 -332
  1715. package/dist/modules/stock/functions.js.map +1 -1
  1716. package/dist/modules/stock/index.d.ts +2 -0
  1717. package/dist/modules/stock/index.d.ts.map +1 -1
  1718. package/dist/modules/stock/index.js +29 -6
  1719. package/dist/modules/stock/index.js.map +1 -1
  1720. package/dist/modules/stock/models.d.ts.map +1 -1
  1721. package/dist/modules/stock/models.js +1 -0
  1722. package/dist/modules/stock/models.js.map +1 -1
  1723. package/dist/modules/stock/reports.d.ts +4 -0
  1724. package/dist/modules/stock/reports.d.ts.map +1 -0
  1725. package/dist/modules/stock/reports.js +100 -0
  1726. package/dist/modules/stock/reports.js.map +1 -0
  1727. package/dist/modules/stock/routing.d.ts +1 -1
  1728. package/dist/modules/stock/routing.d.ts.map +1 -1
  1729. package/dist/modules/stock/routing.js +35 -30
  1730. package/dist/modules/stock/routing.js.map +1 -1
  1731. package/dist/modules/stock/scope.d.ts +23 -0
  1732. package/dist/modules/stock/scope.d.ts.map +1 -0
  1733. package/dist/modules/stock/scope.js +26 -0
  1734. package/dist/modules/stock/scope.js.map +1 -0
  1735. package/dist/modules/stock/units.d.ts +14 -0
  1736. package/dist/modules/stock/units.d.ts.map +1 -0
  1737. package/dist/modules/stock/units.js +50 -0
  1738. package/dist/modules/stock/units.js.map +1 -0
  1739. package/dist/modules/stock_activity_backend/index.d.ts.map +1 -1
  1740. package/dist/modules/stock_activity_backend/index.js +0 -1
  1741. package/dist/modules/stock_activity_backend/index.js.map +1 -1
  1742. package/dist/modules/stock_backend/client/editor-view.d.mts.map +1 -1
  1743. package/dist/modules/stock_backend/client/editor-view.mjs +12 -10
  1744. package/dist/modules/stock_backend/client/editor-view.mjs.map +1 -1
  1745. package/dist/modules/stock_backend/index.js +27 -20
  1746. package/dist/modules/stock_backend/index.js.map +1 -1
  1747. package/dist/modules/stock_backend/routes.d.ts.map +1 -1
  1748. package/dist/modules/stock_backend/routes.js +485 -232
  1749. package/dist/modules/stock_backend/routes.js.map +1 -1
  1750. package/dist/modules/stock_backend/screens/forecast.d.ts +28 -0
  1751. package/dist/modules/stock_backend/screens/forecast.d.ts.map +1 -0
  1752. package/dist/modules/stock_backend/screens/forecast.js +108 -0
  1753. package/dist/modules/stock_backend/screens/forecast.js.map +1 -0
  1754. package/dist/modules/stock_backend/screens/index.d.ts +22 -0
  1755. package/dist/modules/stock_backend/screens/index.d.ts.map +1 -0
  1756. package/dist/modules/stock_backend/screens/index.js +22 -0
  1757. package/dist/modules/stock_backend/screens/index.js.map +1 -0
  1758. package/dist/modules/stock_backend/screens/inventory.d.ts +27 -0
  1759. package/dist/modules/stock_backend/screens/inventory.d.ts.map +1 -0
  1760. package/dist/modules/stock_backend/screens/inventory.js +128 -0
  1761. package/dist/modules/stock_backend/screens/inventory.js.map +1 -0
  1762. package/dist/modules/stock_backend/screens/location-create.d.ts +15 -0
  1763. package/dist/modules/stock_backend/screens/location-create.d.ts.map +1 -0
  1764. package/dist/modules/stock_backend/screens/location-create.js +75 -0
  1765. package/dist/modules/stock_backend/screens/location-create.js.map +1 -0
  1766. package/dist/modules/stock_backend/screens/locations-list.d.ts +21 -0
  1767. package/dist/modules/stock_backend/screens/locations-list.d.ts.map +1 -0
  1768. package/dist/modules/stock_backend/screens/locations-list.js +62 -0
  1769. package/dist/modules/stock_backend/screens/locations-list.js.map +1 -0
  1770. package/dist/modules/stock_backend/screens/lot-create.d.ts +14 -0
  1771. package/dist/modules/stock_backend/screens/lot-create.d.ts.map +1 -0
  1772. package/dist/modules/stock_backend/screens/lot-create.js +60 -0
  1773. package/dist/modules/stock_backend/screens/lot-create.js.map +1 -0
  1774. package/dist/modules/stock_backend/screens/lot-detail.d.ts +30 -0
  1775. package/dist/modules/stock_backend/screens/lot-detail.d.ts.map +1 -0
  1776. package/dist/modules/stock_backend/screens/lot-detail.js +84 -0
  1777. package/dist/modules/stock_backend/screens/lot-detail.js.map +1 -0
  1778. package/dist/modules/stock_backend/screens/lots-list.d.ts +25 -0
  1779. package/dist/modules/stock_backend/screens/lots-list.d.ts.map +1 -0
  1780. package/dist/modules/stock_backend/screens/lots-list.js +54 -0
  1781. package/dist/modules/stock_backend/screens/lots-list.js.map +1 -0
  1782. package/dist/modules/stock_backend/screens/picking-type-create.d.ts +15 -0
  1783. package/dist/modules/stock_backend/screens/picking-type-create.d.ts.map +1 -0
  1784. package/dist/modules/stock_backend/screens/picking-type-create.js +89 -0
  1785. package/dist/modules/stock_backend/screens/picking-type-create.js.map +1 -0
  1786. package/dist/modules/stock_backend/screens/picking-types-list.d.ts +22 -0
  1787. package/dist/modules/stock_backend/screens/picking-types-list.d.ts.map +1 -0
  1788. package/dist/modules/stock_backend/screens/picking-types-list.js +80 -0
  1789. package/dist/modules/stock_backend/screens/picking-types-list.js.map +1 -0
  1790. package/dist/modules/stock_backend/screens/replenishment-create.d.ts +17 -0
  1791. package/dist/modules/stock_backend/screens/replenishment-create.d.ts.map +1 -0
  1792. package/dist/modules/stock_backend/screens/replenishment-create.js +74 -0
  1793. package/dist/modules/stock_backend/screens/replenishment-create.js.map +1 -0
  1794. package/dist/modules/stock_backend/screens/replenishment-list.d.ts +29 -0
  1795. package/dist/modules/stock_backend/screens/replenishment-list.d.ts.map +1 -0
  1796. package/dist/modules/stock_backend/screens/replenishment-list.js +84 -0
  1797. package/dist/modules/stock_backend/screens/replenishment-list.js.map +1 -0
  1798. package/dist/modules/stock_backend/screens/shared.d.ts +12 -0
  1799. package/dist/modules/stock_backend/screens/shared.d.ts.map +1 -0
  1800. package/dist/modules/stock_backend/screens/shared.js +29 -0
  1801. package/dist/modules/stock_backend/screens/shared.js.map +1 -0
  1802. package/dist/modules/stock_backend/screens/stock-route-create.d.ts +13 -0
  1803. package/dist/modules/stock_backend/screens/stock-route-create.d.ts.map +1 -0
  1804. package/dist/modules/stock_backend/screens/stock-route-create.js +52 -0
  1805. package/dist/modules/stock_backend/screens/stock-route-create.js.map +1 -0
  1806. package/dist/modules/stock_backend/screens/stock-route-detail.d.ts +30 -0
  1807. package/dist/modules/stock_backend/screens/stock-route-detail.d.ts.map +1 -0
  1808. package/dist/modules/stock_backend/screens/stock-route-detail.js +131 -0
  1809. package/dist/modules/stock_backend/screens/stock-route-detail.js.map +1 -0
  1810. package/dist/modules/stock_backend/screens/stock-routes-list.d.ts +22 -0
  1811. package/dist/modules/stock_backend/screens/stock-routes-list.d.ts.map +1 -0
  1812. package/dist/modules/stock_backend/screens/stock-routes-list.js +51 -0
  1813. package/dist/modules/stock_backend/screens/stock-routes-list.js.map +1 -0
  1814. package/dist/modules/stock_backend/screens/stock.d.ts +7 -0
  1815. package/dist/modules/stock_backend/screens/stock.d.ts.map +1 -0
  1816. package/dist/modules/stock_backend/screens/stock.js +13 -0
  1817. package/dist/modules/stock_backend/screens/stock.js.map +1 -0
  1818. package/dist/modules/stock_backend/screens/transfer-create.d.ts +13 -0
  1819. package/dist/modules/stock_backend/screens/transfer-create.d.ts.map +1 -0
  1820. package/dist/modules/stock_backend/screens/transfer-create.js +38 -0
  1821. package/dist/modules/stock_backend/screens/transfer-create.js.map +1 -0
  1822. package/dist/modules/stock_backend/screens/transfer-detail.d.ts +27 -0
  1823. package/dist/modules/stock_backend/screens/transfer-detail.d.ts.map +1 -0
  1824. package/dist/modules/stock_backend/screens/transfer-detail.js +91 -0
  1825. package/dist/modules/stock_backend/screens/transfer-detail.js.map +1 -0
  1826. package/dist/modules/stock_backend/screens/transfers-list.d.ts +25 -0
  1827. package/dist/modules/stock_backend/screens/transfers-list.d.ts.map +1 -0
  1828. package/dist/modules/stock_backend/screens/transfers-list.js +81 -0
  1829. package/dist/modules/stock_backend/screens/transfers-list.js.map +1 -0
  1830. package/dist/modules/stock_backend/screens/warehouse-create.d.ts +13 -0
  1831. package/dist/modules/stock_backend/screens/warehouse-create.d.ts.map +1 -0
  1832. package/dist/modules/stock_backend/screens/warehouse-create.js +79 -0
  1833. package/dist/modules/stock_backend/screens/warehouse-create.js.map +1 -0
  1834. package/dist/modules/stock_backend/screens/warehouses-list.d.ts +21 -0
  1835. package/dist/modules/stock_backend/screens/warehouses-list.d.ts.map +1 -0
  1836. package/dist/modules/stock_backend/screens/warehouses-list.js +60 -0
  1837. package/dist/modules/stock_backend/screens/warehouses-list.js.map +1 -0
  1838. package/dist/modules/stock_lot_activity_backend/index.d.ts.map +1 -1
  1839. package/dist/modules/stock_lot_activity_backend/index.js +0 -1
  1840. package/dist/modules/stock_lot_activity_backend/index.js.map +1 -1
  1841. package/dist/modules/stock_lot_mail_backend/index.d.ts.map +1 -1
  1842. package/dist/modules/stock_lot_mail_backend/index.js +0 -1
  1843. package/dist/modules/stock_lot_mail_backend/index.js.map +1 -1
  1844. package/dist/modules/stock_mail_backend/index.d.ts.map +1 -1
  1845. package/dist/modules/stock_mail_backend/index.js +0 -1
  1846. package/dist/modules/stock_mail_backend/index.js.map +1 -1
  1847. package/dist/modules/stock_mail_inbound/index.d.ts.map +1 -1
  1848. package/dist/modules/stock_mail_inbound/index.js +0 -2
  1849. package/dist/modules/stock_mail_inbound/index.js.map +1 -1
  1850. package/dist/modules/stock_staff_channel/channel-routes.d.ts +656 -0
  1851. package/dist/modules/stock_staff_channel/channel-routes.d.ts.map +1 -0
  1852. package/dist/modules/stock_staff_channel/channel-routes.js +445 -0
  1853. package/dist/modules/stock_staff_channel/channel-routes.js.map +1 -0
  1854. package/dist/modules/stock_staff_channel/functions.d.ts +3 -0
  1855. package/dist/modules/stock_staff_channel/functions.d.ts.map +1 -0
  1856. package/dist/modules/stock_staff_channel/functions.js +954 -0
  1857. package/dist/modules/stock_staff_channel/functions.js.map +1 -0
  1858. package/dist/modules/stock_staff_channel/index.d.ts +8 -0
  1859. package/dist/modules/stock_staff_channel/index.d.ts.map +1 -0
  1860. package/dist/modules/stock_staff_channel/index.js +37 -0
  1861. package/dist/modules/stock_staff_channel/index.js.map +1 -0
  1862. package/dist/modules/stock_staff_channel/models.d.ts +4 -0
  1863. package/dist/modules/stock_staff_channel/models.d.ts.map +1 -0
  1864. package/dist/modules/stock_staff_channel/models.js +119 -0
  1865. package/dist/modules/stock_staff_channel/models.js.map +1 -0
  1866. package/dist/modules/stock_staff_channel/operation-routes.d.ts +2 -0
  1867. package/dist/modules/stock_staff_channel/operation-routes.d.ts.map +1 -0
  1868. package/dist/modules/stock_staff_channel/operation-routes.js +1258 -0
  1869. package/dist/modules/stock_staff_channel/operation-routes.js.map +1 -0
  1870. package/dist/modules/storage/functions.d.ts.map +1 -1
  1871. package/dist/modules/storage/functions.js +18 -5
  1872. package/dist/modules/storage/functions.js.map +1 -1
  1873. package/dist/modules/storage/index.js +0 -1
  1874. package/dist/modules/storage/index.js.map +1 -1
  1875. package/dist/modules/storage/jobs.d.ts +21 -1
  1876. package/dist/modules/storage/jobs.d.ts.map +1 -1
  1877. package/dist/modules/storage/jobs.js +142 -2
  1878. package/dist/modules/storage/jobs.js.map +1 -1
  1879. package/dist/modules/storage/models.d.ts.map +1 -1
  1880. package/dist/modules/storage/models.js +2 -0
  1881. package/dist/modules/storage/models.js.map +1 -1
  1882. package/dist/modules/storage/policy.d.ts +5 -0
  1883. package/dist/modules/storage/policy.d.ts.map +1 -0
  1884. package/dist/modules/storage/policy.js +13 -0
  1885. package/dist/modules/storage/policy.js.map +1 -0
  1886. package/dist/modules/storage/routes.d.ts +1 -0
  1887. package/dist/modules/storage/routes.d.ts.map +1 -1
  1888. package/dist/modules/storage/routes.js +19 -15
  1889. package/dist/modules/storage/routes.js.map +1 -1
  1890. package/dist/modules/uom/convert.d.ts +1 -1
  1891. package/dist/modules/uom/convert.js +2 -2
  1892. package/dist/modules/uom/convert.js.map +1 -1
  1893. package/dist/modules/uom/functions.d.ts.map +1 -1
  1894. package/dist/modules/uom/functions.js +39 -4
  1895. package/dist/modules/uom/functions.js.map +1 -1
  1896. package/dist/modules/uom/index.d.ts.map +1 -1
  1897. package/dist/modules/uom/index.js +1 -2
  1898. package/dist/modules/uom/index.js.map +1 -1
  1899. package/dist/modules/uom/messages.js +2 -2
  1900. package/dist/modules/uom/messages.js.map +1 -1
  1901. package/dist/modules/uom/models.d.ts +1 -1
  1902. package/dist/modules/uom/models.d.ts.map +1 -1
  1903. package/dist/modules/uom/models.js +1 -1
  1904. package/dist/modules/uom/models.js.map +1 -1
  1905. package/dist/modules/user/authorization.d.ts +80 -0
  1906. package/dist/modules/user/authorization.d.ts.map +1 -0
  1907. package/dist/modules/user/authorization.js +1039 -0
  1908. package/dist/modules/user/authorization.js.map +1 -0
  1909. package/dist/modules/user/functions.d.ts.map +1 -1
  1910. package/dist/modules/user/functions.js +188 -32
  1911. package/dist/modules/user/functions.js.map +1 -1
  1912. package/dist/modules/user/index.d.ts +4 -1
  1913. package/dist/modules/user/index.d.ts.map +1 -1
  1914. package/dist/modules/user/index.js +2 -3
  1915. package/dist/modules/user/index.js.map +1 -1
  1916. package/dist/modules/user/login.d.ts +1 -27
  1917. package/dist/modules/user/login.d.ts.map +1 -1
  1918. package/dist/modules/user/login.js +5 -45
  1919. package/dist/modules/user/login.js.map +1 -1
  1920. package/dist/modules/user/messages.d.ts +6 -0
  1921. package/dist/modules/user/messages.d.ts.map +1 -1
  1922. package/dist/modules/user/messages.js +6 -0
  1923. package/dist/modules/user/messages.js.map +1 -1
  1924. package/dist/modules/user/models.d.ts +1 -1
  1925. package/dist/modules/user/models.d.ts.map +1 -1
  1926. package/dist/modules/user/models.js +73 -9
  1927. package/dist/modules/user/models.js.map +1 -1
  1928. package/dist/modules/user/relations.d.ts.map +1 -1
  1929. package/dist/modules/user/relations.js +6 -0
  1930. package/dist/modules/user/relations.js.map +1 -1
  1931. package/dist/modules/user/roles.d.ts +11 -1
  1932. package/dist/modules/user/roles.d.ts.map +1 -1
  1933. package/dist/modules/user/roles.js +402 -117
  1934. package/dist/modules/user/roles.js.map +1 -1
  1935. package/dist/modules/user/routes.js +1 -1
  1936. package/dist/modules/user/routes.js.map +1 -1
  1937. package/dist/modules/user_backend/index.d.ts +1 -1
  1938. package/dist/modules/user_backend/index.d.ts.map +1 -1
  1939. package/dist/modules/user_backend/index.js +1 -3
  1940. package/dist/modules/user_backend/index.js.map +1 -1
  1941. package/dist/modules/user_backend/messages.d.ts +64 -0
  1942. package/dist/modules/user_backend/messages.d.ts.map +1 -1
  1943. package/dist/modules/user_backend/messages.js +64 -0
  1944. package/dist/modules/user_backend/messages.js.map +1 -1
  1945. package/dist/modules/user_backend/routes.d.ts.map +1 -1
  1946. package/dist/modules/user_backend/routes.js +379 -69
  1947. package/dist/modules/user_backend/routes.js.map +1 -1
  1948. package/dist/modules/user_backend/screens/index.d.ts +11 -0
  1949. package/dist/modules/user_backend/screens/index.d.ts.map +1 -0
  1950. package/dist/modules/user_backend/screens/index.js +8 -0
  1951. package/dist/modules/user_backend/screens/index.js.map +1 -0
  1952. package/dist/modules/user_backend/screens/presets-form.d.ts +16 -0
  1953. package/dist/modules/user_backend/screens/presets-form.d.ts.map +1 -0
  1954. package/dist/modules/user_backend/screens/presets-form.js +37 -0
  1955. package/dist/modules/user_backend/screens/presets-form.js.map +1 -0
  1956. package/dist/modules/user_backend/screens/profile-form.d.ts +14 -0
  1957. package/dist/modules/user_backend/screens/profile-form.d.ts.map +1 -0
  1958. package/dist/modules/user_backend/screens/profile-form.js +37 -0
  1959. package/dist/modules/user_backend/screens/profile-form.js.map +1 -0
  1960. package/dist/modules/user_backend/screens/role-form.d.ts +21 -0
  1961. package/dist/modules/user_backend/screens/role-form.d.ts.map +1 -0
  1962. package/dist/modules/user_backend/screens/role-form.js +93 -0
  1963. package/dist/modules/user_backend/screens/role-form.js.map +1 -0
  1964. package/dist/modules/user_backend/screens/roles-list.d.ts +15 -0
  1965. package/dist/modules/user_backend/screens/roles-list.d.ts.map +1 -0
  1966. package/dist/modules/user_backend/screens/roles-list.js +48 -0
  1967. package/dist/modules/user_backend/screens/roles-list.js.map +1 -0
  1968. package/dist/modules/user_backend/screens/sessions.d.ts +5 -0
  1969. package/dist/modules/user_backend/screens/sessions.d.ts.map +1 -0
  1970. package/dist/modules/user_backend/screens/sessions.js +35 -0
  1971. package/dist/modules/user_backend/screens/sessions.js.map +1 -0
  1972. package/dist/modules/user_backend/screens/types.d.ts +68 -0
  1973. package/dist/modules/user_backend/screens/types.d.ts.map +1 -0
  1974. package/dist/modules/user_backend/screens/types.js +2 -0
  1975. package/dist/modules/user_backend/screens/types.js.map +1 -0
  1976. package/dist/modules/user_backend/screens/user-form.d.ts +56 -0
  1977. package/dist/modules/user_backend/screens/user-form.d.ts.map +1 -0
  1978. package/dist/modules/user_backend/screens/user-form.js +202 -0
  1979. package/dist/modules/user_backend/screens/user-form.js.map +1 -0
  1980. package/dist/modules/user_backend/screens/users-list.d.ts +17 -0
  1981. package/dist/modules/user_backend/screens/users-list.d.ts.map +1 -0
  1982. package/dist/modules/user_backend/screens/users-list.js +56 -0
  1983. package/dist/modules/user_backend/screens/users-list.js.map +1 -0
  1984. package/dist/modules/website/cms.d.ts +18 -1
  1985. package/dist/modules/website/cms.d.ts.map +1 -1
  1986. package/dist/modules/website/cms.js +655 -43
  1987. package/dist/modules/website/cms.js.map +1 -1
  1988. package/dist/modules/website/customer.d.ts.map +1 -1
  1989. package/dist/modules/website/customer.js +249 -1
  1990. package/dist/modules/website/customer.js.map +1 -1
  1991. package/dist/modules/website/index.d.ts.map +1 -1
  1992. package/dist/modules/website/index.js +38 -4
  1993. package/dist/modules/website/index.js.map +1 -1
  1994. package/dist/modules/website/media-usage.d.ts +38 -0
  1995. package/dist/modules/website/media-usage.d.ts.map +1 -0
  1996. package/dist/modules/website/media-usage.js +87 -0
  1997. package/dist/modules/website/media-usage.js.map +1 -0
  1998. package/dist/modules/website/models.d.ts.map +1 -1
  1999. package/dist/modules/website/models.js +101 -0
  2000. package/dist/modules/website/models.js.map +1 -1
  2001. package/dist/modules/website/paths.d.ts +31 -0
  2002. package/dist/modules/website/paths.d.ts.map +1 -0
  2003. package/dist/modules/website/paths.js +48 -0
  2004. package/dist/modules/website/paths.js.map +1 -0
  2005. package/dist/modules/website/publication.d.ts +3 -0
  2006. package/dist/modules/website/publication.d.ts.map +1 -0
  2007. package/dist/modules/website/publication.js +366 -0
  2008. package/dist/modules/website/publication.js.map +1 -0
  2009. package/dist/modules/website/renderable.d.ts +32 -0
  2010. package/dist/modules/website/renderable.d.ts.map +1 -0
  2011. package/dist/modules/website/renderable.js +59 -0
  2012. package/dist/modules/website/renderable.js.map +1 -0
  2013. package/dist/modules/website/sections.d.ts.map +1 -1
  2014. package/dist/modules/website/sections.js +25 -1
  2015. package/dist/modules/website/sections.js.map +1 -1
  2016. package/dist/modules/website_backend/csv.d.ts +23 -0
  2017. package/dist/modules/website_backend/csv.d.ts.map +1 -0
  2018. package/dist/modules/website_backend/csv.js +31 -0
  2019. package/dist/modules/website_backend/csv.js.map +1 -0
  2020. package/dist/modules/website_backend/index.js +398 -2
  2021. package/dist/modules/website_backend/index.js.map +1 -1
  2022. package/dist/modules/website_backend/menus.d.ts.map +1 -1
  2023. package/dist/modules/website_backend/menus.js +39 -6
  2024. package/dist/modules/website_backend/menus.js.map +1 -1
  2025. package/dist/modules/website_backend/routes.d.ts.map +1 -1
  2026. package/dist/modules/website_backend/routes.js +1079 -138
  2027. package/dist/modules/website_backend/routes.js.map +1 -1
  2028. package/dist/modules/website_backend/screens/index.d.ts +425 -0
  2029. package/dist/modules/website_backend/screens/index.d.ts.map +1 -0
  2030. package/dist/modules/website_backend/screens/index.js +1778 -0
  2031. package/dist/modules/website_backend/screens/index.js.map +1 -0
  2032. package/dist/modules/website_backend/screens/page-frame.d.ts +16 -0
  2033. package/dist/modules/website_backend/screens/page-frame.d.ts.map +1 -0
  2034. package/dist/modules/website_backend/screens/page-frame.js +13 -0
  2035. package/dist/modules/website_backend/screens/page-frame.js.map +1 -0
  2036. package/dist/modules/website_form/audit.d.ts +27 -0
  2037. package/dist/modules/website_form/audit.d.ts.map +1 -0
  2038. package/dist/modules/website_form/audit.js +30 -0
  2039. package/dist/modules/website_form/audit.js.map +1 -0
  2040. package/dist/modules/website_form/functions.d.ts.map +1 -1
  2041. package/dist/modules/website_form/functions.js +416 -12
  2042. package/dist/modules/website_form/functions.js.map +1 -1
  2043. package/dist/modules/website_form/index.js +24 -2
  2044. package/dist/modules/website_form/index.js.map +1 -1
  2045. package/dist/modules/website_form/jobs.d.ts +11 -0
  2046. package/dist/modules/website_form/jobs.d.ts.map +1 -0
  2047. package/dist/modules/website_form/jobs.js +80 -0
  2048. package/dist/modules/website_form/jobs.js.map +1 -0
  2049. package/dist/modules/website_form/models.d.ts.map +1 -1
  2050. package/dist/modules/website_form/models.js +89 -0
  2051. package/dist/modules/website_form/models.js.map +1 -1
  2052. package/dist/modules/website_form/purge.d.ts +22 -0
  2053. package/dist/modules/website_form/purge.d.ts.map +1 -0
  2054. package/dist/modules/website_form/purge.js +59 -0
  2055. package/dist/modules/website_form/purge.js.map +1 -0
  2056. package/dist/modules/website_form/retention.d.ts +70 -0
  2057. package/dist/modules/website_form/retention.d.ts.map +1 -0
  2058. package/dist/modules/website_form/retention.js +145 -0
  2059. package/dist/modules/website_form/retention.js.map +1 -0
  2060. package/dist/modules/website_form/routes.d.ts.map +1 -1
  2061. package/dist/modules/website_form/routes.js +37 -3
  2062. package/dist/modules/website_form/routes.js.map +1 -1
  2063. package/dist/modules/website_form_mail/index.d.ts +36 -0
  2064. package/dist/modules/website_form_mail/index.d.ts.map +1 -0
  2065. package/dist/modules/website_form_mail/index.js +137 -0
  2066. package/dist/modules/website_form_mail/index.js.map +1 -0
  2067. package/dist/modules/website_hospitality/channel-routes.d.ts +2 -0
  2068. package/dist/modules/website_hospitality/channel-routes.d.ts.map +1 -0
  2069. package/dist/modules/website_hospitality/channel-routes.js +355 -0
  2070. package/dist/modules/website_hospitality/channel-routes.js.map +1 -0
  2071. package/dist/modules/website_hospitality/functions.d.ts.map +1 -1
  2072. package/dist/modules/website_hospitality/functions.js +27 -2
  2073. package/dist/modules/website_hospitality/functions.js.map +1 -1
  2074. package/dist/modules/website_hospitality/index.js +4 -3
  2075. package/dist/modules/website_hospitality/index.js.map +1 -1
  2076. package/dist/modules/website_hospitality/models.d.ts.map +1 -1
  2077. package/dist/modules/website_hospitality/models.js +2 -0
  2078. package/dist/modules/website_hospitality/models.js.map +1 -1
  2079. package/dist/modules/website_menu/functions.d.ts.map +1 -1
  2080. package/dist/modules/website_menu/functions.js +235 -9
  2081. package/dist/modules/website_menu/functions.js.map +1 -1
  2082. package/dist/modules/website_menu/index.js +8 -1
  2083. package/dist/modules/website_menu/index.js.map +1 -1
  2084. package/dist/modules/website_retail/channel-routes.d.ts +2 -0
  2085. package/dist/modules/website_retail/channel-routes.d.ts.map +1 -0
  2086. package/dist/modules/website_retail/channel-routes.js +305 -0
  2087. package/dist/modules/website_retail/channel-routes.js.map +1 -0
  2088. package/dist/modules/website_retail/functions.d.ts +14 -1
  2089. package/dist/modules/website_retail/functions.d.ts.map +1 -1
  2090. package/dist/modules/website_retail/functions.js +6 -6
  2091. package/dist/modules/website_retail/functions.js.map +1 -1
  2092. package/dist/modules/website_retail/index.js +24 -3
  2093. package/dist/modules/website_retail/index.js.map +1 -1
  2094. package/dist/modules/website_retail/models.d.ts.map +1 -1
  2095. package/dist/modules/website_retail/models.js +30 -0
  2096. package/dist/modules/website_retail/models.js.map +1 -1
  2097. package/dist/modules/website_retail/online.d.ts +3 -0
  2098. package/dist/modules/website_retail/online.d.ts.map +1 -0
  2099. package/dist/modules/website_retail/online.js +710 -0
  2100. package/dist/modules/website_retail/online.js.map +1 -0
  2101. package/dist/modules/website_search/client/search.d.mts +16 -2
  2102. package/dist/modules/website_search/client/search.d.mts.map +1 -1
  2103. package/dist/modules/website_search/client/search.mjs +112 -6
  2104. package/dist/modules/website_search/client/search.mjs.map +1 -1
  2105. package/dist/modules/website_search/functions.d.ts +3 -0
  2106. package/dist/modules/website_search/functions.d.ts.map +1 -0
  2107. package/dist/modules/website_search/functions.js +129 -0
  2108. package/dist/modules/website_search/functions.js.map +1 -0
  2109. package/dist/modules/website_search/index.js +6 -1
  2110. package/dist/modules/website_search/index.js.map +1 -1
  2111. package/dist/modules/website_search/islands.d.ts +6 -0
  2112. package/dist/modules/website_search/islands.d.ts.map +1 -1
  2113. package/dist/modules/website_search/islands.js +8 -2
  2114. package/dist/modules/website_search/islands.js.map +1 -1
  2115. package/dist/modules/website_search/jobs.d.ts +3 -0
  2116. package/dist/modules/website_search/jobs.d.ts.map +1 -0
  2117. package/dist/modules/website_search/jobs.js +101 -0
  2118. package/dist/modules/website_search/jobs.js.map +1 -0
  2119. package/dist/modules/website_search/models.d.ts +15 -0
  2120. package/dist/modules/website_search/models.d.ts.map +1 -0
  2121. package/dist/modules/website_search/models.js +58 -0
  2122. package/dist/modules/website_search/models.js.map +1 -0
  2123. package/dist/modules/website_search/rebuild.d.ts +33 -0
  2124. package/dist/modules/website_search/rebuild.d.ts.map +1 -0
  2125. package/dist/modules/website_search/rebuild.js +125 -0
  2126. package/dist/modules/website_search/rebuild.js.map +1 -0
  2127. package/dist/modules/website_seo/functions.d.ts +3 -0
  2128. package/dist/modules/website_seo/functions.d.ts.map +1 -0
  2129. package/dist/modules/website_seo/functions.js +164 -0
  2130. package/dist/modules/website_seo/functions.js.map +1 -0
  2131. package/dist/modules/website_seo/index.js +15 -5
  2132. package/dist/modules/website_seo/index.js.map +1 -1
  2133. package/dist/modules/website_seo/projection.d.ts +52 -0
  2134. package/dist/modules/website_seo/projection.d.ts.map +1 -0
  2135. package/dist/modules/website_seo/projection.js +129 -0
  2136. package/dist/modules/website_seo/projection.js.map +1 -0
  2137. package/dist/modules/website_seo/routes.d.ts +3 -0
  2138. package/dist/modules/website_seo/routes.d.ts.map +1 -0
  2139. package/dist/modules/website_seo/routes.js +56 -0
  2140. package/dist/modules/website_seo/routes.js.map +1 -0
  2141. package/dist/permission-catalogue.d.ts +5 -0
  2142. package/dist/permission-catalogue.d.ts.map +1 -0
  2143. package/dist/permission-catalogue.js +1518 -0
  2144. package/dist/permission-catalogue.js.map +1 -0
  2145. package/dist/scaffold/index.d.ts +2 -0
  2146. package/dist/scaffold/index.d.ts.map +1 -0
  2147. package/dist/scaffold/index.js +31 -0
  2148. package/dist/scaffold/index.js.map +1 -0
  2149. package/dist/scaffold/templates/README.md.tmpl +17 -0
  2150. package/dist/scaffold/templates/gitignore.tmpl +2 -0
  2151. package/dist/scaffold/templates/ket.workspace.mjs.tmpl +1 -0
  2152. package/dist/scaffold/templates/package.json.tmpl +15 -0
  2153. package/dist/themes/hospitality/templates/website.columns.ktl +4 -0
  2154. package/dist/themes/paper/templates/website.columns.ktl +4 -0
  2155. package/dist/ui/actions.d.ts +4 -0
  2156. package/dist/ui/actions.d.ts.map +1 -1
  2157. package/dist/ui/actions.js +1 -1
  2158. package/dist/ui/actions.js.map +1 -1
  2159. package/dist/ui/activity.d.ts +1 -1
  2160. package/dist/ui/activity.d.ts.map +1 -1
  2161. package/dist/ui/activity.js +3 -5
  2162. package/dist/ui/activity.js.map +1 -1
  2163. package/dist/ui/attachments.js +1 -1
  2164. package/dist/ui/attachments.js.map +1 -1
  2165. package/dist/ui/auth.d.ts +36 -0
  2166. package/dist/ui/auth.d.ts.map +1 -1
  2167. package/dist/ui/auth.js +55 -0
  2168. package/dist/ui/auth.js.map +1 -1
  2169. package/dist/ui/board-page.d.ts +6 -0
  2170. package/dist/ui/board-page.d.ts.map +1 -0
  2171. package/dist/ui/board-page.js +4 -0
  2172. package/dist/ui/board-page.js.map +1 -0
  2173. package/dist/ui/charts.d.ts +83 -0
  2174. package/dist/ui/charts.d.ts.map +1 -0
  2175. package/dist/ui/charts.js +105 -0
  2176. package/dist/ui/charts.js.map +1 -0
  2177. package/dist/ui/chrome.d.ts +45 -2
  2178. package/dist/ui/chrome.d.ts.map +1 -1
  2179. package/dist/ui/chrome.js +47 -5
  2180. package/dist/ui/chrome.js.map +1 -1
  2181. package/dist/ui/client/activity-view.mjs +7 -7
  2182. package/dist/ui/client/activity-view.mjs.map +1 -1
  2183. package/dist/ui/client/activity.css +6 -34
  2184. package/dist/ui/client/calendar-view.d.mts.map +1 -1
  2185. package/dist/ui/client/calendar-view.mjs +7 -6
  2186. package/dist/ui/client/calendar-view.mjs.map +1 -1
  2187. package/dist/ui/client/calendar.css +4 -14
  2188. package/dist/ui/client/chart-view.d.ts +51 -0
  2189. package/dist/ui/client/chart-view.d.ts.map +1 -0
  2190. package/dist/ui/client/chart-view.js +192 -0
  2191. package/dist/ui/client/chart-view.js.map +1 -0
  2192. package/dist/ui/client/flow-app.css +387 -0
  2193. package/dist/ui/client/flow-board-view.d.mts +8 -0
  2194. package/dist/ui/client/flow-board-view.d.mts.map +1 -0
  2195. package/dist/ui/client/flow-board-view.mjs +161 -0
  2196. package/dist/ui/client/flow-board-view.mjs.map +1 -0
  2197. package/dist/ui/client/flow-board.d.mts +3 -0
  2198. package/dist/ui/client/flow-board.d.mts.map +1 -0
  2199. package/dist/ui/client/flow-board.mjs +7 -0
  2200. package/dist/ui/client/flow-board.mjs.map +1 -0
  2201. package/dist/ui/client/flow-map-view.d.mts +2 -0
  2202. package/dist/ui/client/flow-map-view.d.mts.map +1 -0
  2203. package/dist/ui/client/flow-map-view.mjs +235 -0
  2204. package/dist/ui/client/flow-map-view.mjs.map +1 -0
  2205. package/dist/ui/client/flow-map.d.mts +3 -0
  2206. package/dist/ui/client/flow-map.d.mts.map +1 -0
  2207. package/dist/ui/client/flow-map.mjs +7 -0
  2208. package/dist/ui/client/flow-map.mjs.map +1 -0
  2209. package/dist/ui/client/live-doc-blocks.d.ts +19 -0
  2210. package/dist/ui/client/live-doc-blocks.d.ts.map +1 -0
  2211. package/dist/ui/client/live-doc-blocks.js +23 -0
  2212. package/dist/ui/client/live-doc-blocks.js.map +1 -0
  2213. package/dist/ui/client/live-doc-markdown.d.ts +18 -0
  2214. package/dist/ui/client/live-doc-markdown.d.ts.map +1 -0
  2215. package/dist/ui/client/live-doc-markdown.js +175 -0
  2216. package/dist/ui/client/live-doc-markdown.js.map +1 -0
  2217. package/dist/ui/client/live-doc-shell.d.ts +101 -0
  2218. package/dist/ui/client/live-doc-shell.d.ts.map +1 -0
  2219. package/dist/ui/client/live-doc-shell.js +251 -0
  2220. package/dist/ui/client/live-doc-shell.js.map +1 -0
  2221. package/dist/ui/client/live-doc-view.d.ts +33 -0
  2222. package/dist/ui/client/live-doc-view.d.ts.map +1 -0
  2223. package/dist/ui/client/live-doc-view.js +1237 -0
  2224. package/dist/ui/client/live-doc-view.js.map +1 -0
  2225. package/dist/ui/client/live-doc.css +243 -0
  2226. package/dist/ui/client/live-doc.d.mts +12 -0
  2227. package/dist/ui/client/live-doc.d.mts.map +1 -0
  2228. package/dist/ui/client/live-doc.mjs +11 -0
  2229. package/dist/ui/client/live-doc.mjs.map +7 -0
  2230. package/dist/ui/client/mail-bundle.d.mts +9 -0
  2231. package/dist/ui/client/mail-bundle.d.mts.map +1 -0
  2232. package/dist/ui/client/mail-bundle.mjs +50 -0
  2233. package/dist/ui/client/mail-bundle.mjs.map +7 -0
  2234. package/dist/ui/client/mail-entry.d.mts +11 -0
  2235. package/dist/ui/client/mail-entry.d.mts.map +1 -0
  2236. package/dist/ui/client/mail-entry.mjs +9 -0
  2237. package/dist/ui/client/mail-entry.mjs.map +1 -0
  2238. package/dist/ui/client/mail-view.d.mts.map +1 -1
  2239. package/dist/ui/client/mail-view.mjs +5 -3
  2240. package/dist/ui/client/mail-view.mjs.map +1 -1
  2241. package/dist/ui/client/mail.css +3 -3
  2242. package/dist/ui/client/relation-select-view.d.ts +77 -0
  2243. package/dist/ui/client/relation-select-view.d.ts.map +1 -0
  2244. package/dist/ui/client/relation-select-view.js +216 -0
  2245. package/dist/ui/client/relation-select-view.js.map +1 -0
  2246. package/dist/ui/client/table-selection-view.d.ts +4 -0
  2247. package/dist/ui/client/table-selection-view.d.ts.map +1 -0
  2248. package/dist/ui/client/table-selection-view.js +345 -0
  2249. package/dist/ui/client/table-selection-view.js.map +1 -0
  2250. package/dist/ui/dashboard-page.d.ts +6 -0
  2251. package/dist/ui/dashboard-page.d.ts.map +1 -0
  2252. package/dist/ui/dashboard-page.js +4 -0
  2253. package/dist/ui/dashboard-page.js.map +1 -0
  2254. package/dist/ui/data.d.ts +51 -1
  2255. package/dist/ui/data.d.ts.map +1 -1
  2256. package/dist/ui/data.js +87 -1
  2257. package/dist/ui/data.js.map +1 -1
  2258. package/dist/ui/date-picker.d.ts.map +1 -1
  2259. package/dist/ui/date-picker.js +2 -2
  2260. package/dist/ui/date-picker.js.map +1 -1
  2261. package/dist/ui/form-page.d.ts +6 -0
  2262. package/dist/ui/form-page.d.ts.map +1 -0
  2263. package/dist/ui/form-page.js +5 -0
  2264. package/dist/ui/form-page.js.map +1 -0
  2265. package/dist/ui/form.d.ts +6 -1
  2266. package/dist/ui/form.d.ts.map +1 -1
  2267. package/dist/ui/form.js +8 -5
  2268. package/dist/ui/form.js.map +1 -1
  2269. package/dist/ui/format.d.ts +13 -2
  2270. package/dist/ui/format.d.ts.map +1 -1
  2271. package/dist/ui/format.js +28 -7
  2272. package/dist/ui/format.js.map +1 -1
  2273. package/dist/ui/gantt.d.ts +52 -0
  2274. package/dist/ui/gantt.d.ts.map +1 -0
  2275. package/dist/ui/gantt.js +92 -0
  2276. package/dist/ui/gantt.js.map +1 -0
  2277. package/dist/ui/hooks.d.ts.map +1 -1
  2278. package/dist/ui/hooks.js +14 -0
  2279. package/dist/ui/hooks.js.map +1 -1
  2280. package/dist/ui/icons.d.ts.map +1 -1
  2281. package/dist/ui/icons.js +6 -1
  2282. package/dist/ui/icons.js.map +1 -1
  2283. package/dist/ui/index.d.ts +96 -15
  2284. package/dist/ui/index.d.ts.map +1 -1
  2285. package/dist/ui/index.js +79 -14
  2286. package/dist/ui/index.js.map +1 -1
  2287. package/dist/ui/layout.d.ts +43 -38
  2288. package/dist/ui/layout.d.ts.map +1 -1
  2289. package/dist/ui/layout.js +29 -37
  2290. package/dist/ui/layout.js.map +1 -1
  2291. package/dist/ui/list-page.d.ts +19 -0
  2292. package/dist/ui/list-page.d.ts.map +1 -0
  2293. package/dist/ui/list-page.js +21 -0
  2294. package/dist/ui/list-page.js.map +1 -0
  2295. package/dist/ui/media.d.ts.map +1 -1
  2296. package/dist/ui/media.js +1 -1
  2297. package/dist/ui/media.js.map +1 -1
  2298. package/dist/ui/modal.d.ts +26 -1
  2299. package/dist/ui/modal.d.ts.map +1 -1
  2300. package/dist/ui/modal.js +18 -2
  2301. package/dist/ui/modal.js.map +1 -1
  2302. package/dist/ui/nav.d.ts +21 -1
  2303. package/dist/ui/nav.d.ts.map +1 -1
  2304. package/dist/ui/nav.js +43 -8
  2305. package/dist/ui/nav.js.map +1 -1
  2306. package/dist/ui/navigation.d.ts +36 -2
  2307. package/dist/ui/navigation.d.ts.map +1 -1
  2308. package/dist/ui/navigation.js +60 -5
  2309. package/dist/ui/navigation.js.map +1 -1
  2310. package/dist/ui/partner.d.ts +18 -0
  2311. package/dist/ui/partner.d.ts.map +1 -0
  2312. package/dist/ui/partner.js +11 -0
  2313. package/dist/ui/partner.js.map +1 -0
  2314. package/dist/ui/primitives.d.ts +28 -10
  2315. package/dist/ui/primitives.d.ts.map +1 -1
  2316. package/dist/ui/primitives.js +21 -7
  2317. package/dist/ui/primitives.js.map +1 -1
  2318. package/dist/ui/product-media.d.ts +47 -0
  2319. package/dist/ui/product-media.d.ts.map +1 -0
  2320. package/dist/ui/product-media.js +67 -0
  2321. package/dist/ui/product-media.js.map +1 -0
  2322. package/dist/ui/product-variants.d.ts +68 -0
  2323. package/dist/ui/product-variants.d.ts.map +1 -0
  2324. package/dist/ui/product-variants.js +81 -0
  2325. package/dist/ui/product-variants.js.map +1 -0
  2326. package/dist/ui/record-detail.d.ts +70 -0
  2327. package/dist/ui/record-detail.d.ts.map +1 -0
  2328. package/dist/ui/record-detail.js +35 -0
  2329. package/dist/ui/record-detail.js.map +1 -0
  2330. package/dist/ui/record-page.d.ts +16 -0
  2331. package/dist/ui/record-page.d.ts.map +1 -0
  2332. package/dist/ui/record-page.js +13 -0
  2333. package/dist/ui/record-page.js.map +1 -0
  2334. package/dist/ui/record.d.ts +15 -3
  2335. package/dist/ui/record.d.ts.map +1 -1
  2336. package/dist/ui/record.js +6 -5
  2337. package/dist/ui/record.js.map +1 -1
  2338. package/dist/ui/state.d.ts +20 -1
  2339. package/dist/ui/state.d.ts.map +1 -1
  2340. package/dist/ui/state.js +17 -0
  2341. package/dist/ui/state.js.map +1 -1
  2342. package/dist/ui/surfaces.d.ts +30 -2
  2343. package/dist/ui/surfaces.d.ts.map +1 -1
  2344. package/dist/ui/surfaces.js +39 -2
  2345. package/dist/ui/surfaces.js.map +1 -1
  2346. package/dist/ui/table.d.ts +25 -2
  2347. package/dist/ui/table.d.ts.map +1 -1
  2348. package/dist/ui/table.js +10 -6
  2349. package/dist/ui/table.js.map +1 -1
  2350. package/dist/ui/timeframe.d.ts +39 -0
  2351. package/dist/ui/timeframe.d.ts.map +1 -0
  2352. package/dist/ui/timeframe.js +36 -0
  2353. package/dist/ui/timeframe.js.map +1 -0
  2354. package/dist/ui/workspace-page.d.ts +16 -0
  2355. package/dist/ui/workspace-page.d.ts.map +1 -0
  2356. package/dist/ui/workspace-page.js +15 -0
  2357. package/dist/ui/workspace-page.js.map +1 -0
  2358. package/package.json +16 -3
  2359. package/dist/modules/account/tt99.d.ts +0 -30
  2360. package/dist/modules/account/tt99.d.ts.map +0 -1
  2361. package/dist/modules/account/tt99.js +0 -1661
  2362. package/dist/modules/account/tt99.js.map +0 -1
  2363. package/dist/modules/account_backend/accounting-overview-screen.d.ts +0 -18
  2364. package/dist/modules/account_backend/accounting-overview-screen.d.ts.map +0 -1
  2365. package/dist/modules/account_backend/accounting-overview-screen.js +0 -104
  2366. package/dist/modules/account_backend/accounting-overview-screen.js.map +0 -1
  2367. package/dist/modules/account_backend/accounts-screen.d.ts +0 -13
  2368. package/dist/modules/account_backend/accounts-screen.d.ts.map +0 -1
  2369. package/dist/modules/account_backend/accounts-screen.js +0 -49
  2370. package/dist/modules/account_backend/accounts-screen.js.map +0 -1
  2371. package/dist/modules/account_backend/customer-invoices-screen.d.ts +0 -14
  2372. package/dist/modules/account_backend/customer-invoices-screen.d.ts.map +0 -1
  2373. package/dist/modules/account_backend/customer-invoices-screen.js +0 -63
  2374. package/dist/modules/account_backend/customer-invoices-screen.js.map +0 -1
  2375. package/dist/modules/account_backend/general-ledger-screen.d.ts +0 -13
  2376. package/dist/modules/account_backend/general-ledger-screen.d.ts.map +0 -1
  2377. package/dist/modules/account_backend/general-ledger-screen.js +0 -56
  2378. package/dist/modules/account_backend/general-ledger-screen.js.map +0 -1
  2379. package/dist/modules/account_backend/journal-entries-screen.d.ts +0 -14
  2380. package/dist/modules/account_backend/journal-entries-screen.d.ts.map +0 -1
  2381. package/dist/modules/account_backend/journal-entries-screen.js +0 -45
  2382. package/dist/modules/account_backend/journal-entries-screen.js.map +0 -1
  2383. package/dist/modules/account_backend/journals-screen.d.ts +0 -14
  2384. package/dist/modules/account_backend/journals-screen.d.ts.map +0 -1
  2385. package/dist/modules/account_backend/journals-screen.js +0 -53
  2386. package/dist/modules/account_backend/journals-screen.js.map +0 -1
  2387. package/dist/modules/account_backend/move-detail-screen.d.ts +0 -10
  2388. package/dist/modules/account_backend/move-detail-screen.d.ts.map +0 -1
  2389. package/dist/modules/account_backend/move-detail-screen.js +0 -100
  2390. package/dist/modules/account_backend/move-detail-screen.js.map +0 -1
  2391. package/dist/modules/account_backend/partner-ledger-screen.d.ts +0 -14
  2392. package/dist/modules/account_backend/partner-ledger-screen.d.ts.map +0 -1
  2393. package/dist/modules/account_backend/partner-ledger-screen.js +0 -69
  2394. package/dist/modules/account_backend/partner-ledger-screen.js.map +0 -1
  2395. package/dist/modules/account_backend/payment-terms-screen.d.ts +0 -14
  2396. package/dist/modules/account_backend/payment-terms-screen.d.ts.map +0 -1
  2397. package/dist/modules/account_backend/payment-terms-screen.js +0 -40
  2398. package/dist/modules/account_backend/payment-terms-screen.js.map +0 -1
  2399. package/dist/modules/account_backend/payments-screen.d.ts +0 -14
  2400. package/dist/modules/account_backend/payments-screen.d.ts.map +0 -1
  2401. package/dist/modules/account_backend/payments-screen.js +0 -54
  2402. package/dist/modules/account_backend/payments-screen.js.map +0 -1
  2403. package/dist/modules/account_backend/screens.d.ts +0 -7
  2404. package/dist/modules/account_backend/screens.d.ts.map +0 -1
  2405. package/dist/modules/account_backend/screens.js +0 -7
  2406. package/dist/modules/account_backend/screens.js.map +0 -1
  2407. package/dist/modules/account_backend/taxes-screen.d.ts +0 -15
  2408. package/dist/modules/account_backend/taxes-screen.d.ts.map +0 -1
  2409. package/dist/modules/account_backend/taxes-screen.js +0 -73
  2410. package/dist/modules/account_backend/taxes-screen.js.map +0 -1
  2411. package/dist/modules/account_backend/trial-balance-screen.d.ts +0 -13
  2412. package/dist/modules/account_backend/trial-balance-screen.d.ts.map +0 -1
  2413. package/dist/modules/account_backend/trial-balance-screen.js +0 -62
  2414. package/dist/modules/account_backend/trial-balance-screen.js.map +0 -1
  2415. package/dist/modules/account_backend/vendor-bills-screen.d.ts +0 -14
  2416. package/dist/modules/account_backend/vendor-bills-screen.d.ts.map +0 -1
  2417. package/dist/modules/account_backend/vendor-bills-screen.js +0 -59
  2418. package/dist/modules/account_backend/vendor-bills-screen.js.map +0 -1
  2419. package/dist/modules/account_partner_backend/screens.d.ts +0 -16
  2420. package/dist/modules/account_partner_backend/screens.d.ts.map +0 -1
  2421. package/dist/modules/account_partner_backend/screens.js +0 -26
  2422. package/dist/modules/account_partner_backend/screens.js.map +0 -1
  2423. package/dist/modules/activity_backend/screens.d.ts +0 -5
  2424. package/dist/modules/activity_backend/screens.d.ts.map +0 -1
  2425. package/dist/modules/activity_backend/screens.js +0 -52
  2426. package/dist/modules/activity_backend/screens.js.map +0 -1
  2427. package/dist/modules/address_backend/screens.d.ts +0 -31
  2428. package/dist/modules/address_backend/screens.d.ts.map +0 -1
  2429. package/dist/modules/address_backend/screens.js +0 -147
  2430. package/dist/modules/address_backend/screens.js.map +0 -1
  2431. package/dist/modules/backend/design/admin.css +0 -4229
  2432. package/dist/modules/backend/design/client/relation-select-view.d.mts +0 -5
  2433. package/dist/modules/backend/design/client/relation-select-view.d.mts.map +0 -1
  2434. package/dist/modules/backend/design/client/relation-select-view.mjs +0 -335
  2435. package/dist/modules/backend/design/client/relation-select-view.mjs.map +0 -1
  2436. package/dist/modules/calendar_backend/screens.d.ts +0 -5
  2437. package/dist/modules/calendar_backend/screens.d.ts.map +0 -1
  2438. package/dist/modules/calendar_backend/screens.js +0 -4
  2439. package/dist/modules/calendar_backend/screens.js.map +0 -1
  2440. package/dist/modules/company_backend/screens.d.ts +0 -62
  2441. package/dist/modules/company_backend/screens.d.ts.map +0 -1
  2442. package/dist/modules/company_backend/screens.js +0 -268
  2443. package/dist/modules/company_backend/screens.js.map +0 -1
  2444. package/dist/modules/crm_backend/list-search.d.ts +0 -21
  2445. package/dist/modules/crm_backend/list-search.d.ts.map +0 -1
  2446. package/dist/modules/crm_backend/list-search.js +0 -220
  2447. package/dist/modules/crm_backend/list-search.js.map +0 -1
  2448. package/dist/modules/crm_backend/screens.d.ts +0 -32
  2449. package/dist/modules/crm_backend/screens.d.ts.map +0 -1
  2450. package/dist/modules/crm_backend/screens.js +0 -405
  2451. package/dist/modules/crm_backend/screens.js.map +0 -1
  2452. package/dist/modules/hospitality_core/screens.d.ts +0 -773
  2453. package/dist/modules/hospitality_core/screens.d.ts.map +0 -1
  2454. package/dist/modules/hospitality_core/screens.js +0 -4152
  2455. package/dist/modules/hospitality_core/screens.js.map +0 -1
  2456. package/dist/modules/hr_backend/screens.d.ts +0 -9
  2457. package/dist/modules/hr_backend/screens.d.ts.map +0 -1
  2458. package/dist/modules/hr_backend/screens.js +0 -144
  2459. package/dist/modules/hr_backend/screens.js.map +0 -1
  2460. package/dist/modules/loyalty_backend/screens.d.ts +0 -33
  2461. package/dist/modules/loyalty_backend/screens.d.ts.map +0 -1
  2462. package/dist/modules/loyalty_backend/screens.js +0 -562
  2463. package/dist/modules/loyalty_backend/screens.js.map +0 -1
  2464. package/dist/modules/mail_backend/screens.d.ts +0 -5
  2465. package/dist/modules/mail_backend/screens.d.ts.map +0 -1
  2466. package/dist/modules/mail_backend/screens.js +0 -11
  2467. package/dist/modules/mail_backend/screens.js.map +0 -1
  2468. package/dist/modules/mail_inbound_backend/screens.d.ts +0 -5
  2469. package/dist/modules/mail_inbound_backend/screens.d.ts.map +0 -1
  2470. package/dist/modules/mail_inbound_backend/screens.js +0 -25
  2471. package/dist/modules/mail_inbound_backend/screens.js.map +0 -1
  2472. package/dist/modules/mail_transport_backend/screens.d.ts +0 -5
  2473. package/dist/modules/mail_transport_backend/screens.d.ts.map +0 -1
  2474. package/dist/modules/mail_transport_backend/screens.js +0 -35
  2475. package/dist/modules/mail_transport_backend/screens.js.map +0 -1
  2476. package/dist/modules/oauth_backend/screens.d.ts +0 -66
  2477. package/dist/modules/oauth_backend/screens.d.ts.map +0 -1
  2478. package/dist/modules/oauth_backend/screens.js +0 -323
  2479. package/dist/modules/oauth_backend/screens.js.map +0 -1
  2480. package/dist/modules/odoo_collaboration_import/functions.d.ts.map +0 -1
  2481. package/dist/modules/odoo_collaboration_import/functions.js +0 -128
  2482. package/dist/modules/odoo_collaboration_import/functions.js.map +0 -1
  2483. package/dist/modules/odoo_collaboration_import/index.d.ts +0 -6
  2484. package/dist/modules/odoo_collaboration_import/index.d.ts.map +0 -1
  2485. package/dist/modules/odoo_collaboration_import/index.js +0 -31
  2486. package/dist/modules/odoo_collaboration_import/index.js.map +0 -1
  2487. package/dist/modules/odoo_collaboration_import/models.d.ts.map +0 -1
  2488. package/dist/modules/odoo_collaboration_import/models.js +0 -76
  2489. package/dist/modules/odoo_collaboration_import/models.js.map +0 -1
  2490. package/dist/modules/odoo_collaboration_import/operations.d.ts +0 -14
  2491. package/dist/modules/odoo_collaboration_import/operations.d.ts.map +0 -1
  2492. package/dist/modules/odoo_collaboration_import/operations.js +0 -1139
  2493. package/dist/modules/odoo_collaboration_import/operations.js.map +0 -1
  2494. package/dist/modules/odoo_collaboration_import/relations.d.ts.map +0 -1
  2495. package/dist/modules/odoo_collaboration_import/relations.js +0 -19
  2496. package/dist/modules/odoo_collaboration_import/relations.js.map +0 -1
  2497. package/dist/modules/odoo_collaboration_import/types.d.ts +0 -58
  2498. package/dist/modules/odoo_collaboration_import/types.d.ts.map +0 -1
  2499. package/dist/modules/odoo_collaboration_import/types.js.map +0 -1
  2500. package/dist/modules/partner_backend/screens.d.ts +0 -53
  2501. package/dist/modules/partner_backend/screens.d.ts.map +0 -1
  2502. package/dist/modules/partner_backend/screens.js +0 -169
  2503. package/dist/modules/partner_backend/screens.js.map +0 -1
  2504. package/dist/modules/pricing_backend/screens.d.ts +0 -13
  2505. package/dist/modules/pricing_backend/screens.d.ts.map +0 -1
  2506. package/dist/modules/pricing_backend/screens.js +0 -182
  2507. package/dist/modules/pricing_backend/screens.js.map +0 -1
  2508. package/dist/modules/product_backend/attributes-screen.d.ts +0 -7
  2509. package/dist/modules/product_backend/attributes-screen.d.ts.map +0 -1
  2510. package/dist/modules/product_backend/attributes-screen.js +0 -76
  2511. package/dist/modules/product_backend/attributes-screen.js.map +0 -1
  2512. package/dist/modules/product_backend/create-screen.d.ts +0 -12
  2513. package/dist/modules/product_backend/create-screen.d.ts.map +0 -1
  2514. package/dist/modules/product_backend/create-screen.js +0 -83
  2515. package/dist/modules/product_backend/create-screen.js.map +0 -1
  2516. package/dist/modules/product_backend/screens.d.ts +0 -68
  2517. package/dist/modules/product_backend/screens.d.ts.map +0 -1
  2518. package/dist/modules/product_backend/screens.js +0 -388
  2519. package/dist/modules/product_backend/screens.js.map +0 -1
  2520. package/dist/modules/purchase_backend/screens.d.ts +0 -29
  2521. package/dist/modules/purchase_backend/screens.d.ts.map +0 -1
  2522. package/dist/modules/purchase_backend/screens.js +0 -324
  2523. package/dist/modules/purchase_backend/screens.js.map +0 -1
  2524. package/dist/modules/sale_backend/invoicing-policies-screen.d.ts +0 -14
  2525. package/dist/modules/sale_backend/invoicing-policies-screen.d.ts.map +0 -1
  2526. package/dist/modules/sale_backend/invoicing-policies-screen.js +0 -36
  2527. package/dist/modules/sale_backend/invoicing-policies-screen.js.map +0 -1
  2528. package/dist/modules/sale_backend/order-detail-screen.d.ts +0 -18
  2529. package/dist/modules/sale_backend/order-detail-screen.d.ts.map +0 -1
  2530. package/dist/modules/sale_backend/order-detail-screen.js +0 -217
  2531. package/dist/modules/sale_backend/order-detail-screen.js.map +0 -1
  2532. package/dist/modules/sale_backend/quotations-screen.d.ts +0 -15
  2533. package/dist/modules/sale_backend/quotations-screen.d.ts.map +0 -1
  2534. package/dist/modules/sale_backend/quotations-screen.js +0 -64
  2535. package/dist/modules/sale_backend/quotations-screen.js.map +0 -1
  2536. package/dist/modules/sale_backend/sales-orders-screen.d.ts +0 -12
  2537. package/dist/modules/sale_backend/sales-orders-screen.d.ts.map +0 -1
  2538. package/dist/modules/sale_backend/sales-orders-screen.js +0 -65
  2539. package/dist/modules/sale_backend/sales-orders-screen.js.map +0 -1
  2540. package/dist/modules/sale_backend/screens.d.ts +0 -23
  2541. package/dist/modules/sale_backend/screens.d.ts.map +0 -1
  2542. package/dist/modules/sale_backend/screens.js +0 -275
  2543. package/dist/modules/sale_backend/screens.js.map +0 -1
  2544. package/dist/modules/stock_backend/forecast-screen.d.ts +0 -28
  2545. package/dist/modules/stock_backend/forecast-screen.d.ts.map +0 -1
  2546. package/dist/modules/stock_backend/forecast-screen.js +0 -108
  2547. package/dist/modules/stock_backend/forecast-screen.js.map +0 -1
  2548. package/dist/modules/stock_backend/inventory-screen.d.ts +0 -27
  2549. package/dist/modules/stock_backend/inventory-screen.d.ts.map +0 -1
  2550. package/dist/modules/stock_backend/inventory-screen.js +0 -141
  2551. package/dist/modules/stock_backend/inventory-screen.js.map +0 -1
  2552. package/dist/modules/stock_backend/locations-screen.d.ts +0 -18
  2553. package/dist/modules/stock_backend/locations-screen.d.ts.map +0 -1
  2554. package/dist/modules/stock_backend/locations-screen.js +0 -92
  2555. package/dist/modules/stock_backend/locations-screen.js.map +0 -1
  2556. package/dist/modules/stock_backend/lot-screen.d.ts +0 -30
  2557. package/dist/modules/stock_backend/lot-screen.d.ts.map +0 -1
  2558. package/dist/modules/stock_backend/lot-screen.js +0 -86
  2559. package/dist/modules/stock_backend/lot-screen.js.map +0 -1
  2560. package/dist/modules/stock_backend/lots-screen.d.ts +0 -21
  2561. package/dist/modules/stock_backend/lots-screen.d.ts.map +0 -1
  2562. package/dist/modules/stock_backend/lots-screen.js +0 -79
  2563. package/dist/modules/stock_backend/lots-screen.js.map +0 -1
  2564. package/dist/modules/stock_backend/picking-types-screen.d.ts +0 -21
  2565. package/dist/modules/stock_backend/picking-types-screen.d.ts.map +0 -1
  2566. package/dist/modules/stock_backend/picking-types-screen.js +0 -110
  2567. package/dist/modules/stock_backend/picking-types-screen.js.map +0 -1
  2568. package/dist/modules/stock_backend/replenishment-screen.d.ts +0 -29
  2569. package/dist/modules/stock_backend/replenishment-screen.d.ts.map +0 -1
  2570. package/dist/modules/stock_backend/replenishment-screen.js +0 -131
  2571. package/dist/modules/stock_backend/replenishment-screen.js.map +0 -1
  2572. package/dist/modules/stock_backend/screens.d.ts +0 -14
  2573. package/dist/modules/stock_backend/screens.d.ts.map +0 -1
  2574. package/dist/modules/stock_backend/screens.js +0 -40
  2575. package/dist/modules/stock_backend/screens.js.map +0 -1
  2576. package/dist/modules/stock_backend/stock-route-screen.d.ts +0 -30
  2577. package/dist/modules/stock_backend/stock-route-screen.d.ts.map +0 -1
  2578. package/dist/modules/stock_backend/stock-route-screen.js +0 -129
  2579. package/dist/modules/stock_backend/stock-route-screen.js.map +0 -1
  2580. package/dist/modules/stock_backend/stock-routes-screen.d.ts +0 -17
  2581. package/dist/modules/stock_backend/stock-routes-screen.d.ts.map +0 -1
  2582. package/dist/modules/stock_backend/stock-routes-screen.js +0 -60
  2583. package/dist/modules/stock_backend/stock-routes-screen.js.map +0 -1
  2584. package/dist/modules/stock_backend/transfer-screen.d.ts +0 -26
  2585. package/dist/modules/stock_backend/transfer-screen.d.ts.map +0 -1
  2586. package/dist/modules/stock_backend/transfer-screen.js +0 -95
  2587. package/dist/modules/stock_backend/transfer-screen.js.map +0 -1
  2588. package/dist/modules/stock_backend/transfers-screen.d.ts +0 -21
  2589. package/dist/modules/stock_backend/transfers-screen.d.ts.map +0 -1
  2590. package/dist/modules/stock_backend/transfers-screen.js +0 -88
  2591. package/dist/modules/stock_backend/transfers-screen.js.map +0 -1
  2592. package/dist/modules/stock_backend/warehouses-screen.d.ts +0 -17
  2593. package/dist/modules/stock_backend/warehouses-screen.d.ts.map +0 -1
  2594. package/dist/modules/stock_backend/warehouses-screen.js +0 -96
  2595. package/dist/modules/stock_backend/warehouses-screen.js.map +0 -1
  2596. package/dist/modules/user_backend/screens.d.ts +0 -70
  2597. package/dist/modules/user_backend/screens.d.ts.map +0 -1
  2598. package/dist/modules/user_backend/screens.js +0 -308
  2599. package/dist/modules/user_backend/screens.js.map +0 -1
  2600. package/dist/modules/website/customer-routes.d.ts +0 -3
  2601. package/dist/modules/website/customer-routes.d.ts.map +0 -1
  2602. package/dist/modules/website/customer-routes.js +0 -322
  2603. package/dist/modules/website/customer-routes.js.map +0 -1
  2604. package/dist/modules/website_backend/screens.d.ts +0 -114
  2605. package/dist/modules/website_backend/screens.d.ts.map +0 -1
  2606. package/dist/modules/website_backend/screens.js +0 -625
  2607. package/dist/modules/website_backend/screens.js.map +0 -1
  2608. package/dist/ui/client/mail.d.mts +0 -11
  2609. package/dist/ui/client/mail.d.mts.map +0 -1
  2610. package/dist/ui/client/mail.mjs +0 -10
  2611. package/dist/ui/client/mail.mjs.map +0 -1
  2612. /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/functions.d.ts +0 -0
  2613. /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/models.d.ts +0 -0
  2614. /package/dist/modules/{odoo_collaboration_import → address_backend/screens}/types.js +0 -0
  2615. /package/dist/modules/{odoo_collaboration_import → manufacturing}/relations.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { asc, bucketEq, compileListFilter, deleteFrom, desc, eq, from, inArray, isNull, like, or, } from '@ketvietlab/ketjs';
2
+ import { and, asc, bucketEq, compileListFilter, deleteFrom, desc, eq, from, inArray, isNull, like, lt, ne, not, or, } from '@ketvietlab/ketjs';
3
3
  import { addDays, cancelActivity, completeActivity, scheduleActivity } from '../activity/index.js';
4
4
  import { ensureThread } from '../mail/index.js';
5
5
  import { CASE_KINDS, CASE_PRIORITIES, MESSAGE_VISIBILITIES } from './types.js';
@@ -12,18 +12,38 @@ export const issue = (field, code, params) => ({
12
12
  export const invalid = (...errors) => ({ ok: false, errors });
13
13
  export const now = () => new Date().toISOString();
14
14
  export const n = (value) => Number(value ?? 0);
15
+ /**
16
+ * When a case stops being open, it acquires a closing date.
17
+ *
18
+ * Reporting reads `closedAt` for cycle time, so it has to be written the moment
19
+ * a stage carries a terminal state and cleared again when the case is pulled
20
+ * back into the pipeline. A case that closes twice keeps the first date.
21
+ */
22
+ export const closedAtFor = (held, terminalState, timestamp) => terminalState === 'won' || terminalState === 'lost' ? (held.closedAt ?? timestamp) : null;
15
23
  export const normalized = (value) => String(value ?? '')
16
24
  .normalize('NFKC')
17
25
  .trim()
18
26
  .toLowerCase();
19
- const jsonStrings = (value) => Array.isArray(value)
20
- ? [
21
- ...new Set(value
22
- .map(String)
23
- .map((item) => item.trim())
24
- .filter(Boolean)),
25
- ]
26
- : [];
27
+ /** Digits only, so `+84 90 123 4567` and `090-123-4567` compare equal. */
28
+ export const dialled = (value) => String(value ?? '').replace(/\D/g, '');
29
+ const jsonStrings = (value) => {
30
+ if (typeof value === 'string') {
31
+ try {
32
+ return jsonStrings(JSON.parse(value));
33
+ }
34
+ catch {
35
+ return [];
36
+ }
37
+ }
38
+ return Array.isArray(value)
39
+ ? [
40
+ ...new Set(value
41
+ .map(String)
42
+ .map((item) => item.trim())
43
+ .filter(Boolean)),
44
+ ]
45
+ : [];
46
+ };
27
47
  export const actorRequired = (ctx) => ctx.actor || null;
28
48
  export const commandKey = (value) => {
29
49
  const key = String(value ?? '').trim();
@@ -76,20 +96,52 @@ const defaultStages = [
76
96
  fold: true,
77
97
  },
78
98
  ];
99
+ /**
100
+ * A seed row this company owns, whatever id it ended up carrying.
101
+ *
102
+ * `id` is the primary key across the whole tenant while the rows themselves are
103
+ * company scoped, so the second company to be seeded cannot reuse `crm-stage-new`
104
+ * — its insert hits `ON CONFLICT DO NOTHING` and vanishes. It gets the same row
105
+ * under a company-qualified id instead, and this is how a caller finds whichever
106
+ * of the two shapes is actually theirs.
107
+ */
108
+ export const seededId = async (ctx, model, id) => {
109
+ if ((await ctx.db.select(model, { id }))[0])
110
+ return id;
111
+ const scoped = `${String(ctx.scope.company ?? '')}:${id}`;
112
+ return (await ctx.db.select(model, { id: scoped }))[0] ? scoped : null;
113
+ };
114
+ /** The activity type CRM schedules against when the caller names none. */
115
+ export const crmActivityType = (ctx) => seededId(ctx, 'activity.Type', 'crm-next-action');
79
116
  /** Idempotent seed used by named E2E fixtures and by the first write on a fresh company. */
80
117
  export async function ensureCrmDefaults(ctx) {
81
- await ctx.db.insertIfAbsent('crm.Team', {
118
+ const company = String(ctx.scope.company ?? '');
119
+ const seed = async (model, row) => {
120
+ // Already seeded here, under either id.
121
+ if (await seededId(ctx, model, String(row.id)))
122
+ return;
123
+ const inserted = await ctx.db.insertIfAbsent(model, row);
124
+ if ('dryRun' in inserted || inserted.inserted)
125
+ return;
126
+ // The plain id belongs to another company. Take the qualified one, which is
127
+ // the difference between a working pipeline and a company whose every case
128
+ // is refused for having no stage to sit in.
129
+ if (company)
130
+ await ctx.db.insertIfAbsent(model, { ...row, id: `${company}:${String(row.id)}` });
131
+ };
132
+ await seed('crm.Team', {
82
133
  id: 'crm-team-sales',
83
134
  code: 'sales',
84
135
  name: 'Sales',
85
136
  active: true,
137
+ leaderUserId: ctx.actor ?? null,
86
138
  assignmentMode: 'round_robin',
87
139
  assignmentCursor: 0,
88
140
  version: 1,
89
141
  });
90
142
  for (const stage of defaultStages)
91
- await ctx.db.insertIfAbsent('crm.Stage', { ...stage, active: true });
92
- await ctx.db.insertIfAbsent('activity.Type', {
143
+ await seed('crm.Stage', { ...stage, active: true });
144
+ await seed('activity.Type', {
93
145
  id: 'crm-next-action',
94
146
  name: 'CRM next action',
95
147
  category: 'call',
@@ -127,33 +179,70 @@ export async function addTimeline(ctx, input) {
127
179
  const partnerExists = async (ctx, id) => !id || Boolean((await ctx.db.select('partner.Partner', { id, active: true }))[0]);
128
180
  const userExists = async (ctx, id) => !id || Boolean((await ctx.db.select('user.User', { id, active: true }))[0]);
129
181
  const teamExists = async (ctx, id) => !id || Boolean((await ctx.db.select('crm.Team', { id, active: true }))[0]);
130
- async function canReadCase(ctx, row) {
182
+ const ACCESS_SCOPES = ['none', 'self', 'team', 'company'];
183
+ const accessScope = (value, fallback) => ACCESS_SCOPES.includes(String(value)) ? String(value) : fallback;
184
+ /**
185
+ * Resolve record access independently for view, edit and assignment.
186
+ *
187
+ * `null` means "everything": either the call carries no actor at all — a job or
188
+ * a fixture running as the system — or the actor is a superuser. Ordinary users
189
+ * default to owner-private access. Team leaders get their teams for every action,
190
+ * while an explicit company-scoped grant is the business-manager alternative to
191
+ * making somebody a technical superuser.
192
+ */
193
+ export async function caseAudience(ctx, action = 'view') {
131
194
  if (!ctx.actor)
132
- return true;
195
+ return null;
133
196
  const user = (await ctx.db.select('user.User', { id: ctx.actor, active: true }))[0];
134
197
  if (user?.superuser === true)
198
+ return null;
199
+ const [memberships, ledTeams, grant] = await Promise.all([
200
+ ctx.db.select('crm.TeamMember', { userId: ctx.actor, active: true }),
201
+ ctx.db.select('crm.Team', { leaderUserId: ctx.actor, active: true }),
202
+ ctx.db.select('crm.AccessGrant', { userId: ctx.actor, active: true }).then((rows) => rows[0] ?? null),
203
+ ]);
204
+ const memberTeams = [...new Set(memberships.map((row) => String(row.teamId)))];
205
+ const leaderTeams = [...new Set(ledTeams.map((row) => String(row.id)))];
206
+ const scope = accessScope(grant?.[`${action}Scope`], action === 'view' ? 'self' : action === 'edit' ? 'self' : 'self');
207
+ if (scope === 'company')
208
+ return null;
209
+ const teams = scope === 'team' ? [...new Set([...memberTeams, ...leaderTeams])] : leaderTeams;
210
+ const queueTeams = action === 'edit' || scope === 'none' ? [] : memberTeams;
211
+ return { actor: ctx.actor, action, scope, teams, queueTeams };
212
+ }
213
+ const audienceHolds = (audience, row) => {
214
+ if (!audience)
135
215
  return true;
136
- if (row.assigneeUserId === ctx.actor)
216
+ const teamId = row.teamId ? String(row.teamId) : null;
217
+ if (teamId && audience.teams.includes(teamId))
137
218
  return true;
138
- if (!row.teamId)
139
- return row.createdByUserId === ctx.actor;
140
- return Boolean((await ctx.db.select('crm.TeamMember', {
141
- teamId: row.teamId,
142
- userId: ctx.actor,
143
- active: true,
144
- }))[0]);
219
+ if (audience.scope !== 'none' && row.assigneeUserId === audience.actor)
220
+ return true;
221
+ return Boolean(audience.action !== 'edit' && !row.assigneeUserId && teamId && audience.queueTeams.includes(teamId));
222
+ };
223
+ export async function canReadCase(ctx, row) {
224
+ return audienceHolds(await caseAudience(ctx, 'view'), row);
145
225
  }
146
- export async function visibleCases(ctx, rows) {
147
- if (!ctx.actor)
148
- return rows;
149
- const user = (await ctx.db.select('user.User', { id: ctx.actor, active: true }))[0];
150
- if (user?.superuser === true)
151
- return rows;
152
- const memberships = await ctx.db.select('crm.TeamMember', { userId: ctx.actor, active: true });
153
- const teams = new Set(memberships.map((membership) => String(membership.teamId)));
154
- return rows.filter((row) => row.assigneeUserId === ctx.actor ||
155
- row.createdByUserId === ctx.actor ||
156
- (row.teamId && teams.has(String(row.teamId))));
226
+ export async function canEditCase(ctx, row) {
227
+ return audienceHolds(await caseAudience(ctx, 'edit'), row);
228
+ }
229
+ export async function canAssignCase(ctx, row) {
230
+ return audienceHolds(await caseAudience(ctx, 'assign'), row);
231
+ }
232
+ /**
233
+ * `crm.Case` is a shared header, and a module that depends on the CRM may store
234
+ * its own `kind` on it — a support ticket, a warranty claim, whatever that
235
+ * module is for. Those rows are not the CRM's to show: its list offers "convert
236
+ * to opportunity", its detail screen saves through `case.save`, which refuses a
237
+ * kind it does not know, and its duplicate finder would offer to merge a ticket
238
+ * into a lead. So every CRM read is scoped to the two kinds this module owns,
239
+ * and the owning module answers for the rest through its own functions.
240
+ */
241
+ export const ownedKinds = () => [...CASE_KINDS];
242
+ export const ownsKind = (kind) => CASE_KINDS.includes(String(kind));
243
+ export async function visibleCases(ctx, rows, action = 'view') {
244
+ const audience = await caseAudience(ctx, action);
245
+ return audience ? rows.filter((row) => audienceHolds(audience, row)) : rows;
157
246
  }
158
247
  export async function saveCase(ctx, input, options = {}) {
159
248
  if (!commandKey(input.idempotencyKey))
@@ -177,7 +266,7 @@ export async function saveCase(ctx, input, options = {}) {
177
266
  const run = async (tx) => {
178
267
  await ensureCrmDefaults(tx);
179
268
  const existing = (await tx.db.select('crm.Case', { id: input.id }))[0];
180
- if (existing && !(await canReadCase(tx, existing)))
269
+ if (existing && !(await canEditCase(tx, existing)))
181
270
  return invalid(issue('id', 'crm.error.notFound'));
182
271
  if (existing && existing.kind !== input.kind)
183
272
  return invalid(issue('kind', 'crm.error.leadConversion'));
@@ -186,9 +275,30 @@ export async function saveCase(ctx, input, options = {}) {
186
275
  : await firstStage(tx, input.kind);
187
276
  if (!stage)
188
277
  return invalid(issue('stageId', 'crm.error.invalidStage'));
189
- const teamId = input.teamId ?? stage.teamId ?? 'crm-team-sales';
190
- if (!(await teamExists(tx, teamId)))
278
+ const teamId = input.teamId ?? existing?.teamId ?? stage.teamId ?? (await seededId(tx, 'crm.Team', 'crm-team-sales'));
279
+ if (!teamId || !(await teamExists(tx, teamId)))
191
280
  return invalid(issue('teamId', 'crm.error.notFound'));
281
+ if (existing) {
282
+ if (input.teamId && String(input.teamId) !== String(existing.teamId ?? ''))
283
+ return invalid(issue('teamId', 'crm.error.permission'));
284
+ if (input.assigneeUserId && String(input.assigneeUserId) !== String(existing.assigneeUserId ?? ''))
285
+ return invalid(issue('assigneeUserId', 'crm.error.permission'));
286
+ }
287
+ else {
288
+ const candidate = { teamId, assigneeUserId: input.assigneeUserId || null };
289
+ if (!(await canAssignCase(tx, candidate)))
290
+ return invalid(issue('assigneeUserId', 'crm.error.permission'));
291
+ if (input.assigneeUserId) {
292
+ const team = (await tx.db.select('crm.Team', { id: teamId, active: true }))[0];
293
+ const member = (await tx.db.select('crm.TeamMember', {
294
+ teamId,
295
+ userId: input.assigneeUserId,
296
+ active: true,
297
+ }))[0];
298
+ if (!member && team?.leaderUserId !== input.assigneeUserId)
299
+ return invalid(issue('assigneeUserId', 'crm.error.notTeamMember'));
300
+ }
301
+ }
192
302
  const timestamp = now();
193
303
  const nextVersion = n(existing?.version) + 1;
194
304
  const values = {
@@ -198,8 +308,9 @@ export async function saveCase(ctx, input, options = {}) {
198
308
  contactName: input.contactName?.trim() || null,
199
309
  email: normalized(input.email) || null,
200
310
  phone: String(input.phone ?? '').trim() || null,
311
+ phoneDigits: dialled(input.phone) || null,
201
312
  teamId,
202
- assigneeUserId: input.assigneeUserId || null,
313
+ assigneeUserId: existing?.assigneeUserId ?? input.assigneeUserId ?? null,
203
314
  stageId: stage.id,
204
315
  priority: input.priority ?? existing?.priority ?? '1',
205
316
  description: input.description?.trim() || null,
@@ -210,6 +321,7 @@ export async function saveCase(ctx, input, options = {}) {
210
321
  active: true,
211
322
  version: nextVersion,
212
323
  score: existing?.score ?? '0',
324
+ closedAt: closedAtFor(existing ?? {}, stage.terminalState, timestamp),
213
325
  updatedAt: timestamp,
214
326
  };
215
327
  if (existing) {
@@ -277,10 +389,45 @@ export async function saveCase(ctx, input, options = {}) {
277
389
  customerVisible: false,
278
390
  occurredAt: timestamp,
279
391
  });
392
+ // Scoring rules read the fields this write just changed, so the score is
393
+ // stale the moment the case is saved. One job per case, keyed on the case,
394
+ // so a run of edits collapses into a single rescore.
395
+ await tx.jobs.enqueue('crm.score', { caseId: input.id, reason: `save:v${nextVersion}` }, { uniqueKey: `crm.score:${input.id}` });
280
396
  return { ok: true, id: input.id, version: nextVersion };
281
397
  };
282
398
  return options.inTransaction ? run(ctx) : ctx.tx(run);
283
399
  }
400
+ /**
401
+ * The soonest activity still owed on each case, and whether it is late.
402
+ *
403
+ * A pipeline card is read to decide what to do next, and "next" is a date: the
404
+ * board used to show a name, an amount and an owner, none of which say whether
405
+ * anyone has touched the case this month. Batched over the whole page — the
406
+ * per-card version of this was the read that made the old planner screen slow.
407
+ */
408
+ const nextActivityByCase = async (ctx, caseIds) => {
409
+ if (!caseIds.length)
410
+ return new Map();
411
+ const L = ctx.table('crm.ActivityLink');
412
+ const links = await ctx.db.all(from(L).where(inArray(L.caseId, caseIds)));
413
+ const activityIds = [...new Set(links.map((link) => String(link.activityId)))];
414
+ if (!activityIds.length)
415
+ return new Map();
416
+ const A = ctx.table('activity.Activity');
417
+ const activities = await ctx.db.all(from(A).where(inArray(A.id, activityIds), eq(A.active, true), isNull(A.doneAt), isNull(A.canceledAt)));
418
+ const activityBy = new Map(activities.map((row) => [String(row.id), row]));
419
+ const soonest = new Map();
420
+ for (const link of links) {
421
+ const activity = activityBy.get(String(link.activityId));
422
+ if (!activity)
423
+ continue;
424
+ const caseId = String(link.caseId);
425
+ const held = soonest.get(caseId);
426
+ if (!held || String(activity.dueDate ?? '') < String(held.dueDate ?? ''))
427
+ soonest.set(caseId, activity);
428
+ }
429
+ return soonest;
430
+ };
284
431
  export async function serializeCaseList(ctx, rows) {
285
432
  const ids = (values) => [...new Set(values.filter(Boolean).map(String))];
286
433
  const stageIds = ids(rows.map((row) => row.stageId));
@@ -299,25 +446,71 @@ export async function serializeCaseList(ctx, rows) {
299
446
  const partners = partnerIds.length
300
447
  ? await ctx.db.all(from(ctx.table('partner.Partner')).where(inArray(ctx.table('partner.Partner').id, partnerIds)))
301
448
  : [];
449
+ // The money a case is worth lives one table over, and every screen that lists
450
+ // cases wants it: a pipeline column without amounts is a list of names.
451
+ const caseIds = ids(rows.map((row) => row.id));
452
+ const details = caseIds.length
453
+ ? await ctx.db.all(from(ctx.table('crm.SalesDetail')).where(inArray(ctx.table('crm.SalesDetail').caseId, caseIds)))
454
+ : [];
455
+ // Tags and the next activity are what a card is scanned for, so they are read
456
+ // with the page rather than one query per card on the screen that wants them.
457
+ const links = caseIds.length
458
+ ? await ctx.db.all(from(ctx.table('crm.CaseTag')).where(inArray(ctx.table('crm.CaseTag').caseId, caseIds)))
459
+ : [];
460
+ const tagIds = ids(links.map((link) => link.tagId));
461
+ const tags = tagIds.length
462
+ ? await ctx.db.all(from(ctx.table('crm.Tag')).where(inArray(ctx.table('crm.Tag').id, tagIds)))
463
+ : [];
464
+ const tagBy = new Map(tags.map((tag) => [String(tag.id), tag]));
465
+ const tagsByCase = new Map();
466
+ for (const link of links) {
467
+ const tag = tagBy.get(String(link.tagId));
468
+ if (!tag || tag.active === false)
469
+ continue;
470
+ tagsByCase.set(String(link.caseId), [...(tagsByCase.get(String(link.caseId)) ?? []), tag]);
471
+ }
472
+ const activityByCase = await nextActivityByCase(ctx, caseIds);
473
+ const today = now().slice(0, 10);
302
474
  const by = (values) => new Map(values.map((row) => [String(row.id), row]));
303
475
  const stageBy = by(stages);
304
476
  const teamBy = by(teams);
305
477
  const userBy = by(users);
306
478
  const partnerBy = by(partners);
307
- return rows.map((row) => ({
308
- ...row,
309
- stageCode: stageBy.get(String(row.stageId))?.code ?? null,
310
- stageName: stageBy.get(String(row.stageId))?.name ?? row.stageId,
311
- teamName: row.teamId ? (teamBy.get(String(row.teamId))?.name ?? row.teamId) : null,
312
- assigneeName: row.assigneeUserId
313
- ? (userBy.get(String(row.assigneeUserId))?.name ?? row.assigneeUserId)
314
- : null,
315
- partnerName: row.partnerId ? (partnerBy.get(String(row.partnerId))?.name ?? row.partnerId) : null,
316
- }));
479
+ const detailBy = new Map(details.map((row) => [String(row.caseId), row]));
480
+ return rows.map((row) => {
481
+ const detail = detailBy.get(String(row.id));
482
+ const activity = activityByCase.get(String(row.id));
483
+ return {
484
+ ...row,
485
+ stageCode: stageBy.get(String(row.stageId))?.code ?? null,
486
+ stageName: stageBy.get(String(row.stageId))?.name ?? row.stageId,
487
+ teamName: row.teamId ? (teamBy.get(String(row.teamId))?.name ?? row.teamId) : null,
488
+ assigneeName: row.assigneeUserId
489
+ ? (userBy.get(String(row.assigneeUserId))?.name ?? row.assigneeUserId)
490
+ : null,
491
+ partnerName: row.partnerId ? (partnerBy.get(String(row.partnerId))?.name ?? row.partnerId) : null,
492
+ expectedRevenue: detail?.expectedRevenue ?? '0',
493
+ probability: detail?.probability ?? '0',
494
+ expectedClosing: detail?.expectedClosing ?? null,
495
+ tags: (tagsByCase.get(String(row.id)) ?? []).map((tag) => ({
496
+ id: String(tag.id),
497
+ name: String(tag.name),
498
+ color: tag.color == null ? null : String(tag.color),
499
+ })),
500
+ nextActivity: activity
501
+ ? {
502
+ id: String(activity.id),
503
+ summary: String(activity.summary ?? ''),
504
+ dueDate: activity.dueDate == null ? null : String(activity.dueDate),
505
+ overdue: activity.dueDate != null && String(activity.dueDate) < today,
506
+ }
507
+ : null,
508
+ };
509
+ });
317
510
  }
318
511
  export async function caseDetail(ctx, id) {
319
512
  const row = (await ctx.db.select('crm.Case', { id }))[0];
320
- if (!row || !(await canReadCase(ctx, row)))
513
+ if (!row || !ownsKind(row.kind) || !(await canReadCase(ctx, row)))
321
514
  return null;
322
515
  const [serialized] = await serializeCaseList(ctx, [row]);
323
516
  const [salesDetail, tags, timeline, messages, activityLinks, calendarLinks, attachments] = await Promise.all([
@@ -345,6 +538,22 @@ export async function caseDetail(ctx, id) {
345
538
  const meetings = eventIds.length
346
539
  ? await ctx.db.all(from(ctx.table('calendar.Event')).where(inArray(ctx.table('calendar.Event').id, eventIds)))
347
540
  : [];
541
+ const stages = (await ctx.db.select('crm.Stage', { active: true }))
542
+ .filter((stage) => stageKinds(stage).includes(String(row.kind)))
543
+ .sort((a, b) => n(a.sequence) - n(b.sequence) || String(a.id).localeCompare(String(b.id)));
544
+ const team = row.teamId
545
+ ? ((await ctx.db.select('crm.Team', { id: row.teamId, active: true }))[0] ?? null)
546
+ : null;
547
+ const memberships = team ? await ctx.db.select('crm.TeamMember', { teamId: team.id, active: true }) : [];
548
+ const assigneeIds = [
549
+ ...memberships.map((member) => String(member.userId)),
550
+ ...(team?.leaderUserId ? [String(team.leaderUserId)] : []),
551
+ ...(row.assigneeUserId ? [String(row.assigneeUserId)] : []),
552
+ ].filter((userId, index, values) => values.indexOf(userId) === index);
553
+ const assignees = assigneeIds.length
554
+ ? await ctx.db.all(from(ctx.table('user.User')).where(inArray(ctx.table('user.User').id, assigneeIds), eq(ctx.table('user.User').active, true)))
555
+ : [];
556
+ const userById = new Map(assignees.map((user) => [String(user.id), user]));
348
557
  return {
349
558
  ...serialized,
350
559
  salesDetail: salesDetail[0] ?? null,
@@ -354,9 +563,34 @@ export async function caseDetail(ctx, id) {
354
563
  attachments,
355
564
  activities,
356
565
  meetings,
566
+ stageOptions: stages.map((stage) => ({
567
+ id: String(stage.id),
568
+ name: String(stage.name),
569
+ terminalState: String(stage.terminalState),
570
+ })),
571
+ assigneeOptions: assigneeIds
572
+ .map((userId) => userById.get(userId))
573
+ .filter((user) => Boolean(user))
574
+ .map((user) => ({ id: String(user.id), name: String(user.name) }))
575
+ .sort((left, right) => left.name.localeCompare(right.name) || left.id.localeCompare(right.id)),
357
576
  };
358
577
  }
359
578
  const listStateOf = (value) => value && typeof value === 'object' ? value : null;
579
+ const caseAudienceCondition = async (ctx, C, action = 'view') => {
580
+ const audience = await caseAudience(ctx, action);
581
+ if (!audience)
582
+ return null;
583
+ const clauses = [];
584
+ if (audience.scope !== 'none')
585
+ clauses.push(eq(C.assigneeUserId, audience.actor));
586
+ if (audience.teams.length)
587
+ clauses.push(inArray(C.teamId, audience.teams));
588
+ if (action !== 'edit' && audience.queueTeams.length)
589
+ clauses.push(and(isNull(C.assigneeUserId), inArray(C.teamId, audience.queueTeams)));
590
+ if (!clauses.length)
591
+ return inArray(C.id, []);
592
+ return clauses.length === 1 ? clauses[0] : or(...clauses);
593
+ };
360
594
  const caseQuery = async (ctx, args) => {
361
595
  const C = ctx.table('crm.Case');
362
596
  const state = listStateOf(args.listState) ?? emptyCaseListState();
@@ -379,28 +613,27 @@ const caseQuery = async (ctx, args) => {
379
613
  ? bucketEq(field.col, selected.interval, timezone, String(value))
380
614
  : eq(field.col, value));
381
615
  }
382
- if (args.kind)
383
- query = query.where(eq(C.kind, args.kind));
616
+ query = query.where(args.kind && ownsKind(args.kind) ? eq(C.kind, args.kind) : inArray(C.kind, ownedKinds()));
384
617
  if (args.stageId)
385
618
  query = query.where(eq(C.stageId, args.stageId));
386
619
  if (args.teamId)
387
620
  query = query.where(eq(C.teamId, args.teamId));
388
621
  if (args.assigneeUserId)
389
622
  query = query.where(eq(C.assigneeUserId, args.assigneeUserId));
623
+ // "Mine" is answered from the session rather than from a user id in the URL:
624
+ // a link carrying somebody else's id would otherwise read as their board while
625
+ // silently returning only the rows the audience filter already allowed.
626
+ if (args.mine === true)
627
+ query = query.where(eq(C.assigneeUserId, ctx.actor ?? ''));
390
628
  if (args.terminalState)
391
629
  query = query.where(eq(C.terminalState, args.terminalState));
392
630
  if (!state.includeArchived && args.includeArchived !== true)
393
631
  query = query.where(eq(C.active, true));
394
632
  if (args.search)
395
633
  query = query.where(like(C.name, `%${String(args.search).trim()}%`));
396
- if (ctx.actor) {
397
- const user = (await ctx.db.select('user.User', { id: ctx.actor, active: true }))[0];
398
- if (user?.superuser !== true) {
399
- const memberships = await ctx.db.select('crm.TeamMember', { userId: ctx.actor, active: true });
400
- const teams = [...new Set(memberships.map((membership) => String(membership.teamId)))];
401
- query = query.where(or(eq(C.assigneeUserId, ctx.actor), eq(C.createdByUserId, ctx.actor), ...(teams.length ? [inArray(C.teamId, teams)] : [])));
402
- }
403
- }
634
+ const audience = await caseAudienceCondition(ctx, C);
635
+ if (audience)
636
+ query = query.where(audience);
404
637
  const sorts = state.sort.length ? state.sort : emptyCaseListState().sort;
405
638
  const sortable = new Map((spec.sortable ?? []).map((field) => [field.key, field.col]));
406
639
  for (const sort of sorts) {
@@ -424,6 +657,124 @@ export async function listCases(ctx, args) {
424
657
  nextCursor: offset + limit < total ? String(offset + limit) : null,
425
658
  };
426
659
  }
660
+ /**
661
+ * What the pipeline header states, counted over the whole board rather than the page.
662
+ *
663
+ * The columns show forty cards each, so totals taken from what is on screen are
664
+ * the totals of a page — which is a different number from the one an operator is
665
+ * being asked to trust. This runs the same filter the columns run, without the
666
+ * page window, and aggregates once.
667
+ *
668
+ * `partial` is the honest answer to a board larger than the cap: the counts stay
669
+ * exact because they come from SQL, and the amounts are withheld rather than
670
+ * reported short.
671
+ */
672
+ const SUMMARY_CAP = 5000;
673
+ export async function pipelineSummary(ctx, args) {
674
+ const { query } = await caseQuery(ctx, args);
675
+ const C = ctx.table('crm.Case');
676
+ const grouped = await ctx.db.group(query.groupBy({ col: C.stageId }));
677
+ const counts = new Map(grouped.map((row) => [String(row.key[0] ?? ''), Number(row.count)]));
678
+ const rows = await ctx.db.all(query.limit(SUMMARY_CAP + 1));
679
+ const partial = rows.length > SUMMARY_CAP;
680
+ const page = partial ? [] : rows;
681
+ /*
682
+ * The board shows Won and Lost, and the header does not.
683
+ *
684
+ * Every column keeps its own count and its own money, because that is what the
685
+ * column head states. The four figures above the board are about work still in
686
+ * hand — "open records", "total value" — so a closed case must not be in them.
687
+ * Counting every column into them made the total climb every time a deal was
688
+ * won, which is the opposite of what a pipeline total is for.
689
+ */
690
+ const S = ctx.table('crm.Stage');
691
+ const stageIds = [...counts.keys()].filter(Boolean);
692
+ const stages = stageIds.length ? await ctx.db.all(from(S).where(inArray(S.id, stageIds))) : [];
693
+ const open = new Set(stages.filter((stage) => stage.terminalState === 'open').map((stage) => String(stage.id)));
694
+ const openCount = [...counts.entries()]
695
+ .filter(([id]) => open.has(id))
696
+ .reduce((total, [, count]) => total + count, 0);
697
+ const caseIds = [...new Set(page.map((row) => String(row.id)))];
698
+ const openCaseIds = page.filter((row) => open.has(String(row.stageId ?? ''))).map((row) => String(row.id));
699
+ const D = ctx.table('crm.SalesDetail');
700
+ const details = caseIds.length ? await ctx.db.all(from(D).where(inArray(D.caseId, caseIds))) : [];
701
+ const detailBy = new Map(details.map((row) => [String(row.caseId), row]));
702
+ const money = new Map();
703
+ for (const row of page) {
704
+ const detail = detailBy.get(String(row.id));
705
+ const expected = n(detail?.expectedRevenue);
706
+ // A probability is stored as a percentage, so the weighted amount is the one
707
+ // a forecast adds up — not the amount times a number between zero and a hundred.
708
+ const weighted = (expected * Math.max(0, Math.min(100, n(detail?.probability)))) / 100;
709
+ const stage = String(row.stageId ?? '');
710
+ const held = money.get(stage) ?? { expected: 0, weighted: 0 };
711
+ money.set(stage, { expected: held.expected + expected, weighted: held.weighted + weighted });
712
+ }
713
+ const A = ctx.table('activity.Activity');
714
+ const L = ctx.table('crm.ActivityLink');
715
+ const links = openCaseIds.length ? await ctx.db.all(from(L).where(inArray(L.caseId, openCaseIds))) : [];
716
+ const activityIds = [...new Set(links.map((link) => String(link.activityId)))];
717
+ const today = now().slice(0, 10);
718
+ const overdue = activityIds.length
719
+ ? await ctx.db.all(from(A).where(inArray(A.id, activityIds), eq(A.active, true), isNull(A.doneAt), isNull(A.canceledAt), lt(A.dueDate, today)))
720
+ : [];
721
+ const total = (pick) => [...money.entries()].filter(([id]) => open.has(id)).reduce((sum, [, value]) => sum + pick(value), 0);
722
+ return {
723
+ stages: [...counts.entries()].map(([id, count]) => ({
724
+ id,
725
+ count,
726
+ expectedRevenue: String(money.get(id)?.expected ?? 0),
727
+ weightedRevenue: String(money.get(id)?.weighted ?? 0),
728
+ })),
729
+ openCount,
730
+ expectedRevenue: String(total((value) => value.expected)),
731
+ weightedRevenue: String(total((value) => value.weighted)),
732
+ overdueActivityCount: overdue.length,
733
+ partial,
734
+ };
735
+ }
736
+ /**
737
+ * Cases that look like the one being edited.
738
+ *
739
+ * This used to page through `listCases`, which caps a page at 200 rows however
740
+ * large a limit it is handed — so on any pipeline past 200 cases the duplicate
741
+ * panel quietly stopped finding anything. The match now runs as one indexed
742
+ * query over the three fields a duplicate actually shares, under the same
743
+ * audience filter as every other read, and returns at most `limit` rows.
744
+ */
745
+ export async function duplicateCases(ctx, input, limit = 20) {
746
+ const email = normalized(input.email);
747
+ const phone = String(input.phone ?? '').trim();
748
+ const name = String(input.name ?? '').trim();
749
+ const clauses = [];
750
+ const C = ctx.table('crm.Case');
751
+ const digits = dialled(phone);
752
+ if (email)
753
+ clauses.push(eq(C.email, email));
754
+ if (phone)
755
+ clauses.push(eq(C.phone, phone));
756
+ if (digits)
757
+ clauses.push(eq(C.phoneDigits, digits));
758
+ if (name)
759
+ clauses.push(like(C.name, `%${name}%`));
760
+ if (!clauses.length)
761
+ return [];
762
+ let query = from(C)
763
+ .where(eq(C.active, true), inArray(C.kind, ownedKinds()), clauses.length === 1 ? clauses[0] : or(...clauses))
764
+ .orderBy(desc(C.updatedAt), asc(C.id));
765
+ if (input.id)
766
+ query = query.where(ne(C.id, input.id));
767
+ const audience = await caseAudienceCondition(ctx, C);
768
+ if (audience)
769
+ query = query.where(audience);
770
+ // The clauses above are a union, so a row can arrive because its name looked
771
+ // similar; this keeps only the ones that actually match on something.
772
+ const rows = await ctx.db.all(query.limit(Math.max(1, Math.min(100, limit)) + 20));
773
+ const matched = rows.filter((row) => (email && normalized(row.email) === email) ||
774
+ (digits && (dialled(row.phone) === digits || row.phoneDigits === digits)) ||
775
+ (name && normalized(row.name) === normalized(name)));
776
+ return serializeCaseList(ctx, matched.slice(0, Math.max(1, Math.min(100, limit))));
777
+ }
427
778
  export async function groupCases(ctx, args) {
428
779
  const { query, state, spec, timezone } = await caseQuery(ctx, args);
429
780
  const path = Array.isArray(args.path) ? args.path : [];
@@ -444,7 +795,7 @@ export async function addCaseMessage(ctx, input) {
444
795
  if (!MESSAGE_VISIBILITIES.includes(input.visibility))
445
796
  return invalid(issue('visibility', 'crm.error.invalidVisibility'));
446
797
  const held = (await ctx.db.select('crm.Case', { id: input.caseId }))[0];
447
- if (!held)
798
+ if (!held || !(await canEditCase(ctx, held)))
448
799
  return invalid(issue('caseId', 'crm.error.notFound'));
449
800
  if (!input.body.trim())
450
801
  return invalid(issue('body', 'crm.error.required'));
@@ -478,7 +829,7 @@ export async function moveCase(ctx, input) {
478
829
  return invalid(issue('idempotencyKey', 'crm.error.idempotencyRequired'));
479
830
  return ctx.tx(async (tx) => {
480
831
  const held = (await tx.db.select('crm.Case', { id: input.id }))[0];
481
- if (!held || !(await canReadCase(tx, held)))
832
+ if (!held || !(await canEditCase(tx, held)))
482
833
  return invalid(issue('id', 'crm.error.notFound'));
483
834
  const stage = await activeStage(tx, input.stageId, String(held.kind));
484
835
  if (!stage)
@@ -490,7 +841,7 @@ export async function moveCase(ctx, input) {
490
841
  active: true,
491
842
  version: n(held.version) + 1,
492
843
  updatedAt: timestamp,
493
- closedAt: held.closedAt,
844
+ closedAt: closedAtFor(held, stage.terminalState, timestamp),
494
845
  };
495
846
  const changed = await tx.db.compareAndSet('crm.Case', { id: input.id }, { version: input.expectedVersion }, patch);
496
847
  if (!('dryRun' in changed) && !changed.matched)
@@ -502,6 +853,8 @@ export async function moveCase(ctx, input) {
502
853
  body: 'crm.timeline.stage',
503
854
  metadata: { from: held.stageId, to: stage.id },
504
855
  });
856
+ if (held.assigneeUserId && held.terminalState !== stage.terminalState)
857
+ await tx.jobs.enqueue('crm.gamification', { userId: held.assigneeUserId }, { uniqueKey: `crm.gamification:${String(held.assigneeUserId)}` });
505
858
  return { ok: true, id: input.id, version: patch.version, terminalState: stage.terminalState };
506
859
  });
507
860
  }
@@ -516,6 +869,31 @@ async function routedAssignee(ctx, team) {
516
869
  String(a.id).localeCompare(String(b.id)))[0];
517
870
  return members[n(team.assignmentCursor) % members.length];
518
871
  }
872
+ const assignmentTargetAllowed = async (ctx, held, teamId, assigneeUserId) => {
873
+ const audience = await caseAudience(ctx, 'assign');
874
+ if (!audience)
875
+ return true;
876
+ if (audience.teams.includes(teamId))
877
+ return true;
878
+ return Boolean(audience.scope === 'self' &&
879
+ !held.assigneeUserId &&
880
+ String(held.teamId ?? '') === teamId &&
881
+ assigneeUserId === audience.actor &&
882
+ audience.queueTeams.includes(teamId));
883
+ };
884
+ const assignmentMember = async (ctx, team, assigneeUserId) => {
885
+ if (!assigneeUserId)
886
+ return true;
887
+ if (!(await userExists(ctx, assigneeUserId)))
888
+ return false;
889
+ if (String(team.leaderUserId ?? '') === assigneeUserId)
890
+ return true;
891
+ return Boolean((await ctx.db.select('crm.TeamMember', {
892
+ teamId: team.id,
893
+ userId: assigneeUserId,
894
+ active: true,
895
+ }))[0]);
896
+ };
519
897
  export async function assignCase(ctx, input) {
520
898
  if (!actorRequired(ctx))
521
899
  return invalid(issue('actor', 'crm.error.actorRequired'));
@@ -525,8 +903,20 @@ export async function assignCase(ctx, input) {
525
903
  const held = (await tx.db.select('crm.Case', { id: input.id }))[0];
526
904
  if (!held || !(await canReadCase(tx, held)))
527
905
  return invalid(issue('id', 'crm.error.notFound'));
528
- if (held.assigneeUserId && !input.force && !input.assigneeUserId)
529
- return { ok: true, id: input.id, assigneeUserId: held.assigneeUserId, version: held.version };
906
+ if (!(await canAssignCase(tx, held)))
907
+ return invalid(issue('id', 'crm.error.permission'));
908
+ if (held.assigneeUserId) {
909
+ if (String(held.teamId ?? '') === String(input.teamId ?? held.teamId ?? '') &&
910
+ String(held.assigneeUserId) === String(input.assigneeUserId ?? held.assigneeUserId))
911
+ return {
912
+ ok: true,
913
+ id: input.id,
914
+ teamId: held.teamId,
915
+ assigneeUserId: held.assigneeUserId,
916
+ version: held.version,
917
+ };
918
+ return invalid(issue('assigneeUserId', 'crm.error.permission'));
919
+ }
530
920
  let teamId = input.teamId ?? (held.teamId ? String(held.teamId) : null);
531
921
  let assigneeUserId = input.assigneeUserId ?? null;
532
922
  if (!teamId || !assigneeUserId) {
@@ -544,18 +934,22 @@ export async function assignCase(ctx, input) {
544
934
  return invalid(issue('teamId', 'crm.error.notFound'));
545
935
  let member = null;
546
936
  if (!assigneeUserId) {
547
- member = await routedAssignee(tx, team);
548
- assigneeUserId = member?.userId
549
- ? String(member.userId)
550
- : team.leaderUserId
551
- ? String(team.leaderUserId)
552
- : null;
937
+ const audience = await caseAudience(tx, 'assign');
938
+ if (audience)
939
+ assigneeUserId = audience.actor;
940
+ else {
941
+ member = await routedAssignee(tx, team);
942
+ assigneeUserId = member?.userId
943
+ ? String(member.userId)
944
+ : team.leaderUserId
945
+ ? String(team.leaderUserId)
946
+ : null;
947
+ }
553
948
  }
554
- if (!assigneeUserId || !(await userExists(tx, assigneeUserId)))
555
- return invalid(issue('assigneeUserId', 'crm.error.notFound'));
556
- if (!(await tx.db.select('crm.TeamMember', { teamId, userId: assigneeUserId, active: true }))[0] &&
557
- team.leaderUserId !== assigneeUserId)
949
+ if (!assigneeUserId || !(await assignmentMember(tx, team, assigneeUserId)))
558
950
  return invalid(issue('assigneeUserId', 'crm.error.notFound'));
951
+ if (!(await assignmentTargetAllowed(tx, held, teamId, assigneeUserId)))
952
+ return invalid(issue('assigneeUserId', 'crm.error.permission'));
559
953
  const expected = input.expectedVersion ?? n(held.version);
560
954
  const timestamp = now();
561
955
  const changed = await tx.db.compareAndSet('crm.Case', { id: input.id }, { version: expected }, {
@@ -586,6 +980,82 @@ export async function assignCase(ctx, input) {
586
980
  return { ok: true, id: input.id, teamId, assigneeUserId, version: n(held.version) + 1 };
587
981
  });
588
982
  }
983
+ const REASSIGN_REASONS = new Set([
984
+ 'workload_balance',
985
+ 'absence',
986
+ 'escalation',
987
+ 'territory_change',
988
+ 'employee_departure',
989
+ 'manual_correction',
990
+ ]);
991
+ export async function reassignCase(ctx, input) {
992
+ if (!actorRequired(ctx))
993
+ return invalid(issue('actor', 'crm.error.actorRequired'));
994
+ if (!commandKey(input.idempotencyKey))
995
+ return invalid(issue('idempotencyKey', 'crm.error.idempotencyRequired'));
996
+ if (!REASSIGN_REASONS.has(input.reasonCode))
997
+ return invalid(issue('reasonCode', 'crm.error.reassignReason'));
998
+ if (input.reasonCode === 'manual_correction' && !String(input.reasonNote ?? '').trim())
999
+ return invalid(issue('reasonNote', 'crm.error.reassignReason'));
1000
+ return ctx.tx(async (tx) => {
1001
+ const held = (await tx.db.select('crm.Case', { id: input.id }))[0];
1002
+ if (!held || !ownsKind(held.kind) || !(await canReadCase(tx, held)))
1003
+ return invalid(issue('id', 'crm.error.notFound'));
1004
+ const auditId = `timeline:${input.id}:reassign:${input.idempotencyKey}`;
1005
+ const replay = (await tx.db.select('crm.TimelineEntry', { id: auditId }))[0];
1006
+ if (replay)
1007
+ return {
1008
+ ok: true,
1009
+ id: input.id,
1010
+ teamId: held.teamId,
1011
+ assigneeUserId: held.assigneeUserId,
1012
+ version: held.version,
1013
+ };
1014
+ if (!(await canAssignCase(tx, held)))
1015
+ return invalid(issue('id', 'crm.error.permission'));
1016
+ if (String(held.terminalState) !== 'open' || held.active === false)
1017
+ return invalid(issue('id', 'crm.error.permission'));
1018
+ const team = (await tx.db.select('crm.Team', { id: input.teamId, active: true }))[0];
1019
+ if (!team)
1020
+ return invalid(issue('teamId', 'crm.error.notFound'));
1021
+ const target = input.assigneeUserId ? String(input.assigneeUserId) : null;
1022
+ if (!(await assignmentMember(tx, team, target)))
1023
+ return invalid(issue('assigneeUserId', 'crm.error.notTeamMember'));
1024
+ if (!(await assignmentTargetAllowed(tx, held, String(team.id), target)))
1025
+ return invalid(issue('assigneeUserId', 'crm.error.permission'));
1026
+ const timestamp = now();
1027
+ const changed = await tx.db.compareAndSet('crm.Case', { id: input.id }, { version: input.expectedVersion }, {
1028
+ teamId: team.id,
1029
+ assigneeUserId: target,
1030
+ version: n(held.version) + 1,
1031
+ updatedAt: timestamp,
1032
+ });
1033
+ if (!('dryRun' in changed) && !changed.matched)
1034
+ return invalid(issue('version', 'crm.error.stageConflict', { current: held.version }));
1035
+ await addTimeline(tx, {
1036
+ id: auditId,
1037
+ caseId: input.id,
1038
+ eventType: 'reassigned',
1039
+ body: 'crm.timeline.reassigned',
1040
+ metadata: {
1041
+ fromTeamId: held.teamId ?? null,
1042
+ fromAssigneeUserId: held.assigneeUserId ?? null,
1043
+ toTeamId: team.id,
1044
+ toAssigneeUserId: target,
1045
+ reasonCode: input.reasonCode,
1046
+ reasonNote: String(input.reasonNote ?? '').trim() || null,
1047
+ },
1048
+ occurredAt: timestamp,
1049
+ });
1050
+ return {
1051
+ ok: true,
1052
+ id: input.id,
1053
+ teamId: team.id,
1054
+ assigneeUserId: target,
1055
+ version: n(held.version) + 1,
1056
+ };
1057
+ });
1058
+ }
589
1059
  export async function scheduleCaseActivity(ctx, input) {
590
1060
  if (!actorRequired(ctx))
591
1061
  return invalid(issue('actor', 'crm.error.actorRequired'));
@@ -593,12 +1063,12 @@ export async function scheduleCaseActivity(ctx, input) {
593
1063
  return invalid(issue('idempotencyKey', 'crm.error.idempotencyRequired'));
594
1064
  return ctx.tx(async (tx) => {
595
1065
  const held = (await tx.db.select('crm.Case', { id: input.caseId }))[0];
596
- if (!held || !(await canReadCase(tx, held)))
1066
+ if (!held || !(await canEditCase(tx, held)))
597
1067
  return invalid(issue('caseId', 'crm.error.notFound'));
598
1068
  const activity = await scheduleActivity(tx, {
599
1069
  id: input.id,
600
1070
  threadId: String(held.threadId),
601
- typeId: input.typeId ?? 'crm-next-action',
1071
+ typeId: input.typeId ?? (await crmActivityType(tx)) ?? 'crm-next-action',
602
1072
  assigneeUserId: input.assigneeUserId ?? String(held.assigneeUserId ?? tx.actor),
603
1073
  summary: input.summary,
604
1074
  note: input.note,
@@ -628,6 +1098,9 @@ export async function completeCaseActivity(ctx, input) {
628
1098
  const link = (await tx.db.select('crm.ActivityLink', { activityId: input.id }))[0];
629
1099
  if (!link)
630
1100
  return invalid(issue('id', 'crm.error.notFound'));
1101
+ const held = (await tx.db.select('crm.Case', { id: link.caseId }))[0];
1102
+ if (!held || !(await canEditCase(tx, held)))
1103
+ return invalid(issue('id', 'crm.error.notFound'));
631
1104
  const result = await completeActivity(tx, input.id, input.feedback ?? '', input.completedDate);
632
1105
  await addTimeline(tx, {
633
1106
  id: `timeline:${String(link.caseId)}:activity-done:${input.id}`,
@@ -648,6 +1121,9 @@ export async function cancelCaseActivity(ctx, input) {
648
1121
  const link = (await tx.db.select('crm.ActivityLink', { activityId: input.id }))[0];
649
1122
  if (!link)
650
1123
  return invalid(issue('id', 'crm.error.notFound'));
1124
+ const held = (await tx.db.select('crm.Case', { id: link.caseId }))[0];
1125
+ if (!held || !(await canEditCase(tx, held)))
1126
+ return invalid(issue('id', 'crm.error.notFound'));
651
1127
  const activity = await cancelActivity(tx, input.id, input.feedback);
652
1128
  await addTimeline(tx, {
653
1129
  id: `timeline:${String(link.caseId)}:activity-cancel:${input.id}`,
@@ -666,7 +1142,7 @@ export async function applyCasePlan(ctx, input) {
666
1142
  return invalid(issue('actor', 'crm.error.actorRequired'));
667
1143
  return ctx.tx(async (tx) => {
668
1144
  const held = (await tx.db.select('crm.Case', { id: input.caseId }))[0];
669
- if (!held || !(await canReadCase(tx, held)))
1145
+ if (!held || !(await canEditCase(tx, held)))
670
1146
  return invalid(issue('caseId', 'crm.error.notFound'));
671
1147
  const plan = (await tx.db.select('activity.Plan', { id: input.planId, active: true }))[0];
672
1148
  if (!plan)
@@ -706,9 +1182,20 @@ export async function applyCasePlan(ctx, input) {
706
1182
  });
707
1183
  }
708
1184
  export async function refreshCaseScore(ctx, caseId, sourceKey) {
709
- return ctx.tx(async (tx) => {
1185
+ return ctx.tx((tx) => applyCaseScore(tx, caseId, sourceKey));
1186
+ }
1187
+ /**
1188
+ * The scoring pass itself, without a transaction of its own.
1189
+ *
1190
+ * A worker handler already runs transaction-bound, and nesting one inside it
1191
+ * breaks SQLite — so the job calls this directly while `refreshCaseScore` wraps
1192
+ * it for callers that arrive over HTTP.
1193
+ */
1194
+ export async function applyCaseScore(ctx, caseId, sourceKey) {
1195
+ {
1196
+ const tx = ctx;
710
1197
  const held = (await tx.db.select('crm.Case', { id: caseId }))[0];
711
- if (!held)
1198
+ if (!held || !(await canEditCase(tx, held)))
712
1199
  return invalid(issue('caseId', 'crm.error.notFound'));
713
1200
  const rules = (await tx.db.select('crm.ScoreRule', { active: true })).sort((a, b) => n(a.sequence) - n(b.sequence) || String(a.id).localeCompare(String(b.id)));
714
1201
  let score = 0;
@@ -726,11 +1213,15 @@ export async function refreshCaseScore(ctx, caseId, sourceKey) {
726
1213
  reasons.push({ ruleId: String(rule.id), points: n(rule.points) });
727
1214
  }
728
1215
  const timestamp = now();
729
- await tx.db.update('crm.Case', { id: caseId }, {
730
- score: String(score),
731
- version: n(held.version) + 1,
732
- updatedAt: timestamp,
733
- });
1216
+ /**
1217
+ * Scoring rewrites one derived field, so it neither bumps `version` nor may
1218
+ * clobber a concurrent edit: the compare pins the row to the state this
1219
+ * transaction read, and leaving the version alone keeps every form the user
1220
+ * already has open valid.
1221
+ */
1222
+ const changed = await tx.db.compareAndSet('crm.Case', { id: caseId }, { version: n(held.version) }, { score: String(score), updatedAt: timestamp });
1223
+ if (!('dryRun' in changed) && !changed.matched)
1224
+ return invalid(issue('version', 'crm.error.stageConflict', { current: n(held.version) }));
734
1225
  await tx.db.insertIfAbsent('crm.ScoreHistory', {
735
1226
  id: `score:${caseId}:${sourceKey}`,
736
1227
  caseId,
@@ -739,6 +1230,43 @@ export async function refreshCaseScore(ctx, caseId, sourceKey) {
739
1230
  calculatedAt: timestamp,
740
1231
  });
741
1232
  return { ok: true, id: caseId, score, reasons };
742
- });
1233
+ }
1234
+ }
1235
+ /**
1236
+ * One salesperson's standing, recomputed from counting queries.
1237
+ *
1238
+ * Called per user so the leaderboard can be refreshed incrementally — a case
1239
+ * reaching a terminal state only changes the assignee's row.
1240
+ */
1241
+ export async function gamificationProfile(ctx, user) {
1242
+ const C = ctx.table('crm.Case');
1243
+ const A = ctx.table('activity.Activity');
1244
+ const owned = from(C).where(eq(C.assigneeUserId, user.id), eq(C.active, true));
1245
+ const [assigned, won, lost, activitiesDone] = await Promise.all([
1246
+ ctx.db.count(owned),
1247
+ ctx.db.count(owned.where(eq(C.terminalState, 'won'))),
1248
+ ctx.db.count(owned.where(eq(C.terminalState, 'lost'))),
1249
+ ctx.db.count(from(A).where(eq(A.assigneeUserId, user.id), not(isNull(A.doneAt)),
1250
+ // Every CRM thread is named after the case it belongs to, which keeps
1251
+ // this count inside the CRM without a join through the link table.
1252
+ like(A.threadId, 'thread:crm.Case:%'))),
1253
+ ]);
1254
+ const id = `gamification:${String(user.id)}`;
1255
+ const row = {
1256
+ userId: user.id,
1257
+ points: won * 100 + activitiesDone * 10 + Math.max(0, assigned - lost) * 2,
1258
+ assigned,
1259
+ won,
1260
+ lost,
1261
+ activitiesDone,
1262
+ streak: won ? Math.min(won, 30) : 0,
1263
+ refreshedAt: now(),
1264
+ };
1265
+ const held = (await ctx.db.select('crm.GamificationProfile', { id }))[0];
1266
+ if (held)
1267
+ await ctx.db.update('crm.GamificationProfile', { id }, row);
1268
+ else
1269
+ await ctx.db.insert('crm.GamificationProfile', { id, ...row });
1270
+ return { id, ...row, userName: user.name };
743
1271
  }
744
1272
  //# sourceMappingURL=operations.js.map