Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e10804c
fix: push again, user select option button and form input radio conte…
fishwww-ww Sep 9, 2025
79b03fe
ui
c121914yu Sep 10, 2025
b21a5d9
del collection api adapt
c121914yu Sep 11, 2025
7b48c11
refactor: inherit permission (#5529)
FinleyGe Sep 11, 2025
3c03709
prompt editor add list plugin (#5620)
newfish-cmyk Sep 11, 2025
be290f8
fix: fe & member list (#5619)
FinleyGe Sep 11, 2025
676062a
perf: test code
c121914yu Sep 11, 2025
d1d9742
doc
c121914yu Sep 11, 2025
2540e26
fix debug variables (#5617)
newfish-cmyk Sep 11, 2025
813cb7d
perf: member ui
c121914yu Sep 11, 2025
e145d32
fix: inherit bug (#5624)
FinleyGe Sep 11, 2025
36ad582
perf: auto coupon
c121914yu Sep 12, 2025
9e31936
chore: upgrade script & get infos avatar (#5625)
FinleyGe Sep 12, 2025
f1d44de
feat: support WecomRobot publish, and fix AesKey can not save bug (#5…
fishwww-ww Sep 12, 2025
c6646aa
remove test
c121914yu Sep 12, 2025
abeb41a
rename init shell
c121914yu Sep 12, 2025
fdd58aa
feat: collection page store
c121914yu Sep 12, 2025
873ccdc
reload sandbox
c121914yu Sep 12, 2025
d2db8e5
pysandbox
c121914yu Sep 12, 2025
2f2fc5e
remove log
c121914yu Sep 12, 2025
30fac83
chore: remove useless code (#5629)
FinleyGe Sep 12, 2025
997a129
fix: copy node
c121914yu Sep 12, 2025
666daab
update doc
c121914yu Sep 12, 2025
4e52e54
fix(permission): some bug (#5632)
FinleyGe Sep 12, 2025
f588c02
perf: del app;i18n;save chat
c121914yu Sep 12, 2025
d86a4ce
fix: test
c121914yu Sep 12, 2025
5e5d688
i18n
c121914yu Sep 12, 2025
cc77188
fix: sumper overflow return OwnerRoleVal (#5633)
FinleyGe Sep 12, 2025
bae0d58
remove invalid code
c121914yu Sep 12, 2025
30b668f
fix: scroll
c121914yu Sep 13, 2025
0fd2a3f
fix: objectId
c121914yu Sep 13, 2025
2a119ba
update next
c121914yu Sep 14, 2025
d1c8b25
update package
c121914yu Sep 14, 2025
b65a8ec
object id
c121914yu Sep 14, 2025
52b2ab0
mock redis
c121914yu Sep 14, 2025
995c30d
feat: add redis append to resolve wecom stream response (#5643)
fishwww-ww Sep 15, 2025
65b2200
cache per
c121914yu Sep 15, 2025
132fc29
fix(test): init team sub when creating mocked user (#5646)
FinleyGe Sep 15, 2025
dc7d02b
fix: button is not vertically centered (#5647)
fishwww-ww Sep 15, 2025
75db87f
doc
c121914yu Sep 15, 2025
4b70084
fix: gridFs objectId (#5649)
FinleyGe Sep 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -868,16 +868,20 @@ curl --location --request PUT 'http://localhost:3000/api/core/dataset/collection
<Tab value="请求示例" >

```bash
curl --location --request DELETE 'http://localhost:3000/api/core/dataset/collection/delete?id=65aa2a64e6cb9b8ccdc00de8' \
--header 'Authorization: Bearer {{authorization}}' \
curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/delete' \
--header 'Authorization: Bearer fastgpt-' \
--header 'Content-Type: application/json' \
--data-raw '{
"collectionIds": ["65a8cdcb0d70d3de0bf08d0a"]
}'
```

</Tab>

<Tab value="参数说明" >

<div>
- id: 集合的ID
- collectionIds: 集合的 ID 列表
</div>

</Tab>
Expand Down
2 changes: 2 additions & 0 deletions document/content/docs/toc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ description: FastGPT 文档目录
- [/docs/upgrading/4-12/4121](/docs/upgrading/4-12/4121)
- [/docs/upgrading/4-12/4122](/docs/upgrading/4-12/4122)
- [/docs/upgrading/4-12/4123](/docs/upgrading/4-12/4123)
- [/docs/upgrading/4-12/4124](/docs/upgrading/4-12/4124)
- [/docs/upgrading/4-8/40](/docs/upgrading/4-8/40)
- [/docs/upgrading/4-8/41](/docs/upgrading/4-8/41)
- [/docs/upgrading/4-8/42](/docs/upgrading/4-8/42)
Expand Down Expand Up @@ -180,3 +181,4 @@ description: FastGPT 文档目录
- [/docs/use-cases/external-integration/feishu](/docs/use-cases/external-integration/feishu)
- [/docs/use-cases/external-integration/official_account](/docs/use-cases/external-integration/official_account)
- [/docs/use-cases/external-integration/openapi](/docs/use-cases/external-integration/openapi)
- [/docs/use-cases/external-integration/wecom](/docs/use-cases/external-integration/wecom)
26 changes: 26 additions & 0 deletions document/content/docs/upgrading/4-12/4124.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: 'V4.12.4(进行)'
description: 'FastGPT V4.12.4 更新说明'
---

## 🚀 新增内容

1. 商业版支持企微发布渠道。

## ⚙️ 优化

1. 权限继承优化,子资源权限高于父级时,不会强制打断继承模式。
2. Prompt 编辑器支持列表渲染。
3. 数据页返回知识库列表,保持分页。
4. 知识库上传文件成功后,返回对应上传目录。
5. 删除应用,减少事务操作。
6. 用户选择 UI。

## 🐛 修复

1. HTTP 工具空指针,导致无法编辑。
2. python 代码运行,入参无法是 boolean 值。
3. debug 模式下,全局变量未传递。

## 🔨 插件更新

2 changes: 1 addition & 1 deletion document/content/docs/upgrading/4-12/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "4.12.x",
"description": "",
"pages": ["4123", "4122", "4121", "4120"]
"pages": ["4124", "4123", "4122", "4121", "4120"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "外部调用 FastGPT",
"description": "外部应用通过多种方式调用 FastGPT 功能的教程",
"pages": ["openapi", "feishu", "dingtalk", "official_account"]
"pages": ["openapi", "feishu", "dingtalk", "wecom", "official_account"]
}
112 changes: 112 additions & 0 deletions document/content/docs/use-cases/external-integration/wecom.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: 接入企微机器人教程
description: FastGPT 接入企微机器人教程
---

从 4.12.4 版本起,FastGPT 商业版支持直接接入企微机器人,无需额外的 API。

## 1.配置可信域名和可信IP

点击企微头像,打开管理企业

![图片](/imgs/wecom-bot-1.png)

在应用管理中找到"自建"-"创建应用"

![图片](/imgs/wecom-bot-2.png)

创建好应用后, 下拉, 依次配置"网页授权及JS-SDK"和"企业可信IP"

![图片](/imgs/wecom-bot-3.png)

其中, 网页授权及JS-SDK要求按照企微指引,完成域名归属认证

![图片](/imgs/wecom-bot-4.png)

企业可信IP要求为企业服务器IP, 后续企微的回调URL将请求到此IP

![图片](/imgs/wecom-bot-5.png)

## 2. 创建企业自建应用

前往 FastGPT ,选择想要接入的应用,在 发布渠道 页面,新建一个接入企微智能机器人的发布渠道,填写好基础信息。

![图片](/imgs/wecom-bot-6.png)

现在回到企业微信平台,找到 Corp ID, Agent ID, Token, AES Key 信息并填写回 FastGPT 平台

![图片](/imgs/wecom-bot-7.png)

在"我的企业"里找到企业 ID, 填写到 FastGPT 的 Corp ID 中

![图片](/imgs/wecom-bot-8.png)

在应用中找到 Agent Id 和 Secret, 并填写回 FastGPT

![图片](/imgs/wecom-bot-9.png)

点击"消息接收"-"设置API接收"

![图片](/imgs/wecom-bot-10.png)

随机生成或者手动输入 Token 和 Encoding-Key, 分别填写到 FastGPT 的 Token 和 AES Key 中

![图片](/imgs/wecom-bot-11.png)

填写完成后确认创建

然后点击请求地址, 复制页面中的链接

![图片](/imgs/wecom-bot-12.png)

回到刚才的配置详情, 将刚才复制的链接填入 URL 框中, 并点击创建

注意: 若复制的链接是以 "http://localhost" 开头, 需要将本地地址改为企业主体域名

因为企微会给填写的 URL 发送验证密文, 若 URL 为本地地址, 则本地接收不到企微的密文

若 URL 不是企业主体域名, 则验证会失败

## 3. 创建智能机器人

在"安全与管理" - "管理工具"页面找到"智能机器人" ( 注意: 只有企业创建者或超级管理员才有权限看到这个入口 )

![图片](/imgs/wecom-bot-13.png)

创建机器人页面,下拉,找到,点击"API模式创建"

![图片](/imgs/wecom-bot-14.png)

与刚才配置自建应用同理, 配置这三个参数

![图片](/imgs/wecom-bot-15.png)

注意: 这里的 Agent ID , 和上面的不同, 可以先随意填写一个值, 后续会根据企业微信提供的数据重新更改

Secret 为用户自己决定的密令

填写完成后确认创建

然后点击请求地址, 复制页面中的链接, 链接的地址也必须为企业主体域名

创建完成后, 找到智能机器人的配置详情

![图片](/imgs/wecom-bot-16.png)

复制 Bot ID, 填写到 FastGPT 的 Agent ID 中

![图片](/imgs/wecom-bot-17.png)

## 4. 使用智能机器人

在企业微信平台的"通讯录",即可找到创建的机器人,就可以发送消息了

![图片](/imgs/wecom-bot-18.png)

## FAQ

### 发送了消息,没响应

1. 检查企微机器人回调地址、权限等是否正确。
2. 查看 FastGPT 对话日志,是否有对应的提问记录
3. 如果没记录,则可能是应用运行报错了,可以先试试最简单的机器人。(飞书机器人无法输入全局变量、文件、图片内容)
12 changes: 7 additions & 5 deletions document/data/doc-last-modified.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"document/content/docs/introduction/development/modelConfig/ppio.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/modelConfig/siliconCloud.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/openapi/chat.mdx": "2025-08-14T18:54:47+08:00",
"document/content/docs/introduction/development/openapi/dataset.mdx": "2025-08-14T18:54:47+08:00",
"document/content/docs/introduction/development/openapi/dataset.mdx": "2025-09-11T10:29:11+08:00",
"document/content/docs/introduction/development/openapi/intro.mdx": "2025-08-14T18:54:47+08:00",
"document/content/docs/introduction/development/openapi/share.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/development/proxy/cloudflare.mdx": "2025-07-23T21:35:03+08:00",
Expand All @@ -40,7 +40,7 @@
"document/content/docs/introduction/development/sealos.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/introduction/guide/DialogBoxes/htmlRendering.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/DialogBoxes/quoteList.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/admin/sso.mdx": "2025-07-24T13:00:27+08:00",
"document/content/docs/introduction/guide/admin/sso.mdx": "2025-09-08T20:07:04+08:00",
"document/content/docs/introduction/guide/admin/teamMode.mdx": "2025-08-27T16:59:57+08:00",
"document/content/docs/introduction/guide/course/ai_settings.mdx": "2025-07-24T13:00:27+08:00",
"document/content/docs/introduction/guide/course/chat_input_guide.mdx": "2025-07-23T21:35:03+08:00",
Expand Down Expand Up @@ -97,15 +97,16 @@
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
"document/content/docs/toc.mdx": "2025-08-29T01:24:19+08:00",
"document/content/docs/toc.mdx": "2025-09-12T12:58:39+08:00",
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-10/4101.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/upgrading/4-11/4111.mdx": "2025-08-07T22:49:09+08:00",
"document/content/docs/upgrading/4-12/4120.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4121.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-13T01:34:04+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
Expand Down Expand Up @@ -185,5 +186,6 @@
"document/content/docs/use-cases/external-integration/feishu.mdx": "2025-07-24T14:23:04+08:00",
"document/content/docs/use-cases/external-integration/official_account.mdx": "2025-08-05T23:20:39+08:00",
"document/content/docs/use-cases/external-integration/openapi.mdx": "2025-08-14T18:54:47+08:00",
"document/content/docs/use-cases/external-integration/wecom.mdx": "2025-09-12T12:58:39+08:00",
"document/content/docs/use-cases/index.mdx": "2025-07-24T14:23:04+08:00"
}
Binary file added document/public/imgs/wecom-bot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/public/imgs/wecom-bot-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
},
"devDependencies": {
"@chakra-ui/cli": "^2.4.1",
"typescript": "^5.1.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitest/coverage-v8": "^3.0.9",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.0",
"husky": "^8.0.3",
"i18next": "23.16.8",
"js-yaml": "^4.1.0",
"lint-staged": "^13.3.0",
"mongodb-memory-server": "^10.1.4",
"next-i18next": "15.4.2",
"prettier": "3.2.4",
"react-i18next": "14.1.2",
"typescript": "^5.1.3",
"vitest": "^3.0.9",
"js-yaml": "^4.1.0",
"mongodb-memory-server": "^10.1.4",
"zhlint": "^0.7.4"
},
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions packages/global/common/system/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export type FastGPTFeConfigsType = {
show_dataset_yuque?: boolean;
show_publish_feishu?: boolean;
show_publish_dingtalk?: boolean;
show_publish_wecom?: boolean;
show_publish_offiaccount?: boolean;

show_dataset_enhance?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/global/core/workflow/runtime/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum)
return typeof value === 'object' ? JSON.stringify(value) : String(value);
}
if (valueType === WorkflowIOValueTypeEnum.number) {
if (value === '') return undefined;
if (value === '') return null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Empty String Conversion Yields Null

Converting an empty string to a number now returns null instead of undefined. This change can break downstream code, as JavaScript treats null and undefined differently, potentially affecting conditional logic or strict equality checks that rely on the original undefined behavior.

Fix in Cursor Fix in Web

return Number(value);
}
if (valueType === WorkflowIOValueTypeEnum.boolean) {
Expand Down
4 changes: 2 additions & 2 deletions packages/global/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"@fastgpt-sdk/plugin": "^0.1.16",
"@apidevtools/swagger-parser": "^10.1.0",
"@bany/curl-to-json": "^1.2.8",
"axios": "^1.8.2",
"axios": "^1.12.1",
"cron-parser": "^4.9.0",
"dayjs": "^1.11.7",
"encoding": "^0.1.13",
"js-yaml": "^4.1.0",
"jschardet": "3.1.1",
"json5": "^2.2.3",
"nanoid": "^5.1.3",
"next": "14.2.28",
"next": "14.2.32",
"openai": "4.61.0",
"openapi-types": "^12.1.3",
"timezones-list": "^3.0.2",
Expand Down
44 changes: 23 additions & 21 deletions packages/global/support/permission/collaborator.d.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
import type { UpdateAppCollaboratorBody } from 'core/app/collaborator';
import type { RequireOnlyOne } from '../../common/type/utils';
import { RequireAtLeastOne } from '../../common/type/utils';
import type { Permission } from './controller';
import type { PermissionValueType } from './type';
import type { PermissionValueType, RoleValueType } from './type';

export type CollaboratorItemType = {
teamId: string;
permission: Permission;
name: string;
avatar: string;
} & RequireOnlyOne<{
export type CollaboratorIdType = RequireOnlyOne<{
tmbId: string;
groupId: string;
orgId: string;
}>;

export type UpdateClbPermissionProps<addOnly = false> = {
members?: string[];
groups?: string[];
orgs?: string[];
} & (addOnly extends true
? {}
: {
permission: PermissionValueType;
});
export type CollaboratorItemDetailType = {
teamId: string;
permission: Permission;
name: string;
avatar: string;
} & CollaboratorIdType;

export type CollaboratorItemType = {
permission: PermissionValueType;
} & CollaboratorIdType;

export type DeletePermissionQuery = RequireOnlyOne<{
tmbId?: string;
groupId?: string;
orgId?: string;
}>;
export type UpdateClbPermissionProps = {
collaborators: CollaboratorItemType[];
};

export type DeletePermissionQuery = CollaboratorIdType;

export type CollaboratorListType = {
clbs: CollaboratorItemDetailType[];
parentClbs?: CollaboratorItemDetailType[];
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import type { UserModelSchema } from '../user/type';
import type { RequireOnlyOne } from '../../common/type/utils';
import type { TeamMemberSchema } from '../user/team/type';
import { MemberGroupSchemaType } from './memberGroup/type';
import type { TeamMemberWithUserSchema } from '../user/team/type';
import type { CommonPerKeyEnum, CommonRoleKeyEnum } from './constant';
import { AuthUserTypeEnum, type CommonPerKeyEnum, type PerResourceTypeEnum } from './constant';
import type { CommonRoleKeyEnum } from './constant';
import { type CommonPerKeyEnum, type PerResourceTypeEnum } from './constant';

// PermissionValueType, the type of permission's value is a number, which is a bit field actually.
// It is spired by the permission system in Linux.
Expand All @@ -18,14 +16,14 @@ export type ResourceType = `${PerResourceTypeEnum}`;
/**
* Define the roles. Each role is a binary number, only one bit is set to 1.
*/
export type RoleListType<T = {}> = Readonly<
export type RoleListType<T extends string | number | symbol = CommonRoleKeyEnum> = Readonly<
Record<
T | CommonRoleKeyEnum,
Readonly<{
name: string;
description: string;
value: RoleValueType;
checkBoxType: 'single' | 'multiple';
checkBoxType: 'single' | 'multiple' | 'hidden';
}>
>
>;
Expand All @@ -43,7 +41,7 @@ export type RoleListType<T = {}> = Readonly<
* write: 0b110, // bad, should be 0b010
* }
*/
export type PermissionListType<T = {}> = Readonly<
export type PermissionListType<T extends string | number | symbol = CommonPerKeyEnum> = Readonly<
Record<T | CommonPerKeyEnum, PermissionValueType>
>;

Expand Down
Loading