UNPKG

1.27 kBTypeScriptView Raw
1import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
2export type UserUIConfigProps = {
3 /**
4 * System metadata
5 */
6 sys: UserUIConfigSysProps;
7 assetListViews: ViewFolder[];
8 entryListViews: ViewFolder[];
9};
10export interface UserUIConfigSysProps extends BasicMetaSysProps {
11 space: SysLink;
12 environment: SysLink;
13}
14interface ViewFolder {
15 id: string;
16 title: string;
17 views: View[];
18}
19interface View {
20 id: string;
21 title: string;
22 order?: {
23 fieldId: string;
24 direction: 'ascending' | 'descending';
25 };
26 displayedFieldIds?: string[];
27 contentTypeId: string | null;
28 searchText?: string;
29 searchFilters?: [string, string, string][];
30}
31export interface UserUIConfig extends UserUIConfigProps, DefaultElements<UserUIConfigProps> {
32}
33/**
34 * @private
35 * @param makeRequest - function to make requests via an adapter
36 * @param data - Raw data
37 * @return Wrapped UserUIConfig
38 */
39export declare function wrapUserUIConfig(makeRequest: MakeRequest, data: UserUIConfigProps): {
40 update: () => Promise<any & UserUIConfigProps & {
41 toPlainObject(): UserUIConfigProps;
42 }>;
43} & UserUIConfigProps & {
44 toPlainObject(): UserUIConfigProps;
45};
46export {};