初始化

This commit is contained in:
2026-02-22 18:56:10 +08:00
commit 26677972a6
3112 changed files with 255972 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,32 @@
import type { RouteMeta as IRouteMeta } from '@easyflow-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 EasyFlowAdminProAppConfigRaw {
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 {
_APP_ADMIN_PRO_APP_CONF_: EasyFlowAdminProAppConfigRaw;
}
}

View File

@@ -0,0 +1,20 @@
{
"name": "@easyflow/types",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./global": {
"types": "./global.d.ts"
}
},
"dependencies": {
"@easyflow-core/typings": "workspace:*",
"vue": "catalog:",
"vue-router": "catalog:"
}
}

View File

@@ -0,0 +1,36 @@
interface BotInfo {
alias: string;
anonymousEnabled: boolean;
created: string;
createdBy: number;
deptId: number;
description: string;
icon: string;
id: string;
llmId: string;
llmOptions: {
maxMessageCount: number;
maxReplyLength: number;
temperature: number;
topK: number;
topP: number;
};
modified: string;
modifiedBy: number;
options: {
anonymousEnabled: boolean;
EncodingAESKey: string;
presetQuestions: string[];
reActModeEnabled: boolean;
voiceEnabled: boolean;
weChatMpAesKey: string;
weChatMpAppId: string;
weChatMpSecret: string;
weChatMpToken: string;
welcomeMessage: string;
};
tenantId: number;
title: string;
}
export type { BotInfo };

View File

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

View File

@@ -0,0 +1,20 @@
import type { BasicUserInfo } from '@easyflow-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": "@easyflow/tsconfig/web.json",
"include": ["src"],
"exclude": ["node_modules"]
}