decent
This commit is contained in:
79
web-components/dist/types/index.d.ts
vendored
Normal file
79
web-components/dist/types/index.d.ts
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
export interface BaseEntity {
|
||||
id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
created_by?: string;
|
||||
updated_by?: string;
|
||||
}
|
||||
export interface Owner {
|
||||
type: 'individual' | 'team';
|
||||
name: string;
|
||||
owner: string;
|
||||
}
|
||||
export interface FormSidebarProps {
|
||||
opened: boolean;
|
||||
onClose: () => void;
|
||||
onSuccess: () => void;
|
||||
editItem?: any;
|
||||
}
|
||||
export interface ListItem {
|
||||
id: string;
|
||||
name?: string;
|
||||
title?: string;
|
||||
email?: string;
|
||||
status?: string;
|
||||
role?: string;
|
||||
type?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface ApiResponse<T> {
|
||||
data: T;
|
||||
message?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface PaginatedResponse<T> {
|
||||
data: T[];
|
||||
total: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
has_more: boolean;
|
||||
}
|
||||
export interface FilterOptions {
|
||||
search?: string;
|
||||
status?: string;
|
||||
type?: string;
|
||||
role?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface NotificationConfig {
|
||||
title: string;
|
||||
message: string;
|
||||
color: 'red' | 'green' | 'blue' | 'yellow' | 'gray';
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface ValidationRule {
|
||||
required?: boolean;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
pattern?: RegExp;
|
||||
email?: boolean;
|
||||
url?: boolean;
|
||||
custom?: (value: any) => string | null;
|
||||
}
|
||||
export interface FormField {
|
||||
name: string;
|
||||
label: string;
|
||||
type: 'text' | 'email' | 'number' | 'select' | 'multiselect' | 'textarea' | 'date' | 'json';
|
||||
placeholder?: string;
|
||||
description?: string;
|
||||
required?: boolean;
|
||||
disabled?: boolean;
|
||||
options?: Array<{
|
||||
value: string;
|
||||
label: string;
|
||||
}>;
|
||||
validation?: ValidationRule;
|
||||
defaultValue?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user