@maxzima/wa-communicator 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,13 +84,13 @@ declare type TSetupSSERequestData = {
|
|
|
84
84
|
onMessage: (responseData: TSSEResponseData) => void;
|
|
85
85
|
};
|
|
86
86
|
declare type TSSEResponseData = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
success: boolean;
|
|
88
|
+
payload: {
|
|
89
|
+
otp?: string;
|
|
90
|
+
};
|
|
91
|
+
error?: {
|
|
92
|
+
code: number;
|
|
93
|
+
message: string;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
declare type TSetupChallengeResponse = {
|
package/package.json
CHANGED
|
@@ -146,12 +146,13 @@ export class Communicator {
|
|
|
146
146
|
if (typeof data.onError === "function") {
|
|
147
147
|
data.onError();
|
|
148
148
|
}
|
|
149
|
+
this.closeSSEAuth();
|
|
149
150
|
});
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
public closeSSEAuth() {
|
|
154
|
-
if (this.sseAuth) {
|
|
155
|
+
if (this.sseAuth) {
|
|
155
156
|
this.sseAuth.close();
|
|
156
157
|
this.sseAuth = null;
|
|
157
158
|
}
|
|
@@ -105,14 +105,14 @@ type TSetupSSERequestData = {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
type TSSEResponseData = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
108
|
+
success: boolean;
|
|
109
|
+
payload: {
|
|
110
|
+
otp?: string,
|
|
111
|
+
},
|
|
112
|
+
error?: {
|
|
113
|
+
code: number;
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
type TSetupChallengeResponse = {
|