Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled

Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
你的用户名
2025-11-04 15:37:50 +08:00
commit 237c7802e5
3674 changed files with 525172 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# @vben/types
用于多个 `app` 公用的工具类型,继承了 `@vben-core/typings` 的所有能力。业务上有通用的类型定义可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/types
```
### 使用
```ts
// 推荐加上 type
import type { SelectOption } from '@vben/types';
```

View File

@@ -0,0 +1,32 @@
import type { RouteMeta as IRouteMeta } from '@vben-core/typings';
import 'vue-router';
declare module 'vue-router' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface RouteMeta extends IRouteMeta {}
}
export interface VbenAdminProAppConfigRaw {
VITE_GLOB_API_URL: string;
VITE_GLOB_AUTH_DINGDING_CLIENT_ID: string;
VITE_GLOB_AUTH_DINGDING_CORP_ID: string;
}
interface AuthConfig {
dingding?: {
clientId: string;
corpId: string;
};
}
export interface ApplicationConfig {
apiURL: string;
auth: AuthConfig;
}
declare global {
interface Window {
_VBEN_ADMIN_PRO_APP_CONF_: VbenAdminProAppConfigRaw;
}
}

View File

@@ -0,0 +1,27 @@
{
"name": "@vben/types",
"version": "5.5.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "packages/types"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./global": {
"types": "./global.d.ts"
}
},
"dependencies": {
"@vben-core/typings": "workspace:*",
"vue": "catalog:",
"vue-router": "catalog:"
}
}

View File

@@ -0,0 +1,3 @@
export type * from './user';
export type * from './permission';
export type * from '@vben-core/typings';

View File

@@ -0,0 +1,139 @@
/**
* 权限相关类型定义
*/
export {};
/**
* 权限类型
*/
export type PermissionType = 'menu' | 'button' | 'api';
/**
* 权限模式
*/
export type PermissionModeType = 'ROLE' | 'BACK' | 'ROUTE';
/**
* 权限项
*/
export interface Permission {
/** 权限ID */
id: string;
/** 权限名称 */
name: string;
/** 权限编码 */
code: string;
/** 权限类型 */
type: PermissionType;
/** 父级权限ID */
parentId?: string;
/** 权限路径 */
path?: string;
/** 权限图标 */
icon?: string;
/** 排序 */
sort?: number;
/** 是否启用 */
enabled?: boolean;
/** 权限描述 */
description?: string;
/** 子权限 */
children?: Permission[];
}
/**
* 角色
*/
export interface Role {
/** 角色ID */
id: string;
/** 角色名称 */
name: string;
/** 角色编码 */
code: string;
/** 角色描述 */
description?: string;
/** 是否启用 */
enabled?: boolean;
/** 权限ID列表 */
permissionIds?: string[];
/** 权限列表 */
permissions?: Permission[];
/** 创建时间 */
createTime?: string;
/** 更新时间 */
updateTime?: string;
}
/**
* 用户权限信息
*/
export interface UserPermission {
/** 用户ID */
userId: string;
/** 用户名 */
username: string;
/** 角色列表 */
roles: Role[];
/** 权限列表 */
permissions: Permission[];
/** 权限编码列表 */
permissionCodes: string[];
/** 是否超级管理员 */
isSuperAdmin?: boolean;
}
/**
* 菜单项
*/
export interface MenuItem {
/** 菜单ID */
id: string;
/** 菜单名称 */
name: string;
/** 菜单路径 */
path: string;
/** 菜单图标 */
icon?: string;
/** 组件路径 */
component?: string;
/** 重定向路径 */
redirect?: string;
/** 父级菜单ID */
parentId?: string;
/** 排序 */
sort?: number;
/** 是否隐藏 */
hidden?: boolean;
/** 是否缓存 */
keepAlive?: boolean;
/** 权限编码 */
permission?: string;
/** 子菜单 */
children?: MenuItem[];
/** 元数据 */
meta?: {
title?: string;
icon?: string;
roles?: string[];
permissions?: string[];
[key: string]: any;
};
}
/**
* 权限检查函数类型
*/
export type PermissionChecker = (
permissions: string | string[],
mode?: 'some' | 'every',
) => boolean;
/**
* 角色检查函数类型
*/
export type RoleChecker = (
roles: string | string[],
mode?: 'some' | 'every',
) => boolean;

View File

@@ -0,0 +1,20 @@
import type { BasicUserInfo } from '@vben-core/typings';
/** 用户信息 */
interface UserInfo extends BasicUserInfo {
/**
* 用户描述
*/
desc: string;
/**
* 首页地址
*/
homePath: string;
/**
* accessToken
*/
token: string;
}
export type { UserInfo };

View File

@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/web.json",
"include": ["src"],
"exclude": ["node_modules"]
}