decord/source/modules/auth_sessions/AuthSessionsActionCreators.tsx

161 lines
4.9 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 14306
// Function ID: 14307
2026-07-20 16:05:17 +00:00
// Name: _fetchAuthSessions
2026-07-29 08:29:29 +00:00
// Dependencies: [5, 676, 530, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearAuthSessions, fetchAuthSessions, logOutSessions
2026-08-15 05:55:55 +00:00
// Module 14306 (_fetchAuthSessions)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import { Endpoints } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _fetchAuthSessions() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback(function*() {
2026-08-04 21:03:28 +00:00
const callback = tmp2;
let closure_0 = tmp5;
const HTTP = outer1_0(530).HTTP;
const obj1 = { url: null, rejectWithError: false };
obj1[0] = outer1_4.AUTH_SESSIONS;
closure_0 = yield HTTP.get(obj1);
2026-08-14 17:33:39 +00:00
const body = closure_0.body;
if (body != null) {
const user_sessions = body.user_sessions;
2026-08-04 21:03:28 +00:00
}
2026-08-14 17:33:39 +00:00
if (null != user_sessions) {
2026-08-04 21:03:28 +00:00
const obj = callback(709);
const obj4 = { type: "FETCH_AUTH_SESSIONS_SUCCESS", sessions: null };
obj4[1] = closure_0.body.user_sessions;
obj.dispatch(obj4);
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
return closure_0;
2026-07-29 08:29:29 +00:00
});
const _fetchAuthSessions = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
function _logOutSessions() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0) => {
let closure_0 = arg0;
let c3 = 0;
let c4 = 0;
return (function*(arg0) {
if (constants === 2) {
constants = 3;
HermesBuiltin.throwTypeError();
} else if (tmp5 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-15 05:55:55 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
constants = 2;
let num2 = 0;
if (0 === c3) {
if (arg0 === 1) {
constants = 3;
throw arg1;
} else if (arg0 === 2) {
constants = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
const table = tmp3;
2026-08-14 17:33:39 +00:00
let callback2 = tmp2;
2026-07-29 08:29:29 +00:00
let HTTP;
2026-08-14 17:33:39 +00:00
callback2 = undefined;
2026-07-29 08:29:29 +00:00
const _Array = Array;
if (Array.isArray(items)) {
items = arr2;
if (num2 === arr2.length) {
constants = 3;
2026-08-15 05:55:55 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
items = [arr2];
}
HTTP = callback(outer1_2[2]).HTTP;
num2 = HTTP.post;
const obj1 = { url: null, body: null, rejectWithError: false };
obj1[0] = constants.AUTH_SESSIONS_LOGOUT;
const obj2 = { session_id_hashes: null };
obj2[0] = items;
obj1[1] = obj2;
num2(obj1);
c3 = 1;
constants = 1;
}
} else if (arg0 === 1) {
constants = 3;
throw arg1;
} else if (arg0 === 2) {
constants = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
2026-08-14 17:33:39 +00:00
callback2 = arg1;
obj = callback2(table[3]);
const obj4 = { type: "LOGOUT_AUTH_SESSIONS_SUCCESS", sessionIdHashes: null };
obj4[1] = items;
obj.dispatch(obj4);
2026-07-29 08:29:29 +00:00
constants = 3;
const obj5 = { value: null, done: true };
2026-08-14 17:33:39 +00:00
obj5[0] = callback2;
2026-07-29 08:29:29 +00:00
return obj5;
}
2026-08-14 17:33:39 +00:00
} catch (tmp18) {
2026-07-29 08:29:29 +00:00
constants = tmp;
2026-08-14 17:33:39 +00:00
throw tmp18;
2026-07-29 08:29:29 +00:00
}
}
})();
});
const _logOutSessions = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const result = require("sendRequest").fileFinishedImporting("modules/auth_sessions/AuthSessionsActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const fetchAuthSessions = function fetchAuthSessions() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _fetchAuthSessions.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
export const clearAuthSessions = function clearAuthSessions() {
2026-07-29 08:29:29 +00:00
importDefault(709).dispatch({ type: "FETCH_AUTH_SESSIONS_SUCCESS", sessions: [] });
2026-07-20 16:05:17 +00:00
};
export const logOutSessions = function logOutSessions(id_hash) {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _logOutSessions.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};