@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.
- package/LICENSE.md +49 -0
- package/README.md +80 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.d.ts +14 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.js +93 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts +54 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.js +4 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.d.ts +7 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.js +7 -0
- package/dist-export/api/ai-model/ai-model.api.d.ts +37 -0
- package/dist-export/api/ai-model/ai-model.api.d.ts.map +1 -0
- package/dist-export/api/ai-model/ai-model.api.js +80 -0
- package/dist-export/api/ai-tool/ai-tool.dto.d.ts +26 -0
- package/dist-export/api/ai-tool/ai-tool.dto.d.ts.map +1 -0
- package/dist-export/api/ai-tool/ai-tool.dto.js +1 -0
- package/dist-export/api/branch/branch.export.d.ts +11 -0
- package/dist-export/api/branch/branch.export.d.ts.map +1 -0
- package/dist-export/api/branch/branch.export.js +12 -0
- package/dist-export/api/branch/branch.type.d.ts +46 -0
- package/dist-export/api/branch/branch.type.d.ts.map +1 -0
- package/dist-export/api/branch/branch.type.js +44 -0
- package/dist-export/api/change-log/change-log.dto.d.ts +41 -0
- package/dist-export/api/change-log/change-log.dto.d.ts.map +1 -0
- package/dist-export/api/change-log/change-log.dto.js +1 -0
- package/dist-export/api/change-log/change-log.export.d.ts +39 -0
- package/dist-export/api/change-log/change-log.export.d.ts.map +1 -0
- package/dist-export/api/change-log/change-log.export.js +18 -0
- package/dist-export/api/currency/currency.export.d.ts +17 -0
- package/dist-export/api/currency/currency.export.d.ts.map +1 -0
- package/dist-export/api/currency/currency.export.js +12 -0
- package/dist-export/api/currency/currency.type.d.ts +21 -0
- package/dist-export/api/currency/currency.type.d.ts.map +1 -0
- package/dist-export/api/currency/currency.type.js +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.d.ts +11 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.d.ts.map +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.js +12 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.d.ts +33 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.d.ts.map +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.js +1 -0
- package/dist-export/api/file/file.export.d.ts +14 -0
- package/dist-export/api/file/file.export.d.ts.map +1 -0
- package/dist-export/api/file/file.export.js +12 -0
- package/dist-export/api/file/file.type.d.ts +39 -0
- package/dist-export/api/file/file.type.d.ts.map +1 -0
- package/dist-export/api/file/file.type.js +10 -0
- package/dist-export/api/firebase/firebase.d.ts +4 -0
- package/dist-export/api/firebase/firebase.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.dto.d.ts +7 -0
- package/dist-export/api/firebase/firebase.dto.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.dto.js +1 -0
- package/dist-export/api/firebase/firebase.export.d.ts +2 -0
- package/dist-export/api/firebase/firebase.export.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.export.js +1 -0
- package/dist-export/api/firebase/firebase.js +35 -0
- package/dist-export/api/location/location.dto.d.ts +28 -0
- package/dist-export/api/location/location.dto.d.ts.map +1 -0
- package/dist-export/api/location/location.dto.js +27 -0
- package/dist-export/api/location/location.export.d.ts +26 -0
- package/dist-export/api/location/location.export.d.ts.map +1 -0
- package/dist-export/api/location/location.export.js +16 -0
- package/dist-export/api/notification/notification.api.d.ts +9 -0
- package/dist-export/api/notification/notification.api.d.ts.map +1 -0
- package/dist-export/api/notification/notification.api.js +45 -0
- package/dist-export/api/notification/notification.export.d.ts +6 -0
- package/dist-export/api/notification/notification.export.d.ts.map +1 -0
- package/dist-export/api/notification/notification.export.js +13 -0
- package/dist-export/api/notification/notification.store.d.ts +8 -0
- package/dist-export/api/notification/notification.store.d.ts.map +1 -0
- package/dist-export/api/notification/notification.store.js +46 -0
- package/dist-export/api/notification/notification.type.d.ts +48 -0
- package/dist-export/api/notification/notification.type.d.ts.map +1 -0
- package/dist-export/api/notification/notification.type.js +1 -0
- package/dist-export/api/partner/partner.export.d.ts +15 -0
- package/dist-export/api/partner/partner.export.d.ts.map +1 -0
- package/dist-export/api/partner/partner.export.js +12 -0
- package/dist-export/api/partner/partner.type.d.ts +41 -0
- package/dist-export/api/partner/partner.type.d.ts.map +1 -0
- package/dist-export/api/partner/partner.type.js +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts +18 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts.map +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.js +13 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts +38 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts.map +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.js +36 -0
- package/dist-export/api/permission/permission.export.d.ts +8 -0
- package/dist-export/api/permission/permission.export.d.ts.map +1 -0
- package/dist-export/api/permission/permission.export.js +10 -0
- package/dist-export/api/permission/permission.lib.d.ts +5 -0
- package/dist-export/api/permission/permission.lib.d.ts.map +1 -0
- package/dist-export/api/permission/permission.lib.js +24 -0
- package/dist-export/api/permission/permission.type.d.ts +32 -0
- package/dist-export/api/permission/permission.type.d.ts.map +1 -0
- package/dist-export/api/permission/permission.type.js +1 -0
- package/dist-export/api/role-permission/role-permission.api.d.ts +25 -0
- package/dist-export/api/role-permission/role-permission.api.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.api.js +71 -0
- package/dist-export/api/role-permission/role-permission.dto.d.ts +6 -0
- package/dist-export/api/role-permission/role-permission.dto.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.dto.js +1 -0
- package/dist-export/api/role-permission/role-permission.export.d.ts +11 -0
- package/dist-export/api/role-permission/role-permission.export.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.export.js +9 -0
- package/dist-export/api/setting/setting.api.d.ts +14 -0
- package/dist-export/api/setting/setting.api.d.ts.map +1 -0
- package/dist-export/api/setting/setting.api.js +70 -0
- package/dist-export/api/setting/setting.export.d.ts +36 -0
- package/dist-export/api/setting/setting.export.d.ts.map +1 -0
- package/dist-export/api/setting/setting.export.js +17 -0
- package/dist-export/api/setting/setting.store.d.ts +11 -0
- package/dist-export/api/setting/setting.store.d.ts.map +1 -0
- package/dist-export/api/setting/setting.store.js +36 -0
- package/dist-export/api/setting/setting.type.d.ts +44 -0
- package/dist-export/api/setting/setting.type.d.ts.map +1 -0
- package/dist-export/api/setting/setting.type.js +27 -0
- package/dist-export/api/tag/tag.api.d.ts +10 -0
- package/dist-export/api/tag/tag.api.d.ts.map +1 -0
- package/dist-export/api/tag/tag.api.js +60 -0
- package/dist-export/api/tag/tag.dto.d.ts +8 -0
- package/dist-export/api/tag/tag.dto.d.ts.map +1 -0
- package/dist-export/api/tag/tag.dto.js +1 -0
- package/dist-export/api/tag/tag.export.d.ts +10 -0
- package/dist-export/api/tag/tag.export.d.ts.map +1 -0
- package/dist-export/api/tag/tag.export.js +13 -0
- package/dist-export/api/unit/uoc.export.d.ts +11 -0
- package/dist-export/api/unit/uoc.export.d.ts.map +1 -0
- package/dist-export/api/unit/uoc.export.js +13 -0
- package/dist-export/api/unit/uoc.type.d.ts +11 -0
- package/dist-export/api/unit/uoc.type.d.ts.map +1 -0
- package/dist-export/api/unit/uoc.type.js +1 -0
- package/dist-export/api/unit/uom.export.d.ts +14 -0
- package/dist-export/api/unit/uom.export.d.ts.map +1 -0
- package/dist-export/api/unit/uom.export.js +16 -0
- package/dist-export/api/unit/uom.type.d.ts +30 -0
- package/dist-export/api/unit/uom.type.d.ts.map +1 -0
- package/dist-export/api/unit/uom.type.js +1 -0
- package/dist-export/api/user/user.api.d.ts +28 -0
- package/dist-export/api/user/user.api.d.ts.map +1 -0
- package/dist-export/api/user/user.api.js +138 -0
- package/dist-export/api/user/user.export.d.ts +11 -0
- package/dist-export/api/user/user.export.d.ts.map +1 -0
- package/dist-export/api/user/user.export.js +12 -0
- package/dist-export/api/user/user.type.d.ts +49 -0
- package/dist-export/api/user/user.type.d.ts.map +1 -0
- package/dist-export/api/user/user.type.js +20 -0
- package/dist-export/api/workflow/workflow.export.d.ts +41 -0
- package/dist-export/api/workflow/workflow.export.d.ts.map +1 -0
- package/dist-export/api/workflow/workflow.export.js +19 -0
- package/dist-export/api/workflow/workflow.type.d.ts +210 -0
- package/dist-export/api/workflow/workflow.type.d.ts.map +1 -0
- package/dist-export/api/workflow/workflow.type.js +11 -0
- package/dist-export/components/change-log/change-log.export.d.ts +9 -0
- package/dist-export/components/change-log/change-log.export.d.ts.map +1 -0
- package/dist-export/components/change-log/change-log.export.js +6 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts +4 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts.map +1 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.js +6 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts +5 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts.map +1 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.js +1 -0
- package/dist-export/components/location/location.export.d.ts +8 -0
- package/dist-export/components/location/location.export.d.ts.map +1 -0
- package/dist-export/components/location/location.export.js +16 -0
- package/dist-export/components/location/location.type.d.ts +62 -0
- package/dist-export/components/location/location.type.d.ts.map +1 -0
- package/dist-export/components/location/location.type.js +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.d.ts +15 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.d.ts.map +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.js +11 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.d.ts +23 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.d.ts.map +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.js +5 -0
- package/dist-export/components/tag/tag.dropdown.d.ts +13 -0
- package/dist-export/components/tag/tag.dropdown.d.ts.map +1 -0
- package/dist-export/components/tag/tag.dropdown.export.d.ts +5 -0
- package/dist-export/components/tag/tag.dropdown.export.d.ts.map +1 -0
- package/dist-export/components/tag/tag.dropdown.export.js +6 -0
- package/dist-export/components/tag/tag.dropdown.js +84 -0
- package/dist-export/dto/base.dto.d.ts +6 -0
- package/dist-export/dto/base.dto.d.ts.map +1 -0
- package/dist-export/dto/base.dto.js +1 -0
- package/dist-export/export/export-dashboard.d.ts +5 -0
- package/dist-export/export/export-dashboard.d.ts.map +1 -0
- package/dist-export/export/export-dashboard.js +7 -0
- package/dist-export/export/export-env.d.ts +5 -0
- package/dist-export/export/export-env.d.ts.map +1 -0
- package/dist-export/export/export-env.js +5 -0
- package/dist-export/export/export-navigate.d.ts +3 -0
- package/dist-export/export/export-navigate.d.ts.map +1 -0
- package/dist-export/export/export-navigate.js +7 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts +3 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts.map +1 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.js +6 -0
- package/dist-export/export/index.d.ts +6 -0
- package/dist-export/export/index.d.ts.map +1 -0
- package/dist-export/export/index.js +5 -0
- package/dist-export/export.d.ts +131 -0
- package/dist-export/export.d.ts.map +1 -0
- package/dist-export/export.js +143 -0
- package/dist-export/locale/locale.export.d.ts +7 -0
- package/dist-export/locale/locale.export.d.ts.map +1 -0
- package/dist-export/locale/locale.export.js +9 -0
- package/dist-export/locale/locales/en-US.json +145 -0
- package/dist-export/locale/locales/my-MM.json +145 -0
- package/dist-export/locale/locales/zh-CN.json +145 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.d.ts +5 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.js +6 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts +7 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.js +9 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts +16 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.js +50 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts +9 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.js +11 -0
- package/dist-export/page/ai-assistant/locales/en-US.json +92 -0
- package/dist-export/page/ai-assistant/locales/my-MM.json +91 -0
- package/dist-export/page/ai-assistant/locales/zh-CN.json +91 -0
- package/dist-export/page/branch/branch.export.d.ts +4 -0
- package/dist-export/page/branch/branch.export.d.ts.map +1 -0
- package/dist-export/page/branch/branch.export.js +6 -0
- package/dist-export/page/branch/branch.types.d.ts +14 -0
- package/dist-export/page/branch/branch.types.d.ts.map +1 -0
- package/dist-export/page/branch/branch.types.js +1 -0
- package/dist-export/page/currency/currency.export.d.ts +6 -0
- package/dist-export/page/currency/currency.export.d.ts.map +1 -0
- package/dist-export/page/currency/currency.export.js +9 -0
- package/dist-export/page/currency/currency.type.d.ts +25 -0
- package/dist-export/page/currency/currency.type.d.ts.map +1 -0
- package/dist-export/page/currency/currency.type.js +1 -0
- package/dist-export/page/partner/partner.export.d.ts +4 -0
- package/dist-export/page/partner/partner.export.d.ts.map +1 -0
- package/dist-export/page/partner/partner.export.js +6 -0
- package/dist-export/page/partner/partner.types.d.ts +15 -0
- package/dist-export/page/partner/partner.types.d.ts.map +1 -0
- package/dist-export/page/partner/partner.types.js +1 -0
- package/dist-export/page/uoc/uoc.export.d.ts +5 -0
- package/dist-export/page/uoc/uoc.export.d.ts.map +1 -0
- package/dist-export/page/uoc/uoc.export.js +9 -0
- package/dist-export/page/uoc/uoc.types.d.ts +25 -0
- package/dist-export/page/uoc/uoc.types.d.ts.map +1 -0
- package/dist-export/page/uoc/uoc.types.js +1 -0
- package/dist-export/page/user/user.export.d.ts +4 -0
- package/dist-export/page/user/user.export.d.ts.map +1 -0
- package/dist-export/page/user/user.export.js +6 -0
- package/dist-export/page/user/user.types.d.ts +14 -0
- package/dist-export/page/user/user.types.d.ts.map +1 -0
- package/dist-export/page/user/user.types.js +1 -0
- package/dist-export/plugin/app-state.d.ts +5 -0
- package/dist-export/plugin/app-state.d.ts.map +1 -0
- package/dist-export/plugin/app-state.js +157 -0
- package/dist-export/plugin/export.d.ts +3 -0
- package/dist-export/plugin/export.d.ts.map +1 -0
- package/dist-export/plugin/export.js +7 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts +6 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts.map +1 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.js +6 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts +8 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts.map +1 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.js +1 -0
- package/dist-export/store/dto.d.ts +10 -0
- package/dist-export/store/dto.d.ts.map +1 -0
- package/dist-export/store/dto.js +11 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.d.ts +7 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.d.ts.map +1 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.js +9 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.d.ts +20 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.d.ts.map +1 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.js +1 -0
- package/dist-export/store/nav-menu/nav-menu.export.d.ts +6 -0
- package/dist-export/store/nav-menu/nav-menu.export.d.ts.map +1 -0
- package/dist-export/store/nav-menu/nav-menu.export.js +6 -0
- package/dist-export/store/nav-menu/nav-menu.type.d.ts +46 -0
- package/dist-export/store/nav-menu/nav-menu.type.d.ts.map +1 -0
- package/dist-export/store/nav-menu/nav-menu.type.js +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts +3 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts.map +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.js +6 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts +14 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts.map +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.js +1 -0
- package/dist-export/store/permission-template/permission-template.export.d.ts +7 -0
- package/dist-export/store/permission-template/permission-template.export.d.ts.map +1 -0
- package/dist-export/store/permission-template/permission-template.export.js +9 -0
- package/dist-export/store/permission-template/permission-template.type.d.ts +13 -0
- package/dist-export/store/permission-template/permission-template.type.d.ts.map +1 -0
- package/dist-export/store/permission-template/permission-template.type.js +1 -0
- package/dist-export/store/root-component-store/root-component.export.d.ts +6 -0
- package/dist-export/store/root-component-store/root-component.export.d.ts.map +1 -0
- package/dist-export/store/root-component-store/root-component.export.js +9 -0
- package/dist-export/store/root-component-store/root-component.type.d.ts +7 -0
- package/dist-export/store/root-component-store/root-component.type.d.ts.map +1 -0
- package/dist-export/store/root-component-store/root-component.type.js +1 -0
- package/dist-export/store/web-env/web-env.export.d.ts +6 -0
- package/dist-export/store/web-env/web-env.export.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.export.js +9 -0
- package/dist-export/store/web-env/web-env.store.d.ts +6 -0
- package/dist-export/store/web-env/web-env.store.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.store.js +16 -0
- package/dist-export/store/web-env/web-env.type.d.ts +16 -0
- package/dist-export/store/web-env/web-env.type.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.type.js +1 -0
- package/dist-export/utils/axios-client.d.ts +5 -0
- package/dist-export/utils/axios-client.d.ts.map +1 -0
- package/dist-export/utils/axios-client.js +84 -0
- package/dist-export/utils/common.d.ts +6 -0
- package/dist-export/utils/common.d.ts.map +1 -0
- package/dist-export/utils/common.js +5 -0
- package/dist-export/utils/index.d.ts +3 -0
- package/dist-export/utils/index.d.ts.map +1 -0
- package/dist-export/utils/index.js +2 -0
- package/dist-export/utils/pagination.d.ts +11 -0
- package/dist-export/utils/pagination.d.ts.map +1 -0
- package/dist-export/utils/pagination.js +6 -0
- package/dist-export/utils/react-query-indexed-db-persister.d.ts +7 -0
- package/dist-export/utils/react-query-indexed-db-persister.d.ts.map +1 -0
- package/dist-export/utils/react-query-indexed-db-persister.js +21 -0
- package/dist-export/utils/types.utils.d.ts +2 -0
- package/dist-export/utils/types.utils.d.ts.map +1 -0
- package/dist-export/utils/types.utils.js +1 -0
- package/package.json +182 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { RequestDto, } from "../../store/dto";
|
|
3
|
+
import axiosClient from "../../utils/axios-client";
|
|
4
|
+
import { useAppRegistry } from "../../plugin/app-state";
|
|
5
|
+
import { DEFAULT_STALE_TIME } from "../../utils/common";
|
|
6
|
+
import { withApiMetadataFetchFn } from "../permission/permission.lib";
|
|
7
|
+
export const getPrivateSettingApi = withApiMetadataFetchFn({
|
|
8
|
+
api: { method: 'GET', url: '/setting/private' },
|
|
9
|
+
fetchFn: async () => {
|
|
10
|
+
const response = await axiosClient.get('/setting/private');
|
|
11
|
+
return response.data.payload;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export const getPublicSettingApi = withApiMetadataFetchFn({
|
|
15
|
+
api: { method: 'GET', url: '/setting/public' },
|
|
16
|
+
fetchFn: async (props) => {
|
|
17
|
+
const response = await axiosClient.get('/setting/public', {
|
|
18
|
+
baseURL: props?.baseUrl
|
|
19
|
+
});
|
|
20
|
+
return response.data.payload;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export const SETTING_QUERY_KEY = 'setting';
|
|
24
|
+
export function useSettingQuery(param, option) {
|
|
25
|
+
const userInfo = useAppRegistry(a => a.userInfo);
|
|
26
|
+
return useQuery({
|
|
27
|
+
queryFn: () => {
|
|
28
|
+
if (param.mode === 'private')
|
|
29
|
+
return getPrivateSettingApi.fetchFn();
|
|
30
|
+
if (param.mode === 'public')
|
|
31
|
+
return getPublicSettingApi.fetchFn();
|
|
32
|
+
return getPublicSettingApi.fetchFn();
|
|
33
|
+
},
|
|
34
|
+
queryKey: [SETTING_QUERY_KEY, userInfo?.id, param.mode],
|
|
35
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
36
|
+
retry: false,
|
|
37
|
+
refetchOnWindowFocus: 'always',
|
|
38
|
+
...(option || {}),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async function updateSetting(setting) {
|
|
42
|
+
const response = await axiosClient.post('/setting', new RequestDto(setting));
|
|
43
|
+
return response.data;
|
|
44
|
+
}
|
|
45
|
+
async function updateSettings(settings) {
|
|
46
|
+
const response = await axiosClient.post('/setting/many', new RequestDto(settings));
|
|
47
|
+
return response.data;
|
|
48
|
+
}
|
|
49
|
+
export function useUpdateSettingQuery({ many } = { many: false }) {
|
|
50
|
+
return useMutation({
|
|
51
|
+
mutationFn: (setting) => {
|
|
52
|
+
if (many) {
|
|
53
|
+
return updateSettings(setting);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return updateSetting(setting);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
onSuccess: (data, variables) => {
|
|
60
|
+
const { userInfo } = useAppRegistry.getState();
|
|
61
|
+
useAppRegistry.getState().queryClient.setQueryData([SETTING_QUERY_KEY, userInfo?.id], (old) => {
|
|
62
|
+
return {
|
|
63
|
+
...old,
|
|
64
|
+
...variables
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
retry: false
|
|
69
|
+
});
|
|
70
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { SettingContextType, SettingDataType, SettingKeys, SettingMapValue } from "./setting.type";
|
|
3
|
+
import type { StoreApi, UseBoundStore } from "zustand";
|
|
4
|
+
export * from './setting.type';
|
|
5
|
+
export type Setting = (param: {
|
|
6
|
+
mode: 'private' | 'public';
|
|
7
|
+
}, option?: Omit<UseQueryOptions<SettingMapValue>, 'queryFn' | 'queryKey'>) => UseQueryResult<Record<SettingKeys, {
|
|
8
|
+
value: any;
|
|
9
|
+
datatype: SettingDataType;
|
|
10
|
+
userId?: number;
|
|
11
|
+
isPublic: boolean;
|
|
12
|
+
}>, Error>;
|
|
13
|
+
export declare function useSettingQuery(param: {
|
|
14
|
+
mode: 'private' | 'public';
|
|
15
|
+
}, option?: Omit<UseQueryOptions<SettingMapValue>, 'queryFn' | 'queryKey'>): UseQueryResult<Record<SettingKeys, {
|
|
16
|
+
value: any;
|
|
17
|
+
datatype: SettingDataType;
|
|
18
|
+
userId?: number;
|
|
19
|
+
isPublic: boolean;
|
|
20
|
+
}>, Error>;
|
|
21
|
+
export type SettingStore = UseBoundStore<StoreApi<{
|
|
22
|
+
setting: Partial<SettingMapValue>;
|
|
23
|
+
state: {
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
};
|
|
26
|
+
setLoading: (status: boolean) => void;
|
|
27
|
+
reset: () => void;
|
|
28
|
+
setSetting: (setting: SettingMapValue) => void;
|
|
29
|
+
}>>;
|
|
30
|
+
export declare function useSettingStore(): SettingStore;
|
|
31
|
+
export declare function useSettingContext(): SettingContextType;
|
|
32
|
+
export type UpdateSettingQuery = ({ many }: {
|
|
33
|
+
many: boolean;
|
|
34
|
+
}) => UseMutationResult<any, Error, SettingMapValue, unknown>;
|
|
35
|
+
export declare function useUpdateSettingQuery(): UseMutationResult<any, Error, SettingMapValue, unknown>;
|
|
36
|
+
//# sourceMappingURL=setting.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setting.export.d.ts","sourceRoot":"","sources":["../../../src/api/setting/setting.export.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD,cAAc,gBAAgB,CAAA;AAI9B,MAAM,MAAM,OAAO,GAAG,CACpB,KAAK,EAAE;IAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KACpE,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE;IACtC,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAC,EAAE,KAAK,CAAC,CAAA;AAEV,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;WARhE,GAAG;cACA,eAAe;aAChB,MAAM;cACL,OAAO;WAQlB;AAQD,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC,KAAK,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD,CAAC,CAAC,CAAA;AACH,wBAAgB,eAAe,iBAE9B;AAUD,wBAAgB,iBAAiB,IAAI,kBAAkB,CAGtD;AAcD,MAAM,MAAM,kBAAkB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,CAAA;AACzH,wBAAgB,qBAAqB,4DAEpC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { APINames } from "../../export";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
export * from './setting.type';
|
|
5
|
+
export function useSettingQuery(param, option) {
|
|
6
|
+
return PluginAPI.use('builtin', APINames.useSettingQuery)(param, option);
|
|
7
|
+
}
|
|
8
|
+
export function useSettingStore() {
|
|
9
|
+
return PluginAPI.use('builtin', APINames.useSettingStore);
|
|
10
|
+
}
|
|
11
|
+
export function useSettingContext() {
|
|
12
|
+
const ctx = PluginAPI.use('builtin', APINames.useSettingContext);
|
|
13
|
+
return useContext(ctx);
|
|
14
|
+
}
|
|
15
|
+
export function useUpdateSettingQuery() {
|
|
16
|
+
return PluginAPI.use('builtin', APINames.useUpdateSettingQuery)({ many: true });
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SettingMapValue } from "./setting.type";
|
|
2
|
+
export declare const useSettingStore: import("zustand").UseBoundStore<import("zustand").StoreApi<{
|
|
3
|
+
setting: Partial<SettingMapValue>;
|
|
4
|
+
state: {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
setLoading: (status: boolean) => void;
|
|
8
|
+
reset: () => void;
|
|
9
|
+
setSetting: (setting: SettingMapValue) => void;
|
|
10
|
+
}>>;
|
|
11
|
+
//# sourceMappingURL=setting.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setting.store.d.ts","sourceRoot":"","sources":["../../../src/api/setting/setting.store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpF,eAAO,MAAM,eAAe;aACf,OAAO,CAAC,eAAe,CAAC;WAC1B;QACH,SAAS,EAAE,OAAO,CAAA;KACrB;gBACW,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI;WAC9B,MAAM,IAAI;gBACL,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI;GAmChD,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
export const useSettingStore = create((set, get) => {
|
|
3
|
+
return {
|
|
4
|
+
setting: {},
|
|
5
|
+
state: {
|
|
6
|
+
isLoading: false
|
|
7
|
+
},
|
|
8
|
+
setLoading(status) {
|
|
9
|
+
set(state => {
|
|
10
|
+
return {
|
|
11
|
+
state: {
|
|
12
|
+
...state.state,
|
|
13
|
+
isLoading: status
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
reset() {
|
|
19
|
+
set(state => {
|
|
20
|
+
return {
|
|
21
|
+
setting: {}
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
setSetting: (setting) => {
|
|
26
|
+
set(state => {
|
|
27
|
+
return {
|
|
28
|
+
setting: {
|
|
29
|
+
...state.setting,
|
|
30
|
+
...setting
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum SettingKeys {
|
|
2
|
+
LOCALE = "locale",
|
|
3
|
+
SHOW_DEVELOPER_TOOLS = "show-developer-tools",
|
|
4
|
+
BUSINESS_LOGO = "business-logo",
|
|
5
|
+
BUSINESS_NAME = "business-name",
|
|
6
|
+
BUSINESS_HOTLINE_PHONE = "business-hotline-phone",
|
|
7
|
+
BUSINESS_INTRODUCTION = "business-introduction",
|
|
8
|
+
BUSINESS_HEADQUARTERS_ADDRESS = "business-headquarters-address",
|
|
9
|
+
DATE_FORMAT = "date-format",
|
|
10
|
+
TIMEZONE = "timezone",
|
|
11
|
+
NAVIGATION_OERDER = "navigation-order",
|
|
12
|
+
DASHBOARD_VIEW_ORDER = "dashboard-view-order",
|
|
13
|
+
HOME_SHORTCUT_ORDER = "home-shortcut-order",
|
|
14
|
+
PLUGIN_VIEW_FILTER = "plugin-view-filiter",
|
|
15
|
+
FAVOURITE_PAGE = "favourite-page",
|
|
16
|
+
THEME = "theme",
|
|
17
|
+
FONT_STYLE = "font-style",
|
|
18
|
+
FONT_SIZE = "font-size",
|
|
19
|
+
PRIMARY_COLOR = "primary-color",
|
|
20
|
+
HOME_TOUR_CLICKED = "home-tour-clicked",
|
|
21
|
+
DUN_SHOW_TUTORIAL_CARD = "dun-show-tutorial-card",
|
|
22
|
+
APP_LOCK_TIMER = "app-lock-timer",
|
|
23
|
+
APP_PIN = "app-pin",
|
|
24
|
+
KEEP_APP_AWAKE = "keep-app-awake",
|
|
25
|
+
REDUCE_ANIMATION = "reduce-animation"
|
|
26
|
+
}
|
|
27
|
+
export type SettingDataType = "string" | "number" | "boolean" | "json" | "date" | 'string-array';
|
|
28
|
+
export type SettingValue = {
|
|
29
|
+
value: any;
|
|
30
|
+
datatype: SettingDataType;
|
|
31
|
+
isPublic: boolean;
|
|
32
|
+
userId?: number;
|
|
33
|
+
};
|
|
34
|
+
export type SettingMapValue = Record<string, SettingValue>;
|
|
35
|
+
export type SettingContextType = {
|
|
36
|
+
onUpdateSetting: (key: SettingKeys | string, value: any, datatype: SettingDataType, userId?: number, isPublic?: boolean) => void;
|
|
37
|
+
editedSetting: Record<string, {
|
|
38
|
+
value: any;
|
|
39
|
+
datatype: SettingDataType;
|
|
40
|
+
userId?: number;
|
|
41
|
+
isPublic: boolean;
|
|
42
|
+
}> | undefined;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=setting.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setting.type.d.ts","sourceRoot":"","sources":["../../../src/api/setting/setting.type.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,MAAM,WAAW;IACjB,oBAAoB,yBAAyB;IAC7C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,sBAAsB,2BAA2B;IACjD,qBAAqB,0BAA0B;IAC/C,6BAA6B,kCAAkC;IAC/D,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,iBAAiB,qBAAqB;IACtC,oBAAoB,yBAAyB;IAC7C,mBAAmB,wBAAwB;IAC3C,kBAAkB,wBAAwB;IAC1C,cAAc,mBAAmB;IACjC,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,sBAAsB,2BAA2B;IACjD,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;CACxC;AAKD,MAAM,MAAM,eAAe,GACrB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,cAAc,CAAC;AAKrB,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACxG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AAG1D,MAAM,MAAM,kBAAkB,GAAG;IAC7B,eAAe,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjI,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,SAAS,CAAA;CAC3H,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export var SettingKeys;
|
|
2
|
+
(function (SettingKeys) {
|
|
3
|
+
SettingKeys["LOCALE"] = "locale";
|
|
4
|
+
SettingKeys["SHOW_DEVELOPER_TOOLS"] = "show-developer-tools";
|
|
5
|
+
SettingKeys["BUSINESS_LOGO"] = "business-logo";
|
|
6
|
+
SettingKeys["BUSINESS_NAME"] = "business-name";
|
|
7
|
+
SettingKeys["BUSINESS_HOTLINE_PHONE"] = "business-hotline-phone";
|
|
8
|
+
SettingKeys["BUSINESS_INTRODUCTION"] = "business-introduction";
|
|
9
|
+
SettingKeys["BUSINESS_HEADQUARTERS_ADDRESS"] = "business-headquarters-address";
|
|
10
|
+
SettingKeys["DATE_FORMAT"] = "date-format";
|
|
11
|
+
SettingKeys["TIMEZONE"] = "timezone";
|
|
12
|
+
SettingKeys["NAVIGATION_OERDER"] = "navigation-order";
|
|
13
|
+
SettingKeys["DASHBOARD_VIEW_ORDER"] = "dashboard-view-order";
|
|
14
|
+
SettingKeys["HOME_SHORTCUT_ORDER"] = "home-shortcut-order";
|
|
15
|
+
SettingKeys["PLUGIN_VIEW_FILTER"] = "plugin-view-filiter";
|
|
16
|
+
SettingKeys["FAVOURITE_PAGE"] = "favourite-page";
|
|
17
|
+
SettingKeys["THEME"] = "theme";
|
|
18
|
+
SettingKeys["FONT_STYLE"] = "font-style";
|
|
19
|
+
SettingKeys["FONT_SIZE"] = "font-size";
|
|
20
|
+
SettingKeys["PRIMARY_COLOR"] = "primary-color";
|
|
21
|
+
SettingKeys["HOME_TOUR_CLICKED"] = "home-tour-clicked";
|
|
22
|
+
SettingKeys["DUN_SHOW_TUTORIAL_CARD"] = "dun-show-tutorial-card";
|
|
23
|
+
SettingKeys["APP_LOCK_TIMER"] = "app-lock-timer";
|
|
24
|
+
SettingKeys["APP_PIN"] = "app-pin";
|
|
25
|
+
SettingKeys["KEEP_APP_AWAKE"] = "keep-app-awake";
|
|
26
|
+
SettingKeys["REDUCE_ANIMATION"] = "reduce-animation";
|
|
27
|
+
})(SettingKeys || (SettingKeys = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
|
|
3
|
+
import type { CreateTagDto, TagDto } from "./tag.dto";
|
|
4
|
+
export declare const fetchTagApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number, search?: string) => Promise<TagDto[]>>;
|
|
5
|
+
export declare function useTagQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<TagDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<TagDto[]>, Error>;
|
|
6
|
+
export declare const createTagApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: CreateTagDto) => Promise<TagDto>>;
|
|
7
|
+
export declare function useCreateTagQuery(): import("@tanstack/react-query").UseMutationResult<TagDto, Error, CreateTagDto, unknown>;
|
|
8
|
+
export declare const findTagByStartwithApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(query: string, skip: number, limit: number) => Promise<TagDto[]>>;
|
|
9
|
+
export declare function useFindTagStartWithQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<TagDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<TagDto[]>, Error>;
|
|
10
|
+
//# sourceMappingURL=tag.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.api.d.ts","sourceRoot":"","sources":["../../../src/api/tag/tag.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAc,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOtD,eAAO,MAAM,WAAW,iEAEE,MAAM,SAAS,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAMlF,CAAC;AAEH,wBAAgB,WAAW,CACvB,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,4EASnE;AAOD,eAAO,MAAM,YAAY,iEAEC,YAAY,KAAG,OAAO,CAAC,MAAM,CAAC,CAItD,CAAC;AACH,wBAAgB,iBAAiB,4FAQhC;AAMD,eAAO,MAAM,qBAAqB,kEAEP,MAAM,QAAQ,MAAM,SAAS,MAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIhF,CAAC;AAEH,wBAAgB,wBAAwB,CACpC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,4EASnE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 fetchTagApi = withApiMetadataFetchFn({
|
|
9
|
+
api: { method: 'GET', url: '/tags' },
|
|
10
|
+
fetchFn: async (skip, limit, search) => {
|
|
11
|
+
let url = `/tags?skip=${skip}&limit=${limit}`;
|
|
12
|
+
if (search)
|
|
13
|
+
url += `&search=${encodeURIComponent(search)}`;
|
|
14
|
+
const response = await axiosClient.get(url);
|
|
15
|
+
return response.data.payload;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const TAG_QUERY_KEY = 'tag-cache-key';
|
|
19
|
+
export function useTagQuery(query = {}, option) {
|
|
20
|
+
const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
|
|
21
|
+
return useQuery({
|
|
22
|
+
queryFn: () => fetchTagApi.fetchFn(skip, pageSize, search ?? undefined),
|
|
23
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
24
|
+
queryKey: [TAG_QUERY_KEY, currentPage, pageSize, search],
|
|
25
|
+
...(option || {}),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export const createTagApi = withApiMetadataFetchFn({
|
|
29
|
+
api: { method: 'POST', url: '/tags' },
|
|
30
|
+
fetchFn: async (data) => {
|
|
31
|
+
const response = await axiosClient.post(`/tags`, new RequestDto(data));
|
|
32
|
+
return response.data.payload;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export function useCreateTagQuery() {
|
|
36
|
+
return useMutation({
|
|
37
|
+
mutationFn: (data) => createTagApi.fetchFn(data),
|
|
38
|
+
onSuccess() {
|
|
39
|
+
queryClient.invalidateQueries({ queryKey: [TAG_QUERY_KEY] });
|
|
40
|
+
queryClient.invalidateQueries({ queryKey: [TAG_FIND_QUERY_KEY] });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export const findTagByStartwithApi = withApiMetadataFetchFn({
|
|
45
|
+
api: { method: 'GET', url: '/tags/find' },
|
|
46
|
+
fetchFn: async (query, skip, limit) => {
|
|
47
|
+
const response = await axiosClient.get(`/tags/find?query=${query}&skip=${skip}&limit=${limit}`);
|
|
48
|
+
return response.data.payload;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const TAG_FIND_QUERY_KEY = 'tag-find-cache-key';
|
|
52
|
+
export function useFindTagStartWithQuery(query = {}, option) {
|
|
53
|
+
const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
|
|
54
|
+
return useQuery({
|
|
55
|
+
queryFn: () => findTagByStartwithApi.fetchFn(search ?? '', skip, pageSize),
|
|
56
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
57
|
+
queryKey: [TAG_FIND_QUERY_KEY, search, currentPage, pageSize],
|
|
58
|
+
...(option || {}),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.dto.d.ts","sourceRoot":"","sources":["../../../src/api/tag/tag.dto.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
import type { CreateTagDto, TagDto } from "./tag.dto";
|
|
4
|
+
export * from "./tag.dto";
|
|
5
|
+
export type CreateTagQuery = () => UseMutationResult<any, Error, CreateTagDto, unknown>;
|
|
6
|
+
export declare function useCreateTagQuery(): UseMutationResult<any, Error, CreateTagDto, unknown>;
|
|
7
|
+
export type UseTagQuery = (query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<TagDto[]>, 'queryFn' | 'queryKey'>) => UseQueryResult<TagDto[], Error>;
|
|
8
|
+
export declare function useTagQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<TagDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<TagDto[], Error>;
|
|
9
|
+
export declare function useFindTagStartWithQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<TagDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<TagDto[], Error>;
|
|
10
|
+
//# sourceMappingURL=tag.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.export.d.ts","sourceRoot":"","sources":["../../../src/api/tag/tag.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACtD,cAAc,WAAW,CAAC;AAO1B,MAAM,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,CAAA;AACvF,wBAAgB,iBAAiB,yDAEhC;AAKD,MAAM,MAAM,WAAW,GAAG,CACtB,KAAK,CAAC,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,KAC/D,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,CAAA;AACpC,wBAAgB,WAAW,CACvB,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,mCAGnE;AAQD,wBAAgB,wBAAwB,CACpC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,mCAGnE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { APINames } from "../../export";
|
|
3
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
4
|
+
export * from "./tag.dto";
|
|
5
|
+
export function useCreateTagQuery() {
|
|
6
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useCreateTagQuery)();
|
|
7
|
+
}
|
|
8
|
+
export function useTagQuery(query = {}, option) {
|
|
9
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useTagQuery)(query, option);
|
|
10
|
+
}
|
|
11
|
+
export function useFindTagStartWithQuery(query = {}, option) {
|
|
12
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useFindTagStartWithQuery)(query, option);
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UnitOfConversionDto } from './uoc.type';
|
|
2
|
+
import type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
export * from './uoc.type';
|
|
4
|
+
export declare function useUnitOfConversionQuery(fromId: number, option?: Omit<UseQueryOptions<UnitOfConversionDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<UnitOfConversionDto[], Error>;
|
|
5
|
+
type UnitOfConversionToQueryDto = {
|
|
6
|
+
fromId: number;
|
|
7
|
+
toId: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function useUnitOfConversionToQuery(query: UnitOfConversionToQueryDto, option?: Omit<UseQueryOptions<UnitOfConversionDto | undefined>, 'queryFn' | 'queryKey'>): UseQueryResult<UnitOfConversionDto | undefined, Error>;
|
|
10
|
+
export declare function useAllUnitOfConversionQuery(option?: Omit<UseQueryOptions<UnitOfConversionDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<UnitOfConversionDto[], Error>;
|
|
11
|
+
//# sourceMappingURL=uoc.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uoc.export.d.ts","sourceRoot":"","sources":["../../../src/api/unit/uoc.export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E,cAAc,YAAY,CAAA;AAU1B,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,mBAAmB,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,gDAGhF;AAKD,KAAK,0BAA0B,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB,CAAA;AAKD,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,0BAA0B,EACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,mBAAmB,GAAG,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,0DAG1F;AAQD,wBAAgB,2BAA2B,CACvC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,mBAAmB,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,gDAGhF"}
|
|
@@ -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 './uoc.type';
|
|
5
|
+
export function useUnitOfConversionQuery(fromId, option) {
|
|
6
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useUnitOfConversionQuery)(fromId, option);
|
|
7
|
+
}
|
|
8
|
+
export function useUnitOfConversionToQuery(query, option) {
|
|
9
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useUnitOfConversionToQuery)(query, option);
|
|
10
|
+
}
|
|
11
|
+
export function useAllUnitOfConversionQuery(option) {
|
|
12
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useAllUnitOfConversionQuery)(option);
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type UpdateUnitOfConversionDto = {
|
|
2
|
+
fromUnitId: number;
|
|
3
|
+
toUnitId: number;
|
|
4
|
+
conversionFactor: number;
|
|
5
|
+
};
|
|
6
|
+
export type UnitOfConversionDto = {
|
|
7
|
+
fromUnitId: number;
|
|
8
|
+
toUnitId: number;
|
|
9
|
+
conversionFactor: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=uoc.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uoc.type.d.ts","sourceRoot":"","sources":["../../../src/api/unit/uoc.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAA;CAC3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
import type { CreateUnitMeasurementDto, UnitMeasurementDto, UpdateUnitMeasurementDto } from "./uom.type";
|
|
4
|
+
export * from './uom.type';
|
|
5
|
+
export declare function useUnitMeasurementQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<UnitMeasurementDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<UnitMeasurementDto[], Error>;
|
|
6
|
+
type UpdateUnitMeasurement = () => UseMutationResult<any, Error, {
|
|
7
|
+
id: number;
|
|
8
|
+
data: UpdateUnitMeasurementDto;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
export declare function useUpdateUnitMeasurementQuery(): UpdateUnitMeasurement;
|
|
11
|
+
type CreateUnitMeasurement = () => UseMutationResult<any, Error, CreateUnitMeasurementDto, unknown>;
|
|
12
|
+
export declare function useCreateUnitMeasurementQuery(): CreateUnitMeasurement;
|
|
13
|
+
export declare function useUnitMeasurementByCategoryQuery(categoryId: number, option?: Omit<UseQueryOptions<UnitMeasurementDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<UnitMeasurementDto[], Error>;
|
|
14
|
+
//# sourceMappingURL=uom.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.export.d.ts","sourceRoot":"","sources":["../../../src/api/unit/uom.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,wBAAwB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEzG,cAAc,YAAY,CAAA;AAS1B,wBAAgB,uBAAuB,CACnC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,+CAG/E;AAID,KAAK,qBAAqB,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,wBAAwB,CAAC;CAClC,EAAE,OAAO,CAAC,CAAA;AACX,wBAAgB,6BAA6B,0BAE5C;AAKD,KAAK,qBAAqB,GAAG,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,wBAAwB,EAAE,OAAO,CAAC,CAAA;AACnG,wBAAgB,6BAA6B,0BAE5C;AAQD,wBAAgB,iCAAiC,CAC7C,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,+CAG/E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { APINames } from "../../export";
|
|
3
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
4
|
+
export * from './uom.type';
|
|
5
|
+
export function useUnitMeasurementQuery(query = {}, option) {
|
|
6
|
+
return PluginAPI.use('builtin', APINames.useUnitMeasurementQuery)(query, option);
|
|
7
|
+
}
|
|
8
|
+
export function useUpdateUnitMeasurementQuery() {
|
|
9
|
+
return PluginAPI.use('builtin', APINames.useUnitMeasurementQuery);
|
|
10
|
+
}
|
|
11
|
+
export function useCreateUnitMeasurementQuery() {
|
|
12
|
+
return PluginAPI.use('builtin', APINames.useCreateUnitMeasurementQuery);
|
|
13
|
+
}
|
|
14
|
+
export function useUnitMeasurementByCategoryQuery(categoryId, option) {
|
|
15
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useUnitMeasurementByCategoryQuery)(categoryId, option);
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface UnitCategoryDto {
|
|
2
|
+
id?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
createdAt?: string;
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UnitMeasurementDto {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
code: string;
|
|
13
|
+
isBase: boolean;
|
|
14
|
+
category: UnitCategoryDto;
|
|
15
|
+
categoryId: number;
|
|
16
|
+
}
|
|
17
|
+
export interface UpdateUnitMeasurementDto {
|
|
18
|
+
name: string;
|
|
19
|
+
symbol: string;
|
|
20
|
+
code: string;
|
|
21
|
+
isBase: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface CreateUnitMeasurementDto {
|
|
24
|
+
name: string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
code: string;
|
|
27
|
+
isBase: boolean;
|
|
28
|
+
categoryId: number;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=uom.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uom.type.d.ts","sourceRoot":"","sources":["../../../src/api/unit/uom.type.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;CACnB;AAGD,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { type RequestIndexPaginationDto, type ResponseDto } from "@quan-erp/shared-frontend-core";
|
|
3
|
+
import type { ChangePasswordDto, CreateUserDto, DeactivateAccountDto, LoggedInDevicesDto, ResetPasswordDto, UpdateUserDto, UserDto } from "./user.type";
|
|
4
|
+
import type { AxiosError } from "axios";
|
|
5
|
+
export declare function getNewAccessToken(): Promise<{
|
|
6
|
+
accessToken: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const getUsersApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number, search?: string) => Promise<UserDto[]>>;
|
|
10
|
+
export declare const updateUserByIdApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: string, user: UpdateUserDto) => Promise<ResponseDto<any>>>;
|
|
11
|
+
export declare function useUserQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<UserDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<UserDto[]>, Error>;
|
|
12
|
+
export declare function useUpdateUserQuery(): import("@tanstack/react-query").UseMutationResult<ResponseDto<any>, Error, {
|
|
13
|
+
id: string;
|
|
14
|
+
user: UpdateUserDto;
|
|
15
|
+
}, unknown>;
|
|
16
|
+
export declare const createUserApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(user: CreateUserDto) => Promise<ResponseDto<any>>>;
|
|
17
|
+
export declare function useCreateUserQuery(): import("@tanstack/react-query").UseMutationResult<ResponseDto<any>, AxiosError<any, any, any>, CreateUserDto, unknown>;
|
|
18
|
+
export declare const changePasswordApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: ChangePasswordDto) => Promise<any>>;
|
|
19
|
+
export declare function useChangePasswordQuery(): import("@tanstack/react-query").UseMutationResult<any, Error, ChangePasswordDto, unknown>;
|
|
20
|
+
export declare const resetPasswordApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: ResetPasswordDto) => Promise<any>>;
|
|
21
|
+
export declare function useResetPasswordQuery(): import("@tanstack/react-query").UseMutationResult<any, Error, ResetPasswordDto, unknown>;
|
|
22
|
+
export declare const getLoggedInDevicesApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number) => Promise<LoggedInDevicesDto[]>>;
|
|
23
|
+
export declare function useLoggedInDeviceQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<LoggedInDevicesDto[]>, 'queryFn' | 'queryKey'>): import("@tanstack/react-query").UseQueryResult<NoInfer<LoggedInDevicesDto[]>, Error>;
|
|
24
|
+
export declare const logoutDeviceApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number) => Promise<LoggedInDevicesDto[]>>;
|
|
25
|
+
export declare function useLogoutDeviceQuery(): import("@tanstack/react-query").UseMutationResult<LoggedInDevicesDto[], Error, number, unknown>;
|
|
26
|
+
export declare const deactivateAccountApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: DeactivateAccountDto) => Promise<any>>;
|
|
27
|
+
export declare function useDeactivateAccountQuery(): import("@tanstack/react-query").UseMutationResult<any, Error, DeactivateAccountDto, unknown>;
|
|
28
|
+
//# sourceMappingURL=user.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.api.d.ts","sourceRoot":"","sources":["../../../src/api/user/user.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAc,KAAK,yBAAyB,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE9G,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxJ,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASxC,wBAAsB,iBAAiB,IAAI,OAAO,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAA;CACvB,CAAC,CAGD;AAID,eAAO,MAAM,WAAW,iEAEE,MAAM,SAAS,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAUnF,CAAC;AAMH,eAAO,MAAM,iBAAiB,+DAEN,MAAM,QAAQ,aAAa,KAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAI7E,CAAC;AASH,wBAAgB,YAAY,CACxB,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,6EAUpE;AAUD,wBAAgB,kBAAkB;QAEO,MAAM;UAAQ,aAAa;YAKnE;AAQD,eAAO,MAAM,aAAa,iEAEA,aAAa,+BAKrC,CAAC;AAIH,wBAAgB,kBAAkB,2HAWjC;AAWD,eAAO,MAAM,iBAAiB,iEAEJ,iBAAiB,kBAIzC,CAAC;AACH,wBAAgB,sBAAsB,8FAIrC;AAQD,eAAO,MAAM,gBAAgB,iEAEH,gBAAgB,kBAIxC,CAAC;AACH,wBAAgB,qBAAqB,6FAIpC;AAUD,eAAO,MAAM,qBAAqB,iEAER,MAAM,SAAS,MAAM,KAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAI7E,CAAC;AAEH,wBAAgB,sBAAsB,CAClC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,wFAS/E;AAMD,eAAO,MAAM,eAAe,+DAEJ,MAAM,KAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAI5D,CAAC;AACH,wBAAgB,oBAAoB,oGAOnC;AAID,eAAO,MAAM,oBAAoB,iEAEP,oBAAoB,kBAI5C,CAAC;AAEH,wBAAgB,yBAAyB,iGAOxC"}
|