@ketvietlab/ketsuite 0.1.1

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 (1802) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -0
  3. package/dist/index.d.ts +119 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +118 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/modules/account/functions.d.ts +14 -0
  8. package/dist/modules/account/functions.d.ts.map +1 -0
  9. package/dist/modules/account/functions.js +1038 -0
  10. package/dist/modules/account/functions.js.map +1 -0
  11. package/dist/modules/account/index.d.ts +5 -0
  12. package/dist/modules/account/index.d.ts.map +1 -0
  13. package/dist/modules/account/index.js +31 -0
  14. package/dist/modules/account/index.js.map +1 -0
  15. package/dist/modules/account/models.d.ts +3 -0
  16. package/dist/modules/account/models.d.ts.map +1 -0
  17. package/dist/modules/account/models.js +151 -0
  18. package/dist/modules/account/models.js.map +1 -0
  19. package/dist/modules/account/relations.d.ts +3 -0
  20. package/dist/modules/account/relations.d.ts.map +1 -0
  21. package/dist/modules/account/relations.js +35 -0
  22. package/dist/modules/account/relations.js.map +1 -0
  23. package/dist/modules/account/setup.d.ts +4 -0
  24. package/dist/modules/account/setup.d.ts.map +1 -0
  25. package/dist/modules/account/setup.js +179 -0
  26. package/dist/modules/account/setup.js.map +1 -0
  27. package/dist/modules/account/tt99.d.ts +30 -0
  28. package/dist/modules/account/tt99.d.ts.map +1 -0
  29. package/dist/modules/account/tt99.js +1661 -0
  30. package/dist/modules/account/tt99.js.map +1 -0
  31. package/dist/modules/account_activity_backend/index.d.ts +5 -0
  32. package/dist/modules/account_activity_backend/index.d.ts.map +1 -0
  33. package/dist/modules/account_activity_backend/index.js +27 -0
  34. package/dist/modules/account_activity_backend/index.js.map +1 -0
  35. package/dist/modules/account_backend/accounting-overview-screen.d.ts +18 -0
  36. package/dist/modules/account_backend/accounting-overview-screen.d.ts.map +1 -0
  37. package/dist/modules/account_backend/accounting-overview-screen.js +104 -0
  38. package/dist/modules/account_backend/accounting-overview-screen.js.map +1 -0
  39. package/dist/modules/account_backend/accounts-screen.d.ts +13 -0
  40. package/dist/modules/account_backend/accounts-screen.d.ts.map +1 -0
  41. package/dist/modules/account_backend/accounts-screen.js +49 -0
  42. package/dist/modules/account_backend/accounts-screen.js.map +1 -0
  43. package/dist/modules/account_backend/customer-invoices-screen.d.ts +14 -0
  44. package/dist/modules/account_backend/customer-invoices-screen.d.ts.map +1 -0
  45. package/dist/modules/account_backend/customer-invoices-screen.js +63 -0
  46. package/dist/modules/account_backend/customer-invoices-screen.js.map +1 -0
  47. package/dist/modules/account_backend/general-ledger-screen.d.ts +13 -0
  48. package/dist/modules/account_backend/general-ledger-screen.d.ts.map +1 -0
  49. package/dist/modules/account_backend/general-ledger-screen.js +56 -0
  50. package/dist/modules/account_backend/general-ledger-screen.js.map +1 -0
  51. package/dist/modules/account_backend/index.d.ts +3 -0
  52. package/dist/modules/account_backend/index.d.ts.map +1 -0
  53. package/dist/modules/account_backend/index.js +1516 -0
  54. package/dist/modules/account_backend/index.js.map +1 -0
  55. package/dist/modules/account_backend/journal-entries-screen.d.ts +14 -0
  56. package/dist/modules/account_backend/journal-entries-screen.d.ts.map +1 -0
  57. package/dist/modules/account_backend/journal-entries-screen.js +45 -0
  58. package/dist/modules/account_backend/journal-entries-screen.js.map +1 -0
  59. package/dist/modules/account_backend/journals-screen.d.ts +14 -0
  60. package/dist/modules/account_backend/journals-screen.d.ts.map +1 -0
  61. package/dist/modules/account_backend/journals-screen.js +53 -0
  62. package/dist/modules/account_backend/journals-screen.js.map +1 -0
  63. package/dist/modules/account_backend/move-detail-screen.d.ts +10 -0
  64. package/dist/modules/account_backend/move-detail-screen.d.ts.map +1 -0
  65. package/dist/modules/account_backend/move-detail-screen.js +100 -0
  66. package/dist/modules/account_backend/move-detail-screen.js.map +1 -0
  67. package/dist/modules/account_backend/partner-ledger-screen.d.ts +14 -0
  68. package/dist/modules/account_backend/partner-ledger-screen.d.ts.map +1 -0
  69. package/dist/modules/account_backend/partner-ledger-screen.js +69 -0
  70. package/dist/modules/account_backend/partner-ledger-screen.js.map +1 -0
  71. package/dist/modules/account_backend/payment-terms-screen.d.ts +14 -0
  72. package/dist/modules/account_backend/payment-terms-screen.d.ts.map +1 -0
  73. package/dist/modules/account_backend/payment-terms-screen.js +40 -0
  74. package/dist/modules/account_backend/payment-terms-screen.js.map +1 -0
  75. package/dist/modules/account_backend/payments-screen.d.ts +14 -0
  76. package/dist/modules/account_backend/payments-screen.d.ts.map +1 -0
  77. package/dist/modules/account_backend/payments-screen.js +54 -0
  78. package/dist/modules/account_backend/payments-screen.js.map +1 -0
  79. package/dist/modules/account_backend/screens.d.ts +7 -0
  80. package/dist/modules/account_backend/screens.d.ts.map +1 -0
  81. package/dist/modules/account_backend/screens.js +7 -0
  82. package/dist/modules/account_backend/screens.js.map +1 -0
  83. package/dist/modules/account_backend/taxes-screen.d.ts +15 -0
  84. package/dist/modules/account_backend/taxes-screen.d.ts.map +1 -0
  85. package/dist/modules/account_backend/taxes-screen.js +73 -0
  86. package/dist/modules/account_backend/taxes-screen.js.map +1 -0
  87. package/dist/modules/account_backend/trial-balance-screen.d.ts +13 -0
  88. package/dist/modules/account_backend/trial-balance-screen.d.ts.map +1 -0
  89. package/dist/modules/account_backend/trial-balance-screen.js +62 -0
  90. package/dist/modules/account_backend/trial-balance-screen.js.map +1 -0
  91. package/dist/modules/account_backend/vendor-bills-screen.d.ts +14 -0
  92. package/dist/modules/account_backend/vendor-bills-screen.d.ts.map +1 -0
  93. package/dist/modules/account_backend/vendor-bills-screen.js +59 -0
  94. package/dist/modules/account_backend/vendor-bills-screen.js.map +1 -0
  95. package/dist/modules/account_mail_backend/index.d.ts +5 -0
  96. package/dist/modules/account_mail_backend/index.d.ts.map +1 -0
  97. package/dist/modules/account_mail_backend/index.js +28 -0
  98. package/dist/modules/account_mail_backend/index.js.map +1 -0
  99. package/dist/modules/account_partner/functions.d.ts +3 -0
  100. package/dist/modules/account_partner/functions.d.ts.map +1 -0
  101. package/dist/modules/account_partner/functions.js +85 -0
  102. package/dist/modules/account_partner/functions.js.map +1 -0
  103. package/dist/modules/account_partner/index.d.ts +3 -0
  104. package/dist/modules/account_partner/index.d.ts.map +1 -0
  105. package/dist/modules/account_partner/index.js +48 -0
  106. package/dist/modules/account_partner/index.js.map +1 -0
  107. package/dist/modules/account_partner_backend/index.d.ts +4 -0
  108. package/dist/modules/account_partner_backend/index.d.ts.map +1 -0
  109. package/dist/modules/account_partner_backend/index.js +49 -0
  110. package/dist/modules/account_partner_backend/index.js.map +1 -0
  111. package/dist/modules/account_partner_backend/routes.d.ts +3 -0
  112. package/dist/modules/account_partner_backend/routes.d.ts.map +1 -0
  113. package/dist/modules/account_partner_backend/routes.js +69 -0
  114. package/dist/modules/account_partner_backend/routes.js.map +1 -0
  115. package/dist/modules/account_partner_backend/screens.d.ts +16 -0
  116. package/dist/modules/account_partner_backend/screens.d.ts.map +1 -0
  117. package/dist/modules/account_partner_backend/screens.js +26 -0
  118. package/dist/modules/account_partner_backend/screens.js.map +1 -0
  119. package/dist/modules/activity/functions.d.ts +3 -0
  120. package/dist/modules/activity/functions.d.ts.map +1 -0
  121. package/dist/modules/activity/functions.js +250 -0
  122. package/dist/modules/activity/functions.js.map +1 -0
  123. package/dist/modules/activity/index.d.ts +9 -0
  124. package/dist/modules/activity/index.d.ts.map +1 -0
  125. package/dist/modules/activity/index.js +33 -0
  126. package/dist/modules/activity/index.js.map +1 -0
  127. package/dist/modules/activity/models.d.ts +3 -0
  128. package/dist/modules/activity/models.d.ts.map +1 -0
  129. package/dist/modules/activity/models.js +81 -0
  130. package/dist/modules/activity/models.js.map +1 -0
  131. package/dist/modules/activity/operations.d.ts +39 -0
  132. package/dist/modules/activity/operations.d.ts.map +1 -0
  133. package/dist/modules/activity/operations.js +226 -0
  134. package/dist/modules/activity/operations.js.map +1 -0
  135. package/dist/modules/activity/relations.d.ts +3 -0
  136. package/dist/modules/activity/relations.d.ts.map +1 -0
  137. package/dist/modules/activity/relations.js +24 -0
  138. package/dist/modules/activity/relations.js.map +1 -0
  139. package/dist/modules/activity/target.d.ts +4 -0
  140. package/dist/modules/activity/target.d.ts.map +1 -0
  141. package/dist/modules/activity/target.js +149 -0
  142. package/dist/modules/activity/target.js.map +1 -0
  143. package/dist/modules/activity/types.d.ts +9 -0
  144. package/dist/modules/activity/types.d.ts.map +1 -0
  145. package/dist/modules/activity/types.js +5 -0
  146. package/dist/modules/activity/types.js.map +1 -0
  147. package/dist/modules/activity_backend/index.d.ts +5 -0
  148. package/dist/modules/activity_backend/index.d.ts.map +1 -0
  149. package/dist/modules/activity_backend/index.js +80 -0
  150. package/dist/modules/activity_backend/index.js.map +1 -0
  151. package/dist/modules/activity_backend/islands.d.ts +3 -0
  152. package/dist/modules/activity_backend/islands.d.ts.map +1 -0
  153. package/dist/modules/activity_backend/islands.js +20 -0
  154. package/dist/modules/activity_backend/islands.js.map +1 -0
  155. package/dist/modules/activity_backend/routes.d.ts +5 -0
  156. package/dist/modules/activity_backend/routes.d.ts.map +1 -0
  157. package/dist/modules/activity_backend/routes.js +53 -0
  158. package/dist/modules/activity_backend/routes.js.map +1 -0
  159. package/dist/modules/activity_backend/screens.d.ts +5 -0
  160. package/dist/modules/activity_backend/screens.d.ts.map +1 -0
  161. package/dist/modules/activity_backend/screens.js +52 -0
  162. package/dist/modules/activity_backend/screens.js.map +1 -0
  163. package/dist/modules/address/data/VN/NOTICE.md +15 -0
  164. package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0001.json +8002 -0
  165. package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0002.json +8002 -0
  166. package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0003.json +8002 -0
  167. package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0004.json +2842 -0
  168. package/dist/modules/address/data/VN/catalogs/2025-07-01/manifest.json +77 -0
  169. package/dist/modules/address/data/VN/catalogs/2025-07-01/policy.json +49 -0
  170. package/dist/modules/address/data/countries.json +11 -0
  171. package/dist/modules/address/data/index.json +14 -0
  172. package/dist/modules/address/format.d.ts +37 -0
  173. package/dist/modules/address/format.d.ts.map +1 -0
  174. package/dist/modules/address/format.js +146 -0
  175. package/dist/modules/address/format.js.map +1 -0
  176. package/dist/modules/address/functions.d.ts +3 -0
  177. package/dist/modules/address/functions.d.ts.map +1 -0
  178. package/dist/modules/address/functions.js +320 -0
  179. package/dist/modules/address/functions.js.map +1 -0
  180. package/dist/modules/address/index.d.ts +6 -0
  181. package/dist/modules/address/index.d.ts.map +1 -0
  182. package/dist/modules/address/index.js +20 -0
  183. package/dist/modules/address/index.js.map +1 -0
  184. package/dist/modules/address/loader.d.ts +74 -0
  185. package/dist/modules/address/loader.d.ts.map +1 -0
  186. package/dist/modules/address/loader.js +144 -0
  187. package/dist/modules/address/loader.js.map +1 -0
  188. package/dist/modules/address/messages.d.ts +51 -0
  189. package/dist/modules/address/messages.d.ts.map +1 -0
  190. package/dist/modules/address/messages.js +51 -0
  191. package/dist/modules/address/messages.js.map +1 -0
  192. package/dist/modules/address/models.d.ts +8 -0
  193. package/dist/modules/address/models.d.ts.map +1 -0
  194. package/dist/modules/address/models.js +98 -0
  195. package/dist/modules/address/models.js.map +1 -0
  196. package/dist/modules/address/relations.d.ts +3 -0
  197. package/dist/modules/address/relations.d.ts.map +1 -0
  198. package/dist/modules/address/relations.js +22 -0
  199. package/dist/modules/address/relations.js.map +1 -0
  200. package/dist/modules/address_backend/index.d.ts +4 -0
  201. package/dist/modules/address_backend/index.d.ts.map +1 -0
  202. package/dist/modules/address_backend/index.js +90 -0
  203. package/dist/modules/address_backend/index.js.map +1 -0
  204. package/dist/modules/address_backend/routes.d.ts +3 -0
  205. package/dist/modules/address_backend/routes.d.ts.map +1 -0
  206. package/dist/modules/address_backend/routes.js +87 -0
  207. package/dist/modules/address_backend/routes.js.map +1 -0
  208. package/dist/modules/address_backend/screens.d.ts +31 -0
  209. package/dist/modules/address_backend/screens.d.ts.map +1 -0
  210. package/dist/modules/address_backend/screens.js +147 -0
  211. package/dist/modules/address_backend/screens.js.map +1 -0
  212. package/dist/modules/attendance/functions.d.ts +3 -0
  213. package/dist/modules/attendance/functions.d.ts.map +1 -0
  214. package/dist/modules/attendance/functions.js +750 -0
  215. package/dist/modules/attendance/functions.js.map +1 -0
  216. package/dist/modules/attendance/index.d.ts +5 -0
  217. package/dist/modules/attendance/index.d.ts.map +1 -0
  218. package/dist/modules/attendance/index.js +20 -0
  219. package/dist/modules/attendance/index.js.map +1 -0
  220. package/dist/modules/attendance/messages.d.ts +41 -0
  221. package/dist/modules/attendance/messages.d.ts.map +1 -0
  222. package/dist/modules/attendance/messages.js +41 -0
  223. package/dist/modules/attendance/messages.js.map +1 -0
  224. package/dist/modules/attendance/models.d.ts +3 -0
  225. package/dist/modules/attendance/models.d.ts.map +1 -0
  226. package/dist/modules/attendance/models.js +158 -0
  227. package/dist/modules/attendance/models.js.map +1 -0
  228. package/dist/modules/attendance/relations.d.ts +3 -0
  229. package/dist/modules/attendance/relations.d.ts.map +1 -0
  230. package/dist/modules/attendance/relations.js +12 -0
  231. package/dist/modules/attendance/relations.js.map +1 -0
  232. package/dist/modules/attendance/types.d.ts +9 -0
  233. package/dist/modules/attendance/types.d.ts.map +1 -0
  234. package/dist/modules/attendance/types.js +5 -0
  235. package/dist/modules/attendance/types.js.map +1 -0
  236. package/dist/modules/attendance_backend/index.d.ts +4 -0
  237. package/dist/modules/attendance_backend/index.d.ts.map +1 -0
  238. package/dist/modules/attendance_backend/index.js +182 -0
  239. package/dist/modules/attendance_backend/index.js.map +1 -0
  240. package/dist/modules/attendance_backend/qr.d.ts +2 -0
  241. package/dist/modules/attendance_backend/qr.d.ts.map +1 -0
  242. package/dist/modules/attendance_backend/qr.js +120 -0
  243. package/dist/modules/attendance_backend/qr.js.map +1 -0
  244. package/dist/modules/attendance_backend/routes.d.ts +3 -0
  245. package/dist/modules/attendance_backend/routes.d.ts.map +1 -0
  246. package/dist/modules/attendance_backend/routes.js +131 -0
  247. package/dist/modules/attendance_backend/routes.js.map +1 -0
  248. package/dist/modules/attendance_backend/screens.d.ts +10 -0
  249. package/dist/modules/attendance_backend/screens.d.ts.map +1 -0
  250. package/dist/modules/attendance_backend/screens.js +227 -0
  251. package/dist/modules/attendance_backend/screens.js.map +1 -0
  252. package/dist/modules/backend/catalogue.d.ts +10 -0
  253. package/dist/modules/backend/catalogue.d.ts.map +1 -0
  254. package/dist/modules/backend/catalogue.js +615 -0
  255. package/dist/modules/backend/catalogue.js.map +1 -0
  256. package/dist/modules/backend/design/HANDOFF.md +356 -0
  257. package/dist/modules/backend/design/admin.css +4229 -0
  258. package/dist/modules/backend/design/client/relation-select-view.d.mts +5 -0
  259. package/dist/modules/backend/design/client/relation-select-view.d.mts.map +1 -0
  260. package/dist/modules/backend/design/client/relation-select-view.mjs +335 -0
  261. package/dist/modules/backend/design/client/relation-select-view.mjs.map +1 -0
  262. package/dist/modules/backend/design/client/relation-select.d.mts +5 -0
  263. package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -0
  264. package/dist/modules/backend/design/client/relation-select.mjs +7 -0
  265. package/dist/modules/backend/design/client/relation-select.mjs.map +1 -0
  266. package/dist/modules/backend/design/fixtures/product-back.svg +11 -0
  267. package/dist/modules/backend/design/fixtures/product-front.svg +9 -0
  268. package/dist/modules/backend/design/screenshots/apps-desktop-dark.png +0 -0
  269. package/dist/modules/backend/design/screenshots/list-mobile-dark.png +0 -0
  270. package/dist/modules/backend/design/screenshots/product-list-favorites-desktop-en.png +0 -0
  271. package/dist/modules/backend/design/screenshots/product-list-filter-desktop-en.png +0 -0
  272. package/dist/modules/backend/design/screenshots/product-list-filter-mobile-en.png +0 -0
  273. package/dist/modules/backend/design/screenshots/product-list-grouped-desktop.png +0 -0
  274. package/dist/modules/backend/design/screenshots/product-list-grouped-mobile.png +0 -0
  275. package/dist/modules/backend/design/tokens.css +132 -0
  276. package/dist/modules/backend/forms.d.ts +7 -0
  277. package/dist/modules/backend/forms.d.ts.map +1 -0
  278. package/dist/modules/backend/forms.js +25 -0
  279. package/dist/modules/backend/forms.js.map +1 -0
  280. package/dist/modules/backend/index.d.ts +24 -0
  281. package/dist/modules/backend/index.d.ts.map +1 -0
  282. package/dist/modules/backend/index.js +61 -0
  283. package/dist/modules/backend/index.js.map +1 -0
  284. package/dist/modules/backend/islands.d.ts +3 -0
  285. package/dist/modules/backend/islands.d.ts.map +1 -0
  286. package/dist/modules/backend/islands.js +13 -0
  287. package/dist/modules/backend/islands.js.map +1 -0
  288. package/dist/modules/backend/joints.d.ts +13 -0
  289. package/dist/modules/backend/joints.d.ts.map +1 -0
  290. package/dist/modules/backend/joints.js +33 -0
  291. package/dist/modules/backend/joints.js.map +1 -0
  292. package/dist/modules/backend/menus.d.ts +3 -0
  293. package/dist/modules/backend/menus.d.ts.map +1 -0
  294. package/dist/modules/backend/menus.js +25 -0
  295. package/dist/modules/backend/menus.js.map +1 -0
  296. package/dist/modules/backend/messages.d.ts +11 -0
  297. package/dist/modules/backend/messages.d.ts.map +1 -0
  298. package/dist/modules/backend/messages.js +161 -0
  299. package/dist/modules/backend/messages.js.map +1 -0
  300. package/dist/modules/backend/paging.d.ts +22 -0
  301. package/dist/modules/backend/paging.d.ts.map +1 -0
  302. package/dist/modules/backend/paging.js +56 -0
  303. package/dist/modules/backend/paging.js.map +1 -0
  304. package/dist/modules/backend/relation-select.d.ts +63 -0
  305. package/dist/modules/backend/relation-select.d.ts.map +1 -0
  306. package/dist/modules/backend/relation-select.js +20 -0
  307. package/dist/modules/backend/relation-select.js.map +1 -0
  308. package/dist/modules/backend/routes.d.ts +10 -0
  309. package/dist/modules/backend/routes.d.ts.map +1 -0
  310. package/dist/modules/backend/routes.js +123 -0
  311. package/dist/modules/backend/routes.js.map +1 -0
  312. package/dist/modules/backend/saved-searches.d.ts +4 -0
  313. package/dist/modules/backend/saved-searches.d.ts.map +1 -0
  314. package/dist/modules/backend/saved-searches.js +138 -0
  315. package/dist/modules/backend/saved-searches.js.map +1 -0
  316. package/dist/modules/backend/screens.d.ts +37 -0
  317. package/dist/modules/backend/screens.d.ts.map +1 -0
  318. package/dist/modules/backend/screens.js +107 -0
  319. package/dist/modules/backend/screens.js.map +1 -0
  320. package/dist/modules/calendar/functions.d.ts +3 -0
  321. package/dist/modules/calendar/functions.d.ts.map +1 -0
  322. package/dist/modules/calendar/functions.js +259 -0
  323. package/dist/modules/calendar/functions.js.map +1 -0
  324. package/dist/modules/calendar/index.d.ts +9 -0
  325. package/dist/modules/calendar/index.d.ts.map +1 -0
  326. package/dist/modules/calendar/index.js +36 -0
  327. package/dist/modules/calendar/index.js.map +1 -0
  328. package/dist/modules/calendar/jobs.d.ts +3 -0
  329. package/dist/modules/calendar/jobs.d.ts.map +1 -0
  330. package/dist/modules/calendar/jobs.js +57 -0
  331. package/dist/modules/calendar/jobs.js.map +1 -0
  332. package/dist/modules/calendar/models.d.ts +3 -0
  333. package/dist/modules/calendar/models.d.ts.map +1 -0
  334. package/dist/modules/calendar/models.js +90 -0
  335. package/dist/modules/calendar/models.js.map +1 -0
  336. package/dist/modules/calendar/operations.d.ts +45 -0
  337. package/dist/modules/calendar/operations.d.ts.map +1 -0
  338. package/dist/modules/calendar/operations.js +280 -0
  339. package/dist/modules/calendar/operations.js.map +1 -0
  340. package/dist/modules/calendar/recurrence.d.ts +28 -0
  341. package/dist/modules/calendar/recurrence.d.ts.map +1 -0
  342. package/dist/modules/calendar/recurrence.js +175 -0
  343. package/dist/modules/calendar/recurrence.js.map +1 -0
  344. package/dist/modules/calendar/relations.d.ts +3 -0
  345. package/dist/modules/calendar/relations.d.ts.map +1 -0
  346. package/dist/modules/calendar/relations.js +22 -0
  347. package/dist/modules/calendar/relations.js.map +1 -0
  348. package/dist/modules/calendar/types.d.ts +10 -0
  349. package/dist/modules/calendar/types.d.ts.map +1 -0
  350. package/dist/modules/calendar/types.js +6 -0
  351. package/dist/modules/calendar/types.js.map +1 -0
  352. package/dist/modules/calendar_activity/index.d.ts +6 -0
  353. package/dist/modules/calendar_activity/index.d.ts.map +1 -0
  354. package/dist/modules/calendar_activity/index.js +250 -0
  355. package/dist/modules/calendar_activity/index.js.map +1 -0
  356. package/dist/modules/calendar_backend/index.d.ts +5 -0
  357. package/dist/modules/calendar_backend/index.d.ts.map +1 -0
  358. package/dist/modules/calendar_backend/index.js +47 -0
  359. package/dist/modules/calendar_backend/index.js.map +1 -0
  360. package/dist/modules/calendar_backend/islands.d.ts +3 -0
  361. package/dist/modules/calendar_backend/islands.d.ts.map +1 -0
  362. package/dist/modules/calendar_backend/islands.js +12 -0
  363. package/dist/modules/calendar_backend/islands.js.map +1 -0
  364. package/dist/modules/calendar_backend/routes.d.ts +3 -0
  365. package/dist/modules/calendar_backend/routes.d.ts.map +1 -0
  366. package/dist/modules/calendar_backend/routes.js +43 -0
  367. package/dist/modules/calendar_backend/routes.js.map +1 -0
  368. package/dist/modules/calendar_backend/screens.d.ts +5 -0
  369. package/dist/modules/calendar_backend/screens.d.ts.map +1 -0
  370. package/dist/modules/calendar_backend/screens.js +4 -0
  371. package/dist/modules/calendar_backend/screens.js.map +1 -0
  372. package/dist/modules/calendar_mail_transport/index.d.ts +6 -0
  373. package/dist/modules/calendar_mail_transport/index.d.ts.map +1 -0
  374. package/dist/modules/calendar_mail_transport/index.js +138 -0
  375. package/dist/modules/calendar_mail_transport/index.js.map +1 -0
  376. package/dist/modules/catalog/index.d.ts +3 -0
  377. package/dist/modules/catalog/index.d.ts.map +1 -0
  378. package/dist/modules/catalog/index.js +68 -0
  379. package/dist/modules/catalog/index.js.map +1 -0
  380. package/dist/modules/checkout/index.d.ts +3 -0
  381. package/dist/modules/checkout/index.d.ts.map +1 -0
  382. package/dist/modules/checkout/index.js +50 -0
  383. package/dist/modules/checkout/index.js.map +1 -0
  384. package/dist/modules/company/functions.d.ts +3 -0
  385. package/dist/modules/company/functions.d.ts.map +1 -0
  386. package/dist/modules/company/functions.js +337 -0
  387. package/dist/modules/company/functions.js.map +1 -0
  388. package/dist/modules/company/index.d.ts +3 -0
  389. package/dist/modules/company/index.d.ts.map +1 -0
  390. package/dist/modules/company/index.js +23 -0
  391. package/dist/modules/company/index.js.map +1 -0
  392. package/dist/modules/company/messages.d.ts +63 -0
  393. package/dist/modules/company/messages.d.ts.map +1 -0
  394. package/dist/modules/company/messages.js +63 -0
  395. package/dist/modules/company/messages.js.map +1 -0
  396. package/dist/modules/company/models.d.ts +19 -0
  397. package/dist/modules/company/models.d.ts.map +1 -0
  398. package/dist/modules/company/models.js +61 -0
  399. package/dist/modules/company/models.js.map +1 -0
  400. package/dist/modules/company/relations.d.ts +3 -0
  401. package/dist/modules/company/relations.d.ts.map +1 -0
  402. package/dist/modules/company/relations.js +14 -0
  403. package/dist/modules/company/relations.js.map +1 -0
  404. package/dist/modules/company_backend/index.d.ts +5 -0
  405. package/dist/modules/company_backend/index.d.ts.map +1 -0
  406. package/dist/modules/company_backend/index.js +136 -0
  407. package/dist/modules/company_backend/index.js.map +1 -0
  408. package/dist/modules/company_backend/menus.d.ts +3 -0
  409. package/dist/modules/company_backend/menus.d.ts.map +1 -0
  410. package/dist/modules/company_backend/menus.js +17 -0
  411. package/dist/modules/company_backend/menus.js.map +1 -0
  412. package/dist/modules/company_backend/routes.d.ts +3 -0
  413. package/dist/modules/company_backend/routes.d.ts.map +1 -0
  414. package/dist/modules/company_backend/routes.js +269 -0
  415. package/dist/modules/company_backend/routes.js.map +1 -0
  416. package/dist/modules/company_backend/screens.d.ts +62 -0
  417. package/dist/modules/company_backend/screens.d.ts.map +1 -0
  418. package/dist/modules/company_backend/screens.js +268 -0
  419. package/dist/modules/company_backend/screens.js.map +1 -0
  420. package/dist/modules/crm/functions.d.ts +5 -0
  421. package/dist/modules/crm/functions.d.ts.map +1 -0
  422. package/dist/modules/crm/functions.js +840 -0
  423. package/dist/modules/crm/functions.js.map +1 -0
  424. package/dist/modules/crm/index.d.ts +6 -0
  425. package/dist/modules/crm/index.d.ts.map +1 -0
  426. package/dist/modules/crm/index.js +22 -0
  427. package/dist/modules/crm/index.js.map +1 -0
  428. package/dist/modules/crm/jobs.d.ts +4 -0
  429. package/dist/modules/crm/jobs.d.ts.map +1 -0
  430. package/dist/modules/crm/jobs.js +3 -0
  431. package/dist/modules/crm/jobs.js.map +1 -0
  432. package/dist/modules/crm/messages.d.ts +37 -0
  433. package/dist/modules/crm/messages.d.ts.map +1 -0
  434. package/dist/modules/crm/messages.js +68 -0
  435. package/dist/modules/crm/messages.js.map +1 -0
  436. package/dist/modules/crm/models.d.ts +3 -0
  437. package/dist/modules/crm/models.d.ts.map +1 -0
  438. package/dist/modules/crm/models.js +215 -0
  439. package/dist/modules/crm/models.js.map +1 -0
  440. package/dist/modules/crm/operations.d.ts +121 -0
  441. package/dist/modules/crm/operations.d.ts.map +1 -0
  442. package/dist/modules/crm/operations.js +744 -0
  443. package/dist/modules/crm/operations.js.map +1 -0
  444. package/dist/modules/crm/search.d.ts +67 -0
  445. package/dist/modules/crm/search.d.ts.map +1 -0
  446. package/dist/modules/crm/search.js +89 -0
  447. package/dist/modules/crm/search.js.map +1 -0
  448. package/dist/modules/crm/types.d.ts +10 -0
  449. package/dist/modules/crm/types.d.ts.map +1 -0
  450. package/dist/modules/crm/types.js +6 -0
  451. package/dist/modules/crm/types.js.map +1 -0
  452. package/dist/modules/crm_backend/client/crm-kanban-view.d.mts +8 -0
  453. package/dist/modules/crm_backend/client/crm-kanban-view.d.mts.map +1 -0
  454. package/dist/modules/crm_backend/client/crm-kanban-view.mjs +129 -0
  455. package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -0
  456. package/dist/modules/crm_backend/client/crm-kanban.d.mts +3 -0
  457. package/dist/modules/crm_backend/client/crm-kanban.d.mts.map +1 -0
  458. package/dist/modules/crm_backend/client/crm-kanban.mjs +7 -0
  459. package/dist/modules/crm_backend/client/crm-kanban.mjs.map +1 -0
  460. package/dist/modules/crm_backend/client/crm.css +69 -0
  461. package/dist/modules/crm_backend/index.d.ts +4 -0
  462. package/dist/modules/crm_backend/index.d.ts.map +1 -0
  463. package/dist/modules/crm_backend/index.js +54 -0
  464. package/dist/modules/crm_backend/index.js.map +1 -0
  465. package/dist/modules/crm_backend/islands.d.ts +9 -0
  466. package/dist/modules/crm_backend/islands.d.ts.map +1 -0
  467. package/dist/modules/crm_backend/islands.js +13 -0
  468. package/dist/modules/crm_backend/islands.js.map +1 -0
  469. package/dist/modules/crm_backend/list-search.d.ts +21 -0
  470. package/dist/modules/crm_backend/list-search.d.ts.map +1 -0
  471. package/dist/modules/crm_backend/list-search.js +220 -0
  472. package/dist/modules/crm_backend/list-search.js.map +1 -0
  473. package/dist/modules/crm_backend/messages.d.ts +183 -0
  474. package/dist/modules/crm_backend/messages.d.ts.map +1 -0
  475. package/dist/modules/crm_backend/messages.js +182 -0
  476. package/dist/modules/crm_backend/messages.js.map +1 -0
  477. package/dist/modules/crm_backend/routes.d.ts +3 -0
  478. package/dist/modules/crm_backend/routes.d.ts.map +1 -0
  479. package/dist/modules/crm_backend/routes.js +520 -0
  480. package/dist/modules/crm_backend/routes.js.map +1 -0
  481. package/dist/modules/crm_backend/screens.d.ts +32 -0
  482. package/dist/modules/crm_backend/screens.d.ts.map +1 -0
  483. package/dist/modules/crm_backend/screens.js +405 -0
  484. package/dist/modules/crm_backend/screens.js.map +1 -0
  485. package/dist/modules/crm_sale/index.d.ts +4 -0
  486. package/dist/modules/crm_sale/index.d.ts.map +1 -0
  487. package/dist/modules/crm_sale/index.js +18 -0
  488. package/dist/modules/crm_sale/index.js.map +1 -0
  489. package/dist/modules/crm_sale/messages.d.ts +10 -0
  490. package/dist/modules/crm_sale/messages.d.ts.map +1 -0
  491. package/dist/modules/crm_sale/messages.js +14 -0
  492. package/dist/modules/crm_sale/messages.js.map +1 -0
  493. package/dist/modules/crm_sale/models.d.ts +3 -0
  494. package/dist/modules/crm_sale/models.d.ts.map +1 -0
  495. package/dist/modules/crm_sale/models.js +16 -0
  496. package/dist/modules/crm_sale/models.js.map +1 -0
  497. package/dist/modules/crm_sale/sale-functions.d.ts +15 -0
  498. package/dist/modules/crm_sale/sale-functions.d.ts.map +1 -0
  499. package/dist/modules/crm_sale/sale-functions.js +139 -0
  500. package/dist/modules/crm_sale/sale-functions.js.map +1 -0
  501. package/dist/modules/crm_website/functions.d.ts +3 -0
  502. package/dist/modules/crm_website/functions.d.ts.map +1 -0
  503. package/dist/modules/crm_website/functions.js +65 -0
  504. package/dist/modules/crm_website/functions.js.map +1 -0
  505. package/dist/modules/crm_website/index.d.ts +3 -0
  506. package/dist/modules/crm_website/index.d.ts.map +1 -0
  507. package/dist/modules/crm_website/index.js +19 -0
  508. package/dist/modules/crm_website/index.js.map +1 -0
  509. package/dist/modules/crm_website/messages.d.ts +20 -0
  510. package/dist/modules/crm_website/messages.d.ts.map +1 -0
  511. package/dist/modules/crm_website/messages.js +34 -0
  512. package/dist/modules/crm_website/messages.js.map +1 -0
  513. package/dist/modules/crm_website/models.d.ts +3 -0
  514. package/dist/modules/crm_website/models.d.ts.map +1 -0
  515. package/dist/modules/crm_website/models.js +15 -0
  516. package/dist/modules/crm_website/models.js.map +1 -0
  517. package/dist/modules/crm_website/routes.d.ts +3 -0
  518. package/dist/modules/crm_website/routes.d.ts.map +1 -0
  519. package/dist/modules/crm_website/routes.js +71 -0
  520. package/dist/modules/crm_website/routes.js.map +1 -0
  521. package/dist/modules/crm_website/screens.d.ts +5 -0
  522. package/dist/modules/crm_website/screens.d.ts.map +1 -0
  523. package/dist/modules/crm_website/screens.js +15 -0
  524. package/dist/modules/crm_website/screens.js.map +1 -0
  525. package/dist/modules/hospitality_core/calendar.d.ts +9 -0
  526. package/dist/modules/hospitality_core/calendar.d.ts.map +1 -0
  527. package/dist/modules/hospitality_core/calendar.js +41 -0
  528. package/dist/modules/hospitality_core/calendar.js.map +1 -0
  529. package/dist/modules/hospitality_core/content.d.ts +13 -0
  530. package/dist/modules/hospitality_core/content.d.ts.map +1 -0
  531. package/dist/modules/hospitality_core/content.js +345 -0
  532. package/dist/modules/hospitality_core/content.js.map +1 -0
  533. package/dist/modules/hospitality_core/functions.d.ts +3 -0
  534. package/dist/modules/hospitality_core/functions.d.ts.map +1 -0
  535. package/dist/modules/hospitality_core/functions.js +1558 -0
  536. package/dist/modules/hospitality_core/functions.js.map +1 -0
  537. package/dist/modules/hospitality_core/housekeeping.d.ts +3 -0
  538. package/dist/modules/hospitality_core/housekeeping.d.ts.map +1 -0
  539. package/dist/modules/hospitality_core/housekeeping.js +352 -0
  540. package/dist/modules/hospitality_core/housekeeping.js.map +1 -0
  541. package/dist/modules/hospitality_core/index.d.ts +5 -0
  542. package/dist/modules/hospitality_core/index.d.ts.map +1 -0
  543. package/dist/modules/hospitality_core/index.js +41 -0
  544. package/dist/modules/hospitality_core/index.js.map +1 -0
  545. package/dist/modules/hospitality_core/inventory.d.ts +40 -0
  546. package/dist/modules/hospitality_core/inventory.d.ts.map +1 -0
  547. package/dist/modules/hospitality_core/inventory.js +627 -0
  548. package/dist/modules/hospitality_core/inventory.js.map +1 -0
  549. package/dist/modules/hospitality_core/menus.d.ts +3 -0
  550. package/dist/modules/hospitality_core/menus.d.ts.map +1 -0
  551. package/dist/modules/hospitality_core/menus.js +134 -0
  552. package/dist/modules/hospitality_core/menus.js.map +1 -0
  553. package/dist/modules/hospitality_core/messages.d.ts +3 -0
  554. package/dist/modules/hospitality_core/messages.d.ts.map +1 -0
  555. package/dist/modules/hospitality_core/messages.js +2011 -0
  556. package/dist/modules/hospitality_core/messages.js.map +1 -0
  557. package/dist/modules/hospitality_core/models.d.ts +10 -0
  558. package/dist/modules/hospitality_core/models.d.ts.map +1 -0
  559. package/dist/modules/hospitality_core/models.js +657 -0
  560. package/dist/modules/hospitality_core/models.js.map +1 -0
  561. package/dist/modules/hospitality_core/night-audit.d.ts +26 -0
  562. package/dist/modules/hospitality_core/night-audit.d.ts.map +1 -0
  563. package/dist/modules/hospitality_core/night-audit.js +381 -0
  564. package/dist/modules/hospitality_core/night-audit.js.map +1 -0
  565. package/dist/modules/hospitality_core/operations.d.ts +3 -0
  566. package/dist/modules/hospitality_core/operations.d.ts.map +1 -0
  567. package/dist/modules/hospitality_core/operations.js +1562 -0
  568. package/dist/modules/hospitality_core/operations.js.map +1 -0
  569. package/dist/modules/hospitality_core/relations.d.ts +3 -0
  570. package/dist/modules/hospitality_core/relations.d.ts.map +1 -0
  571. package/dist/modules/hospitality_core/relations.js +175 -0
  572. package/dist/modules/hospitality_core/relations.js.map +1 -0
  573. package/dist/modules/hospitality_core/routes.d.ts +3 -0
  574. package/dist/modules/hospitality_core/routes.d.ts.map +1 -0
  575. package/dist/modules/hospitality_core/routes.js +1556 -0
  576. package/dist/modules/hospitality_core/routes.js.map +1 -0
  577. package/dist/modules/hospitality_core/screens.d.ts +763 -0
  578. package/dist/modules/hospitality_core/screens.d.ts.map +1 -0
  579. package/dist/modules/hospitality_core/screens.js +4138 -0
  580. package/dist/modules/hospitality_core/screens.js.map +1 -0
  581. package/dist/modules/hospitality_core/services.d.ts +9 -0
  582. package/dist/modules/hospitality_core/services.d.ts.map +1 -0
  583. package/dist/modules/hospitality_core/services.js +586 -0
  584. package/dist/modules/hospitality_core/services.js.map +1 -0
  585. package/dist/modules/hospitality_core/stay-notices.d.ts +11 -0
  586. package/dist/modules/hospitality_core/stay-notices.d.ts.map +1 -0
  587. package/dist/modules/hospitality_core/stay-notices.js +338 -0
  588. package/dist/modules/hospitality_core/stay-notices.js.map +1 -0
  589. package/dist/modules/hospitality_core/types.d.ts +61 -0
  590. package/dist/modules/hospitality_core/types.d.ts.map +1 -0
  591. package/dist/modules/hospitality_core/types.js +65 -0
  592. package/dist/modules/hospitality_core/types.js.map +1 -0
  593. package/dist/modules/hr/functions.d.ts +3 -0
  594. package/dist/modules/hr/functions.d.ts.map +1 -0
  595. package/dist/modules/hr/functions.js +711 -0
  596. package/dist/modules/hr/functions.js.map +1 -0
  597. package/dist/modules/hr/index.d.ts +5 -0
  598. package/dist/modules/hr/index.d.ts.map +1 -0
  599. package/dist/modules/hr/index.js +20 -0
  600. package/dist/modules/hr/index.js.map +1 -0
  601. package/dist/modules/hr/messages.d.ts +45 -0
  602. package/dist/modules/hr/messages.d.ts.map +1 -0
  603. package/dist/modules/hr/messages.js +45 -0
  604. package/dist/modules/hr/messages.js.map +1 -0
  605. package/dist/modules/hr/models.d.ts +3 -0
  606. package/dist/modules/hr/models.d.ts.map +1 -0
  607. package/dist/modules/hr/models.js +166 -0
  608. package/dist/modules/hr/models.js.map +1 -0
  609. package/dist/modules/hr/relations.d.ts +3 -0
  610. package/dist/modules/hr/relations.d.ts.map +1 -0
  611. package/dist/modules/hr/relations.js +19 -0
  612. package/dist/modules/hr/relations.js.map +1 -0
  613. package/dist/modules/hr/types.d.ts +9 -0
  614. package/dist/modules/hr/types.d.ts.map +1 -0
  615. package/dist/modules/hr/types.js +5 -0
  616. package/dist/modules/hr/types.js.map +1 -0
  617. package/dist/modules/hr_backend/index.d.ts +4 -0
  618. package/dist/modules/hr_backend/index.d.ts.map +1 -0
  619. package/dist/modules/hr_backend/index.js +142 -0
  620. package/dist/modules/hr_backend/index.js.map +1 -0
  621. package/dist/modules/hr_backend/routes.d.ts +3 -0
  622. package/dist/modules/hr_backend/routes.d.ts.map +1 -0
  623. package/dist/modules/hr_backend/routes.js +83 -0
  624. package/dist/modules/hr_backend/routes.js.map +1 -0
  625. package/dist/modules/hr_backend/screens.d.ts +9 -0
  626. package/dist/modules/hr_backend/screens.d.ts.map +1 -0
  627. package/dist/modules/hr_backend/screens.js +144 -0
  628. package/dist/modules/hr_backend/screens.js.map +1 -0
  629. package/dist/modules/inventory/index.d.ts +3 -0
  630. package/dist/modules/inventory/index.d.ts.map +1 -0
  631. package/dist/modules/inventory/index.js +31 -0
  632. package/dist/modules/inventory/index.js.map +1 -0
  633. package/dist/modules/loyalty/admin-functions.d.ts +3 -0
  634. package/dist/modules/loyalty/admin-functions.d.ts.map +1 -0
  635. package/dist/modules/loyalty/admin-functions.js +692 -0
  636. package/dist/modules/loyalty/admin-functions.js.map +1 -0
  637. package/dist/modules/loyalty/engine.d.ts +31 -0
  638. package/dist/modules/loyalty/engine.d.ts.map +1 -0
  639. package/dist/modules/loyalty/engine.js +412 -0
  640. package/dist/modules/loyalty/engine.js.map +1 -0
  641. package/dist/modules/loyalty/index.d.ts +5 -0
  642. package/dist/modules/loyalty/index.d.ts.map +1 -0
  643. package/dist/modules/loyalty/index.js +24 -0
  644. package/dist/modules/loyalty/index.js.map +1 -0
  645. package/dist/modules/loyalty/jobs.d.ts +4 -0
  646. package/dist/modules/loyalty/jobs.d.ts.map +1 -0
  647. package/dist/modules/loyalty/jobs.js +103 -0
  648. package/dist/modules/loyalty/jobs.js.map +1 -0
  649. package/dist/modules/loyalty/ledger.d.ts +48 -0
  650. package/dist/modules/loyalty/ledger.d.ts.map +1 -0
  651. package/dist/modules/loyalty/ledger.js +164 -0
  652. package/dist/modules/loyalty/ledger.js.map +1 -0
  653. package/dist/modules/loyalty/membership-functions.d.ts +4 -0
  654. package/dist/modules/loyalty/membership-functions.d.ts.map +1 -0
  655. package/dist/modules/loyalty/membership-functions.js +163 -0
  656. package/dist/modules/loyalty/membership-functions.js.map +1 -0
  657. package/dist/modules/loyalty/messages.d.ts +119 -0
  658. package/dist/modules/loyalty/messages.d.ts.map +1 -0
  659. package/dist/modules/loyalty/messages.js +119 -0
  660. package/dist/modules/loyalty/messages.js.map +1 -0
  661. package/dist/modules/loyalty/models.d.ts +3 -0
  662. package/dist/modules/loyalty/models.d.ts.map +1 -0
  663. package/dist/modules/loyalty/models.js +259 -0
  664. package/dist/modules/loyalty/models.js.map +1 -0
  665. package/dist/modules/loyalty/order-functions.d.ts +3 -0
  666. package/dist/modules/loyalty/order-functions.d.ts.map +1 -0
  667. package/dist/modules/loyalty/order-functions.js +656 -0
  668. package/dist/modules/loyalty/order-functions.js.map +1 -0
  669. package/dist/modules/loyalty/relations.d.ts +3 -0
  670. package/dist/modules/loyalty/relations.d.ts.map +1 -0
  671. package/dist/modules/loyalty/relations.js +19 -0
  672. package/dist/modules/loyalty/relations.js.map +1 -0
  673. package/dist/modules/loyalty/types.d.ts +83 -0
  674. package/dist/modules/loyalty/types.d.ts.map +1 -0
  675. package/dist/modules/loyalty/types.js +23 -0
  676. package/dist/modules/loyalty/types.js.map +1 -0
  677. package/dist/modules/loyalty_backend/index.d.ts +3 -0
  678. package/dist/modules/loyalty_backend/index.d.ts.map +1 -0
  679. package/dist/modules/loyalty_backend/index.js +636 -0
  680. package/dist/modules/loyalty_backend/index.js.map +1 -0
  681. package/dist/modules/loyalty_backend/messages.d.ts +162 -0
  682. package/dist/modules/loyalty_backend/messages.d.ts.map +1 -0
  683. package/dist/modules/loyalty_backend/messages.js +318 -0
  684. package/dist/modules/loyalty_backend/messages.js.map +1 -0
  685. package/dist/modules/loyalty_backend/screens.d.ts +33 -0
  686. package/dist/modules/loyalty_backend/screens.d.ts.map +1 -0
  687. package/dist/modules/loyalty_backend/screens.js +562 -0
  688. package/dist/modules/loyalty_backend/screens.js.map +1 -0
  689. package/dist/modules/loyalty_pos/functions.d.ts +19 -0
  690. package/dist/modules/loyalty_pos/functions.d.ts.map +1 -0
  691. package/dist/modules/loyalty_pos/functions.js +274 -0
  692. package/dist/modules/loyalty_pos/functions.js.map +1 -0
  693. package/dist/modules/loyalty_pos/index.d.ts +3 -0
  694. package/dist/modules/loyalty_pos/index.d.ts.map +1 -0
  695. package/dist/modules/loyalty_pos/index.js +45 -0
  696. package/dist/modules/loyalty_pos/index.js.map +1 -0
  697. package/dist/modules/loyalty_sale/functions.d.ts +19 -0
  698. package/dist/modules/loyalty_sale/functions.d.ts.map +1 -0
  699. package/dist/modules/loyalty_sale/functions.js +275 -0
  700. package/dist/modules/loyalty_sale/functions.js.map +1 -0
  701. package/dist/modules/loyalty_sale/index.d.ts +3 -0
  702. package/dist/modules/loyalty_sale/index.d.ts.map +1 -0
  703. package/dist/modules/loyalty_sale/index.js +45 -0
  704. package/dist/modules/loyalty_sale/index.js.map +1 -0
  705. package/dist/modules/mail/functions.d.ts +3 -0
  706. package/dist/modules/mail/functions.d.ts.map +1 -0
  707. package/dist/modules/mail/functions.js +129 -0
  708. package/dist/modules/mail/functions.js.map +1 -0
  709. package/dist/modules/mail/index.d.ts +9 -0
  710. package/dist/modules/mail/index.d.ts.map +1 -0
  711. package/dist/modules/mail/index.js +22 -0
  712. package/dist/modules/mail/index.js.map +1 -0
  713. package/dist/modules/mail/messages.d.ts +13 -0
  714. package/dist/modules/mail/messages.d.ts.map +1 -0
  715. package/dist/modules/mail/messages.js +13 -0
  716. package/dist/modules/mail/messages.js.map +1 -0
  717. package/dist/modules/mail/models.d.ts +3 -0
  718. package/dist/modules/mail/models.d.ts.map +1 -0
  719. package/dist/modules/mail/models.js +124 -0
  720. package/dist/modules/mail/models.js.map +1 -0
  721. package/dist/modules/mail/operations.d.ts +60 -0
  722. package/dist/modules/mail/operations.d.ts.map +1 -0
  723. package/dist/modules/mail/operations.js +249 -0
  724. package/dist/modules/mail/operations.js.map +1 -0
  725. package/dist/modules/mail/relations.d.ts +3 -0
  726. package/dist/modules/mail/relations.d.ts.map +1 -0
  727. package/dist/modules/mail/relations.js +41 -0
  728. package/dist/modules/mail/relations.js.map +1 -0
  729. package/dist/modules/mail/target.d.ts +16 -0
  730. package/dist/modules/mail/target.d.ts.map +1 -0
  731. package/dist/modules/mail/target.js +245 -0
  732. package/dist/modules/mail/target.js.map +1 -0
  733. package/dist/modules/mail/types.d.ts +7 -0
  734. package/dist/modules/mail/types.d.ts.map +1 -0
  735. package/dist/modules/mail/types.js +4 -0
  736. package/dist/modules/mail/types.js.map +1 -0
  737. package/dist/modules/mail_backend/index.d.ts +5 -0
  738. package/dist/modules/mail_backend/index.d.ts.map +1 -0
  739. package/dist/modules/mail_backend/index.js +56 -0
  740. package/dist/modules/mail_backend/index.js.map +1 -0
  741. package/dist/modules/mail_backend/islands.d.ts +3 -0
  742. package/dist/modules/mail_backend/islands.d.ts.map +1 -0
  743. package/dist/modules/mail_backend/islands.js +20 -0
  744. package/dist/modules/mail_backend/islands.js.map +1 -0
  745. package/dist/modules/mail_backend/routes.d.ts +5 -0
  746. package/dist/modules/mail_backend/routes.d.ts.map +1 -0
  747. package/dist/modules/mail_backend/routes.js +37 -0
  748. package/dist/modules/mail_backend/routes.js.map +1 -0
  749. package/dist/modules/mail_backend/screens.d.ts +5 -0
  750. package/dist/modules/mail_backend/screens.d.ts.map +1 -0
  751. package/dist/modules/mail_backend/screens.js +11 -0
  752. package/dist/modules/mail_backend/screens.js.map +1 -0
  753. package/dist/modules/mail_inbound/functions.d.ts +27 -0
  754. package/dist/modules/mail_inbound/functions.d.ts.map +1 -0
  755. package/dist/modules/mail_inbound/functions.js +178 -0
  756. package/dist/modules/mail_inbound/functions.js.map +1 -0
  757. package/dist/modules/mail_inbound/index.d.ts +10 -0
  758. package/dist/modules/mail_inbound/index.d.ts.map +1 -0
  759. package/dist/modules/mail_inbound/index.js +38 -0
  760. package/dist/modules/mail_inbound/index.js.map +1 -0
  761. package/dist/modules/mail_inbound/jobs.d.ts +3 -0
  762. package/dist/modules/mail_inbound/jobs.d.ts.map +1 -0
  763. package/dist/modules/mail_inbound/jobs.js +29 -0
  764. package/dist/modules/mail_inbound/jobs.js.map +1 -0
  765. package/dist/modules/mail_inbound/models.d.ts +3 -0
  766. package/dist/modules/mail_inbound/models.d.ts.map +1 -0
  767. package/dist/modules/mail_inbound/models.js +68 -0
  768. package/dist/modules/mail_inbound/models.js.map +1 -0
  769. package/dist/modules/mail_inbound/operations.d.ts +17 -0
  770. package/dist/modules/mail_inbound/operations.d.ts.map +1 -0
  771. package/dist/modules/mail_inbound/operations.js +273 -0
  772. package/dist/modules/mail_inbound/operations.js.map +1 -0
  773. package/dist/modules/mail_inbound/relations.d.ts +3 -0
  774. package/dist/modules/mail_inbound/relations.d.ts.map +1 -0
  775. package/dist/modules/mail_inbound/relations.js +19 -0
  776. package/dist/modules/mail_inbound/relations.js.map +1 -0
  777. package/dist/modules/mail_inbound/routes.d.ts +4 -0
  778. package/dist/modules/mail_inbound/routes.d.ts.map +1 -0
  779. package/dist/modules/mail_inbound/routes.js +156 -0
  780. package/dist/modules/mail_inbound/routes.js.map +1 -0
  781. package/dist/modules/mail_inbound/types.d.ts +37 -0
  782. package/dist/modules/mail_inbound/types.d.ts.map +1 -0
  783. package/dist/modules/mail_inbound/types.js +3 -0
  784. package/dist/modules/mail_inbound/types.js.map +1 -0
  785. package/dist/modules/mail_inbound_backend/index.d.ts +5 -0
  786. package/dist/modules/mail_inbound_backend/index.d.ts.map +1 -0
  787. package/dist/modules/mail_inbound_backend/index.js +59 -0
  788. package/dist/modules/mail_inbound_backend/index.js.map +1 -0
  789. package/dist/modules/mail_inbound_backend/routes.d.ts +5 -0
  790. package/dist/modules/mail_inbound_backend/routes.d.ts.map +1 -0
  791. package/dist/modules/mail_inbound_backend/routes.js +31 -0
  792. package/dist/modules/mail_inbound_backend/routes.js.map +1 -0
  793. package/dist/modules/mail_inbound_backend/screens.d.ts +5 -0
  794. package/dist/modules/mail_inbound_backend/screens.d.ts.map +1 -0
  795. package/dist/modules/mail_inbound_backend/screens.js +25 -0
  796. package/dist/modules/mail_inbound_backend/screens.js.map +1 -0
  797. package/dist/modules/mail_transport/functions.d.ts +3 -0
  798. package/dist/modules/mail_transport/functions.d.ts.map +1 -0
  799. package/dist/modules/mail_transport/functions.js +280 -0
  800. package/dist/modules/mail_transport/functions.js.map +1 -0
  801. package/dist/modules/mail_transport/index.d.ts +11 -0
  802. package/dist/modules/mail_transport/index.d.ts.map +1 -0
  803. package/dist/modules/mail_transport/index.js +37 -0
  804. package/dist/modules/mail_transport/index.js.map +1 -0
  805. package/dist/modules/mail_transport/jobs.d.ts +3 -0
  806. package/dist/modules/mail_transport/jobs.d.ts.map +1 -0
  807. package/dist/modules/mail_transport/jobs.js +79 -0
  808. package/dist/modules/mail_transport/jobs.js.map +1 -0
  809. package/dist/modules/mail_transport/models.d.ts +3 -0
  810. package/dist/modules/mail_transport/models.d.ts.map +1 -0
  811. package/dist/modules/mail_transport/models.js +88 -0
  812. package/dist/modules/mail_transport/models.js.map +1 -0
  813. package/dist/modules/mail_transport/operations.d.ts +16 -0
  814. package/dist/modules/mail_transport/operations.d.ts.map +1 -0
  815. package/dist/modules/mail_transport/operations.js +122 -0
  816. package/dist/modules/mail_transport/operations.js.map +1 -0
  817. package/dist/modules/mail_transport/relations.d.ts +3 -0
  818. package/dist/modules/mail_transport/relations.d.ts.map +1 -0
  819. package/dist/modules/mail_transport/relations.js +19 -0
  820. package/dist/modules/mail_transport/relations.js.map +1 -0
  821. package/dist/modules/mail_transport/target.d.ts +8 -0
  822. package/dist/modules/mail_transport/target.d.ts.map +1 -0
  823. package/dist/modules/mail_transport/target.js +43 -0
  824. package/dist/modules/mail_transport/target.js.map +1 -0
  825. package/dist/modules/mail_transport/template.d.ts +4 -0
  826. package/dist/modules/mail_transport/template.d.ts.map +1 -0
  827. package/dist/modules/mail_transport/template.js +52 -0
  828. package/dist/modules/mail_transport/template.js.map +1 -0
  829. package/dist/modules/mail_transport/types.d.ts +9 -0
  830. package/dist/modules/mail_transport/types.d.ts.map +1 -0
  831. package/dist/modules/mail_transport/types.js +3 -0
  832. package/dist/modules/mail_transport/types.js.map +1 -0
  833. package/dist/modules/mail_transport_backend/index.d.ts +5 -0
  834. package/dist/modules/mail_transport_backend/index.d.ts.map +1 -0
  835. package/dist/modules/mail_transport_backend/index.js +69 -0
  836. package/dist/modules/mail_transport_backend/index.js.map +1 -0
  837. package/dist/modules/mail_transport_backend/routes.d.ts +5 -0
  838. package/dist/modules/mail_transport_backend/routes.d.ts.map +1 -0
  839. package/dist/modules/mail_transport_backend/routes.js +42 -0
  840. package/dist/modules/mail_transport_backend/routes.js.map +1 -0
  841. package/dist/modules/mail_transport_backend/screens.d.ts +5 -0
  842. package/dist/modules/mail_transport_backend/screens.d.ts.map +1 -0
  843. package/dist/modules/mail_transport_backend/screens.js +35 -0
  844. package/dist/modules/mail_transport_backend/screens.js.map +1 -0
  845. package/dist/modules/oauth/functions.d.ts +3 -0
  846. package/dist/modules/oauth/functions.d.ts.map +1 -0
  847. package/dist/modules/oauth/functions.js +817 -0
  848. package/dist/modules/oauth/functions.js.map +1 -0
  849. package/dist/modules/oauth/index.d.ts +4 -0
  850. package/dist/modules/oauth/index.d.ts.map +1 -0
  851. package/dist/modules/oauth/index.js +22 -0
  852. package/dist/modules/oauth/index.js.map +1 -0
  853. package/dist/modules/oauth/messages.d.ts +129 -0
  854. package/dist/modules/oauth/messages.d.ts.map +1 -0
  855. package/dist/modules/oauth/messages.js +129 -0
  856. package/dist/modules/oauth/messages.js.map +1 -0
  857. package/dist/modules/oauth/models.d.ts +4 -0
  858. package/dist/modules/oauth/models.d.ts.map +1 -0
  859. package/dist/modules/oauth/models.js +83 -0
  860. package/dist/modules/oauth/models.js.map +1 -0
  861. package/dist/modules/oauth/protocol.d.ts +54 -0
  862. package/dist/modules/oauth/protocol.d.ts.map +1 -0
  863. package/dist/modules/oauth/protocol.js +309 -0
  864. package/dist/modules/oauth/protocol.js.map +1 -0
  865. package/dist/modules/oauth/relations.d.ts +3 -0
  866. package/dist/modules/oauth/relations.d.ts.map +1 -0
  867. package/dist/modules/oauth/relations.js +18 -0
  868. package/dist/modules/oauth/relations.js.map +1 -0
  869. package/dist/modules/oauth/routes.d.ts +3 -0
  870. package/dist/modules/oauth/routes.d.ts.map +1 -0
  871. package/dist/modules/oauth/routes.js +185 -0
  872. package/dist/modules/oauth/routes.js.map +1 -0
  873. package/dist/modules/oauth_backend/index.d.ts +4 -0
  874. package/dist/modules/oauth_backend/index.d.ts.map +1 -0
  875. package/dist/modules/oauth_backend/index.js +23 -0
  876. package/dist/modules/oauth_backend/index.js.map +1 -0
  877. package/dist/modules/oauth_backend/menus.d.ts +3 -0
  878. package/dist/modules/oauth_backend/menus.d.ts.map +1 -0
  879. package/dist/modules/oauth_backend/menus.js +17 -0
  880. package/dist/modules/oauth_backend/menus.js.map +1 -0
  881. package/dist/modules/oauth_backend/messages.d.ts +169 -0
  882. package/dist/modules/oauth_backend/messages.d.ts.map +1 -0
  883. package/dist/modules/oauth_backend/messages.js +169 -0
  884. package/dist/modules/oauth_backend/messages.js.map +1 -0
  885. package/dist/modules/oauth_backend/routes.d.ts +3 -0
  886. package/dist/modules/oauth_backend/routes.d.ts.map +1 -0
  887. package/dist/modules/oauth_backend/routes.js +231 -0
  888. package/dist/modules/oauth_backend/routes.js.map +1 -0
  889. package/dist/modules/oauth_backend/screens.d.ts +66 -0
  890. package/dist/modules/oauth_backend/screens.d.ts.map +1 -0
  891. package/dist/modules/oauth_backend/screens.js +323 -0
  892. package/dist/modules/oauth_backend/screens.js.map +1 -0
  893. package/dist/modules/odoo_collaboration_import/functions.d.ts +3 -0
  894. package/dist/modules/odoo_collaboration_import/functions.d.ts.map +1 -0
  895. package/dist/modules/odoo_collaboration_import/functions.js +128 -0
  896. package/dist/modules/odoo_collaboration_import/functions.js.map +1 -0
  897. package/dist/modules/odoo_collaboration_import/index.d.ts +6 -0
  898. package/dist/modules/odoo_collaboration_import/index.d.ts.map +1 -0
  899. package/dist/modules/odoo_collaboration_import/index.js +31 -0
  900. package/dist/modules/odoo_collaboration_import/index.js.map +1 -0
  901. package/dist/modules/odoo_collaboration_import/models.d.ts +3 -0
  902. package/dist/modules/odoo_collaboration_import/models.d.ts.map +1 -0
  903. package/dist/modules/odoo_collaboration_import/models.js +76 -0
  904. package/dist/modules/odoo_collaboration_import/models.js.map +1 -0
  905. package/dist/modules/odoo_collaboration_import/operations.d.ts +14 -0
  906. package/dist/modules/odoo_collaboration_import/operations.d.ts.map +1 -0
  907. package/dist/modules/odoo_collaboration_import/operations.js +1139 -0
  908. package/dist/modules/odoo_collaboration_import/operations.js.map +1 -0
  909. package/dist/modules/odoo_collaboration_import/relations.d.ts +3 -0
  910. package/dist/modules/odoo_collaboration_import/relations.d.ts.map +1 -0
  911. package/dist/modules/odoo_collaboration_import/relations.js +19 -0
  912. package/dist/modules/odoo_collaboration_import/relations.js.map +1 -0
  913. package/dist/modules/odoo_collaboration_import/types.d.ts +58 -0
  914. package/dist/modules/odoo_collaboration_import/types.d.ts.map +1 -0
  915. package/dist/modules/odoo_collaboration_import/types.js +2 -0
  916. package/dist/modules/odoo_collaboration_import/types.js.map +1 -0
  917. package/dist/modules/partner/functions.d.ts +5 -0
  918. package/dist/modules/partner/functions.d.ts.map +1 -0
  919. package/dist/modules/partner/functions.js +563 -0
  920. package/dist/modules/partner/functions.js.map +1 -0
  921. package/dist/modules/partner/index.d.ts +5 -0
  922. package/dist/modules/partner/index.d.ts.map +1 -0
  923. package/dist/modules/partner/index.js +23 -0
  924. package/dist/modules/partner/index.js.map +1 -0
  925. package/dist/modules/partner/messages.d.ts +55 -0
  926. package/dist/modules/partner/messages.d.ts.map +1 -0
  927. package/dist/modules/partner/messages.js +55 -0
  928. package/dist/modules/partner/messages.js.map +1 -0
  929. package/dist/modules/partner/models.d.ts +23 -0
  930. package/dist/modules/partner/models.d.ts.map +1 -0
  931. package/dist/modules/partner/models.js +124 -0
  932. package/dist/modules/partner/models.js.map +1 -0
  933. package/dist/modules/partner/relations.d.ts +4 -0
  934. package/dist/modules/partner/relations.d.ts.map +1 -0
  935. package/dist/modules/partner/relations.js +35 -0
  936. package/dist/modules/partner/relations.js.map +1 -0
  937. package/dist/modules/partner/types.d.ts +17 -0
  938. package/dist/modules/partner/types.d.ts.map +1 -0
  939. package/dist/modules/partner/types.js +14 -0
  940. package/dist/modules/partner/types.js.map +1 -0
  941. package/dist/modules/partner/views.d.ts +4 -0
  942. package/dist/modules/partner/views.d.ts.map +1 -0
  943. package/dist/modules/partner/views.js +19 -0
  944. package/dist/modules/partner/views.js.map +1 -0
  945. package/dist/modules/partner_backend/client/address-view.d.mts +5 -0
  946. package/dist/modules/partner_backend/client/address-view.d.mts.map +1 -0
  947. package/dist/modules/partner_backend/client/address-view.mjs +193 -0
  948. package/dist/modules/partner_backend/client/address-view.mjs.map +1 -0
  949. package/dist/modules/partner_backend/client/address.css +12 -0
  950. package/dist/modules/partner_backend/client/address.d.mts +5 -0
  951. package/dist/modules/partner_backend/client/address.d.mts.map +1 -0
  952. package/dist/modules/partner_backend/client/address.mjs +7 -0
  953. package/dist/modules/partner_backend/client/address.mjs.map +1 -0
  954. package/dist/modules/partner_backend/index.d.ts +5 -0
  955. package/dist/modules/partner_backend/index.d.ts.map +1 -0
  956. package/dist/modules/partner_backend/index.js +178 -0
  957. package/dist/modules/partner_backend/index.js.map +1 -0
  958. package/dist/modules/partner_backend/islands.d.ts +3 -0
  959. package/dist/modules/partner_backend/islands.d.ts.map +1 -0
  960. package/dist/modules/partner_backend/islands.js +23 -0
  961. package/dist/modules/partner_backend/islands.js.map +1 -0
  962. package/dist/modules/partner_backend/menus.d.ts +3 -0
  963. package/dist/modules/partner_backend/menus.d.ts.map +1 -0
  964. package/dist/modules/partner_backend/menus.js +11 -0
  965. package/dist/modules/partner_backend/menus.js.map +1 -0
  966. package/dist/modules/partner_backend/relation-control.d.ts +22 -0
  967. package/dist/modules/partner_backend/relation-control.d.ts.map +1 -0
  968. package/dist/modules/partner_backend/relation-control.js +46 -0
  969. package/dist/modules/partner_backend/relation-control.js.map +1 -0
  970. package/dist/modules/partner_backend/routes.d.ts +3 -0
  971. package/dist/modules/partner_backend/routes.d.ts.map +1 -0
  972. package/dist/modules/partner_backend/routes.js +300 -0
  973. package/dist/modules/partner_backend/routes.js.map +1 -0
  974. package/dist/modules/partner_backend/screens.d.ts +53 -0
  975. package/dist/modules/partner_backend/screens.d.ts.map +1 -0
  976. package/dist/modules/partner_backend/screens.js +169 -0
  977. package/dist/modules/partner_backend/screens.js.map +1 -0
  978. package/dist/modules/pos/functions.d.ts +6 -0
  979. package/dist/modules/pos/functions.d.ts.map +1 -0
  980. package/dist/modules/pos/functions.js +953 -0
  981. package/dist/modules/pos/functions.js.map +1 -0
  982. package/dist/modules/pos/index.d.ts +4 -0
  983. package/dist/modules/pos/index.d.ts.map +1 -0
  984. package/dist/modules/pos/index.js +34 -0
  985. package/dist/modules/pos/index.js.map +1 -0
  986. package/dist/modules/pos/models.d.ts +3 -0
  987. package/dist/modules/pos/models.d.ts.map +1 -0
  988. package/dist/modules/pos/models.js +107 -0
  989. package/dist/modules/pos/models.js.map +1 -0
  990. package/dist/modules/pos/relations.d.ts +3 -0
  991. package/dist/modules/pos/relations.d.ts.map +1 -0
  992. package/dist/modules/pos/relations.js +37 -0
  993. package/dist/modules/pos/relations.js.map +1 -0
  994. package/dist/modules/pos_backend/index.d.ts +3 -0
  995. package/dist/modules/pos_backend/index.d.ts.map +1 -0
  996. package/dist/modules/pos_backend/index.js +654 -0
  997. package/dist/modules/pos_backend/index.js.map +1 -0
  998. package/dist/modules/pos_backend/screens.d.ts +15 -0
  999. package/dist/modules/pos_backend/screens.d.ts.map +1 -0
  1000. package/dist/modules/pos_backend/screens.js +320 -0
  1001. package/dist/modules/pos_backend/screens.js.map +1 -0
  1002. package/dist/modules/pricing/functions.d.ts +6 -0
  1003. package/dist/modules/pricing/functions.d.ts.map +1 -0
  1004. package/dist/modules/pricing/functions.js +318 -0
  1005. package/dist/modules/pricing/functions.js.map +1 -0
  1006. package/dist/modules/pricing/index.d.ts +4 -0
  1007. package/dist/modules/pricing/index.d.ts.map +1 -0
  1008. package/dist/modules/pricing/index.js +30 -0
  1009. package/dist/modules/pricing/index.js.map +1 -0
  1010. package/dist/modules/pricing/models.d.ts +3 -0
  1011. package/dist/modules/pricing/models.d.ts.map +1 -0
  1012. package/dist/modules/pricing/models.js +34 -0
  1013. package/dist/modules/pricing/models.js.map +1 -0
  1014. package/dist/modules/pricing/relations.d.ts +3 -0
  1015. package/dist/modules/pricing/relations.d.ts.map +1 -0
  1016. package/dist/modules/pricing/relations.js +11 -0
  1017. package/dist/modules/pricing/relations.js.map +1 -0
  1018. package/dist/modules/pricing_backend/index.d.ts +3 -0
  1019. package/dist/modules/pricing_backend/index.d.ts.map +1 -0
  1020. package/dist/modules/pricing_backend/index.js +241 -0
  1021. package/dist/modules/pricing_backend/index.js.map +1 -0
  1022. package/dist/modules/pricing_backend/screens.d.ts +13 -0
  1023. package/dist/modules/pricing_backend/screens.d.ts.map +1 -0
  1024. package/dist/modules/pricing_backend/screens.js +182 -0
  1025. package/dist/modules/pricing_backend/screens.js.map +1 -0
  1026. package/dist/modules/product/functions.d.ts +3 -0
  1027. package/dist/modules/product/functions.d.ts.map +1 -0
  1028. package/dist/modules/product/functions.js +627 -0
  1029. package/dist/modules/product/functions.js.map +1 -0
  1030. package/dist/modules/product/index.d.ts +6 -0
  1031. package/dist/modules/product/index.d.ts.map +1 -0
  1032. package/dist/modules/product/index.js +24 -0
  1033. package/dist/modules/product/index.js.map +1 -0
  1034. package/dist/modules/product/messages.d.ts +3 -0
  1035. package/dist/modules/product/messages.d.ts.map +1 -0
  1036. package/dist/modules/product/messages.js +19 -0
  1037. package/dist/modules/product/messages.js.map +1 -0
  1038. package/dist/modules/product/models.d.ts +11 -0
  1039. package/dist/modules/product/models.d.ts.map +1 -0
  1040. package/dist/modules/product/models.js +116 -0
  1041. package/dist/modules/product/models.js.map +1 -0
  1042. package/dist/modules/product/relations.d.ts +8 -0
  1043. package/dist/modules/product/relations.d.ts.map +1 -0
  1044. package/dist/modules/product/relations.js +53 -0
  1045. package/dist/modules/product/relations.js.map +1 -0
  1046. package/dist/modules/product/search.d.ts +73 -0
  1047. package/dist/modules/product/search.d.ts.map +1 -0
  1048. package/dist/modules/product/search.js +66 -0
  1049. package/dist/modules/product/search.js.map +1 -0
  1050. package/dist/modules/product/types.d.ts +14 -0
  1051. package/dist/modules/product/types.d.ts.map +1 -0
  1052. package/dist/modules/product/types.js +2 -0
  1053. package/dist/modules/product/types.js.map +1 -0
  1054. package/dist/modules/product/views.d.ts +4 -0
  1055. package/dist/modules/product/views.d.ts.map +1 -0
  1056. package/dist/modules/product/views.js +7 -0
  1057. package/dist/modules/product/views.js.map +1 -0
  1058. package/dist/modules/product_activity_backend/index.d.ts +5 -0
  1059. package/dist/modules/product_activity_backend/index.d.ts.map +1 -0
  1060. package/dist/modules/product_activity_backend/index.js +29 -0
  1061. package/dist/modules/product_activity_backend/index.js.map +1 -0
  1062. package/dist/modules/product_backend/attributes-screen.d.ts +7 -0
  1063. package/dist/modules/product_backend/attributes-screen.d.ts.map +1 -0
  1064. package/dist/modules/product_backend/attributes-screen.js +76 -0
  1065. package/dist/modules/product_backend/attributes-screen.js.map +1 -0
  1066. package/dist/modules/product_backend/client/editor-view.d.mts +5 -0
  1067. package/dist/modules/product_backend/client/editor-view.d.mts.map +1 -0
  1068. package/dist/modules/product_backend/client/editor-view.mjs +141 -0
  1069. package/dist/modules/product_backend/client/editor-view.mjs.map +1 -0
  1070. package/dist/modules/product_backend/client/product.d.mts +6 -0
  1071. package/dist/modules/product_backend/client/product.d.mts.map +1 -0
  1072. package/dist/modules/product_backend/client/product.mjs +8 -0
  1073. package/dist/modules/product_backend/client/product.mjs.map +1 -0
  1074. package/dist/modules/product_backend/create-screen.d.ts +12 -0
  1075. package/dist/modules/product_backend/create-screen.d.ts.map +1 -0
  1076. package/dist/modules/product_backend/create-screen.js +83 -0
  1077. package/dist/modules/product_backend/create-screen.js.map +1 -0
  1078. package/dist/modules/product_backend/index.d.ts +20 -0
  1079. package/dist/modules/product_backend/index.d.ts.map +1 -0
  1080. package/dist/modules/product_backend/index.js +287 -0
  1081. package/dist/modules/product_backend/index.js.map +1 -0
  1082. package/dist/modules/product_backend/islands.d.ts +3 -0
  1083. package/dist/modules/product_backend/islands.d.ts.map +1 -0
  1084. package/dist/modules/product_backend/islands.js +13 -0
  1085. package/dist/modules/product_backend/islands.js.map +1 -0
  1086. package/dist/modules/product_backend/menus.d.ts +3 -0
  1087. package/dist/modules/product_backend/menus.d.ts.map +1 -0
  1088. package/dist/modules/product_backend/menus.js +25 -0
  1089. package/dist/modules/product_backend/menus.js.map +1 -0
  1090. package/dist/modules/product_backend/routes.d.ts +14 -0
  1091. package/dist/modules/product_backend/routes.d.ts.map +1 -0
  1092. package/dist/modules/product_backend/routes.js +990 -0
  1093. package/dist/modules/product_backend/routes.js.map +1 -0
  1094. package/dist/modules/product_backend/screens.d.ts +68 -0
  1095. package/dist/modules/product_backend/screens.d.ts.map +1 -0
  1096. package/dist/modules/product_backend/screens.js +388 -0
  1097. package/dist/modules/product_backend/screens.js.map +1 -0
  1098. package/dist/modules/product_mail_backend/index.d.ts +5 -0
  1099. package/dist/modules/product_mail_backend/index.d.ts.map +1 -0
  1100. package/dist/modules/product_mail_backend/index.js +30 -0
  1101. package/dist/modules/product_mail_backend/index.js.map +1 -0
  1102. package/dist/modules/product_media/functions.d.ts +3 -0
  1103. package/dist/modules/product_media/functions.d.ts.map +1 -0
  1104. package/dist/modules/product_media/functions.js +183 -0
  1105. package/dist/modules/product_media/functions.js.map +1 -0
  1106. package/dist/modules/product_media/index.d.ts +3 -0
  1107. package/dist/modules/product_media/index.d.ts.map +1 -0
  1108. package/dist/modules/product_media/index.js +29 -0
  1109. package/dist/modules/product_media/index.js.map +1 -0
  1110. package/dist/modules/product_media/models.d.ts +4 -0
  1111. package/dist/modules/product_media/models.d.ts.map +1 -0
  1112. package/dist/modules/product_media/models.js +24 -0
  1113. package/dist/modules/product_media/models.js.map +1 -0
  1114. package/dist/modules/product_media/relations.d.ts +3 -0
  1115. package/dist/modules/product_media/relations.d.ts.map +1 -0
  1116. package/dist/modules/product_media/relations.js +8 -0
  1117. package/dist/modules/product_media/relations.js.map +1 -0
  1118. package/dist/modules/product_variant_activity_backend/index.d.ts +5 -0
  1119. package/dist/modules/product_variant_activity_backend/index.d.ts.map +1 -0
  1120. package/dist/modules/product_variant_activity_backend/index.js +29 -0
  1121. package/dist/modules/product_variant_activity_backend/index.js.map +1 -0
  1122. package/dist/modules/product_variant_mail_backend/index.d.ts +5 -0
  1123. package/dist/modules/product_variant_mail_backend/index.d.ts.map +1 -0
  1124. package/dist/modules/product_variant_mail_backend/index.js +30 -0
  1125. package/dist/modules/product_variant_mail_backend/index.js.map +1 -0
  1126. package/dist/modules/purchase/functions.d.ts +6 -0
  1127. package/dist/modules/purchase/functions.d.ts.map +1 -0
  1128. package/dist/modules/purchase/functions.js +743 -0
  1129. package/dist/modules/purchase/functions.js.map +1 -0
  1130. package/dist/modules/purchase/index.d.ts +4 -0
  1131. package/dist/modules/purchase/index.d.ts.map +1 -0
  1132. package/dist/modules/purchase/index.js +35 -0
  1133. package/dist/modules/purchase/index.js.map +1 -0
  1134. package/dist/modules/purchase/models.d.ts +3 -0
  1135. package/dist/modules/purchase/models.d.ts.map +1 -0
  1136. package/dist/modules/purchase/models.js +68 -0
  1137. package/dist/modules/purchase/models.js.map +1 -0
  1138. package/dist/modules/purchase/relations.d.ts +3 -0
  1139. package/dist/modules/purchase/relations.d.ts.map +1 -0
  1140. package/dist/modules/purchase/relations.js +20 -0
  1141. package/dist/modules/purchase/relations.js.map +1 -0
  1142. package/dist/modules/purchase_backend/index.d.ts +3 -0
  1143. package/dist/modules/purchase_backend/index.d.ts.map +1 -0
  1144. package/dist/modules/purchase_backend/index.js +615 -0
  1145. package/dist/modules/purchase_backend/index.js.map +1 -0
  1146. package/dist/modules/purchase_backend/screens.d.ts +29 -0
  1147. package/dist/modules/purchase_backend/screens.d.ts.map +1 -0
  1148. package/dist/modules/purchase_backend/screens.js +324 -0
  1149. package/dist/modules/purchase_backend/screens.js.map +1 -0
  1150. package/dist/modules/sale/functions.d.ts +6 -0
  1151. package/dist/modules/sale/functions.d.ts.map +1 -0
  1152. package/dist/modules/sale/functions.js +611 -0
  1153. package/dist/modules/sale/functions.js.map +1 -0
  1154. package/dist/modules/sale/index.d.ts +4 -0
  1155. package/dist/modules/sale/index.d.ts.map +1 -0
  1156. package/dist/modules/sale/index.js +35 -0
  1157. package/dist/modules/sale/index.js.map +1 -0
  1158. package/dist/modules/sale/models.d.ts +3 -0
  1159. package/dist/modules/sale/models.d.ts.map +1 -0
  1160. package/dist/modules/sale/models.js +46 -0
  1161. package/dist/modules/sale/models.js.map +1 -0
  1162. package/dist/modules/sale/relations.d.ts +3 -0
  1163. package/dist/modules/sale/relations.d.ts.map +1 -0
  1164. package/dist/modules/sale/relations.js +16 -0
  1165. package/dist/modules/sale/relations.js.map +1 -0
  1166. package/dist/modules/sale_activity_backend/index.d.ts +5 -0
  1167. package/dist/modules/sale_activity_backend/index.d.ts.map +1 -0
  1168. package/dist/modules/sale_activity_backend/index.js +29 -0
  1169. package/dist/modules/sale_activity_backend/index.js.map +1 -0
  1170. package/dist/modules/sale_backend/client/editor-view.d.mts +5 -0
  1171. package/dist/modules/sale_backend/client/editor-view.d.mts.map +1 -0
  1172. package/dist/modules/sale_backend/client/editor-view.mjs +132 -0
  1173. package/dist/modules/sale_backend/client/editor-view.mjs.map +1 -0
  1174. package/dist/modules/sale_backend/client/sale.d.mts +6 -0
  1175. package/dist/modules/sale_backend/client/sale.d.mts.map +1 -0
  1176. package/dist/modules/sale_backend/client/sale.mjs +8 -0
  1177. package/dist/modules/sale_backend/client/sale.mjs.map +1 -0
  1178. package/dist/modules/sale_backend/index.d.ts +3 -0
  1179. package/dist/modules/sale_backend/index.d.ts.map +1 -0
  1180. package/dist/modules/sale_backend/index.js +681 -0
  1181. package/dist/modules/sale_backend/index.js.map +1 -0
  1182. package/dist/modules/sale_backend/invoicing-policies-screen.d.ts +14 -0
  1183. package/dist/modules/sale_backend/invoicing-policies-screen.d.ts.map +1 -0
  1184. package/dist/modules/sale_backend/invoicing-policies-screen.js +36 -0
  1185. package/dist/modules/sale_backend/invoicing-policies-screen.js.map +1 -0
  1186. package/dist/modules/sale_backend/islands.d.ts +3 -0
  1187. package/dist/modules/sale_backend/islands.d.ts.map +1 -0
  1188. package/dist/modules/sale_backend/islands.js +13 -0
  1189. package/dist/modules/sale_backend/islands.js.map +1 -0
  1190. package/dist/modules/sale_backend/order-detail-screen.d.ts +18 -0
  1191. package/dist/modules/sale_backend/order-detail-screen.d.ts.map +1 -0
  1192. package/dist/modules/sale_backend/order-detail-screen.js +217 -0
  1193. package/dist/modules/sale_backend/order-detail-screen.js.map +1 -0
  1194. package/dist/modules/sale_backend/quotations-screen.d.ts +15 -0
  1195. package/dist/modules/sale_backend/quotations-screen.d.ts.map +1 -0
  1196. package/dist/modules/sale_backend/quotations-screen.js +64 -0
  1197. package/dist/modules/sale_backend/quotations-screen.js.map +1 -0
  1198. package/dist/modules/sale_backend/sales-orders-screen.d.ts +12 -0
  1199. package/dist/modules/sale_backend/sales-orders-screen.d.ts.map +1 -0
  1200. package/dist/modules/sale_backend/sales-orders-screen.js +65 -0
  1201. package/dist/modules/sale_backend/sales-orders-screen.js.map +1 -0
  1202. package/dist/modules/sale_backend/screens.d.ts +23 -0
  1203. package/dist/modules/sale_backend/screens.d.ts.map +1 -0
  1204. package/dist/modules/sale_backend/screens.js +275 -0
  1205. package/dist/modules/sale_backend/screens.js.map +1 -0
  1206. package/dist/modules/sale_mail_backend/index.d.ts +5 -0
  1207. package/dist/modules/sale_mail_backend/index.d.ts.map +1 -0
  1208. package/dist/modules/sale_mail_backend/index.js +30 -0
  1209. package/dist/modules/sale_mail_backend/index.js.map +1 -0
  1210. package/dist/modules/stock/functions.d.ts +10 -0
  1211. package/dist/modules/stock/functions.d.ts.map +1 -0
  1212. package/dist/modules/stock/functions.js +1523 -0
  1213. package/dist/modules/stock/functions.js.map +1 -0
  1214. package/dist/modules/stock/index.d.ts +5 -0
  1215. package/dist/modules/stock/index.d.ts.map +1 -0
  1216. package/dist/modules/stock/index.js +35 -0
  1217. package/dist/modules/stock/index.js.map +1 -0
  1218. package/dist/modules/stock/models.d.ts +3 -0
  1219. package/dist/modules/stock/models.d.ts.map +1 -0
  1220. package/dist/modules/stock/models.js +185 -0
  1221. package/dist/modules/stock/models.js.map +1 -0
  1222. package/dist/modules/stock/relations.d.ts +3 -0
  1223. package/dist/modules/stock/relations.d.ts.map +1 -0
  1224. package/dist/modules/stock/relations.js +40 -0
  1225. package/dist/modules/stock/relations.js.map +1 -0
  1226. package/dist/modules/stock/routing.d.ts +7 -0
  1227. package/dist/modules/stock/routing.d.ts.map +1 -0
  1228. package/dist/modules/stock/routing.js +527 -0
  1229. package/dist/modules/stock/routing.js.map +1 -0
  1230. package/dist/modules/stock_activity_backend/index.d.ts +5 -0
  1231. package/dist/modules/stock_activity_backend/index.d.ts.map +1 -0
  1232. package/dist/modules/stock_activity_backend/index.js +29 -0
  1233. package/dist/modules/stock_activity_backend/index.js.map +1 -0
  1234. package/dist/modules/stock_backend/client/editor-view.d.mts +5 -0
  1235. package/dist/modules/stock_backend/client/editor-view.d.mts.map +1 -0
  1236. package/dist/modules/stock_backend/client/editor-view.mjs +147 -0
  1237. package/dist/modules/stock_backend/client/editor-view.mjs.map +1 -0
  1238. package/dist/modules/stock_backend/client/stock.d.mts +6 -0
  1239. package/dist/modules/stock_backend/client/stock.d.mts.map +1 -0
  1240. package/dist/modules/stock_backend/client/stock.mjs +8 -0
  1241. package/dist/modules/stock_backend/client/stock.mjs.map +1 -0
  1242. package/dist/modules/stock_backend/forecast-screen.d.ts +28 -0
  1243. package/dist/modules/stock_backend/forecast-screen.d.ts.map +1 -0
  1244. package/dist/modules/stock_backend/forecast-screen.js +108 -0
  1245. package/dist/modules/stock_backend/forecast-screen.js.map +1 -0
  1246. package/dist/modules/stock_backend/index.d.ts +3 -0
  1247. package/dist/modules/stock_backend/index.d.ts.map +1 -0
  1248. package/dist/modules/stock_backend/index.js +880 -0
  1249. package/dist/modules/stock_backend/index.js.map +1 -0
  1250. package/dist/modules/stock_backend/inventory-screen.d.ts +27 -0
  1251. package/dist/modules/stock_backend/inventory-screen.d.ts.map +1 -0
  1252. package/dist/modules/stock_backend/inventory-screen.js +141 -0
  1253. package/dist/modules/stock_backend/inventory-screen.js.map +1 -0
  1254. package/dist/modules/stock_backend/islands.d.ts +3 -0
  1255. package/dist/modules/stock_backend/islands.d.ts.map +1 -0
  1256. package/dist/modules/stock_backend/islands.js +13 -0
  1257. package/dist/modules/stock_backend/islands.js.map +1 -0
  1258. package/dist/modules/stock_backend/locations-screen.d.ts +18 -0
  1259. package/dist/modules/stock_backend/locations-screen.d.ts.map +1 -0
  1260. package/dist/modules/stock_backend/locations-screen.js +92 -0
  1261. package/dist/modules/stock_backend/locations-screen.js.map +1 -0
  1262. package/dist/modules/stock_backend/lot-screen.d.ts +30 -0
  1263. package/dist/modules/stock_backend/lot-screen.d.ts.map +1 -0
  1264. package/dist/modules/stock_backend/lot-screen.js +86 -0
  1265. package/dist/modules/stock_backend/lot-screen.js.map +1 -0
  1266. package/dist/modules/stock_backend/lots-screen.d.ts +21 -0
  1267. package/dist/modules/stock_backend/lots-screen.d.ts.map +1 -0
  1268. package/dist/modules/stock_backend/lots-screen.js +79 -0
  1269. package/dist/modules/stock_backend/lots-screen.js.map +1 -0
  1270. package/dist/modules/stock_backend/picking-types-screen.d.ts +21 -0
  1271. package/dist/modules/stock_backend/picking-types-screen.d.ts.map +1 -0
  1272. package/dist/modules/stock_backend/picking-types-screen.js +110 -0
  1273. package/dist/modules/stock_backend/picking-types-screen.js.map +1 -0
  1274. package/dist/modules/stock_backend/replenishment-screen.d.ts +29 -0
  1275. package/dist/modules/stock_backend/replenishment-screen.d.ts.map +1 -0
  1276. package/dist/modules/stock_backend/replenishment-screen.js +131 -0
  1277. package/dist/modules/stock_backend/replenishment-screen.js.map +1 -0
  1278. package/dist/modules/stock_backend/routes.d.ts +3 -0
  1279. package/dist/modules/stock_backend/routes.d.ts.map +1 -0
  1280. package/dist/modules/stock_backend/routes.js +950 -0
  1281. package/dist/modules/stock_backend/routes.js.map +1 -0
  1282. package/dist/modules/stock_backend/screens.d.ts +14 -0
  1283. package/dist/modules/stock_backend/screens.d.ts.map +1 -0
  1284. package/dist/modules/stock_backend/screens.js +40 -0
  1285. package/dist/modules/stock_backend/screens.js.map +1 -0
  1286. package/dist/modules/stock_backend/stock-route-screen.d.ts +30 -0
  1287. package/dist/modules/stock_backend/stock-route-screen.d.ts.map +1 -0
  1288. package/dist/modules/stock_backend/stock-route-screen.js +129 -0
  1289. package/dist/modules/stock_backend/stock-route-screen.js.map +1 -0
  1290. package/dist/modules/stock_backend/stock-routes-screen.d.ts +17 -0
  1291. package/dist/modules/stock_backend/stock-routes-screen.d.ts.map +1 -0
  1292. package/dist/modules/stock_backend/stock-routes-screen.js +60 -0
  1293. package/dist/modules/stock_backend/stock-routes-screen.js.map +1 -0
  1294. package/dist/modules/stock_backend/transfer-screen.d.ts +26 -0
  1295. package/dist/modules/stock_backend/transfer-screen.d.ts.map +1 -0
  1296. package/dist/modules/stock_backend/transfer-screen.js +95 -0
  1297. package/dist/modules/stock_backend/transfer-screen.js.map +1 -0
  1298. package/dist/modules/stock_backend/transfers-screen.d.ts +21 -0
  1299. package/dist/modules/stock_backend/transfers-screen.d.ts.map +1 -0
  1300. package/dist/modules/stock_backend/transfers-screen.js +88 -0
  1301. package/dist/modules/stock_backend/transfers-screen.js.map +1 -0
  1302. package/dist/modules/stock_backend/warehouses-screen.d.ts +17 -0
  1303. package/dist/modules/stock_backend/warehouses-screen.d.ts.map +1 -0
  1304. package/dist/modules/stock_backend/warehouses-screen.js +96 -0
  1305. package/dist/modules/stock_backend/warehouses-screen.js.map +1 -0
  1306. package/dist/modules/stock_lot_activity_backend/index.d.ts +5 -0
  1307. package/dist/modules/stock_lot_activity_backend/index.d.ts.map +1 -0
  1308. package/dist/modules/stock_lot_activity_backend/index.js +29 -0
  1309. package/dist/modules/stock_lot_activity_backend/index.js.map +1 -0
  1310. package/dist/modules/stock_lot_mail_backend/index.d.ts +5 -0
  1311. package/dist/modules/stock_lot_mail_backend/index.d.ts.map +1 -0
  1312. package/dist/modules/stock_lot_mail_backend/index.js +30 -0
  1313. package/dist/modules/stock_lot_mail_backend/index.js.map +1 -0
  1314. package/dist/modules/stock_mail_backend/index.d.ts +5 -0
  1315. package/dist/modules/stock_mail_backend/index.d.ts.map +1 -0
  1316. package/dist/modules/stock_mail_backend/index.js +30 -0
  1317. package/dist/modules/stock_mail_backend/index.js.map +1 -0
  1318. package/dist/modules/stock_mail_inbound/index.d.ts +6 -0
  1319. package/dist/modules/stock_mail_inbound/index.d.ts.map +1 -0
  1320. package/dist/modules/stock_mail_inbound/index.js +104 -0
  1321. package/dist/modules/stock_mail_inbound/index.js.map +1 -0
  1322. package/dist/modules/storage/functions.d.ts +3 -0
  1323. package/dist/modules/storage/functions.d.ts.map +1 -0
  1324. package/dist/modules/storage/functions.js +129 -0
  1325. package/dist/modules/storage/functions.js.map +1 -0
  1326. package/dist/modules/storage/index.d.ts +3 -0
  1327. package/dist/modules/storage/index.d.ts.map +1 -0
  1328. package/dist/modules/storage/index.js +31 -0
  1329. package/dist/modules/storage/index.js.map +1 -0
  1330. package/dist/modules/storage/jobs.d.ts +3 -0
  1331. package/dist/modules/storage/jobs.d.ts.map +1 -0
  1332. package/dist/modules/storage/jobs.js +37 -0
  1333. package/dist/modules/storage/jobs.js.map +1 -0
  1334. package/dist/modules/storage/models.d.ts +3 -0
  1335. package/dist/modules/storage/models.d.ts.map +1 -0
  1336. package/dist/modules/storage/models.js +23 -0
  1337. package/dist/modules/storage/models.js.map +1 -0
  1338. package/dist/modules/storage/routes.d.ts +27 -0
  1339. package/dist/modules/storage/routes.d.ts.map +1 -0
  1340. package/dist/modules/storage/routes.js +180 -0
  1341. package/dist/modules/storage/routes.js.map +1 -0
  1342. package/dist/modules/uom/convert.d.ts +52 -0
  1343. package/dist/modules/uom/convert.d.ts.map +1 -0
  1344. package/dist/modules/uom/convert.js +76 -0
  1345. package/dist/modules/uom/convert.js.map +1 -0
  1346. package/dist/modules/uom/functions.d.ts +5 -0
  1347. package/dist/modules/uom/functions.d.ts.map +1 -0
  1348. package/dist/modules/uom/functions.js +235 -0
  1349. package/dist/modules/uom/functions.js.map +1 -0
  1350. package/dist/modules/uom/index.d.ts +5 -0
  1351. package/dist/modules/uom/index.d.ts.map +1 -0
  1352. package/dist/modules/uom/index.js +19 -0
  1353. package/dist/modules/uom/index.js.map +1 -0
  1354. package/dist/modules/uom/messages.d.ts +3 -0
  1355. package/dist/modules/uom/messages.d.ts.map +1 -0
  1356. package/dist/modules/uom/messages.js +19 -0
  1357. package/dist/modules/uom/messages.js.map +1 -0
  1358. package/dist/modules/uom/models.d.ts +4 -0
  1359. package/dist/modules/uom/models.d.ts.map +1 -0
  1360. package/dist/modules/uom/models.js +34 -0
  1361. package/dist/modules/uom/models.js.map +1 -0
  1362. package/dist/modules/uom/relations.d.ts +3 -0
  1363. package/dist/modules/uom/relations.d.ts.map +1 -0
  1364. package/dist/modules/uom/relations.js +7 -0
  1365. package/dist/modules/uom/relations.js.map +1 -0
  1366. package/dist/modules/user/functions.d.ts +8 -0
  1367. package/dist/modules/user/functions.d.ts.map +1 -0
  1368. package/dist/modules/user/functions.js +1094 -0
  1369. package/dist/modules/user/functions.js.map +1 -0
  1370. package/dist/modules/user/index.d.ts +8 -0
  1371. package/dist/modules/user/index.d.ts.map +1 -0
  1372. package/dist/modules/user/index.js +34 -0
  1373. package/dist/modules/user/index.js.map +1 -0
  1374. package/dist/modules/user/login.d.ts +28 -0
  1375. package/dist/modules/user/login.d.ts.map +1 -0
  1376. package/dist/modules/user/login.js +46 -0
  1377. package/dist/modules/user/login.js.map +1 -0
  1378. package/dist/modules/user/messages.d.ts +115 -0
  1379. package/dist/modules/user/messages.d.ts.map +1 -0
  1380. package/dist/modules/user/messages.js +115 -0
  1381. package/dist/modules/user/messages.js.map +1 -0
  1382. package/dist/modules/user/models.d.ts +16 -0
  1383. package/dist/modules/user/models.d.ts.map +1 -0
  1384. package/dist/modules/user/models.js +168 -0
  1385. package/dist/modules/user/models.js.map +1 -0
  1386. package/dist/modules/user/password.d.ts +11 -0
  1387. package/dist/modules/user/password.d.ts.map +1 -0
  1388. package/dist/modules/user/password.js +74 -0
  1389. package/dist/modules/user/password.js.map +1 -0
  1390. package/dist/modules/user/relations.d.ts +3 -0
  1391. package/dist/modules/user/relations.d.ts.map +1 -0
  1392. package/dist/modules/user/relations.js +31 -0
  1393. package/dist/modules/user/relations.js.map +1 -0
  1394. package/dist/modules/user/roles.d.ts +12 -0
  1395. package/dist/modules/user/roles.d.ts.map +1 -0
  1396. package/dist/modules/user/roles.js +254 -0
  1397. package/dist/modules/user/roles.js.map +1 -0
  1398. package/dist/modules/user/routes.d.ts +3 -0
  1399. package/dist/modules/user/routes.d.ts.map +1 -0
  1400. package/dist/modules/user/routes.js +244 -0
  1401. package/dist/modules/user/routes.js.map +1 -0
  1402. package/dist/modules/user/session-context.d.ts +10 -0
  1403. package/dist/modules/user/session-context.d.ts.map +1 -0
  1404. package/dist/modules/user/session-context.js +31 -0
  1405. package/dist/modules/user/session-context.js.map +1 -0
  1406. package/dist/modules/user_backend/index.d.ts +5 -0
  1407. package/dist/modules/user_backend/index.d.ts.map +1 -0
  1408. package/dist/modules/user_backend/index.js +24 -0
  1409. package/dist/modules/user_backend/index.js.map +1 -0
  1410. package/dist/modules/user_backend/menus.d.ts +3 -0
  1411. package/dist/modules/user_backend/menus.d.ts.map +1 -0
  1412. package/dist/modules/user_backend/menus.js +24 -0
  1413. package/dist/modules/user_backend/menus.js.map +1 -0
  1414. package/dist/modules/user_backend/messages.d.ts +189 -0
  1415. package/dist/modules/user_backend/messages.d.ts.map +1 -0
  1416. package/dist/modules/user_backend/messages.js +189 -0
  1417. package/dist/modules/user_backend/messages.js.map +1 -0
  1418. package/dist/modules/user_backend/routes.d.ts +3 -0
  1419. package/dist/modules/user_backend/routes.d.ts.map +1 -0
  1420. package/dist/modules/user_backend/routes.js +474 -0
  1421. package/dist/modules/user_backend/routes.js.map +1 -0
  1422. package/dist/modules/user_backend/screens.d.ts +70 -0
  1423. package/dist/modules/user_backend/screens.d.ts.map +1 -0
  1424. package/dist/modules/user_backend/screens.js +308 -0
  1425. package/dist/modules/user_backend/screens.js.map +1 -0
  1426. package/dist/modules/website/access.d.ts +15 -0
  1427. package/dist/modules/website/access.d.ts.map +1 -0
  1428. package/dist/modules/website/access.js +39 -0
  1429. package/dist/modules/website/access.js.map +1 -0
  1430. package/dist/modules/website/cms.d.ts +3 -0
  1431. package/dist/modules/website/cms.d.ts.map +1 -0
  1432. package/dist/modules/website/cms.js +1142 -0
  1433. package/dist/modules/website/cms.js.map +1 -0
  1434. package/dist/modules/website/content-types.d.ts +4 -0
  1435. package/dist/modules/website/content-types.d.ts.map +1 -0
  1436. package/dist/modules/website/content-types.js +30 -0
  1437. package/dist/modules/website/content-types.js.map +1 -0
  1438. package/dist/modules/website/customer-password.d.ts +4 -0
  1439. package/dist/modules/website/customer-password.d.ts.map +1 -0
  1440. package/dist/modules/website/customer-password.js +51 -0
  1441. package/dist/modules/website/customer-password.js.map +1 -0
  1442. package/dist/modules/website/customer-routes.d.ts +3 -0
  1443. package/dist/modules/website/customer-routes.d.ts.map +1 -0
  1444. package/dist/modules/website/customer-routes.js +322 -0
  1445. package/dist/modules/website/customer-routes.js.map +1 -0
  1446. package/dist/modules/website/customer.d.ts +5 -0
  1447. package/dist/modules/website/customer.d.ts.map +1 -0
  1448. package/dist/modules/website/customer.js +442 -0
  1449. package/dist/modules/website/customer.js.map +1 -0
  1450. package/dist/modules/website/functions.d.ts +3 -0
  1451. package/dist/modules/website/functions.d.ts.map +1 -0
  1452. package/dist/modules/website/functions.js +96 -0
  1453. package/dist/modules/website/functions.js.map +1 -0
  1454. package/dist/modules/website/index.d.ts +4 -0
  1455. package/dist/modules/website/index.d.ts.map +1 -0
  1456. package/dist/modules/website/index.js +152 -0
  1457. package/dist/modules/website/index.js.map +1 -0
  1458. package/dist/modules/website/jobs.d.ts +3 -0
  1459. package/dist/modules/website/jobs.d.ts.map +1 -0
  1460. package/dist/modules/website/jobs.js +25 -0
  1461. package/dist/modules/website/jobs.js.map +1 -0
  1462. package/dist/modules/website/joints.d.ts +4 -0
  1463. package/dist/modules/website/joints.d.ts.map +1 -0
  1464. package/dist/modules/website/joints.js +7 -0
  1465. package/dist/modules/website/joints.js.map +1 -0
  1466. package/dist/modules/website/models.d.ts +8 -0
  1467. package/dist/modules/website/models.d.ts.map +1 -0
  1468. package/dist/modules/website/models.js +260 -0
  1469. package/dist/modules/website/models.js.map +1 -0
  1470. package/dist/modules/website/sections.d.ts +8 -0
  1471. package/dist/modules/website/sections.d.ts.map +1 -0
  1472. package/dist/modules/website/sections.js +16 -0
  1473. package/dist/modules/website/sections.js.map +1 -0
  1474. package/dist/modules/website/tokens.d.ts +2 -0
  1475. package/dist/modules/website/tokens.d.ts.map +1 -0
  1476. package/dist/modules/website/tokens.js +5 -0
  1477. package/dist/modules/website/tokens.js.map +1 -0
  1478. package/dist/modules/website/types.d.ts +6 -0
  1479. package/dist/modules/website/types.d.ts.map +1 -0
  1480. package/dist/modules/website/types.js +2 -0
  1481. package/dist/modules/website/types.js.map +1 -0
  1482. package/dist/modules/website/views.d.ts +4 -0
  1483. package/dist/modules/website/views.d.ts.map +1 -0
  1484. package/dist/modules/website/views.js +5 -0
  1485. package/dist/modules/website/views.js.map +1 -0
  1486. package/dist/modules/website_backend/index.d.ts +3 -0
  1487. package/dist/modules/website_backend/index.d.ts.map +1 -0
  1488. package/dist/modules/website_backend/index.js +290 -0
  1489. package/dist/modules/website_backend/index.js.map +1 -0
  1490. package/dist/modules/website_backend/menus.d.ts +3 -0
  1491. package/dist/modules/website_backend/menus.d.ts.map +1 -0
  1492. package/dist/modules/website_backend/menus.js +54 -0
  1493. package/dist/modules/website_backend/menus.js.map +1 -0
  1494. package/dist/modules/website_backend/routes.d.ts +3 -0
  1495. package/dist/modules/website_backend/routes.d.ts.map +1 -0
  1496. package/dist/modules/website_backend/routes.js +625 -0
  1497. package/dist/modules/website_backend/routes.js.map +1 -0
  1498. package/dist/modules/website_backend/screens.d.ts +114 -0
  1499. package/dist/modules/website_backend/screens.d.ts.map +1 -0
  1500. package/dist/modules/website_backend/screens.js +625 -0
  1501. package/dist/modules/website_backend/screens.js.map +1 -0
  1502. package/dist/modules/website_form/functions.d.ts +3 -0
  1503. package/dist/modules/website_form/functions.d.ts.map +1 -0
  1504. package/dist/modules/website_form/functions.js +305 -0
  1505. package/dist/modules/website_form/functions.js.map +1 -0
  1506. package/dist/modules/website_form/index.d.ts +3 -0
  1507. package/dist/modules/website_form/index.d.ts.map +1 -0
  1508. package/dist/modules/website_form/index.js +72 -0
  1509. package/dist/modules/website_form/index.js.map +1 -0
  1510. package/dist/modules/website_form/models.d.ts +3 -0
  1511. package/dist/modules/website_form/models.d.ts.map +1 -0
  1512. package/dist/modules/website_form/models.js +46 -0
  1513. package/dist/modules/website_form/models.js.map +1 -0
  1514. package/dist/modules/website_form/routes.d.ts +3 -0
  1515. package/dist/modules/website_form/routes.d.ts.map +1 -0
  1516. package/dist/modules/website_form/routes.js +74 -0
  1517. package/dist/modules/website_form/routes.js.map +1 -0
  1518. package/dist/modules/website_form/sections.d.ts +3 -0
  1519. package/dist/modules/website_form/sections.d.ts.map +1 -0
  1520. package/dist/modules/website_form/sections.js +7 -0
  1521. package/dist/modules/website_form/sections.js.map +1 -0
  1522. package/dist/modules/website_hospitality/content-types.d.ts +3 -0
  1523. package/dist/modules/website_hospitality/content-types.d.ts.map +1 -0
  1524. package/dist/modules/website_hospitality/content-types.js +9 -0
  1525. package/dist/modules/website_hospitality/content-types.js.map +1 -0
  1526. package/dist/modules/website_hospitality/functions.d.ts +3 -0
  1527. package/dist/modules/website_hospitality/functions.d.ts.map +1 -0
  1528. package/dist/modules/website_hospitality/functions.js +296 -0
  1529. package/dist/modules/website_hospitality/functions.js.map +1 -0
  1530. package/dist/modules/website_hospitality/index.d.ts +3 -0
  1531. package/dist/modules/website_hospitality/index.d.ts.map +1 -0
  1532. package/dist/modules/website_hospitality/index.js +67 -0
  1533. package/dist/modules/website_hospitality/index.js.map +1 -0
  1534. package/dist/modules/website_hospitality/models.d.ts +3 -0
  1535. package/dist/modules/website_hospitality/models.d.ts.map +1 -0
  1536. package/dist/modules/website_hospitality/models.js +49 -0
  1537. package/dist/modules/website_hospitality/models.js.map +1 -0
  1538. package/dist/modules/website_hospitality/routes.d.ts +3 -0
  1539. package/dist/modules/website_hospitality/routes.d.ts.map +1 -0
  1540. package/dist/modules/website_hospitality/routes.js +78 -0
  1541. package/dist/modules/website_hospitality/routes.js.map +1 -0
  1542. package/dist/modules/website_hospitality/sections.d.ts +3 -0
  1543. package/dist/modules/website_hospitality/sections.d.ts.map +1 -0
  1544. package/dist/modules/website_hospitality/sections.js +11 -0
  1545. package/dist/modules/website_hospitality/sections.js.map +1 -0
  1546. package/dist/modules/website_menu/functions.d.ts +3 -0
  1547. package/dist/modules/website_menu/functions.d.ts.map +1 -0
  1548. package/dist/modules/website_menu/functions.js +79 -0
  1549. package/dist/modules/website_menu/functions.js.map +1 -0
  1550. package/dist/modules/website_menu/index.d.ts +3 -0
  1551. package/dist/modules/website_menu/index.d.ts.map +1 -0
  1552. package/dist/modules/website_menu/index.js +31 -0
  1553. package/dist/modules/website_menu/index.js.map +1 -0
  1554. package/dist/modules/website_menu/models.d.ts +3 -0
  1555. package/dist/modules/website_menu/models.d.ts.map +1 -0
  1556. package/dist/modules/website_menu/models.js +15 -0
  1557. package/dist/modules/website_menu/models.js.map +1 -0
  1558. package/dist/modules/website_menu/sections.d.ts +3 -0
  1559. package/dist/modules/website_menu/sections.d.ts.map +1 -0
  1560. package/dist/modules/website_menu/sections.js +4 -0
  1561. package/dist/modules/website_menu/sections.js.map +1 -0
  1562. package/dist/modules/website_menu/views.d.ts +3 -0
  1563. package/dist/modules/website_menu/views.d.ts.map +1 -0
  1564. package/dist/modules/website_menu/views.js +4 -0
  1565. package/dist/modules/website_menu/views.js.map +1 -0
  1566. package/dist/modules/website_retail/content-types.d.ts +3 -0
  1567. package/dist/modules/website_retail/content-types.d.ts.map +1 -0
  1568. package/dist/modules/website_retail/content-types.js +10 -0
  1569. package/dist/modules/website_retail/content-types.js.map +1 -0
  1570. package/dist/modules/website_retail/functions.d.ts +3 -0
  1571. package/dist/modules/website_retail/functions.d.ts.map +1 -0
  1572. package/dist/modules/website_retail/functions.js +321 -0
  1573. package/dist/modules/website_retail/functions.js.map +1 -0
  1574. package/dist/modules/website_retail/index.d.ts +3 -0
  1575. package/dist/modules/website_retail/index.d.ts.map +1 -0
  1576. package/dist/modules/website_retail/index.js +63 -0
  1577. package/dist/modules/website_retail/index.js.map +1 -0
  1578. package/dist/modules/website_retail/models.d.ts +3 -0
  1579. package/dist/modules/website_retail/models.d.ts.map +1 -0
  1580. package/dist/modules/website_retail/models.js +50 -0
  1581. package/dist/modules/website_retail/models.js.map +1 -0
  1582. package/dist/modules/website_retail/sections.d.ts +3 -0
  1583. package/dist/modules/website_retail/sections.d.ts.map +1 -0
  1584. package/dist/modules/website_retail/sections.js +11 -0
  1585. package/dist/modules/website_retail/sections.js.map +1 -0
  1586. package/dist/modules/website_search/client/search.d.mts +6 -0
  1587. package/dist/modules/website_search/client/search.d.mts.map +1 -0
  1588. package/dist/modules/website_search/client/search.mjs +25 -0
  1589. package/dist/modules/website_search/client/search.mjs.map +1 -0
  1590. package/dist/modules/website_search/fills.d.ts +3 -0
  1591. package/dist/modules/website_search/fills.d.ts.map +1 -0
  1592. package/dist/modules/website_search/fills.js +5 -0
  1593. package/dist/modules/website_search/fills.js.map +1 -0
  1594. package/dist/modules/website_search/index.d.ts +3 -0
  1595. package/dist/modules/website_search/index.d.ts.map +1 -0
  1596. package/dist/modules/website_search/index.js +28 -0
  1597. package/dist/modules/website_search/index.js.map +1 -0
  1598. package/dist/modules/website_search/islands.d.ts +7 -0
  1599. package/dist/modules/website_search/islands.d.ts.map +1 -0
  1600. package/dist/modules/website_search/islands.js +23 -0
  1601. package/dist/modules/website_search/islands.js.map +1 -0
  1602. package/dist/modules/website_seo/extend.d.ts +7 -0
  1603. package/dist/modules/website_seo/extend.d.ts.map +1 -0
  1604. package/dist/modules/website_seo/extend.js +20 -0
  1605. package/dist/modules/website_seo/extend.js.map +1 -0
  1606. package/dist/modules/website_seo/fills.d.ts +3 -0
  1607. package/dist/modules/website_seo/fills.d.ts.map +1 -0
  1608. package/dist/modules/website_seo/fills.js +8 -0
  1609. package/dist/modules/website_seo/fills.js.map +1 -0
  1610. package/dist/modules/website_seo/index.d.ts +3 -0
  1611. package/dist/modules/website_seo/index.d.ts.map +1 -0
  1612. package/dist/modules/website_seo/index.js +30 -0
  1613. package/dist/modules/website_seo/index.js.map +1 -0
  1614. package/dist/modules/website_seo/views.d.ts +3 -0
  1615. package/dist/modules/website_seo/views.d.ts.map +1 -0
  1616. package/dist/modules/website_seo/views.js +5 -0
  1617. package/dist/modules/website_seo/views.js.map +1 -0
  1618. package/dist/themes/default/index.d.ts +3 -0
  1619. package/dist/themes/default/index.d.ts.map +1 -0
  1620. package/dist/themes/default/index.js +16 -0
  1621. package/dist/themes/default/index.js.map +1 -0
  1622. package/dist/themes/default/templates/layout.ktl +7 -0
  1623. package/dist/themes/default/templates/product.detail.ktl +10 -0
  1624. package/dist/themes/default/templates/product.related_row.ktl +1 -0
  1625. package/dist/themes/hospitality/assets/theme.css +109 -0
  1626. package/dist/themes/hospitality/index.d.ts +3 -0
  1627. package/dist/themes/hospitality/index.d.ts.map +1 -0
  1628. package/dist/themes/hospitality/index.js +26 -0
  1629. package/dist/themes/hospitality/index.js.map +1 -0
  1630. package/dist/themes/hospitality/templates/layout.ktl +17 -0
  1631. package/dist/themes/hospitality/templates/menu.item.ktl +1 -0
  1632. package/dist/themes/hospitality/templates/menu.primary.ktl +1 -0
  1633. package/dist/themes/hospitality/templates/website.hero.ktl +6 -0
  1634. package/dist/themes/hospitality/templates/website.page.ktl +1 -0
  1635. package/dist/themes/hospitality/templates/website.rich_text.ktl +3 -0
  1636. package/dist/themes/hospitality/templates/website_form.form.ktl +1 -0
  1637. package/dist/themes/hospitality/templates/website_hospitality.booking.ktl +1 -0
  1638. package/dist/themes/hospitality/templates/website_hospitality.stays.ktl +1 -0
  1639. package/dist/themes/hospitality/tokens.d.ts +2 -0
  1640. package/dist/themes/hospitality/tokens.d.ts.map +1 -0
  1641. package/dist/themes/hospitality/tokens.js +9 -0
  1642. package/dist/themes/hospitality/tokens.js.map +1 -0
  1643. package/dist/themes/paper/index.d.ts +9 -0
  1644. package/dist/themes/paper/index.d.ts.map +1 -0
  1645. package/dist/themes/paper/index.js +30 -0
  1646. package/dist/themes/paper/index.js.map +1 -0
  1647. package/dist/themes/paper/templates/layout.ktl +14 -0
  1648. package/dist/themes/paper/templates/menu.item.ktl +3 -0
  1649. package/dist/themes/paper/templates/menu.primary.ktl +3 -0
  1650. package/dist/themes/paper/templates/website.hero.ktl +6 -0
  1651. package/dist/themes/paper/templates/website.page.ktl +2 -0
  1652. package/dist/themes/paper/templates/website.rich_text.ktl +4 -0
  1653. package/dist/themes/paper/tokens.d.ts +2 -0
  1654. package/dist/themes/paper/tokens.d.ts.map +1 -0
  1655. package/dist/themes/paper/tokens.js +11 -0
  1656. package/dist/themes/paper/tokens.js.map +1 -0
  1657. package/dist/themes/retail/assets/theme.css +114 -0
  1658. package/dist/themes/retail/index.d.ts +3 -0
  1659. package/dist/themes/retail/index.d.ts.map +1 -0
  1660. package/dist/themes/retail/index.js +26 -0
  1661. package/dist/themes/retail/index.js.map +1 -0
  1662. package/dist/themes/retail/templates/layout.ktl +5 -0
  1663. package/dist/themes/retail/templates/menu.item.ktl +1 -0
  1664. package/dist/themes/retail/templates/menu.primary.ktl +1 -0
  1665. package/dist/themes/retail/templates/website.hero.ktl +1 -0
  1666. package/dist/themes/retail/templates/website.page.ktl +1 -0
  1667. package/dist/themes/retail/templates/website.rich_text.ktl +1 -0
  1668. package/dist/themes/retail/templates/website_form.form.ktl +1 -0
  1669. package/dist/themes/retail/templates/website_retail.cart.ktl +1 -0
  1670. package/dist/themes/retail/templates/website_retail.products.ktl +1 -0
  1671. package/dist/themes/retail/tokens.d.ts +2 -0
  1672. package/dist/themes/retail/tokens.d.ts.map +1 -0
  1673. package/dist/themes/retail/tokens.js +9 -0
  1674. package/dist/themes/retail/tokens.js.map +1 -0
  1675. package/dist/ui/actions.d.ts +38 -0
  1676. package/dist/ui/actions.d.ts.map +1 -0
  1677. package/dist/ui/actions.js +20 -0
  1678. package/dist/ui/actions.js.map +1 -0
  1679. package/dist/ui/activity.d.ts +4 -0
  1680. package/dist/ui/activity.d.ts.map +1 -0
  1681. package/dist/ui/activity.js +73 -0
  1682. package/dist/ui/activity.js.map +1 -0
  1683. package/dist/ui/attachments.d.ts +18 -0
  1684. package/dist/ui/attachments.d.ts.map +1 -0
  1685. package/dist/ui/attachments.js +15 -0
  1686. package/dist/ui/attachments.js.map +1 -0
  1687. package/dist/ui/auth.d.ts +9 -0
  1688. package/dist/ui/auth.d.ts.map +1 -0
  1689. package/dist/ui/auth.js +44 -0
  1690. package/dist/ui/auth.js.map +1 -0
  1691. package/dist/ui/calendar.d.ts +4 -0
  1692. package/dist/ui/calendar.d.ts.map +1 -0
  1693. package/dist/ui/calendar.js +51 -0
  1694. package/dist/ui/calendar.js.map +1 -0
  1695. package/dist/ui/chrome.d.ts +66 -0
  1696. package/dist/ui/chrome.d.ts.map +1 -0
  1697. package/dist/ui/chrome.js +39 -0
  1698. package/dist/ui/chrome.js.map +1 -0
  1699. package/dist/ui/client/activity-view.d.mts +12 -0
  1700. package/dist/ui/client/activity-view.d.mts.map +1 -0
  1701. package/dist/ui/client/activity-view.mjs +393 -0
  1702. package/dist/ui/client/activity-view.mjs.map +1 -0
  1703. package/dist/ui/client/activity.css +269 -0
  1704. package/dist/ui/client/activity.d.mts +11 -0
  1705. package/dist/ui/client/activity.d.mts.map +1 -0
  1706. package/dist/ui/client/activity.mjs +10 -0
  1707. package/dist/ui/client/activity.mjs.map +1 -0
  1708. package/dist/ui/client/calendar-view.d.mts +5 -0
  1709. package/dist/ui/client/calendar-view.d.mts.map +1 -0
  1710. package/dist/ui/client/calendar-view.mjs +266 -0
  1711. package/dist/ui/client/calendar-view.mjs.map +1 -0
  1712. package/dist/ui/client/calendar.css +170 -0
  1713. package/dist/ui/client/calendar.d.mts +6 -0
  1714. package/dist/ui/client/calendar.d.mts.map +1 -0
  1715. package/dist/ui/client/calendar.mjs +6 -0
  1716. package/dist/ui/client/calendar.mjs.map +1 -0
  1717. package/dist/ui/client/mail-view.d.mts +9 -0
  1718. package/dist/ui/client/mail-view.d.mts.map +1 -0
  1719. package/dist/ui/client/mail-view.mjs +350 -0
  1720. package/dist/ui/client/mail-view.mjs.map +1 -0
  1721. package/dist/ui/client/mail.css +230 -0
  1722. package/dist/ui/client/mail.d.mts +11 -0
  1723. package/dist/ui/client/mail.d.mts.map +1 -0
  1724. package/dist/ui/client/mail.mjs +10 -0
  1725. package/dist/ui/client/mail.mjs.map +1 -0
  1726. package/dist/ui/data.d.ts +25 -0
  1727. package/dist/ui/data.d.ts.map +1 -0
  1728. package/dist/ui/data.js +23 -0
  1729. package/dist/ui/data.js.map +1 -0
  1730. package/dist/ui/date-picker.d.ts +36 -0
  1731. package/dist/ui/date-picker.d.ts.map +1 -0
  1732. package/dist/ui/date-picker.js +40 -0
  1733. package/dist/ui/date-picker.js.map +1 -0
  1734. package/dist/ui/form.d.ts +67 -0
  1735. package/dist/ui/form.d.ts.map +1 -0
  1736. package/dist/ui/form.js +75 -0
  1737. package/dist/ui/form.js.map +1 -0
  1738. package/dist/ui/format.d.ts +4 -0
  1739. package/dist/ui/format.d.ts.map +1 -0
  1740. package/dist/ui/format.js +33 -0
  1741. package/dist/ui/format.js.map +1 -0
  1742. package/dist/ui/hooks.d.ts +5 -0
  1743. package/dist/ui/hooks.d.ts.map +1 -0
  1744. package/dist/ui/hooks.js +82 -0
  1745. package/dist/ui/hooks.js.map +1 -0
  1746. package/dist/ui/icons.d.ts +12 -0
  1747. package/dist/ui/icons.d.ts.map +1 -0
  1748. package/dist/ui/icons.js +76 -0
  1749. package/dist/ui/icons.js.map +1 -0
  1750. package/dist/ui/index.d.ts +39 -0
  1751. package/dist/ui/index.d.ts.map +1 -0
  1752. package/dist/ui/index.js +39 -0
  1753. package/dist/ui/index.js.map +1 -0
  1754. package/dist/ui/layout.d.ts +80 -0
  1755. package/dist/ui/layout.d.ts.map +1 -0
  1756. package/dist/ui/layout.js +86 -0
  1757. package/dist/ui/layout.js.map +1 -0
  1758. package/dist/ui/mail.d.ts +5 -0
  1759. package/dist/ui/mail.d.ts.map +1 -0
  1760. package/dist/ui/mail.js +69 -0
  1761. package/dist/ui/mail.js.map +1 -0
  1762. package/dist/ui/media.d.ts +42 -0
  1763. package/dist/ui/media.d.ts.map +1 -0
  1764. package/dist/ui/media.js +48 -0
  1765. package/dist/ui/media.js.map +1 -0
  1766. package/dist/ui/modal.d.ts +9 -0
  1767. package/dist/ui/modal.d.ts.map +1 -0
  1768. package/dist/ui/modal.js +13 -0
  1769. package/dist/ui/modal.js.map +1 -0
  1770. package/dist/ui/nav.d.ts +34 -0
  1771. package/dist/ui/nav.d.ts.map +1 -0
  1772. package/dist/ui/nav.js +77 -0
  1773. package/dist/ui/nav.js.map +1 -0
  1774. package/dist/ui/navigation.d.ts +22 -0
  1775. package/dist/ui/navigation.d.ts.map +1 -0
  1776. package/dist/ui/navigation.js +9 -0
  1777. package/dist/ui/navigation.js.map +1 -0
  1778. package/dist/ui/primitives.d.ts +61 -0
  1779. package/dist/ui/primitives.d.ts.map +1 -0
  1780. package/dist/ui/primitives.js +74 -0
  1781. package/dist/ui/primitives.js.map +1 -0
  1782. package/dist/ui/record.d.ts +44 -0
  1783. package/dist/ui/record.d.ts.map +1 -0
  1784. package/dist/ui/record.js +39 -0
  1785. package/dist/ui/record.js.map +1 -0
  1786. package/dist/ui/schedule.d.ts +34 -0
  1787. package/dist/ui/schedule.d.ts.map +1 -0
  1788. package/dist/ui/schedule.js +39 -0
  1789. package/dist/ui/schedule.js.map +1 -0
  1790. package/dist/ui/state.d.ts +19 -0
  1791. package/dist/ui/state.d.ts.map +1 -0
  1792. package/dist/ui/state.js +34 -0
  1793. package/dist/ui/state.js.map +1 -0
  1794. package/dist/ui/surfaces.d.ts +38 -0
  1795. package/dist/ui/surfaces.d.ts.map +1 -0
  1796. package/dist/ui/surfaces.js +36 -0
  1797. package/dist/ui/surfaces.js.map +1 -0
  1798. package/dist/ui/table.d.ts +48 -0
  1799. package/dist/ui/table.d.ts.map +1 -0
  1800. package/dist/ui/table.js +53 -0
  1801. package/dist/ui/table.js.map +1 -0
  1802. package/package.json +57 -0
