create-pubinfo 2.0.0-beta.9 → 2.0.0-rc.2

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 (68) hide show
  1. package/dist/index.js +352 -306
  2. package/package.json +13 -13
  3. package/templates/pubinfo-template/.browserslistrc +5 -0
  4. package/templates/pubinfo-template/.editorconfig +10 -0
  5. package/templates/pubinfo-template/.env +5 -0
  6. package/templates/pubinfo-template/.env.development +6 -0
  7. package/templates/pubinfo-template/.env.production +10 -0
  8. package/templates/pubinfo-template/_gitignore +37 -0
  9. package/templates/pubinfo-template/_npmrc +5 -0
  10. package/templates/pubinfo-template/eslint.config.ts +3 -0
  11. package/templates/pubinfo-template/index.html +47 -0
  12. package/templates/pubinfo-template/openapi.config.ts +33 -0
  13. package/templates/pubinfo-template/package.json +52 -0
  14. package/templates/pubinfo-template/pubinfo.config.ts +9 -0
  15. package/templates/pubinfo-template/public/browser_upgrade/chrome.png +0 -0
  16. package/templates/pubinfo-template/public/browser_upgrade/edge.png +0 -0
  17. package/templates/pubinfo-template/public/browser_upgrade/index.css +49 -0
  18. package/templates/pubinfo-template/public/loading.css +92 -0
  19. package/templates/pubinfo-template/src/App.vue +7 -0
  20. package/templates/pubinfo-template/src/api/modules/auth/index.ts +3 -0
  21. package/templates/pubinfo-template/src/api/modules/auth/renzhengfuwu.ts +145 -0
  22. package/templates/pubinfo-template/src/api/modules/auth/typings.d.ts +97 -0
  23. package/templates/pubinfo-template/src/api/request.ts +125 -0
  24. package/templates/pubinfo-template/src/assets/icons/logo.svg +1 -0
  25. package/templates/pubinfo-template/src/assets/icons/process-management.svg +1 -0
  26. package/templates/pubinfo-template/src/assets/icons/workbench.svg +1 -0
  27. package/templates/pubinfo-template/src/assets/images/login-bg.webp +0 -0
  28. package/templates/pubinfo-template/src/assets/images/login-bg_dark.webp +0 -0
  29. package/templates/pubinfo-template/src/assets/images/login-small.png +0 -0
  30. package/templates/pubinfo-template/src/assets/images/login-small_dark.webp +0 -0
  31. package/templates/pubinfo-template/src/components/UIProvider/index.vue +51 -0
  32. package/templates/pubinfo-template/src/layouts/index.vue +38 -0
  33. package/templates/pubinfo-template/src/main.ts +22 -0
  34. package/templates/pubinfo-template/src/modules/auth.ts +20 -0
  35. package/templates/pubinfo-template/src/modules/rbac.ts +10 -0
  36. package/templates/pubinfo-template/src/routes/index.ts +71 -0
  37. package/templates/pubinfo-template/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  38. package/templates/pubinfo-template/src/routes/modules/demo/link.ts +15 -0
  39. package/templates/pubinfo-template/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  40. package/templates/pubinfo-template/src/routes/modules/demo/other.page.ts +37 -0
  41. package/templates/pubinfo-template/src/routes/modules/demo/single.ts +14 -0
  42. package/templates/pubinfo-template/src/settings.ts +8 -0
  43. package/templates/pubinfo-template/src/stores/index.ts +2 -0
  44. package/templates/pubinfo-template/src/stores/modules/conter.ts +16 -0
  45. package/templates/pubinfo-template/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  46. package/templates/pubinfo-template/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  47. package/templates/pubinfo-template/src/views/demo/breadcrumb_example/list1.vue +11 -0
  48. package/templates/pubinfo-template/src/views/demo/breadcrumb_example/list2.vue +11 -0
  49. package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  50. package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  51. package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  52. package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/page.vue +11 -0
  53. package/templates/pubinfo-template/src/views/demo/other_page/des.vue +13 -0
  54. package/templates/pubinfo-template/src/views/demo/other_page/index.vue +25 -0
  55. package/templates/pubinfo-template/src/views/demo/preview-empty/index.vue +17 -0
  56. package/templates/pubinfo-template/src/views/demo/single/index.vue +13 -0
  57. package/templates/pubinfo-template/src/views/system/index.vue +5 -0
  58. package/templates/pubinfo-template/src/views/system/login/components/LoginForm.vue +29 -0
  59. package/templates/pubinfo-template/src/views/system/login/components/LoginWithPhone.vue +213 -0
  60. package/templates/pubinfo-template/src/views/system/login/components/PasswordLogin.vue +194 -0
  61. package/templates/pubinfo-template/src/views/system/login/components/Savephone.vue +17 -0
  62. package/templates/pubinfo-template/src/views/system/login/components/Useragreement.vue +26 -0
  63. package/templates/pubinfo-template/src/views/system/login/composables.ts +84 -0
  64. package/templates/pubinfo-template/src/views/system/login/index.vue +142 -0
  65. package/templates/pubinfo-template/stylelint.config.js +3 -0
  66. package/templates/pubinfo-template/tsconfig.json +3 -0
  67. package/templates/pubinfo-template/uno.config.ts +17 -0
  68. package/dist/index.cjs +0 -364
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-pubinfo",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.9",
4
+ "version": "2.0.0-rc.2",
5
5
  "description": "初始化项目框架",
