@quan-erp/base-frontend 1.0.0

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 (324) hide show
  1. package/LICENSE.md +49 -0
  2. package/README.md +80 -0
  3. package/dist-export/api/ai-assistant/ai-assistant.api.d.ts +14 -0
  4. package/dist-export/api/ai-assistant/ai-assistant.api.d.ts.map +1 -0
  5. package/dist-export/api/ai-assistant/ai-assistant.api.js +93 -0
  6. package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts +54 -0
  7. package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts.map +1 -0
  8. package/dist-export/api/ai-assistant/ai-assistant.dto.js +4 -0
  9. package/dist-export/api/ai-assistant/ai-assistant.export.d.ts +7 -0
  10. package/dist-export/api/ai-assistant/ai-assistant.export.d.ts.map +1 -0
  11. package/dist-export/api/ai-assistant/ai-assistant.export.js +7 -0
  12. package/dist-export/api/ai-model/ai-model.api.d.ts +37 -0
  13. package/dist-export/api/ai-model/ai-model.api.d.ts.map +1 -0
  14. package/dist-export/api/ai-model/ai-model.api.js +80 -0
  15. package/dist-export/api/ai-tool/ai-tool.dto.d.ts +26 -0
  16. package/dist-export/api/ai-tool/ai-tool.dto.d.ts.map +1 -0
  17. package/dist-export/api/ai-tool/ai-tool.dto.js +1 -0
  18. package/dist-export/api/branch/branch.export.d.ts +11 -0
  19. package/dist-export/api/branch/branch.export.d.ts.map +1 -0
  20. package/dist-export/api/branch/branch.export.js +12 -0
  21. package/dist-export/api/branch/branch.type.d.ts +46 -0
  22. package/dist-export/api/branch/branch.type.d.ts.map +1 -0
  23. package/dist-export/api/branch/branch.type.js +44 -0
  24. package/dist-export/api/change-log/change-log.dto.d.ts +41 -0
  25. package/dist-export/api/change-log/change-log.dto.d.ts.map +1 -0
  26. package/dist-export/api/change-log/change-log.dto.js +1 -0
  27. package/dist-export/api/change-log/change-log.export.d.ts +39 -0
  28. package/dist-export/api/change-log/change-log.export.d.ts.map +1 -0
  29. package/dist-export/api/change-log/change-log.export.js +18 -0
  30. package/dist-export/api/currency/currency.export.d.ts +17 -0
  31. package/dist-export/api/currency/currency.export.d.ts.map +1 -0
  32. package/dist-export/api/currency/currency.export.js +12 -0
  33. package/dist-export/api/currency/currency.type.d.ts +21 -0
  34. package/dist-export/api/currency/currency.type.d.ts.map +1 -0
  35. package/dist-export/api/currency/currency.type.js +1 -0
  36. package/dist-export/api/currency-exchange/currency-exchange.export.d.ts +11 -0
  37. package/dist-export/api/currency-exchange/currency-exchange.export.d.ts.map +1 -0
  38. package/dist-export/api/currency-exchange/currency-exchange.export.js +12 -0
  39. package/dist-export/api/currency-exchange/currency-exchange.type.d.ts +33 -0
  40. package/dist-export/api/currency-exchange/currency-exchange.type.d.ts.map +1 -0
  41. package/dist-export/api/currency-exchange/currency-exchange.type.js +1 -0
  42. package/dist-export/api/file/file.export.d.ts +14 -0
  43. package/dist-export/api/file/file.export.d.ts.map +1 -0
  44. package/dist-export/api/file/file.export.js +12 -0
  45. package/dist-export/api/file/file.type.d.ts +39 -0
  46. package/dist-export/api/file/file.type.d.ts.map +1 -0
  47. package/dist-export/api/file/file.type.js +10 -0
  48. package/dist-export/api/firebase/firebase.d.ts +4 -0
  49. package/dist-export/api/firebase/firebase.d.ts.map +1 -0
  50. package/dist-export/api/firebase/firebase.dto.d.ts +7 -0
  51. package/dist-export/api/firebase/firebase.dto.d.ts.map +1 -0
  52. package/dist-export/api/firebase/firebase.dto.js +1 -0
  53. package/dist-export/api/firebase/firebase.export.d.ts +2 -0
  54. package/dist-export/api/firebase/firebase.export.d.ts.map +1 -0
  55. package/dist-export/api/firebase/firebase.export.js +1 -0
  56. package/dist-export/api/firebase/firebase.js +35 -0
  57. package/dist-export/api/location/location.dto.d.ts +28 -0
  58. package/dist-export/api/location/location.dto.d.ts.map +1 -0
  59. package/dist-export/api/location/location.dto.js +27 -0
  60. package/dist-export/api/location/location.export.d.ts +26 -0
  61. package/dist-export/api/location/location.export.d.ts.map +1 -0
  62. package/dist-export/api/location/location.export.js +16 -0
  63. package/dist-export/api/notification/notification.api.d.ts +9 -0
  64. package/dist-export/api/notification/notification.api.d.ts.map +1 -0
  65. package/dist-export/api/notification/notification.api.js +45 -0
  66. package/dist-export/api/notification/notification.export.d.ts +6 -0
  67. package/dist-export/api/notification/notification.export.d.ts.map +1 -0
  68. package/dist-export/api/notification/notification.export.js +13 -0
  69. package/dist-export/api/notification/notification.store.d.ts +8 -0
  70. package/dist-export/api/notification/notification.store.d.ts.map +1 -0
  71. package/dist-export/api/notification/notification.store.js +46 -0
  72. package/dist-export/api/notification/notification.type.d.ts +48 -0
  73. package/dist-export/api/notification/notification.type.d.ts.map +1 -0
  74. package/dist-export/api/notification/notification.type.js +1 -0
  75. package/dist-export/api/partner/partner.export.d.ts +15 -0
  76. package/dist-export/api/partner/partner.export.d.ts.map +1 -0
  77. package/dist-export/api/partner/partner.export.js +12 -0
  78. package/dist-export/api/partner/partner.type.d.ts +41 -0
  79. package/dist-export/api/partner/partner.type.d.ts.map +1 -0
  80. package/dist-export/api/partner/partner.type.js +1 -0
  81. package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts +18 -0
  82. package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts.map +1 -0
  83. package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.js +13 -0
  84. package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts +38 -0
  85. package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts.map +1 -0
  86. package/dist-export/api/partner-shipping-address/partner-shipping-address.type.js +36 -0
  87. package/dist-export/api/permission/permission.export.d.ts +8 -0
  88. package/dist-export/api/permission/permission.export.d.ts.map +1 -0
  89. package/dist-export/api/permission/permission.export.js +10 -0
  90. package/dist-export/api/permission/permission.lib.d.ts +5 -0
  91. package/dist-export/api/permission/permission.lib.d.ts.map +1 -0
  92. package/dist-export/api/permission/permission.lib.js +24 -0
  93. package/dist-export/api/permission/permission.type.d.ts +32 -0
  94. package/dist-export/api/permission/permission.type.d.ts.map +1 -0
  95. package/dist-export/api/permission/permission.type.js +1 -0
  96. package/dist-export/api/role-permission/role-permission.api.d.ts +25 -0
  97. package/dist-export/api/role-permission/role-permission.api.d.ts.map +1 -0
  98. package/dist-export/api/role-permission/role-permission.api.js +71 -0
  99. package/dist-export/api/role-permission/role-permission.dto.d.ts +6 -0
  100. package/dist-export/api/role-permission/role-permission.dto.d.ts.map +1 -0
  101. package/dist-export/api/role-permission/role-permission.dto.js +1 -0
  102. package/dist-export/api/role-permission/role-permission.export.d.ts +11 -0
  103. package/dist-export/api/role-permission/role-permission.export.d.ts.map +1 -0
  104. package/dist-export/api/role-permission/role-permission.export.js +9 -0
  105. package/dist-export/api/setting/setting.api.d.ts +14 -0
  106. package/dist-export/api/setting/setting.api.d.ts.map +1 -0
  107. package/dist-export/api/setting/setting.api.js +70 -0
  108. package/dist-export/api/setting/setting.export.d.ts +36 -0
  109. package/dist-export/api/setting/setting.export.d.ts.map +1 -0
  110. package/dist-export/api/setting/setting.export.js +17 -0
  111. package/dist-export/api/setting/setting.store.d.ts +11 -0
  112. package/dist-export/api/setting/setting.store.d.ts.map +1 -0
  113. package/dist-export/api/setting/setting.store.js +36 -0
  114. package/dist-export/api/setting/setting.type.d.ts +44 -0
  115. package/dist-export/api/setting/setting.type.d.ts.map +1 -0
  116. package/dist-export/api/setting/setting.type.js +27 -0
  117. package/dist-export/api/tag/tag.api.d.ts +10 -0
  118. package/dist-export/api/tag/tag.api.d.ts.map +1 -0
  119. package/dist-export/api/tag/tag.api.js +60 -0
  120. package/dist-export/api/tag/tag.dto.d.ts +8 -0
  121. package/dist-export/api/tag/tag.dto.d.ts.map +1 -0
  122. package/dist-export/api/tag/tag.dto.js +1 -0
  123. package/dist-export/api/tag/tag.export.d.ts +10 -0
  124. package/dist-export/api/tag/tag.export.d.ts.map +1 -0
  125. package/dist-export/api/tag/tag.export.js +13 -0
  126. package/dist-export/api/unit/uoc.export.d.ts +11 -0
  127. package/dist-export/api/unit/uoc.export.d.ts.map +1 -0
  128. package/dist-export/api/unit/uoc.export.js +13 -0
  129. package/dist-export/api/unit/uoc.type.d.ts +11 -0
  130. package/dist-export/api/unit/uoc.type.d.ts.map +1 -0
  131. package/dist-export/api/unit/uoc.type.js +1 -0
  132. package/dist-export/api/unit/uom.export.d.ts +14 -0
  133. package/dist-export/api/unit/uom.export.d.ts.map +1 -0
  134. package/dist-export/api/unit/uom.export.js +16 -0
  135. package/dist-export/api/unit/uom.type.d.ts +30 -0
  136. package/dist-export/api/unit/uom.type.d.ts.map +1 -0
  137. package/dist-export/api/unit/uom.type.js +1 -0
  138. package/dist-export/api/user/user.api.d.ts +28 -0
  139. package/dist-export/api/user/user.api.d.ts.map +1 -0
  140. package/dist-export/api/user/user.api.js +138 -0
  141. package/dist-export/api/user/user.export.d.ts +11 -0
  142. package/dist-export/api/user/user.export.d.ts.map +1 -0
  143. package/dist-export/api/user/user.export.js +12 -0
  144. package/dist-export/api/user/user.type.d.ts +49 -0
  145. package/dist-export/api/user/user.type.d.ts.map +1 -0
  146. package/dist-export/api/user/user.type.js +20 -0
  147. package/dist-export/api/workflow/workflow.export.d.ts +41 -0
  148. package/dist-export/api/workflow/workflow.export.d.ts.map +1 -0
  149. package/dist-export/api/workflow/workflow.export.js +19 -0
  150. package/dist-export/api/workflow/workflow.type.d.ts +210 -0
  151. package/dist-export/api/workflow/workflow.type.d.ts.map +1 -0
  152. package/dist-export/api/workflow/workflow.type.js +11 -0
  153. package/dist-export/components/change-log/change-log.export.d.ts +9 -0
  154. package/dist-export/components/change-log/change-log.export.d.ts.map +1 -0
  155. package/dist-export/components/change-log/change-log.export.js +6 -0
  156. package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts +4 -0
  157. package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts.map +1 -0
  158. package/dist-export/components/home-shortcut-item/home-shortcut-item.export.js +6 -0
  159. package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts +5 -0
  160. package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts.map +1 -0
  161. package/dist-export/components/home-shortcut-item/home-shortcut-item.type.js +1 -0
  162. package/dist-export/components/location/location.export.d.ts +8 -0
  163. package/dist-export/components/location/location.export.d.ts.map +1 -0
  164. package/dist-export/components/location/location.export.js +16 -0
  165. package/dist-export/components/location/location.type.d.ts +62 -0
  166. package/dist-export/components/location/location.type.d.ts.map +1 -0
  167. package/dist-export/components/location/location.type.js +1 -0
  168. package/dist-export/components/sportlight-search/sportlight-search.export.d.ts +15 -0
  169. package/dist-export/components/sportlight-search/sportlight-search.export.d.ts.map +1 -0
  170. package/dist-export/components/sportlight-search/sportlight-search.export.js +11 -0
  171. package/dist-export/components/sportlight-search/sportlight-search.type.d.ts +23 -0
  172. package/dist-export/components/sportlight-search/sportlight-search.type.d.ts.map +1 -0
  173. package/dist-export/components/sportlight-search/sportlight-search.type.js +5 -0
  174. package/dist-export/components/tag/tag.dropdown.d.ts +13 -0
  175. package/dist-export/components/tag/tag.dropdown.d.ts.map +1 -0
  176. package/dist-export/components/tag/tag.dropdown.export.d.ts +5 -0
  177. package/dist-export/components/tag/tag.dropdown.export.d.ts.map +1 -0
  178. package/dist-export/components/tag/tag.dropdown.export.js +6 -0
  179. package/dist-export/components/tag/tag.dropdown.js +84 -0
  180. package/dist-export/dto/base.dto.d.ts +6 -0
  181. package/dist-export/dto/base.dto.d.ts.map +1 -0
  182. package/dist-export/dto/base.dto.js +1 -0
  183. package/dist-export/export/export-dashboard.d.ts +5 -0
  184. package/dist-export/export/export-dashboard.d.ts.map +1 -0
  185. package/dist-export/export/export-dashboard.js +7 -0
  186. package/dist-export/export/export-env.d.ts +5 -0
  187. package/dist-export/export/export-env.d.ts.map +1 -0
  188. package/dist-export/export/export-env.js +5 -0
  189. package/dist-export/export/export-navigate.d.ts +3 -0
  190. package/dist-export/export/export-navigate.d.ts.map +1 -0
  191. package/dist-export/export/export-navigate.js +7 -0
  192. package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts +3 -0
  193. package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts.map +1 -0
  194. package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.js +6 -0
  195. package/dist-export/export/index.d.ts +6 -0
  196. package/dist-export/export/index.d.ts.map +1 -0
  197. package/dist-export/export/index.js +5 -0
  198. package/dist-export/export.d.ts +131 -0
  199. package/dist-export/export.d.ts.map +1 -0
  200. package/dist-export/export.js +143 -0
  201. package/dist-export/locale/locale.export.d.ts +7 -0
  202. package/dist-export/locale/locale.export.d.ts.map +1 -0
  203. package/dist-export/locale/locale.export.js +9 -0
  204. package/dist-export/locale/locales/en-US.json +145 -0
  205. package/dist-export/locale/locales/my-MM.json +145 -0
  206. package/dist-export/locale/locales/zh-CN.json +145 -0
  207. package/dist-export/page/ai-assistant/ai-assistant.export.d.ts +5 -0
  208. package/dist-export/page/ai-assistant/ai-assistant.export.d.ts.map +1 -0
  209. package/dist-export/page/ai-assistant/ai-assistant.export.js +6 -0
  210. package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts +7 -0
  211. package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts.map +1 -0
  212. package/dist-export/page/ai-assistant/ai-assistant.locale.js +9 -0
  213. package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts +16 -0
  214. package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts.map +1 -0
  215. package/dist-export/page/ai-assistant/component/assistant.dropdown.js +50 -0
  216. package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts +9 -0
  217. package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts.map +1 -0
  218. package/dist-export/page/ai-assistant/component/icon-park-icon.js +11 -0
  219. package/dist-export/page/ai-assistant/locales/en-US.json +92 -0
  220. package/dist-export/page/ai-assistant/locales/my-MM.json +91 -0
  221. package/dist-export/page/ai-assistant/locales/zh-CN.json +91 -0
  222. package/dist-export/page/branch/branch.export.d.ts +4 -0
  223. package/dist-export/page/branch/branch.export.d.ts.map +1 -0
  224. package/dist-export/page/branch/branch.export.js +6 -0
  225. package/dist-export/page/branch/branch.types.d.ts +14 -0
  226. package/dist-export/page/branch/branch.types.d.ts.map +1 -0
  227. package/dist-export/page/branch/branch.types.js +1 -0
  228. package/dist-export/page/currency/currency.export.d.ts +6 -0
  229. package/dist-export/page/currency/currency.export.d.ts.map +1 -0
  230. package/dist-export/page/currency/currency.export.js +9 -0
  231. package/dist-export/page/currency/currency.type.d.ts +25 -0
  232. package/dist-export/page/currency/currency.type.d.ts.map +1 -0
  233. package/dist-export/page/currency/currency.type.js +1 -0
  234. package/dist-export/page/partner/partner.export.d.ts +4 -0
  235. package/dist-export/page/partner/partner.export.d.ts.map +1 -0
  236. package/dist-export/page/partner/partner.export.js +6 -0
  237. package/dist-export/page/partner/partner.types.d.ts +15 -0
  238. package/dist-export/page/partner/partner.types.d.ts.map +1 -0
  239. package/dist-export/page/partner/partner.types.js +1 -0
  240. package/dist-export/page/uoc/uoc.export.d.ts +5 -0
  241. package/dist-export/page/uoc/uoc.export.d.ts.map +1 -0
  242. package/dist-export/page/uoc/uoc.export.js +9 -0
  243. package/dist-export/page/uoc/uoc.types.d.ts +25 -0
  244. package/dist-export/page/uoc/uoc.types.d.ts.map +1 -0
  245. package/dist-export/page/uoc/uoc.types.js +1 -0
  246. package/dist-export/page/user/user.export.d.ts +4 -0
  247. package/dist-export/page/user/user.export.d.ts.map +1 -0
  248. package/dist-export/page/user/user.export.js +6 -0
  249. package/dist-export/page/user/user.types.d.ts +14 -0
  250. package/dist-export/page/user/user.types.d.ts.map +1 -0
  251. package/dist-export/page/user/user.types.js +1 -0
  252. package/dist-export/plugin/app-state.d.ts +5 -0
  253. package/dist-export/plugin/app-state.d.ts.map +1 -0
  254. package/dist-export/plugin/app-state.js +157 -0
  255. package/dist-export/plugin/export.d.ts +3 -0
  256. package/dist-export/plugin/export.d.ts.map +1 -0
  257. package/dist-export/plugin/export.js +7 -0
  258. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts +6 -0
  259. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts.map +1 -0
  260. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.js +6 -0
  261. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts +8 -0
  262. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts.map +1 -0
  263. package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.js +1 -0
  264. package/dist-export/store/dto.d.ts +10 -0
  265. package/dist-export/store/dto.d.ts.map +1 -0
  266. package/dist-export/store/dto.js +11 -0
  267. package/dist-export/store/home-shortcut/home-shortcut.export.d.ts +7 -0
  268. package/dist-export/store/home-shortcut/home-shortcut.export.d.ts.map +1 -0
  269. package/dist-export/store/home-shortcut/home-shortcut.export.js +9 -0
  270. package/dist-export/store/home-shortcut/home-shortcut.type.d.ts +20 -0
  271. package/dist-export/store/home-shortcut/home-shortcut.type.d.ts.map +1 -0
  272. package/dist-export/store/home-shortcut/home-shortcut.type.js +1 -0
  273. package/dist-export/store/nav-menu/nav-menu.export.d.ts +6 -0
  274. package/dist-export/store/nav-menu/nav-menu.export.d.ts.map +1 -0
  275. package/dist-export/store/nav-menu/nav-menu.export.js +6 -0
  276. package/dist-export/store/nav-menu/nav-menu.type.d.ts +46 -0
  277. package/dist-export/store/nav-menu/nav-menu.type.d.ts.map +1 -0
  278. package/dist-export/store/nav-menu/nav-menu.type.js +1 -0
  279. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts +3 -0
  280. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts.map +1 -0
  281. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.js +6 -0
  282. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts +14 -0
  283. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts.map +1 -0
  284. package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.js +1 -0
  285. package/dist-export/store/permission-template/permission-template.export.d.ts +7 -0
  286. package/dist-export/store/permission-template/permission-template.export.d.ts.map +1 -0
  287. package/dist-export/store/permission-template/permission-template.export.js +9 -0
  288. package/dist-export/store/permission-template/permission-template.type.d.ts +13 -0
  289. package/dist-export/store/permission-template/permission-template.type.d.ts.map +1 -0
  290. package/dist-export/store/permission-template/permission-template.type.js +1 -0
  291. package/dist-export/store/root-component-store/root-component.export.d.ts +6 -0
  292. package/dist-export/store/root-component-store/root-component.export.d.ts.map +1 -0
  293. package/dist-export/store/root-component-store/root-component.export.js +9 -0
  294. package/dist-export/store/root-component-store/root-component.type.d.ts +7 -0
  295. package/dist-export/store/root-component-store/root-component.type.d.ts.map +1 -0
  296. package/dist-export/store/root-component-store/root-component.type.js +1 -0
  297. package/dist-export/store/web-env/web-env.export.d.ts +6 -0
  298. package/dist-export/store/web-env/web-env.export.d.ts.map +1 -0
  299. package/dist-export/store/web-env/web-env.export.js +9 -0
  300. package/dist-export/store/web-env/web-env.store.d.ts +6 -0
  301. package/dist-export/store/web-env/web-env.store.d.ts.map +1 -0
  302. package/dist-export/store/web-env/web-env.store.js +16 -0
  303. package/dist-export/store/web-env/web-env.type.d.ts +16 -0
  304. package/dist-export/store/web-env/web-env.type.d.ts.map +1 -0
  305. package/dist-export/store/web-env/web-env.type.js +1 -0
  306. package/dist-export/utils/axios-client.d.ts +5 -0
  307. package/dist-export/utils/axios-client.d.ts.map +1 -0
  308. package/dist-export/utils/axios-client.js +84 -0
  309. package/dist-export/utils/common.d.ts +6 -0
  310. package/dist-export/utils/common.d.ts.map +1 -0
  311. package/dist-export/utils/common.js +5 -0
  312. package/dist-export/utils/index.d.ts +3 -0
  313. package/dist-export/utils/index.d.ts.map +1 -0
  314. package/dist-export/utils/index.js +2 -0
  315. package/dist-export/utils/pagination.d.ts +11 -0
  316. package/dist-export/utils/pagination.d.ts.map +1 -0
  317. package/dist-export/utils/pagination.js +6 -0
  318. package/dist-export/utils/react-query-indexed-db-persister.d.ts +7 -0
  319. package/dist-export/utils/react-query-indexed-db-persister.d.ts.map +1 -0
  320. package/dist-export/utils/react-query-indexed-db-persister.js +21 -0
  321. package/dist-export/utils/types.utils.d.ts +2 -0
  322. package/dist-export/utils/types.utils.d.ts.map +1 -0
  323. package/dist-export/utils/types.utils.js +1 -0
  324. package/package.json +182 -0
