/** * Utility class containing various static methods for common operations. */ export default class Utils { /** * Checks if the application is running in a hybridless container. * @returns {boolean} - True if the application is running in a hybridless container, false otherwise. */ static isHybridlessContainer(): boolean; /** * Checks if a given string is valid. * @param {string} string - The string to check. * @returns {boolean} - True if the string is valid, false otherwise. */ static isValidString(string: string): boolean; /** * Parses a string into an integer and returns null if the string is not a valid number. * @param {string} str - The string to parse into an integer. * @returns {number | null} - The parsed integer or null if the string is not a valid number. */ static parseIntNullIfNaN(str?: string): number | null; /** * Parses a JSON string and returns the resulting object. If the string is empty or * cannot be parsed, null is returned. * @param {string} string - The JSON string to parse. * @returns {any | null} - The parsed object or null if the string is empty or invalid. */ static parseObjectNullIfEmpty(string: string | undefined): any | null; /** * Checks if a given value is a valid number. * @param {string} number - The value to be checked. * @returns {boolean} - True if the value is a valid number, false otherwise. */ static isValidNumber(number: string): boolean; /** * Retrieves the value from an object using a case-insensitive key lookup. * @param {any} obj - The object to search for the key. * @param {string} key - The key to search for in the object. * @returns {any | null} The value associated with the key, or null if the key is not found. */ static caseInsensitiveObjectForKey(obj: any, key: string): any | null; /** * Cleans out the /tmp directory asynchronously. */ static cleanTemporaryFolder(): Promise; /** * Marshalls the given item into a DynamoDB format. * If the item is an array, it maps over each element and marshalls it recursively. * If the item is an object, it marshalls the object using the marshall function with options to remove undefined values and convert class instances to maps. * If the item is neither an array nor an object, it converts the item to an attribute. * @param {any} item - The item to be marshalled. * @returns The marshalled item in DynamoDB format. */ static ddbMarshall(item: T, rec?: boolean): any; /** * Recursively unmarshalls a DynamoDB item by converting it into a plain JavaScript object. * @param {any} item - The DynamoDB item to unmarshall. * @returns {any} The unmarshalled JavaScript object. */ static ddbUnmarshall(item: any): any; /** * helper that hashes values using SHA-256. * @param {unknown} raw - The raw item for conversion. * @returns {string} The hashed string. */ static hashValue(raw: unknown): string; }