@maxzima/wa-communicator 1.0.67 → 1.0.68
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.
|
@@ -44,11 +44,7 @@ export class Communicator {
|
|
|
44
44
|
}
|
|
45
45
|
const headers = this.getHeaders();
|
|
46
46
|
const meta = this.getMeta(data.browserData);
|
|
47
|
-
const body = JSON.stringify({
|
|
48
|
-
device_id: data.deviceId,
|
|
49
|
-
meta,
|
|
50
|
-
mobile: data.phoneNumber,
|
|
51
|
-
});
|
|
47
|
+
const body = JSON.stringify(Object.assign(Object.assign({ device_id: data.deviceId, meta, mobile: data.phoneNumber }, (data.captchaSolution && { captcha_solution: data.captchaSolution })), (data.captchaSolutionDecisionSeconds && { captcha_solution_decision_seconds: data.captchaSolutionDecisionSeconds })));
|
|
52
48
|
const queryParams = {};
|
|
53
49
|
if (data.outOfBandAllowed) {
|
|
54
50
|
queryParams['out_of_band_allowed'] = 'true';
|
|
@@ -52,6 +52,8 @@ type TSignInByMobileRequestData = {
|
|
|
52
52
|
deviceId: string;
|
|
53
53
|
browserData: TAccountBrowserData;
|
|
54
54
|
outOfBandAllowed?: boolean;
|
|
55
|
+
captchaSolution?: string;
|
|
56
|
+
captchaSolutionDecisionSeconds?: number;
|
|
55
57
|
};
|
|
56
58
|
type TSignInByAppRequestData = {
|
|
57
59
|
authToken: string;
|
package/package.json
CHANGED
|
@@ -49,6 +49,8 @@ export class Communicator {
|
|
|
49
49
|
device_id: data.deviceId,
|
|
50
50
|
meta,
|
|
51
51
|
mobile: data.phoneNumber,
|
|
52
|
+
...(data.captchaSolution && { captcha_solution: data.captchaSolution }),
|
|
53
|
+
...(data.captchaSolutionDecisionSeconds && { captcha_solution_decision_seconds: data.captchaSolutionDecisionSeconds }),
|
|
52
54
|
} as TSignInStartRequestBody);
|
|
53
55
|
|
|
54
56
|
const queryParams: TRequestQueryParams = {};
|