decord/source/modules/game_relationships/GameRelationshipActionCreators.tsx

332 lines
10 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 9523
// Function ID: 9524
2026-07-20 16:05:17 +00:00
// Name: showRequestFailedAlert
2026-08-05 07:35:12 +00:00
// Dependencies: [5, 676, 4154, 4593, 1236, 530, 4101, 2]
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 9523 (showRequestFailedAlert)
2026-07-29 08:29:29 +00:00
import sendRequest from "sendRequest";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
let c4;
let c5;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function showRequestFailedAlert(arg0) {
2026-08-05 07:35:12 +00:00
const aPIError = new require(4154) /* V6OrEarlierAPIError */.APIError(arg0);
2026-07-20 16:05:17 +00:00
let anyErrorMessage = aPIError.getAnyErrorMessage();
2026-07-29 08:29:29 +00:00
const obj = { title: null, body: null };
const intl = require(1236) /* getSystemLocale */.intl;
obj[0] = intl.string(require(1236) /* getSystemLocale */.t["328j/I"]);
2026-07-20 16:05:17 +00:00
if (null == anyErrorMessage) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp(1236).intl;
anyErrorMessage = intl2.string(tmp(1236).t.fEptJP);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = anyErrorMessage;
2026-08-05 07:35:12 +00:00
importDefault(4593).show(obj);
2026-07-20 16:05:17 +00:00
}
function deleteGameRelationship() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _deleteGameRelationship.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 _deleteGameRelationship() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0) => {
let closure_0 = arg0;
let c5 = 0;
let c6 = 0;
let c4 = 0;
const iter = (function*(arg0) {
let c0;
let c1;
let c2;
2026-08-04 21:03:28 +00:00
const dependencyMap = tmp3;
c1 = tmp5;
({ userId: c0, applicationId: c1, onSuccess: c2 } = callback);
2026-08-05 07:35:12 +00:00
yield "PX_8";
2026-08-04 21:03:28 +00:00
let c4 = 1;
const HTTP = callback(530).HTTP;
const obj2 = { url: null, oldFormErrors: true, rejectWithError: false };
obj2[0] = c4.USER_GAME_RELATIONSHIP(callback, c1);
yield HTTP.del(obj2);
if (2 === tmp8) {
c4 = 0;
v0(sendRequest);
2026-07-29 08:29:29 +00:00
v0 = 3;
2026-08-04 21:03:28 +00:00
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 !== 2) {
dependencyMap();
c4 = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
c4 = 0;
return arg1;
2026-07-29 08:29:29 +00:00
})();
iter.next();
return iter;
});
const _deleteGameRelationship = 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 _removeGameFriend() {
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;
const iter = (function*(arg0) {
let c0;
let c1;
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c4 = 2;
if (0 === c3) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let closure_2 = tmp5;
c1 = tmp2;
c0 = undefined;
c1 = undefined;
({ userId: c0, applicationId: c1 } = c0);
c3 = 1;
c4 = 1;
2026-08-05 07:35:12 +00:00
return { value: "PX_8", done: "Array" };
2026-07-29 08:29:29 +00:00
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else {
const obj2 = { userId: null, applicationId: null, onSuccess: null };
obj2[0] = c0;
obj2[1] = c1;
obj2[2] = function onSuccess() {
const AccessibilityAnnouncer = _undefined(tmp5[6]).AccessibilityAnnouncer;
const intl = _undefined(tmp5[4]).intl;
AccessibilityAnnouncer.announce(intl.string(_undefined(tmp5[4]).t.zRf8cO));
};
c3 = 2;
c4 = 1;
const obj3 = { value: null, done: false };
obj3[0] = callback(obj2);
return obj3;
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
c4 = 3;
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp12) {
c4 = tmp;
throw tmp12;
}
}
})();
iter.next();
return iter;
});
const _removeGameFriend = 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 _cancelGameFriendRequest() {
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;
const iter = (function*(arg0) {
let c0;
let c1;
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c4 = 2;
if (0 === c3) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let closure_2 = tmp5;
c1 = tmp2;
c0 = undefined;
c1 = undefined;
({ userId: c0, applicationId: c1 } = c0);
c3 = 1;
c4 = 1;
2026-08-05 07:35:12 +00:00
return { value: "PX_8", done: "Array" };
2026-07-29 08:29:29 +00:00
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else {
const obj2 = { userId: null, applicationId: null, onSuccess: null };
obj2[0] = c0;
obj2[1] = c1;
obj2[2] = function onSuccess() {
const AccessibilityAnnouncer = _undefined(tmp5[6]).AccessibilityAnnouncer;
const intl = _undefined(tmp5[4]).intl;
AccessibilityAnnouncer.announce(intl.string(_undefined(tmp5[4]).t.XMf21q));
};
c3 = 2;
c4 = 1;
const obj3 = { value: null, done: false };
obj3[0] = callback(obj2);
return obj3;
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
c4 = 3;
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp12) {
c4 = tmp;
throw tmp12;
}
}
})();
iter.next();
return iter;
});
const _cancelGameFriendRequest = 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
({ Endpoints: c4, RelationshipTypes: c5 } = ME);
2026-07-23 10:11:24 +00:00
const result = require("V6OrEarlierAPIError").fileFinishedImporting("modules/game_relationships/GameRelationshipActionCreators.tsx");
export default {
2026-07-20 16:05:17 +00:00
removeGameFriend(arg0) {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _removeGameFriend.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
acceptGameFriendRequest(arg0) {
let applicationId;
let userId;
function onSuccess(arg0) {
}
({ userId, applicationId } = arg0);
const HTTP = onSuccess(530).HTTP;
let obj = { url: closure_4.USER_GAME_RELATIONSHIP(userId, applicationId), body: { type: constants.FRIEND }, oldFormErrors: true, rejectWithError: false };
const putResult = HTTP.put({ url: closure_4.USER_GAME_RELATIONSHIP(userId, applicationId), body: { type: constants.FRIEND }, oldFormErrors: true, rejectWithError: false });
return HTTP.put({ url: closure_4.USER_GAME_RELATIONSHIP(userId, applicationId), body: { type: constants.FRIEND }, oldFormErrors: true, rejectWithError: false }).then(() => {
const AccessibilityAnnouncer = onSuccess(outer1_2[6]).AccessibilityAnnouncer;
const intl = onSuccess(outer1_2[4]).intl;
AccessibilityAnnouncer.announce(intl.string(onSuccess(outer1_2[4]).t.taJiuc));
}).catch((arg0) => {
2026-08-05 07:35:12 +00:00
const aPIError = new onSuccess(4154).APIError(arg0);
2026-07-29 08:29:29 +00:00
let anyErrorMessage = aPIError.getAnyErrorMessage();
const obj = { title: null, body: null };
const intl = onSuccess(1236).intl;
obj[0] = intl.string(onSuccess(1236).t["328j/I"]);
if (null == anyErrorMessage) {
const intl2 = tmp(1236).intl;
anyErrorMessage = intl2.string(tmp(1236).t.fEptJP);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = anyErrorMessage;
2026-08-05 07:35:12 +00:00
callback(4593).show(obj);
2026-07-29 08:29:29 +00:00
return Promise.reject(arg0);
2026-07-20 16:05:17 +00:00
});
},
cancelGameFriendRequest(arg0) {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _cancelGameFriendRequest.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
}
};