Files
discord-decomp/sources/actions/MFAActionCreators.tsx
T
2026-07-27 16:20:00 +03:00

114 lines
7.5 KiB
TypeScript

/* Metro module 13267; source: actions/MFAActionCreators.tsx; dependencies: [12593, 661, 507, 694, 2] */
function _fun101156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:6, offset: 0x0220a128, size: 219 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const mfaStore = importDefault(12593) /* metro dependency 12593: MFAStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {enable: enable_101157, disable: disable_101159, enableSMS: enableSMS, disableSMS: disableSMS,
sendMFABackupCodesVerificationKeyEmail: sendMFABackupCodesVerificationKeyEmail,
confirmViewBackupCodes: confirmViewBackupCodes, clearBackupCodes: clearBackupCodes};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MFAActionCreators.tsx');
exports.default = object2;
}
function enable_101157({code, secret}) { // fn#101157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:136, offset: 0x0220a203, size: 120 bytes, params: 2, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_TOTP_ENABLE = Endpoints.MFA_TOTP_ENABLE;
return Reflect.apply(post, HTTP, [{url: MFA_TOTP_ENABLE, body: {code: code, secret: secret}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101158);
}
function disable_101159() { // fn#101159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:361, offset: 0x0220a2cf, size: 88 bytes, params: 1, frame: 13
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_TOTP_DISABLE = Endpoints.MFA_TOTP_DISABLE;
Reflect.apply(post, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: MFA_TOTP_DISABLE}]).then(_fun101160);
}
function enableSMS() { // fn#101161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:545, offset: 0x0220a36b, size: 134 bytes, params: 1, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SMS_ENABLE = Endpoints.MFA_SMS_ENABLE;
return Reflect.apply(post, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: MFA_SMS_ENABLE}]).then(_fun101162, _fun101163);
}
function disableSMS(a0) { // fn#101164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:814, offset: 0x0220a459, size: 151 bytes, params: 2, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SMS_DISABLE = Endpoints.MFA_SMS_DISABLE;
return Reflect.apply(post, HTTP, [{url: MFA_SMS_DISABLE, body: {password: a0}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101165, _fun101166);
}
function sendMFABackupCodesVerificationKeyEmail(a0) { // fn#101167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1129, offset: 0x0220a4f0, size: 113 bytes, params: 2, frame: 15
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SEND_VERIFICATION_KEY = Endpoints.MFA_SEND_VERIFICATION_KEY;
return Reflect.apply(post, HTTP, [{url: MFA_SEND_VERIFICATION_KEY, body: {password: a0}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101168, function(a0) {
throw a0;
});
}
function confirmViewBackupCodes(a0, a1) { // fn#101170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1390, offset: 0x0220a5bc, size: 165 bytes, params: 3, frame: 17
const env0_0 = a0;
const nonces = MFAStore.getNonces();
const r6 = a1 ? nonces.regenerateNonce : nonces.viewNonce;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_CODES_VERIFICATION = Endpoints.MFA_CODES_VERIFICATION;
return Reflect.apply(post, HTTP, [{url: MFA_CODES_VERIFICATION, body: {key: a0, nonce: r6, regenerate: a1},
oldFormErrors: true, rejectWithError: false}]).then(_fun101171, function(a0) {
throw a0;
});
}
function clearBackupCodes() { // fn#101173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1715, offset: 0x0220a6b0, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_CLEAR_BACKUP_CODES'});
}
function _fun101158(a0) { // fn#101158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:265, offset: 0x0220a27b, size: 84 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_ENABLE_SUCCESS',
token: a0.body.token, codes: a0.body.backup_codes});
}
function _fun101160({body}) { // fn#101160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:457, offset: 0x0220a327, size: 68 bytes, params: 2, frame: 13
const token = body.token;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
return value.dispatch({type: 'MFA_DISABLE_SUCCESS', token: token});
}
function _fun101162(a0) { // fn#101162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:676, offset: 0x0220a3f1, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE_COMPLETE'});
return a0;
}
function _fun101163(a0) { // fn#101163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:736, offset: 0x0220a425, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE_COMPLETE'});
throw a0;
}
function _fun101168(a0) { // fn#101168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1245, offset: 0x0220a561, size: 91 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SEND_VERIFICATION_KEY',
nonces: {viewNonce: a0.body.nonce, regenerateNonce: a0.body.regenerate_nonce}});
}
function _fun101171({body}) { // fn#101171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1613, offset: 0x0220a661, size: 79 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_VIEW_BACKUP_CODES',
codes: body.backup_codes, key: env0_0});
}