UNPKG

contentful-management

Version:
24 lines (22 loc) 733 B
import { freezeSys, toPlainObject } from 'contentful-sdk-core'; import copy from 'fast-copy'; import { wrapCollection } from '../common-utils'; import enhanceWithMethods from '../enhance-with-methods'; /** * @private */ function createWorkflowsChangelogEntryApi() { return {}; } /** * @private */ export function wrapWorkflowsChangelogEntry(_makeRequest, data) { const workflowsChangelogEntry = toPlainObject(copy(data)); const workflowsChangelogEntryWithMethods = enhanceWithMethods(workflowsChangelogEntry, createWorkflowsChangelogEntryApi()); return freezeSys(workflowsChangelogEntryWithMethods); } /** * @private */ export const wrapWorkflowsChangelogEntryCollection = wrapCollection(wrapWorkflowsChangelogEntry);