import { IProperty, IEntityInfo } from './configurationTypes.js'; import { GraphQLResolveInfo } from 'graphql'; import { IFunfunzConfig } from '../types.js'; import { relatedData } from '../../types/index.js'; /** * returns the entity configuration based on the entity name * @param {string} ENTITY_NAME - the name of the entity * * @returns {IEntityInfo} entity configuration */ export declare function getEntityConfig(ENTITY_NAME: string, funfunz: IFunfunzConfig): IEntityInfo; /** * returns the columns configuration list transformed into an key:value object * where key equals to the column name, and value equals to the column configuration * @param {IEntityInfo} ENTITY_CONFIG - the entity configuration * * @returns {{ [key: string]: IColumnInfo }} {[columnName]:[columnConfig]} object */ export declare function getColumnsByName(ENTITY_CONFIG: IEntityInfo): Record; /** * returns a list of primary keys for a give entity configuration * @param {IEntityInfo} ENTITY_CONFIG - the entity configuration * * @returns {string[]} array of primary keys */ export declare function getPKs(ENTITY_CONFIG: IEntityInfo): string[]; /** * helper function to check for undefined, null, and empty values * @param {any} val - a variable * * @returns {boolean} true or false if val is a nullable value */ export declare function isNull(val: unknown): boolean; /** * helper function to check value is a promise * @param {any} val - a variable * * @returns {boolean} true or false if val is a nullable value */ export declare function isPromise(value: unknown): value is Promise; /** * Uppercase the first letter of a string * @param {string} str - string to capitalize * * @returns {string} capitalized string */ export declare function capitalize(str: string): string; export declare function getFields(entity: IEntityInfo, info: GraphQLResolveInfo): string[]; /** * Returns a new object containing the original mutation data but extracts the data * related to many to many relations in a separate property and removes that data * from the original dataset * * @param {object} data - original mutation data * @param {IEntityInfo} entityConfig - the entity configuration * * @returns {object} new object with mutation data and many to many related data */ export declare function extractManyToManyRelatedData(data: Record, entityConfig: IEntityInfo): { entityData: Record; relatedData: relatedData; };