UNPKG

1.19 kBTypeScriptView Raw
1import type { MakeRequest } from './common-types';
2/**
3 * @private
4 */
5export type ContentfulUIConfigApi = ReturnType<typeof createUserUIConfigApi>;
6/**
7 * @private
8 */
9export default function createUserUIConfigApi(makeRequest: MakeRequest): {
10 /**
11 * Sends an update to the server with any changes made to the object's properties
12 * @return Object returned from the server with updated changes.
13 * @example ```javascript
14 * const contentful = require('contentful-management')
15 *
16 * const client = contentful.createClient({
17 * accessToken: '<content_management_api_key>'
18 * })
19 *
20 * client.getSpace('<space_id>')
21 * .then((space) => space.getEnvironment('<environment_id>'))
22 * .then((environment) => environment.getUserUIConfig())
23 * .then((uiConfig) => {
24 * uiConfig.entryListViews = [...]
25 * return uiConfig.update()
26 * })
27 * .then((uiConfig) => console.log(`UserUIConfig updated.`))
28 * .catch(console.error)
29 * ```
30 */
31 update: () => Promise<any & import("./entities/user-ui-config").UserUIConfigProps & {
32 toPlainObject(): import("./entities/user-ui-config").UserUIConfigProps;
33 }>;
34};