@spacecorexdev/core 0.0.5 → 0.1.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 (368) hide show
  1. package/dist/api/index.js +1 -0
  2. package/dist/contract.js +1 -0
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/index.js +7 -0
  5. package/{src → dist}/styles/ant-table.css +5 -26
  6. package/{src → dist}/styles/index.css +8 -8
  7. package/dist/types/index.js +1 -0
  8. package/dist/ui/index.js +1 -0
  9. package/dist/utils/index.js +7 -0
  10. package/package.json +67 -70
  11. package/types/api/project.d.ts +9 -1
  12. package/types/hooks.d.ts +1 -1
  13. package/types/index.d.ts +4 -4
  14. package/types/types/index.d.ts +1 -3
  15. package/types/types/project/base.d.ts +3 -1
  16. package/types/types/project/index.d.ts +1 -0
  17. package/types/types/project/member.d.ts +1 -1
  18. package/types/types/project/projectRole.d.ts +17 -0
  19. package/types/types/projectRole.d.ts +2 -2
  20. package/types/ui/FileManager/types.d.ts +1 -5
  21. package/types/ui/FileManager/utils/fileUtils.d.ts +0 -16
  22. package/types/ui/ResizableTable/index.d.ts +7 -0
  23. package/types/ui/RoleSelector/index.d.ts +7 -1
  24. package/types/ui/UIFilePreview/RichDocEditor/index.d.ts +0 -13
  25. package/types/ui/UIFilePreview/WordEditor/style.d.ts +0 -6
  26. package/types/ui/UIFileUpload.d.ts +2 -2
  27. package/types/ui/index.d.ts +1 -10
  28. package/types/ui/upload/index.d.ts +6 -0
  29. package/types/ui.d.ts +1 -1
  30. package/types/utils/CacheIndexedDB.d.ts +9 -0
  31. package/types/utils/index.d.ts +2 -2
  32. package/types/utils/mailto.d.ts +12 -0
  33. package/types/utils.d.ts +1 -1
  34. package/public/cmaps/78-EUC-H.bcmap +0 -0
  35. package/public/cmaps/78-EUC-V.bcmap +0 -0
  36. package/public/cmaps/78-H.bcmap +0 -0
  37. package/public/cmaps/78-RKSJ-H.bcmap +0 -0
  38. package/public/cmaps/78-RKSJ-V.bcmap +0 -0
  39. package/public/cmaps/78-V.bcmap +0 -0
  40. package/public/cmaps/78ms-RKSJ-H.bcmap +0 -0
  41. package/public/cmaps/78ms-RKSJ-V.bcmap +0 -0
  42. package/public/cmaps/83pv-RKSJ-H.bcmap +0 -0
  43. package/public/cmaps/90ms-RKSJ-H.bcmap +0 -0
  44. package/public/cmaps/90ms-RKSJ-V.bcmap +0 -0
  45. package/public/cmaps/90msp-RKSJ-H.bcmap +0 -0
  46. package/public/cmaps/90msp-RKSJ-V.bcmap +0 -0
  47. package/public/cmaps/90pv-RKSJ-H.bcmap +0 -0
  48. package/public/cmaps/90pv-RKSJ-V.bcmap +0 -0
  49. package/public/cmaps/Add-H.bcmap +0 -0
  50. package/public/cmaps/Add-RKSJ-H.bcmap +0 -0
  51. package/public/cmaps/Add-RKSJ-V.bcmap +0 -0
  52. package/public/cmaps/Add-V.bcmap +0 -0
  53. package/public/cmaps/Adobe-CNS1-0.bcmap +0 -0
  54. package/public/cmaps/Adobe-CNS1-1.bcmap +0 -0
  55. package/public/cmaps/Adobe-CNS1-2.bcmap +0 -0
  56. package/public/cmaps/Adobe-CNS1-3.bcmap +0 -0
  57. package/public/cmaps/Adobe-CNS1-4.bcmap +0 -0
  58. package/public/cmaps/Adobe-CNS1-5.bcmap +0 -0
  59. package/public/cmaps/Adobe-CNS1-6.bcmap +0 -0
  60. package/public/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  61. package/public/cmaps/Adobe-GB1-0.bcmap +0 -0
  62. package/public/cmaps/Adobe-GB1-1.bcmap +0 -0
  63. package/public/cmaps/Adobe-GB1-2.bcmap +0 -0
  64. package/public/cmaps/Adobe-GB1-3.bcmap +0 -0
  65. package/public/cmaps/Adobe-GB1-4.bcmap +0 -0
  66. package/public/cmaps/Adobe-GB1-5.bcmap +0 -0
  67. package/public/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  68. package/public/cmaps/Adobe-Japan1-0.bcmap +0 -0
  69. package/public/cmaps/Adobe-Japan1-1.bcmap +0 -0
  70. package/public/cmaps/Adobe-Japan1-2.bcmap +0 -0
  71. package/public/cmaps/Adobe-Japan1-3.bcmap +0 -0
  72. package/public/cmaps/Adobe-Japan1-4.bcmap +0 -0
  73. package/public/cmaps/Adobe-Japan1-5.bcmap +0 -0
  74. package/public/cmaps/Adobe-Japan1-6.bcmap +0 -0
  75. package/public/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  76. package/public/cmaps/Adobe-Korea1-0.bcmap +0 -0
  77. package/public/cmaps/Adobe-Korea1-1.bcmap +0 -0
  78. package/public/cmaps/Adobe-Korea1-2.bcmap +0 -0
  79. package/public/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  80. package/public/cmaps/B5-H.bcmap +0 -0
  81. package/public/cmaps/B5-V.bcmap +0 -0
  82. package/public/cmaps/B5pc-H.bcmap +0 -0
  83. package/public/cmaps/B5pc-V.bcmap +0 -0
  84. package/public/cmaps/CNS-EUC-H.bcmap +0 -0
  85. package/public/cmaps/CNS-EUC-V.bcmap +0 -0
  86. package/public/cmaps/CNS1-H.bcmap +0 -0
  87. package/public/cmaps/CNS1-V.bcmap +0 -0
  88. package/public/cmaps/CNS2-H.bcmap +0 -0
  89. package/public/cmaps/CNS2-V.bcmap +0 -3
  90. package/public/cmaps/ETHK-B5-H.bcmap +0 -0
  91. package/public/cmaps/ETHK-B5-V.bcmap +0 -0
  92. package/public/cmaps/ETen-B5-H.bcmap +0 -0
  93. package/public/cmaps/ETen-B5-V.bcmap +0 -0
  94. package/public/cmaps/ETenms-B5-H.bcmap +0 -3
  95. package/public/cmaps/ETenms-B5-V.bcmap +0 -0
  96. package/public/cmaps/EUC-H.bcmap +0 -0
  97. package/public/cmaps/EUC-V.bcmap +0 -0
  98. package/public/cmaps/Ext-H.bcmap +0 -0
  99. package/public/cmaps/Ext-RKSJ-H.bcmap +0 -0
  100. package/public/cmaps/Ext-RKSJ-V.bcmap +0 -0
  101. package/public/cmaps/Ext-V.bcmap +0 -0
  102. package/public/cmaps/GB-EUC-H.bcmap +0 -0
  103. package/public/cmaps/GB-EUC-V.bcmap +0 -0
  104. package/public/cmaps/GB-H.bcmap +0 -4
  105. package/public/cmaps/GB-V.bcmap +0 -0
  106. package/public/cmaps/GBK-EUC-H.bcmap +0 -0
  107. package/public/cmaps/GBK-EUC-V.bcmap +0 -0
  108. package/public/cmaps/GBK2K-H.bcmap +0 -0
  109. package/public/cmaps/GBK2K-V.bcmap +0 -0
  110. package/public/cmaps/GBKp-EUC-H.bcmap +0 -0
  111. package/public/cmaps/GBKp-EUC-V.bcmap +0 -0
  112. package/public/cmaps/GBT-EUC-H.bcmap +0 -0
  113. package/public/cmaps/GBT-EUC-V.bcmap +0 -0
  114. package/public/cmaps/GBT-H.bcmap +0 -0
  115. package/public/cmaps/GBT-V.bcmap +0 -0
  116. package/public/cmaps/GBTpc-EUC-H.bcmap +0 -0
  117. package/public/cmaps/GBTpc-EUC-V.bcmap +0 -0
  118. package/public/cmaps/GBpc-EUC-H.bcmap +0 -0
  119. package/public/cmaps/GBpc-EUC-V.bcmap +0 -0
  120. package/public/cmaps/H.bcmap +0 -0
  121. package/public/cmaps/HKdla-B5-H.bcmap +0 -0
  122. package/public/cmaps/HKdla-B5-V.bcmap +0 -0
  123. package/public/cmaps/HKdlb-B5-H.bcmap +0 -0
  124. package/public/cmaps/HKdlb-B5-V.bcmap +0 -0
  125. package/public/cmaps/HKgccs-B5-H.bcmap +0 -0
  126. package/public/cmaps/HKgccs-B5-V.bcmap +0 -0
  127. package/public/cmaps/HKm314-B5-H.bcmap +0 -0
  128. package/public/cmaps/HKm314-B5-V.bcmap +0 -0
  129. package/public/cmaps/HKm471-B5-H.bcmap +0 -0
  130. package/public/cmaps/HKm471-B5-V.bcmap +0 -0
  131. package/public/cmaps/HKscs-B5-H.bcmap +0 -0
  132. package/public/cmaps/HKscs-B5-V.bcmap +0 -0
  133. package/public/cmaps/Hankaku.bcmap +0 -0
  134. package/public/cmaps/Hiragana.bcmap +0 -0
  135. package/public/cmaps/KSC-EUC-H.bcmap +0 -0
  136. package/public/cmaps/KSC-EUC-V.bcmap +0 -0
  137. package/public/cmaps/KSC-H.bcmap +0 -0
  138. package/public/cmaps/KSC-Johab-H.bcmap +0 -0
  139. package/public/cmaps/KSC-Johab-V.bcmap +0 -0
  140. package/public/cmaps/KSC-V.bcmap +0 -0
  141. package/public/cmaps/KSCms-UHC-H.bcmap +0 -0
  142. package/public/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  143. package/public/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  144. package/public/cmaps/KSCms-UHC-V.bcmap +0 -0
  145. package/public/cmaps/KSCpc-EUC-H.bcmap +0 -0
  146. package/public/cmaps/KSCpc-EUC-V.bcmap +0 -0
  147. package/public/cmaps/Katakana.bcmap +0 -0
  148. package/public/cmaps/LICENSE +0 -36
  149. package/public/cmaps/NWP-H.bcmap +0 -0
  150. package/public/cmaps/NWP-V.bcmap +0 -0
  151. package/public/cmaps/RKSJ-H.bcmap +0 -0
  152. package/public/cmaps/RKSJ-V.bcmap +0 -0
  153. package/public/cmaps/Roman.bcmap +0 -0
  154. package/public/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  155. package/public/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  156. package/public/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  157. package/public/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  158. package/public/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  159. package/public/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  160. package/public/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  161. package/public/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  162. package/public/cmaps/UniGB-UCS2-H.bcmap +0 -0
  163. package/public/cmaps/UniGB-UCS2-V.bcmap +0 -0
  164. package/public/cmaps/UniGB-UTF16-H.bcmap +0 -0
  165. package/public/cmaps/UniGB-UTF16-V.bcmap +0 -0
  166. package/public/cmaps/UniGB-UTF32-H.bcmap +0 -0
  167. package/public/cmaps/UniGB-UTF32-V.bcmap +0 -0
  168. package/public/cmaps/UniGB-UTF8-H.bcmap +0 -0
  169. package/public/cmaps/UniGB-UTF8-V.bcmap +0 -0
  170. package/public/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  171. package/public/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  172. package/public/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  173. package/public/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  174. package/public/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  175. package/public/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  176. package/public/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  177. package/public/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  178. package/public/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  179. package/public/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  180. package/public/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  181. package/public/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  182. package/public/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  183. package/public/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  184. package/public/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  185. package/public/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  186. package/public/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  187. package/public/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  188. package/public/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  189. package/public/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  190. package/public/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  191. package/public/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  192. package/public/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  193. package/public/cmaps/UniKS-UCS2-H.bcmap +0 -0
  194. package/public/cmaps/UniKS-UCS2-V.bcmap +0 -0
  195. package/public/cmaps/UniKS-UTF16-H.bcmap +0 -0
  196. package/public/cmaps/UniKS-UTF16-V.bcmap +0 -0
  197. package/public/cmaps/UniKS-UTF32-H.bcmap +0 -0
  198. package/public/cmaps/UniKS-UTF32-V.bcmap +0 -0
  199. package/public/cmaps/UniKS-UTF8-H.bcmap +0 -0
  200. package/public/cmaps/UniKS-UTF8-V.bcmap +0 -0
  201. package/public/cmaps/V.bcmap +0 -0
  202. package/public/cmaps/WP-Symbol.bcmap +0 -0
  203. package/public/polyfills/polyfills.js +0 -802
  204. package/public/vendor/docx/docx.worker.js +0 -5
  205. package/public/vendor/docx/jszip.min.js +0 -13
  206. package/public/vendor/libarchive/libarchive.wasm +0 -0
  207. package/public/vendor/libarchive/worker-bundle.js +0 -6
  208. package/public/vendor/pptx/pptx.worker.js +0 -26
  209. package/public/wasm/cad/0.8.2/dwfv-render.wasm +0 -0
  210. package/public/wasm/cad/0.8.2/dwg-worker.js +0 -24
  211. package/public/wasm/cad/0.8.2/dwg-worker.js.map +0 -1
  212. package/public/wasm/cad/0.8.2/libredwg-web.js +0 -2
  213. package/public/wasm/cad/0.8.2/libredwg-web.wasm +0 -0
  214. package/public/wasm/cad/dwfv-render.wasm +0 -0
  215. package/public/wasm/cad/dwg-worker.js +0 -24
  216. package/public/wasm/cad/dwg-worker.js.map +0 -1
  217. package/public/wasm/cad/libredwg-web.js +0 -2
  218. package/public/wasm/cad/libredwg-web.wasm +0 -0
  219. package/public/wasm/data/sql-wasm.wasm +0 -0
  220. package/public/wasm/hdiff.wasm +0 -0
  221. package/public/wasm/model/LICENSE.occt-import-js.txt +0 -504
  222. package/public/wasm/model/LICENSE.occt.txt +0 -502
  223. package/public/wasm/model/occt-import-js.js +0 -19
  224. package/public/wasm/model/occt-import-js.wasm +0 -0
  225. package/public/wasm/model/occt-worker.js +0 -83
  226. package/public/wasm/typst/fonts/DejaVuSansMono-Bold.ttf +0 -0
  227. package/public/wasm/typst/fonts/DejaVuSansMono-BoldOblique.ttf +0 -0
  228. package/public/wasm/typst/fonts/DejaVuSansMono-Oblique.ttf +0 -0
  229. package/public/wasm/typst/fonts/DejaVuSansMono.ttf +0 -0
  230. package/public/wasm/typst/fonts/LibertinusSerif-Bold.otf +0 -0
  231. package/public/wasm/typst/fonts/LibertinusSerif-BoldItalic.otf +0 -0
  232. package/public/wasm/typst/fonts/LibertinusSerif-Italic.otf +0 -0
  233. package/public/wasm/typst/fonts/LibertinusSerif-Regular.otf +0 -0
  234. package/public/wasm/typst/fonts/LibertinusSerif-Semibold.otf +0 -0
  235. package/public/wasm/typst/fonts/LibertinusSerif-SemiboldItalic.otf +0 -0
  236. package/public/wasm/typst/fonts/NewCM10-Bold.otf +0 -0
  237. package/public/wasm/typst/fonts/NewCM10-BoldItalic.otf +0 -0
  238. package/public/wasm/typst/fonts/NewCM10-Italic.otf +0 -0
  239. package/public/wasm/typst/fonts/NewCM10-Regular.otf +0 -0
  240. package/public/wasm/typst/fonts/NewCMMath-Bold.otf +0 -0
  241. package/public/wasm/typst/fonts/NewCMMath-Book.otf +0 -0
  242. package/public/wasm/typst/fonts/NewCMMath-Regular.otf +0 -0
  243. package/public/wasm/typst/fonts/README.md +0 -7
  244. package/public/wasm/typst/typst_ts_renderer_bg.wasm +0 -0
  245. package/public/wasm/typst/typst_ts_web_compiler_bg.wasm +0 -0
  246. package/scripts/patch-docx-grid.cjs +0 -412
  247. package/src/api/_base.ts +0 -243
  248. package/src/api/index.ts +0 -17
  249. package/src/api/project.ts +0 -1345
  250. package/src/api/user.ts +0 -1174
  251. package/src/contract.ts +0 -50
  252. package/src/hooks/index.ts +0 -2
  253. package/src/hooks/useLongPress.ts +0 -137
  254. package/src/hooks/useOnlineStatus.ts +0 -22
  255. package/src/index.ts +0 -14
  256. package/src/types/id.ts +0 -2
  257. package/src/types/index.ts +0 -5
  258. package/src/types/project/base.ts +0 -63
  259. package/src/types/project/contract.ts +0 -79
  260. package/src/types/project/contractStatus.tsx +0 -15
  261. package/src/types/project/index.ts +0 -5
  262. package/src/types/project/member.ts +0 -46
  263. package/src/types/project/progress.ts +0 -43
  264. package/src/types/projectRole.ts +0 -17
  265. package/src/types/theme.ts +0 -1
  266. package/src/types/user/index.ts +0 -1
  267. package/src/types/user/role.ts +0 -7
  268. package/src/ui/CommentTimeline/index.tsx +0 -330
  269. package/src/ui/FileManager/FileContextMenu.tsx +0 -628
  270. package/src/ui/FileManager/FileGridView.tsx +0 -529
  271. package/src/ui/FileManager/FileTableView.tsx +0 -405
  272. package/src/ui/FileManager/FileToolbar.tsx +0 -119
  273. package/src/ui/FileManager/FileVersionHistoryModal.tsx +0 -175
  274. package/src/ui/FileManager/MoveCopyToProjectModal.tsx +0 -119
  275. package/src/ui/FileManager/ShareToWechatModal.tsx +0 -419
  276. package/src/ui/FileManager/hooks/useFileManagerActions.ts +0 -2532
  277. package/src/ui/FileManager/hooks/useFileManagerState.ts +0 -419
  278. package/src/ui/FileManager/index.tsx +0 -580
  279. package/src/ui/FileManager/projectFileManagerApi.ts +0 -57
  280. package/src/ui/FileManager/types.ts +0 -184
  281. package/src/ui/FileManager/utils/fileDeltaWorker.ts +0 -193
  282. package/src/ui/FileManager/utils/fileTree.ts +0 -178
  283. package/src/ui/FileManager/utils/fileUpload.ts +0 -714
  284. package/src/ui/FileManager/utils/fileUtils.ts +0 -65
  285. package/src/ui/InvoiceRecordsList/index.tsx +0 -813
  286. package/src/ui/MyFileSelectorModal.tsx +0 -261
  287. package/src/ui/ProjectSelector/index.tsx +0 -472
  288. package/src/ui/ProjectSelector/projectCache.ts +0 -40
  289. package/src/ui/RoleSelector/index.tsx +0 -473
  290. package/src/ui/RoleSelector/roleCache.ts +0 -40
  291. package/src/ui/UIAlert.tsx +0 -399
  292. package/src/ui/UIAlertExample.tsx +0 -129
  293. package/src/ui/UIConfirm.tsx +0 -335
  294. package/src/ui/UIConfirmExample.tsx +0 -165
  295. package/src/ui/UIDatePicker.tsx +0 -146
  296. package/src/ui/UIDateRangePicker.tsx +0 -38
  297. package/src/ui/UIFilePreview/ExcelEditor/index.tsx +0 -617
  298. package/src/ui/UIFilePreview/ExcelEditor/types.ts +0 -24
  299. package/src/ui/UIFilePreview/ExportDropdown.css +0 -85
  300. package/src/ui/UIFilePreview/ExportDropdown.tsx +0 -109
  301. package/src/ui/UIFilePreview/IndexedDBUtils.ts +0 -564
  302. package/src/ui/UIFilePreview/MarkdownEditor/exportMarkdownPdf.ts +0 -576
  303. package/src/ui/UIFilePreview/MarkdownEditor/index.tsx +0 -677
  304. package/src/ui/UIFilePreview/MarkdownEditor/markdownEditor.css +0 -1005
  305. package/src/ui/UIFilePreview/MarkdownEditor/types.ts +0 -15
  306. package/src/ui/UIFilePreview/PPTXEditor/index.tsx +0 -602
  307. package/src/ui/UIFilePreview/RichDocEditor/exportRDocMarkdown.ts +0 -77
  308. package/src/ui/UIFilePreview/RichDocEditor/exportRDocPdf.ts +0 -374
  309. package/src/ui/UIFilePreview/RichDocEditor/index.tsx +0 -730
  310. package/src/ui/UIFilePreview/RichDocEditor/richdoc-editor.css +0 -59
  311. package/src/ui/UIFilePreview/UIFilePreview.tsx +0 -611
  312. package/src/ui/UIFilePreview/WordEditor/index.tsx +0 -3933
  313. package/src/ui/UIFilePreview/WordEditor/style.ts +0 -1213
  314. package/src/ui/UIFilePreview/WordEditor/word-editor.css +0 -999
  315. package/src/ui/UIFilePreview/filePreview.css +0 -193
  316. package/src/ui/UIFilePreview/filetypes/archive.tsx +0 -66
  317. package/src/ui/UIFilePreview/filetypes/cad.tsx +0 -287
  318. package/src/ui/UIFilePreview/filetypes/excel.tsx +0 -355
  319. package/src/ui/UIFilePreview/filetypes/image.tsx +0 -20
  320. package/src/ui/UIFilePreview/filetypes/imageLoader.ts +0 -63
  321. package/src/ui/UIFilePreview/filetypes/pdf.tsx +0 -156
  322. package/src/ui/UIFilePreview/filetypes/ppt.tsx +0 -535
  323. package/src/ui/UIFilePreview/filetypes/pptExportPdf.ts +0 -523
  324. package/src/ui/UIFilePreview/filetypes/video.tsx +0 -482
  325. package/src/ui/UIFilePreview/filetypes/word.tsx +0 -245
  326. package/src/ui/UIFilePreview/filetypes/wordExportMarkdown.ts +0 -86
  327. package/src/ui/UIFilePreview/filetypes/wordExportPdf.tsx +0 -427
  328. package/src/ui/UIFilePreview/index.ts +0 -35
  329. package/src/ui/UIFilePreview/pdfPagination.ts +0 -143
  330. package/src/ui/UIFilePreview/previewUtils.tsx +0 -531
  331. package/src/ui/UIFileUpload.tsx +0 -382
  332. package/src/ui/UIImageUpload.tsx +0 -195
  333. package/src/ui/UILoading.tsx +0 -255
  334. package/src/ui/UILoadingExample.tsx +0 -139
  335. package/src/ui/UISelect.tsx +0 -105
  336. package/src/ui/UIToast.tsx +0 -381
  337. package/src/ui/UIToastExample.tsx +0 -69
  338. package/src/ui/UIToastSingle.tsx +0 -279
  339. package/src/ui/UIViewToggle.tsx +0 -64
  340. package/src/ui/UserSelector/index.tsx +0 -583
  341. package/src/ui/index.ts +0 -84
  342. package/src/ui/upload/image.ts +0 -135
  343. package/src/ui/upload/index.ts +0 -73
  344. package/src/ui/upload/submitFile.ts +0 -106
  345. package/src/ui/upload/submitForm.ts +0 -124
  346. package/src/ui/upload/upload.err.ts +0 -15
  347. package/src/ui/upload/upload.ts +0 -250
  348. package/src/utils/CacheDepartmentInfo.ts +0 -372
  349. package/src/utils/CacheFileContent.ts +0 -315
  350. package/src/utils/CachePermissionInfo.ts +0 -235
  351. package/src/utils/CacheRoleInfo.ts +0 -303
  352. package/src/utils/CacheUserInfo.ts +0 -818
  353. package/src/utils/CacheViewToggleInfo.ts +0 -182
  354. package/src/utils/MessageContentUtils.ts +0 -268
  355. package/src/utils/clipboard.ts +0 -70
  356. package/src/utils/companyEmail.ts +0 -19
  357. package/src/utils/forbidDebugger.ts +0 -59
  358. package/src/utils/formatters.ts +0 -94
  359. package/src/utils/htmlUtils.tsx +0 -59
  360. package/src/utils/index.ts +0 -18
  361. package/src/utils/keyboard.ts +0 -114
  362. package/src/utils/mammothApi.ts +0 -16
  363. package/src/utils/polyfills.ts +0 -928
  364. package/src/utils/regex.ts +0 -14
  365. package/src/utils/storage.ts +0 -95
  366. package/src/utils/workerBootstrap.ts +0 -87
  367. /package/{src → dist}/styles/ant-modal.css +0 -0
  368. /package/{src → dist}/styles/ant-spin.css +0 -0
