mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			407 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			407 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
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',
 | 
						|
];
 | 
						|
 | 
						|
export const mapSchemasValues = (schemas: Record<string, Schema>) => {
 | 
						|
  return mapValues(pick(schemaSelectedKeys), schemas);
 | 
						|
};
 |