react-native-acoustic-connect-beta
Version:
BETA: React native plugin for Acoustic Connect
48 lines (43 loc) • 2.92 kB
text/typescript
// Copyright (C) 2025 Acoustic, L.P. All rights reserved.
//
// NOTICE: This file contains material that is confidential and proprietary to
// Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
// industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
// Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
// prohibited.
//
//
// Created by Omar Hernandez on 5/9/25.
//
import { type HybridObject } from 'react-native-nitro-modules'
// Define a named type for the anonymous object
export type KeyValueObject = {
placeholder: string; // Add a placeholder property to avoid the "empty struct" error
[key: string]: unknown;
};
export type ConnectMonitoringLevelType = 'Ignore' | 'CellularAndWiFi' | 'WiFi'
export interface AcousticConnectRN extends HybridObject<{ ios: 'swift', android: 'kotlin' }> {
setBooleanConfigItemForKey(key: string, value: boolean, moduleName: string): boolean
setStringItemForKey(key: string, value: string, moduleName: string): boolean
setNumberItemForKey(key: string, value: number, moduleName: string): boolean
setConfigItemForKey(key: string, value: string | number | boolean, moduleName: string): boolean
getBooleanConfigItemForKey(theDefault: boolean, key: string, moduleName: string): boolean
getStringItemForKey(theDefault: string, key: string, moduleName: string): string | null | undefined
getNumberItemForKey(theDefault: number, key: string, moduleName: string): number
logCustomEvent(eventName: string, values: Record<string, string | number | boolean>, level: number): boolean
logSignal(values: Record<string, string | number | boolean>, level: number): boolean
logExceptionEvent(message: string, stackInfo: string, unhandled: boolean): boolean
logLocation(): boolean
logLocationWithLatitudeLongitude(latitude: number, longitude: number, level: number): boolean
logClickEvent(target: number, controlId: string): boolean
logTextChangeEvent(target: number, controlId: string, text: string | null | undefined): boolean
setCurrentScreenName(logicalPageName: string): boolean
logScreenViewContextLoad(logicalPageName: string | null | undefined, referrer:string | null | undefined): boolean
logScreenViewContextUnload(logicalPageName: string | null | undefined, referrer:string | null | undefined): boolean
logScreenLayout(name: string, delay: number): boolean
// New dialog event handling methods
logDialogShowEvent(dialogId: string, dialogTitle: string, dialogType: string): boolean
logDialogDismissEvent(dialogId: string, dismissReason: string): boolean
logDialogButtonClickEvent(dialogId: string, buttonText: string, buttonIndex: number): boolean
logDialogCustomEvent(dialogId: string, eventName: string, values: Record<string, string | number | boolean>): boolean
}