6
6
  "author": "Werheng <werheng.zhang@gmail.com>",
7
7
  "license": "MIT",
@@ -9,29 +9,29 @@
9
9
  "pubinfo": "./dist/index.js"
10
10
  },
11
11
  "files": [
12
- "dist"
12
+ "dist",
13
+ "templates"
13
14
  ],
14
15
  "dependencies": {
15
- "@inquirer/prompts": "^5.5.0",
16
+ "@inquirer/prompts": "^7.6.0",
16
17
  "ansi-colors": "^4.1.3",
17
18
  "cfonts": "^3.3.0",
18
- "commander": "^12.1.0",
19
- "confbox": "^0.1.8",
20
- "consola": "^3.4.0",
21
- "giget": "^1.2.5",
19
+ "commander": "^14.0.0",
20
+ "confbox": "^0.2.2",
21
+ "consola": "^3.4.2",
22
+ "giget": "^2.0.0",
22
23
  "ofetch": "^1.4.1",
23
24
  "ora": "^8.2.0",
24
25
  "rimraf": "^6.0.1",
25
- "semver": "^7.7.1"
26
+ "semver": "^7.7.2"
26
27
  },
27
28
  "devDependencies": {
28
- "@types/node": "^22.13.9",
29
- "tsup": "^8.4.0"
29
+ "@types/node": "^24.0.10"
30
30
  },
31
31
  "scripts": {
32
- "dev": "tsup --watch src",
33
- "build": "tsup",
34
- "cli": "tsx src/index.ts",
32
+ "dev": "tsdown --watch src",
33
+ "build": "tsdown",
34
+ "cli": "node dist/index.js",
35
35
  "cli:clean": "rimraf ./my-app",
36
36
  "lint": "eslint . --cache --fix"
37
37
  }
