UNPKG

contentful-management

Version:
24 lines (21 loc) 818 B
import copy from 'fast-copy'; import { get as get$1, put } from './raw.mjs'; const getBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/content_types/${params.contentTypeId}/editor_interface`; const get = (http, params) => { return get$1(http, getBaseUrl(params)); }; const getMany = (http, params) => { return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/editor_interfaces`); }; const update = (http, params, rawData, headers) => { const data = copy(rawData); delete data.sys; return put(http, getBaseUrl(params), data, { headers: { 'X-Contentful-Version': rawData.sys.version ?? 0, ...headers, }, }); }; export { get, getMany, update }; //# sourceMappingURL=editor-interface.mjs.map