mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-28 17:50:56 +01:00
- Introduced new interfaces for various store modules including environment, file, git, layout, node, notification alerts, channels, requests, settings, plugins, projects, roles, schedules, spiders, systems, tags, tasks, tokens, and users. - Each module includes state, getters, mutations, and actions definitions to enhance type safety and maintainability. - Added utility interfaces for file handling and view-specific types for database, git, login, node, project, result, schedule, spider, task, and user. - Improved overall structure and organization of TypeScript typings for better developer experience.
54 lines
1003 B
TypeScript
54 lines
1003 B
TypeScript
export declare global {
|
|
interface ListRequestParams {
|
|
page?: number;
|
|
size?: number;
|
|
filter?: string;
|
|
sort?: string;
|
|
|
|
[key: string]: any;
|
|
}
|
|
|
|
interface BatchRequestPayload {
|
|
ids: string[];
|
|
}
|
|
|
|
interface BatchRequestPayloadWithData<T = any> extends BatchRequestPayload {
|
|
data: T;
|
|
fields: string[];
|
|
}
|
|
|
|
type BatchRequestPayloadWithJsonStringData =
|
|
BatchRequestPayloadWithData<string>;
|
|
|
|
interface FileRequestPayload {
|
|
id?: string;
|
|
path?: string;
|
|
new_path?: string;
|
|
data?: string;
|
|
file?: File;
|
|
}
|
|
|
|
interface SaveFilesRequestPayload {
|
|
id: string;
|
|
files: { path: string; file: File }[];
|
|
targetDirectory?: string;
|
|
}
|
|
|
|
interface Response {
|
|
status: string;
|
|
message: string;
|
|
error?: string;
|
|
}
|
|
|
|
type HttpResponse = Response;
|
|
|
|
interface ResponseWithData<T = any> extends Response {
|
|
data?: T;
|
|
}
|
|
|
|
interface ResponseWithListData<T = any> extends ResponseWithData {
|
|
data?: T[];
|
|
total: number;
|
|
}
|
|
}
|