UNPKG

contentful-management

Version:
35 lines (34 loc) 1.15 kB
import type { MakeRequest } from './common-types'; /** * @internal */ export type ContentfulUIConfigAPI = ReturnType<typeof createUIConfigApi>; /** * @internal */ export default function createUIConfigApi(makeRequest: MakeRequest): { /** * Sends an update to the server with any changes made to the object's properties * @returns Object returned from the server with updated changes. * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '<content_management_api_key>' * }) * * client.getSpace('<space_id>') * .then((space) => space.getEnvironment('<environment_id>')) * .then((environment) => environment.getUIConfig()) * .then((uiConfig) => { * uiConfig.entryListViews = [...] * return uiConfig.update() * }) * .then((uiConfig) => console.log(`UIConfig updated.`)) * .catch(console.error) * ``` */ update: () => Promise<any & import("./export-types").UIConfigProps & { toPlainObject(): import("./export-types").UIConfigProps; }>; };