decord/beta/source/modules/conversations/ConversationsAnalytics.tsx

240 lines
7.5 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 9341
// Function ID: 9342
// Name: ConversationsAnalytics
2026-10-12 16:32:48 +00:00
// Dependencies: [2065, 1085, 1265, 2]
2026-10-12 16:32:48 +00:00
// Module 9341 (ConversationsAnalytics)
2026-10-07 22:43:51 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-12 16:32:48 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
import ChannelStore from "ChannelStore" /* 2065 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
let obj = {
trackEntrypointImpression(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_ENTRYPOINT_IMPRESSION = AnalyticEvents.TOPICAL_NAV_ENTRYPOINT_IMPRESSION;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj2 = { conversation_count: channelId.conversationCount };
const merged = Object.assign(obj);
track(TOPICAL_NAV_ENTRYPOINT_IMPRESSION, obj2);
},
trackTopicsUnitImpression(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_TOPICS_UNIT_IMPRESSION = AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_IMPRESSION;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationIds: obj2.conversation_ids, isFocusMode: obj2.is_focus_mode } = channelId);
track(TOPICAL_NAV_TOPICS_UNIT_IMPRESSION, obj3);
},
trackPreviewImpression(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_PREVIEW_IMPRESSION = AnalyticEvents.TOPICAL_NAV_PREVIEW_IMPRESSION;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationId: obj2.conversation_id, isFocusMode: obj2.is_focus_mode } = channelId);
track(TOPICAL_NAV_PREVIEW_IMPRESSION, obj3);
},
trackTopicsUnitClicked(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_TOPICS_UNIT_CLICKED = AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_CLICKED;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationId: obj2.conversation_id, isFocusMode: obj2.is_focus_mode } = channelId);
track(TOPICAL_NAV_TOPICS_UNIT_CLICKED, obj3);
},
trackFocusModeImpression(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_FOCUS_MODE_IMPRESSION = AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_IMPRESSION;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj2 = { conversation_id: channelId.conversationId };
const merged = Object.assign(obj);
track(TOPICAL_NAV_FOCUS_MODE_IMPRESSION, obj2);
},
trackFocusModeDismissed(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_FOCUS_MODE_DISMISSED = AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_DISMISSED;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationId: obj2.conversation_id, dismissReason: obj2.dismiss_reason } = channelId);
track(TOPICAL_NAV_FOCUS_MODE_DISMISSED, obj3);
},
trackThumbsClicked(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_THUMBS_CLICKED = AnalyticEvents.TOPICAL_NAV_THUMBS_CLICKED;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationId: obj2.conversation_id, isThumbsUp: obj2.is_thumbs_up, isFocusMode: obj2.is_focus_mode } = channelId);
track(TOPICAL_NAV_THUMBS_CLICKED, obj3);
},
trackThumbsDownReasonSelected(channelId) {
2026-10-01 14:13:23 +00:00
let guild_id;
let type;
channelId = channelId.channelId;
2026-10-01 14:13:23 +00:00
const track = AnalyticsUtilsDefault.track;
const TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED = AnalyticEvents.TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId);
2026-10-01 14:13:23 +00:00
const obj = { channel_id: channelId, channel_type: type, guild_id };
type = undefined;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
2026-10-01 14:13:23 +00:00
guild_id = undefined;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-10-01 14:13:23 +00:00
const obj3 = {};
const merged = Object.assign(obj);
({ conversationId: obj2.conversation_id, isFocusMode: obj2.is_focus_mode, reasons: obj2.reasons, otherText: obj2.other_text } = channelId);
track(TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED, obj3);
}
};
2026-10-01 14:13:23 +00:00
const result = size.fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
export const ConversationsAnalytics = obj;