feat: add shared infiplot workspace packages

Signed-off-by: baizhi958216 <1475289190@qq.com>
This commit is contained in:
baizhi958216
2026-06-30 00:44:36 +08:00
parent caca4369aa
commit e585bb2eed
17 changed files with 240 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
{
"name": "@infiplot/types",
"version": "0.1.0",
"private": true,
"type": "module",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
}
},
"scripts": {
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "^6.0.3"
}
}
+33
View File
@@ -0,0 +1,33 @@
export type Locale = "en" | "ja" | "zh-CN";
export type ApiResult<TData, TError = ApiError> =
| { ok: true; data: TData }
| { ok: false; error: TError };
export interface ApiError {
code: string;
message: string;
details?: unknown;
}
export interface StorySummary {
id: string;
title: string;
description?: string;
locale: Locale;
coverImageUrl?: string;
updatedAt?: string;
}
export interface SceneRequest {
storyId?: string;
prompt: string;
locale?: Locale;
}
export interface SceneResponse {
sceneId: string;
text: string;
imageUrl?: string;
audioUrl?: string;
}
+7
View File
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"noEmit": true
},
"include": ["src/**/*.ts"]
}