import { ContentsquareModule } from '../core/nativeModules'; import { PropertyValue } from '../types/types'; /** * Add a collection of properties to be associated with all future events. * * @param {Record} properties - Properties to add to all future events. */ export const addEventProperties = ( properties: Record ): void => { ContentsquareModule.addEventProperties(properties); }; /** * Removes a single property from the collection of event-wide properties. * * @param {string} name - The name of the property to remove. This should correspond to the string key from the map of previously added properties. */ export const removeEventProperty = (name: string): void => { ContentsquareModule.removeEventProperty(name); }; /** * Removes all event-wide properties that were previously added with `addEventProperties`. */ export const clearEventProperties = (): void => { ContentsquareModule.clearEventProperties(); }; /** * Add a collection of properties to be associated with the current user. * * @param {Record} properties - Properties to associate with the current user. */ export const addUserProperties = ( properties: Record ): void => { ContentsquareModule.addUserProperties(properties); };