Просмотр исходного кода

fix: 添加 Role schema permissions 字段支持

- RoleCreateInputSchema 添加 permissions 数组字段
- RoleUpdateInputSchema 添加 permissions 数组字段
- 修复后端 API 必需的 permissions 参数缺失问题

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 недель назад
Родитель
Сommit
ca3498feae
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      packages/admin-mcp-server/src/schemas/index.ts

+ 9 - 0
packages/admin-mcp-server/src/schemas/index.ts

@@ -301,6 +301,11 @@ export const RoleCreateInputSchema = z
       .max(50, 'Role code cannot exceed 50 characters')
       .optional()
       .describe('Role code for permission checks'),
+    permissions: z
+      .array(z.string())
+      .min(1, 'Permissions must have at least one item')
+      .optional()
+      .describe('List of permission strings for the role'),
     status: z
       .number()
       .int()
@@ -337,6 +342,10 @@ export const RoleUpdateInputSchema = z
       .max(50, 'Role code cannot exceed 50 characters')
       .optional()
       .describe('Role code'),
+    permissions: z
+      .array(z.string())
+      .optional()
+      .describe('List of permission strings for the role'),
     status: z
       .number()
       .int()