contentful-management
Version:
Client for Contentful's Content Management API
35 lines (34 loc) • 1.16 kB
TypeScript
import type { MakeRequest } from './common-types';
/**
* @private
*/
export type ContentfulUIConfigApi = ReturnType<typeof createUIConfigApi>;
/**
* @private
*/
export default function createUIConfigApi(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.getUIConfig())
* .then((uiConfig) => {
* uiConfig.entryListViews = [...]
* return uiConfig.update()
* })
* .then((uiConfig) => console.log(`UIConfig updated.`))
* .catch(console.error)
* ```
*/
update: () => Promise<any & import("./entities/ui-config").UIConfigProps & {
toPlainObject(): import("./entities/ui-config").UIConfigProps;
}>;
};