Skip to content

Commit 41784f8

Browse files
authored
πŸ› fix wrong param type + add missing API defs in typescript def file (#293)
* πŸ› fix wrong param type and add missing API defs in typescript def file * πŸ› fix enum reproStepsMode.enabled not mapped and causing a crash * πŸ“ Update changelog * πŸ’Ž Bump version to 8.3.3
1 parent de83081 commit 41784f8

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

β€ŽCHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v8.3.3 (2019-05-31)
2+
3+
* Fixes crash caused when calling the setReproStepsMode API with enum value enabled.
4+
* Fixes wrong typescript definition for the setReportTypes API param.
5+
16
## v8.3.2 (2019-05-23)
27

38
* Fixes an issue that causes release builds to fail on Windows

β€Žindex.d.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ export namespace BugReporting {
2424
function setShakingThresholdForiPad(iPadShakingThreshold: number): void;
2525
function setShakingThresholdForAndroid(androidThreshold: number): void;
2626
function setExtendedBugReportMode(extendedBugReportMode: extendedBugReportMode): void;
27-
function setReportTypes(types: reportType): void;
27+
function setReportTypes(types: reportType[]): void;
2828
function showWithOptions(
2929
type: reportType,
3030
options: option[]): void;
31+
function show(
32+
type: reportType,
33+
options: option[]): void;
3134
enum invocationEvent {
3235
none,
3336
shake,
@@ -90,6 +93,7 @@ export namespace Replies {
9093
function hasChats(callback: (previousChats : boolean) => void): void;
9194
function show(): void;
9295
function setOnNewReplyReceivedCallback(onNewReplyReceivedCallback: () => void): void;
96+
function setOnNewReplyReceivedHandler(onNewReplyReceivedHandler: () => void): void;
9397
function getUnreadRepliesCount(messageCountCallback: () => void): void;
9498
function setInAppNotificationsEnabled(inAppNotificationsEnabled: boolean): void;
9599
function setInAppNotificationSound(shouldPlaySound: boolean): void;
@@ -104,7 +108,9 @@ export namespace Surveys {
104108
function getAvailableSurveys(availableSurveysCallback: () => void): void;
105109
function setAutoShowingEnabled(autoShowingSurveysEnabled: boolean): void;
106110
function onShowCallback(willShowSurveyHandler: () => void): void;
111+
function setOnShowHandler(onShowHandler: () => void): void;
107112
function onDismissCallback(didDismissSurveyHandler: () => void): void;
113+
function setOnDismissHandler(onDismissHandler: () => void): void;
108114
function showSurvey(surveyToken: string): void;
109115
function hasRespondedToSurvey(
110116
surveyToken: string,
@@ -122,6 +128,10 @@ export function startWithToken(
122128
token: string,
123129
invocationEvent: invocationEvent[]
124130
): void;
131+
export function start(
132+
token: string,
133+
invocationEvent: invocationEvent[]
134+
): void;
125135
export function setUserData(userData: string): void;
126136
export function setAutoScreenRecordingEnabled(autoScreenRecordingEnabled: boolean): void;
127137
export function setAutoScreenRecordingMaxDuration(autoScreenRecordingMaxDuration: number): void;
@@ -150,6 +160,10 @@ export function setStringToKey(
150160
string: string,
151161
key: strings,
152162
): void;
163+
export function setString(
164+
key: strings,
165+
string: string,
166+
): void;
153167
export function setEnabledAttachmentTypes(
154168
screenshot: boolean,
155169
extraScreenshot: boolean,
@@ -160,8 +174,13 @@ export function identifyUserWithEmail(
160174
email: string,
161175
name: string
162176
): void;
177+
export function identifyUser(
178+
email: string,
179+
name: string
180+
): void;
163181
export function logOut(): void;
164182
export function logUserEventWithName(name: string, params?: any): void;
183+
export function logUserEvent(name: string): void;
165184
export function logVerbose(message: string): void;
166185
export function logInfo(message: string): void;
167186
export function logDebug(message: string): void;

β€Žindex.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const InstabugModule = {
115115
},
116116

117117
/**
118-
* @deprecated use {@link CrashReporting.setCrashReportingEnabled}
118+
* @deprecated use {@link CrashReporting.setEnabled}
119119
* Report un-caught exceptions to Instabug dashboard
120120
* We don't send exceptions from __DEV__, since it's way too noisy!
121121
*/
@@ -819,6 +819,7 @@ const InstabugModule = {
819819
* @enum {number}
820820
*/
821821
reproStepsMode: {
822+
enabled: Instabug.reproStepsEnabled,
822823
disabled: Instabug.reproStepsDisabled,
823824
enabledWithNoScreenshots: Instabug.reproStepsEnabledWithNoScreenshots
824825
},

β€Žios/RNInstabug/InstabugReactBridge.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ - (NSDictionary *)constantsToExport
726726
@"dismissTypeCancel": @(IBGDismissTypeCancel),
727727
@"dismissTypeAddAtttachment": @(IBGDismissTypeAddAttachment),
728728

729+
@"reproStepsEnabled": @(IBGUserStepsModeEnable),
729730
@"reproStepsDisabled": @(IBGUserStepsModeDisable),
730731
@"reproStepsEnabledWithNoScreenshots": @(IBGUserStepsModeEnabledWithNoScreenshots),
731732

β€Žios/RNInstabug/RCTConvert+InstabugEnums.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ @implementation RCTConvert (InstabugEnums)
4848
}), IBGPromptOptionChat, integerValue)
4949

5050
RCT_ENUM_CONVERTER(IBGUserStepsMode, (@{
51+
@"reproStepsEnabled": @(IBGUserStepsModeEnable),
5152
@"reproStepsDisabled": @(IBGUserStepsModeDisable),
5253
@"reproStepsEnabledWithNoScreenshots": @(IBGUserStepsModeEnabledWithNoScreenshots)
5354
}), IBGUserStepsModeEnabledWithNoScreenshots, integerValue)

β€Žpackage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-reactnative",
3-
"version": "8.3.2",
3+
"version": "8.3.3",
44
"description": "React Native plugin for integrating the Instabug SDK",
55
"main": "index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
Β (0)