package/LICENSE.md ADDED
@@ -0,0 +1,49 @@
1
+ # QuarkERP License
2
+
3
+ **Copyright (c) 2026 The Paradance. All rights reserved.**
4
+
5
+ This software is owned by **The Paradance** and is actively maintained and developed by **Jian Shang Quan**.
6
+
7
+ This QuarkERP License (the "License") governs use of this software and its associated source code, binaries, types, documentation, and assets (the "Software").
8
+
9
+ By installing, importing, or otherwise using the Software, you agree to this License.
10
+
11
+ ---
12
+
13
+ ## 1. Permitted use — Quark ERP plugins only
14
+
15
+ You may use the Software **only** to develop, build, test, and run **plugins for Quark ERP** (also known as Quan ERP), including:
16
+
17
+ - Importing the published npm packages as dependencies of a Quark ERP plugin
18
+ - Calling the public APIs, types, and UI components exposed by those packages
19
+ - Shipping a plugin that runs on a licensed Quark ERP host
20
+
21
+ Your plugin's own original code remains yours. This License does not transfer ownership of the Software.
22
+
23
+ ---
24
+
25
+ ## 2. Prohibited use
26
+
27
+ You may **not**:
28
+
29
+ - Copy, fork, or redistribute the Software (source or compiled) except as an npm dependency of a Quark ERP plugin
30
+ - Use the Software as the core, framework, or design system of any product that is not a Quark ERP plugin
31
+ - Reuse, rebrand, sublicense, or sell the Software for any other purpose
32
+ - Create a competing ERP, plugin platform, UI kit, or backend framework from the Software
33
+ - Remove or obscure copyright, license, or proprietary notices
34
+
35
+ ---
36
+
37
+ ## 3. No transfer of ownership
38
+
39
+ The Software is licensed, not sold. Copyright, title, and all intellectual property rights remain with **The Paradance**. The Software is actively maintained and developed by **Jian Shang Quan**.
40
+
41
+ ---
42
+
43
+ ## 4. No warranty
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE PARADANCE OR JIAN SHANG QUAN BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM USE OF THE SOFTWARE.
46
+
47
+ ---
48
+
49
+ *QuarkERP License — The Paradance. For inquiries, contact Jian Shang Quan.*
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Quan ERP Frontend Base (App Shell)
2
+
3
+ The "Kernel Shell" of the Quan ERP user interface. This application acts as the master orchestrator, providing the foundational layout, security context, and the dynamic engine required to mount and integrate modular frontend plugins.
4
+
5
+ ---
6
+
7
+ ## 🚀 App Shell Lifecycle
8
+
9
+ The application follows a strict bootstrapping sequence to ensure that the environment is secure and all plugins are ready before the user interacts with the UI.
10
+
11
+ 1. **Bootstrapping**: Initializes the `shared-frontend-core` HAL and security layers (global object freezing).
12
+ 2. **Initializing**: Fetches the list of installed plugins from the backend and initializes the `Plugin` metadata engine.
13
+ 3. **Loading**: Executes `Plugin.initializePlugins()`, which dynamically imports plugin entry points and registers their routes and components into the global `AppRegistry`.
14
+ 4. **Ready**: Transitions from the `Splash` screen to the protected `AppLayout`.
15
+
16
+ ---
17
+
18
+ ## 🛣️ Dynamic Routing Engine
19
+
20
+ The shell uses a recursive routing engine (`RouteApp`) to build the final application tree at runtime.
21
+
22
+ ### Master Prefix: `/app/*`
23
+ All protected content resides behind the `/app` prefix, which is gated by authentication checks.
24
+
25
+ ### Plugin Injection
26
+ Plugins do not define their own routers. Instead, they register `incomingRoutes` into the shell's registry. The shell then:
27
+ - Iterates through registered routes.
28
+ - Recursively resolves nested children.
29
+ - Injects them into the main React Router Switch alongside core system pages.
30
+
31
+ ---
32
+
33
+ ## 📂 Core Feature Portfolio
34
+
35
+ The shell provides several built-in modules that form the backbone of the ERP experience:
36
+
37
+ - **Plugin Marketplace**: Central interface for discovering, installing, and managing plugin lifecycles.
38
+ - **IAM (Identity & Access)**: Comprehensive UI for managing Users, Roles, and granular Permissions.
39
+ - **Asset Engine**: A centralized Media Manager for handling files and attachments across all plugins.
40
+ - **AI Hub**: The primary interface for the AI Chat Assistant and model configuration.
41
+ - **Audit & Tracking**: System-wide logs and user activity tracking interfaces.
42
+
43
+ ---
44
+
45
+ ## 🏛️ State & Registry Management
46
+
47
+ ### Global State (Zustand)
48
+ Managed via the `app-state.store`, tracking the system readiness (`isReady`, `isLoading`) and synchronization status with the backend.
49
+
50
+ ### The App Registry
51
+ The central clearinghouse for cross-feature integration:
52
+ - **Portals**: Allows plugins to inject UI elements (buttons, status indicators) into global zones like the Header or Sidebar.
53
+ - **Menus**: Harmonizes the sidebar navigation by merging core items with plugin-contributed navigation links.
54
+
55
+ ---
56
+
57
+ ## 📱 Cross-Platform Architecture
58
+
59
+ The shell is designed to be platform-agnostic, detecting the runtime environment via the `Platforms` utility:
60
+ - **Web**: Standard browser-based execution.
61
+ - **Mobile**: Initialized with Capacitor bridges for native hardware access.
62
+ - **Desktop**: Integrated with Electron-specific IPC and window management.
63
+
64
+ ---
65
+
66
+ ## 🛠️ Development & Debugging
67
+
68
+ When running in `DevMode`, the shell injects specialized tools:
69
+ - **API Browser**: Live Swagger/OpenAPI documentation.
70
+ - **Environment Inspector**: Real-time view of injected VITE environment variables.
71
+ - **Native API Tester**: Interface for exercising hardware bridges.
72
+
73
+ ---
74
+
75
+ > [!IMPORTANT]
76
+ > To maintain strict visual and logical isolation, all plugin content rendered within the shell MUST be wrapped in the `Page` component provided by `@quan-erp/shared-ui`.
77
+
78
+ ## License
79
+
80
+ [QuarkERP License](./LICENSE.md) — owned by The Paradance, actively maintained and developed by Jian Shang Quan. You may use this package to build Quark ERP plugins. Copying or reuse for any other purpose is not permitted.
@@ -0,0 +1,14 @@
1
+ import { type UseQueryOptions } from "@tanstack/react-query";
2
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
3
+ import type { AIAssistantDto, CreateAIAssistantDto } from "./ai-assistant.dto";
4
+ export declare const getAvailableAIAssistantApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number, option?: {
5
+ search?: string;
6
+ }) => Promise<AIAssistantDto[]>>;
7
+ export declare function useAvailableAssistantQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AIAssistantDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<AIAssistantDto[]>, Error>;
8
+ export declare const createAIAssistantApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(payload: CreateAIAssistantDto) => Promise<void>>;
9
+ export declare const updateAssistantApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(payload: CreateAIAssistantDto) => Promise<void>>;
10
+ export declare const deleteAIAssistantApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(assistantId: string) => Promise<void>>;
11
+ export declare function useCreateAIAssistantQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, CreateAIAssistantDto, unknown>;
12
+ export declare function useUpdateAIAssistantQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, CreateAIAssistantDto, unknown>;
13
+ export declare function useDeleteAIAssistantQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, string, unknown>;
14
+ //# sourceMappingURL=ai-assistant.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-assistant.api.d.ts","sourceRoot":"","sources":["../../../src/api/ai-assistant/ai-assistant.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAc,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE5F,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAoB/E,eAAO,MAAM,0BAA0B,iEAEb,MAAM,SAAS,MAAM,WAAW;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAUvG,CAAC;AAEH,wBAAgB,0BAA0B,CACtC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,oFAS3E;AA8CD,eAAO,MAAM,oBAAoB,oEAEJ,oBAAoB,KAAG,OAAO,CAAC,IAAI,CAAC,CAG/D,CAAC;AACH,eAAO,MAAM,kBAAkB,oEAEF,oBAAoB,KAAG,OAAO,CAAC,IAAI,CAAC,CAG/D,CAAC;AACH,eAAO,MAAM,oBAAoB,wEAEA,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAGrD,CAAC;AAEH,wBAAgB,yBAAyB,kGAQxC;AAID,wBAAgB,yBAAyB,kGAQxC;AAGD,wBAAgB,yBAAyB,oFAQxC"}
@@ -0,0 +1,93 @@
1
+ import { useMutation, useQuery } from "@tanstack/react-query";
2
+ import axiosClient from "../../utils/axios-client";
3
+ import { RequestDto } from "@quan-erp/shared-frontend-core";
4
+ import { queryClient } from "../../plugin/app-state";
5
+ import { DEFAULT_STALE_TIME } from "../../utils/common";
6
+ import { resolveIndexPagination } from "../../utils/pagination";
7
+ import { withApiMetadataFetchFn } from "../permission/permission.lib";
8
+ export const getAvailableAIAssistantApi = withApiMetadataFetchFn({
9
+ api: { method: 'GET', url: '/ai-assistant/available-assistants' },
10
+ fetchFn: async (skip, limit, option) => {
11
+ const response = await axiosClient.get('/ai-assistant/available-assistants', {
12
+ params: {
13
+ skip,
14
+ limit,
15
+ search: option?.search
16
+ }
17
+ });
18
+ return response.data.payload;
19
+ }
20
+ });
21
+ const AI_ASSISTANT_AVAILABLE_QUERY_KEY = 'ai-available-assistant';
22
+ export function useAvailableAssistantQuery(query = {}, option) {
23
+ const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
24
+ return useQuery({
25
+ queryFn: () => getAvailableAIAssistantApi.fetchFn(skip, pageSize, { search: search ?? undefined }),
26
+ queryKey: [AI_ASSISTANT_AVAILABLE_QUERY_KEY, currentPage, pageSize, search],
27
+ staleTime: DEFAULT_STALE_TIME,
28
+ ...(option || {}),
29
+ });
30
+ }
31
+ // export const queryAssistant = withApiMetadataFetchFn({
32
+ // api: { method: 'POST', url: '/ai-assistant' },
33
+ // fetchFn: async (query: string): Promise<{ result: string }> => {
34
+ // const response = await axiosClient.post('/ai-assistant/', new RequestDto({ query }))
35
+ // return response.data.payload
36
+ // }
37
+ // });
38
+ // export function useAIQuery() {
39
+ // return useMutation({
40
+ // mutationFn: (query: string) => queryAssistant.fetchFn(query),
41
+ // onSuccess() {
42
+ // }
43
+ // })
44
+ // }
45
+ // =======================
46
+ // Query Keys
47
+ // =======================
48
+ const AI_ASSISTANT_KEY = "ai-assistant";
49
+ export const createAIAssistantApi = withApiMetadataFetchFn({
50
+ api: { method: 'POST', url: '/ai-assistant' },
51
+ fetchFn: async (payload) => {
52
+ await axiosClient.post(`/ai-assistant/`, new RequestDto(payload));
53
+ }
54
+ });
55
+ export const updateAssistantApi = withApiMetadataFetchFn({
56
+ api: { method: 'PUT', url: '/ai-assistant' },
57
+ fetchFn: async (payload) => {
58
+ await axiosClient.put(`/ai-assistant/`, new RequestDto(payload));
59
+ }
60
+ });
61
+ export const deleteAIAssistantApi = withApiMetadataFetchFn({
62
+ api: { method: 'DELETE', url: '/ai-assistant' },
63
+ fetchFn: async (assistantId) => {
64
+ await axiosClient.delete(`/ai-assistant/?assistantId=${assistantId}`);
65
+ }
66
+ });
67
+ export function useCreateAIAssistantQuery() {
68
+ return useMutation({
69
+ mutationFn: (payload) => createAIAssistantApi.fetchFn(payload),
70
+ onSuccess: () => {
71
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_KEY] });
72
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_AVAILABLE_QUERY_KEY] });
73
+ },
74
+ });
75
+ }
76
+ export function useUpdateAIAssistantQuery() {
77
+ return useMutation({
78
+ mutationFn: (payload) => updateAssistantApi.fetchFn(payload),
79
+ onSuccess: () => {
80
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_KEY] });
81
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_AVAILABLE_QUERY_KEY] });
82
+ },
83
+ });
84
+ }
85
+ export function useDeleteAIAssistantQuery() {
86
+ return useMutation({
87
+ mutationFn: (assistantId) => deleteAIAssistantApi.fetchFn(assistantId),
88
+ onSuccess: () => {
89
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_KEY] });
90
+ queryClient.invalidateQueries({ queryKey: [AI_ASSISTANT_AVAILABLE_QUERY_KEY] });
91
+ },
92
+ });
93
+ }
@@ -0,0 +1,54 @@
1
+ import type { AIModelDto } from "../ai-model/ai-model.api";
2
+ import type { RoleDto } from "../role-permission/role-permission.dto";
3
+ import type { UserDto } from "../user/user.type";
4
+ export interface AIAssistantDto {
5
+ shortId: string;
6
+ name: string;
7
+ description: string;
8
+ icon: string;
9
+ model: AIModelDto;
10
+ tools: {
11
+ pluginName: string;
12
+ fnName: string;
13
+ }[];
14
+ allowedRoles: RoleDto[];
15
+ systemPrompt: string;
16
+ createdBy: UserDto;
17
+ }
18
+ export type AISystemPromptProps = {
19
+ identity: string;
20
+ role: string;
21
+ goals: string[];
22
+ coreMission: string;
23
+ scopeOfKnowledge: string;
24
+ scopeOfWork: string;
25
+ mandatoryRules: string;
26
+ languagePolicy: string;
27
+ responseStructure: string;
28
+ toolUsageGuidelines: string;
29
+ objective: string;
30
+ additionalInfo: string;
31
+ };
32
+ export type AISystemPromptType = string | Partial<AISystemPromptProps>;
33
+ export interface AIAssistant {
34
+ shortId: string;
35
+ name: string;
36
+ description: string;
37
+ icon: string;
38
+ tools: {
39
+ pluginName: string;
40
+ fnName: string;
41
+ }[];
42
+ memoryContextLength?: number;
43
+ internalModelName: string;
44
+ systemPrompt: AISystemPromptType | (() => AISystemPromptType | Promise<AISystemPromptType>);
45
+ }
46
+ export type CreateAIAssistantDto = {
47
+ allowedRoleId: number[];
48
+ } & AIAssistant;
49
+ export declare const AISDKAPIType: {
50
+ readonly OpenAI: "OpenAISDK";
51
+ readonly Gemini: "GeminiSDK";
52
+ };
53
+ export type AISDKAPITypeValue = typeof AISDKAPIType[keyof typeof AISDKAPIType];
54
+ //# sourceMappingURL=ai-assistant.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-assistant.dto.d.ts","sourceRoot":"","sources":["../../../src/api/ai-assistant/ai-assistant.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC/C,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAA;CACrB;AAID,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAA;CACzB,CAAA;AACD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AACtE,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,kBAAkB,GAAG,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAC/F;AAGD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAA;CAC1B,GAAG,WAAW,CAAA;AAGf,eAAO,MAAM,YAAY;;;CAGf,CAAA;AACV,MAAM,MAAM,iBAAiB,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export const AISDKAPIType = {
2
+ OpenAI: 'OpenAISDK',
3
+ Gemini: 'GeminiSDK'
4
+ };
@@ -0,0 +1,7 @@
1
+ import { type RequestIndexPaginationDto } from '@quan-erp/shared-frontend-core';
2
+ import type { AIAssistantDto } from './ai-assistant.dto';
3
+ import type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
4
+ export * from './ai-assistant.dto';
5
+ export type UseAvailableAssistantQuery = (query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AIAssistantDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<AIAssistantDto[], Error>;
6
+ export declare function useAvailableAssistantQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AIAssistantDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<AIAssistantDto[], Error>;
7
+ //# sourceMappingURL=ai-assistant.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-assistant.export.d.ts","sourceRoot":"","sources":["../../../src/api/ai-assistant/ai-assistant.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE5E,cAAc,oBAAoB,CAAA;AAGlC,MAAM,MAAM,0BAA0B,GAAG,CACrC,KAAK,CAAC,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACvE,cAAc,CAAC,cAAc,EAAE,EAAE,KAAK,CAAC,CAAA;AAC5C,wBAAgB,0BAA0B,CACtC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,2CAG3E"}
@@ -0,0 +1,7 @@
1
+ import { PluginAPI } from '@quan-erp/shared-frontend-core';
2
+ import { APINames } from '../../export';
3
+ import { BUILTIN_PLUGIN } from '../../utils/common';
4
+ export * from './ai-assistant.dto';
5
+ export function useAvailableAssistantQuery(query = {}, option) {
6
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useAvailableAssistantQuery)(query, option);
7
+ }
@@ -0,0 +1,37 @@
1
+ import { type UseQueryOptions } from "@tanstack/react-query";
2
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
3
+ import type { AISDKAPITypeValue } from "../ai-assistant/ai-assistant.dto";
4
+ import type { RoleDto } from "../role-permission/role-permission.dto";
5
+ import type { UserDto } from "../user/user.type";
6
+ export type CreateAIModelDto = {
7
+ sdkType: AISDKAPITypeValue | string;
8
+ name: string;
9
+ apiKey: string;
10
+ userId: number;
11
+ baseUrl?: string;
12
+ model: string;
13
+ allowedRoleId: number[];
14
+ };
15
+ export interface AIModelDto {
16
+ id: number;
17
+ name: string;
18
+ sdkType: string;
19
+ model: string;
20
+ baseUrl?: string;
21
+ isActive: boolean;
22
+ allowedRoles: RoleDto[];
23
+ createdBy: UserDto;
24
+ }
25
+ export declare const AI_MODELS_QUERY_KEY = "ai-models";
26
+ export declare const getAIModelsApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number) => Promise<AIModelDto[]>>;
27
+ export declare const createAIModelApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(payload: CreateAIModelDto) => Promise<void>>;
28
+ export declare const updateAIModelApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number, payload: CreateAIModelDto) => Promise<void>>;
29
+ export declare const deleteAIModelApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number) => Promise<void>>;
30
+ export declare function useAIModelsQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AIModelDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<AIModelDto[]>, Error>;
31
+ export declare function useCreateAIModelQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, CreateAIModelDto, unknown>;
32
+ export declare function useUpdateAIModelQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, {
33
+ id: number;
34
+ payload: CreateAIModelDto;
35
+ }, unknown>;
36
+ export declare function useDeleteAIModelQuery(): import("@tanstack/react-query").UseMutationResult<void, Error, number, unknown>;
37
+ //# sourceMappingURL=ai-model.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model.api.d.ts","sourceRoot":"","sources":["../../../src/api/ai-model/ai-model.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGpF,OAAO,EAAc,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAUjD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAA;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,EAAE,CAAA;CAC1B,CAAC;AAEF,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAA;CACrB;AAOD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,cAAc,iEAED,MAAM,SAAS,MAAM,KAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAIrE,CAAC;AAEH,eAAO,MAAM,gBAAgB,oEAEA,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAAC,CAG3D,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DAEL,MAAM,WAAW,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAAC,CAKvE,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DAEL,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAG5C,CAAC;AAOH,wBAAgB,gBAAgB,CAC5B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,gFASvE;AAGD,wBAAgB,qBAAqB,8FASpC;AAGD,wBAAgB,qBAAqB;QAEH,MAAM;aAAW,gBAAgB;YAOlE;AAID,wBAAgB,qBAAqB,oFASpC"}
@@ -0,0 +1,80 @@
1
+ import { useMutation, useQuery } from "@tanstack/react-query";
2
+ import axiosClient from "../../utils/axios-client";
3
+ import { queryClient } from "../../plugin/app-state";
4
+ import { RequestDto } from "@quan-erp/shared-frontend-core";
5
+ import { DEFAULT_STALE_TIME } from "../../utils/common";
6
+ import { resolveIndexPagination } from "../../utils/pagination";
7
+ import { withApiMetadataFetchFn } from "../permission/permission.lib";
8
+ // =======================
9
+ // API Functions
10
+ // =======================
11
+ export const AI_MODELS_QUERY_KEY = "ai-models";
12
+ export const getAIModelsApi = withApiMetadataFetchFn({
13
+ api: { method: 'GET', url: '/ai-models' },
14
+ fetchFn: async (skip, limit) => {
15
+ const response = await axiosClient.get(`/ai-models?skip=${skip}&limit=${limit}`);
16
+ return response.data.payload;
17
+ }
18
+ });
19
+ export const createAIModelApi = withApiMetadataFetchFn({
20
+ api: { method: 'POST', url: '/ai-models' },
21
+ fetchFn: async (payload) => {
22
+ await axiosClient.post(`/ai-models`, new RequestDto(payload));
23
+ }
24
+ });
25
+ export const updateAIModelApi = withApiMetadataFetchFn({
26
+ api: { method: 'PUT', url: '/ai-models' },
27
+ fetchFn: async (id, payload) => {
28
+ await axiosClient.put(`/ai-models`, new RequestDto(payload), {
29
+ params: { id }
30
+ });
31
+ }
32
+ });
33
+ export const deleteAIModelApi = withApiMetadataFetchFn({
34
+ api: { method: 'DELETE', url: '/ai-models' },
35
+ fetchFn: async (id) => {
36
+ await axiosClient.delete(`/ai-models?id=${id}`);
37
+ }
38
+ });
39
+ // =======================
40
+ // Hooks
41
+ // =======================
42
+ export function useAIModelsQuery(query = {}, option) {
43
+ const { currentPage, pageSize, skip } = resolveIndexPagination(query);
44
+ return useQuery({
45
+ queryKey: [AI_MODELS_QUERY_KEY, currentPage, pageSize],
46
+ queryFn: () => getAIModelsApi.fetchFn(skip, pageSize),
47
+ staleTime: DEFAULT_STALE_TIME,
48
+ ...(option || {}),
49
+ });
50
+ }
51
+ export function useCreateAIModelQuery() {
52
+ return useMutation({
53
+ mutationFn: (payload) => createAIModelApi.fetchFn(payload),
54
+ onSuccess: () => {
55
+ queryClient.invalidateQueries({
56
+ queryKey: [AI_MODELS_QUERY_KEY],
57
+ });
58
+ },
59
+ });
60
+ }
61
+ export function useUpdateAIModelQuery() {
62
+ return useMutation({
63
+ mutationFn: (props) => updateAIModelApi.fetchFn(props.id, props.payload),
64
+ onSuccess: () => {
65
+ queryClient.invalidateQueries({
66
+ queryKey: [AI_MODELS_QUERY_KEY],
67
+ });
68
+ },
69
+ });
70
+ }
71
+ export function useDeleteAIModelQuery() {
72
+ return useMutation({
73
+ mutationFn: (id) => deleteAIModelApi.fetchFn(id),
74
+ onSuccess: () => {
75
+ queryClient.invalidateQueries({
76
+ queryKey: [AI_MODELS_QUERY_KEY],
77
+ });
78
+ },
79
+ });
80
+ }
@@ -0,0 +1,26 @@
1
+ export interface AIFunctionParameters {
2
+ type: "object";
3
+ properties: Record<string, {
4
+ type: string;
5
+ description?: string;
6
+ }>;
7
+ required?: string[];
8
+ }
9
+ export interface AIFunctionDefinition {
10
+ name: string;
11
+ description: string;
12
+ parameters: AIFunctionParameters;
13
+ }
14
+ export interface AIToolDetailDto {
15
+ type: "function";
16
+ function: AIFunctionDefinition;
17
+ }
18
+ export interface AIToolDto {
19
+ pluginName: string;
20
+ toolDetail: AIToolDetailDto;
21
+ }
22
+ export interface GetAIToolsResponseDto {
23
+ success: boolean;
24
+ data: AIToolDto[];
25
+ }
26
+ //# sourceMappingURL=ai-tool.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-tool.dto.d.ts","sourceRoot":"","sources":["../../../src/api/ai-tool/ai-tool.dto.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAChB,MAAM,EACN;QACE,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CACF,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
2
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
3
+ import type { BranchDto, UpdateBranchDto } from "./branch.type";
4
+ export * from './branch.type';
5
+ export declare function useBranchQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<BranchDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<BranchDto[], Error>;
6
+ export declare function useCreateBranchQuery(): UseMutationResult<any, Error, any, unknown>;
7
+ export declare function useUpdateBranchQuery(): UseMutationResult<any, Error, {
8
+ id: number;
9
+ branch: UpdateBranchDto;
10
+ }, unknown>;
11
+ //# sourceMappingURL=branch.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.export.d.ts","sourceRoot":"","sources":["../../../src/api/branch/branch.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChE,cAAc,eAAe,CAAA;AAO7B,wBAAgB,cAAc,CAC1B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,sCAGtE;AAKD,wBAAgB,oBAAoB,gDAEnC;AAMD,wBAAgB,oBAAoB;QAD0B,MAAM;YAAU,eAAe;YAG5F"}
@@ -0,0 +1,12 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ export * from './branch.type';
4
+ export function useBranchQuery(query = {}, option) {
5
+ return PluginAPI.use('builtin', APINames.useBranchQuery)(query, option);
6
+ }
7
+ export function useCreateBranchQuery() {
8
+ return PluginAPI.use('builtin', APINames.useCreateBranchQuery)();
9
+ }
10
+ export function useUpdateBranchQuery() {
11
+ return PluginAPI.use('builtin', APINames.useUpdateBranchQuery)();
12
+ }
@@ -0,0 +1,46 @@
1
+ import type { TagDto } from "../tag/tag.dto";
2
+ export declare class BranchDto {
3
+ id: number;
4
+ name: string;
5
+ address?: string;
6
+ city?: string;
7
+ state?: string;
8
+ postalCode?: string;
9
+ country?: string;
10
+ phone?: string;
11
+ email?: string;
12
+ tags?: TagDto[];
13
+ isActive: boolean;
14
+ isDefault: boolean;
15
+ createDate: Date;
16
+ updateDate: Date;
17
+ deleteDate?: Date;
18
+ version: number;
19
+ }
20
+ export declare class CreateBranchDto {
21
+ name: string;
22
+ address?: string;
23
+ city?: string;
24
+ state?: string;
25
+ postalCode?: string;
26
+ country?: string;
27
+ phone?: string;
28
+ email?: string;
29
+ tags?: number[];
30
+ isActive: boolean;
31
+ isDefault: boolean;
32
+ }
33
+ export declare class UpdateBranchDto {
34
+ name: string;
35
+ address?: string;
36
+ city?: string;
37
+ state?: string;
38
+ postalCode?: string;
39
+ country?: string;
40
+ phone?: string;
41
+ email?: string;
42
+ tags?: number[];
43
+ isActive: boolean;
44
+ isDefault: boolean;
45
+ }
46
+ //# sourceMappingURL=branch.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.type.d.ts","sourceRoot":"","sources":["../../../src/api/branch/branch.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,SAAS;IACpB,EAAE,EAAE,MAAM,CAAC;IAEX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IAEnB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,eAAe;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,qBAAa,eAAe;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,44 @@
1
+ export class BranchDto {
2
+ id;
3
+ name;
4
+ address;
5
+ city;
6
+ state;
7
+ postalCode;
8
+ country;
9
+ phone;
10
+ email;
11
+ tags;
12
+ isActive;
13
+ isDefault;
14
+ createDate;
15
+ updateDate;
16
+ deleteDate;
17
+ version;
18
+ }
19
+ export class CreateBranchDto {
20
+ name;
21
+ address;
22
+ city;
23
+ state;
24
+ postalCode;
25
+ country;
26
+ phone;
27
+ email;
28
+ tags;
29
+ isActive;
30
+ isDefault;
31
+ }
32
+ export class UpdateBranchDto {
33
+ name;
34
+ address;
35
+ city;
36
+ state;
37
+ postalCode;
38
+ country;
39
+ phone;
40
+ email;
41
+ tags;
42
+ isActive;
43
+ isDefault;
44
+ }
@@ -0,0 +1,41 @@
1
+ import type { UserDto } from "../user/user.type";
2
+ export interface ChangeLogDto {
3
+ id: number;
4
+ message: string;
5
+ createdBy: number;
6
+ metadata: any;
7
+ isCreatedBySystem?: boolean;
8
+ pluginName: string;
9
+ referencePrefix: string;
10
+ referenceNumber: string;
11
+ replyCount: number;
12
+ }
13
+ export type CreateChangeLogDto = Omit<ChangeLogDto, 'hasReply' | 'id' | 'replyCount'> & {
14
+ replyToId?: number;
15
+ };
16
+ export interface GetChangeLogDto {
17
+ id: number;
18
+ message: string;
19
+ createdBy: UserDto;
20
+ metadata: any;
21
+ isCreatedBySystem: boolean;
22
+ pluginName: string;
23
+ referencePrefix: string;
24
+ referenceNumber: string;
25
+ replyToId?: ChangeLogDto;
26
+ createDate: string;
27
+ replyCount: number;
28
+ reactions: ChangeLogReaction[];
29
+ }
30
+ export interface ChangeLogReaction {
31
+ id: number;
32
+ createDate: string;
33
+ reaction: string;
34
+ reactBy: UserDto;
35
+ }
36
+ export interface ChangeLogReactionDto {
37
+ reaction: string;
38
+ reactBy: number;
39
+ changeLogId: number;
40
+ }
41
+ //# sourceMappingURL=change-log.dto.d.ts.map