import registry from "./ArgsRegistry"; import bugReporting from "./BugReporting"; import ArgsRegistry from "./ArgsRegistry"; declare namespace Instabug { const welcomeMessageMode: typeof registry.welcomeMessageMode; const floatingButtonEdge: typeof registry.floatingButtonEdge; const colorTheme: typeof registry.colorTheme; const strings: typeof registry.strings; const reproStepsMode: typeof registry.reproStepsMode; const locale: typeof registry.locale; /** * @deprecated This method is deprecated and will be removed in a future version. Use `init` instead. * Starts the SDK. * This is the main SDK method that does all the magic. This is the only * method that SHOULD be called. * Should be called in constructor of the AppRegistry component * * @param token the token that identifies the app, you can find * it on your dashboard. * @param invocationEvents an array of invocationEvents that invoke * the SDK's UI. * @param success callback on function success. * @param error callback on function error. */ const start: (token: string, invocationEvents: bugReporting.invocationEvents[], success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Initializes the Instabug SDK with additional configurations. * * @param token The token that identifies the app, available on your dashboard. * @param invocationEvents An array of invocation events that trigger the SDK's UI. * @param logLevel The level of detail in logs that you want to print. * @param success Callback on function success. * @param error Callback on function error. */ const init: (token: string, invocationEvents: bugReporting.invocationEvents[], logLevel: ArgsRegistry.logLeve, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Shows default Instabug prompt. * * @param success callback on function success. * @param error callback on function error. */ const show: (success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Sets the primary color of the SDK's UI. * Sets the color of UI elements indicating interactivity or call to action. * To use, import processColor and pass to it with argument the color hex * as argument. * * @param color a color hex to set the UI elements of the SDK to. * @param success callback on function success. * @param error callback on function error. */ const setPrimaryColor: (color: string, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Logs a user event that happens through the lifecycle of the application. * Logged user events are going to be sent with each report, as well as at the end of a session. * * @param userEvent the user event name. * @param success callback on function success. * @param error callback on function error. */ const logUserEventWithName: (userEvent: string, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Sets whether user steps tracking is visual, non visual or disabled. * User Steps tracking is enabled by default if it's available * in your current plan. * * @deprecated This method is deprecated and will be removed in a future version. * Use `setReproStepsConfig` instead. * * @param reproStepsMode an enum to set user steps tracking * to be enabled, non visual or disabled. * @param success callback on function success. * @param error callback on function error. */ const setReproStepsMode: (reproStepsMode: registry.reproStepsMode | "enabled" | "disabled" | "enabledWithNoScreenshots", success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Configures user steps tracking for bug, crash, and session replay issue types separately. * User Steps tracking is enabled by default if it's available * in your current plan. * * @param bugMode an enum to set user steps tracking for bug issues. * @param crashMode an enum to set user steps tracking for crash issues. * @param success callback on function success. * @param error callback on function error. */ const setReproStepsConfig: (bugMode: registry.reproStepsMode | `${registry.reproStepsMode}`, crashMode: registry.reproStepsMode | `${registry.reproStepsMode}`, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * The session profiler is enabled by default and it attaches to the bug and * crash reports the following information during the last 60 seconds before the report is sent. * @param isEnabled a boolean to enable or disable the feature. * @param success callback on function success. * @param error callback on function error. */ const setSessionProfilerEnabled: (isEnabled: boolean, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Sets the welcome message mode to live, beta or disabled. * @param mode an enum to set the welcome message mode. * @param success callback on function success. * @param error callback on function error. */ const setWelcomeMessageMode: (mode: registry.welcomeMessageMode, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Shows the welcome message in a specific mode. * @param mode an enum to set the mode to show the welcome message with. * @param success callback on function success. * @param error callback on function error. */ const showWelcomeMessage: (mode: registry.welcomeMessageMode, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Attaches user data to each report being sent. * Each call to this method overrides the user data to be attached. * Maximum size of the string is 1,000 characters. * * @param data a string to be attached to each report, with a * maximum size of 1,000 characters. * @param success callback on function success. * @param error callback on function error. */ const setUserData: (data: string, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Add file to be attached to the bug report. * * @param filePath the path of the file to be attached. * @param success callback on function success. * @param error callback on function error. */ const addFile: (filePath: string, success?: () => void, error?: ((err: any) => void) | undefined) => void; /** * Appends a log message to Instabug internal log *
* These logs are then sent along the next uploaded report.
* All log messages are timestamped
* Logs aren't cleared per single application run.
* If you wish to reset the logs,
* use {@link #clearLogs()} ()}
*