21 lines
407 B
TypeScript
Raw Normal View History

2022-12-12 16:51:23 +01:00
import type { Schema } from '@strapi/strapi';
import { mapValues, pick } from 'lodash/fp';
const schemaSelectedKeys = [
'collectionName',
'info',
'options',
'pluginOptions',
'attributes',
'kind',
'modelType',
'modelName',
'uid',
'plugin',
'globalId',
];
2022-12-12 16:51:23 +01:00
export const mapSchemasValues = (schemas: Record<string, Schema>) => {
return mapValues(pick(schemaSelectedKeys), schemas);
};