/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import { LookupTable } from '../models/LookupTable';
import { MutableRefObject } from 'react';
import { EntityState } from '../models/EntityState';
import { StringifyOptions } from 'query-string';
export declare function pluckProps(
source: T,
omitNull: boolean,
...props: K[]
): Pick;
export declare function pluckProps(source: T, ...props: K[]): Pick;
export declare function reversePluckProps(source: T, ...props: K[]): Omit;
export declare function camelizeProps(obj: { [prop: string]: any }): object;
export declare function createLookupTable(list: T[], idProp?: string): LookupTable;
export declare function flattenHierarchical(root: T | T[], childrenProp?: string): T[];
export declare function hierarchicalToLookupTable(
root: T | T[],
childrenProp?: string,
idProp?: string
): LookupTable;
export declare function normalizeProp(list: T[], idProp?: string, normalizeTargetProp?: string): T[];
export declare function retrieveProperty(object: object, prop: string): any;
export declare function deleteProperty(object: T, prop: P): Omit;
export declare function setProperty(
object: T,
prop: K,
value: V
): T;
export declare function nnou(object: any): boolean;
export declare const notNullOrUndefined: typeof nnou;
export declare function nou(object: any): boolean;
export declare const nullOrUndefined: typeof nou;
export declare function createEntityState(merge?: {}): EntityState;
export declare function resolveEntityCollectionFetch(collection: Array): EntityState;
export declare function ref(ref: MutableRefObject): T;
export declare function isPlainObject(obj: T): boolean;
/** @deprecated Use extend(target, source) */
export declare function extendDeep(target: any, source: any): object;
/** @deprecated Use extend(target, source, { existingOnly: true }) */
export declare function extendDeepExistingProps(target: any, source: any): object;
export declare function extend(
target: object,
source: object,
options?: {
deep?: boolean;
existingOnly?: boolean;
}
): object;
export declare function toQueryString(
args: T,
options?: StringifyOptions & {
prefix?: string;
}
): string;
export declare function applyDeserializedXMLTransforms(
target: T,
options: {
arrays?: string[];
lookupTables?: string[];
renameTable?: LookupTable;
}
): T;
export declare function deepCopy(target: T): T;
export declare const foo: {};
export declare const fooFn: () => any;
export declare function isApiResponse(source: object): boolean;
export declare function isAjaxError(source: object): boolean;