import type { BinaryFileType, IDisplayOptions, INodeProperties, JsonObject } from './interfaces'; export declare const isObjectEmpty: (obj: object | null | undefined) => boolean; export type Primitives = string | number | boolean | bigint | symbol | null | undefined; export declare const deepCopy: string; }) | Primitives>(source: T, hash?: WeakMap, path?: string) => T; type MutuallyExclusive = (T & { [k in Exclude]?: never; }) | (U & { [k in Exclude]?: never; }); type JSONParseOptions = { acceptJSObject?: boolean; } & MutuallyExclusive<{ errorMessage?: string; }, { fallbackValue?: T; }>; /** * Parses a JSON string into an object with optional error handling and recovery mechanisms. * * @param {string} jsonString - The JSON string to parse. * @param {Object} [options] - Optional settings for parsing the JSON string. Either `fallbackValue` or `errorMessage` can be set, but not both. * @param {boolean} [options.acceptJSObject=false] - If true, attempts to recover from common JSON format errors by parsing the JSON string as a JavaScript Object. * @param {string} [options.errorMessage] - A custom error message to throw if the JSON string cannot be parsed. * @param {*} [options.fallbackValue] - A fallback value to return if the JSON string cannot be parsed. * @returns {Object} - The parsed object, or the fallback value if parsing fails and `fallbackValue` is set. */ export declare const jsonParse: (jsonString: string, options?: JSONParseOptions) => T; type JSONStringifyOptions = { replaceCircularRefs?: boolean; }; /** * Decodes a Base64 string with proper UTF-8 character handling. * * @param str - The Base64 string to decode * @returns The decoded UTF-8 string */ export declare const base64DecodeUTF8: (str: string) => string; export declare const replaceCircularReferences: (value: T, knownObjects?: WeakSet) => T; export declare const jsonStringify: (obj: unknown, options?: JSONStringifyOptions) => string; export declare const sleep: (ms: number) => Promise; export declare const sleepWithAbort: (ms: number, abortSignal?: AbortSignal) => Promise; export declare function fileTypeFromMimeType(mimeType: string): BinaryFileType | undefined; export declare function assert(condition: T, msg?: string): asserts condition; export declare const isTraversableObject: (value: any) => value is JsonObject; export declare const removeCircularRefs: (obj: JsonObject, seen?: Set) => void; export declare function updateDisplayOptions(displayOptions: IDisplayOptions, properties: INodeProperties[]): { displayOptions: IDisplayOptions; displayName: string; name: string; type: import("./interfaces").NodePropertyTypes; typeOptions?: import("./interfaces").INodePropertyTypeOptions; default: import("./interfaces").NodeParameterValueType; description?: string; hint?: string; disabledOptions?: IDisplayOptions; options?: Array; placeholder?: string; isNodeSetting?: boolean; noDataExpression?: boolean; required?: boolean; routing?: import("./interfaces").INodePropertyRouting; credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">; extractValue?: import("./interfaces").INodePropertyValueExtractor; modes?: import("./interfaces").INodePropertyMode[]; requiresDataPath?: "single" | "multiple"; doNotInherit?: boolean; validateType?: import("./interfaces").FieldType; ignoreValidationDuringExecution?: boolean; allowArbitraryValues?: boolean; }[]; export declare function randomInt(max: number): number; export declare function randomInt(min: number, max: number): number; export declare function randomString(length: number): string; export declare function randomString(minLength: number, maxLength: number): string; /** * Checks if a value is an object with a specific key and provides a type guard for the key. */ export declare function hasKey(value: unknown, key: T): value is Record; /** * Checks if a property key is safe to use on an object, preventing prototype pollution. * setting untrusted properties can alter the object's prototype chain and introduce vulnerabilities. * * @see setSafeObjectProperty */ export declare function isSafeObjectProperty(property: string): boolean; /** * Safely sets a property on an object, preventing prototype pollution. * * @see isSafeObjectProperty */ export declare function setSafeObjectProperty(target: Record, property: string, value: unknown): void; export declare function isDomainAllowed(urlString: string, options: { allowedDomains: string; }): boolean; export declare function isCommunityPackageName(packageName: string): boolean; export {}; //# sourceMappingURL=utils.d.ts.map