decord/beta/source/modules/interactions/InteractionActionCreators.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

47 lines
2.1 KiB
TypeScript

// Module ID: 7574
// Function ID: 7575
// Name: InteractionActionCreators
// Dependencies: [5, 1074, 573, 1271, 2]
// Exports: addQueued, fetchMessageInteractionData, queueInteractionComponentState, setFailed
// Module 7574 (InteractionActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import HTTPUtils from "HTTPUtils" /* 1271 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
require = fn;
let closure_5 = async function _fetchMessageInteractionData() {
closure_3 = tmp2;
closure_2 = tmp5;
closure_130_0 = closure_0;
closure_130_1 = closure_1;
const HTTP = HTTPUtils.HTTP;
await HTTP.get({ url: Endpoints.MESSAGE_INTERACTION_DATA(closure_0, closure_1), oldFormErrors: true, rejectWithError: HTTPUtils.rejectWithMigratedError() });
const body = arg1.body;
closure_131_1(closure_131_2[2]).dispatch({ type: "LOAD_MESSAGE_INTERACTION_DATA_SUCCESS", channelId: closure_130_0, messageId: closure_130_1, interactionData: body });
return body;
};
const Endpoints = fn(1074).Endpoints;
const size = fn(2);
const result = size.fileFinishedImporting("modules/interactions/InteractionActionCreators.tsx");
export const queueInteractionComponentState = function queueInteractionComponentState(messageId, nonce, state, componentId) {
DispatcherDefault.dispatch({ type: "QUEUE_INTERACTION_COMPONENT_STATE", messageId, nonce, state, componentId });
};
export const addQueued = function addQueued(nonce, arg1) {
({ data, messageId, preflight, onCreate, onSuccess, onFailure } = arg1);
DispatcherDefault.dispatch({ type: "INTERACTION_QUEUE", data, nonce, messageId, preflight, onCreate, onSuccess, onFailure });
};
export const setFailed = function setFailed(nonce, code, message, status) {
DispatcherDefault.dispatch({ type: "INTERACTION_FAILURE", nonce, errorMessage: message, errorCode: code, status });
};
export const fetchMessageInteractionData = function fetchMessageInteractionData() {
const self = this;
const apply = closure_5.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};