import ShakeReportConfiguration from './models/ShakeReportConfiguration'; import ShakeFile from './models/ShakeFile'; import LogLevel from './models/LogLevel'; import ShakeScreen from './models/ShakeScreen'; import NetworkTracker from './modules/NetworkTracker'; import NotificationTracker from './modules/NotificationTracker'; import MessagesTracker from './modules/MessagesTracker'; import NotificationEvent from './models/NotificationEvent'; import NetworkRequest from './models/NetworkRequest'; import NetworkRequestBuilder from './builders/NetworkRequestBuilder'; import NotificationEventBuilder from './builders/NotificationEventBuilder'; import ShakeForm from './models/ShakeForm'; import ShakeFormComponent from './models/ShakeFormComponent'; import ShakeTitle from './models/ShakeTitle'; import ShakeTextInput from './models/ShakeTextInput'; import ShakeEmail from './models/ShakeEmail'; import ShakePicker from './models/ShakePicker'; import ShakePickerItem from './models/ShakePickerItem'; import ShakeAttachments from './models/ShakeAttachments'; import ShakeInspectButton from './models/ShakeInspectButton'; import ShakeTheme from './models/ShakeTheme'; import ShakeBaseAction from './models/ShakeBaseAction'; import ShakeHomeAction from './models/ShakeHomeAction'; import ShakeSubmitAction from './models/ShakeSubmitAction'; import ShakeChatAction from './models/ShakeChatAction'; import ChatNotification from './models/ChatNotification'; import HomeActionsTracker from './modules/HomeActionsTracker'; import ShakeCallbacks from './modules/ShakeCallbacks'; import type * as React from 'react'; /** * Shake SDK interface. */ declare class Shake { static networkTracker: NetworkTracker; static notificationTracker: NotificationTracker; static messagesTracker: MessagesTracker; static homeActionsTracker: HomeActionsTracker; static shakeCallbacks: ShakeCallbacks; /** * Starts Shake SDK. * * @param {string} apiKey api key */ static start(apiKey: string): Promise; /** * Shows shake screen. * * @param {ShakeScreen} shakeScreen ShakeScreen.HOME or ShakeScreen.NEW. */ static show(shakeScreen?: ShakeScreen): void; /** * Checks if user feedback is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isUserFeedbackEnabled(): boolean; /** * Enables or disables user feedback. * * @param {boolean} enabled true if enabled, otherwise false */ static setUserFeedbackEnabled(enabled: boolean): void; /** * Enables or disables activity history. * * @param {boolean} enabled true if enabled, otherwise false */ static setEnableActivityHistory(enabled: boolean): void; /** * Checks if activity history is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isEnableActivityHistory(): boolean; /** * Enables or disables black box. * * @param {boolean} enabled true if enabled, otherwise false */ static setEnableBlackBox(enabled: boolean): void; /** * Checks if black box is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isEnableBlackBox(): boolean; /** * Enables or disables invoke by floating button. * * @param {boolean} enabled true if enabled, otherwise false */ static setShowFloatingReportButton(enabled: boolean): void; /** * Checks if floating button invoke is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isShowFloatingReportButton(): boolean; /** * Enables or disables invoke by shake. * * @param {boolean} enabled true if enabled, otherwise false */ static setInvokeShakeOnShakeDeviceEvent(enabled: boolean): void; /** * Checks if shake event invoke is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isInvokeShakeOnShakeDeviceEvent(): boolean; /** * Enables or disables invoke by screenshot. * * @param {boolean} enabled true if enabled, otherwise false */ static setInvokeShakeOnScreenshot(enabled: boolean): void; /** * Checks if screenshot invoke is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isInvokeShakeOnScreenshot(): boolean; /** * Gets screen opened on Shake manual invocation. * * @return {ShakeScreen} shake screen */ static getDefaultScreen(): ShakeScreen; /** * Sets screen opened on Shake manual invocation. * * @param {ShakeScreen} shakeScreen ShakeScreen.HOME or ShakeScreen.NEW */ static setDefaultScreen(shakeScreen: ShakeScreen): void; /** * Sets if screenshot is captured with report by default. * * @param {boolean} screenshotIncluded true if included, otherwise false */ static setScreenshotIncluded(screenshotIncluded: boolean): void; /** * Checks if screenshot is captured with report by default. * * @returns {boolean} true if included, otherwise false */ static isScreenshotIncluded(): boolean; /** * Sets how sensitive is shaking gesture invocation. * * @param {number} shakingThreshold number between 1-1000 (1 weak, 1000 strong) */ static setShakingThreshold(shakingThreshold: number): void; /** * Sets how sensitive is shaking gesture invocation. * * @returns {number} shaking gesture sensitivity */ static getShakingThreshold(): number; /** * Sets files to upload with report. * * @param {ShakeFile[]} files shake files to upload */ static setShakeReportData(files: ShakeFile[]): void; /** * Sends report silently from code. * * @param {string} description silent report description * @param {ShakeFile[]} files silent report files * @param {ShakeReportConfiguration} configuration silent report configuration */ static silentReport(description?: string, files?: ShakeFile[], configuration?: ShakeReportConfiguration): void; /** * Gets form for New ticket screen. * * @returns {ShakeForm} instance of form */ static getShakeForm(): ShakeForm; /** * Sets form for New ticket screen. * * Set null for default value. * * @param {ShakeForm | null} shakeForm form */ static setShakeForm(shakeForm: ShakeForm | null): void; /** * Sets theme for Shake UI. * * Set null for default value. * * @param {ShakeTheme | null} shakeTheme theme */ static setShakeTheme(shakeTheme: ShakeTheme | null): void; /** * Sets subtitle for Home screen. * * @param {string} subtitle string */ static setHomeSubtitle(subtitle: string): void; /** * Sets action buttons for Home screen. * * @param {ShakeBaseAction[]} actions list of actions */ static setHomeActions(actions: ShakeBaseAction[]): void; /** * Checks if intro message will be shown on the first app run. * * @returns {boolean} true if yes, otherwise false */ static getShowIntroMessage(): boolean; /** * Sets if intro message will be shown on the first app run. * * @param {boolean} enabled true if yes, otherwise false */ static setShowIntroMessage(enabled: boolean): void; /** * Checks if auto video recording will be enabled. * * @returns {boolean} true if enabled, otherwise false */ static isAutoVideoRecording(): boolean; /** * Enables or disables auto video recording. * * @param {boolean} enabled true if enabled, otherwise false */ static setAutoVideoRecording(enabled: boolean): void; /** * Checks if console logs are attached to the report. * * @returns {boolean} true if attached, otherwise false */ static isConsoleLogsEnabled(): boolean; /** * Sets if console logs are attached to the report. * * @param enabled true if attached, otherwise false */ static setConsoleLogsEnabled(enabled: boolean): void; /** * Checks if network requests are attached to the report. * * @returns {boolean} true if attached, otherwise false */ static isNetworkRequestsEnabled(): boolean; /** * Sets if network requests are attached to the report. * * @param {boolean} enabled true if attached, otherwise false */ static setNetworkRequestsEnabled(enabled: boolean): void; /** * Adds custom network request to the Shake report. * * @param {NetworkRequestBuilder} requestBuilder request builder */ static insertNetworkRequest(requestBuilder: NetworkRequestBuilder): void; /** * Adds filter for network requests. * * @param {((builder: NetworkRequestBuilder) => NetworkRequestBuilder) | null} filter function */ static setNetworkRequestsFilter(filter: ((builder: NetworkRequestBuilder) => NetworkRequestBuilder | null) | null): void; /** * Adds custom notification event to the Shake report. * * @param {NotificationEventBuilder} notificationBuilder notification builder */ static insertNotificationEvent(notificationBuilder: NotificationEventBuilder): void; /** * Adds filter for notification events. * * @param {((builder: NetworkRequestBuilder) => NetworkRequestBuilder) | null} filter function */ static setNotificationEventsFilter(filter: ((builder: NotificationEventBuilder) => NotificationEventBuilder | null) | null): void; /** * Logs a custom message to the report. * * @param {LogLevel} logLevel LogLevel value * @param {string | null | undefined} message log message */ static log(logLevel: LogLevel, message: string | null | undefined): void; /** * Adds metadata to the report. * * @param {string} key metadata key * @param {string | null | undefined} value metadata value */ static setMetadata(key: string, value: string | null | undefined): void; /** * Clear existing metadata. */ static clearMetadata(): void; /** * Masks view on the screenshot. * * @param {React.MutableRefObject} viewRef view reference */ static addPrivateView(viewRef: null | number | React.Component | React.ComponentClass): void; /** * Removes view from private views. * * @param {React.MutableRefObject} viewRef view reference */ static removePrivateView(viewRef: null | number | React.Component | React.ComponentClass): void; /** * Clears all private views. */ static clearPrivateViews(): void; /** * Enables or disables automatic sensitive data redaction. * * @param {boolean} enabled true if enabled, otherwise false */ static setSensitiveDataRedactionEnabled(enabled: boolean): void; /** * Checks if automatic sensitive data redaction is enabled. * * @returns {boolean} true if enabled, otherwise false */ static isSensitiveDataRedactionEnabled(): boolean; /** * Shows notifications settings screen (Only Android). */ static showNotificationsSettings(): void; /** * Registers new Shake user. * * @param {string} id user id */ static registerUser(id: string): void; /** * Updates existing Shake user id. * * @param {string} id new user id */ static updateUserId(id: string): void; /** * Updates existing Shake user metadata. * * @param {{ [key: string]: string }} metadata user metadata to update */ static updateUserMetadata(metadata: { [key: string]: string; }): void; /** * Unregister current Shake user. */ static unregisterUser(): void; /** * Sets unread chat messages number listener. *

* Set null if you want to remove listener. * * @param {((count: number) => void) | null} listener listener */ static setUnreadMessagesListener(listener: ((count: number) => void) | null): void; /** * Sets Shake open event listener. *

* Set null if you want to remove listener. * * @param {(() => void) | null} listener listener */ static setShakeOpenListener(listener: (() => void) | null): void; /** * Sets Shake dismiss event listener. *

* Set null if you want to remove listener. * * @param {(() => void) | null} listener listener */ static setShakeDismissListener(listener: (() => void) | null): void; /** * Sets Shake submit event listener. *

* Set null if you want to remove listener. * * @param {((type: string, fields: { [key: string]: string }) => void) | null} listener listener */ static setShakeSubmitListener(listener: ((type: string, fields: { [key: string]: string; }) => void) | null): void; /** * Sets token used to send push notifications (Only Android). *

* Set null if you want to remove token. * * @param {string | null} token push notifications token */ static setPushNotificationsToken(token: string | null): void; /** * Shows Firebase chat notification (Only Android). * * @param {{ [key: string]: string | object } | undefined} data user metadata to update */ static showChatNotification(data: { [key: string]: string | object; } | undefined): void; /** * Sets ticket tags. * * @param {Array} tags string array */ static setTags(tags: Array): void; } export { ShakeReportConfiguration }; export { ShakeFile }; export { LogLevel }; export { ShakeScreen }; export { NetworkTracker }; export { NotificationEvent }; export { NetworkRequest }; export { NetworkRequestBuilder }; export { NotificationEventBuilder }; export { ShakeForm }; export { ShakeFormComponent }; export { ShakeTitle }; export { ShakeTextInput }; export { ShakeEmail }; export { ShakePicker }; export { ShakePickerItem }; export { ShakeAttachments }; export { ShakeInspectButton }; export { ShakeTheme }; export { ShakeBaseAction }; export { ShakeHomeAction }; export { ShakeChatAction }; export { ShakeSubmitAction }; export { ChatNotification }; export default Shake; //# sourceMappingURL=index.d.ts.map