UNPKG

1.16 kBTypeScriptView Raw
1import type { MakeRequest } from './common-types';
2/**
3 * @private
4 */
5export type ContentfulUIConfigApi = ReturnType<typeof createUIConfigApi>;
6/**
7 * @private
8 */
9export default function createUIConfigApi(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.getUIConfig())
23 * .then((uiConfig) => {
24 * uiConfig.entryListViews = [...]
25 * return uiConfig.update()
26 * })
27 * .then((uiConfig) => console.log(`UIConfig updated.`))
28 * .catch(console.error)
29 * ```
30 */
31 update: () => Promise<any & import("./entities/ui-config").UIConfigProps & {
32 toPlainObject(): import("./entities/ui-config").UIConfigProps;
33 }>;
34};