@@ -0,0 +1,5 @@
1
+ # Browsers that we support
2
+
3
+ last 2 version
4
+ > 1%
5
+ not dead # no browsers without security updates
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ quote_type = single
@@ -0,0 +1,5 @@
1
+ # 页面标题
2
+ VITE_APP_TITLE = 产数开发底座
3
+
4
+ # 开启多租户
5
+ VITE_TENANT_ENABLED = false
@@ -0,0 +1,6 @@
1
+ # 接口请求地址,会设置到 axios 的 baseURL 参数上
2
+ VITE_APP_API_BASEURL = http://localhost:9099/pubinfo-sys
3
+ # 是否开启代理
4
+ VITE_OPEN_PROXY = true
5
+ # 是否启动 vite app inspector
6
+ VITE_APP_INSPECTOR = false
@@ -0,0 +1,10 @@
1
+ # 接口请求地址,会设置到 axios 的 baseURL 参数上
2
+ VITE_APP_API_BASEURL = /pubinfo-sys
3
+ # 是否在打包时启用 Mock
4
+ VITE_BUILD_MOCK = false
5
+ # 是否在打包时生成 sourcemap
6
+ VITE_BUILD_SOURCEMAP = false
7
+ # 是否在打包时开启压缩,支持 gzip 和 brotli,例如 gzip,brotli
8
+ VITE_BUILD_COMPRESS =
9
+ # 是否在打包时启用传统浏览器兼容,可在 .browserslistrc 中进行具体配置
10
+ VITE_BUILD_LEGACY = false
@@ -0,0 +1,37 @@
1
+ .pubinfo
2
+ .eslintcache
3
+ .stylelintcache
4
+
5
+ # auto generated
6
+ auto-imports.d.ts
7
+ components.d.ts
8
+
9
+ .DS_Store
10
+ node_modules
11
+ dist
12
+ cache
13
+ coverage
14
+ .turbo
15
+ .eslintcache
16
+ .stylelintcache
17
+
18
+ # local env files
19
+ .env.local
20
+ .env.*.local
21
+
22
+ # Log files
23
+ npm-debug.log*
24
+ yarn-debug.log*
25
+ yarn-error.log*
26
+ pnpm-debug.log*
27
+ lerna-debug.log*
28
+
29
+ # Editor directories and files
30
+ .idea
31
+ # .vscode
32
+ *.suo
33
+ *.ntvs*
34
+ *.njsproj
35
+ *.sln
36
+ *.sw?
37
+
@@ -0,0 +1,5 @@
1
+ ignore-workspace-root-check=true
2
+ shamefully-hoist=true
3
+ strict-peer-dependencies=false
4
+ shell-emulator=true
5
+ max-old-space-size=4096
@@ -0,0 +1,3 @@
1
+ import pubinfo from 'pubinfo/eslint';
2
+
3
+ export default pubinfo();
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="src/assets/icons/logo.svg" type="image/svg+xml"/>
6
+ <link rel="stylesheet" href="/loading.css" />
7
+ <link rel="stylesheet" href="/browser_upgrade/index.css" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <meta http-equiv="Expires" content="0">
10
+ <meta http-equiv="Pragma" content="no-cache">
11
+ <meta http-equiv="Cache-control" content="no-cache">
12
+ <meta http-equiv="Cache" content="no-cache">
13
+ <title>%VITE_APP_TITLE%</title>
14
+ </head>
15
+ <body>
16
+ <div id="app">
17
+ <div class="w-admin-home">
18
+ <div class="loading">
19
+ <div class="square"></div>
20
+ <div class="square"></div>
21
+ <div class="square"></div>
22
+ <div class="square"></div>
23
+ </div>
24
+ <div class="text">载入中</div>
25
+ </div>
26
+ <div id="browser-upgrade">
27
+ <div class="title">为了您的体验,推荐使用以下浏览器</div>
28
+ <div class="browsers">
29
+ <a href="https://www.microsoft.com/edge" target="_blank" class="browser">
30
+ <img class="browser-icon" src="/browser_upgrade/edge.png" />
31
+ <div class="browser-name">Mircosoft Edge</div>
32
+ </a>
33
+ <a href="https://www.google.cn/chrome/" target="_blank" class="browser">
34
+ <img class="browser-icon" src="/browser_upgrade/chrome.png" />
35
+ <div class="browser-name">Google Chrome</div>
36
+ </a>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <script>
41
+ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
42
+ document.getElementById('browser-upgrade').style.display = 'block';
43
+ }
44
+ </script>
45
+ <script type="module" src="/src/main.ts"></script>
46
+ </body>
47
+ </html>
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from '@pubinfo/openapi';
2
+ import { presetName } from '@pubinfo/preset-openapi';
3
+
4
+ export default defineConfig({
5
+ enabled: false,
6
+
7
+ presets: [
8
+ // 小驼峰式命名
9
+ presetName({
10
+ functionName: 'camelCase',
11
+ }),
12
+ ],
13
+
14
+ imports: { '@/api/request': [{ name: 'basic', as: 'request' }] },
15
+ batch: [
16
+ {
17
+ input: 'http://localhost:9099/pubinfo-sys/v3/api-docs/auth',
18
+ output: './src/api/modules/auth',
19
+ imports: { '@/api/request': [{ name: 'auth', as: 'request' }] },
20
+ },
21
+ ],
22
+
23
+ hooks: {
24
+ customType(schema, namespace, defaultFn) {
25
+ // `int64` 在前端会精度丢失,可在此处调整对应字段的 `TS类型`
26
+ if (schema?.type === 'integer' && schema?.format === 'int64') {
27
+ return 'number';
28
+ }
29
+
30
+ return defaultFn(schema, namespace);
31
+ },
32
+ },
33
+ });
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "pubinfo-template",
3
+ "type": "module",
4
+ "private": true,
5
+ "packageManager": "pnpm@10.12.4",
6
+ "scripts": {
7
+ "dev": "pubinfo dev",
8
+ "build": "pubinfo build",
9
+ "preview": "pubinfo preview",
10
+ "commit": "pubinfo commit",
11
+ "prepare": "pubinfo commit --init && simple-git-hooks",
12
+ "lint:eslint": "eslint . --cache --fix",
13
+ "lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix",
14
+ "viewer:eslint-rule": "pnpx @eslint/config-inspector",
15
+ "openapi": "pnpx @pubinfo/openapi generate",
16
+ "icon:normalize": "pubinfo icon"
17
+ },
18
+ "dependencies": {
19
+ "@ant-design/icons-vue": "^7.0.1",
20
+ "@pubinfo/module-auth": "^2.0.0-rc.1",
21
+ "@pubinfo/module-rbac": "^2.0.0-rc.1",
22
+ "@pubinfo/pro-components": "^1.7.1",
23
+ "@vueuse/core": "^13.7.0",
24
+ "alova": "^3.3.4",
25
+ "ant-design-vue": "^4.2.6",
26
+ "dayjs": "^1.11.13",
27
+ "pubinfo": "^2.0.0-rc.1"
28
+ },
29
+ "devDependencies": {
30
+ "@pubinfo/openapi": "^0.9.0",
31
+ "@pubinfo/preset-openapi": "^0.9.0",
32
+ "eslint": "^9.30.1",
33
+ "lint-staged": "^16.1.2",
34
+ "simple-git-hooks": "^2.13.0",
35
+ "stylelint": "^16.21.0",
36
+ "typescript": "^5.8.3"
37
+ },
38
+ "simple-git-hooks": {
39
+ "pre-commit": "pnpm lint-staged && pnpm run lint",
40
+ "commit-msg": "pnpm exec pubinfo commit --edit $1"
41
+ },
42
+ "lint-staged": {
43
+ "*.{vue,js,ts,jsx,tsx,md,json}": "eslint --cache --fix",
44
+ "*.{css,scss,vue}": "stylelint --cache --fix"
45
+ },
46
+ "config": {
47
+ "commitizen": {
48
+ "path": "node_modules/cz-git",
49
+ "czConfig": ".pubinfo/cz.config.cjs"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,9 @@
1
+ import { definePubinfoConfig } from 'pubinfo/node';
2
+
3
+ export default definePubinfoConfig({
4
+ vite: {
5
+ server: {
6
+ port: 5173,
7
+ },
8
+ },
9
+ });
@@ -0,0 +1,49 @@
1
+ #browser-upgrade {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ z-index: 10001;
6
+ display: none;
7
+ width: 100%;
8
+ height: 100%;
9
+ color: #736477;
10
+ user-select: none;
11
+ background-color: snow;
12
+ }
13
+
14
+ #browser-upgrade .title {
15
+ margin: 40px 0;
16
+ font-size: 24px;
17
+ text-align: center;
18
+ }
19
+
20
+ #browser-upgrade .browsers {
21
+ text-align: center;
22
+ }
23
+
24
+ #browser-upgrade .browsers .browser {
25
+ display: inline-block;
26
+ margin: 0 20px;
27
+ text-decoration: none;
28
+ cursor: pointer;
29
+ }
30
+
31
+ #browser-upgrade .browsers .browser .browser-icon {
32
+ display: block;
33
+ width: 50px;
34
+ height: 50px;
35
+ margin: 0 auto;
36
+ border: none;
37
+ }
38
+
39
+ #browser-upgrade .browsers .browser .browser-name {
40
+ padding-bottom: 2px;
41
+ margin-top: 10px;
42
+ color: #736477;
43
+ text-align: center;
44
+ border-bottom: 1px solid transparent;
45
+ }
46
+
47
+ #browser-upgrade .browsers .browser:hover .browser-name {
48
+ border-bottom: 1px solid #736477;
49
+ }
@@ -0,0 +1,92 @@
1
+ #app {
2
+ height: 100%;
3
+ }
4
+
5
+ .w-admin-home {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ z-index: 10000;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ justify-content: center;
14
+ width: 100%;
15
+ height: 100%;
16
+ color: #736477;
17
+ user-select: none;
18
+ background-color: snow;
19
+ }
20
+
21
+ .w-admin-home .loading {
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ align-items: center;
25
+ justify-content: center;
26
+ width: 40px;
27
+ height: 40px;
28
+ }
29
+
30
+ .w-admin-home .loading .square {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 20px;
35
+ height: 20px;
36
+ }
37
+
38
+ .w-admin-home .loading .square::before {
39
+ width: 10px;
40
+ height: 10px;
41
+ content: "";
42
+ border: 3px solid #8c858f;
43
+ border-radius: 15%;
44
+ animation: square-to-dot-animation 2s linear infinite;
45
+ }
46
+
47
+ .w-admin-home .loading .square:nth-child(1)::before {
48
+ animation-delay: calc(150ms * 1);
49
+ }
50
+
51
+ .w-admin-home .loading .square:nth-child(2)::before {
52
+ animation-delay: calc(150ms * 2);
53
+ }
54
+
55
+ .w-admin-home .loading .square:nth-child(3)::before {
56
+ animation-delay: calc(150ms * 3);
57
+ }
58
+
59
+ .w-admin-home .loading .square:nth-child(4)::before {
60
+ animation-delay: calc(150ms * 4);
61
+ }
62
+
63
+ @keyframes square-to-dot-animation {
64
+ 15%,
65
+ 25% {
66
+ width: 0;
67
+ height: 0;
68
+ margin: 5px;
69
+ border-width: 5px;
70
+ border-radius: 100%;
71
+ }
72
+
73
+ 40% {
74
+ width: 10px;
75
+ height: 10px;
76
+ margin: initial;
77
+ border-width: 3px;
78
+ border-radius: 15%;
79
+ }
80
+ }
81
+
82
+ .w-admin-home .text {
83
+ position: relative;
84
+ margin-top: 20px;
85
+ font-size: 24px;
86
+ }
87
+
88
+ .w-admin-home .text::after {
89
+ position: absolute;
90
+ padding-left: 5px;
91
+ content: "…";
92
+ }
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <UIProvider>
3
+ <PubinfoProvider>
4
+ <PubinfoApp />
5
+ </PubinfoProvider>
6
+ </UIProvider>
7
+ </template>
@@ -0,0 +1,3 @@
1
+ // API 更新时间:
2
+ // API 唯一标识:
3
+ export * from './renzhengfuwu';
@@ -0,0 +1,145 @@
1
+ import { auth as request } from '@/api/request';
2
+
3
+ /**
4
+ * @description 切换登录组织
5
+ * @url /auth/changeLoginOrg
6
+ * @method POST
7
+ * @author @pubinfo/openapi
8
+ */
9
+ export function postAuthChangeLoginOrg<
10
+ R = API.ResponseDataLoginTokenVo,
11
+ T = API.ResponseDataLoginTokenVo,
12
+ >(
13
+ params: API.postAuthChangeLoginOrgParams,
14
+ options?: Parameters<typeof request.Post<R, T>>[2],
15
+ ) {
16
+ return request.Post<R, T>(
17
+ '/auth/changeLoginOrg',
18
+ {},
19
+ {
20
+ params: {
21
+ ...params,
22
+ },
23
+ ...(options || {}),
24
+ },
25
+ );
26
+ }
27
+
28
+ /**
29
+ * @description 判断缓存的token是否有效
30
+ * @url /auth/checkCacheToken
31
+ * @method GET
32
+ * @author @pubinfo/openapi
33
+ */
34
+ export function getAuthCheckCacheToken<
35
+ R = API.ResponseDataBoolean,
36
+ T = API.ResponseDataBoolean,
37
+ >(
38
+ params: API.getAuthCheckCacheTokenParams,
39
+ options?: Parameters<typeof request.Get<R, T>>[1],
40
+ ) {
41
+ return request.Get<R, T>('/auth/checkCacheToken', {
42
+ params: {
43
+ ...params,
44
+ },
45
+ ...(options || {}),
46
+ });
47
+ }
48
+
49
+ /**
50
+ * @description 密码登录
51
+ * @url /auth/login
52
+ * @method POST
53
+ * @author @pubinfo/openapi
54
+ */
55
+ export function postAuthLogin<
56
+ R = API.ResponseDataLoginTokenVo,
57
+ T = API.ResponseDataLoginTokenVo,
58
+ >(body: API.LoginByPwdDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
59
+ return request.Post<R, T>('/auth/login', body, {
60
+ headers: {
61
+ 'Content-Type': 'application/json',
62
+ },
63
+ ...(options || {}),
64
+ });
65
+ }
66
+
67
+ /**
68
+ * @description 获取登录公钥
69
+ * @url /auth/login/key
70
+ * @method GET
71
+ * @author @pubinfo/openapi
72
+ */
73
+ export function getAuthLoginKey<
74
+ R = API.ResponseDataString,
75
+ T = API.ResponseDataString,
76
+ >(options?: Parameters<typeof request.Get<R, T>>[1]) {
77
+ return request.Get<R, T>('/auth/login/key', {
78
+ ...(options || {}),
79
+ });
80
+ }
81
+
82
+ /**
83
+ * @description 获取图片验证码
84
+ * @url /auth/login/validCode
85
+ * @method GET
86
+ * @author @pubinfo/openapi
87
+ */
88
+ export function getAuthLoginValidCode<
89
+ R = API.ResponseDataValidCodeVo,
90
+ T = API.ResponseDataValidCodeVo,
91
+ >(
92
+ params: API.getAuthLoginValidCodeParams,
93
+ options?: Parameters<typeof request.Get<R, T>>[1],
94
+ ) {
95
+ return request.Get<R, T>('/auth/login/validCode', {
96
+ params: {
97
+ ...params,
98
+ },
99
+ ...(options || {}),
100
+ });
101
+ }
102
+
103
+ /**
104
+ * @description 登出
105
+ * @url /auth/loginOut
106
+ * @method POST
107
+ * @author @pubinfo/openapi
108
+ */
109
+ export function postAuthLoginOut<
110
+ R = API.ResponseDataVoid,
111
+ T = API.ResponseDataVoid,
112
+ >(options?: Parameters<typeof request.Post<R, T>>[2]) {
113
+ return request.Post<R, T>(
114
+ '/auth/loginOut',
115
+ {},
116
+ {
117
+ ...(options || {}),
118
+ },
119
+ );
120
+ }
121
+
122
+ /**
123
+ * @description 刷新访问令牌
124
+ * @url /auth/token/refresh
125
+ * @method POST
126
+ * @author @pubinfo/openapi
127
+ */
128
+ export function postAuthTokenRefresh<
129
+ R = API.ResponseDataLoginTokenVo,
130
+ T = API.ResponseDataLoginTokenVo,
131
+ >(
132
+ params: API.postAuthTokenRefreshParams,
133
+ options?: Parameters<typeof request.Post<R, T>>[2],
134
+ ) {
135
+ return request.Post<R, T>(
136
+ '/auth/token/refresh',
137
+ {},
138
+ {
139
+ params: {
140
+ ...params,
141
+ },
142
+ ...(options || {}),
143
+ },
144
+ );
145
+ }
@@ -0,0 +1,97 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ declare namespace API {
4
+ type getAuthCheckCacheTokenParams = {
5
+ accessToken: string;
6
+ userId: string;
7
+ };
8
+
9
+ type getAuthLoginValidCodeParams = {
10
+ /** 尺寸(长x宽),例:150x50表示长为150宽为50,不填默认150x50 */
11
+ size?: string;
12
+ /** 验证码长度,不填默认4位 */
13
+ length?: number;
14
+ };
15
+
16
+ type IResponseCode = {
17
+ code?: number;
18
+ msg?: string;
19
+ hint?: string;
20
+ };
21
+
22
+ type LoginByPwdDto = {
23
+ /** 登录类型 */
24
+ loginType: string;
25
+ /** 登录名 */
26
+ loginName: string;
27
+ /** 密码 */
28
+ loginPwd: string;
29
+ /** 验证码hash */
30
+ codeHash: string;
31
+ /** 验证码 */
32
+ code: string;
33
+ };
34
+
35
+ type LoginTokenVo = {
36
+ /** 刷新令牌 */
37
+ refreshToken?: string;
38
+ /** 访问令牌 */
39
+ accessToken?: string;
40
+ loginResponse?: IResponseCode;
41
+ };
42
+
43
+ type postAuthChangeLoginOrgParams = {
44
+ /** 新组织id */
45
+ orgId: string;
46
+ };
47
+
48
+ type postAuthTokenRefreshParams = {
49
+ /** 刷新令牌 */
50
+ refreshToken: string;
51
+ };
52
+
53
+ type ResponseDataBoolean = {
54
+ code?: number;
55
+ msg?: string;
56
+ hint?: string;
57
+ data?: boolean;
58
+ success?: boolean;
59
+ };
60
+
61
+ type ResponseDataLoginTokenVo = {
62
+ code?: number;
63
+ msg?: string;
64
+ hint?: string;
65
+ data?: LoginTokenVo;
66
+ success?: boolean;
67
+ };
68
+
69
+ type ResponseDataString = {
70
+ code?: number;
71
+ msg?: string;
72
+ hint?: string;
73
+ data?: string;
74
+ success?: boolean;
75
+ };
76
+
77
+ type ResponseDataValidCodeVo = {
78
+ code?: number;
79
+ msg?: string;
80
+ hint?: string;
81
+ data?: ValidCodeVo;
82
+ success?: boolean;
83
+ };
84
+
85
+ type ResponseDataVoid = {
86
+ code?: number;
87
+ msg?: string;
88
+ hint?: string;
89
+ data?: Record<string, any>;
90
+ success?: boolean;
91
+ };
92
+
93
+ type ValidCodeVo = {
94
+ key?: string;
95
+ plaintext?: string;
96
+ };
97
+ }