zyjj-web-sdk 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api.d.ts +4 -0
- package/lib/api/entity.d.ts +4 -2
- package/lib/components/ConcatButton.d.ts +9 -0
- package/lib/components/ToolCard.d.ts +3 -0
- package/lib/index.d.ts +52 -9
- package/lib/index.js +38259 -16188
- package/lib/index.umd.cjs +51 -25
- package/lib/pages/MaterialList.d.ts +3 -1
- package/lib/pages/ToolList.d.ts +5 -1
- package/lib/store/entity.d.ts +15 -0
- package/lib/store/mqtt.d.ts +11 -0
- package/lib/store/user.d.ts +11 -0
- package/lib/style.css +1 -1
- package/lib/tool/db.d.ts +7 -0
- package/lib/{utils/tool.d.ts → tool/utils.d.ts} +8 -0
- package/lib/types/cloud.d.ts +2 -30
- package/lib/types/local-task.d.ts +20 -12
- package/lib/types/tool-task.d.ts +2 -2
- package/package.json +6 -2
- /package/lib/{utils → tool}/render.d.ts +0 -0
package/lib/api/api.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export declare const UserRegister: (data: UserLoginReq) => Promise<void>;
|
|
|
6
6
|
export declare const UserPasswordReset: (data: UserLoginReq) => Promise<void>;
|
|
7
7
|
export declare const GetToken: (email: string) => Promise<void>;
|
|
8
8
|
export declare const GetUserInfo: () => Promise<UserInfo>;
|
|
9
|
+
export declare const UpdateUserInfo: (data: {
|
|
10
|
+
tool_id_list?: string[];
|
|
11
|
+
}) => Promise<unknown>;
|
|
9
12
|
export declare const UserCheckIn: () => Promise<void>;
|
|
10
13
|
export declare const PointExchange: (code: string) => Promise<void>;
|
|
11
14
|
export declare const GetPointRecordList: (no: number, size: number) => Promise<GetPageInfo<PointRecordInfo>>;
|
|
@@ -21,6 +24,7 @@ export declare const CostPoint: (data: {
|
|
|
21
24
|
export declare const GetToolList: (req: GetPageReq) => Promise<GetPageInfo<ToolInfo>>;
|
|
22
25
|
export declare const GetToolDetail: (id: string) => Promise<GetToolDetailResp>;
|
|
23
26
|
export declare const GetToolTagList: () => Promise<string[]>;
|
|
27
|
+
export declare const ToolCountInc: (id: string) => Promise<void>;
|
|
24
28
|
export declare const GetTencentCosInfo: () => Promise<GetCosResp>;
|
|
25
29
|
export declare const AddTask: (data: AddTaskReq) => Promise<string>;
|
|
26
30
|
export declare const GetTaskInfo: (id: string) => Promise<TaskInfo>;
|
package/lib/api/entity.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ export interface UserLoginReq {
|
|
|
5
5
|
token?: string;
|
|
6
6
|
}
|
|
7
7
|
export interface GetPageReq {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
page_no: number;
|
|
9
|
+
page_size: number;
|
|
10
10
|
tag?: string;
|
|
11
11
|
name?: string;
|
|
12
|
+
id_list?: string;
|
|
13
|
+
sort?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface GetPageInfo<T> {
|
|
14
16
|
total: number;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ToolInfo } from "../types/cloud.ts";
|
|
3
|
+
import './css/tool-card.css';
|
|
3
4
|
export default function ToolCard(props: {
|
|
4
5
|
onTool: () => void;
|
|
5
6
|
onHelp: () => void;
|
|
6
7
|
info: ToolInfo;
|
|
8
|
+
star: boolean;
|
|
9
|
+
onStar: (choose: boolean) => void;
|
|
7
10
|
}): ReactElement;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { FileSource, LocalTaskStatus, LocalActionReqType, LocalActionResType, LocalTaskEventType } from "./types/local-task.ts";
|
|
2
|
-
import { CloudTaskStatus,
|
|
1
|
+
import { FileSource, LocalTaskStatus, LocalActionReqType, LocalActionResType, LocalTaskEventType, TaskType } from "./types/local-task.ts";
|
|
2
|
+
import { CloudTaskStatus, ToolType } from "./types/cloud.ts";
|
|
3
3
|
import { MQTTEventType } from "./types/mqtt.ts";
|
|
4
4
|
import { FfmpegActionType, LabElementType, ToolConfigType, ToolTaskType } from "./types/tool-task.ts";
|
|
5
5
|
export { default as UserLoginModal } from './components/UserLogin.tsx';
|
|
6
6
|
export type { UserLoginModalProps } from './components/UserLogin.tsx';
|
|
7
7
|
export { default as PageTable } from './components/PageTable.tsx';
|
|
8
8
|
export type { PageTableProps } from './components/PageTable.tsx';
|
|
9
|
+
export { default as ConcatButton } from './components/ConcatButton.tsx';
|
|
10
|
+
export type { ConcatButtonProps } from './components/ConcatButton.tsx';
|
|
9
11
|
export { default as ToolList } from './pages/ToolList.tsx';
|
|
10
12
|
export type { ToolListProps } from './pages/ToolList.tsx';
|
|
11
13
|
export { default as MaterialList } from './pages/MaterialList.tsx';
|
|
@@ -15,6 +17,10 @@ export type { UserInfoPageProps } from './pages/UserInfoPage.tsx';
|
|
|
15
17
|
export { default as TaskList } from './pages/TaskList.tsx';
|
|
16
18
|
export type { TaskListProps } from './pages/TaskList.tsx';
|
|
17
19
|
export declare const Api: {
|
|
20
|
+
UpdateUserInfo: (data: {
|
|
21
|
+
tool_id_list?: string[] | undefined;
|
|
22
|
+
}) => Promise<unknown>;
|
|
23
|
+
GetAppInfo: () => Promise<import("./types/cloud.ts").AppInfo>;
|
|
18
24
|
CostPoint: (data: {
|
|
19
25
|
name: string;
|
|
20
26
|
point: number;
|
|
@@ -30,11 +36,13 @@ export declare const Api: {
|
|
|
30
36
|
UserDownloadMaterial: (id: string) => Promise<string>;
|
|
31
37
|
GetMqttTaskClientInfo: () => Promise<import("./api/entity.ts").MqttClientInfo>;
|
|
32
38
|
AddTask: (data: import("./api/entity.ts").AddTaskReq) => Promise<string>;
|
|
39
|
+
GetTaskInfo: (id: string) => Promise<import("./types/cloud.ts").TaskInfo>;
|
|
33
40
|
GetTencentCosInfo: () => Promise<import("./api/entity.ts").GetCosResp>;
|
|
34
41
|
GetMaterialUrl: (key_list: string[]) => Promise<{
|
|
35
42
|
[key: string]: string;
|
|
36
43
|
}>;
|
|
37
44
|
GetMaterialTagList: () => Promise<string[]>;
|
|
45
|
+
GetToolList: (req: import("./api/entity.ts").GetPageReq) => Promise<import("./api/entity.ts").GetPageInfo<import("./types/cloud.ts").ToolInfo>>;
|
|
38
46
|
GetToolTagList: () => Promise<string[]>;
|
|
39
47
|
GetToolDetail: (id: string) => Promise<import("./api/entity.ts").GetToolDetailResp>;
|
|
40
48
|
};
|
|
@@ -49,15 +57,50 @@ export declare const Enum: {
|
|
|
49
57
|
ToolTaskType: typeof ToolTaskType;
|
|
50
58
|
FfmpegActionType: typeof FfmpegActionType;
|
|
51
59
|
CloudTaskStatus: typeof CloudTaskStatus;
|
|
52
|
-
|
|
53
|
-
CloudTaskTypeMap: Map<CloudTaskType, string>;
|
|
60
|
+
TaskType: typeof TaskType;
|
|
54
61
|
LabElementType: typeof LabElementType;
|
|
55
62
|
ToolConfigType: typeof ToolConfigType;
|
|
56
63
|
};
|
|
57
64
|
export declare const Tool: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
render: {
|
|
66
|
+
renderTime: (time: number) => string;
|
|
67
|
+
renderEllipsis: (value: string) => import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
renderCopy: (value: string) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
};
|
|
70
|
+
utils: {
|
|
71
|
+
file2ToolParamFile: (file: File) => import("./types/local-task.ts").ToolParamFile;
|
|
72
|
+
seconds2TimeStr: (seconds: number) => string;
|
|
73
|
+
getTencentInfo: () => Promise<{
|
|
74
|
+
cos: import("cos-js-sdk-v5");
|
|
75
|
+
path: string;
|
|
76
|
+
bucket: string;
|
|
77
|
+
region: string;
|
|
78
|
+
}>;
|
|
79
|
+
object2query: (data: any) => string;
|
|
80
|
+
};
|
|
81
|
+
db: {
|
|
82
|
+
addTask: (data: import("./types/local-task.ts").LocalTaskInfo, table?: string) => Promise<IDBValidKey>;
|
|
83
|
+
getAllData: <T>(table?: string) => Promise<T[]>;
|
|
84
|
+
getData: <T_1>(id: string, table?: string) => Promise<T_1>;
|
|
85
|
+
updateData: <T_2>(id: string, data: T_2, table?: string) => Promise<IDBValidKey>;
|
|
86
|
+
deleteData: (id: string, table?: string) => Promise<void>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const Store: {
|
|
90
|
+
UserReducer: import("redux").Reducer<import("./store/entity.ts").UserState>;
|
|
91
|
+
UserAction: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
92
|
+
loginOut(state: import("immer").WritableDraft<import("./store/entity.ts").UserState>): void;
|
|
93
|
+
showLogin(state: import("immer").WritableDraft<import("./store/entity.ts").UserState>): void;
|
|
94
|
+
hideLogin(state: import("immer").WritableDraft<import("./store/entity.ts").UserState>): void;
|
|
95
|
+
}, "user">;
|
|
96
|
+
GetUserInfo: import("@reduxjs/toolkit").AsyncThunk<import("./types/cloud.ts").UserInfo | undefined, undefined, any>;
|
|
97
|
+
MqttReducer: import("redux").Reducer<import("./store/entity.ts").MqttState>;
|
|
98
|
+
MqttAction: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
99
|
+
addTaskEvent(state: import("immer").WritableDraft<import("./store/entity.ts").MqttState>, info: {
|
|
100
|
+
payload: import("./types/mqtt.ts").MqttResponse;
|
|
101
|
+
type: string;
|
|
102
|
+
}): void;
|
|
103
|
+
closeClient(state: import("immer").WritableDraft<import("./store/entity.ts").MqttState>): void;
|
|
104
|
+
}, "mqtt">;
|
|
105
|
+
InitMqtt: import("@reduxjs/toolkit").AsyncThunk<import("mqtt").MqttClient, undefined, any>;
|
|
63
106
|
};
|