contentful-management
Version:
Client for Contentful's Content Management API
35 lines (34 loc) • 1.19 kB
TypeScript
import type { MakeRequest } from './common-types';
/**
* @private
*/
export type ContentfulUIConfigApi = ReturnType<typeof createUserUIConfigApi>;
/**
* @private
*/
export default function createUserUIConfigApi(makeRequest: MakeRequest): {
/**
* Sends an update to the server with any changes made to the object's properties
* @return 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.getUserUIConfig())
* .then((uiConfig) => {
* uiConfig.entryListViews = [...]
* return uiConfig.update()
* })
* .then((uiConfig) => console.log(`UserUIConfig updated.`))
* .catch(console.error)
* ```
*/
update: () => Promise<any & import("./entities/user-ui-config").UserUIConfigProps & {
toPlainObject(): import("./entities/user-ui-config").UserUIConfigProps;
}>;
};