@@ -0,0 +1,1094 @@
1
+ import { createHash, randomBytes, randomUUID } from 'node:crypto';
2
+ import { asc, defineFn, deleteFrom, eq, from, inArray, isTimezone } from '@ketvietlab/ketjs';
3
+ import { hashPassword, needsRehash, verifyPassword } from './password.js';
4
+ import { roleFunctions } from './roles.js';
5
+ const issue = (field, code, params) => ({
6
+ field,
7
+ code,
8
+ ...(params ? { params } : {}),
9
+ });
10
+ const invalid = (errors) => ({ ok: false, errors });
11
+ const nowIso = () => new Date().toISOString();
12
+ const normalizeLogin = (value) => String(value ?? '')
13
+ .normalize('NFKC')
14
+ .trim()
15
+ .toLowerCase();
16
+ const digest = (value) => createHash('sha256').update(value).digest('hex');
17
+ const timestampMs = (value) => value instanceof Date ? value.getTime() : Date.parse(String(value));
18
+ const DUMMY_HASH = 'scrypt$32768$8$1$AAAAAAAAAAAAAAAAAAAAAA$AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
19
+ class TokenClaimRace extends Error {
20
+ }
21
+ const audit = async (ctx, event, userId, networkFingerprint, metadata) => {
22
+ await ctx.db.insert('user.SecurityAudit', {
23
+ id: randomUUID(),
24
+ userId: userId || null,
25
+ event,
26
+ occurredAt: nowIso(),
27
+ networkFingerprint: networkFingerprint || null,
28
+ metadata: metadata ?? null,
29
+ });
30
+ };
31
+ const superuser = async (ctx, userId) => {
32
+ const U = ctx.table('user.User');
33
+ return Boolean(await ctx.db.one(from(U).where(eq(U.id, userId), eq(U.active, true), eq(U.superuser, true))));
34
+ };
35
+ const liveSuperusers = async (ctx) => {
36
+ const U = ctx.table('user.User');
37
+ return ctx.db.count(from(U).where(eq(U.active, true), eq(U.superuser, true), eq(U.accessKind, 'internal')));
38
+ };
39
+ const lockSecurityGuard = async (ctx, id) => {
40
+ await ctx.db.insertIfAbsent('user.SecurityGuard', { id, updatedAt: nowIso() });
41
+ // PostgreSQL holds this row lock until the surrounding transaction commits.
42
+ // SQLite already serializes writers, so the same portable statement is enough.
43
+ await ctx.db.update('user.SecurityGuard', { id }, { updatedAt: nowIso() });
44
+ };
45
+ const lockLastSuperuser = (ctx) => lockSecurityGuard(ctx, 'last-superuser');
46
+ const throttleIds = (login, networkFingerprint) => [
47
+ `login:${digest(login)}`,
48
+ `network:${digest(networkFingerprint || 'unknown')}`,
49
+ ];
50
+ const throttled = async (ctx, ids, at) => {
51
+ const T = ctx.table('user.AuthThrottle');
52
+ const rows = await ctx.db.all(from(T).where(inArray(T.id, ids)));
53
+ return rows.some((row) => row.blockedUntil && timestampMs(row.blockedUntil) > at);
54
+ };
55
+ const failThrottle = async (ctx, ids, at) => {
56
+ for (const id of ids) {
57
+ for (let attempt = 0; attempt < 5; attempt++) {
58
+ const T = ctx.table('user.AuthThrottle');
59
+ const row = await ctx.db.one(from(T).where(eq(T.id, id)));
60
+ if (!row) {
61
+ const inserted = await ctx.db.insertIfAbsent('user.AuthThrottle', {
62
+ id,
63
+ failures: 1,
64
+ blockedUntil: null,
65
+ updatedAt: new Date(at).toISOString(),
66
+ });
67
+ if ('dryRun' in inserted || inserted.inserted)
68
+ break;
69
+ continue;
70
+ }
71
+ const failures = Math.min(Number(row.failures) + 1, 20);
72
+ const delay = failures < 3 ? 0 : Math.min(15 * 60_000, 1000 * 2 ** Math.min(failures - 3, 9));
73
+ const changed = await ctx.db.compareAndSet('user.AuthThrottle', { id }, { failures: row.failures, blockedUntil: row.blockedUntil }, {
74
+ failures,
75
+ blockedUntil: delay ? new Date(at + delay).toISOString() : null,
76
+ updatedAt: new Date(at).toISOString(),
77
+ });
78
+ if ('dryRun' in changed || changed.matched)
79
+ break;
80
+ }
81
+ }
82
+ };
83
+ const clearThrottle = async (ctx, ids) => {
84
+ const T = ctx.table('user.AuthThrottle');
85
+ await ctx.db.del(deleteFrom(T).where(inArray(T.id, ids)));
86
+ };
87
+ const liveIdentity = async (ctx, userId) => {
88
+ const U = ctx.table('user.User');
89
+ const user = await ctx.db.one(from(U)
90
+ .select(U.id, U.defaultCompanyId, U.defaultBranchId, U.securityVersion)
91
+ .where(eq(U.id, userId), eq(U.active, true)));
92
+ if (!user)
93
+ return null;
94
+ const M = ctx.table('user.Membership');
95
+ const companyIds = (await ctx.db.all(from(M).where(eq(M.userId, userId)))).map((row) => row.companyId);
96
+ if (!companyIds.length)
97
+ return { user, companies: [], branches: [] };
98
+ const C = ctx.table('company.Company');
99
+ const companies = await ctx.db.all(from(C).where(inArray(C.id, companyIds), eq(C.active, true)).orderBy(asc(C.code)).preload('partner'));
100
+ const allowedCompanies = new Set(companies.map((row) => row.id));
101
+ const BM = ctx.table('user.BranchMembership');
102
+ const branchIds = (await ctx.db.all(from(BM).where(eq(BM.userId, userId)))).map((row) => row.branchId);
103
+ if (!branchIds.length)
104
+ return { user, companies, branches: [] };
105
+ const B = ctx.table('company.Branch');
106
+ const branches = (await ctx.db.all(from(B).where(inArray(B.id, branchIds), eq(B.active, true)).orderBy(asc(B.code)))).filter((row) => allowedCompanies.has(row.companyId));
107
+ return { user, companies, branches };
108
+ };
109
+ const requestedIds = (value) => Array.isArray(value) ? [...new Set(value.map(String).filter(Boolean))] : null;
110
+ const contextFor = (live, requested, strict) => {
111
+ const liveVersion = Number(live.user.securityVersion ?? 0);
112
+ if (Number(requested.securityVersion ?? 0) !== liveVersion)
113
+ return invalid([issue('securityVersion', 'user.error.sessionRevoked')]);
114
+ const allowedCompanies = new Set(live.companies.map((row) => String(row.id)));
115
+ const askedCompanies = requestedIds(requested.companies);
116
+ let companies = (askedCompanies ?? [...allowedCompanies]).filter((id) => allowedCompanies.has(id));
117
+ const preferredCompany = String(requested.company ?? live.user.defaultCompanyId ?? '');
118
+ let company = companies.includes(preferredCompany) ? preferredCompany : '';
119
+ if (!company && !strict) {
120
+ const fallback = String(live.user.defaultCompanyId ?? '');
121
+ company = allowedCompanies.has(fallback) ? fallback : (companies[0] ?? [...allowedCompanies][0] ?? '');
122
+ if (company && !companies.includes(company))
123
+ companies = [...companies, company];
124
+ }
125
+ if (!company || !companies.length)
126
+ return invalid([issue('companyId', strict ? 'user.error.contextCompany' : 'user.error.noLiveCompany')]);
127
+ const allowedBranches = new Map(live.branches
128
+ .filter((row) => companies.includes(String(row.companyId)))
129
+ .map((row) => [String(row.id), row]));
130
+ const askedBranches = requestedIds(requested.branches);
131
+ let branches = (askedBranches ?? [...allowedBranches.keys()]).filter((id) => allowedBranches.has(id));
132
+ const preferredBranch = String(requested.branch ?? live.user.defaultBranchId ?? '');
133
+ let branch = branches.includes(preferredBranch) && allowedBranches.get(preferredBranch)?.companyId === company
134
+ ? preferredBranch
135
+ : '';
136
+ if (!branch && !strict) {
137
+ const fallback = String(live.user.defaultBranchId ?? '');
138
+ branch =
139
+ allowedBranches.get(fallback)?.companyId === company
140
+ ? fallback
141
+ : (branches.find((id) => allowedBranches.get(id)?.companyId === company) ?? '');
142
+ if (branch && !branches.includes(branch))
143
+ branches = [...branches, branch];
144
+ }
145
+ if (!branch)
146
+ return invalid([issue('branchId', strict ? 'user.error.contextBranch' : 'user.error.noLiveBranch')]);
147
+ return {
148
+ ok: true,
149
+ context: {
150
+ companies,
151
+ company,
152
+ branches,
153
+ branch,
154
+ securityVersion: liveVersion,
155
+ },
156
+ };
157
+ };
158
+ /**
159
+ * Not one of these declares `password` in its output, which is what keeps the hash
160
+ * inside the server: the projection picks declared fields, so a handler that
161
+ * returned the whole row would still hand back only what is named here.
162
+ */
163
+ export const functions = {
164
+ ...roleFunctions,
165
+ listUsers: defineFn({
166
+ input: { includeArchived: 'bool?' },
167
+ output: {
168
+ id: 'id',
169
+ login: 'text',
170
+ name: 'text',
171
+ email: 'text?',
172
+ timezone: 'text?',
173
+ partnerId: 'id?',
174
+ defaultCompanyId: 'id?',
175
+ defaultBranchId: 'id?',
176
+ accessKind: 'text',
177
+ securityVersion: 'int',
178
+ lastLoginAt: 'datetime?',
179
+ passwordReady: 'bool',
180
+ active: 'bool',
181
+ superuser: 'bool',
182
+ },
183
+ effects: ['read:user.User'],
184
+ agent: true,
185
+ handler: async (ctx, a) => {
186
+ const U = ctx.table('user.User');
187
+ const q = from(U).orderBy(asc(U.login));
188
+ const rows = await ctx.db.all(a.includeArchived === true ? q : q.where(eq(U.active, true)));
189
+ return rows.map((row) => ({ ...row, passwordReady: Boolean(row.passwordHash) }));
190
+ },
191
+ }),
192
+ getUser: defineFn({
193
+ input: { id: 'id' },
194
+ output: {
195
+ id: 'id',
196
+ login: 'text',
197
+ name: 'text',
198
+ email: 'text?',
199
+ lang: 'text?',
200
+ timezone: 'text?',
201
+ partnerId: 'id?',
202
+ defaultCompanyId: 'id?',
203
+ defaultBranchId: 'id?',
204
+ accessKind: 'text',
205
+ securityVersion: 'int',
206
+ lastLoginAt: 'datetime?',
207
+ passwordReady: 'bool',
208
+ active: 'bool',
209
+ superuser: 'bool',
210
+ memberships: 'json?',
211
+ branchMemberships: 'json?',
212
+ assignments: 'json?',
213
+ },
214
+ effects: ['read:user.User', 'read:user.Membership', 'read:user.BranchMembership', 'read:user.Assignment'],
215
+ agent: true,
216
+ handler: async (ctx, a) => {
217
+ const U = ctx.table('user.User');
218
+ const row = await ctx.db.one(from(U)
219
+ .where(eq(U.id, a.id))
220
+ .preload('memberships')
221
+ .preload('branchMemberships')
222
+ .preload('assignments'));
223
+ return row ? { ...row, passwordReady: Boolean(row.passwordHash) } : null;
224
+ },
225
+ }),
226
+ createUser: defineFn({
227
+ input: {
228
+ id: 'id',
229
+ login: 'text',
230
+ password: 'text?',
231
+ name: 'text',
232
+ email: 'text?',
233
+ timezone: 'text?',
234
+ partnerId: 'id?',
235
+ defaultCompanyId: 'id?',
236
+ defaultBranchId: 'id?',
237
+ accessKind: 'text?',
238
+ superuser: 'bool?',
239
+ },
240
+ output: { ok: 'bool', id: 'id?', errors: 'json?' },
241
+ effects: ['read:user.User', 'write:user.User'],
242
+ idempotent: true,
243
+ // Deliberately not an agent tool: an agent that can mint logins is an agent
244
+ // that can mint itself one.
245
+ handler: async (ctx, a) => {
246
+ const U = ctx.table('user.User');
247
+ const login = normalizeLogin(a.login);
248
+ const password = String(a.password ?? '');
249
+ const accessKind = String(a.accessKind ?? 'internal');
250
+ const errors = [];
251
+ if (!login)
252
+ errors.push(issue('login', 'user.error.required'));
253
+ if (!String(a.name).trim())
254
+ errors.push(issue('name', 'user.error.required'));
255
+ if (!['internal', 'portal', 'public'].includes(accessKind))
256
+ errors.push(issue('accessKind', 'user.error.accessKind'));
257
+ if (a.timezone && !isTimezone(String(a.timezone)))
258
+ errors.push(issue('timezone', 'user.error.timezone'));
259
+ if (password && password.length < 8)
260
+ errors.push(issue('password', 'user.error.passwordLength'));
261
+ if (password && ctx.actor)
262
+ errors.push(issue('password', 'user.error.adminPassword'));
263
+ if (await ctx.db.one(from(U).where(eq(U.login, login))))
264
+ errors.push(issue('login', 'user.error.loginUnique'));
265
+ if (a.superuser === true && ctx.actor && !(await superuser(ctx, ctx.actor)))
266
+ errors.push(issue('superuser', 'user.error.superuserRequired'));
267
+ if (errors.length)
268
+ return invalid(errors);
269
+ const inserted = await ctx.db.insertIfAbsent('user.User', {
270
+ id: a.id,
271
+ login,
272
+ passwordHash: password ? await hashPassword(password) : null,
273
+ name: String(a.name).trim(),
274
+ email: a.email || null,
275
+ timezone: a.timezone && isTimezone(String(a.timezone)) ? String(a.timezone) : null,
276
+ partnerId: a.partnerId || null,
277
+ defaultCompanyId: a.defaultCompanyId || null,
278
+ defaultBranchId: a.defaultBranchId || null,
279
+ accessKind,
280
+ securityVersion: 0,
281
+ lastLoginAt: null,
282
+ active: true,
283
+ superuser: a.superuser === true,
284
+ });
285
+ return 'dryRun' in inserted || inserted.inserted
286
+ ? { ok: true, id: a.id }
287
+ : invalid([issue('login', 'user.error.loginUnique')]);
288
+ },
289
+ }),
290
+ provisionAdmin: defineFn({
291
+ exposure: 'internal',
292
+ provision: true,
293
+ input: {
294
+ companyName: 'text',
295
+ companyCode: 'text',
296
+ currency: 'text',
297
+ adminLogin: 'text',
298
+ adminName: 'text',
299
+ adminEmail: 'text?',
300
+ adminPassword: 'text',
301
+ },
302
+ output: {
303
+ ok: 'bool',
304
+ companyId: 'id?',
305
+ branchId: 'id?',
306
+ partnerId: 'id?',
307
+ userId: 'id?',
308
+ errors: 'json?',
309
+ },
310
+ effects: [
311
+ 'read:partner.Partner',
312
+ 'write:partner.Partner',
313
+ 'read:company.Company',
314
+ 'write:company.Company',
315
+ 'read:company.Branch',
316
+ 'write:company.Branch',
317
+ 'read:user.User',
318
+ 'write:user.User',
319
+ 'write:user.Membership',
320
+ 'write:user.BranchMembership',
321
+ 'read:user.SecurityGuard',
322
+ 'write:user.SecurityGuard',
323
+ 'write:user.SecurityAudit',
324
+ ],
325
+ handler: async (ctx, a) => {
326
+ if (ctx.actor !== 'system:provision')
327
+ return invalid([issue('adminLogin', 'user.error.provisionActor')]);
328
+ const companyName = String(a.companyName).trim();
329
+ const companyCode = String(a.companyCode).trim().toUpperCase();
330
+ const currency = String(a.currency).trim().toUpperCase();
331
+ const adminLogin = normalizeLogin(a.adminLogin);
332
+ const adminName = String(a.adminName).trim();
333
+ const adminEmail = String(a.adminEmail ?? '').trim() || null;
334
+ const adminPassword = String(a.adminPassword);
335
+ const errors = [];
336
+ for (const [field, value] of [
337
+ ['companyName', companyName],
338
+ ['companyCode', companyCode],
339
+ ['currency', currency],
340
+ ['adminLogin', adminLogin],
341
+ ['adminName', adminName],
342
+ ])
343
+ if (!value)
344
+ errors.push(issue(field, 'user.error.required'));
345
+ if (adminPassword.length < 8)
346
+ errors.push(issue('adminPassword', 'user.error.passwordLength'));
347
+ if (errors.length)
348
+ return invalid(errors);
349
+ const U = ctx.table('user.User');
350
+ const C = ctx.table('company.Company');
351
+ if ((await ctx.db.count(from(U))) > 0 || (await ctx.db.count(from(C))) > 0)
352
+ return invalid([issue('adminLogin', 'user.error.provisionExists')]);
353
+ const companyId = randomUUID();
354
+ const partnerId = randomUUID();
355
+ const branchId = `root:${companyId}`;
356
+ const userId = randomUUID();
357
+ const passwordHash = await hashPassword(adminPassword);
358
+ return ctx.tx(async (tx) => {
359
+ await lockSecurityGuard(tx, 'provision-admin');
360
+ const TXU = tx.table('user.User');
361
+ const TXC = tx.table('company.Company');
362
+ if ((await tx.db.count(from(TXU))) > 0 || (await tx.db.count(from(TXC))) > 0)
363
+ return invalid([issue('adminLogin', 'user.error.provisionExists')]);
364
+ await tx.db.insert('partner.Partner', {
365
+ id: partnerId,
366
+ kind: 'company',
367
+ name: companyName,
368
+ parentId: null,
369
+ vat: null,
370
+ ref: companyCode,
371
+ email: null,
372
+ phone: null,
373
+ lang: null,
374
+ active: true,
375
+ });
376
+ await tx.db.insert('company.Company', {
377
+ id: companyId,
378
+ code: companyCode,
379
+ partnerId,
380
+ parentId: null,
381
+ currency,
382
+ active: true,
383
+ });
384
+ await tx.db.insert('company.Branch', {
385
+ id: branchId,
386
+ companyId,
387
+ code: companyCode,
388
+ name: companyName,
389
+ parentId: null,
390
+ rootKey: companyId,
391
+ active: true,
392
+ });
393
+ await tx.db.insert('user.User', {
394
+ id: userId,
395
+ login: adminLogin,
396
+ passwordHash,
397
+ partnerId: null,
398
+ name: adminName,
399
+ email: adminEmail,
400
+ lang: null,
401
+ defaultCompanyId: companyId,
402
+ defaultBranchId: branchId,
403
+ accessKind: 'internal',
404
+ securityVersion: 0,
405
+ lastLoginAt: null,
406
+ superuser: true,
407
+ active: true,
408
+ });
409
+ await tx.db.insert('user.Membership', {
410
+ id: `company:${userId}:${companyId}`,
411
+ userId,
412
+ companyId,
413
+ });
414
+ await tx.db.insert('user.BranchMembership', {
415
+ id: `branch:${userId}:${branchId}`,
416
+ userId,
417
+ branchId,
418
+ });
419
+ await audit(tx, 'provision.admin', userId, undefined, { companyId, branchId });
420
+ return { ok: true, companyId, branchId, partnerId, userId };
421
+ });
422
+ },
423
+ }),
424
+ saveUser: defineFn({
425
+ input: {
426
+ id: 'id',
427
+ login: 'text',
428
+ name: 'text',
429
+ email: 'text?',
430
+ timezone: 'text?',
431
+ partnerId: 'id?',
432
+ accessKind: 'text',
433
+ active: 'bool',
434
+ superuser: 'bool',
435
+ },
436
+ output: { ok: 'bool', id: 'id?', securityVersion: 'int?', errors: 'json?' },
437
+ effects: ['read:user.User', 'write:user.User', 'read:user.SecurityGuard', 'write:user.SecurityGuard'],
438
+ handler: async (ctx, a) => {
439
+ const U = ctx.table('user.User');
440
+ const row = await ctx.db.one(from(U).where(eq(U.id, a.id)));
441
+ if (!row)
442
+ return invalid([issue('id', 'user.error.userMissing')]);
443
+ const login = normalizeLogin(a.login);
444
+ const accessKind = String(a.accessKind);
445
+ const errors = [];
446
+ if (!login)
447
+ errors.push(issue('login', 'user.error.required'));
448
+ if (!String(a.name).trim())
449
+ errors.push(issue('name', 'user.error.required'));
450
+ if (!['internal', 'portal', 'public'].includes(accessKind))
451
+ errors.push(issue('accessKind', 'user.error.accessKind'));
452
+ if (a.timezone && !isTimezone(String(a.timezone)))
453
+ errors.push(issue('timezone', 'user.error.timezone'));
454
+ const owner = await ctx.db.one(from(U).where(eq(U.login, login)));
455
+ if (owner && owner.id !== a.id)
456
+ errors.push(issue('login', 'user.error.loginUnique'));
457
+ if (a.superuser === true && row.superuser !== true && ctx.actor && !(await superuser(ctx, ctx.actor)))
458
+ errors.push(issue('superuser', 'user.error.superuserRequired'));
459
+ const removesLiveSuperuser = row.superuser === true &&
460
+ row.active === true &&
461
+ row.accessKind === 'internal' &&
462
+ (a.superuser !== true || a.active !== true || accessKind !== 'internal');
463
+ if (errors.length)
464
+ return invalid(errors);
465
+ const update = async (writeCtx, held) => {
466
+ const securityChange = login !== held.login || a.active !== held.active || accessKind !== held.accessKind;
467
+ const securityVersion = Number(held.securityVersion ?? 0) + (securityChange ? 1 : 0);
468
+ await writeCtx.db.update('user.User', { id: a.id }, {
469
+ login,
470
+ name: String(a.name).trim(),
471
+ email: a.email || null,
472
+ timezone: a.timezone === undefined ? (held.timezone ?? null) : a.timezone || null,
473
+ partnerId: a.partnerId || null,
474
+ accessKind,
475
+ active: a.active,
476
+ superuser: a.superuser,
477
+ securityVersion,
478
+ });
479
+ return { ok: true, id: a.id, securityVersion };
480
+ };
481
+ if (!removesLiveSuperuser)
482
+ return update(ctx, row);
483
+ return ctx.tx(async (tx) => {
484
+ await lockLastSuperuser(tx);
485
+ const U2 = tx.table('user.User');
486
+ const held = await tx.db.one(from(U2).where(eq(U2.id, a.id)));
487
+ if (held?.active === true &&
488
+ held.superuser === true &&
489
+ held.accessKind === 'internal' &&
490
+ (await liveSuperusers(tx)) <= 1)
491
+ return invalid([issue('active', 'user.error.lastSuperuser')]);
492
+ if (!held)
493
+ return invalid([issue('id', 'user.error.userMissing')]);
494
+ return update(tx, held);
495
+ });
496
+ },
497
+ }),
498
+ setTimezone: defineFn({
499
+ exposure: 'internal',
500
+ input: { timezone: 'text' },
501
+ output: { ok: 'bool', timezone: 'text?', errors: 'json?' },
502
+ effects: ['read:user.User', 'write:user.User'],
503
+ handler: async (ctx, a) => {
504
+ if (!ctx.actor)
505
+ return invalid([issue('userId', 'user.error.userMissing')]);
506
+ const timezone = String(a.timezone).trim();
507
+ if (!isTimezone(timezone))
508
+ return invalid([issue('timezone', 'user.error.timezone')]);
509
+ const user = await ctx.db.select('user.User', { id: ctx.actor });
510
+ if (!user.length)
511
+ return invalid([issue('userId', 'user.error.userMissing')]);
512
+ await ctx.db.update('user.User', { id: ctx.actor }, { timezone });
513
+ return { ok: true, timezone };
514
+ },
515
+ }),
516
+ /**
517
+ * Changing a password takes the old one, even for an administrator acting on
518
+ * their own account: a session someone walked away from should not be enough.
519
+ */
520
+ setPassword: defineFn({
521
+ exposure: 'internal',
522
+ anonymous: true,
523
+ input: { id: 'id', currentPassword: 'text', newPassword: 'text' },
524
+ output: { ok: 'bool', securityVersion: 'int?', errors: 'json?' },
525
+ effects: ['read:user.User', 'write:user.User', 'write:user.SecurityAudit'],
526
+ handler: async (ctx, a) => {
527
+ const U = ctx.table('user.User');
528
+ const row = await ctx.db.one(from(U).where(eq(U.id, a.id)));
529
+ if (ctx.actor !== a.id)
530
+ return invalid([issue('id', 'user.error.passwordActor')]);
531
+ if (!row?.passwordHash || !(await verifyPassword(String(a.currentPassword), String(row.passwordHash))))
532
+ return invalid([issue('currentPassword', 'user.error.currentPassword')]);
533
+ if (String(a.newPassword).length < 8)
534
+ return invalid([issue('newPassword', 'user.error.passwordLength')]);
535
+ const securityVersion = Number(row.securityVersion ?? 0) + 1;
536
+ await ctx.db.update('user.User', { id: a.id }, {
537
+ passwordHash: await hashPassword(String(a.newPassword)),
538
+ securityVersion,
539
+ });
540
+ await audit(ctx, 'password.change', a.id);
541
+ return { ok: true, securityVersion };
542
+ },
543
+ }),
544
+ /**
545
+ * The one function that reads a password hash, and it returns a verdict rather
546
+ * than a row. It also answers the same way for an unknown login and a wrong
547
+ * password: telling those apart is how an attacker enumerates accounts.
548
+ */
549
+ authenticate: defineFn({
550
+ // There is no session yet — checking the password is how one begins.
551
+ anonymous: true,
552
+ exposure: 'internal',
553
+ input: { login: 'text', password: 'text', networkFingerprint: 'text?' },
554
+ output: {
555
+ ok: 'bool',
556
+ userId: 'id?',
557
+ companies: 'json?',
558
+ defaultCompanyId: 'id?',
559
+ branches: 'json?',
560
+ defaultBranchId: 'id?',
561
+ securityVersion: 'int?',
562
+ rehash: 'bool?',
563
+ },
564
+ effects: [
565
+ 'read:user.User',
566
+ 'read:user.Membership',
567
+ 'read:user.BranchMembership',
568
+ 'read:company.Company',
569
+ 'read:company.Branch',
570
+ 'read:partner.Partner',
571
+ 'read:user.AuthThrottle',
572
+ 'write:user.AuthThrottle',
573
+ 'write:user.User',
574
+ 'write:user.SecurityAudit',
575
+ ],
576
+ handler: async (ctx, a) => {
577
+ const login = normalizeLogin(a.login);
578
+ const fingerprint = String(a.networkFingerprint ?? 'unknown');
579
+ const throttle = throttleIds(login, fingerprint);
580
+ const at = Date.now();
581
+ if (await throttled(ctx, throttle, at)) {
582
+ await verifyPassword(String(a.password), DUMMY_HASH);
583
+ await audit(ctx, 'login.failure', undefined, fingerprint, { reason: 'cooldown' });
584
+ return { ok: false };
585
+ }
586
+ const U = ctx.table('user.User');
587
+ const row = await ctx.db.one(from(U).where(eq(U.login, login), eq(U.active, true)));
588
+ const verified = await verifyPassword(String(a.password), String(row?.passwordHash ?? DUMMY_HASH));
589
+ if (row?.accessKind !== 'internal' || !row.passwordHash || !verified) {
590
+ await failThrottle(ctx, throttle, at);
591
+ await audit(ctx, 'login.failure', undefined, fingerprint);
592
+ return { ok: false };
593
+ }
594
+ const live = await liveIdentity(ctx, String(row.id));
595
+ const companies = live?.companies.map((company) => String(company.id)) ?? [];
596
+ const branches = live?.branches.map((branch) => String(branch.id)) ?? [];
597
+ const defaultCompanyId = companies.includes(String(row.defaultCompanyId ?? ''))
598
+ ? String(row.defaultCompanyId)
599
+ : (companies[0] ?? null);
600
+ const defaultBranchId = branches.find((id) => id === String(row.defaultBranchId ?? '') &&
601
+ live?.branches.find((branch) => String(branch.id) === id)?.companyId === defaultCompanyId) ??
602
+ live?.branches.find((branch) => branch.companyId === defaultCompanyId)?.id ??
603
+ null;
604
+ if (needsRehash(String(row.passwordHash)))
605
+ await ctx.db.update('user.User', { id: row.id }, { passwordHash: await hashPassword(String(a.password)) });
606
+ await ctx.db.update('user.User', { id: row.id }, { lastLoginAt: new Date(at).toISOString() });
607
+ // A successful account login clears that account's failures. Keep the
608
+ // network bucket: otherwise an attacker can repeatedly sign in to one
609
+ // account to erase failures from every other login on the same network.
610
+ await clearThrottle(ctx, [throttle[0]]);
611
+ await audit(ctx, 'login.success', row.id, fingerprint);
612
+ return {
613
+ ok: true,
614
+ userId: row.id,
615
+ companies,
616
+ defaultCompanyId,
617
+ branches,
618
+ defaultBranchId,
619
+ securityVersion: Number(row.securityVersion ?? 0),
620
+ rehash: false,
621
+ };
622
+ },
623
+ }),
624
+ grantCompany: defineFn({
625
+ input: { id: 'id', userId: 'id', companyId: 'id' },
626
+ output: { ok: 'bool', id: 'id?', errors: 'json?' },
627
+ effects: [
628
+ 'read:user.User',
629
+ 'write:user.User',
630
+ 'read:company.Company',
631
+ 'read:company.Branch',
632
+ 'read:user.Membership',
633
+ 'write:user.Membership',
634
+ 'read:user.BranchMembership',
635
+ 'write:user.BranchMembership',
636
+ ],
637
+ idempotent: true,
638
+ handler: async (ctx, a) => {
639
+ const U = ctx.table('user.User');
640
+ const C = ctx.table('company.Company');
641
+ const heldUser = await ctx.db.one(from(U).where(eq(U.id, a.userId)));
642
+ if (!heldUser)
643
+ return invalid([issue('userId', 'user.error.userMissing')]);
644
+ const heldCompany = await ctx.db.one(from(C).where(eq(C.id, a.companyId), eq(C.active, true)));
645
+ if (!heldCompany)
646
+ return invalid([issue('companyId', 'user.error.companyMissing')]);
647
+ const B = ctx.table('company.Branch');
648
+ const root = await ctx.db.one(from(B).where(eq(B.rootKey, a.companyId), eq(B.active, true)));
649
+ if (!root)
650
+ return invalid([issue('companyId', 'user.error.rootBranchMissing')]);
651
+ return ctx.tx(async (tx) => {
652
+ const M = tx.table('user.Membership');
653
+ const existing = await tx.db.one(from(M).where(eq(M.userId, a.userId), eq(M.companyId, a.companyId)));
654
+ const membershipId = String(existing?.id ?? a.id);
655
+ if (!existing)
656
+ await tx.db.insertIfAbsent('user.Membership', {
657
+ id: membershipId,
658
+ userId: a.userId,
659
+ companyId: a.companyId,
660
+ });
661
+ await tx.db.insertIfAbsent('user.BranchMembership', {
662
+ id: `root:${a.userId}:${root.id}`,
663
+ userId: a.userId,
664
+ branchId: root.id,
665
+ });
666
+ const patch = {};
667
+ if (!heldUser.defaultCompanyId)
668
+ patch.defaultCompanyId = a.companyId;
669
+ if (!heldUser.defaultBranchId || !heldUser.defaultCompanyId)
670
+ patch.defaultBranchId = root.id;
671
+ if (Object.keys(patch).length)
672
+ await tx.db.update('user.User', { id: a.userId }, patch);
673
+ return { ok: true, id: membershipId };
674
+ });
675
+ },
676
+ }),
677
+ revokeCompany: defineFn({
678
+ input: { userId: 'id', companyId: 'id' },
679
+ output: { ok: 'bool', removed: 'int?', errors: 'json?' },
680
+ effects: [
681
+ 'read:user.User',
682
+ 'read:user.Membership',
683
+ 'write:user.Membership',
684
+ 'read:user.BranchMembership',
685
+ 'write:user.BranchMembership',
686
+ 'read:company.Branch',
687
+ ],
688
+ idempotent: true,
689
+ handler: async (ctx, a) => {
690
+ const U = ctx.table('user.User');
691
+ const heldUser = await ctx.db.one(from(U).where(eq(U.id, a.userId)));
692
+ if (heldUser?.active === true && heldUser.defaultCompanyId === a.companyId)
693
+ return invalid([issue('companyId', 'user.error.defaultCompanyRevoke')]);
694
+ return ctx.tx(async (tx) => {
695
+ const B = tx.table('company.Branch');
696
+ const branchIds = (await tx.db.all(from(B).where(eq(B.companyId, a.companyId)))).map((row) => row.id);
697
+ if (branchIds.length) {
698
+ const BM = tx.table('user.BranchMembership');
699
+ await tx.db.del(deleteFrom(BM).where(eq(BM.userId, a.userId), inArray(BM.branchId, branchIds)));
700
+ }
701
+ const M = tx.table('user.Membership');
702
+ const { changes } = await tx.db.del(deleteFrom(M).where(eq(M.userId, a.userId), eq(M.companyId, a.companyId)));
703
+ return { ok: true, removed: changes };
704
+ });
705
+ },
706
+ }),
707
+ grantBranch: defineFn({
708
+ input: { id: 'id', userId: 'id', branchId: 'id' },
709
+ output: { ok: 'bool', id: 'id?', errors: 'json?' },
710
+ effects: [
711
+ 'read:user.User',
712
+ 'read:user.Membership',
713
+ 'read:user.BranchMembership',
714
+ 'write:user.BranchMembership',
715
+ 'read:company.Branch',
716
+ ],
717
+ idempotent: true,
718
+ handler: async (ctx, a) => {
719
+ const U = ctx.table('user.User');
720
+ if (!(await ctx.db.one(from(U).where(eq(U.id, a.userId)))))
721
+ return invalid([issue('userId', 'user.error.userMissing')]);
722
+ const B = ctx.table('company.Branch');
723
+ const branch = await ctx.db.one(from(B).where(eq(B.id, a.branchId), eq(B.active, true)));
724
+ if (!branch)
725
+ return invalid([issue('branchId', 'user.error.branchMissing')]);
726
+ const M = ctx.table('user.Membership');
727
+ if (!(await ctx.db.one(from(M).where(eq(M.userId, a.userId), eq(M.companyId, branch.companyId)))))
728
+ return invalid([issue('branchId', 'user.error.branchCompanyMembership')]);
729
+ const inserted = await ctx.db.insertIfAbsent('user.BranchMembership', {
730
+ id: a.id,
731
+ userId: a.userId,
732
+ branchId: a.branchId,
733
+ });
734
+ if ('dryRun' in inserted || inserted.inserted)
735
+ return { ok: true, id: a.id };
736
+ const BM = ctx.table('user.BranchMembership');
737
+ const held = await ctx.db.one(from(BM).where(eq(BM.userId, a.userId), eq(BM.branchId, a.branchId)));
738
+ return { ok: true, id: held?.id };
739
+ },
740
+ }),
741
+ revokeBranch: defineFn({
742
+ input: { userId: 'id', branchId: 'id' },
743
+ output: { ok: 'bool', removed: 'int?', errors: 'json?' },
744
+ effects: ['read:user.User', 'read:user.BranchMembership', 'write:user.BranchMembership'],
745
+ idempotent: true,
746
+ handler: async (ctx, a) => {
747
+ const U = ctx.table('user.User');
748
+ const user = await ctx.db.one(from(U).where(eq(U.id, a.userId)));
749
+ if (user?.active === true && user.defaultBranchId === a.branchId)
750
+ return invalid([issue('branchId', 'user.error.defaultBranchRevoke')]);
751
+ const BM = ctx.table('user.BranchMembership');
752
+ const { changes } = await ctx.db.del(deleteFrom(BM).where(eq(BM.userId, a.userId), eq(BM.branchId, a.branchId)));
753
+ return { ok: true, removed: changes };
754
+ },
755
+ }),
756
+ setDefaultContext: defineFn({
757
+ input: { userId: 'id', companyId: 'id', branchId: 'id' },
758
+ output: { ok: 'bool', errors: 'json?' },
759
+ effects: [
760
+ 'read:user.User',
761
+ 'write:user.User',
762
+ 'read:user.Membership',
763
+ 'read:user.BranchMembership',
764
+ 'read:company.Branch',
765
+ ],
766
+ idempotent: true,
767
+ handler: async (ctx, a) => {
768
+ const M = ctx.table('user.Membership');
769
+ const BM = ctx.table('user.BranchMembership');
770
+ const B = ctx.table('company.Branch');
771
+ const [membership, branchMembership, branch] = await Promise.all([
772
+ ctx.db.one(from(M).where(eq(M.userId, a.userId), eq(M.companyId, a.companyId))),
773
+ ctx.db.one(from(BM).where(eq(BM.userId, a.userId), eq(BM.branchId, a.branchId))),
774
+ ctx.db.one(from(B).where(eq(B.id, a.branchId), eq(B.active, true))),
775
+ ]);
776
+ if (!membership)
777
+ return invalid([issue('companyId', 'user.error.companyMembership')]);
778
+ if (!branchMembership || branch?.companyId !== a.companyId)
779
+ return invalid([issue('branchId', 'user.error.branchMembership')]);
780
+ await ctx.db.update('user.User', { id: a.userId }, { defaultCompanyId: a.companyId, defaultBranchId: a.branchId });
781
+ return { ok: true };
782
+ },
783
+ }),
784
+ contextOptions: defineFn({
785
+ exposure: 'internal',
786
+ anonymous: true,
787
+ input: { userId: 'id' },
788
+ output: { ok: 'bool', companies: 'json?', branches: 'json?', defaults: 'json?', errors: 'json?' },
789
+ effects: [
790
+ 'read:user.User',
791
+ 'read:user.Membership',
792
+ 'read:user.BranchMembership',
793
+ 'read:company.Company',
794
+ 'read:company.Branch',
795
+ 'read:partner.Partner',
796
+ ],
797
+ handler: async (ctx, a) => {
798
+ if (ctx.actor && ctx.actor !== a.userId)
799
+ return invalid([issue('userId', 'user.error.contextActor')]);
800
+ const live = await liveIdentity(ctx, String(a.userId));
801
+ if (!live)
802
+ return invalid([issue('userId', 'user.error.userMissing')]);
803
+ return {
804
+ ok: true,
805
+ companies: live.companies.map((row) => ({
806
+ id: row.id,
807
+ code: row.code,
808
+ name: row.partner?.name ?? row.code,
809
+ })),
810
+ branches: live.branches.map((row) => ({
811
+ id: row.id,
812
+ companyId: row.companyId,
813
+ code: row.code,
814
+ name: row.name,
815
+ isRoot: Boolean(row.rootKey),
816
+ })),
817
+ defaults: {
818
+ companyId: live.user.defaultCompanyId ?? null,
819
+ branchId: live.user.defaultBranchId ?? null,
820
+ },
821
+ };
822
+ },
823
+ }),
824
+ prepareContext: defineFn({
825
+ exposure: 'internal',
826
+ anonymous: true,
827
+ input: {
828
+ userId: 'id',
829
+ companyId: 'id',
830
+ branchId: 'id',
831
+ companies: 'json',
832
+ branches: 'json',
833
+ securityVersion: 'int?',
834
+ },
835
+ output: { ok: 'bool', context: 'json?', errors: 'json?' },
836
+ effects: [
837
+ 'read:user.User',
838
+ 'read:user.Membership',
839
+ 'read:user.BranchMembership',
840
+ 'read:company.Company',
841
+ 'read:company.Branch',
842
+ 'read:partner.Partner',
843
+ ],
844
+ handler: async (ctx, a) => {
845
+ if (ctx.actor && ctx.actor !== a.userId)
846
+ return invalid([issue('userId', 'user.error.contextActor')]);
847
+ const live = await liveIdentity(ctx, String(a.userId));
848
+ if (!live)
849
+ return invalid([issue('userId', 'user.error.userMissing')]);
850
+ return contextFor(live, {
851
+ company: a.companyId,
852
+ branch: a.branchId,
853
+ companies: a.companies,
854
+ branches: a.branches,
855
+ securityVersion: a.securityVersion,
856
+ }, true);
857
+ },
858
+ }),
859
+ resolveSessionContext: defineFn({
860
+ exposure: 'internal',
861
+ input: {
862
+ userId: 'id',
863
+ companyId: 'id?',
864
+ branchId: 'id?',
865
+ companies: 'json?',
866
+ branches: 'json?',
867
+ securityVersion: 'int?',
868
+ },
869
+ output: { ok: 'bool', context: 'json?', errors: 'json?' },
870
+ effects: [
871
+ 'read:user.User',
872
+ 'read:user.Membership',
873
+ 'read:user.BranchMembership',
874
+ 'read:company.Company',
875
+ 'read:company.Branch',
876
+ 'read:partner.Partner',
877
+ ],
878
+ handler: async (ctx, a) => {
879
+ const live = await liveIdentity(ctx, String(a.userId));
880
+ if (!live)
881
+ return invalid([issue('userId', 'user.error.userMissing')]);
882
+ return contextFor(live, {
883
+ company: a.companyId,
884
+ branch: a.branchId,
885
+ companies: a.companies,
886
+ branches: a.branches,
887
+ securityVersion: a.securityVersion,
888
+ }, false);
889
+ },
890
+ }),
891
+ archiveCompany: defineFn({
892
+ input: { id: 'id', active: 'bool' },
893
+ output: { ok: 'bool', id: 'id?', active: 'bool?', errors: 'json?' },
894
+ effects: ['read:user.User', 'read:company.Company', 'write:company.Company'],
895
+ idempotent: true,
896
+ handler: async (ctx, a) => {
897
+ const C = ctx.table('company.Company');
898
+ const company = await ctx.db.one(from(C).where(eq(C.id, a.id)));
899
+ if (!company)
900
+ return invalid([issue('id', 'company.error.missing')]);
901
+ if (a.active === false) {
902
+ const U = ctx.table('user.User');
903
+ if (await ctx.db.one(from(U).where(eq(U.defaultCompanyId, a.id), eq(U.active, true))))
904
+ return invalid([issue('active', 'user.error.companyDefaultActive')]);
905
+ if ((await ctx.db.count(from(C).where(eq(C.active, true)))) <= 1)
906
+ return invalid([issue('active', 'company.error.lastActive')]);
907
+ }
908
+ await ctx.db.update('company.Company', { id: a.id }, { active: a.active });
909
+ return { ok: true, id: a.id, active: a.active };
910
+ },
911
+ }),
912
+ archiveBranch: defineFn({
913
+ input: { id: 'id', active: 'bool' },
914
+ output: { ok: 'bool', id: 'id?', active: 'bool?', errors: 'json?' },
915
+ effects: ['read:user.User', 'read:company.Company', 'read:company.Branch', 'write:company.Branch'],
916
+ idempotent: true,
917
+ handler: async (ctx, a) => {
918
+ const B = ctx.table('company.Branch');
919
+ const branch = await ctx.db.one(from(B).where(eq(B.id, a.id)));
920
+ if (!branch)
921
+ return invalid([issue('id', 'company.error.branchMissing')]);
922
+ if (a.active === false) {
923
+ if (branch.rootKey)
924
+ return invalid([issue('active', 'company.error.rootArchive')]);
925
+ const U = ctx.table('user.User');
926
+ if (await ctx.db.one(from(U).where(eq(U.defaultBranchId, a.id), eq(U.active, true))))
927
+ return invalid([issue('active', 'user.error.branchDefaultActive')]);
928
+ const active = await ctx.db.count(from(B).where(eq(B.companyId, branch.companyId), eq(B.active, true)));
929
+ if (active <= 1)
930
+ return invalid([issue('active', 'company.error.lastBranch')]);
931
+ }
932
+ else {
933
+ const C = ctx.table('company.Company');
934
+ if (!(await ctx.db.one(from(C).where(eq(C.id, branch.companyId), eq(C.active, true)))))
935
+ return invalid([issue('active', 'user.error.branchCompanyArchived')]);
936
+ }
937
+ await ctx.db.update('company.Branch', { id: a.id }, { active: a.active });
938
+ return { ok: true, id: a.id, active: a.active };
939
+ },
940
+ }),
941
+ issueAuthToken: defineFn({
942
+ exposure: 'internal',
943
+ input: { userId: 'id', kind: 'text', realm: 'text?' },
944
+ output: { ok: 'bool', token: 'text?', expiresAt: 'datetime?', errors: 'json?' },
945
+ effects: ['read:user.User', 'read:user.AuthToken', 'write:user.AuthToken'],
946
+ handler: async (ctx, a) => {
947
+ const kind = String(a.kind);
948
+ if (!['invitation', 'reset'].includes(kind))
949
+ return invalid([issue('kind', 'user.error.tokenKind')]);
950
+ const U = ctx.table('user.User');
951
+ const user = await ctx.db.one(from(U).where(eq(U.id, a.userId), eq(U.active, true)));
952
+ if (!user)
953
+ return invalid([issue('userId', 'user.error.userMissing')]);
954
+ const token = randomBytes(32).toString('base64url');
955
+ const at = Date.now();
956
+ const expiresAt = new Date(at + (kind === 'invitation' ? 144 : 4) * 60 * 60_000).toISOString();
957
+ const id = `auth:${a.userId}:${kind}`;
958
+ const values = {
959
+ userId: a.userId,
960
+ kind,
961
+ realm: String(a.realm ?? 'backend'),
962
+ digest: digest(token),
963
+ securityVersion: Number(user.securityVersion ?? 0),
964
+ expiresAt,
965
+ consumedAt: null,
966
+ createdAt: new Date(at).toISOString(),
967
+ };
968
+ const inserted = await ctx.db.insertIfAbsent('user.AuthToken', { id, ...values });
969
+ if (!('dryRun' in inserted) && !inserted.inserted)
970
+ await ctx.db.update('user.AuthToken', { id }, values);
971
+ return { ok: true, token, expiresAt };
972
+ },
973
+ }),
974
+ consumeAuthToken: defineFn({
975
+ exposure: 'internal',
976
+ anonymous: true,
977
+ input: { token: 'text', kind: 'text', realm: 'text?', password: 'text' },
978
+ output: { ok: 'bool', userId: 'id?', errors: 'json?' },
979
+ effects: [
980
+ 'read:user.AuthToken',
981
+ 'write:user.AuthToken',
982
+ 'read:user.User',
983
+ 'write:user.User',
984
+ 'write:user.SecurityAudit',
985
+ ],
986
+ handler: async (ctx, a) => {
987
+ if (String(a.password).length < 8)
988
+ return invalid([issue('password', 'user.error.passwordLength')]);
989
+ const T = ctx.table('user.AuthToken');
990
+ const row = await ctx.db.one(from(T).where(eq(T.digest, digest(String(a.token)))));
991
+ const realm = String(a.realm ?? 'backend');
992
+ if (!row ||
993
+ row.kind !== a.kind ||
994
+ row.realm !== realm ||
995
+ row.consumedAt ||
996
+ timestampMs(row.expiresAt) <= Date.now())
997
+ return invalid([issue('token', 'user.error.tokenInvalid')]);
998
+ const U = ctx.table('user.User');
999
+ const user = await ctx.db.one(from(U).where(eq(U.id, row.userId), eq(U.active, true)));
1000
+ if (!user || Number(user.securityVersion ?? 0) !== Number(row.securityVersion))
1001
+ return invalid([issue('token', 'user.error.tokenInvalid')]);
1002
+ const passwordHash = await hashPassword(String(a.password));
1003
+ const consumedAt = nowIso();
1004
+ try {
1005
+ return await ctx.tx(async (tx) => {
1006
+ const claimed = await tx.db.compareAndSet('user.AuthToken', { id: row.id }, { digest: row.digest, consumedAt: null, securityVersion: row.securityVersion }, { consumedAt });
1007
+ if (!('dryRun' in claimed) && !claimed.matched)
1008
+ return invalid([issue('token', 'user.error.tokenInvalid')]);
1009
+ const securityVersion = Number(user.securityVersion ?? 0) + 1;
1010
+ const updated = await tx.db.compareAndSet('user.User', { id: user.id }, { active: true, securityVersion: user.securityVersion }, { passwordHash, securityVersion });
1011
+ if (!('dryRun' in updated) && !updated.matched)
1012
+ throw new TokenClaimRace();
1013
+ await audit(tx, a.kind === 'invitation' ? 'invitation.accept' : 'password.reset', user.id);
1014
+ return { ok: true, userId: user.id };
1015
+ });
1016
+ }
1017
+ catch (error) {
1018
+ if (error instanceof TokenClaimRace)
1019
+ return invalid([issue('token', 'user.error.tokenInvalid')]);
1020
+ throw error;
1021
+ }
1022
+ },
1023
+ }),
1024
+ recordSecurityEvent: defineFn({
1025
+ exposure: 'internal',
1026
+ anonymous: true,
1027
+ input: { event: 'text', userId: 'id?', networkFingerprint: 'text?', metadata: 'json?' },
1028
+ output: { ok: 'bool' },
1029
+ effects: ['read:user.User', 'write:user.SecurityAudit'],
1030
+ handler: async (ctx, a) => {
1031
+ if (a.userId && ctx.actor && ctx.actor !== a.userId && !(await superuser(ctx, ctx.actor)))
1032
+ return { ok: false };
1033
+ await audit(ctx, String(a.event), a.userId, a.networkFingerprint, a.metadata ?? undefined);
1034
+ return { ok: true };
1035
+ },
1036
+ }),
1037
+ listSecurityAudit: defineFn({
1038
+ input: { userId: 'id?' },
1039
+ output: {
1040
+ id: 'id',
1041
+ userId: 'id?',
1042
+ event: 'text',
1043
+ occurredAt: 'datetime',
1044
+ networkFingerprint: 'text?',
1045
+ metadata: 'json?',
1046
+ },
1047
+ effects: ['read:user.SecurityAudit'],
1048
+ handler: (ctx, a) => {
1049
+ const A = ctx.table('user.SecurityAudit');
1050
+ let q = from(A).orderBy(asc(A.occurredAt));
1051
+ if (a.userId)
1052
+ q = q.where(eq(A.userId, a.userId));
1053
+ return ctx.db.all(q);
1054
+ },
1055
+ }),
1056
+ archiveUser: defineFn({
1057
+ input: { id: 'id', active: 'bool' },
1058
+ output: { ok: 'bool', id: 'id?', active: 'bool?', securityVersion: 'int?', errors: 'json?' },
1059
+ effects: [
1060
+ 'read:user.User',
1061
+ 'write:user.User',
1062
+ 'write:user.SecurityAudit',
1063
+ 'read:user.SecurityGuard',
1064
+ 'write:user.SecurityGuard',
1065
+ ],
1066
+ idempotent: true,
1067
+ handler: async (ctx, a) => {
1068
+ const U = ctx.table('user.User');
1069
+ const row = await ctx.db.one(from(U).where(eq(U.id, a.id)));
1070
+ if (!row)
1071
+ return invalid([issue('id', 'user.error.userMissing')]);
1072
+ const update = async (writeCtx, held) => {
1073
+ const securityVersion = Number(held.securityVersion ?? 0) + (held.active === a.active ? 0 : 1);
1074
+ await writeCtx.db.update('user.User', { id: a.id }, { active: a.active, securityVersion });
1075
+ if (held.active !== a.active)
1076
+ await audit(writeCtx, a.active ? 'user.restore' : 'user.archive', a.id);
1077
+ return { ok: true, id: a.id, active: a.active, securityVersion };
1078
+ };
1079
+ if (!(a.active === false && row.active === true && row.superuser === true))
1080
+ return update(ctx, row);
1081
+ return ctx.tx(async (tx) => {
1082
+ await lockLastSuperuser(tx);
1083
+ const U2 = tx.table('user.User');
1084
+ const held = await tx.db.one(from(U2).where(eq(U2.id, a.id)));
1085
+ if (!held)
1086
+ return invalid([issue('id', 'user.error.userMissing')]);
1087
+ if (held.active === true && held.superuser === true && (await liveSuperusers(tx)) <= 1)
1088
+ return invalid([issue('active', 'user.error.lastSuperuser')]);
1089
+ return update(tx, held);
1090
+ });
1091
+ },
1092
+ }),
1093
+ };
1094
+ //# sourceMappingURL=functions.js.map