decord/alpha/source/actions/PruneGuildModalActionCreators.tsx

88 lines
2.8 KiB
TypeScript
Raw Normal View History

// Module ID: 16432
// Function ID: 16433
// Name: PruneGuildModalActionCreators
// Dependencies: [5, 1074, 1271, 2]
2026-07-20 16:05:17 +00:00
// Module 16432 (PruneGuildModalActionCreators)
import HTTPUtils from "HTTPUtils" /* 1271 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
2026-07-23 10:11:24 +00:00
require = fn;
const Endpoints = fn(1074).Endpoints;
const size = fn(2);
const result = size.fileFinishedImporting("actions/PruneGuildModalActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
updateEstimate(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
asyncGeneratorStep = arg2;
return (async () => {
const HTTP = v3(1271).HTTP;
const request = { url: Endpoints.GUILD_PRUNE(closure_0), query: { days: num, include_roles }, oldFormErrors: true, rejectWithError: v3(1271).rejectWithMigratedError() };
await HTTP.get(request);
2026-08-04 21:03:28 +00:00
return arg1.body.pruned;
2026-07-29 08:29:29 +00:00
})();
2026-07-20 16:05:17 +00:00
},
updateEstimateV2(id, arg1) {
2026-08-24 06:08:38 +00:00
closure_0 = id;
asyncGeneratorStep = arg2;
return (async (arg0, value) => {
if (v3 === 2) {
v3 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
2026-07-29 08:29:29 +00:00
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
2026-07-29 08:29:29 +00:00
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
v3 = 2;
2026-07-29 08:29:29 +00:00
if (0 === dependencyMap) {
if (arg0 === 1) {
v3 = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
v3 = 3;
const obj3 = { value, done: true };
return obj3;
2026-07-29 08:29:29 +00:00
} else {
const HTTP = v3(1271).HTTP;
const request = { url: Endpoints.GUILD_PRUNE_V2(closure_0), query: null, oldFormErrors: true, rejectWithError: null };
const obj4 = { days: num, include_roles };
request.query = obj4;
request.rejectWithError = v3(1271).rejectWithMigratedError();
2026-07-29 08:29:29 +00:00
dependencyMap = 1;
v3 = 1;
const obj5 = { value: HTTP.get(request), done: false };
return obj5;
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
v3 = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
v3 = 3;
const obj = { value, done: true };
2026-07-29 08:29:29 +00:00
return obj;
} else {
v3 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp5) {
v3 = tmp;
2026-07-29 08:29:29 +00:00
throw tmp5;
}
}
})();
2026-07-20 16:05:17 +00:00
},
prune(arg0, days, include_roles) {
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.GUILD_PRUNE(arg0), body: { days, compute_prune_count: false, include_roles }, oldFormErrors: true, rejectWithError: HTTPUtils.rejectWithMigratedError() };
return HTTP.post(request);
2026-07-20 16:05:17 +00:00
}
};