package/src/api/user.ts DELETED
@@ -1,1174 +0,0 @@
1
- 'use strict';
2
- /**
3
- * Copyright (c) 2025 SPACECORE Co.,Ltd. All Rights Reserved.
4
- * Author: brian.li
5
- * Desc:
6
- */
7
-
8
- import { HttpRequest, ResponseCode } from './_base';
9
- import type { ID } from '../types/id';
10
-
11
-
12
- /*
13
- * Admin
14
- */
15
- export const admin = {
16
- /*
17
- * 注册管理员
18
- * 注册管理员
19
- */
20
- registerAdmin: (
21
- data: {
22
- phone: string,
23
- email?: string,
24
- displayModules?: string,
25
- username: string,
26
- nickname?: string,
27
- pwd?: string,
28
- smsCode?: string
29
- }
30
- ): Promise<{
31
- code: ResponseCode,
32
- message?: string,
33
- data?: string
34
- }> => {
35
- return HttpRequest.post('/api/admin/registerAdmin', null, { phone:data.phone, email:data.email, displayModules:data.displayModules, username:data.username, nickname:data.nickname, pwd:data.pwd, smsCode:data.smsCode}).then((res:any) => {
36
- return res as any;
37
- });
38
- },
39
-
40
- /*
41
- * 注册普通用户
42
- * 注册普通用户
43
- */
44
- registerUser: (
45
- data: {
46
- phone: string,
47
- email?: string,
48
- displayModules?: string,
49
- username: string,
50
- nickname?: string,
51
- pwd?: string,
52
- smsCode?: string,
53
- manager_id?: string
54
- }
55
- ): Promise<{
56
- code: ResponseCode,
57
- message?: string,
58
- data?: string
59
- }> => {
60
- return HttpRequest.post('/api/admin/registerUser', null, { phone:data.phone, email:data.email, displayModules:data.displayModules, username:data.username, nickname:data.nickname, pwd:data.pwd, smsCode:data.smsCode, manager_id:data.manager_id}).then((res:any) => {
61
- return res as any;
62
- });
63
- },
64
-
65
- /*
66
- * 更新其他用户信息: 用户名与手机号
67
- * 更新其他用户信息: 用户名与手机号
68
- */
69
- updateInfoByAdmin: (
70
- data: {
71
- id?: string,
72
- is_forbidden: boolean,
73
- title: string,
74
- phone?: string,
75
- email?: string,
76
- displayModules?: string,
77
- username?: string,
78
- nickname?: string,
79
- pwd?: string,
80
- smsCode?: string,
81
- manager_id?: string,
82
- created_at: Date,
83
- tick_avatar_self?: number,
84
- role_ids?: string[],
85
- isAdmin?: boolean,
86
- thirdPlatformInfo?: { platform_user_id: string; platform_type: string; }[] | null,
87
- unreadMessageCount?: number
88
- }
89
- ): Promise<{
90
- code: ResponseCode,
91
- message?: string
92
- }> => {
93
- return HttpRequest.post('/api/admin/updateByAdmin', null, { id:data.id, is_forbidden:data.is_forbidden, title:data.title, phone:data.phone, email:data.email, displayModules:data.displayModules, username:data.username, nickname:data.nickname, pwd:data.pwd, smsCode:data.smsCode, manager_id:data.manager_id, created_at:data.created_at, tick_avatar_self:data.tick_avatar_self, role_ids:data.role_ids, isAdmin:data.isAdmin, thirdPlatformInfo:data.thirdPlatformInfo, unreadMessageCount:data.unreadMessageCount}).then((res:any) => {
94
- return res as any;
95
- });
96
- },
97
-
98
- /*
99
- * 获取管理员列表
100
- * 获取管理员列表
101
- */
102
- list: (
103
- params:{
104
- pageNum?: number,
105
- pageSize?: number
106
- }
107
- ): Promise<{
108
- code: ResponseCode,
109
- message?: string,
110
- data?: {
111
- total:number;
112
- list:{
113
- id: string,
114
- is_forbidden: boolean,
115
- title: string,
116
- phone: string,
117
- email: string,
118
- displayModules: string,
119
- username: string,
120
- nickname: string,
121
- pwd: string,
122
- smsCode: string,
123
- manager_id: string,
124
- created_at: Date,
125
- tick_avatar_self: number,
126
- role_ids: string[],
127
- isAdmin: boolean,
128
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
129
- unreadMessageCount: number
130
- }[];
131
- }
132
- }> => {
133
- return HttpRequest.get('/api/admin/list', { pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
134
- return res as any;
135
- });
136
- },
137
-
138
- }
139
- /*
140
- * Gateway
141
- */
142
- export const gateway = {
143
- /*
144
- * 注册用户
145
- * 注册用户
146
- */
147
- register: (
148
- data: {
149
- phone: string,
150
- email?: string,
151
- displayModules?: string,
152
- username: string,
153
- nickname?: string,
154
- pwd?: string,
155
- smsCode?: string,
156
- manager_id?: string
157
- }
158
- ): Promise<{
159
- code: ResponseCode,
160
- message?: string
161
- }> => {
162
- return HttpRequest.post('/api/register', null, { phone:data.phone, email:data.email, displayModules:data.displayModules, username:data.username, nickname:data.nickname, pwd:data.pwd, smsCode:data.smsCode, manager_id:data.manager_id}).then((res:any) => {
163
- return res as any;
164
- });
165
- },
166
-
167
- /*
168
- * 发送短信
169
- * 发送短信
170
- */
171
- sendSms: (
172
- params:{
173
- phone: string,
174
- imageCode: string
175
- }
176
- ): Promise<{
177
- code: ResponseCode,
178
- message?: string
179
- }> => {
180
- return HttpRequest.post('/api/sendSms', { phone:params.phone, imageCode:params.imageCode}, null).then((res:any) => {
181
- return res as any;
182
- });
183
- },
184
-
185
- /*
186
- * 判断是否登录
187
- * 判断是否登录
188
- */
189
- isLogin: (
190
-
191
- ): Promise<{
192
- code: ResponseCode,
193
- message?: string,
194
- data?: {
195
- user_id: string,
196
- isLogin: boolean,
197
- isAdmin: boolean,
198
- }
199
- }> => {
200
- return HttpRequest.get('/api/isLogin', null, null).then((res:any) => {
201
- return res as any;
202
- });
203
- },
204
-
205
- /*
206
- * 登录
207
- * 登录
208
- */
209
- login: (
210
- data: {
211
- phone: string,
212
- pwd?: string,
213
- pwdSN?: string,
214
- smsCode?: string
215
- }
216
- ): Promise<{
217
- code: ResponseCode,
218
- message?: string,
219
- data?: {
220
- user_id: string,
221
- type: "user" | "admin" | null,
222
- }
223
- }> => {
224
- return HttpRequest.post('/api/login', null, { phone:data.phone, pwd:data.pwd, pwdSN:data.pwdSN, smsCode:data.smsCode}).then((res:any) => {
225
- return res as any;
226
- });
227
- },
228
-
229
- /*
230
- * 校验当前登录用户的登录密码摘要,用于需要二次确认的业务入口。
231
- * 校验当前登录用户的登录密码摘要,用于需要二次确认的业务入口。
232
- */
233
- verifyPasswordHash: (
234
- data: {
235
- passwordHash: string,
236
- passwordSalt: string
237
- }
238
- ): Promise<{
239
- code: ResponseCode,
240
- message?: string,
241
- data?: boolean
242
- }> => {
243
- return HttpRequest.post('/api/verifyPasswordHash', null, { passwordHash:data.passwordHash, passwordSalt:data.passwordSalt}).then((res:any) => {
244
- return res as any;
245
- });
246
- },
247
-
248
- /*
249
- * 退出登录
250
- * 退出登录
251
- */
252
- logout: (
253
-
254
- ): Promise<{
255
- code: ResponseCode,
256
- message?: string
257
- }> => {
258
- return HttpRequest.get('/api/logout', null, null).then((res:any) => {
259
- return res as any;
260
- });
261
- },
262
-
263
- /*
264
- * 列出所有权限
265
- * 列出所有权限
266
- */
267
- listPermissions: (
268
-
269
- ): Promise<{
270
- code: ResponseCode,
271
- message?: string,
272
- data?: {
273
- [module: string]: {
274
- [subModule: string]: {
275
- permission: string,
276
- descs: string,
277
- }[]
278
- }
279
- }
280
- }> => {
281
- return HttpRequest.get('/api/listPermissions', null, null).then((res:any) => {
282
- return res as any;
283
- });
284
- },
285
-
286
- /*
287
- * 列出角色权限
288
- * 列出角色权限
289
- */
290
- listRolePermissions: (
291
- params:{
292
- id: string
293
- }
294
- ): Promise<{
295
- code: ResponseCode,
296
- message?: string,
297
- data?: {
298
- permission: string,
299
- descs: string,
300
- }[]
301
- }> => {
302
- return HttpRequest.get('/api/listRolePermissions', { id:params.id}, null).then((res:any) => {
303
- return res as any;
304
- });
305
- },
306
-
307
- }
308
- /*
309
- * Message
310
- */
311
- export const message = {
312
- /*
313
- * /api/user/message/list
314
- */
315
- list: (
316
- params:{
317
- pageNum?: number,
318
- pageSize?: number,
319
- unread_only?: boolean
320
- }
321
- ): Promise<{
322
- code: ResponseCode,
323
- message?: string,
324
- data?: {
325
- id: string,
326
- user_id: string,
327
- title: string,
328
- content: string,
329
- is_read: boolean,
330
- created_at: Date,
331
- updated_at: Date,
332
- }[]
333
- }> => {
334
- return HttpRequest.get('/api/user/message/list', { pageNum:params.pageNum, pageSize:params.pageSize, unread_only:params.unread_only}, null).then((res:any) => {
335
- return res as any;
336
- });
337
- },
338
-
339
- /*
340
- * /api/user/message/unread/count
341
- */
342
- countUnread: (
343
-
344
- ): Promise<{
345
- code: ResponseCode,
346
- message?: string,
347
- data?: {
348
- total:number;
349
- unread:number;
350
- }
351
- }> => {
352
- return HttpRequest.get('/api/user/message/unread/count', null, null).then((res:any) => {
353
- return res as any;
354
- });
355
- },
356
-
357
- /*
358
- * /api/user/message/read
359
- */
360
- markRead: (
361
- data: {
362
- messageIds: string[]
363
- }
364
- ): Promise<{
365
- code: ResponseCode,
366
- message?: string
367
- }> => {
368
- return HttpRequest.post('/api/user/message/read', null, { messageIds:data.messageIds}).then((res:any) => {
369
- return res as any;
370
- });
371
- },
372
-
373
- /*
374
- * 清除已读消息
375
- * 清除已读消息
376
- */
377
- clearReaded: (
378
- data: {
379
- messageIds?: string[]
380
- }
381
- ): Promise<{
382
- code: ResponseCode,
383
- message?: string
384
- }> => {
385
- return HttpRequest.delete('/api/user/message/clearReaded', null, { messageIds:data.messageIds}).then((res:any) => {
386
- return res as any;
387
- });
388
- },
389
-
390
- }
391
- /*
392
- * Role
393
- */
394
- export const role = {
395
- /*
396
- * 列出所有角色
397
- * 列出所有角色
398
- */
399
- listRoles: (
400
-
401
- ): Promise<{
402
- code: ResponseCode,
403
- message?: string,
404
- data?: {
405
- id: string,
406
- name: string,
407
- descs: string,
408
- created_at: Date,
409
- admin_id: string,
410
- parent_id: string,
411
- }[]
412
- }> => {
413
- return HttpRequest.get('/api/role/listRoles', null, null).then((res:any) => {
414
- return res as any;
415
- });
416
- },
417
-
418
- /*
419
- * 创建新角色
420
- * 创建新角色
421
- */
422
- createRole: (
423
- params:{
424
- name: string,
425
- descs?: string,
426
- admin_id?: string,
427
- parent_id?: string
428
- }
429
- ): Promise<{
430
- code: ResponseCode,
431
- message?: string,
432
- data?: string
433
- }> => {
434
- return HttpRequest.post('/api/role/createRole', { name:params.name, descs:params.descs, admin_id:params.admin_id, parent_id:params.parent_id}, null).then((res:any) => {
435
- return res as any;
436
- });
437
- },
438
-
439
- /*
440
- * 更新角色
441
- * 更新角色
442
- */
443
- updateRole: (
444
- params:{
445
- id: string,
446
- name: string,
447
- descs?: string,
448
- admin_id?: string,
449
- parent_id?: string
450
- }
451
- ): Promise<{
452
- code: ResponseCode,
453
- message?: string,
454
- data?: string
455
- }> => {
456
- return HttpRequest.post('/api/role/updateRole', { id:params.id, name:params.name, descs:params.descs, admin_id:params.admin_id, parent_id:params.parent_id}, null).then((res:any) => {
457
- return res as any;
458
- });
459
- },
460
-
461
- /*
462
- * 为角色分配权限
463
- * 为角色分配权限
464
- */
465
- assignPermissionsToRole: (
466
- data: {
467
- role_id: string,
468
- permissions: string[]
469
- }
470
- ): Promise<{
471
- code: ResponseCode,
472
- message?: string
473
- }> => {
474
- return HttpRequest.post('/api/role/assignPermissionsToRole', null, { role_id:data.role_id, permissions:data.permissions}).then((res:any) => {
475
- return res as any;
476
- });
477
- },
478
-
479
- /*
480
- * 为用户分配角色
481
- * 为用户分配角色
482
- */
483
- assignRoleToUserPermission: (
484
-
485
- ): Promise<{
486
- code: ResponseCode,
487
- message?: string
488
- }> => {
489
- return HttpRequest.post('/api/role/assignRoleToUserPermission', null, null).then((res:any) => {
490
- return res as any;
491
- });
492
- },
493
-
494
- /*
495
- * 为用户分配角色
496
- * 为用户分配角色
497
- */
498
- assignRoleToUser: (
499
- data: {
500
- user_id: string,
501
- role_ids: string[]
502
- }
503
- ): Promise<{
504
- code: ResponseCode,
505
- message?: string
506
- }> => {
507
- return HttpRequest.post('/api/role/assignRoleToUser', null, { user_id:data.user_id, role_ids:data.role_ids}).then((res:any) => {
508
- return res as any;
509
- });
510
- },
511
-
512
- /*
513
- * 获取用户拥有的所有角色
514
- * 获取用户拥有的所有角色
515
- */
516
- listUserRoles: (
517
- params:{
518
- user_id: string
519
- }
520
- ): Promise<{
521
- code: ResponseCode,
522
- message?: string,
523
- data?: {
524
- id: string,
525
- name: string,
526
- descs: string,
527
- created_at: Date,
528
- admin_id: string,
529
- parent_id: string,
530
- }[]
531
- }> => {
532
- return HttpRequest.get('/api/role/listUserRoles', { user_id:params.user_id}, null).then((res:any) => {
533
- return res as any;
534
- });
535
- },
536
-
537
- /*
538
- * 获取用户拥有的所有权限
539
- * 获取用户拥有的所有权限
540
- */
541
- listUserPermissions: (
542
- params:{
543
- user_id: string
544
- }
545
- ): Promise<{
546
- code: ResponseCode,
547
- message?: string,
548
- data?: {
549
- permission: string,
550
- descs: string,
551
- }[]
552
- }> => {
553
- return HttpRequest.get('/api/role/listUserPermissions', { user_id:params.user_id}, null).then((res:any) => {
554
- return res as any;
555
- });
556
- },
557
-
558
- /*
559
- * 列出所有部门
560
- * 列出所有部门
561
- */
562
- listCompanies: (
563
-
564
- ): Promise<{
565
- code: ResponseCode,
566
- message?: string,
567
- data?: {
568
- id: string,
569
- name: string,
570
- descs: string,
571
- created_at: Date,
572
- admin_id: string,
573
- parent_id: string,
574
- is_spv_company: boolean,
575
- }[]
576
- }> => {
577
- return HttpRequest.get('/api/role/listCompanies', null, null).then((res:any) => {
578
- return res as any;
579
- });
580
- },
581
-
582
- /*
583
- * 创建新公司
584
- * 创建新公司
585
- */
586
- createCompany: (
587
- params:{
588
- name: string,
589
- descs?: string,
590
- admin_id?: string,
591
- parent_id?: string,
592
- is_spv_company?: boolean
593
- }
594
- ): Promise<{
595
- code: ResponseCode,
596
- message?: string,
597
- data?: string
598
- }> => {
599
- return HttpRequest.post('/api/role/createCompany', { name:params.name, descs:params.descs, admin_id:params.admin_id, parent_id:params.parent_id, is_spv_company:params.is_spv_company}, null).then((res:any) => {
600
- return res as any;
601
- });
602
- },
603
-
604
- /*
605
- * 更新公司
606
- * 更新公司
607
- */
608
- updateCompany: (
609
- params:{
610
- id: string,
611
- name: string,
612
- descs?: string,
613
- admin_id?: string,
614
- parent_id?: string,
615
- is_spv_company?: boolean
616
- }
617
- ): Promise<{
618
- code: ResponseCode,
619
- message?: string,
620
- data?: string
621
- }> => {
622
- return HttpRequest.post('/api/role/updateCompany', { id:params.id, name:params.name, descs:params.descs, admin_id:params.admin_id, parent_id:params.parent_id, is_spv_company:params.is_spv_company}, null).then((res:any) => {
623
- return res as any;
624
- });
625
- },
626
-
627
- /*
628
- * 列出所有部门
629
- * 列出所有部门
630
- */
631
- listDepartments: (
632
-
633
- ): Promise<{
634
- code: ResponseCode,
635
- message?: string,
636
- data?: {
637
- id: string,
638
- name: string,
639
- descs: string,
640
- created_at: Date,
641
- admin_id: string,
642
- parent_id: string,
643
- company_id: string,
644
- }[]
645
- }> => {
646
- return HttpRequest.get('/api/role/listDepartments', null, null).then((res:any) => {
647
- return res as any;
648
- });
649
- },
650
-
651
- /*
652
- * 创建新部门
653
- * 创建新部门
654
- */
655
- createDepartment: (
656
- params:{
657
- name: string,
658
- descs?: string,
659
- admin_id?: string,
660
- company_id?: string,
661
- parent_id?: string
662
- }
663
- ): Promise<{
664
- code: ResponseCode,
665
- message?: string,
666
- data?: string
667
- }> => {
668
- return HttpRequest.post('/api/role/createDepartment', { name:params.name, descs:params.descs, admin_id:params.admin_id, company_id:params.company_id, parent_id:params.parent_id}, null).then((res:any) => {
669
- return res as any;
670
- });
671
- },
672
-
673
- /*
674
- * 更新部门
675
- * 更新部门
676
- */
677
- updateDepartment: (
678
- params:{
679
- id: string,
680
- name: string,
681
- descs?: string,
682
- admin_id?: string,
683
- company_id?: string,
684
- parent_id?: string
685
- }
686
- ): Promise<{
687
- code: ResponseCode,
688
- message?: string,
689
- data?: string
690
- }> => {
691
- return HttpRequest.post('/api/role/updateDepartment', { id:params.id, name:params.name, descs:params.descs, admin_id:params.admin_id, company_id:params.company_id, parent_id:params.parent_id}, null).then((res:any) => {
692
- return res as any;
693
- });
694
- },
695
-
696
- /*
697
- * 为用户分配部门
698
- * 为用户分配部门
699
- */
700
- assignUserToDepartment: (
701
- params:{
702
- user_id: string,
703
- department_id: string,
704
- position?: string
705
- }
706
- ): Promise<{
707
- code: ResponseCode,
708
- message?: string
709
- }> => {
710
- return HttpRequest.post('/api/role/assignUserToDepartment', { user_id:params.user_id, department_id:params.department_id, position:params.position}, null).then((res:any) => {
711
- return res as any;
712
- });
713
- },
714
-
715
- /*
716
- * 为用户移除部门
717
- * 为用户移除部门
718
- */
719
- removeUserFromDepartment: (
720
- params:{
721
- user_id: string,
722
- department_id: string
723
- }
724
- ): Promise<{
725
- code: ResponseCode,
726
- message?: string
727
- }> => {
728
- return HttpRequest.post('/api/role/removeUserFromDepartment', { user_id:params.user_id, department_id:params.department_id}, null).then((res:any) => {
729
- return res as any;
730
- });
731
- },
732
-
733
- /*
734
- * 获取公司拥有的所有部门
735
- * 获取公司拥有的所有部门
736
- */
737
- listCompanyDepartments: (
738
- params:{
739
- company_id: string
740
- }
741
- ): Promise<{
742
- code: ResponseCode,
743
- message?: string,
744
- data?: {
745
- id: string,
746
- name: string,
747
- descs: string,
748
- created_at: Date,
749
- admin_id: string,
750
- parent_id: string,
751
- company_id: string,
752
- position: string,
753
- }[]
754
- }> => {
755
- return HttpRequest.get('/api/role/listCompanyDepartments', { company_id:params.company_id}, null).then((res:any) => {
756
- return res as any;
757
- });
758
- },
759
-
760
- /*
761
- * 获取用户拥有的所有部门
762
- * 获取用户拥有的所有部门
763
- */
764
- listUserDepartments: (
765
- params:{
766
- user_id: string
767
- }
768
- ): Promise<{
769
- code: ResponseCode,
770
- message?: string,
771
- data?: {
772
- id: string,
773
- name: string,
774
- descs: string,
775
- created_at: Date,
776
- admin_id: string,
777
- parent_id: string,
778
- company_id: string,
779
- position: string,
780
- }[]
781
- }> => {
782
- return HttpRequest.get('/api/role/listUserDepartments', { user_id:params.user_id}, null).then((res:any) => {
783
- return res as any;
784
- });
785
- },
786
-
787
- /*
788
- * 获取用户拥有的所有部门
789
- * 获取用户拥有的所有部门
790
- */
791
- listDepartmentUsers: (
792
- params:{
793
- department_id: string
794
- }
795
- ): Promise<{
796
- code: ResponseCode,
797
- message?: string,
798
- data?: {
799
- id:ID;
800
- position:string;
801
- }[]
802
- }> => {
803
- return HttpRequest.get('/api/role/listDepartmentUsers', { department_id:params.department_id}, null).then((res:any) => {
804
- return res as any;
805
- });
806
- },
807
-
808
- }
809
- /*
810
- * User
811
- */
812
- export const user = {
813
- /*
814
- * 获取用户信息; (也可以获取管理员信息)
815
- * 获取用户信息; (也可以获取管理员信息)
816
- */
817
- getInfoByUsername: (
818
- params:{
819
- username?: string
820
- }
821
- ): Promise<{
822
- code: ResponseCode,
823
- message?: string,
824
- data?: {
825
- id: string,
826
- is_forbidden: boolean,
827
- title: string,
828
- phone: string,
829
- email: string,
830
- displayModules: string,
831
- username: string,
832
- nickname: string,
833
- pwd: string,
834
- smsCode: string,
835
- manager_id: string,
836
- created_at: Date,
837
- tick_avatar_self: number,
838
- role_ids: string[],
839
- isAdmin: boolean,
840
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
841
- unreadMessageCount: number,
842
- }
843
- }> => {
844
- return HttpRequest.get('/api/user/infoByUsername', { username:params.username}, null).then((res:any) => {
845
- return res as any;
846
- });
847
- },
848
-
849
- /*
850
- * 获取用户信息; (也可以获取管理员信息)
851
- * 获取用户信息; (也可以获取管理员信息)
852
- */
853
- getInfo: (
854
- params:{
855
- id?: string
856
- }
857
- ): Promise<{
858
- code: ResponseCode,
859
- message?: string,
860
- data?: {
861
- id: string,
862
- is_forbidden: boolean,
863
- title: string,
864
- phone: string,
865
- email: string,
866
- displayModules: string,
867
- username: string,
868
- nickname: string,
869
- pwd: string,
870
- smsCode: string,
871
- manager_id: string,
872
- created_at: Date,
873
- tick_avatar_self: number,
874
- role_ids: string[],
875
- isAdmin: boolean,
876
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
877
- unreadMessageCount: number,
878
- }
879
- }> => {
880
- return HttpRequest.get('/api/user/info', { id:params.id}, null).then((res:any) => {
881
- return res as any;
882
- });
883
- },
884
-
885
- /*
886
- * 获取用户头像信息; (也可以获取管理员信息)
887
- * 获取用户头像信息; (也可以获取管理员信息)
888
- */
889
- getAvatar: (
890
- params:{
891
- id?: string,
892
- tick?: number
893
- }
894
- ): Promise<{
895
- code: ResponseCode,
896
- message?: string,
897
- data?: {
898
- id: string,
899
- avatar: string,
900
- avatar_small: string,
901
- tick_self: number,
902
- }
903
- }> => {
904
- return HttpRequest.get('/api/user/avatar', { id:params.id, tick:params.tick}, null).then((res:any) => {
905
- return res as any;
906
- });
907
- },
908
-
909
- /*
910
- * 获取用户头像列表信息; (也可以获取管理员信息)
911
- * 获取用户头像列表信息; (也可以获取管理员信息)
912
- */
913
- getAvatarList: (
914
- params:{
915
- ids: string
916
- }
917
- ): Promise<{
918
- code: ResponseCode,
919
- message?: string,
920
- data?: {
921
- avatars: { id: string; avatar_small: string; }[],
922
- }
923
- }> => {
924
- return HttpRequest.get('/api/user/avatar_list', { ids:params.ids}, null).then((res:any) => {
925
- return res as any;
926
- });
927
- },
928
-
929
- /*
930
- * 更新用户头像
931
- * 更新用户头像
932
- */
933
- updateAvatar: (
934
- data: {
935
- id: string,
936
- avatar: string,
937
- avatar_small: string,
938
- tick_self?: number
939
- }
940
- ): Promise<{
941
- code: ResponseCode,
942
- message?: string
943
- }> => {
944
- return HttpRequest.post('/api/user/updateAvatar', null, { id:data.id, avatar:data.avatar, avatar_small:data.avatar_small, tick_self:data.tick_self}).then((res:any) => {
945
- return res as any;
946
- });
947
- },
948
-
949
- /*
950
- * 更新直接领导
951
- * 更新直接领导
952
- */
953
- updateManager: (
954
- params:{
955
- id: string,
956
- managerid: string
957
- }
958
- ): Promise<{
959
- code: ResponseCode,
960
- message?: string
961
- }> => {
962
- return HttpRequest.post('/api/user/updateManager', { id:params.id, managerid:params.managerid}, null).then((res:any) => {
963
- return res as any;
964
- });
965
- },
966
-
967
- /*
968
- * 更新用户信息
969
- * 更新用户信息
970
- */
971
- updateInfo: (
972
- data: {
973
- id?: string,
974
- is_forbidden: boolean,
975
- title: string,
976
- phone?: string,
977
- email?: string,
978
- displayModules?: string,
979
- username?: string,
980
- nickname?: string,
981
- pwd?: string,
982
- smsCode?: string,
983
- manager_id?: string,
984
- created_at: Date,
985
- tick_avatar_self?: number,
986
- role_ids?: string[],
987
- isAdmin?: boolean,
988
- thirdPlatformInfo?: { platform_user_id: string; platform_type: string; }[] | null,
989
- unreadMessageCount?: number
990
- }
991
- ): Promise<{
992
- code: ResponseCode,
993
- message?: string
994
- }> => {
995
- return HttpRequest.post('/api/user/update', null, { id:data.id, is_forbidden:data.is_forbidden, title:data.title, phone:data.phone, email:data.email, displayModules:data.displayModules, username:data.username, nickname:data.nickname, pwd:data.pwd, smsCode:data.smsCode, manager_id:data.manager_id, created_at:data.created_at, tick_avatar_self:data.tick_avatar_self, role_ids:data.role_ids, isAdmin:data.isAdmin, thirdPlatformInfo:data.thirdPlatformInfo, unreadMessageCount:data.unreadMessageCount}).then((res:any) => {
996
- return res as any;
997
- });
998
- },
999
-
1000
- /*
1001
- * 更新用户密码
1002
- * 更新用户密码
1003
- */
1004
- updatePassword: (
1005
- data: {
1006
- old_password: string,
1007
- old_password_sn: string,
1008
- new_password: string
1009
- }
1010
- ): Promise<{
1011
- code: ResponseCode,
1012
- message?: string
1013
- }> => {
1014
- return HttpRequest.post('/api/user/updatePassword', null, { old_password:data.old_password, old_password_sn:data.old_password_sn, new_password:data.new_password}).then((res:any) => {
1015
- return res as any;
1016
- });
1017
- },
1018
-
1019
- /*
1020
- * 删除用户
1021
- * 删除用户
1022
- */
1023
- deleteUser: (
1024
- params:{
1025
- id: string
1026
- }
1027
- ): Promise<{
1028
- code: ResponseCode,
1029
- message?: string
1030
- }> => {
1031
- return HttpRequest.post('/api/user/delete', { id:params.id}, null).then((res:any) => {
1032
- return res as any;
1033
- });
1034
- },
1035
-
1036
- /*
1037
- * 获取用户列表
1038
- * 获取用户列表
1039
- */
1040
- list: (
1041
- params:{
1042
- pageNum?: number,
1043
- pageSize?: number
1044
- }
1045
- ): Promise<{
1046
- code: ResponseCode,
1047
- message?: string,
1048
- data?: {
1049
- total:number;
1050
- list:{
1051
- id: string,
1052
- is_forbidden: boolean,
1053
- title: string,
1054
- phone: string,
1055
- email: string,
1056
- displayModules: string,
1057
- username: string,
1058
- nickname: string,
1059
- pwd: string,
1060
- smsCode: string,
1061
- manager_id: string,
1062
- created_at: Date,
1063
- tick_avatar_self: number,
1064
- role_ids: string[],
1065
- isAdmin: boolean,
1066
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
1067
- unreadMessageCount: number
1068
- }[];
1069
- }
1070
- }> => {
1071
- return HttpRequest.get('/api/user/list', { pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
1072
- return res as any;
1073
- });
1074
- },
1075
-
1076
- /*
1077
- * 通过用户ids,获取用户列表(可以包含管理员)
1078
- * 通过用户ids,获取用户列表(可以包含管理员)
1079
- */
1080
- listByIds: (
1081
- params:{
1082
- ids: string
1083
- }
1084
- ): Promise<{
1085
- code: ResponseCode,
1086
- message?: string,
1087
- data?: {
1088
- total:number;
1089
- list:{
1090
- id: string,
1091
- is_forbidden: boolean,
1092
- title: string,
1093
- phone: string,
1094
- email: string,
1095
- displayModules: string,
1096
- username: string,
1097
- nickname: string,
1098
- pwd: string,
1099
- smsCode: string,
1100
- manager_id: string,
1101
- created_at: Date,
1102
- tick_avatar_self: number,
1103
- role_ids: string[],
1104
- isAdmin: boolean,
1105
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
1106
- unreadMessageCount: number
1107
- }[];
1108
- }
1109
- }> => {
1110
- return HttpRequest.get('/api/user/list_by_ids', { ids:params.ids}, null).then((res:any) => {
1111
- return res as any;
1112
- });
1113
- },
1114
-
1115
- /*
1116
- * 搜索用户列表
1117
- * 搜索用户列表
1118
- */
1119
- search: (
1120
- params:{
1121
- keyword: string,
1122
- pageNum?: number,
1123
- pageSize?: number
1124
- }
1125
- ): Promise<{
1126
- code: ResponseCode,
1127
- message?: string,
1128
- data?: {
1129
- total:number;
1130
- list:{
1131
- id: string,
1132
- is_forbidden: boolean,
1133
- title: string,
1134
- phone: string,
1135
- email: string,
1136
- displayModules: string,
1137
- username: string,
1138
- nickname: string,
1139
- pwd: string,
1140
- smsCode: string,
1141
- manager_id: string,
1142
- created_at: Date,
1143
- tick_avatar_self: number,
1144
- role_ids: string[],
1145
- isAdmin: boolean,
1146
- thirdPlatformInfo: { platform_user_id: string; platform_type: string; }[] | null,
1147
- unreadMessageCount: number
1148
- }[];
1149
- }
1150
- }> => {
1151
- return HttpRequest.get('/api/user/search', { keyword:params.keyword, pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
1152
- return res as any;
1153
- });
1154
- },
1155
-
1156
- /*
1157
- * 禁用用户
1158
- * 禁用用户
1159
- */
1160
- forbid: (
1161
- params:{
1162
- id: string,
1163
- forbid: boolean
1164
- }
1165
- ): Promise<{
1166
- code: ResponseCode,
1167
- message?: string
1168
- }> => {
1169
- return HttpRequest.post('/api/user/forbid', { id:params.id, forbid:params.forbid}, null).then((res:any) => {
1170
- return res as any;
1171
- });
1172
- },
1173
-
1174
- }