/
resource-json.interface.ts
68 lines (67 loc) · 1.59 KB
/
resource-json.interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import PropertyJSON from './property-json.interface'
import ActionJSON from './action-json.interface'
/**
* Resource object accessible on the fronted
* @alias ResourceJSON
* @subcategory Frontend
*/
export default interface ResourceJSON {
/**
* Unique Id of a resource
*/
id: string;
/**
* Resource name
*/
name: string;
/**
* url to a resource list action. If null - resource should not be seen in the sidebar.
*/
href: string | null;
/**
* Resource parent - visible on the sidebar
*/
parent: {
/**
* Parent name
*/
name: string | null;
/**
* Parent icon
*/
icon: string;
} | null;
/**
* Property which should be treated as a Main property
*/
titleProperty: PropertyJSON;
/**
* Actions available for entire resource with type: resource
*/
resourceActions: Array<ActionJSON>;
/**
* All actions - whether they are available or not.
*/
actions: Array<ActionJSON>;
/**
* Properties which should be visible on the list
*/
listProperties: Array<PropertyJSON>;
/**
* Properties which should be visible on the edit view
*/
editProperties: Array<PropertyJSON>;
/**
* Properties which should be visible on the show view
*/
showProperties: Array<PropertyJSON>;
/**
* Properties which should be visible on the filter
*/
filterProperties: Array<PropertyJSON>;
/**
* Map of all properties inside the resource. It also contains nested properties.
* So this is the easies way of getting any property you like from a resource.
*/
properties: Record<string, PropertyJSON>;
}