diff --git a/notNeededPackages.json b/notNeededPackages.json index 829e5cff2f..376ce597e6 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1476,6 +1476,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/indent-string", "asOfVersion": "4.0.0" }, + { + "libraryName": "instabug-reactnative", + "typingsPackageName": "instabug-reactnative", + "sourceRepoURL": "https://github.com/Instabug/instabug-reactnative#readme", + "asOfVersion": "8.1.0" + }, { "libraryName": "interactjs", "typingsPackageName": "interact.js", diff --git a/types/instabug-reactnative/index.d.ts b/types/instabug-reactnative/index.d.ts deleted file mode 100644 index 36a7d9d789..0000000000 --- a/types/instabug-reactnative/index.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -// Type definitions for instabug-reactnative 8.0 -// Project: https://github.com/Instabug/instabug-reactnative#readme -// Definitions by: Peng Cao -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export const Instabug: InstabugStatic; -export type Instabug = InstabugStatic; -export type BugReporting = BugReportingStatic; -export default Instabug; - -interface InstabugStatic { - invocationEvent: InvocationEvent; - colorTheme: ColorTheme; - locale: Locale; - strings: Strings; - welcomeMessageMode: WelcomeMessageMode; - startWithToken(token: string, event: string[]): void; - setColorTheme(colorTheme: string): void; - setPrimaryColor(color: number): void; - setFloatingButtonEdge(): void; - setLocale(locale: string): void; - setStringToKey(key: string): void; - setWelcomeMessageMode(welcomeMsg: string): void; - identifyUserWithEmail(email: string, name: string): void; - setUserAttribute(key: string, value: string): void; - getUserAttribute(key: string, callBack: (attribute: string) => void): void; - getAllUserAttributes(callBack: (allAttributes: string[]) => void): void; - removeUserAttribute(key: string): void; - setUserData(key: string): void; - logOut(): void; - logVerbose(info: string): void; - logInfo(info: string): void; - logDebug(info: string): void; - logError(info: string): void; - logWarn(info: string): void; - setUserStepsEnabled(enabled: boolean): void; - setAutoScreenRecordingEnabled(enabled: boolean): void; - setAutoScreenRecordingMaxDuration(ms: number): void; - setViewHierarchyEnabled(enabled: boolean): void; - resetTags(): void; - getTags(callBack: (tags: string) => void): void; - appendTags(tags: string[]): void; - setSessionProfilerEnabled(enabled: boolean): void; - setCrashReportingEnabled(enabled: boolean): void; - setChatNotificationEnabled(enabled: boolean): void; - getUnreadMessagesCount(callBack: (count: number) => void): void; - setOnNewMessageHandler(callBacck: () => void): void; - setPromptOptionsEnabled(chat: boolean, bug: boolean, feedback: boolean): void; - setSurveysEnabled(enabled: boolean): void; - setPostInvocationHandler(): void; -} - -interface WelcomeMessageMode { - beta: string; - live: string; - disabled: string; -} - -interface Strings { - shakeHint: string; - swipeHint: string; - edgeSwipeStartHint: string; - startAlertText: string; - invalidEmailMessage: string; - invalidEmailTitle: string; - invalidCommentMessage: string; - invalidCommentTitle: string; - invocationHeader: string; - talkToUs: string; - reportBug: string; - reportFeedback: string; - emailFieldHint: string; - commentFieldHintForBugReport: string; - commentFieldHintForFeedback: string; - addVideoMessage: string; - addVoiceMessage: string; - addImageFromGallery: string; - addExtraScreenshot: string; - audioRecordingPermissionDeniedTitle: string; - audioRecordingPermissionDeniedMessage: string; - // microphonePermissionAlertSettingsButtonText Instabug.microphonePermissionAlertSettingsButtonText, - recordingMessageToHoldText: string; - recordingMessageToReleaseText: string; - conversationsHeaderTitle: string; - screenshotHeaderTitle: string; - chatsNoConversationsHeadlineText: string; - doneButtonText: string; - okButtonText: string; - cancelButtonText: string; - thankYouText: string; - audio: string; - video: string; - image: string; - chatsHeaderTitle: string; - team: string; - messageNotification: string; - messagesNotificationAndOthers: string; - - // iOS only - // Instabug.strings.collectingDataText -} - -interface Locale { - arabic: string; - chineseSimplified: string; - chineseTraditional: string; - czech: string; - danish: string; - english: string; - french: string; - german: string; - italian: string; - japanese: string; - polish: string; - portugueseBrazil: string; - russian: string; - spanish: string; - swedish: string; - turkish: string; -} - -interface ColorTheme { - light: string; - dark: string; -} - -interface InvocationEvent { - none: string; - shake: string; - screenshot: string; - twoFingersSwipe: string; - floatingButton: string; -} - -interface BugReportingStatic { - setShakingThresholdForAndroid(shakingThreshold: number): void; - setShakingThresholdForiPhone(shakingThreshold: number): void; - setShakingThresholdForiPad(shakingThreshold: number): void; -} diff --git a/types/instabug-reactnative/instabug-reactnative-tests.ts b/types/instabug-reactnative/instabug-reactnative-tests.ts deleted file mode 100644 index 5bc6db997b..0000000000 --- a/types/instabug-reactnative/instabug-reactnative-tests.ts +++ /dev/null @@ -1,36 +0,0 @@ -import Instabug from "instabug-reactnative"; - -Instabug.startWithToken("token: string", [""]); -Instabug.setColorTheme("colorTheme: string"); -Instabug.setPrimaryColor(1); -Instabug.setFloatingButtonEdge(); -Instabug.setLocale("locale: string"); -Instabug.setStringToKey("key: string"); -Instabug.setWelcomeMessageMode("welcomeMsg: string"); -Instabug.identifyUserWithEmail("email: string", "name: string"); -Instabug.setUserAttribute("key: string", "value: string"); -Instabug.getUserAttribute("key: string", (attribute) => 1); -Instabug.getAllUserAttributes((allAttributes) => 1); -Instabug.removeUserAttribute("key: string"); -Instabug.setUserData("key: string"); -Instabug.logOut(); -Instabug.logVerbose("info: string"); -Instabug.logInfo("info: string"); -Instabug.logDebug("info: string"); -Instabug.logError("info: string"); -Instabug.logWarn("info: string"); -Instabug.setUserStepsEnabled(true); -Instabug.setAutoScreenRecordingEnabled(false); -Instabug.setAutoScreenRecordingMaxDuration(10000); -Instabug.setViewHierarchyEnabled(true); -Instabug.resetTags(); -Instabug.getTags((tags) => 1); -Instabug.appendTags([""]); -Instabug.setSessionProfilerEnabled(false); -Instabug.setCrashReportingEnabled(true); -Instabug.setChatNotificationEnabled(false); -Instabug.getUnreadMessagesCount((count) => 1); -Instabug.setOnNewMessageHandler(() => 1); -Instabug.setPromptOptionsEnabled(true, true, true); -Instabug.setSurveysEnabled(false); -Instabug.setPostInvocationHandler(); diff --git a/types/instabug-reactnative/tsconfig.json b/types/instabug-reactnative/tsconfig.json deleted file mode 100644 index 700b862185..0000000000 --- a/types/instabug-reactnative/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "instabug-reactnative-tests.ts" - ] -} diff --git a/types/instabug-reactnative/tslint.json b/types/instabug-reactnative/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/instabug-reactnative/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }