decord/alpha/source/actions/SurveyActionCreators.tsx

70 lines
2.6 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 16393
// Function ID: 16394
// Name: SurveyActionCreators
2026-10-12 06:59:38 +00:00
// Dependencies: [7472, 1085, 584, 1265, 5938, 1273, 2077, 1295, 2]
2026-10-03 08:58:59 +00:00
// Exports: overrideSurvey, surveyHide, surveySeen
2026-07-20 16:05:17 +00:00
2026-10-13 12:43:34 +00:00
// Module 16393 (SurveyActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-09 10:00:15 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
2026-10-10 08:08:14 +00:00
import TypeUtils from "TypeUtils" /* 2077 */;
import TrackedHTTPUtilsDefault from "TrackedHTTPUtils" /* 5938 */;
2026-10-12 06:59:38 +00:00
import SurveyStore2 from "SurveyStore" /* 7472 */;
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
const SurveyStore = SurveyStore2;
let _require;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let hasOwnProperty;
let metroImportDefault;
let metroRequire;
const SURVEY_REFETCH_INTERVAL = SurveyStore2.SURVEY_REFETCH_INTERVAL;
({ AnalyticEvents: hasOwnProperty, NoticeTypes: metroRequire, Endpoints: metroImportDefault } = Constants);
const result = size.fileFinishedImporting("actions/SurveyActionCreators.tsx");
export const overrideSurvey = function overrideSurvey(id, isActionTriggered) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "SURVEY_OVERRIDE", id, isActionTriggered };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
};
export const surveyHide = function surveyHide(key, dismissed) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "SURVEY_HIDE", key };
2026-10-03 08:58:59 +00:00
obj.dispatch(obj2);
const track = AnalyticsUtilsDefault.track;
2026-10-03 08:58:59 +00:00
AnalyticsUtilsDefault;
if (dismissed) {
2026-10-03 08:58:59 +00:00
const obj3 = { notice_type: metroRequire.SURVEY, survey_id: key, dismissed };
track(hasOwnProperty.APP_NOTICE_CLOSED, obj3);
2026-07-20 16:05:17 +00:00
} else {
2026-10-03 08:58:59 +00:00
const obj4 = { notice_type: metroRequire.SURVEY };
track(hasOwnProperty.APP_NOTICE_PRIMARY_CTA_OPENED, obj4);
2026-07-20 16:05:17 +00:00
}
};
export const surveySeen = function surveySeen(key) {
2026-10-03 08:58:59 +00:00
let obj5;
function properties() {
const obj = TypeUtils;
const obj2 = { key };
return obj.exact(obj2);
}
_require = key;
const lastSeenTimestamp = SurveyStore.getLastSeenTimestamp();
2026-07-20 16:05:17 +00:00
if (null !== lastSeenTimestamp) {
if (null != lastSeenTimestamp) {
const _Date = Date;
}
}
2026-10-03 08:58:59 +00:00
let obj = DispatcherDefault;
let obj2 = { type: "SURVEY_SEEN", key };
obj.dispatch(obj2);
const tmp5 = TrackedHTTPUtilsDefault;
const post = tmp5.post;
const obj3 = { url: closure_7.USER_SURVEY_SEEN(key), trackedActionData: { event: require("discord_common/AnalyticsUtils").NetworkActionNames.USER_SURVEY_SEEN, properties }, rejectWithError: obj5.rejectWithMigratedError() };
({ event: require("discord_common/AnalyticsUtils").NetworkActionNames.USER_SURVEY_SEEN, properties });
obj5 = require("HTTPUtils");
return post(obj3);
2026-07-20 16:05:17 +00:00
};