From ae35212f6a1e665f82db7980febd686192e8c7df Mon Sep 17 00:00:00 2001 From: Axetroy Date: Thu, 7 Mar 2024 20:25:25 +0800 Subject: [PATCH] V2 (#6) --- .gitignore | 3 +- .vscode/settings.json | 2 +- Makefile | 10 +- README.md | 4 +- README_en-US.md | 4 +- __test__/3.0/LDFCore.ts | 3396 ++++++++---- __test__/3.0/Petstore.ts | 398 +- __test__/3.0/api-auth.ts | 308 +- __test__/3.0/api-upms.ts | 564 +- __test__/3.0/api-with-examples.ts | 190 +- __test__/3.0/callback-example.ts | 189 +- __test__/3.0/link-example.ts | 230 +- __test__/3.0/petstore-expanded.ts | 226 +- __test__/3.0/test.json | 5098 +++++++++++++++++++ __test__/3.0/test.ts | 2046 ++++++++ __test__/3.0/uspto.ts | 246 +- __test__/3.1/webhook-example.ts | 190 +- helper.ts | 12 - index.mjs | 10 +- package-lock.json | 2 +- package.json | 2 +- runtime/fetch.ts | 155 +- script/generate.ts | 2 +- swagger2ts.ts | 18 +- test.ts | 22 +- v3/generateDefinition.ts | 311 -- v3/helper.ts | 37 +- v3/helper_test.ts | 72 - v3/index.ts | 3 - v3/interface/api.test.ts | 80 + v3/interface/api.ts | 181 + v3/interface/base_generator.ts | 45 + v3/interface/comment.test.ts | 153 + v3/interface/comment.ts | 53 + v3/interface/definition.ts | 247 + v3/interface/generator.ts | 127 + v3/interface/interface.test.ts | 111 + v3/interface/interface.ts | 57 + v3/interface/mod.ts | 17 + v3/mod.ts | 3 + v3/{generateImplement.ts => runtime/mod.ts} | 16 +- v3/types.ts | 28 +- 42 files changed, 12478 insertions(+), 2390 deletions(-) create mode 100644 __test__/3.0/test.json create mode 100644 __test__/3.0/test.ts delete mode 100644 helper.ts delete mode 100644 v3/generateDefinition.ts delete mode 100644 v3/helper_test.ts delete mode 100644 v3/index.ts create mode 100644 v3/interface/api.test.ts create mode 100644 v3/interface/api.ts create mode 100644 v3/interface/base_generator.ts create mode 100644 v3/interface/comment.test.ts create mode 100644 v3/interface/comment.ts create mode 100644 v3/interface/definition.ts create mode 100644 v3/interface/generator.ts create mode 100644 v3/interface/interface.test.ts create mode 100644 v3/interface/interface.ts create mode 100644 v3/interface/mod.ts create mode 100644 v3/mod.ts rename v3/{generateImplement.ts => runtime/mod.ts} (79%) diff --git a/.gitignore b/.gitignore index 81b5493..5473ec2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ swagger.json .DS_Store swagger swagger.exe -dist/*.js \ No newline at end of file +dist/*.js +dist/*.mjs \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5bab78a..ad683a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "deno.enable": true, "deno.unstable": true, - "deno.lint": false, + "deno.lint": true, "deno.suggest.imports.hosts": { "https://deno.land": false } diff --git a/Makefile b/Makefile index 8ebb688..21c1165 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ default: - @deno compile --unstable --lite --target x86_64-pc-windows-msvc -A mod.ts - @deno compile --unstable --lite --target x86_64-unknown-linux-gnu -A mod.ts - @deno compile --unstable --lite --target x86_64-apple-darwin -A mod.ts - @deno compile --unstable --lite --target aarch64-apple-darwin -A mod.ts + @deno compile --unstable --target x86_64-pc-windows-msvc -A mod.ts + @deno compile --unstable --target x86_64-unknown-linux-gnu -A mod.ts + @deno compile --unstable --target x86_64-apple-darwin -A mod.ts + @deno compile --unstable --target aarch64-apple-darwin -A mod.ts bundle: - @deno bundle ./v3/index.ts ./dist/v3.mjs + @deno bundle ./v3/mod.ts ./dist/v3.mjs format-ceck: @deno fmt --check diff --git a/README.md b/README.md index 1d05312..64b130a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ deno install \ --no-check \ --reload \ -f \ - https://github.com/axetroy/swagger2ts/raw/v0.2.24/swagger2ts.ts + https://github.com/axetroy/swagger2ts/raw/v0.2.26/swagger2ts.ts ``` 或者通过 [npm](https://npmjs.com) 安装 @@ -52,7 +52,7 @@ console.log(output); #### 通过 Deno 函数调用 ```ts -import { generate } from "https://github.com/axetroy/swagger2ts/raw/v0.2.24/generate.ts"; +import { generate } from "https://github.com/axetroy/swagger2ts/raw/v0.2.26/generate.ts"; const output = await generate("/path/to/swagger.json"); // const output = await generate("https://example.com/swagger.json"); diff --git a/README_en-US.md b/README_en-US.md index e322df5..9f7ca86 100644 --- a/README_en-US.md +++ b/README_en-US.md @@ -20,7 +20,7 @@ deno install \ --no-check \ --reload \ -f \ - https://github.com/axetroy/swagger2ts/raw/v0.2.24/swagger2ts.ts + https://github.com/axetroy/swagger2ts/raw/v0.2.26/swagger2ts.ts ``` or install via [npm](https://npmjs.com) @@ -52,7 +52,7 @@ console.log(output); #### Use it in Deno api ```ts -import { generate } from "https://github.com/axetroy/swagger2ts/raw/v0.2.24/generate.ts"; +import { generate } from "https://github.com/axetroy/swagger2ts/raw/v0.2.26/generate.ts"; const output = await generate("/path/to/swagger.json"); // const output = await generate("https://example.com/swagger.json"); diff --git a/__test__/3.0/LDFCore.ts b/__test__/3.0/LDFCore.ts index f505e1a..8e0a215 100644 --- a/__test__/3.0/LDFCore.ts +++ b/__test__/3.0/LDFCore.ts @@ -1,44 +1,60 @@ // Generate by swagger2ts -/* default type by generation start */ -interface MapAny { - [key: string]: any -} -interface MapString { - [key: string]: string | undefined -} - -type IDefaultOptions = Omit & { timeout?: number } -/* default type by generation end */ - -export type AccountType = 0 | 1 | 2 | -1 | undefined +export type AccountType = 0 | 1 | 2 | -1 -export type PlatformEnum = 0 | 1 | 2 | 3 | 4 | 5 | undefined +export type PlatformEnum = 0 | 1 | 2 | 3 | 4 | 5 /** * @description 登录模型 */ export interface LoginModel { - clientId?: string | null /* 客户端 */ - userName?: string | null /* 用户名 */ - password?: string | null /* 密码 */ + /** + * @description 客户端 + */ + clientId?: string | null + /** + * @description 用户名 + */ + userName?: string | null + /** + * @description 密码 + */ + password?: string | null accountType?: AccountType platform?: PlatformEnum - pictureId?: string | null /* 验证码图片编号 */ - code?: string | null /* 验证码 */ + /** + * @description 验证码图片编号 + */ + pictureId?: string | null + /** + * @description 验证码 + */ + code?: string | null } /** * @description 用户登录返回信息Dto */ export interface LoginUserOutput { - userId?: string | null /* 用户Id */ - userName?: string | null /* 用户名称 */ - realName?: string | null /* 姓名(昵称) */ + /** + * @description 用户Id + */ + userId?: string | null + /** + * @description 用户名称 + */ + userName?: string | null + /** + * @description 姓名(昵称) + */ + realName?: string | null } export interface LoginUserOutputAuthResut { error?: string | null access_token?: string | null + /** + * @format int32 + */ expires_in?: number token_type?: string | null refresh_token?: string | null @@ -58,6 +74,9 @@ export interface SpaLoginModel { export interface IResultModel { successful?: boolean + /** + * @format int32 + */ code?: number msg?: string | null } @@ -65,63 +84,175 @@ export interface IResultModel { /** * @description 客户端枚举 */ -export type ClientEnums = 1 | 2 | undefined /* 客户端枚举 */ +export type ClientEnums = 1 | 2 export interface MenuOutput { - id?: string | null /* 标识 */ - name?: string | null /* 名称 */ - link?: string | null /* 链接、路由 */ - remarks?: string | null /* 备注 */ - show?: boolean /* 是否显示 */ - sort?: number /* 排序码 */ - target?: number /* 打开方式 */ - type?: number /* 菜单类型 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 链接、路由 + */ + link?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 是否显示 + */ + show?: boolean + /** + * @description 排序码 + * @format int32 + */ + sort?: number + /** + * @description 打开方式 + * @format int32 + */ + target?: number + /** + * @description 菜单类型 + * @format int32 + */ + type?: number client?: ClientEnums - icon?: string | null /* 图标 */ - children?: Array /* 子菜单 */ - component?: string | null /* 组件 */ - routeParams?: string | null /* 路由参数 */ + /** + * @description 图标 + */ + icon?: string | null + /** + * @description 子菜单 + */ + children?: Array | null + /** + * @description 组件 + */ + component?: string | null + /** + * @description 路由参数 + */ + routeParams?: string | null } /** * @description 角色Dto */ export interface RolesDto { - id?: string | null /* 标识 */ - roleName?: string | null /* 角色名/组名 */ - code?: string | null /* 编码 */ - remarks?: string | null /* 备注 */ - sortId?: number /* 排序值 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 角色名/组名 + */ + roleName?: string | null + /** + * @description 编码 + */ + code?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序值 + * @format int32 + */ + sortId?: number } /** * @description 用户信息 */ export interface InitAppUserInfoOutput { - id?: string | null /* 主键 */ - userId?: string | null /* 用户编号 */ - userName?: string | null /* 用户名 */ - email?: string | null /* 邮箱 */ - phoneNumber?: string | null /* 手机号 */ - headPortraitCode?: string | null /* 头像url */ - realName?: string | null /* 真实姓名 */ - sex?: number /* 性别(1.男 2.女) */ - status?: number /* 状态 */ - contact?: string | null /* 办公电话 */ - rolesId?: Array /* 角色id */ - rolesName?: Array /* 角色id */ - userType?: number /* 用户类型 */ - idCard?: string | null /* 身份证号 */ - roles?: Array /* 角色 */ - enterpriseName?: string | null /* 机构名称 */ + /** + * @description 主键 + */ + id?: string | null + /** + * @description 用户编号 + */ + userId?: string | null + /** + * @description 用户名 + */ + userName?: string | null + /** + * @description 邮箱 + */ + email?: string | null + /** + * @description 手机号 + */ + phoneNumber?: string | null + /** + * @description 头像url + */ + headPortraitCode?: string | null + /** + * @description 真实姓名 + */ + realName?: string | null + /** + * @description 性别(1.男 2.女) + * @format int32 + */ + sex?: number + /** + * @description 状态 + * @format int32 + */ + status?: number + /** + * @description 办公电话 + */ + contact?: string | null + /** + * @description 角色id + */ + rolesId?: Array | null + /** + * @description 角色id + */ + rolesName?: Array | null + /** + * @description 用户类型 + * @format int32 + */ + userType?: number + /** + * @description 身份证号 + */ + idCard?: string | null + /** + * @description 角色 + */ + roles?: Array | null + /** + * @description 机构名称 + */ + enterpriseName?: string | null } /** * @description 初始化客户端返回Dto */ export interface InitAppOutput { - menus?: Array /* 菜单 */ - buttons?: Array /* 按钮权限点 */ + /** + * @description 菜单 + */ + menus?: Array | null + /** + * @description 按钮权限点 + */ + buttons?: Array | null userInfo?: InitAppUserInfoOutput } @@ -133,22 +264,57 @@ export interface InitAppOutputIResultModel { * @description APP版本Dto */ export interface AppVersionDto { - id?: string | null /* Id */ - appId?: string | null /* app_id */ - describe?: string | null /* 更新描述 */ - fileCode?: string | null /* 文件编码 */ - showTips?: boolean /* 是否显示更新提示 */ - version?: string | null /* 版本号 */ - type?: number /* 类型(安卓/IOS) */ - creationTime?: string /* 版本更新时间(前端无需赋值) */ + /** + * @description Id + */ + id?: string | null + /** + * @description app_id + */ + appId?: string | null + /** + * @description 更新描述 + */ + describe?: string | null + /** + * @description 文件编码 + */ + fileCode?: string | null + /** + * @description 是否显示更新提示 + */ + showTips?: boolean + /** + * @description 版本号 + */ + version?: string | null + /** + * @description 类型(安卓/IOS) + * @format int32 + */ + type?: number + /** + * @description 版本更新时间(前端无需赋值) + * @format date-time + */ + creationTime?: string } export interface AppVersionDtoPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface AppVersionDtoPageListIResultModel { @@ -159,21 +325,52 @@ export interface AppVersionDtoPageListIResultModel { * @description AreaListOutput */ export interface AreaListOutput { - id?: string | null /* 编号 */ - name?: string | null /* 名称 */ - code?: string | null /* 编码 */ - parentId?: string | null /* 父级编号 */ - pinYin?: string | null /* 拼音简码 */ - level?: number /* 级数 */ - type?: boolean /* 启用 */ + /** + * @description 编号 + */ + id?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 编码 + */ + code?: string | null + /** + * @description 父级编号 + */ + parentId?: string | null + /** + * @description 拼音简码 + */ + pinYin?: string | null + /** + * @description 级数 + * @format int32 + */ + level?: number + /** + * @description 启用 + */ + type?: boolean } export interface AreaListOutputPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface AreaListOutputPageListIResultModel { @@ -184,18 +381,56 @@ export interface AreaListOutputPageListIResultModel { * @description 区域Dto */ export interface AreaDto { - id?: string | null /* 编号 */ - code?: string | null /* 区域编码 */ - name?: string | null /* 区域名称 */ - enabled?: boolean /* 是否启用 */ - sortId?: number | null /* 排序号 */ - pinYin?: string | null /* 拼音简码 */ - fullPinYin?: string | null /* 拼音 */ - isLeaf?: boolean /* 是否叶子节点 */ - level?: number /* 级数 */ - parentId?: string | null /* 父编号 */ - path?: string | null /* 路径 */ - type?: boolean /* 是否启用 */ + /** + * @description 编号 + */ + id?: string | null + /** + * @description 区域编码 + */ + code?: string | null + /** + * @description 区域名称 + */ + name?: string | null + /** + * @description 是否启用 + */ + enabled?: boolean + /** + * @description 排序号 + * @format int32 + */ + sortId?: number | null + /** + * @description 拼音简码 + */ + pinYin?: string | null + /** + * @description 拼音 + */ + fullPinYin?: string | null + /** + * @description 是否叶子节点 + */ + isLeaf?: boolean + /** + * @description 级数 + * @format int32 + */ + level?: number + /** + * @description 父编号 + */ + parentId?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 是否启用 + */ + type?: boolean } export interface RemoveModel { @@ -208,11 +443,17 @@ export interface StringTreeOptionResultModel { value?: string | null disabled?: boolean isLeaf?: boolean + /** + * @format int32 + */ level?: number | null - data?: any + data?: unknown | null id?: string | null pid?: string | null - children?: Array + children?: Array | null + /** + * @format int32 + */ sortId?: number } @@ -221,28 +462,37 @@ export interface TreeOptionResultModel { value?: string | null disabled?: boolean isLeaf?: boolean + /** + * @format int32 + */ level?: number | null - data?: any + data?: unknown | null id?: string | null pid?: string | null - children?: Array + children?: Array | null + /** + * @format int32 + */ sortId?: number } export interface TreeOptionResultModelListIResultModel { - data?: Array + data?: Array | null } export interface StringOptionResultModel { label?: string | null value?: string | null disabled?: boolean - data?: any + data?: unknown | null + /** + * @format int32 + */ sortId?: number } export interface StringOptionResultModelListIResultModel { - data?: Array + data?: Array | null } export interface AuditListOutput { @@ -251,19 +501,34 @@ export interface AuditListOutput { routeSummary?: string | null url?: string | null method?: string | null + /** + * @format int32 + */ statusCode?: number remoteIP?: string | null userId?: string | null userName?: string | null + /** + * @format date-time + */ creationTime?: string } export interface AuditListOutputPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface AuditListOutputPageListIResultModel { @@ -274,15 +539,43 @@ export interface AuditListOutputPageListIResultModel { * @description 数据字典Dto */ export interface DictionaryDto { - id?: string | null /* 标识 */ - extend?: string | null /* 扩展 */ - name?: string | null /* 名称 */ - parentId?: string | null /* 父级id */ - remark?: string | null /* 备注 */ - sortId?: number | null /* 排序 */ - typeId?: string | null /* 数据字典类型 */ - value?: string | null /* 枚举值 */ - isEnable?: boolean /* 启用 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 扩展 + */ + extend?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 父级id + */ + parentId?: string | null + /** + * @description 备注 + */ + remark?: string | null + /** + * @description 排序 + * @format int32 + */ + sortId?: number | null + /** + * @description 数据字典类型 + */ + typeId?: string | null + /** + * @description 枚举值 + */ + value?: string | null + /** + * @description 启用 + */ + isEnable?: boolean } /** @@ -290,16 +583,28 @@ export interface DictionaryDto { */ export interface DictionaryType { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - code?: string | null /* 唯一编码 */ - name?: string | null /* 名称 */ - dictionarys?: Array + /** + * @description 唯一编码 + */ + code?: string | null + /** + * @description 名称 + */ + name?: string | null + dictionarys?: Array | null } /** @@ -307,24 +612,55 @@ export interface DictionaryType { */ export interface Dictionary { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - typeId?: string | null /* 数据字典类型 */ - isEnable?: boolean /* 启用 */ - parentId?: string | null /* 父级Id */ - extend?: string | null /* 扩展 */ - name?: string | null /* 名称 */ - remark?: string | null /* 备注 */ - sortId?: number | null /* 排序 */ - value?: string | null /* 枚举值 */ + /** + * @description 数据字典类型 + */ + typeId?: string | null + /** + * @description 启用 + */ + isEnable?: boolean + /** + * @description 父级Id + */ + parentId?: string | null + /** + * @description 扩展 + */ + extend?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 备注 + */ + remark?: string | null + /** + * @description 排序 + * @format int32 + */ + sortId?: number | null + /** + * @description 枚举值 + */ + value?: string | null pDictionary?: Dictionary dictionaryType?: DictionaryType - dictionarys?: Array + dictionarys?: Array | null } export interface DictionaryIResultModel { @@ -332,11 +668,20 @@ export interface DictionaryIResultModel { } export interface DictionaryDtoPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface DictionaryDtoPageListIResultModel { @@ -349,7 +694,7 @@ export interface StringRemoveModel { } export interface DictionaryListIResultModel { - data?: Array + data?: Array | null } export interface StringTreeOptionResultModelDto { @@ -357,26 +702,47 @@ export interface StringTreeOptionResultModelDto { value?: string | null disabled?: boolean isLeaf?: boolean + /** + * @format int32 + */ level?: number | null - data?: any + data?: unknown | null id?: string | null pid?: string | null - children?: Array /* 重写隐藏父类Children */ + /** + * @description 重写隐藏父类Children + */ + children?: Array | null + /** + * @format int32 + */ sortId?: number - extend?: string | null /* 扩展 */ + /** + * @description 扩展 + */ + extend?: string | null } export interface StringTreeOptionResultModelDtoListIResultModel { - data?: Array + data?: Array | null } /** * @description 数据字典类型Dto */ export interface DictionaryTypeDto { - id?: string | null /* 标识 */ - code?: string | null /* 唯一编码 */ - name?: string | null /* 名称 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 唯一编码 + */ + code?: string | null + /** + * @description 名称 + */ + name?: string | null } export interface DictionaryTypeIResultModel { @@ -384,11 +750,20 @@ export interface DictionaryTypeIResultModel { } export interface DictionaryTypeDtoPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface DictionaryTypeDtoPageListIResultModel { @@ -399,31 +774,94 @@ export interface DictionaryTypeDtoPageListIResultModel { * @description 企业(enterprise)分页列表输出模型 */ export interface EnterpriseListOutput { - id?: string | null /* 机构标识 */ - areaCode?: string | null /* 行政区代码 */ - areaName?: string | null /* 行政区名称 */ - code?: string | null /* 机构编码 */ - contactNumber?: string | null /* 联系人电话 */ - contactPerson?: string | null /* 联系人 */ - isEnabled?: boolean /* 是否启用 */ - legalRepresentative?: string | null /* 法人代表 */ - legalRepresentativeNumber?: string | null /* 法人代表电话 */ - level?: number /* 级数 */ - name?: string | null /* 机构名称 */ - path?: string | null /* 路径 */ - pathText?: string | null /* 中文全路径 */ - pinYin?: string | null /* 拼音简码 */ - simpleName?: string | null /* 机构简称(用于上报部级数据展示名称) */ - sortId?: number /* 排序号 */ - type?: number /* 企业类型(1:企业, 2:个人) */ + /** + * @description 机构标识 + */ + id?: string | null + /** + * @description 行政区代码 + */ + areaCode?: string | null + /** + * @description 行政区名称 + */ + areaName?: string | null + /** + * @description 机构编码 + */ + code?: string | null + /** + * @description 联系人电话 + */ + contactNumber?: string | null + /** + * @description 联系人 + */ + contactPerson?: string | null + /** + * @description 是否启用 + */ + isEnabled?: boolean + /** + * @description 法人代表 + */ + legalRepresentative?: string | null + /** + * @description 法人代表电话 + */ + legalRepresentativeNumber?: string | null + /** + * @description 级数 + * @format int32 + */ + level?: number + /** + * @description 机构名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 中文全路径 + */ + pathText?: string | null + /** + * @description 拼音简码 + */ + pinYin?: string | null + /** + * @description 机构简称(用于上报部级数据展示名称) + */ + simpleName?: string | null + /** + * @description 排序号 + * @format int32 + */ + sortId?: number + /** + * @description 企业类型(1:企业, 2:个人) + * @format int32 + */ + type?: number } export interface EnterpriseListOutputPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface EnterpriseListOutputPageListIResultModel { @@ -434,23 +872,77 @@ export interface EnterpriseListOutputPageListIResultModel { * @description 企业(enterprise)输出模型 */ export interface EnterpriseOutput { - id?: string | null /* 机构标识 */ - areaCode?: string | null /* 行政区代码 */ - areaName?: string | null /* 行政区名称 */ - code?: string | null /* 机构编码 */ - contactNumber?: string | null /* 联系人电话 */ - contactPerson?: string | null /* 联系人 */ - isEnabled?: boolean /* 是否启用 */ - legalRepresentative?: string | null /* 法人代表 */ - legalRepresentativeNumber?: string | null /* 法人代表电话 */ - level?: number /* 级数 */ - name?: string | null /* 机构名称 */ - path?: string | null /* 路径 */ - pathText?: string | null /* 中文全路径 */ - pinYin?: string | null /* 拼音简码 */ - simpleName?: string | null /* 机构简称(用于上报部级数据展示名称) */ - sortId?: number /* 排序号 */ - type?: number /* 企业类型(1:企业, 2:个人) */ + /** + * @description 机构标识 + */ + id?: string | null + /** + * @description 行政区代码 + */ + areaCode?: string | null + /** + * @description 行政区名称 + */ + areaName?: string | null + /** + * @description 机构编码 + */ + code?: string | null + /** + * @description 联系人电话 + */ + contactNumber?: string | null + /** + * @description 联系人 + */ + contactPerson?: string | null + /** + * @description 是否启用 + */ + isEnabled?: boolean + /** + * @description 法人代表 + */ + legalRepresentative?: string | null + /** + * @description 法人代表电话 + */ + legalRepresentativeNumber?: string | null + /** + * @description 级数 + * @format int32 + */ + level?: number + /** + * @description 机构名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 中文全路径 + */ + pathText?: string | null + /** + * @description 拼音简码 + */ + pinYin?: string | null + /** + * @description 机构简称(用于上报部级数据展示名称) + */ + simpleName?: string | null + /** + * @description 排序号 + * @format int32 + */ + sortId?: number + /** + * @description 企业类型(1:企业, 2:个人) + * @format int32 + */ + type?: number } export interface EnterpriseOutputIResultModel { @@ -461,56 +953,144 @@ export interface EnterpriseOutputIResultModel { * @description 企业(enterprise)输入模型 */ export interface EnterpriseInput { - id?: string | null /* 机构标识 */ - parentId?: string | null /* 父级Id */ - areaCode?: string | null /* 行政区代码 */ - areaName?: string | null /* 行政区名称 */ - code?: string | null /* 机构编码 */ - contactNumber?: string | null /* 联系人电话 */ - contactPerson?: string | null /* 联系人 */ - isEnabled?: boolean /* 是否启用 */ - legalRepresentative?: string | null /* 法人代表 */ - legalRepresentativeNumber?: string | null /* 法人代表电话 */ - name?: string | null /* 机构名称 */ - sortId?: number /* 排序号 */ - type?: number /* 企业类型(1:企业, 2:个人) */ + /** + * @description 机构标识 + */ + id?: string | null + /** + * @description 父级Id + */ + parentId?: string | null + /** + * @description 行政区代码 + */ + areaCode?: string | null + /** + * @description 行政区名称 + */ + areaName?: string | null + /** + * @description 机构编码 + */ + code?: string | null + /** + * @description 联系人电话 + */ + contactNumber?: string | null + /** + * @description 联系人 + */ + contactPerson?: string | null + /** + * @description 是否启用 + */ + isEnabled?: boolean + /** + * @description 法人代表 + */ + legalRepresentative?: string | null + /** + * @description 法人代表电话 + */ + legalRepresentativeNumber?: string | null + /** + * @description 机构名称 + */ + name?: string | null + /** + * @description 排序号 + * @format int32 + */ + sortId?: number + /** + * @description 企业类型(1:企业, 2:个人) + * @format int32 + */ + type?: number } /** * @description 枚举 */ -export type FaqCategoryOutputType = 0 | 1 | undefined /* 枚举 */ +export type FaqCategoryOutputType = 0 | 1 /** * @description 帮助分类分页列表输出模型 */ export interface FaqCategoryTreeOutput { - id?: string | null /* 编号 */ - parentId?: string | null /* 父编号 */ - icon?: string | null /* 图标 */ - name?: string | null /* 名称 */ - path?: string | null /* 路径 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ + /** + * @description 编号 + */ + id?: string | null + /** + * @description 父编号 + */ + parentId?: string | null + /** + * @description 图标 + */ + icon?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number type?: FaqCategoryOutputType - children?: Array /* 子级 */ + /** + * @description 子级 + */ + children?: Array | null } export interface FaqCategoryTreeOutputListIResultModel { - data?: Array + data?: Array | null } /** * @description 帮助分类输出模型 */ export interface FaqCategoryOutput { - id?: string | null /* 编号 */ - parentId?: string | null /* 父编号 */ - icon?: string | null /* 图标 */ - name?: string | null /* 名称 */ - path?: string | null /* 路径 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ + /** + * @description 编号 + */ + id?: string | null + /** + * @description 父编号 + */ + parentId?: string | null + /** + * @description 图标 + */ + icon?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number } export interface FaqCategoryOutputIResultModel { @@ -521,34 +1101,88 @@ export interface FaqCategoryOutputIResultModel { * @description 帮助分类输入模型 */ export interface FaqCategoryInput { - id?: string | null /* 编号 */ - parentId?: string | null /* 父编号 */ - icon?: string | null /* 图标 */ - name?: string | null /* 名称 */ - path?: string | null /* 路径 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ + /** + * @description 编号 + */ + id?: string | null + /** + * @description 父编号 + */ + parentId?: string | null + /** + * @description 图标 + */ + icon?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number } /** * @description 帮助内容分页列表输出模型 */ export interface FaqContentListOutput { - id?: string | null /* 标识 */ - categoryId?: string | null /* 分类标识 */ - content?: string | null /* 内容 */ - readingQuantity?: number /* 阅读量 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ - title?: string | null /* 标题 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 分类标识 + */ + categoryId?: string | null + /** + * @description 内容 + */ + content?: string | null + /** + * @description 阅读量 + * @format int32 + */ + readingQuantity?: number + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number + /** + * @description 标题 + */ + title?: string | null } export interface FaqContentListOutputPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface FaqContentListOutputPageListIResultModel { @@ -559,13 +1193,36 @@ export interface FaqContentListOutputPageListIResultModel { * @description 帮助内容输出模型 */ export interface FaqContentOutput { - id?: string | null /* 标识 */ - categoryId?: string | null /* 分类标识 */ - content?: string | null /* 内容 */ - readingQuantity?: number /* 阅读量 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ - title?: string | null /* 标题 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 分类标识 + */ + categoryId?: string | null + /** + * @description 内容 + */ + content?: string | null + /** + * @description 阅读量 + * @format int32 + */ + readingQuantity?: number + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number + /** + * @description 标题 + */ + title?: string | null } export interface FaqContentOutputIResultModel { @@ -576,38 +1233,105 @@ export interface FaqContentOutputIResultModel { * @description 帮助内容输入模型 */ export interface FaqContentInput { - id?: string | null /* 标识 */ - categoryId?: string | null /* 分类标识 */ - content?: string | null /* 内容 */ - readingQuantity?: number /* 阅读量 */ - remarks?: string | null /* 备注 */ - sort?: number /* 排序码 */ - title?: string | null /* 标题 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 分类标识 + */ + categoryId?: string | null + /** + * @description 内容 + */ + content?: string | null + /** + * @description 阅读量 + * @format int32 + */ + readingQuantity?: number + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 排序码 + * @format int32 + */ + sort?: number + /** + * @description 标题 + */ + title?: string | null } /** * @description LoginLogListOutput */ export interface LoginLogListOutput { - id?: string | null /* Id */ - ip?: string | null /* 登录IP */ - browser?: string | null /* 浏览器 */ - os?: string | null /* 操作系统 */ - device?: string | null /* 设备 */ - elapsedMilliseconds?: number /* 耗时(毫秒) */ - status?: boolean /* 登录状态(true成功,false失败) */ - msg?: string | null /* 返回消息 */ - userName?: string | null /* 用户名 */ - creationTime?: string /* 创建时间 */ - realName?: string | null /* 姓名(昵称) */ + /** + * @description Id + */ + id?: string | null + /** + * @description 登录IP + */ + ip?: string | null + /** + * @description 浏览器 + */ + browser?: string | null + /** + * @description 操作系统 + */ + os?: string | null + /** + * @description 设备 + */ + device?: string | null + /** + * @description 耗时(毫秒) + * @format int64 + */ + elapsedMilliseconds?: number + /** + * @description 登录状态(true成功,false失败) + */ + status?: boolean + /** + * @description 返回消息 + */ + msg?: string | null + /** + * @description 用户名 + */ + userName?: string | null + /** + * @description 创建时间 + * @format date-time + */ + creationTime?: string + /** + * @description 姓名(昵称) + */ + realName?: string | null } export interface LoginLogListOutputPageList { + /** + * @format int32 + */ page?: number + /** + * @format int32 + */ pageSize?: number + /** + * @format int64 + */ totalCount?: number order?: string | null - list?: Array + list?: Array | null } export interface LoginLogListOutputPageListIResultModel { @@ -615,20 +1339,61 @@ export interface LoginLogListOutputPageListIResultModel { } export interface MenuInput { - id?: string | null /* 标识 */ - parentId?: string | null /* 父级Id */ - icon?: string | null /* 图标 */ - iconColor?: string | null /* 图表颜色 */ - link?: string | null /* 链接、路由 */ - moduleCode?: string | null /* 所属模块 */ - name?: string | null /* 名称 */ - remarks?: string | null /* 备注 */ - routeParams?: string | null /* 路由参数 */ - show?: boolean /* 是否显示 */ - sort?: number /* 排序码 */ - target?: number /* 打开方式 */ + /** + * @description 标识 + */ + id?: string | null + /** + * @description 父级Id + */ + parentId?: string | null + /** + * @description 图标 + */ + icon?: string | null + /** + * @description 图表颜色 + */ + iconColor?: string | null + /** + * @description 链接、路由 + */ + link?: string | null + /** + * @description 所属模块 + */ + moduleCode?: string | null + /** + * @description 名称 + */ + name?: string | null + /** + * @description 备注 + */ + remarks?: string | null + /** + * @description 路由参数 + */ + routeParams?: string | null + /** + * @description 是否显示 + */ + show?: boolean + /** + * @description 排序码 + * @format int32 + */ + sort?: number + /** + * @description 打开方式 + * @format int32 + */ + target?: number client?: ClientEnums - component?: string | null /* 组件 */ + /** + * @description 组件 + */ + component?: string | null } /** @@ -636,15 +1401,43 @@ export interface MenuInput { */ export interface Api { id?: string | null - parentId?: string | null /* 父级id(默认为"") */ - code?: string | null /* 权限点 */ - enable?: boolean /* 启用(默认为启用) */ - httpMethod?: string | null /* 请求方式 */ - level?: number /* 层级(从1开始) */ - name?: string | null /* 资源名称 */ - path?: string | null /* id全路径 */ - pathText?: string | null /* 中文全路径 */ - remarks?: string | null /* 备注 */ + /** + * @description 父级id(默认为"") + */ + parentId?: string | null + /** + * @description 权限点 + */ + code?: string | null + /** + * @description 启用(默认为启用) + */ + enable?: boolean + /** + * @description 请求方式 + */ + httpMethod?: string | null + /** + * @description 层级(从1开始) + * @format int32 + */ + level?: number + /** + * @description 资源名称 + */ + name?: string | null + /** + * @description id全路径 + */ + path?: string | null + /** + * @description 中文全路径 + */ + pathText?: string | null + /** + * @description 备注 + */ + remarks?: string | null } /** @@ -652,32 +1445,92 @@ export interface Api { */ export interface Enterprise { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - parentId?: string | null /* 父级编号 */ - areaCode?: string | null /* 行政区代码 */ - areaName?: string | null /* 行政区名称 */ - code?: string | null /* 机构编码 */ - contactNumber?: string | null /* 联系人电话 */ - contactPerson?: string | null /* 联系人 */ - isEnabled?: boolean /* 是否启用 */ - legalRepresentative?: string | null /* 法人代表 */ - legalRepresentativeNumber?: string | null /* 法人代表电话 */ - level?: number /* 级数 */ - name?: string | null /* 机构名称 */ - path?: string | null /* 路径 */ - pathText?: string | null /* 中文全路径 */ - pinYin?: string | null /* 拼音简码 */ - simpleName?: string | null /* 机构简称(用于上报部级数据展示名称) */ - sortId?: number /* 排序号 */ - type?: number /* 企业类型(1:企业, 2:个人) */ - organizations?: Array - userInfos?: Array + /** + * @description 父级编号 + */ + parentId?: string | null + /** + * @description 行政区代码 + */ + areaCode?: string | null + /** + * @description 行政区名称 + */ + areaName?: string | null + /** + * @description 机构编码 + */ + code?: string | null + /** + * @description 联系人电话 + */ + contactNumber?: string | null + /** + * @description 联系人 + */ + contactPerson?: string | null + /** + * @description 是否启用 + */ + isEnabled?: boolean + /** + * @description 法人代表 + */ + legalRepresentative?: string | null + /** + * @description 法人代表电话 + */ + legalRepresentativeNumber?: string | null + /** + * @description 级数 + * @format int32 + */ + level?: number + /** + * @description 机构名称 + */ + name?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 中文全路径 + */ + pathText?: string | null + /** + * @description 拼音简码 + */ + pinYin?: string | null + /** + * @description 机构简称(用于上报部级数据展示名称) + */ + simpleName?: string | null + /** + * @description 排序号 + * @format int32 + */ + sortId?: number + /** + * @description 企业类型(1:企业, 2:个人) + * @format int32 + */ + type?: number + organizations?: Array | null + userInfos?: Array | null } /** @@ -685,31 +1538,63 @@ export interface Enterprise { */ export interface Organizations { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - enterpriseId?: string | null /* 所属企业id */ - leader?: string | null /* 负责人 */ - level?: number /* 级别 */ - name?: string | null /* 名称 */ - parentId?: string | null /* 父级编号 */ - path?: string | null /* 路径 */ - pathText?: string | null /* 中文路径 */ - sortId?: number /* 排序号 */ + /** + * @description 所属企业id + */ + enterpriseId?: string | null + /** + * @description 负责人 + */ + leader?: string | null + /** + * @description 级别 + * @format int32 + */ + level?: number + /** + * @description 名称 + */ + name?: string | null + /** + * @description 父级编号 + */ + parentId?: string | null + /** + * @description 路径 + */ + path?: string | null + /** + * @description 中文路径 + */ + pathText?: string | null + /** + * @description 排序号 + * @format int32 + */ + sortId?: number enterprise?: Enterprise - userInfos?: Array + userInfos?: Array | null } export interface ClaimsIdentity { authenticationType?: string | null isAuthenticated?: boolean actor?: ClaimsIdentity - bootstrapContext?: any - claims?: Array + bootstrapContext?: unknown | null + claims?: Array | null label?: string | null name?: string | null nameClaimType?: string | null @@ -719,7 +1604,9 @@ export interface ClaimsIdentity { export interface Claim { issuer?: string | null originalIssuer?: string | null - properties?: {} + properties?: { + [key: string]: string + } | null subject?: ClaimsIdentity type?: string | null value?: string | null @@ -731,30 +1618,81 @@ export interface Claim { */ export interface UserInfo { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - enterpriseId?: string | null /* 企业Id */ - orgId?: string | null /* 组织架构Id */ - email?: string | null /* 邮箱 */ - headPortraitCode?: string | null /* 头像 */ - idCard?: string | null /* 身份证 */ - passwordHash?: string | null /* 密码加密字符 */ - passwordSalt?: string | null /* 密码加密盐值 */ - phoneNumber?: string | null /* 手机号 */ - realName?: string | null /* 真实姓名 */ - sex?: number /* 性别(1.男 2.女) */ - status?: number /* 状态 */ - type?: number /* 用户类型 */ - userName?: string | null /* 用户名 */ + /** + * @description 企业Id + */ + enterpriseId?: string | null + /** + * @description 组织架构Id + */ + orgId?: string | null + /** + * @description 邮箱 + */ + email?: string | null + /** + * @description 头像 + */ + headPortraitCode?: string | null + /** + * @description 身份证 + */ + idCard?: string | null + /** + * @description 密码加密字符 + */ + passwordHash?: string | null + /** + * @description 密码加密盐值 + */ + passwordSalt?: string | null + /** + * @description 手机号 + */ + phoneNumber?: string | null + /** + * @description 真实姓名 + */ + realName?: string | null + /** + * @description 性别(1.男 2.女) + * @format int32 + */ + sex?: number + /** + * @description 状态 + * @format int32 + */ + status?: number + /** + * @description 用户类型 + * @format int32 + */ + type?: number + /** + * @description 用户名 + */ + userName?: string | null organizations?: Organizations enterprise?: Enterprise - roles?: Array - claims?: Array /* 用户身份声明 */ + roles?: Array | null + /** + * @description 用户身份声明 + */ + claims?: Array | null } /** @@ -762,20 +1700,48 @@ export interface UserInfo { */ export interface Roles { id?: string | null + /** + * @format date-time + */ creationTime?: string creatorUserId?: string | null creatorUserName?: string | null + /** + * @format date-time + */ lastModificationTime?: string lastModifierUserId?: string | null lastModifierUserName?: string | null isDeleted?: boolean - code?: string | null /* 枚举编码 */ - remarks?: string | null /* 备注 */ - roleName?: string | null /* 角色名/组名 */ - sortId?: number /* 排序值 */ - menus?: Array /* Menus导航属性 */ - users?: Array /* Users导航属性 */ - buttons?: Array