import { ESPCDFBatchOperationResult } from "../types"; /** * Recursively makes all properties of an object observable. * * This function traverses an object and makes every property observable, * including nested objects and arrays of objects. If a property is already * observable, it will not be modified. * @param obj - The object to be made observable. * @param excludeKeys - Keys to exclude from being made observable (e.g., '_raw', 'operations') * @param visited - Set of already visited objects to prevent circular references * @returns - The observable version of the input object. * @example * const obj = { a: 1, b: { c: 2 }, _raw: sdkObject }; * const observableObj = makeEverythingObservable(obj, new Set(['_raw'])); * console.log(isObservable(observableObj)); // true * console.log(isObservable(observableObj.b)); // true * console.log(isObservable(observableObj._raw)); // false (excluded) * * Useful when nested properties must be observable in MobX; exclude keys like '_raw' and * 'operations' that are SDK-specific and don't need reactivity. */ export declare const makeEverythingObservable: (obj: T, excludeKeys?: Set, visited?: WeakSet) => T; /** * Deeply merges two objects, recursively merging nested objects. * @param target - The target object to merge into * @param source - The source object to merge from * @returns A new object with merged properties */ export declare function deepMerge(target: any, source: any): any; /** * Error message map for common CDF errors. * Provides consistent error messages across the CDF package. */ export declare const ERROR_MESSAGE_MAP: { NO_SDK_WITH_CAPABILITY: (capability: string) => string; NO_MORE_NODES_TO_FETCH: (sdkSource: string) => string; NO_MORE_GROUPS_TO_FETCH: (sdkSource: string) => string; NODE_NOT_FOUND: (nodeId: string) => string; GROUP_NOT_FOUND: (groupId: string) => string; SDK_ADAPTOR_ALREADY_EXISTS: (sdkIdentifier: string) => string; SDK_ADAPTOR_NOT_FOUND: (sdkIdentifier: string) => string; SDK_ADAPTOR_METHOD_PROPERTY_NOT_IMPLEMENTED: (sdkIdentifier: string, propertyOrMethodName: string) => string; CDF_CONFIG_MISSING: string; SDK_REGISTRY_MISSING: string; NO_ACTIVE_ADAPTOR_SET: string; }; /** * Checks if an object is empty (null, undefined, or has no keys). * @param obj - The object to check * @returns True if the object is null, undefined, or has no enumerable keys */ export declare function isEmptyObject(obj: any): boolean; /** * Partitions PromiseSettledResult array into successful and failed results. * * Used for batch operations where multiple promises are settled and need to be * categorized into successful and failed results. * @param results - Array of PromiseSettledResult containing arrays of results * @returns Object with successfulResults and failedResults arrays */ export declare function partitionBatchArrayResults(results: PromiseSettledResult[]): ESPCDFBatchOperationResult; /** * Compares two arrays of objects and checks if all objects in array1 exist in array2 * @param array1 First array to compare * @param array2 Second array to compare against * @param key Optional key to use for faster comparison instead of full object comparison * @returns True if all objects in array1 exist in array2, false otherwise * @example * // With key comparison * compareArrays([{id: 1}, {id: 2}], [{id: 1}, {id: 2}, {id: 3}], 'id') // true * * // With full object comparison * compareArrays([{x: 1}, {x: 2}], [{x: 1}, {x: 2}, {x: 3}]) // true */ export declare function compareArrays>(array1: T[], array2: T[], key?: keyof T): boolean; /** * Compares two objects deeply and checks if they are equal. * @param a The first object to compare. * @param b The second object to compare. * @returns True if the objects are equal, false otherwise. */ export declare function isEqual(a: any, b: any): boolean;