contentful-management
Version:
Client for Contentful's Content Management API
54 lines (53 loc) • 1.38 kB
TypeScript
import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
export type UIConfigProps = {
/**
* System metadata
*/
sys: UIConfigSysProps;
assetListViews: ViewFolder[];
entryListViews: ViewFolder[];
homeViews: HomeView[];
};
export interface UIConfigSysProps extends BasicMetaSysProps {
space: SysLink;
environment: SysLink;
}
interface HomeView {
widgetId: string;
widgetNamespace: string;
}
interface ViewFolder {
id: string;
title: string;
views: View[];
}
interface View {
id: string;
title: string;
order?: {
fieldId: string;
direction: 'ascending' | 'descending';
};
displayedFieldIds?: string[];
contentTypeId?: string | null;
contentTypeIds?: string[];
searchText?: string;
searchFilters?: [string, string, string][];
roles?: string[];
}
export interface UIConfig extends UIConfigProps, DefaultElements<UIConfigProps> {
}
/**
* @private
* @param makeRequest - function to make requests via an adapter
* @param data - Raw data
* @return Wrapped UIConfig
*/
export declare function wrapUIConfig(makeRequest: MakeRequest, data: UIConfigProps): {
update: () => Promise<any & UIConfigProps & {
toPlainObject(): UIConfigProps;
}>;
} & UIConfigProps & {
toPlainObject(): UIConfigProps;
};
export {};