base_ui/types/entityTypes.ts

205 lines
4.0 KiB
TypeScript
Raw Normal View History

2025-02-01 09:34:55 +00:00
export type ListItem = {
_index: string;
_id: string;
_score: null;
_source: ListSource;
sort: number[];
};
export type List = ListItem[];
export type ListSource = {
ref_id: number;
ts_ref: string;
other_info: OtherInfo;
topics: [];
sort_date_timestamp: number;
main_type: string;
version_info: VersionInfo;
content: string;
expire_date: string;
sub_type: string;
parent_id: string;
qanon_etebar: string;
ts_date: string;
qanon_title: string;
qanon_id: string;
ref_key: string;
html: string;
id: string;
content_len: number;
state_etebar: string;
ts_year: string;
child_order: number;
title_type: string;
};
export type OtherInfo = {
level: number;
hierarchy: string;
number_text: string;
full_path: string;
};
export type VersionInfo = {
number: number;
operation: string;
timestamp: number;
};
//ActiveEntityViewSchema
export type ActiveEntityViewSchema = {
key: string;
routeName: string;
type: string;
label: string;
header: {
componentName: string;
top_main: HeaderItems[];
top_jump: [];
top_mirror: HeaderItems[];
tools: {
showCompare: number;
showSearch: number;
showHeading: number;
showSettings: number;
showHilight: number;
showChanges: number;
};
};
entityPanel: {
entityHeading: EntityPanel & {
type: string;
};
navigation: EntityPanel;
};
contextMenu: ContextMenu[];
researchs: Researchs[];
property: Property[];
settings: Settings[];
versionEnable: false;
field_collapse: string;
entity_title: string;
items: ActiveEntityViewSchemaItems[];
tabs: Tabs[];
};
export type Property = {
title: string;
key: string;
type: string;
items: PropertyItem[];
};
export type PropertyItem = {
hideInCreateEntity: number;
key: string;
label: string;
type: string;
placeholder: string;
required: string;
validation_regex: string;
validation_error: string;
multi_select: string;
options: [];
labelClass: string;
inputClass: string;
};
export type Panel = {
header: [{ key: string; label: string; type: string }];
content: { key: string; label: string; type: string };
};
export type ContextMenu = {
key: string;
title: string;
icon: string;
panel: Panel[];
form?: [];
};
export type TstateOptions = {
value: string;
title: string;
type_label: string;
showInput: number;
};
export type ActiveEntityViewSchemaItems = {
title: string;
scrollTitle: string;
key: string;
type: string;
filed_state: string;
readonly: number;
modalName: string;
completion: string;
tstate_options: TstateOptions[];
items: ActiveEntityViewSchemaItemschilds[];
};
export type ActiveEntityViewSchemaItemschilds = {
key: string;
label: string;
};
export type EntityPanel = {
title: string;
key: string;
routeName: string;
};
export type HeaderItems = {
title: string;
key: string;
type: string;
col: string;
};
export type Researchs = {
key: string;
title: string;
icon: string;
form: [];
};
export type Settings = {
label: string;
key: string;
type: string;
items: [{ value: string; title: string }];
default: string | boolean;
};
export type Tabs = {
title: string;
componentName: string;
key: string;
};
export type ActiveSystem = {
id: number;
created_at: number;
updated_at: number;
title: string;
users: string;
organ: string;
owner: number;
comment: string;
link: string;
showInDashboard: number;
loading: boolean;
};
export type ActiveTab = {
title: string;
componentName: string;
key: string;
};
export type EntityViewSchema = ActiveEntityViewSchema[];
export type ListEntity = [
ListItem & {
fields: { qanon_id: string[] };
inner_hits: InnerHits;
}
];
export type InnerHits = {
by_collapse: {
hits: {
total: { value: number; relation: string };
max_score: number;
hits: ListItem[];
};
};
};
export type SelectedItemEntity = ListItem & ListSource;
export type SimilarInfo = {
type: string;
show: boolean;
text: string;
id: string;
label: string;
};