@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-log.dto.d.ts","sourceRoot":"","sources":["../../../src/api/change-log/change-log.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACtB;AAKD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI,GAAG,YAAY,CAAC,GAAG;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAKD,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,iBAAiB,EAAE,CAAA;CACjC;AAGD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAA;CACnB;AAGD,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
2
+ import type { InfiniteData, UseInfiniteQueryResult, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
3
+ import type { ChangeLogReactionDto, GetChangeLogDto } from "./change-log.dto";
4
+ export type ChangeLogQueryDto = RequestIndexPaginationDto<string, number, number, {
5
+ pluginName: string;
6
+ referencePrefix: string;
7
+ referenceNumber: string;
8
+ parentId?: number | null;
9
+ }>;
10
+ export declare function useChangeLogQuery(query: ChangeLogQueryDto, option?: Omit<UseQueryOptions<GetChangeLogDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<GetChangeLogDto[], Error>;
11
+ export type UseInfiniteChangeLogQuery = (pluginName: string, referencePrefix: string, referenceNumber: string, limit?: number) => UseInfiniteQueryResult<InfiniteData<{
12
+ items: GetChangeLogDto[];
13
+ nextPage: number | undefined;
14
+ }, unknown>, Error>;
15
+ export declare function useInfiniteChangeLog(pluginName: string, referencePrefix: string, referenceNumber: string, limit?: number): UseInfiniteQueryResult<InfiniteData<{
16
+ items: GetChangeLogDto[];
17
+ nextPage: number | undefined;
18
+ }, unknown>, Error>;
19
+ export type UseReactChangeLogQuery = () => UseMutationResult<any, Error, ChangeLogReactionDto, unknown>;
20
+ export declare function useReactChangeLogQuery(): UseMutationResult<any, Error, ChangeLogReactionDto, unknown>;
21
+ export type UseRemoveReactChangeLogQuery = () => UseMutationResult<any, Error, number, unknown>;
22
+ export declare function useRemoveReactChangeLogQuery(): UseMutationResult<any, Error, number, unknown>;
23
+ export type ClearChangeLogCacheType = (args: {
24
+ pluginName: string;
25
+ reference: {
26
+ prefix: string;
27
+ number: string;
28
+ };
29
+ logId?: number | null;
30
+ }) => void;
31
+ export declare function clearChangeLogCache(args: {
32
+ pluginName: string;
33
+ reference: {
34
+ prefix: string;
35
+ number: string;
36
+ };
37
+ logId?: number | null;
38
+ }): void;
39
+ //# sourceMappingURL=change-log.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-log.export.d.ts","sourceRoot":"","sources":["../../../src/api/change-log/change-log.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3F,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACtI,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC,CAAC;AAMH,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,iBAAiB,EACxB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,4CAG5E;AAID,MAAM,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,sBAAsB,CAAC,YAAY,CAAC;IAClK,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,CAAA;AACnB,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;WAH9G,eAAe,EAAE;cACd,MAAM,GAAG,SAAS;oBAI/B;AAMD,MAAM,MAAM,sBAAsB,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAA;AACvG,wBAAgB,sBAAsB,iEAErC;AAMD,MAAM,MAAM,4BAA4B,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;AAC/F,wBAAgB,4BAA4B,mDAE3C;AAGD,MAAM,MAAM,uBAAuB,GAAG,CAAC,IAAI,EAAE;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,KAAK,IAAI,CAAC;AAEX,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACtC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,QAEA"}
@@ -0,0 +1,18 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { BUILTIN_PLUGIN } from "../../utils/common";
3
+ import { APINames } from "../../export";
4
+ export function useChangeLogQuery(query, option) {
5
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useChangeLogQuery)(query, option);
6
+ }
7
+ export function useInfiniteChangeLog(pluginName, referencePrefix, referenceNumber, limit) {
8
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useInfiniteChangeLog)(pluginName, referencePrefix, referenceNumber, limit);
9
+ }
10
+ export function useReactChangeLogQuery() {
11
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useReactChangeLogQuery)();
12
+ }
13
+ export function useRemoveReactChangeLogQuery() {
14
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useRemoveReactChangeLogQuery)();
15
+ }
16
+ export function clearChangeLogCache(args) {
17
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.clearChangeLogCache)(args);
18
+ }
@@ -0,0 +1,17 @@
1
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
2
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
3
+ import type { CreateCurrencyDto, CurrencyDto, UpdateCurrencyDto } from "./currency.type";
4
+ export * from './currency.type';
5
+ export type Currency = (query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<CurrencyDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<CurrencyDto[], Error>;
6
+ export declare function useCurrencyQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<CurrencyDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<CurrencyDto[], Error>;
7
+ export type UseUpdateCurrencyQuery = () => UseMutationResult<any, Error, {
8
+ id?: number;
9
+ currency: UpdateCurrencyDto;
10
+ }, unknown>;
11
+ export declare function useUpdateCurrencyQuery(): UseMutationResult<any, Error, {
12
+ id?: number;
13
+ currency: UpdateCurrencyDto;
14
+ }, unknown>;
15
+ export type UseCreateCurrencyQuery = () => UseMutationResult<any, Error, CreateCurrencyDto, unknown>;
16
+ export declare function useCreateCurrencyQuery(): UseMutationResult<any, Error, CreateCurrencyDto, unknown>;
17
+ //# sourceMappingURL=currency.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.export.d.ts","sourceRoot":"","sources":["../../../src/api/currency/currency.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,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzF,cAAc,iBAAiB,CAAC;AAGhC,MAAM,MAAM,QAAQ,GAAG,CACnB,KAAK,CAAC,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACpE,cAAc,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAA;AACzC,wBAAgB,gBAAgB,CAC5B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,wCAGxE;AAID,MAAM,MAAM,sBAAsB,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,iBAAiB,CAAC;CAC/B,EAAE,OAAO,CAAC,CAAC;AACZ,wBAAgB,sBAAsB;SAH7B,MAAM;cACD,iBAAiB;YAI9B;AAID,MAAM,MAAM,sBAAsB,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACrG,wBAAgB,sBAAsB,8DAErC"}
@@ -0,0 +1,12 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ export * from './currency.type';
4
+ export function useCurrencyQuery(query = {}, option) {
5
+ return PluginAPI.use('builtin', APINames.useCurrencyQuery)(query, option);
6
+ }
7
+ export function useUpdateCurrencyQuery() {
8
+ return PluginAPI.use('builtin', APINames.useUpdateCurrencyQuery)();
9
+ }
10
+ export function useCreateCurrencyQuery() {
11
+ return PluginAPI.use('builtin', APINames.useCreateCurrencyQuery)();
12
+ }
@@ -0,0 +1,21 @@
1
+ import type { BaseDto } from "../../dto/base.dto";
2
+ export interface CreateCurrencyDto {
3
+ currency: string;
4
+ symbol: string;
5
+ code: string;
6
+ decimalPlace: number;
7
+ }
8
+ export interface UpdateCurrencyDto {
9
+ currency: string;
10
+ symbol: string;
11
+ code: string;
12
+ decimalPlace: number;
13
+ }
14
+ export interface CurrencyDto extends BaseDto {
15
+ id: number;
16
+ currency: string;
17
+ symbol: string;
18
+ code: string;
19
+ decimalPlace: number;
20
+ }
21
+ //# sourceMappingURL=currency.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.type.d.ts","sourceRoot":"","sources":["../../../src/api/currency/currency.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACvB;AAGD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAA;CACvB;AAGD,MAAM,WAAW,WAAY,SAAQ,OAAO;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAA;CACvB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { UseMutationResult, UseQueryResult } from "@tanstack/react-query";
2
+ import type { FromCurrencyExchangeRateDto, FromCurrencyExchangeRateWithToDto, UpdateCurrencyExchangeRateDto } from "./currency-exchange.type";
3
+ import type { AxiosResponse } from "axios";
4
+ export * from './currency-exchange.type';
5
+ export type FromCurrencyExchangeRate = (enabled: boolean, from: number) => UseQueryResult<FromCurrencyExchangeRateDto[], Error>;
6
+ export declare function useFromCurrencyExchangeRateQuery(enabled: boolean, from: number): UseQueryResult<FromCurrencyExchangeRateDto[], Error>;
7
+ export type FromCurrencyExchangeWithToRate = (enabled: boolean, from: number, to: number) => UseQueryResult<FromCurrencyExchangeRateWithToDto, Error>;
8
+ export declare function useFromCurrencyExchangeRateWithToQuery(enabled: boolean, from: number, to: number): UseQueryResult<FromCurrencyExchangeRateWithToDto, Error>;
9
+ export type UpdateCurrencyExchangeRate = () => UseMutationResult<AxiosResponse<any, any, {}>, Error, UpdateCurrencyExchangeRateDto, unknown>;
10
+ export declare function useUpdateCurrencyExchangeRateQuery(): UseMutationResult<AxiosResponse<any, any, {}, any>, Error, UpdateCurrencyExchangeRateDto, unknown>;
11
+ //# sourceMappingURL=currency-exchange.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency-exchange.export.d.ts","sourceRoot":"","sources":["../../../src/api/currency-exchange/currency-exchange.export.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAC9I,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,cAAc,0BAA0B,CAAA;AAGxC,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,cAAc,CAAC,2BAA2B,EAAE,EAAE,KAAK,CAAC,CAAA;AAC/H,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,wDAE9E;AAID,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,cAAc,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAA;AACrJ,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,4DAEhG;AAGD,MAAM,MAAM,0BAA0B,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,6BAA6B,EAAE,OAAO,CAAC,CAAC;AAC7I,wBAAgB,kCAAkC,uGAEjD"}
@@ -0,0 +1,12 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ export * from './currency-exchange.type';
4
+ export function useFromCurrencyExchangeRateQuery(enabled, from) {
5
+ return PluginAPI.use('builtin', APINames.useFromCurrencyExchangeRate)(enabled, from);
6
+ }
7
+ export function useFromCurrencyExchangeRateWithToQuery(enabled, from, to) {
8
+ return PluginAPI.use('builtin', APINames.useFromCurrencyExchangeRateWithTo)(enabled, from, to);
9
+ }
10
+ export function useUpdateCurrencyExchangeRateQuery() {
11
+ return PluginAPI.use('builtin', APINames.useUpdateCurrencyExchangeRate)();
12
+ }
@@ -0,0 +1,33 @@
1
+ export interface UpdateCurrencyExchangeRateDto {
2
+ fromCurrencyId: number;
3
+ toCurrencyId: number;
4
+ rate: number;
5
+ }
6
+ export interface CurrencyExchangeRateDto {
7
+ id: number;
8
+ fromCurrencyId: number;
9
+ toCurrencyId: number;
10
+ rate: number;
11
+ }
12
+ export interface FromCurrencyExchangeRateDto {
13
+ id: number;
14
+ createdDate: string;
15
+ updateDate: string;
16
+ deleteDate: string;
17
+ version: number;
18
+ fromCurrencyId: number;
19
+ fromCurrencyCode: string;
20
+ fromCurrencySymbol: string;
21
+ toCurrencyId: number;
22
+ toCurrencyCode: string;
23
+ toCurrencySymbol: string;
24
+ rate: number;
25
+ }
26
+ export interface FromCurrencyExchangeRateWithToDto {
27
+ fromCurrency: CurrencyExchangeRateDto;
28
+ fromCurrencyId: number;
29
+ toCurrency: CurrencyExchangeRateDto;
30
+ toCurrencyId: number;
31
+ rate: number;
32
+ }
33
+ //# sourceMappingURL=currency-exchange.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency-exchange.type.d.ts","sourceRoot":"","sources":["../../../src/api/currency-exchange/currency-exchange.type.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,6BAA6B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAA;CACf;AAID,MAAM,WAAW,2BAA2B;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,iCAAiC;IAC9C,YAAY,EAAE,uBAAuB,CAAA;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,uBAAuB,CAAA;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,14 @@
1
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
2
+ import type { FileLocation, MediaDialogProps, MediaFileDto } from "./file.type";
3
+ import { type RequestIndexPaginationDto, type ResponseDto } from "@quan-erp/shared-frontend-core";
4
+ import type { ReactNode } from "react";
5
+ export * from './file.type';
6
+ export declare function useMediaFilesQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<MediaFileDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<MediaFileDto[], Error>;
7
+ export declare function useUploadMediaQuery(): UseMutationResult<ResponseDto<MediaFileDto>, Error, {
8
+ file: File;
9
+ type: FileLocation;
10
+ access: "private" | "public";
11
+ accessRoleIds: string;
12
+ }, unknown>;
13
+ export declare function MediaDialog(props: MediaDialogProps): ReactNode;
14
+ //# sourceMappingURL=file.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.export.d.ts","sourceRoot":"","sources":["../../../src/api/file/file.export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAa,KAAK,yBAAyB,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,cAAc,aAAa,CAAA;AAM3B,wBAAgB,kBAAkB,CAC9B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,yCAGzE;AAQD,wBAAgB,mBAAmB;UADiD,IAAI;UAAQ,YAAY;YAAU,SAAS,GAAG,QAAQ;mBAAiB,MAAM;YAGhK;AAMD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,aAElD"}
@@ -0,0 +1,12 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ export * from './file.type';
4
+ export function useMediaFilesQuery(query = {}, option) {
5
+ return PluginAPI.use('builtin', APINames.useMediaFilesQuery)(query, option);
6
+ }
7
+ export function useUploadMediaQuery() {
8
+ return PluginAPI.use('builtin', APINames.useUploadMediaQuery)();
9
+ }
10
+ export function MediaDialog(props) {
11
+ return PluginAPI.use('builtin', APINames.MediaDialog)(props);
12
+ }
@@ -0,0 +1,39 @@
1
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
2
+ import type { RoleDto } from "../role-permission/role-permission.dto";
3
+ import type { UserDto } from "../user/user.type";
4
+ import type { RequestIndexPaginationDto, ResponseDto } from "@quan-erp/shared-frontend-core";
5
+ export interface MediaFileDto {
6
+ id: number;
7
+ createDate: Date;
8
+ updateDate: Date;
9
+ filename: string;
10
+ size: number;
11
+ mimeType: string;
12
+ access: 'private' | 'public';
13
+ creator: UserDto;
14
+ roles: RoleDto[];
15
+ }
16
+ export declare enum FileLocation {
17
+ LOCAL = "local",
18
+ S3 = "s3"
19
+ }
20
+ export declare enum FileAccess {
21
+ PRIVATE = "private",
22
+ PUBLIC = "public"
23
+ }
24
+ export interface MediaDialogProps {
25
+ onSelect?: (media: MediaFileDto[]) => void;
26
+ allowMultiple?: boolean;
27
+ children?: React.ReactNode;
28
+ selected?: MediaFileDto[];
29
+ disabled?: boolean;
30
+ fileAPI?: string;
31
+ getQuery?: (query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<MediaFileDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<MediaFileDto[], Error>;
32
+ uploadQuery?: () => UseMutationResult<ResponseDto<MediaFileDto>, Error, {
33
+ file: File;
34
+ type: FileLocation;
35
+ access: "private" | "public";
36
+ accessRoleIds: string;
37
+ }, unknown>;
38
+ }
39
+ //# sourceMappingURL=file.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.type.d.ts","sourceRoot":"","sources":["../../../src/api/file/file.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7F,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,EAAE,CAAA;CACnB;AAGD,oBAAY,YAAY;IACpB,KAAK,UAAU;IACf,EAAE,OAAO;CACZ;AAGD,oBAAY,UAAU;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;CACpB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CACP,KAAK,CAAC,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACrE,cAAc,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,iBAAiB,CACjC,WAAW,CAAC,YAAY,CAAC,EACzB,KAAK,EACL;QACI,IAAI,EAAE,IAAI,CAAC;QACX,IAAI,EAAE,YAAY,CAAC;QACnB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;QAC7B,aAAa,EAAE,MAAM,CAAC;KACzB,EACD,OAAO,CACV,CAAC;CACL"}
@@ -0,0 +1,10 @@
1
+ export var FileLocation;
2
+ (function (FileLocation) {
3
+ FileLocation["LOCAL"] = "local";
4
+ FileLocation["S3"] = "s3";
5
+ })(FileLocation || (FileLocation = {}));
6
+ export var FileAccess;
7
+ (function (FileAccess) {
8
+ FileAccess["PRIVATE"] = "private";
9
+ FileAccess["PUBLIC"] = "public";
10
+ })(FileAccess || (FileAccess = {}));
@@ -0,0 +1,4 @@
1
+ export declare let firebaseMessaging: any;
2
+ export declare function initFCMMessaging(): Promise<any>;
3
+ export declare function deleteFirebaseMessaging(): Promise<void>;
4
+ //# sourceMappingURL=firebase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.d.ts","sourceRoot":"","sources":["../../../src/api/firebase/firebase.ts"],"names":[],"mappings":"AA8BA,eAAO,IAAI,iBAAiB,EAAE,GAAU,CAAA;AAExC,wBAAsB,gBAAgB,iBAYrC;AAID,wBAAsB,uBAAuB,kBAE5C"}
@@ -0,0 +1,7 @@
1
+ export type FirebaseNotificationData = {
2
+ topic: string;
3
+ pluginName: string;
4
+ payload?: string;
5
+ url?: string;
6
+ };
7
+ //# sourceMappingURL=firebase.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.dto.d.ts","sourceRoot":"","sources":["../../../src/api/firebase/firebase.dto.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './firebase.dto';
2
+ //# sourceMappingURL=firebase.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.export.d.ts","sourceRoot":"","sources":["../../../src/api/firebase/firebase.export.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './firebase.dto';
@@ -0,0 +1,35 @@
1
+ // Import the functions you need from the SDKs you need
2
+ import { initializeApp } from "firebase/app";
3
+ import { getAnalytics } from "firebase/analytics";
4
+ import { deleteToken, getMessaging, isSupported } from "firebase/messaging";
5
+ // TODO: Add SDKs for Firebase products that you want to use
6
+ // https://firebase.google.com/docs/web/setup#available-libraries
7
+ // Your web app's Firebase configuration
8
+ // For Firebase JS SDK v7.20.0 and later, measurementId is optional
9
+ const firebaseConfig = {
10
+ apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
11
+ authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
12
+ projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
13
+ storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
14
+ messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
15
+ appId: import.meta.env.VITE_FIREBASE_APP_ID,
16
+ measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID,
17
+ };
18
+ // Initialize Firebase
19
+ const firebaseApp = initializeApp(firebaseConfig);
20
+ const firebaseAnalytics = getAnalytics(firebaseApp);
21
+ export let firebaseMessaging = null;
22
+ export async function initFCMMessaging() {
23
+ if (!window.isSecureContext) {
24
+ console.warn('FCM requires HTTPS');
25
+ return null;
26
+ }
27
+ if (!(await isSupported())) {
28
+ return null;
29
+ }
30
+ firebaseMessaging = getMessaging(firebaseApp);
31
+ return firebaseMessaging;
32
+ }
33
+ export async function deleteFirebaseMessaging() {
34
+ await deleteToken(firebaseMessaging);
35
+ }
@@ -0,0 +1,28 @@
1
+ export declare class CountryDto {
2
+ id: number;
3
+ code: string;
4
+ name: string;
5
+ localName?: string;
6
+ }
7
+ export declare class StateDto {
8
+ id: number;
9
+ code: string;
10
+ name: string;
11
+ localName?: string;
12
+ countryId?: number;
13
+ }
14
+ export declare class DivisionDto {
15
+ id: number;
16
+ code: string;
17
+ name: string;
18
+ localName?: string;
19
+ stateId?: number;
20
+ }
21
+ export declare class TownshipDto {
22
+ id: number;
23
+ code: string;
24
+ name: string;
25
+ localName?: string;
26
+ divisionId?: number;
27
+ }
28
+ //# sourceMappingURL=location.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.dto.d.ts","sourceRoot":"","sources":["../../../src/api/location/location.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,QAAQ;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,WAAW;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,27 @@
1
+ export class CountryDto {
2
+ id;
3
+ code;
4
+ name;
5
+ localName;
6
+ }
7
+ export class StateDto {
8
+ id;
9
+ code;
10
+ name;
11
+ localName;
12
+ countryId;
13
+ }
14
+ export class DivisionDto {
15
+ id;
16
+ code;
17
+ name;
18
+ localName;
19
+ stateId;
20
+ }
21
+ export class TownshipDto {
22
+ id;
23
+ code;
24
+ name;
25
+ localName;
26
+ divisionId;
27
+ }
@@ -0,0 +1,26 @@
1
+ import type { UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
2
+ import type { CountryDto, StateDto, DivisionDto, TownshipDto } from "./location.dto";
3
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
4
+ export * from './location.dto';
5
+ export type CountriesQueryDto = RequestIndexPaginationDto;
6
+ export type StatesQueryDto = RequestIndexPaginationDto<string, number, number, {
7
+ countryId?: number;
8
+ }>;
9
+ export type DivisionsQueryDto = RequestIndexPaginationDto<string, number, number, {
10
+ countryId?: number;
11
+ stateId?: number;
12
+ }>;
13
+ export type TownshipsQueryDto = RequestIndexPaginationDto<string, number, number, {
14
+ countryId?: number;
15
+ stateId?: number;
16
+ divisionId?: number;
17
+ }>;
18
+ export type UseCountriesQuery = (query?: CountriesQueryDto, option?: Omit<UseQueryOptions<CountryDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<CountryDto[], Error>;
19
+ export declare function useCountriesQuery(query?: CountriesQueryDto, option?: Omit<UseQueryOptions<CountryDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<CountryDto[], Error>;
20
+ export type UseStatesQuery = (query: StatesQueryDto, option?: Omit<UseQueryOptions<StateDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<StateDto[], Error>;
21
+ export declare function useStatesQuery(query: StatesQueryDto, option?: Omit<UseQueryOptions<StateDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<StateDto[], Error>;
22
+ export type UseDivisionsQuery = (query: DivisionsQueryDto, option?: Omit<UseQueryOptions<DivisionDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<DivisionDto[], Error>;
23
+ export declare function useDivisionsQuery(query: DivisionsQueryDto, option?: Omit<UseQueryOptions<DivisionDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<DivisionDto[], Error>;
24
+ export type UseTownshipsQuery = (query: TownshipsQueryDto, option?: Omit<UseQueryOptions<TownshipDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<TownshipDto[], Error>;
25
+ export declare function useTownshipsQuery(query: TownshipsQueryDto, option?: Omit<UseQueryOptions<TownshipDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<TownshipDto[], Error>;
26
+ //# sourceMappingURL=location.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.export.d.ts","sourceRoot":"","sources":["../../../src/api/location/location.export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3F,cAAc,gBAAgB,CAAA;AAE9B,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACvG,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAC5H,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjJ,MAAM,MAAM,iBAAiB,GAAG,CAC5B,KAAK,CAAC,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACnE,cAAc,CAAC,UAAU,EAAE,EAAE,KAAK,CAAC,CAAA;AACxC,wBAAgB,iBAAiB,CAC7B,KAAK,GAAE,iBAAsB,EAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,uCAGvE;AAED,MAAM,MAAM,cAAc,GAAG,CACzB,KAAK,EAAE,cAAc,EACrB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACjE,cAAc,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAA;AACtC,wBAAgB,cAAc,CAC1B,KAAK,EAAE,cAAc,EACrB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,qCAGrE;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACpE,cAAc,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAA;AACzC,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,iBAAiB,EACxB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,wCAGxE;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACpE,cAAc,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAA;AACzC,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,iBAAiB,EACxB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,wCAGxE"}
@@ -0,0 +1,16 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { BUILTIN_PLUGIN } from "../../utils/common";
3
+ import { APINames } from "../../export";
4
+ export * from './location.dto';
5
+ export function useCountriesQuery(query = {}, option) {
6
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useCountriesQuery)(query, option);
7
+ }
8
+ export function useStatesQuery(query, option) {
9
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useStatesQuery)(query, option);
10
+ }
11
+ export function useDivisionsQuery(query, option) {
12
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useDivisionsQuery)(query, option);
13
+ }
14
+ export function useTownshipsQuery(query, option) {
15
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useTownshipsQuery)(query, option);
16
+ }
@@ -0,0 +1,9 @@
1
+ import { type UseQueryOptions } from "@tanstack/react-query";
2
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
3
+ import type { NotificationDto } from "./notification.type";
4
+ export declare const NOTIFICATION_QUERY = "GET_NOTIFICATION_CACHE_KEY";
5
+ export declare function useNotificationQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<NotificationDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<NotificationDto[]>, Error>;
6
+ export declare const NOTIFICATION_UNREAD_QUERY = "GET_NOTIFICATION_UNREAD_CACHE_KEY";
7
+ export declare function useNotificationUnreadQuery(): import("@tanstack/react-query").UseQueryResult<number, Error>;
8
+ export declare function useNotificationClickQuery(): import("@tanstack/react-query").UseMutationResult<NotificationDto[], Error, number, unknown>;
9
+ //# sourceMappingURL=notification.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.api.d.ts","sourceRoot":"","sources":["../../../src/api/notification/notification.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGpF,OAAO,EAAc,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAU3D,eAAO,MAAM,kBAAkB,+BAA+B,CAAA;AAC9D,wBAAgB,oBAAoB,CAChC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,qFAS5E;AAkBD,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,wBAAgB,0BAA0B,kEAMzC;AAmBD,wBAAgB,yBAAyB,iGAQxC"}
@@ -0,0 +1,45 @@
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
+ async function fetchNotification(skip, limit) {
8
+ const result = await axiosClient.get(`/notification?skip=${skip}&limit=${limit}`);
9
+ return result.data.payload;
10
+ }
11
+ export const NOTIFICATION_QUERY = 'GET_NOTIFICATION_CACHE_KEY';
12
+ export function useNotificationQuery(query = {}, option) {
13
+ const { currentPage, pageSize, skip } = resolveIndexPagination(query);
14
+ return useQuery({
15
+ queryFn: () => fetchNotification(skip, pageSize),
16
+ staleTime: DEFAULT_STALE_TIME,
17
+ queryKey: [NOTIFICATION_QUERY, currentPage, pageSize],
18
+ ...(option || {}),
19
+ });
20
+ }
21
+ async function fetchNotificationUnreadCount() {
22
+ const result = await axiosClient.get(`/notification/unread-count`);
23
+ return result.data.payload;
24
+ }
25
+ export const NOTIFICATION_UNREAD_QUERY = 'GET_NOTIFICATION_UNREAD_CACHE_KEY';
26
+ export function useNotificationUnreadQuery() {
27
+ return useQuery({
28
+ queryFn: () => fetchNotificationUnreadCount(),
29
+ staleTime: DEFAULT_STALE_TIME,
30
+ queryKey: [NOTIFICATION_UNREAD_QUERY]
31
+ });
32
+ }
33
+ async function updateNotificationClick(id) {
34
+ const result = await axiosClient.post(`/notification/clicked`, new RequestDto({ id }));
35
+ return result.data.payload;
36
+ }
37
+ export function useNotificationClickQuery() {
38
+ return useMutation({
39
+ mutationFn: (id) => updateNotificationClick(id),
40
+ onSuccess() {
41
+ queryClient.invalidateQueries({ queryKey: [NOTIFICATION_QUERY] });
42
+ queryClient.invalidateQueries({ queryKey: [NOTIFICATION_UNREAD_QUERY] });
43
+ }
44
+ });
45
+ }
@@ -0,0 +1,6 @@
1
+ export * from './notification.type';
2
+ import type { FirebaseBackgroundNotificationCallbackRegistry, FirebaseForegroundNotificationCallbackRegistry, InAppNotificationCallbackRegistry } from "./notification.type";
3
+ export declare function getInAppNotificationRegistry(): InAppNotificationCallbackRegistry;
4
+ export declare function getFirebaseForegroundNotificationRegistry(): FirebaseForegroundNotificationCallbackRegistry;
5
+ export declare function getFirebaseBackgroundNotificationRegistry(): FirebaseBackgroundNotificationCallbackRegistry;
6
+ //# sourceMappingURL=notification.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.export.d.ts","sourceRoot":"","sources":["../../../src/api/notification/notification.export.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAA;AAEnC,OAAO,KAAK,EAAE,8CAA8C,EAAE,8CAA8C,EAAE,iCAAiC,EAAmB,MAAM,qBAAqB,CAAC;AAE9L,wBAAgB,4BAA4B,sCAE3C;AAED,wBAAgB,yCAAyC,mDAExD;AAED,wBAAgB,yCAAyC,mDAExD"}
@@ -0,0 +1,13 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { BUILTIN_PLUGIN } from "../../utils/common";
3
+ import { APINames } from "../../export";
4
+ export * from './notification.type';
5
+ export function getInAppNotificationRegistry() {
6
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.inAppNotificationRegistry);
7
+ }
8
+ export function getFirebaseForegroundNotificationRegistry() {
9
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.firebaseForegroundNotificationRegistry);
10
+ }
11
+ export function getFirebaseBackgroundNotificationRegistry() {
12
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.firebaseBackgroundNotificationRegistry);
13
+ }
@@ -0,0 +1,8 @@
1
+ import type { InAppNotificationCallbackRegistry, InAppNotificationRegistryStoreType, FirebaseForegroundNotificationRegistryStoreType, FirebaseForegroundNotificationCallbackRegistry as FirebaseForegroundNotificationCallbackRegistry, FirebaseBackgroundNotificationCallbackRegistry, FirebaseBackgroundNotificationRegistryStoreType } from './notification.type';
2
+ export declare let inAppNotificationCallbacks: InAppNotificationRegistryStoreType[];
3
+ export declare let firebaseForegroundNotificationCallbacks: FirebaseForegroundNotificationRegistryStoreType[];
4
+ export declare let firebaseBackgroundNotificationCallbacks: FirebaseBackgroundNotificationRegistryStoreType[];
5
+ export declare const inAppNotificationCallbackRegistry: InAppNotificationCallbackRegistry;
6
+ export declare const firebaseForegroundNotificationCallbackRegistry: FirebaseForegroundNotificationCallbackRegistry;
7
+ export declare const firebaseBackgroundNotificationCallbackRegistry: FirebaseBackgroundNotificationCallbackRegistry;
8
+ //# sourceMappingURL=notification.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.store.d.ts","sourceRoot":"","sources":["../../../src/api/notification/notification.store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6G,iCAAiC,EAAE,kCAAkC,EAAE,+CAA+C,EAAE,8CAA8C,IAAI,8CAA8C,EAAE,8CAA8C,EAAE,+CAA+C,EAAE,MAAM,qBAAqB,CAAC;AAMhd,eAAO,IAAI,0BAA0B,EAAE,kCAAkC,EAAO,CAAA;AAChF,eAAO,IAAI,uCAAuC,EAAE,+CAA+C,EAAO,CAAA;AAC1G,eAAO,IAAI,uCAAuC,EAAE,+CAA+C,EAAO,CAAA;AAG1G,eAAO,MAAM,iCAAiC,EAAE,iCAa/C,CAAA;AAGD,eAAO,MAAM,8CAA8C,EAAE,8CAa5D,CAAA;AAKD,eAAO,MAAM,8CAA8C,EAAE,8CAa5D,CAAA"}