diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt index a590ac1..92c9035 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt @@ -49,31 +49,31 @@ data class Composer( val startsThread: Boolean? = null, ) : VectorAnalyticsEvent { - enum class MessageType { + enum class MessageType(val rawValue: String) { /** * A pin drop location message. */ - LocationPin, + LocationPin("LocationPin"), /** * A user current location message. */ - LocationUser, + LocationUser("LocationUser"), /** * A poll message. */ - Poll, + Poll("Poll"), /** * A text message. */ - Text, + Text("Text"), /** * A voice message. */ - VoiceMessage, + VoiceMessage("VoiceMessage"), } override fun getName() = "Composer" @@ -83,7 +83,7 @@ data class Composer( put("inThread", inThread) put("isEditing", isEditing) put("isReply", isReply) - put("messageType", messageType.name) + put("messageType", messageType.rawValue) startsThread?.let { put("startsThread", it) } }.takeIf { it.isNotEmpty() } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CryptoSessionStateChange.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CryptoSessionStateChange.kt index 3554882..24fe941 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CryptoSessionStateChange.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CryptoSessionStateChange.kt @@ -30,44 +30,44 @@ data class CryptoSessionStateChange( val verificationState: VerificationState, ) : VectorAnalyticsEvent { - enum class VerificationState { + enum class VerificationState(val rawValue: String) { /** * The device is unverified. */ - NotVerified, + NotVerified("NotVerified"), /** * The device is considered to be verified, it has been signed by its * user identity. */ - Verified, + Verified("Verified"), } - enum class RecoveryState { + enum class RecoveryState(val rawValue: String) { /** * No default secret storage key exists or it is disabled explicitly * using the account data event. */ - Disabled, + Disabled("Disabled"), /** * Secret storage is set up and we have all the secrets locally. */ - Enabled, + Enabled("Enabled"), /** * Secret storage is set up but we're missing some secrets. */ - Incomplete, + Incomplete("Incomplete"), } override fun getName() = "CryptoSessionState" override fun getProperties(): Map? { return mutableMapOf().apply { - put("recoveryState", recoveryState.name) - put("verificationState", verificationState.name) + put("recoveryState", recoveryState.rawValue) + put("verificationState", verificationState.rawValue) }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt index 868e89d..d83a244 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt @@ -70,104 +70,104 @@ data class Error( val wasVisibleToUser: Boolean? = null, ) : VectorAnalyticsEvent { - enum class Domain { - E2EE, - TO_DEVICE, - VOIP, + enum class Domain(val rawValue: String) { + E2EE("E2EE"), + TO_DEVICE("TO_DEVICE"), + VOIP("VOIP"), } - enum class Name { + enum class Name(val rawValue: String) { /** * E2EE domain error. Decryption failed for a message sent before you * were in the room (shared history visibility and support for sharing * past keys is not available/supported). */ - ExpectedDueToMembership, + ExpectedDueToMembership("ExpectedDueToMembership"), /** * E2EE domain error. Decryption failed for a message sent before the * device logged in, and key backup is not enabled. */ - HistoricalMessage, + HistoricalMessage("HistoricalMessage"), /** * E2EE domain error. The room key is known but is ratcheted (index > * 0). */ - OlmIndexError, + OlmIndexError("OlmIndexError"), /** * E2EE domain error. Generic unknown inbound group session error. */ - OlmKeysNotSentError, + OlmKeysNotSentError("OlmKeysNotSentError"), /** * E2EE domain error. Any other decryption error (missing field, format * errors...). */ - OlmUnspecifiedError, + OlmUnspecifiedError("OlmUnspecifiedError"), /** * TO_DEVICE domain error. The to-device message failed to decrypt. */ - ToDeviceFailedToDecrypt, + ToDeviceFailedToDecrypt("ToDeviceFailedToDecrypt"), /** * E2EE domain error. Decryption failed due to unknown error. */ - UnknownError, + UnknownError("UnknownError"), /** * VOIP domain error. ICE negotiation failed. */ - VoipIceFailed, + VoipIceFailed("VoipIceFailed"), /** * VOIP domain error. ICE negotiation timed out. */ - VoipIceTimeout, + VoipIceTimeout("VoipIceTimeout"), /** * VOIP domain error. The call invite timed out. */ - VoipInviteTimeout, + VoipInviteTimeout("VoipInviteTimeout"), /** * VOIP domain error. The user hung up the call. */ - VoipUserHangup, + VoipUserHangup("VoipUserHangup"), /** * VOIP domain error. The user's media failed to start. */ - VoipUserMediaFailed, + VoipUserMediaFailed("VoipUserMediaFailed"), } - enum class CryptoSDK { + enum class CryptoSDK(val rawValue: String) { /** * Legacy crypto backend specific to each platform. */ - Legacy, + Legacy("Legacy"), /** * Cross-platform crypto backend written in Rust. */ - Rust, + Rust("Rust"), } - enum class CryptoModule { + enum class CryptoModule(val rawValue: String) { /** * Native / legacy crypto module specific to each platform. */ - Native, + Native("Native"), /** * Shared / cross-platform crypto module written in Rust. */ - Rust, + Rust("Rust"), } override fun getName() = "Error" @@ -175,13 +175,13 @@ data class Error( override fun getProperties(): Map? { return mutableMapOf().apply { context?.let { put("context", it) } - cryptoModule?.let { put("cryptoModule", it.name) } - cryptoSDK?.let { put("cryptoSDK", it.name) } - put("domain", domain.name) + cryptoModule?.let { put("cryptoModule", it.rawValue) } + cryptoSDK?.let { put("cryptoSDK", it.rawValue) } + put("domain", domain.rawValue) eventLocalAgeMillis?.let { put("eventLocalAgeMillis", it) } isFederated?.let { put("isFederated", it) } isMatrixDotOrg?.let { put("isMatrixDotOrg", it) } - put("name", name.name) + put("name", name.rawValue) timeToDecryptMillis?.let { put("timeToDecryptMillis", it) } userTrustsOwnIdentity?.let { put("userTrustsOwnIdentity", it) } wasVisibleToUser?.let { put("wasVisibleToUser", it) } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt index 31032eb..bd42cd3 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt @@ -39,479 +39,479 @@ data class Interaction( val name: Name, ) : VectorAnalyticsEvent { - enum class Name { + enum class Name(val rawValue: String) { /** * User tapped the All filter in the All Chats filter tab. */ - MobileAllChatsFilterAll, + MobileAllChatsFilterAll("MobileAllChatsFilterAll"), /** * User tapped the Favourites filter in the All Chats filter tab. */ - MobileAllChatsFilterFavourites, + MobileAllChatsFilterFavourites("MobileAllChatsFilterFavourites"), /** * User tapped the People filter in the All Chats filter tab. */ - MobileAllChatsFilterPeople, + MobileAllChatsFilterPeople("MobileAllChatsFilterPeople"), /** * User tapped the Unreads filter in the All Chats filter tab. */ - MobileAllChatsFilterUnreads, + MobileAllChatsFilterUnreads("MobileAllChatsFilterUnreads"), /** * User disabled filters from the all chats layout settings. */ - MobileAllChatsFiltersDisabled, + MobileAllChatsFiltersDisabled("MobileAllChatsFiltersDisabled"), /** * User enabled filters from the all chats layout settings. */ - MobileAllChatsFiltersEnabled, + MobileAllChatsFiltersEnabled("MobileAllChatsFiltersEnabled"), /** * User disabled recents from the all chats layout settings. */ - MobileAllChatsRecentsDisabled, + MobileAllChatsRecentsDisabled("MobileAllChatsRecentsDisabled"), /** * User enabled recents from the all chats layout settings. */ - MobileAllChatsRecentsEnabled, + MobileAllChatsRecentsEnabled("MobileAllChatsRecentsEnabled"), /** * User tapped on Add to Home button on Room Details screen. */ - MobileRoomAddHome, + MobileRoomAddHome("MobileRoomAddHome"), /** * User switched the favourite toggle on Room Details screen. */ - MobileRoomFavouriteToggle, + MobileRoomFavouriteToggle("MobileRoomFavouriteToggle"), /** * User tapped on Leave Room button on Room Details screen. */ - MobileRoomLeave, + MobileRoomLeave("MobileRoomLeave"), /** * User adjusted their favourite rooms using the context menu on a room * in the room list. */ - MobileRoomListRoomContextMenuFavouriteToggle, + MobileRoomListRoomContextMenuFavouriteToggle("MobileRoomListRoomContextMenuFavouriteToggle"), /** * User adjusted their unread rooms using the context menu on a room in * the room list. */ - MobileRoomListRoomContextMenuUnreadToggle, + MobileRoomListRoomContextMenuUnreadToggle("MobileRoomListRoomContextMenuUnreadToggle"), /** * User tapped on Threads button on Room screen. */ - MobileRoomThreadListButton, + MobileRoomThreadListButton("MobileRoomThreadListButton"), /** * User tapped on a thread summary item on Room screen. */ - MobileRoomThreadSummaryItem, + MobileRoomThreadSummaryItem("MobileRoomThreadSummaryItem"), /** * User validated the creation of a new space. */ - MobileSpaceCreationValidated, + MobileSpaceCreationValidated("MobileSpaceCreationValidated"), /** * User tapped on the filter button on ThreadList screen. */ - MobileThreadListFilterItem, + MobileThreadListFilterItem("MobileThreadListFilterItem"), /** * User selected a thread on ThreadList screen. */ - MobileThreadListThreadItem, + MobileThreadListThreadItem("MobileThreadListThreadItem"), /** * User tapped the already selected space from the space list. */ - SpacePanelSelectedSpace, + SpacePanelSelectedSpace("SpacePanelSelectedSpace"), /** * User tapped an unselected space from the space list -> space * switching should occur. */ - SpacePanelSwitchSpace, + SpacePanelSwitchSpace("SpacePanelSwitchSpace"), /** * User tapped an unselected sub space from the space list -> space * switching should occur. */ - SpacePanelSwitchSubSpace, + SpacePanelSwitchSubSpace("SpacePanelSwitchSubSpace"), /** * User clicked the create room button in the add existing room to space * dialog in Element Web/Desktop. */ - WebAddExistingToSpaceDialogCreateRoomButton, + WebAddExistingToSpaceDialogCreateRoomButton("WebAddExistingToSpaceDialogCreateRoomButton"), /** * User clicked the create DM button in the home page of Element * Web/Desktop. */ - WebHomeCreateChatButton, + WebHomeCreateChatButton("WebHomeCreateChatButton"), /** * User clicked the create room button in the home page of Element * Web/Desktop. */ - WebHomeCreateRoomButton, + WebHomeCreateRoomButton("WebHomeCreateRoomButton"), /** * User clicked the explore rooms button in the home page of Element * Web/Desktop. */ - WebHomeExploreRoomsButton, + WebHomeExploreRoomsButton("WebHomeExploreRoomsButton"), /** * User clicked on the mini avatar uploader in the home page of Element * Web/Desktop. */ - WebHomeMiniAvatarUploadButton, + WebHomeMiniAvatarUploadButton("WebHomeMiniAvatarUploadButton"), /** * User clicked the explore rooms button next to the search field at the * top of the left panel in Element Web/Desktop. */ - WebLeftPanelExploreRoomsButton, + WebLeftPanelExploreRoomsButton("WebLeftPanelExploreRoomsButton"), /** * User clicked on the avatar uploader in the profile settings of * Element Web/Desktop. */ - WebProfileSettingsAvatarUploadButton, + WebProfileSettingsAvatarUploadButton("WebProfileSettingsAvatarUploadButton"), /** * User interacted with pin to sidebar checkboxes in the quick settings * menu of Element Web/Desktop. */ - WebQuickSettingsPinToSidebarCheckbox, + WebQuickSettingsPinToSidebarCheckbox("WebQuickSettingsPinToSidebarCheckbox"), /** * User interacted with the theme dropdown in the quick settings menu of * Element Web/Desktop. */ - WebQuickSettingsThemeDropdown, + WebQuickSettingsThemeDropdown("WebQuickSettingsThemeDropdown"), /** * User accessed the room invite flow using the button at the top of the * room member list in the right panel of Element Web/Desktop. */ - WebRightPanelMemberListInviteButton, + WebRightPanelMemberListInviteButton("WebRightPanelMemberListInviteButton"), /** * User accessed room member list using the 'People' button in the right * panel room summary card of Element Web/Desktop. */ - WebRightPanelRoomInfoPeopleButton, + WebRightPanelRoomInfoPeopleButton("WebRightPanelRoomInfoPeopleButton"), /** * User accessed room settings using the 'Settings' button in the right * panel room summary card of Element Web/Desktop. */ - WebRightPanelRoomInfoSettingsButton, + WebRightPanelRoomInfoSettingsButton("WebRightPanelRoomInfoSettingsButton"), /** * User accessed room member list using the back button in the right * panel user info card of Element Web/Desktop. */ - WebRightPanelRoomUserInfoBackButton, + WebRightPanelRoomUserInfoBackButton("WebRightPanelRoomUserInfoBackButton"), /** * User invited someone to room by clicking invite on the right panel * user info card in Element Web/Desktop. */ - WebRightPanelRoomUserInfoInviteButton, + WebRightPanelRoomUserInfoInviteButton("WebRightPanelRoomUserInfoInviteButton"), /** * User clicked the threads 'show' filter dropdown in the threads panel * in Element Web/Desktop. */ - WebRightPanelThreadPanelFilterDropdown, + WebRightPanelThreadPanelFilterDropdown("WebRightPanelThreadPanelFilterDropdown"), /** * User clicked the create room button in the room directory of Element * Web/Desktop. */ - WebRoomDirectoryCreateRoomButton, + WebRoomDirectoryCreateRoomButton("WebRoomDirectoryCreateRoomButton"), /** * User clicked the Threads button in the top right of a room in Element * Web/Desktop. */ - WebRoomHeaderButtonsThreadsButton, + WebRoomHeaderButtonsThreadsButton("WebRoomHeaderButtonsThreadsButton"), /** * User adjusted their favourites using the context menu on the header * of a room in Element Web/Desktop. */ - WebRoomHeaderContextMenuFavouriteToggle, + WebRoomHeaderContextMenuFavouriteToggle("WebRoomHeaderContextMenuFavouriteToggle"), /** * User accessed the room invite flow using the context menu on the * header of a room in Element Web/Desktop. */ - WebRoomHeaderContextMenuInviteItem, + WebRoomHeaderContextMenuInviteItem("WebRoomHeaderContextMenuInviteItem"), /** * User interacted with leave action in the context menu on the header * of a room in Element Web/Desktop. */ - WebRoomHeaderContextMenuLeaveItem, + WebRoomHeaderContextMenuLeaveItem("WebRoomHeaderContextMenuLeaveItem"), /** * User accessed their room notification settings via the context menu * on the header of a room in Element Web/Desktop. */ - WebRoomHeaderContextMenuNotificationsItem, + WebRoomHeaderContextMenuNotificationsItem("WebRoomHeaderContextMenuNotificationsItem"), /** * User accessed room member list using the context menu on the header * of a room in Element Web/Desktop. */ - WebRoomHeaderContextMenuPeopleItem, + WebRoomHeaderContextMenuPeopleItem("WebRoomHeaderContextMenuPeopleItem"), /** * User accessed room settings using the context menu on the header of a * room in Element Web/Desktop. */ - WebRoomHeaderContextMenuSettingsItem, + WebRoomHeaderContextMenuSettingsItem("WebRoomHeaderContextMenuSettingsItem"), /** * User clicked the create DM button in the + context menu of the room * list header in Element Web/Desktop. */ - WebRoomListHeaderPlusMenuCreateChatItem, + WebRoomListHeaderPlusMenuCreateChatItem("WebRoomListHeaderPlusMenuCreateChatItem"), /** * User clicked the create room button in the + context menu of the room * list header in Element Web/Desktop. */ - WebRoomListHeaderPlusMenuCreateRoomItem, + WebRoomListHeaderPlusMenuCreateRoomItem("WebRoomListHeaderPlusMenuCreateRoomItem"), /** * User clicked the explore rooms button in the + context menu of the * room list header in Element Web/Desktop. */ - WebRoomListHeaderPlusMenuExploreRoomsItem, + WebRoomListHeaderPlusMenuExploreRoomsItem("WebRoomListHeaderPlusMenuExploreRoomsItem"), /** * User adjusted their favourites using the context menu on a room tile * in the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuFavouriteToggle, + WebRoomListRoomTileContextMenuFavouriteToggle("WebRoomListRoomTileContextMenuFavouriteToggle"), /** * User accessed the room invite flow using the context menu on a room * tile in the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuInviteItem, + WebRoomListRoomTileContextMenuInviteItem("WebRoomListRoomTileContextMenuInviteItem"), /** * User interacted with leave action in the context menu on a room tile * in the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuLeaveItem, + WebRoomListRoomTileContextMenuLeaveItem("WebRoomListRoomTileContextMenuLeaveItem"), /** * User marked a message as read using the context menu on a room tile * in the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuMarkRead, + WebRoomListRoomTileContextMenuMarkRead("WebRoomListRoomTileContextMenuMarkRead"), /** * User marked a room as unread using the context menu on a room tile in * the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuMarkUnread, + WebRoomListRoomTileContextMenuMarkUnread("WebRoomListRoomTileContextMenuMarkUnread"), /** * User accessed room settings using the context menu on a room tile in * the room list in Element Web/Desktop. */ - WebRoomListRoomTileContextMenuSettingsItem, + WebRoomListRoomTileContextMenuSettingsItem("WebRoomListRoomTileContextMenuSettingsItem"), /** * User accessed their room notification settings via the context menu * on a room tile in the room list in Element Web/Desktop. */ - WebRoomListRoomTileNotificationsMenu, + WebRoomListRoomTileNotificationsMenu("WebRoomListRoomTileNotificationsMenu"), /** * User clicked the create DM button in the + context menu of the rooms * sublist in Element Web/Desktop. */ - WebRoomListRoomsSublistPlusMenuCreateChatItem, + WebRoomListRoomsSublistPlusMenuCreateChatItem("WebRoomListRoomsSublistPlusMenuCreateChatItem"), /** * User clicked the create room button in the + context menu of the * rooms sublist in Element Web/Desktop. */ - WebRoomListRoomsSublistPlusMenuCreateRoomItem, + WebRoomListRoomsSublistPlusMenuCreateRoomItem("WebRoomListRoomsSublistPlusMenuCreateRoomItem"), /** * User clicked the explore rooms button in the + context menu of the * rooms sublist in Element Web/Desktop. */ - WebRoomListRoomsSublistPlusMenuExploreRoomsItem, + WebRoomListRoomsSublistPlusMenuExploreRoomsItem("WebRoomListRoomsSublistPlusMenuExploreRoomsItem"), /** * User clicked on the button to return to the user onboarding list in * the room list in Element Web/Desktop. */ - WebRoomListUserOnboardingButton, + WebRoomListUserOnboardingButton("WebRoomListUserOnboardingButton"), /** * User clicked on the button to close the user onboarding button in the * room list in Element Web/Desktop. */ - WebRoomListUserOnboardingIgnoreButton, + WebRoomListUserOnboardingIgnoreButton("WebRoomListUserOnboardingIgnoreButton"), /** * User interacted with leave action in the general tab of the room * settings dialog in Element Web/Desktop. */ - WebRoomSettingsLeaveButton, + WebRoomSettingsLeaveButton("WebRoomSettingsLeaveButton"), /** * User interacted with the prompt to create a new room when adjusting * security settings in an existing room in Element Web/Desktop. */ - WebRoomSettingsSecurityTabCreateNewRoomButton, + WebRoomSettingsSecurityTabCreateNewRoomButton("WebRoomSettingsSecurityTabCreateNewRoomButton"), /** * User clicked a thread summary in the timeline of a room in Element * Web/Desktop. */ - WebRoomTimelineThreadSummaryButton, + WebRoomTimelineThreadSummaryButton("WebRoomTimelineThreadSummaryButton"), /** * User interacted with the theme radio selector in the Appearance tab * of Settings in Element Web/Desktop. */ - WebSettingsAppearanceTabThemeSelector, + WebSettingsAppearanceTabThemeSelector("WebSettingsAppearanceTabThemeSelector"), /** * User toggled the 'Notifications.showbold' in Element Web/Desktop. */ - WebSettingsNotificationsShowBoldToggle, + WebSettingsNotificationsShowBoldToggle("WebSettingsNotificationsShowBoldToggle"), /** * User toggled the 'Notifications.tac_only_notifications' in Element * Web/Desktop. */ - WebSettingsNotificationsTACOnlyNotificationsToggle, + WebSettingsNotificationsTACOnlyNotificationsToggle("WebSettingsNotificationsTACOnlyNotificationsToggle"), /** * User interacted with the pre-built space checkboxes in the Sidebar * tab of Settings in Element Web/Desktop. */ - WebSettingsSidebarTabSpacesCheckbox, + WebSettingsSidebarTabSpacesCheckbox("WebSettingsSidebarTabSpacesCheckbox"), /** * User clicked the explore rooms button in the context menu of a space * in Element Web/Desktop. */ - WebSpaceContextMenuExploreRoomsItem, + WebSpaceContextMenuExploreRoomsItem("WebSpaceContextMenuExploreRoomsItem"), /** * User clicked the home button in the context menu of a space in * Element Web/Desktop. */ - WebSpaceContextMenuHomeItem, + WebSpaceContextMenuHomeItem("WebSpaceContextMenuHomeItem"), /** * User clicked the new room button in the context menu of a space in * Element Web/Desktop. */ - WebSpaceContextMenuNewRoomItem, + WebSpaceContextMenuNewRoomItem("WebSpaceContextMenuNewRoomItem"), /** * User clicked the new room button in the context menu on the space * home in Element Web/Desktop. */ - WebSpaceHomeCreateRoomButton, + WebSpaceHomeCreateRoomButton("WebSpaceHomeCreateRoomButton"), /** * User clicked the back button on a Thread view going back to the * Threads Panel of Element Web/Desktop. */ - WebThreadViewBackButton, + WebThreadViewBackButton("WebThreadViewBackButton"), /** * User clicked on the Threads Activity Centre button of Element * Web/Desktop. */ - WebThreadsActivityCentreButton, + WebThreadsActivityCentreButton("WebThreadsActivityCentreButton"), /** * User clicked on a room in the Threads Activity Centre of Element * Web/Desktop. */ - WebThreadsActivityCentreRoomItem, + WebThreadsActivityCentreRoomItem("WebThreadsActivityCentreRoomItem"), /** * User clicked on the button to mark all threads in a room as read in * Element Web/Desktop. */ - WebThreadsMarkAllReadButton, + WebThreadsMarkAllReadButton("WebThreadsMarkAllReadButton"), /** * User selected a thread in the Threads panel in Element Web/Desktop. */ - WebThreadsPanelThreadItem, + WebThreadsPanelThreadItem("WebThreadsPanelThreadItem"), /** * User clicked the theme toggle button in the user menu of Element * Web/Desktop. */ - WebUserMenuThemeToggleButton, + WebUserMenuThemeToggleButton("WebUserMenuThemeToggleButton"), /** * User clicked on the send DM CTA in the header of the new user * onboarding page in Element Web/Desktop. */ - WebUserOnboardingHeaderSendDm, + WebUserOnboardingHeaderSendDm("WebUserOnboardingHeaderSendDm"), /** * User clicked on the action of the download apps task on the new user * onboarding page in Element Web/Desktop. */ - WebUserOnboardingTaskDownloadApps, + WebUserOnboardingTaskDownloadApps("WebUserOnboardingTaskDownloadApps"), /** * User clicked on the action of the enable notifications task on the * new user onboarding page in Element Web/Desktop. */ - WebUserOnboardingTaskEnableNotifications, + WebUserOnboardingTaskEnableNotifications("WebUserOnboardingTaskEnableNotifications"), /** * User clicked on the action of the find people task on the new user * onboarding page in Element Web/Desktop. */ - WebUserOnboardingTaskSendDm, + WebUserOnboardingTaskSendDm("WebUserOnboardingTaskSendDm"), /** * User clicked on the action of the your profile task on the new user * onboarding page in Element Web/Desktop. */ - WebUserOnboardingTaskSetupProfile, + WebUserOnboardingTaskSetupProfile("WebUserOnboardingTaskSetupProfile"), } - enum class InteractionType { - Keyboard, - Pointer, - Touch, + enum class InteractionType(val rawValue: String) { + Keyboard("Keyboard"), + Pointer("Pointer"), + Touch("Touch"), } override fun getName() = "Interaction" @@ -519,8 +519,8 @@ data class Interaction( override fun getProperties(): Map? { return mutableMapOf().apply { index?.let { put("index", it) } - interactionType?.let { put("interactionType", it.name) } - put("name", name.name) + interactionType?.let { put("interactionType", it.rawValue) } + put("name", name.rawValue) }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt index b076a07..939de67 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt @@ -43,55 +43,55 @@ data class JoinedRoom( val trigger: Trigger? = null, ) : VectorAnalyticsEvent { - enum class Trigger { + enum class Trigger(val rawValue: String) { /** * Room joined via an invite. */ - Invite, + Invite("Invite"), /** * Room joined via link. */ - MobilePermalink, + MobilePermalink("MobilePermalink"), /** * Room joined via a push/desktop notification. */ - Notification, + Notification("Notification"), /** * Room joined via the public rooms directory. */ - RoomDirectory, + RoomDirectory("RoomDirectory"), /** * Room joined via its preview. */ - RoomPreview, + RoomPreview("RoomPreview"), /** * Room joined via the /join slash command. */ - SlashCommand, + SlashCommand("SlashCommand"), /** * Room joined via the space hierarchy view. */ - SpaceHierarchy, + SpaceHierarchy("SpaceHierarchy"), /** * Room joined via a timeline pill or link in another room. */ - Timeline, + Timeline("Timeline"), } - enum class RoomSize { - ElevenToOneHundred, - MoreThanAThousand, - One, - OneHundredAndOneToAThousand, - ThreeToTen, - Two, + enum class RoomSize(val rawValue: String) { + ElevenToOneHundred("ElevenToOneHundred"), + MoreThanAThousand("MoreThanAThousand"), + One("One"), + OneHundredAndOneToAThousand("OneHundredAndOneToAThousand"), + ThreeToTen("ThreeToTen"), + Two("Two"), } override fun getName() = "JoinedRoom" @@ -100,8 +100,8 @@ data class JoinedRoom( return mutableMapOf().apply { put("isDM", isDM) put("isSpace", isSpace) - put("roomSize", roomSize.name) - trigger?.let { put("trigger", it.name) } + put("roomSize", roomSize.rawValue) + trigger?.let { put("trigger", it.rawValue) } }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt index d08b0d1..38f681e 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt @@ -32,318 +32,318 @@ data class MobileScreen( val screenName: ScreenName, ) : VectorAnalyticsScreen { - enum class ScreenName { + enum class ScreenName(val rawValue: String) { /** * The screen that displays the user's breadcrumbs. */ - Breadcrumbs, + Breadcrumbs("Breadcrumbs"), /** * The screen shown to create a poll. */ - CreatePollView, + CreatePollView("CreatePollView"), /** * The screen shown to create a new (non-direct) room. */ - CreateRoom, + CreateRoom("CreateRoom"), /** * The screen shown to create a new space. */ - CreateSpace, + CreateSpace("CreateSpace"), /** * The confirmation screen shown before deactivating an account. */ - DeactivateAccount, + DeactivateAccount("DeactivateAccount"), /** * The tab on mobile that displays the dialpad. */ - Dialpad, + Dialpad("Dialpad"), /** * The screen shown to edit a poll. */ - EditPollView, + EditPollView("EditPollView"), /** * The Favourites tab on mobile that lists your favourite people/rooms. */ - Favourites, + Favourites("Favourites"), /** * The form for the forgot password use case. */ - ForgotPassword, + ForgotPassword("ForgotPassword"), /** * Legacy: The screen that shows information about a specific group. */ - Group, + Group("Group"), /** * The Home tab on iOS | possibly the same on Android? */ - Home, + Home("Home"), /** * The screen shown to share a link to download the app. */ - InviteFriends, + InviteFriends("InviteFriends"), /** * Room accessed via space bottom sheet list. */ - Invites, + Invites("Invites"), /** * The screen shown to share location. */ - LocationSend, + LocationSend("LocationSend"), /** * The screen shown to view a shared location. */ - LocationView, + LocationView("LocationView"), /** * The screen that displays the login flow (when the user already has an * account). */ - Login, + Login("Login"), /** * Legacy: The screen that shows all groups/communities you have joined. */ - MyGroups, + MyGroups("MyGroups"), /** * The screen containing tests to help user to fix issues around * notifications. */ - NotificationTroubleshoot, + NotificationTroubleshoot("NotificationTroubleshoot"), /** * The People tab on mobile that lists all the DM rooms you have joined. */ - People, + People("People"), /** * The screen that displays the registration flow (when the user wants * to create an account). */ - Register, + Register("Register"), /** * The screen that displays the messages and events received in a room. */ - Room, + Room("Room"), /** * The room addresses screen shown from the Room Details screen. */ - RoomAddresses, + RoomAddresses("RoomAddresses"), /** * The screen shown when tapping the name of a room from the Room * screen. */ - RoomDetails, + RoomDetails("RoomDetails"), /** * The screen that lists public rooms for you to discover. */ - RoomDirectory, + RoomDirectory("RoomDirectory"), /** * The screen that lists all the user's rooms and let them filter the * rooms. */ - RoomFilter, + RoomFilter("RoomFilter"), /** * The screen that displays the list of members that are part of a room. */ - RoomMembers, + RoomMembers("RoomMembers"), /** * The notifications settings screen shown from the Room Details screen. */ - RoomNotifications, + RoomNotifications("RoomNotifications"), /** * The roles permissions screen shown from the Room Details screen. */ - RoomPermissions, + RoomPermissions("RoomPermissions"), /** * Screen that displays room preview if user hasn't joined yet. */ - RoomPreview, + RoomPreview("RoomPreview"), /** * The screen that allows you to search for messages/files in a specific * room. */ - RoomSearch, + RoomSearch("RoomSearch"), /** * The settings screen shown from the Room Details screen. */ - RoomSettings, + RoomSettings("RoomSettings"), /** * The screen that allows you to see all of the files sent in a specific * room. */ - RoomUploads, + RoomUploads("RoomUploads"), /** * The Rooms tab on mobile that lists all the (non-direct) rooms you've * joined. */ - Rooms, + Rooms("Rooms"), /** * The Files tab shown in the global search screen on Mobile. */ - SearchFiles, + SearchFiles("SearchFiles"), /** * The Messages tab shown in the global search screen on Mobile. */ - SearchMessages, + SearchMessages("SearchMessages"), /** * The People tab shown in the global search screen on Mobile. */ - SearchPeople, + SearchPeople("SearchPeople"), /** * The Rooms tab shown in the global search screen on Mobile. */ - SearchRooms, + SearchRooms("SearchRooms"), /** * The global settings screen shown in the app. */ - Settings, + Settings("Settings"), /** * The advanced settings screen (developer mode, rageshake, push * notification rules). */ - SettingsAdvanced, + SettingsAdvanced("SettingsAdvanced"), /** * The settings screen to change the default notification options. */ - SettingsDefaultNotifications, + SettingsDefaultNotifications("SettingsDefaultNotifications"), /** * The settings screen with general profile settings. */ - SettingsGeneral, + SettingsGeneral("SettingsGeneral"), /** * The Help and About screen. */ - SettingsHelp, + SettingsHelp("SettingsHelp"), /** * The settings screen with list of the ignored users. */ - SettingsIgnoredUsers, + SettingsIgnoredUsers("SettingsIgnoredUsers"), /** * The experimental features settings screen. */ - SettingsLabs, + SettingsLabs("SettingsLabs"), /** * The settings screen with legals information. */ - SettingsLegals, + SettingsLegals("SettingsLegals"), /** * The settings screen to manage notification mentions and keywords. */ - SettingsMentionsAndKeywords, + SettingsMentionsAndKeywords("SettingsMentionsAndKeywords"), /** * The notifications settings screen. */ - SettingsNotifications, + SettingsNotifications("SettingsNotifications"), /** * The preferences screen (theme, language, editor preferences, etc. */ - SettingsPreferences, + SettingsPreferences("SettingsPreferences"), /** * The global security settings screen. */ - SettingsSecurity, + SettingsSecurity("SettingsSecurity"), /** * The calls settings screen. */ - SettingsVoiceVideo, + SettingsVoiceVideo("SettingsVoiceVideo"), /** * The sidebar shown on mobile with spaces, settings etc. */ - Sidebar, + Sidebar("Sidebar"), /** * Room accessed via space bottom sheet list. */ - SpaceBottomSheet, + SpaceBottomSheet("SpaceBottomSheet"), /** * Screen that displays the list of rooms and spaces of a space. */ - SpaceExploreRooms, + SpaceExploreRooms("SpaceExploreRooms"), /** * Screen that displays the list of members of a space. */ - SpaceMembers, + SpaceMembers("SpaceMembers"), /** * The bottom sheet that list all space options. */ - SpaceMenu, + SpaceMenu("SpaceMenu"), /** * The screen shown to create a new direct room. */ - StartChat, + StartChat("StartChat"), /** * The screen shown to select which room directory you'd like to use. */ - SwitchDirectory, + SwitchDirectory("SwitchDirectory"), /** * Screen that displays list of threads for a room. */ - ThreadList, + ThreadList("ThreadList"), /** * A screen that shows information about a room member. */ - User, + User("User"), /** * The splash screen. */ - Welcome, + Welcome("Welcome"), } - override fun getName() = screenName.name + override fun getName() = screenName.rawValue override fun getProperties(): Map? { return mutableMapOf().apply { diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt index 2770d66..fa02e27 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt @@ -44,56 +44,56 @@ data class PerformanceTimer( val timeMs: Int, ) : VectorAnalyticsEvent { - enum class Name { + enum class Name(val rawValue: String) { /** * The time spent parsing the response from an initial /sync request. In * this case, `itemCount` should contain the number of joined rooms. */ - InitialSyncParsing, + InitialSyncParsing("InitialSyncParsing"), /** * The time spent waiting for a response to an initial /sync request. In * this case, `itemCount` should contain the number of joined rooms. */ - InitialSyncRequest, + InitialSyncRequest("InitialSyncRequest"), /** * The time taken to display an event in the timeline that was opened * from a notification. */ - NotificationsOpenEvent, + NotificationsOpenEvent("NotificationsOpenEvent"), /** * The duration of a regular /sync request when resuming the app. In * this case, `itemCount` should contain the number of joined rooms in * the response. */ - StartupIncrementalSync, + StartupIncrementalSync("StartupIncrementalSync"), /** * The duration of an initial /sync request during startup (if the store * has been wiped). In this case, `itemCount` should contain the number * of joined rooms. */ - StartupInitialSync, + StartupInitialSync("StartupInitialSync"), /** * How long the app launch screen is displayed for. */ - StartupLaunchScreen, + StartupLaunchScreen("StartupLaunchScreen"), /** * The time to preload data in the MXStore on iOS. In this case, * `itemCount` should contain the number of rooms in the store. */ - StartupStorePreload, + StartupStorePreload("StartupStorePreload"), /** * The time to load all data from the store (including * StartupStorePreload time). In this case, `itemCount` should contain * the number of rooms loaded into the session */ - StartupStoreReady, + StartupStoreReady("StartupStoreReady"), } override fun getName() = "PerformanceTimer" @@ -102,7 +102,7 @@ data class PerformanceTimer( return mutableMapOf().apply { context?.let { put("context", it) } itemCount?.let { put("itemCount", it) } - put("name", name.name) + put("name", name.rawValue) put("timeMs", timeMs) }.takeIf { it.isNotEmpty() } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt index 9f463a4..a96ca96 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt @@ -35,11 +35,11 @@ data class PermissionChanged( val permission: Permission, ) : VectorAnalyticsEvent { - enum class Permission { + enum class Permission(val rawValue: String) { /** * Permissions related to sending notifications have changed. */ - Notification, + Notification("Notification"), } override fun getName() = "PermissionChanged" @@ -47,7 +47,7 @@ data class PermissionChanged( override fun getProperties(): Map? { return mutableMapOf().apply { put("granted", granted) - put("permission", permission.name) + put("permission", permission.rawValue) }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt index c9ee1af..0fae61f 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt @@ -39,23 +39,23 @@ data class PollCreation( val numberOfAnswers: Int, ) : VectorAnalyticsEvent { - enum class Action { + enum class Action(val rawValue: String) { /** * Newly created poll. */ - Create, + Create("Create"), /** * Edit of an existing poll. */ - Edit, + Edit("Edit"), } override fun getName() = "PollCreation" override fun getProperties(): Map? { return mutableMapOf().apply { - put("action", action.name) + put("action", action.rawValue) put("isUndisclosed", isUndisclosed) put("numberOfAnswers", numberOfAnswers) }.takeIf { it.isNotEmpty() } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt index 7dd03ca..1e67968 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt @@ -36,102 +36,102 @@ data class RoomModeration( val role: Role? = null, ) : VectorAnalyticsEvent { - enum class Action { + enum class Action(val rawValue: String) { /** * Banned a room member. */ - BanMember, + BanMember("BanMember"), /** * Changed a room member's power level. */ - ChangeMemberRole, + ChangeMemberRole("ChangeMemberRole"), /** * Changed the power level required to ban room members. */ - ChangePermissionsBanMembers, + ChangePermissionsBanMembers("ChangePermissionsBanMembers"), /** * Changed the power level required to invite users to the room. */ - ChangePermissionsInviteUsers, + ChangePermissionsInviteUsers("ChangePermissionsInviteUsers"), /** * Changed the power level required to kick room members. */ - ChangePermissionsKickMembers, + ChangePermissionsKickMembers("ChangePermissionsKickMembers"), /** * Changed the power level required to redact messages in the room. */ - ChangePermissionsRedactMessages, + ChangePermissionsRedactMessages("ChangePermissionsRedactMessages"), /** * Changed the power level required to set the room's avatar. */ - ChangePermissionsRoomAvatar, + ChangePermissionsRoomAvatar("ChangePermissionsRoomAvatar"), /** * Changed the power level required to set the room's name. */ - ChangePermissionsRoomName, + ChangePermissionsRoomName("ChangePermissionsRoomName"), /** * Changed the power level required to set the room's topic. */ - ChangePermissionsRoomTopic, + ChangePermissionsRoomTopic("ChangePermissionsRoomTopic"), /** * Changed the power level required to send messages in the room. */ - ChangePermissionsSendMessages, + ChangePermissionsSendMessages("ChangePermissionsSendMessages"), /** * Kicked a room member. */ - KickMember, + KickMember("KickMember"), /** * Reset all of the room permissions back to their default values. */ - ResetPermissions, + ResetPermissions("ResetPermissions"), /** * Unbanned a room member. */ - UnbanMember, + UnbanMember("UnbanMember"), } - enum class Role { + enum class Role(val rawValue: String) { /** * A power level of 100. */ - Administrator, + Administrator("Administrator"), /** * A power level of 50. */ - Moderator, + Moderator("Moderator"), /** * Any other power level. */ - Other, + Other("Other"), /** * A power level of 0. */ - User, + User("User"), } override fun getName() = "RoomModeration" override fun getProperties(): Map? { return mutableMapOf().apply { - put("action", action.name) - role?.let { put("role", it.name) } + put("action", action.rawValue) + role?.let { put("role", it.rawValue) } }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt index 328340f..2e6571b 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt @@ -32,53 +32,53 @@ data class Signup( val authenticationType: AuthenticationType, ) : VectorAnalyticsEvent { - enum class AuthenticationType { + enum class AuthenticationType(val rawValue: String) { /** * Social login using Apple. */ - Apple, + Apple("Apple"), /** * Social login using Facebook. */ - Facebook, + Facebook("Facebook"), /** * Social login using GitHub. */ - GitHub, + GitHub("GitHub"), /** * Social login using GitLab. */ - GitLab, + GitLab("GitLab"), /** * Social login using Google. */ - Google, + Google("Google"), /** * Registration using some other mechanism such as fallback. */ - Other, + Other("Other"), /** * Registration with a username and password. */ - Password, + Password("Password"), /** * Registration using another SSO provider. */ - SSO, + SSO("SSO"), } override fun getName() = "Signup" override fun getProperties(): Map? { return mutableMapOf().apply { - put("authenticationType", authenticationType.name) + put("authenticationType", authenticationType.rawValue) }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt index 33d3545..47ce9ca 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt @@ -31,16 +31,16 @@ data class SlashCommand( val command: Command, ) : VectorAnalyticsEvent { - enum class Command { - Invite, - Part, + enum class Command(val rawValue: String) { + Invite("Invite"), + Part("Part"), } override fun getName() = "SlashCommand" override fun getProperties(): Map? { return mutableMapOf().apply { - put("command", command.name) + put("command", command.rawValue) }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt index 0d8169e..d3736b0 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt @@ -44,62 +44,62 @@ data class SuperProperties( val platformCodeName: PlatformCodeName? = null, ) { - enum class CryptoSDK { + enum class CryptoSDK(val rawValue: String) { /** * Legacy crypto backend specific to each platform. */ - Legacy, + Legacy("Legacy"), /** * Cross-platform crypto backend written in Rust. */ - Rust, + Rust("Rust"), } - enum class PlatformCodeName { + enum class PlatformCodeName(val rawValue: String) { /** * Element Desktop platform code. */ - Desktop, + Desktop("Desktop"), /** * Element Android platform code. */ - EA, + EA("EA"), /** * Element iOS platform code. */ - EI, + EI("EI"), /** * Element-X Android platform code. */ - EXA, + EXA("EXA"), /** * Element-X iOS platform code. */ - EXI, + EXI("EXI"), /** * Other Platform code. */ - Other, + Other("Other"), /** * Element Web platform code. */ - Web, + Web("Web"), } fun getProperties(): Map? { return mutableMapOf().apply { appPlatform?.let { put("appPlatform", it) } - cryptoSDK?.let { put("cryptoSDK", it.name) } + cryptoSDK?.let { put("cryptoSDK", it.rawValue) } cryptoSDKVersion?.let { put("cryptoSDKVersion", it) } - platformCodeName?.let { put("platformCodeName", it.name) } + platformCodeName?.let { put("platformCodeName", it.rawValue) } }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt index 56ef4af..5bab83a 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt @@ -47,17 +47,17 @@ data class UnauthenticatedError( val softLogout: Boolean, ) : VectorAnalyticsEvent { - enum class ErrorCode { - M_FORBIDDEN, - M_UNKNOWN, - M_UNKNOWN_TOKEN, + enum class ErrorCode(val rawValue: String) { + M_FORBIDDEN("M_FORBIDDEN"), + M_UNKNOWN("M_UNKNOWN"), + M_UNKNOWN_TOKEN("M_UNKNOWN_TOKEN"), } override fun getName() = "UnauthenticatedError" override fun getProperties(): Map? { return mutableMapOf().apply { - put("errorCode", errorCode.name) + put("errorCode", errorCode.rawValue) put("errorReason", errorReason) put("refreshTokenAuth", refreshTokenAuth) put("softLogout", softLogout) diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt index 4bcbae7..1cc72e2 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt @@ -52,92 +52,92 @@ data class UserProperties( val verificationState: VerificationState? = null, ) { - enum class FtueUseCaseSelection { + enum class FtueUseCaseSelection(val rawValue: String) { /** * The third option, Communities. */ - CommunityMessaging, + CommunityMessaging("CommunityMessaging"), /** * The first option, Friends and family. */ - PersonalMessaging, + PersonalMessaging("PersonalMessaging"), /** * The footer option to skip the question. */ - Skip, + Skip("Skip"), /** * The second option, Teams. */ - WorkMessaging, + WorkMessaging("WorkMessaging"), } - enum class AllChatsActiveFilter { + enum class AllChatsActiveFilter(val rawValue: String) { /** * Filters are activated and All is selected. */ - All, + All("All"), /** * Filters are activated and Favourites is selected. */ - Favourites, + Favourites("Favourites"), /** * Filters are activated and People is selected. */ - People, + People("People"), /** * Filters are activated and Unreads is selected. */ - Unreads, + Unreads("Unreads"), } - enum class VerificationState { + enum class VerificationState(val rawValue: String) { /** * The device is unverified. */ - NotVerified, + NotVerified("NotVerified"), /** * The device is considered to be verified, it has been signed by its * user identity. */ - Verified, + Verified("Verified"), } - enum class RecoveryState { + enum class RecoveryState(val rawValue: String) { /** * No default secret storage key exists or it is disabled explicitly * using the account data event. */ - Disabled, + Disabled("Disabled"), /** * Secret storage is set up and we have all the secrets locally. */ - Enabled, + Enabled("Enabled"), /** * Secret storage is set up but we're missing some secrets. */ - Incomplete, + Incomplete("Incomplete"), } fun getProperties(): Map? { return mutableMapOf().apply { - allChatsActiveFilter?.let { put("allChatsActiveFilter", it.name) } - ftueUseCaseSelection?.let { put("ftueUseCaseSelection", it.name) } + allChatsActiveFilter?.let { put("allChatsActiveFilter", it.rawValue) } + ftueUseCaseSelection?.let { put("ftueUseCaseSelection", it.rawValue) } numFavouriteRooms?.let { put("numFavouriteRooms", it) } numSpaces?.let { put("numSpaces", it) } - recoveryState?.let { put("recoveryState", it.name) } - verificationState?.let { put("verificationState", it.name) } + recoveryState?.let { put("recoveryState", it.rawValue) } + verificationState?.let { put("verificationState", it.rawValue) } }.takeIf { it.isNotEmpty() } } } diff --git a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt index 93c166d..1f15286 100644 --- a/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt +++ b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt @@ -47,265 +47,265 @@ data class ViewRoom( val viaKeyboard: Boolean? = null, ) : VectorAnalyticsEvent { - enum class Trigger { + enum class Trigger(val rawValue: String) { /** * Room accessed due to being just created. */ - Created, + Created("Created"), /** * Room switched due to user interacting with a message search result. */ - MessageSearch, + MessageSearch("MessageSearch"), /** * Room switched due to user selecting a user to go to a DM with. */ - MessageUser, + MessageUser("MessageUser"), /** * Room accessed via space explore. */ - MobileExploreRooms, + MobileExploreRooms("MobileExploreRooms"), /** * Room switched due to user interacting with a file search result. */ - MobileFileSearch, + MobileFileSearch("MobileFileSearch"), /** * Room accessed via interacting with the incall screen. */ - MobileInCall, + MobileInCall("MobileInCall"), /** * Room accessed during external sharing. */ - MobileLinkShare, + MobileLinkShare("MobileLinkShare"), /** * Room accessed via link. */ - MobilePermalink, + MobilePermalink("MobilePermalink"), /** * Room accessed via interacting with direct chat item in the room * contact detail screen. */ - MobileRoomMemberDetail, + MobileRoomMemberDetail("MobileRoomMemberDetail"), /** * Room accessed via preview. */ - MobileRoomPreview, + MobileRoomPreview("MobileRoomPreview"), /** * Room switched due to user interacting with a room search result. */ - MobileRoomSearch, + MobileRoomSearch("MobileRoomSearch"), /** * Room accessed via interacting with direct chat item in the search * contact detail screen. */ - MobileSearchContactDetail, + MobileSearchContactDetail("MobileSearchContactDetail"), /** * Room accessed via space bottom sheet list. */ - MobileSpaceBottomSheet, + MobileSpaceBottomSheet("MobileSpaceBottomSheet"), /** * Room accessed via interacting with direct chat item in the space * contact detail screen. */ - MobileSpaceMemberDetail, + MobileSpaceMemberDetail("MobileSpaceMemberDetail"), /** * Room accessed via space members list. */ - MobileSpaceMembers, + MobileSpaceMembers("MobileSpaceMembers"), /** * Space accessed via interacting with the space menu. */ - MobileSpaceMenu, + MobileSpaceMenu("MobileSpaceMenu"), /** * Space accessed via interacting with a space settings menu item. */ - MobileSpaceSettings, + MobileSpaceSettings("MobileSpaceSettings"), /** * Room accessed via a push/desktop notification. */ - Notification, + Notification("Notification"), /** * Room accessed via the predecessor link at the top of the upgraded * room. */ - Predecessor, + Predecessor("Predecessor"), /** * Room accessed via the public rooms directory. */ - RoomDirectory, + RoomDirectory("RoomDirectory"), /** * Room accessed via the room list. */ - RoomList, + RoomList("RoomList"), /** * Room accessed via a shortcut. */ - Shortcut, + Shortcut("Shortcut"), /** * Room accessed via a slash command in Element Web/Desktop like /goto. */ - SlashCommand, + SlashCommand("SlashCommand"), /** * Room accessed via the space hierarchy view. */ - SpaceHierarchy, + SpaceHierarchy("SpaceHierarchy"), /** * Room accessed via a timeline pill or link in another room. */ - Timeline, + Timeline("Timeline"), /** * Room accessed via a tombstone at the bottom of a predecessor room. */ - Tombstone, + Tombstone("Tombstone"), /** * Room switched due to user interacting with incoming verification * request. */ - VerificationRequest, + VerificationRequest("VerificationRequest"), /** * Room switched due to accepting a call in a different room in Element * Web/Desktop. */ - WebAcceptCall, + WebAcceptCall("WebAcceptCall"), /** * Room switched due to making a call via the dial pad in Element * Web/Desktop. */ - WebDialPad, + WebDialPad("WebDialPad"), /** * Room accessed via interacting with the floating call or Jitsi PIP in * Element Web/Desktop. */ - WebFloatingCallWindow, + WebFloatingCallWindow("WebFloatingCallWindow"), /** * Room accessed via the shortcut in Element Web/Desktop's forward * modal. */ - WebForwardShortcut, + WebForwardShortcut("WebForwardShortcut"), /** * Room accessed via the Element Web/Desktop horizontal breadcrumbs at * the top of the room list. */ - WebHorizontalBreadcrumbs, + WebHorizontalBreadcrumbs("WebHorizontalBreadcrumbs"), /** * Room accessed via an Element Web/Desktop keyboard shortcut like go to * next room with unread messages. */ - WebKeyboardShortcut, + WebKeyboardShortcut("WebKeyboardShortcut"), /** * Room accessed via Element Web/Desktop's notification panel. */ - WebNotificationPanel, + WebNotificationPanel("WebNotificationPanel"), /** * Room accessed via the predecessor link in Settings > Advanced in * Element Web/Desktop. */ - WebPredecessorSettings, + WebPredecessorSettings("WebPredecessorSettings"), /** * Room accessed via clicking on a notifications badge on a room list * sublist in Element Web/Desktop. */ - WebRoomListNotificationBadge, + WebRoomListNotificationBadge("WebRoomListNotificationBadge"), /** * Room switched due to the user changing space in Element Web/Desktop. */ - WebSpaceContextSwitch, + WebSpaceContextSwitch("WebSpaceContextSwitch"), /** * Room accessed via clicking on the notifications badge on the * currently selected space in Element Web/Desktop. */ - WebSpacePanelNotificationBadge, + WebSpacePanelNotificationBadge("WebSpacePanelNotificationBadge"), /** * Room accessed via interacting with the Threads Activity Centre in * Element Web/Desktop. */ - WebThreadsActivityCentre, + WebThreadsActivityCentre("WebThreadsActivityCentre"), /** * Room accessed via Element Web/Desktop's Unified Search modal. */ - WebUnifiedSearch, + WebUnifiedSearch("WebUnifiedSearch"), /** * Room accessed via the Element Web/Desktop vertical breadcrumb hover * menu. */ - WebVerticalBreadcrumbs, + WebVerticalBreadcrumbs("WebVerticalBreadcrumbs"), /** * Room switched due to widget interaction. */ - Widget, + Widget("Widget"), } - enum class ActiveSpace { + enum class ActiveSpace(val rawValue: String) { /** * Active space is Home. */ - Home, + Home("Home"), /** * Active space is a meta space. */ - Meta, + Meta("Meta"), /** * Active space is a private space. */ - Private, + Private("Private"), /** * Active space is a public space. */ - Public, + Public("Public"), } override fun getName() = "ViewRoom" override fun getProperties(): Map? { return mutableMapOf().apply { - activeSpace?.let { put("activeSpace", it.name) } + activeSpace?.let { put("activeSpace", it.rawValue) } isDM?.let { put("isDM", it) } isSpace?.let { put("isSpace", it) } - trigger?.let { put("trigger", it.name) } + trigger?.let { put("trigger", it.rawValue) } viaKeyboard?.let { put("viaKeyboard", it) } }.takeIf { it.isNotEmpty() } } diff --git a/stub-generator/matrix_analytics_stub_generator/kotlin.py b/stub-generator/matrix_analytics_stub_generator/kotlin.py index d9f1827..fc9554c 100644 --- a/stub-generator/matrix_analytics_stub_generator/kotlin.py +++ b/stub-generator/matrix_analytics_stub_generator/kotlin.py @@ -1,3 +1,4 @@ +import re from .schema import Schema, is_mobile_screen_event, first_letter_up, first_letter_down, split_text def compute_kotlin(schema: Schema) -> str: @@ -77,7 +78,7 @@ def compute_kotlin(schema: Schema) -> str: isFirstEnum = True for enum in schema.enums: result += "\n" - result += f" enum class {enum.name} " + "{\n" + result += f" enum class {enum.name}(val rawValue: String) " + "{\n" enum.values.sort() for value in enum.values: if value.description: @@ -86,13 +87,14 @@ def compute_kotlin(schema: Schema) -> str: result += f" /**\n" result += f"{split_text(' * ', value.description)}\n" result += f" */\n" - result += f" {value.name},\n" + validIdentifier = re.sub('[^a-zA-Z0-9_]', '', value.name) + result += f" {validIdentifier}(\"{value.name}\"),\n" isFirstEnum = False result += " }\n" - + if is_screen: result += "\n" - result += " override fun getName() = screenName.name\n" + result += " override fun getName() = screenName.rawValue\n" elif schema.event_name: result += "\n" result += f' override fun getName() = "{schema.event_name}"\n' @@ -114,12 +116,12 @@ def compute_kotlin(schema: Schema) -> str: continue if member.required: if member.enum: - result += f' put("{validName}", {member.name}.name)\n' + result += f' put("{validName}", {member.name}.rawValue)\n' else: result += f' put("{validName}", {member.name})\n' else: if member.enum: - result += ' %s?.let { put("%s", it.name) }\n' % ( + result += ' %s?.let { put("%s", it.rawValue) }\n' % ( validName, member.name, ) diff --git a/stub-generator/matrix_analytics_stub_generator/swift.py b/stub-generator/matrix_analytics_stub_generator/swift.py index 89f068a..ac34d28 100644 --- a/stub-generator/matrix_analytics_stub_generator/swift.py +++ b/stub-generator/matrix_analytics_stub_generator/swift.py @@ -1,3 +1,4 @@ +import re from .schema import Schema, Member, is_mobile_screen_event @@ -123,7 +124,8 @@ def compute_swift(schema: Schema) -> str: for value in enum.values: if value.description: result += f" /// {value.description}\n" - result += f" case {value.name}\n" + validIdentifier = re.sub('[^a-zA-Z0-9_]', '', value.name) + result += f" case {validIdentifier} = \"{value.name}\"\n" result += " }\n" # Properties dictionary diff --git a/types/swift/Composer.swift b/types/swift/Composer.swift index fe8aa70..bb67197 100644 --- a/types/swift/Composer.swift +++ b/types/swift/Composer.swift @@ -45,15 +45,15 @@ extension AnalyticsEvent { public enum MessageType: String { /// A pin drop location message. - case LocationPin + case LocationPin = "LocationPin" /// A user current location message. - case LocationUser + case LocationUser = "LocationUser" /// A poll message. - case Poll + case Poll = "Poll" /// A text message. - case Text + case Text = "Text" /// A voice message. - case VoiceMessage + case VoiceMessage = "VoiceMessage" } public var properties: [String: Any] { diff --git a/types/swift/CryptoSessionStateChange.swift b/types/swift/CryptoSessionStateChange.swift index 2609a3f..a6701f4 100644 --- a/types/swift/CryptoSessionStateChange.swift +++ b/types/swift/CryptoSessionStateChange.swift @@ -34,18 +34,18 @@ extension AnalyticsEvent { public enum VerificationState: String { /// The device is unverified. - case NotVerified + case NotVerified = "NotVerified" /// The device is considered to be verified, it has been signed by its user identity. - case Verified + case Verified = "Verified" } public enum RecoveryState: String { /// No default secret storage key exists or it is disabled explicitly using the account data event. - case Disabled + case Disabled = "Disabled" /// Secret storage is set up and we have all the secrets locally. - case Enabled + case Enabled = "Enabled" /// Secret storage is set up but we're missing some secrets. - case Incomplete + case Incomplete = "Incomplete" } public var properties: [String: Any] { diff --git a/types/swift/Error.swift b/types/swift/Error.swift index 8710643..7fa3da4 100644 --- a/types/swift/Error.swift +++ b/types/swift/Error.swift @@ -60,50 +60,50 @@ extension AnalyticsEvent { } public enum Domain: String { - case E2EE - case TO_DEVICE - case VOIP + case E2EE = "E2EE" + case TO_DEVICE = "TO_DEVICE" + case VOIP = "VOIP" } public enum Name: String { /// E2EE domain error. Decryption failed for a message sent before you were in the room (shared history visibility and support for sharing past keys is not available/supported). - case ExpectedDueToMembership + case ExpectedDueToMembership = "ExpectedDueToMembership" /// E2EE domain error. Decryption failed for a message sent before the device logged in, and key backup is not enabled. - case HistoricalMessage + case HistoricalMessage = "HistoricalMessage" /// E2EE domain error. The room key is known but is ratcheted (index > 0). - case OlmIndexError + case OlmIndexError = "OlmIndexError" /// E2EE domain error. Generic unknown inbound group session error. - case OlmKeysNotSentError + case OlmKeysNotSentError = "OlmKeysNotSentError" /// E2EE domain error. Any other decryption error (missing field, format errors...). - case OlmUnspecifiedError + case OlmUnspecifiedError = "OlmUnspecifiedError" /// TO_DEVICE domain error. The to-device message failed to decrypt. - case ToDeviceFailedToDecrypt + case ToDeviceFailedToDecrypt = "ToDeviceFailedToDecrypt" /// E2EE domain error. Decryption failed due to unknown error. - case UnknownError + case UnknownError = "UnknownError" /// VOIP domain error. ICE negotiation failed. - case VoipIceFailed + case VoipIceFailed = "VoipIceFailed" /// VOIP domain error. ICE negotiation timed out. - case VoipIceTimeout + case VoipIceTimeout = "VoipIceTimeout" /// VOIP domain error. The call invite timed out. - case VoipInviteTimeout + case VoipInviteTimeout = "VoipInviteTimeout" /// VOIP domain error. The user hung up the call. - case VoipUserHangup + case VoipUserHangup = "VoipUserHangup" /// VOIP domain error. The user's media failed to start. - case VoipUserMediaFailed + case VoipUserMediaFailed = "VoipUserMediaFailed" } public enum CryptoSDK: String { /// Legacy crypto backend specific to each platform. - case Legacy + case Legacy = "Legacy" /// Cross-platform crypto backend written in Rust. - case Rust + case Rust = "Rust" } public enum CryptoModule: String { /// Native / legacy crypto module specific to each platform. - case Native + case Native = "Native" /// Shared / cross-platform crypto module written in Rust. - case Rust + case Rust = "Rust" } public var properties: [String: Any] { diff --git a/types/swift/Interaction.swift b/types/swift/Interaction.swift index a62efa8..95d9e7d 100644 --- a/types/swift/Interaction.swift +++ b/types/swift/Interaction.swift @@ -39,173 +39,173 @@ extension AnalyticsEvent { public enum Name: String { /// User tapped the All filter in the All Chats filter tab. - case MobileAllChatsFilterAll + case MobileAllChatsFilterAll = "MobileAllChatsFilterAll" /// User tapped the Favourites filter in the All Chats filter tab. - case MobileAllChatsFilterFavourites + case MobileAllChatsFilterFavourites = "MobileAllChatsFilterFavourites" /// User tapped the People filter in the All Chats filter tab. - case MobileAllChatsFilterPeople + case MobileAllChatsFilterPeople = "MobileAllChatsFilterPeople" /// User tapped the Unreads filter in the All Chats filter tab. - case MobileAllChatsFilterUnreads + case MobileAllChatsFilterUnreads = "MobileAllChatsFilterUnreads" /// User disabled filters from the all chats layout settings. - case MobileAllChatsFiltersDisabled + case MobileAllChatsFiltersDisabled = "MobileAllChatsFiltersDisabled" /// User enabled filters from the all chats layout settings. - case MobileAllChatsFiltersEnabled + case MobileAllChatsFiltersEnabled = "MobileAllChatsFiltersEnabled" /// User disabled recents from the all chats layout settings. - case MobileAllChatsRecentsDisabled + case MobileAllChatsRecentsDisabled = "MobileAllChatsRecentsDisabled" /// User enabled recents from the all chats layout settings. - case MobileAllChatsRecentsEnabled + case MobileAllChatsRecentsEnabled = "MobileAllChatsRecentsEnabled" /// User tapped on Add to Home button on Room Details screen. - case MobileRoomAddHome + case MobileRoomAddHome = "MobileRoomAddHome" /// User switched the favourite toggle on Room Details screen. - case MobileRoomFavouriteToggle + case MobileRoomFavouriteToggle = "MobileRoomFavouriteToggle" /// User tapped on Leave Room button on Room Details screen. - case MobileRoomLeave + case MobileRoomLeave = "MobileRoomLeave" /// User adjusted their favourite rooms using the context menu on a room in the room list. - case MobileRoomListRoomContextMenuFavouriteToggle + case MobileRoomListRoomContextMenuFavouriteToggle = "MobileRoomListRoomContextMenuFavouriteToggle" /// User adjusted their unread rooms using the context menu on a room in the room list. - case MobileRoomListRoomContextMenuUnreadToggle + case MobileRoomListRoomContextMenuUnreadToggle = "MobileRoomListRoomContextMenuUnreadToggle" /// User tapped on Threads button on Room screen. - case MobileRoomThreadListButton + case MobileRoomThreadListButton = "MobileRoomThreadListButton" /// User tapped on a thread summary item on Room screen. - case MobileRoomThreadSummaryItem + case MobileRoomThreadSummaryItem = "MobileRoomThreadSummaryItem" /// User validated the creation of a new space. - case MobileSpaceCreationValidated + case MobileSpaceCreationValidated = "MobileSpaceCreationValidated" /// User tapped on the filter button on ThreadList screen. - case MobileThreadListFilterItem + case MobileThreadListFilterItem = "MobileThreadListFilterItem" /// User selected a thread on ThreadList screen. - case MobileThreadListThreadItem + case MobileThreadListThreadItem = "MobileThreadListThreadItem" /// User tapped the already selected space from the space list. - case SpacePanelSelectedSpace + case SpacePanelSelectedSpace = "SpacePanelSelectedSpace" /// User tapped an unselected space from the space list -> space switching should occur. - case SpacePanelSwitchSpace + case SpacePanelSwitchSpace = "SpacePanelSwitchSpace" /// User tapped an unselected sub space from the space list -> space switching should occur. - case SpacePanelSwitchSubSpace + case SpacePanelSwitchSubSpace = "SpacePanelSwitchSubSpace" /// User clicked the create room button in the add existing room to space dialog in Element Web/Desktop. - case WebAddExistingToSpaceDialogCreateRoomButton + case WebAddExistingToSpaceDialogCreateRoomButton = "WebAddExistingToSpaceDialogCreateRoomButton" /// User clicked the create DM button in the home page of Element Web/Desktop. - case WebHomeCreateChatButton + case WebHomeCreateChatButton = "WebHomeCreateChatButton" /// User clicked the create room button in the home page of Element Web/Desktop. - case WebHomeCreateRoomButton + case WebHomeCreateRoomButton = "WebHomeCreateRoomButton" /// User clicked the explore rooms button in the home page of Element Web/Desktop. - case WebHomeExploreRoomsButton + case WebHomeExploreRoomsButton = "WebHomeExploreRoomsButton" /// User clicked on the mini avatar uploader in the home page of Element Web/Desktop. - case WebHomeMiniAvatarUploadButton + case WebHomeMiniAvatarUploadButton = "WebHomeMiniAvatarUploadButton" /// User clicked the explore rooms button next to the search field at the top of the left panel in Element Web/Desktop. - case WebLeftPanelExploreRoomsButton + case WebLeftPanelExploreRoomsButton = "WebLeftPanelExploreRoomsButton" /// User clicked on the avatar uploader in the profile settings of Element Web/Desktop. - case WebProfileSettingsAvatarUploadButton + case WebProfileSettingsAvatarUploadButton = "WebProfileSettingsAvatarUploadButton" /// User interacted with pin to sidebar checkboxes in the quick settings menu of Element Web/Desktop. - case WebQuickSettingsPinToSidebarCheckbox + case WebQuickSettingsPinToSidebarCheckbox = "WebQuickSettingsPinToSidebarCheckbox" /// User interacted with the theme dropdown in the quick settings menu of Element Web/Desktop. - case WebQuickSettingsThemeDropdown + case WebQuickSettingsThemeDropdown = "WebQuickSettingsThemeDropdown" /// User accessed the room invite flow using the button at the top of the room member list in the right panel of Element Web/Desktop. - case WebRightPanelMemberListInviteButton + case WebRightPanelMemberListInviteButton = "WebRightPanelMemberListInviteButton" /// User accessed room member list using the 'People' button in the right panel room summary card of Element Web/Desktop. - case WebRightPanelRoomInfoPeopleButton + case WebRightPanelRoomInfoPeopleButton = "WebRightPanelRoomInfoPeopleButton" /// User accessed room settings using the 'Settings' button in the right panel room summary card of Element Web/Desktop. - case WebRightPanelRoomInfoSettingsButton + case WebRightPanelRoomInfoSettingsButton = "WebRightPanelRoomInfoSettingsButton" /// User accessed room member list using the back button in the right panel user info card of Element Web/Desktop. - case WebRightPanelRoomUserInfoBackButton + case WebRightPanelRoomUserInfoBackButton = "WebRightPanelRoomUserInfoBackButton" /// User invited someone to room by clicking invite on the right panel user info card in Element Web/Desktop. - case WebRightPanelRoomUserInfoInviteButton + case WebRightPanelRoomUserInfoInviteButton = "WebRightPanelRoomUserInfoInviteButton" /// User clicked the threads 'show' filter dropdown in the threads panel in Element Web/Desktop. - case WebRightPanelThreadPanelFilterDropdown + case WebRightPanelThreadPanelFilterDropdown = "WebRightPanelThreadPanelFilterDropdown" /// User clicked the create room button in the room directory of Element Web/Desktop. - case WebRoomDirectoryCreateRoomButton + case WebRoomDirectoryCreateRoomButton = "WebRoomDirectoryCreateRoomButton" /// User clicked the Threads button in the top right of a room in Element Web/Desktop. - case WebRoomHeaderButtonsThreadsButton + case WebRoomHeaderButtonsThreadsButton = "WebRoomHeaderButtonsThreadsButton" /// User adjusted their favourites using the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuFavouriteToggle + case WebRoomHeaderContextMenuFavouriteToggle = "WebRoomHeaderContextMenuFavouriteToggle" /// User accessed the room invite flow using the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuInviteItem + case WebRoomHeaderContextMenuInviteItem = "WebRoomHeaderContextMenuInviteItem" /// User interacted with leave action in the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuLeaveItem + case WebRoomHeaderContextMenuLeaveItem = "WebRoomHeaderContextMenuLeaveItem" /// User accessed their room notification settings via the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuNotificationsItem + case WebRoomHeaderContextMenuNotificationsItem = "WebRoomHeaderContextMenuNotificationsItem" /// User accessed room member list using the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuPeopleItem + case WebRoomHeaderContextMenuPeopleItem = "WebRoomHeaderContextMenuPeopleItem" /// User accessed room settings using the context menu on the header of a room in Element Web/Desktop. - case WebRoomHeaderContextMenuSettingsItem + case WebRoomHeaderContextMenuSettingsItem = "WebRoomHeaderContextMenuSettingsItem" /// User clicked the create DM button in the + context menu of the room list header in Element Web/Desktop. - case WebRoomListHeaderPlusMenuCreateChatItem + case WebRoomListHeaderPlusMenuCreateChatItem = "WebRoomListHeaderPlusMenuCreateChatItem" /// User clicked the create room button in the + context menu of the room list header in Element Web/Desktop. - case WebRoomListHeaderPlusMenuCreateRoomItem + case WebRoomListHeaderPlusMenuCreateRoomItem = "WebRoomListHeaderPlusMenuCreateRoomItem" /// User clicked the explore rooms button in the + context menu of the room list header in Element Web/Desktop. - case WebRoomListHeaderPlusMenuExploreRoomsItem + case WebRoomListHeaderPlusMenuExploreRoomsItem = "WebRoomListHeaderPlusMenuExploreRoomsItem" /// User adjusted their favourites using the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuFavouriteToggle + case WebRoomListRoomTileContextMenuFavouriteToggle = "WebRoomListRoomTileContextMenuFavouriteToggle" /// User accessed the room invite flow using the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuInviteItem + case WebRoomListRoomTileContextMenuInviteItem = "WebRoomListRoomTileContextMenuInviteItem" /// User interacted with leave action in the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuLeaveItem + case WebRoomListRoomTileContextMenuLeaveItem = "WebRoomListRoomTileContextMenuLeaveItem" /// User marked a message as read using the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuMarkRead + case WebRoomListRoomTileContextMenuMarkRead = "WebRoomListRoomTileContextMenuMarkRead" /// User marked a room as unread using the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuMarkUnread + case WebRoomListRoomTileContextMenuMarkUnread = "WebRoomListRoomTileContextMenuMarkUnread" /// User accessed room settings using the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileContextMenuSettingsItem + case WebRoomListRoomTileContextMenuSettingsItem = "WebRoomListRoomTileContextMenuSettingsItem" /// User accessed their room notification settings via the context menu on a room tile in the room list in Element Web/Desktop. - case WebRoomListRoomTileNotificationsMenu + case WebRoomListRoomTileNotificationsMenu = "WebRoomListRoomTileNotificationsMenu" /// User clicked the create DM button in the + context menu of the rooms sublist in Element Web/Desktop. - case WebRoomListRoomsSublistPlusMenuCreateChatItem + case WebRoomListRoomsSublistPlusMenuCreateChatItem = "WebRoomListRoomsSublistPlusMenuCreateChatItem" /// User clicked the create room button in the + context menu of the rooms sublist in Element Web/Desktop. - case WebRoomListRoomsSublistPlusMenuCreateRoomItem + case WebRoomListRoomsSublistPlusMenuCreateRoomItem = "WebRoomListRoomsSublistPlusMenuCreateRoomItem" /// User clicked the explore rooms button in the + context menu of the rooms sublist in Element Web/Desktop. - case WebRoomListRoomsSublistPlusMenuExploreRoomsItem + case WebRoomListRoomsSublistPlusMenuExploreRoomsItem = "WebRoomListRoomsSublistPlusMenuExploreRoomsItem" /// User clicked on the button to return to the user onboarding list in the room list in Element Web/Desktop. - case WebRoomListUserOnboardingButton + case WebRoomListUserOnboardingButton = "WebRoomListUserOnboardingButton" /// User clicked on the button to close the user onboarding button in the room list in Element Web/Desktop. - case WebRoomListUserOnboardingIgnoreButton + case WebRoomListUserOnboardingIgnoreButton = "WebRoomListUserOnboardingIgnoreButton" /// User interacted with leave action in the general tab of the room settings dialog in Element Web/Desktop. - case WebRoomSettingsLeaveButton + case WebRoomSettingsLeaveButton = "WebRoomSettingsLeaveButton" /// User interacted with the prompt to create a new room when adjusting security settings in an existing room in Element Web/Desktop. - case WebRoomSettingsSecurityTabCreateNewRoomButton + case WebRoomSettingsSecurityTabCreateNewRoomButton = "WebRoomSettingsSecurityTabCreateNewRoomButton" /// User clicked a thread summary in the timeline of a room in Element Web/Desktop. - case WebRoomTimelineThreadSummaryButton + case WebRoomTimelineThreadSummaryButton = "WebRoomTimelineThreadSummaryButton" /// User interacted with the theme radio selector in the Appearance tab of Settings in Element Web/Desktop. - case WebSettingsAppearanceTabThemeSelector + case WebSettingsAppearanceTabThemeSelector = "WebSettingsAppearanceTabThemeSelector" /// User toggled the 'Notifications.showbold' in Element Web/Desktop. - case WebSettingsNotificationsShowBoldToggle + case WebSettingsNotificationsShowBoldToggle = "WebSettingsNotificationsShowBoldToggle" /// User toggled the 'Notifications.tac_only_notifications' in Element Web/Desktop. - case WebSettingsNotificationsTACOnlyNotificationsToggle + case WebSettingsNotificationsTACOnlyNotificationsToggle = "WebSettingsNotificationsTACOnlyNotificationsToggle" /// User interacted with the pre-built space checkboxes in the Sidebar tab of Settings in Element Web/Desktop. - case WebSettingsSidebarTabSpacesCheckbox + case WebSettingsSidebarTabSpacesCheckbox = "WebSettingsSidebarTabSpacesCheckbox" /// User clicked the explore rooms button in the context menu of a space in Element Web/Desktop. - case WebSpaceContextMenuExploreRoomsItem + case WebSpaceContextMenuExploreRoomsItem = "WebSpaceContextMenuExploreRoomsItem" /// User clicked the home button in the context menu of a space in Element Web/Desktop. - case WebSpaceContextMenuHomeItem + case WebSpaceContextMenuHomeItem = "WebSpaceContextMenuHomeItem" /// User clicked the new room button in the context menu of a space in Element Web/Desktop. - case WebSpaceContextMenuNewRoomItem + case WebSpaceContextMenuNewRoomItem = "WebSpaceContextMenuNewRoomItem" /// User clicked the new room button in the context menu on the space home in Element Web/Desktop. - case WebSpaceHomeCreateRoomButton + case WebSpaceHomeCreateRoomButton = "WebSpaceHomeCreateRoomButton" /// User clicked the back button on a Thread view going back to the Threads Panel of Element Web/Desktop. - case WebThreadViewBackButton + case WebThreadViewBackButton = "WebThreadViewBackButton" /// User clicked on the Threads Activity Centre button of Element Web/Desktop. - case WebThreadsActivityCentreButton + case WebThreadsActivityCentreButton = "WebThreadsActivityCentreButton" /// User clicked on a room in the Threads Activity Centre of Element Web/Desktop. - case WebThreadsActivityCentreRoomItem + case WebThreadsActivityCentreRoomItem = "WebThreadsActivityCentreRoomItem" /// User clicked on the button to mark all threads in a room as read in Element Web/Desktop. - case WebThreadsMarkAllReadButton + case WebThreadsMarkAllReadButton = "WebThreadsMarkAllReadButton" /// User selected a thread in the Threads panel in Element Web/Desktop. - case WebThreadsPanelThreadItem + case WebThreadsPanelThreadItem = "WebThreadsPanelThreadItem" /// User clicked the theme toggle button in the user menu of Element Web/Desktop. - case WebUserMenuThemeToggleButton + case WebUserMenuThemeToggleButton = "WebUserMenuThemeToggleButton" /// User clicked on the send DM CTA in the header of the new user onboarding page in Element Web/Desktop. - case WebUserOnboardingHeaderSendDm + case WebUserOnboardingHeaderSendDm = "WebUserOnboardingHeaderSendDm" /// User clicked on the action of the download apps task on the new user onboarding page in Element Web/Desktop. - case WebUserOnboardingTaskDownloadApps + case WebUserOnboardingTaskDownloadApps = "WebUserOnboardingTaskDownloadApps" /// User clicked on the action of the enable notifications task on the new user onboarding page in Element Web/Desktop. - case WebUserOnboardingTaskEnableNotifications + case WebUserOnboardingTaskEnableNotifications = "WebUserOnboardingTaskEnableNotifications" /// User clicked on the action of the find people task on the new user onboarding page in Element Web/Desktop. - case WebUserOnboardingTaskSendDm + case WebUserOnboardingTaskSendDm = "WebUserOnboardingTaskSendDm" /// User clicked on the action of the your profile task on the new user onboarding page in Element Web/Desktop. - case WebUserOnboardingTaskSetupProfile + case WebUserOnboardingTaskSetupProfile = "WebUserOnboardingTaskSetupProfile" } public enum InteractionType: String { - case Keyboard - case Pointer - case Touch + case Keyboard = "Keyboard" + case Pointer = "Pointer" + case Touch = "Touch" } public var properties: [String: Any] { diff --git a/types/swift/JoinedRoom.swift b/types/swift/JoinedRoom.swift index 0419884..db2e81f 100644 --- a/types/swift/JoinedRoom.swift +++ b/types/swift/JoinedRoom.swift @@ -42,30 +42,30 @@ extension AnalyticsEvent { public enum Trigger: String { /// Room joined via an invite. - case Invite + case Invite = "Invite" /// Room joined via link. - case MobilePermalink + case MobilePermalink = "MobilePermalink" /// Room joined via a push/desktop notification. - case Notification + case Notification = "Notification" /// Room joined via the public rooms directory. - case RoomDirectory + case RoomDirectory = "RoomDirectory" /// Room joined via its preview. - case RoomPreview + case RoomPreview = "RoomPreview" /// Room joined via the /join slash command. - case SlashCommand + case SlashCommand = "SlashCommand" /// Room joined via the space hierarchy view. - case SpaceHierarchy + case SpaceHierarchy = "SpaceHierarchy" /// Room joined via a timeline pill or link in another room. - case Timeline + case Timeline = "Timeline" } public enum RoomSize: String { - case ElevenToOneHundred - case MoreThanAThousand - case One - case OneHundredAndOneToAThousand - case ThreeToTen - case Two + case ElevenToOneHundred = "ElevenToOneHundred" + case MoreThanAThousand = "MoreThanAThousand" + case One = "One" + case OneHundredAndOneToAThousand = "OneHundredAndOneToAThousand" + case ThreeToTen = "ThreeToTen" + case Two = "Two" } public var properties: [String: Any] { diff --git a/types/swift/MobileScreen.swift b/types/swift/MobileScreen.swift index 0d0d2e9..3005247 100644 --- a/types/swift/MobileScreen.swift +++ b/types/swift/MobileScreen.swift @@ -34,125 +34,125 @@ extension AnalyticsEvent { public enum ScreenName: String { /// The screen that displays the user's breadcrumbs. - case Breadcrumbs + case Breadcrumbs = "Breadcrumbs" /// The screen shown to create a poll. - case CreatePollView + case CreatePollView = "CreatePollView" /// The screen shown to create a new (non-direct) room. - case CreateRoom + case CreateRoom = "CreateRoom" /// The screen shown to create a new space. - case CreateSpace + case CreateSpace = "CreateSpace" /// The confirmation screen shown before deactivating an account. - case DeactivateAccount + case DeactivateAccount = "DeactivateAccount" /// The tab on mobile that displays the dialpad. - case Dialpad + case Dialpad = "Dialpad" /// The screen shown to edit a poll. - case EditPollView + case EditPollView = "EditPollView" /// The Favourites tab on mobile that lists your favourite people/rooms. - case Favourites + case Favourites = "Favourites" /// The form for the forgot password use case. - case ForgotPassword + case ForgotPassword = "ForgotPassword" /// Legacy: The screen that shows information about a specific group. - case Group + case Group = "Group" /// The Home tab on iOS | possibly the same on Android? - case Home + case Home = "Home" /// The screen shown to share a link to download the app. - case InviteFriends + case InviteFriends = "InviteFriends" /// Room accessed via space bottom sheet list. - case Invites + case Invites = "Invites" /// The screen shown to share location. - case LocationSend + case LocationSend = "LocationSend" /// The screen shown to view a shared location. - case LocationView + case LocationView = "LocationView" /// The screen that displays the login flow (when the user already has an account). - case Login + case Login = "Login" /// Legacy: The screen that shows all groups/communities you have joined. - case MyGroups + case MyGroups = "MyGroups" /// The screen containing tests to help user to fix issues around notifications. - case NotificationTroubleshoot + case NotificationTroubleshoot = "NotificationTroubleshoot" /// The People tab on mobile that lists all the DM rooms you have joined. - case People + case People = "People" /// The screen that displays the registration flow (when the user wants to create an account). - case Register + case Register = "Register" /// The screen that displays the messages and events received in a room. - case Room + case Room = "Room" /// The room addresses screen shown from the Room Details screen. - case RoomAddresses + case RoomAddresses = "RoomAddresses" /// The screen shown when tapping the name of a room from the Room screen. - case RoomDetails + case RoomDetails = "RoomDetails" /// The screen that lists public rooms for you to discover. - case RoomDirectory + case RoomDirectory = "RoomDirectory" /// The screen that lists all the user's rooms and let them filter the rooms. - case RoomFilter + case RoomFilter = "RoomFilter" /// The screen that displays the list of members that are part of a room. - case RoomMembers + case RoomMembers = "RoomMembers" /// The notifications settings screen shown from the Room Details screen. - case RoomNotifications + case RoomNotifications = "RoomNotifications" /// The roles permissions screen shown from the Room Details screen. - case RoomPermissions + case RoomPermissions = "RoomPermissions" /// Screen that displays room preview if user hasn't joined yet. - case RoomPreview + case RoomPreview = "RoomPreview" /// The screen that allows you to search for messages/files in a specific room. - case RoomSearch + case RoomSearch = "RoomSearch" /// The settings screen shown from the Room Details screen. - case RoomSettings + case RoomSettings = "RoomSettings" /// The screen that allows you to see all of the files sent in a specific room. - case RoomUploads + case RoomUploads = "RoomUploads" /// The Rooms tab on mobile that lists all the (non-direct) rooms you've joined. - case Rooms + case Rooms = "Rooms" /// The Files tab shown in the global search screen on Mobile. - case SearchFiles + case SearchFiles = "SearchFiles" /// The Messages tab shown in the global search screen on Mobile. - case SearchMessages + case SearchMessages = "SearchMessages" /// The People tab shown in the global search screen on Mobile. - case SearchPeople + case SearchPeople = "SearchPeople" /// The Rooms tab shown in the global search screen on Mobile. - case SearchRooms + case SearchRooms = "SearchRooms" /// The global settings screen shown in the app. - case Settings + case Settings = "Settings" /// The advanced settings screen (developer mode, rageshake, push notification rules). - case SettingsAdvanced + case SettingsAdvanced = "SettingsAdvanced" /// The settings screen to change the default notification options. - case SettingsDefaultNotifications + case SettingsDefaultNotifications = "SettingsDefaultNotifications" /// The settings screen with general profile settings. - case SettingsGeneral + case SettingsGeneral = "SettingsGeneral" /// The Help and About screen. - case SettingsHelp + case SettingsHelp = "SettingsHelp" /// The settings screen with list of the ignored users. - case SettingsIgnoredUsers + case SettingsIgnoredUsers = "SettingsIgnoredUsers" /// The experimental features settings screen. - case SettingsLabs + case SettingsLabs = "SettingsLabs" /// The settings screen with legals information. - case SettingsLegals + case SettingsLegals = "SettingsLegals" /// The settings screen to manage notification mentions and keywords. - case SettingsMentionsAndKeywords + case SettingsMentionsAndKeywords = "SettingsMentionsAndKeywords" /// The notifications settings screen. - case SettingsNotifications + case SettingsNotifications = "SettingsNotifications" /// The preferences screen (theme, language, editor preferences, etc. - case SettingsPreferences + case SettingsPreferences = "SettingsPreferences" /// The global security settings screen. - case SettingsSecurity + case SettingsSecurity = "SettingsSecurity" /// The calls settings screen. - case SettingsVoiceVideo + case SettingsVoiceVideo = "SettingsVoiceVideo" /// The sidebar shown on mobile with spaces, settings etc. - case Sidebar + case Sidebar = "Sidebar" /// Room accessed via space bottom sheet list. - case SpaceBottomSheet + case SpaceBottomSheet = "SpaceBottomSheet" /// Screen that displays the list of rooms and spaces of a space. - case SpaceExploreRooms + case SpaceExploreRooms = "SpaceExploreRooms" /// Screen that displays the list of members of a space. - case SpaceMembers + case SpaceMembers = "SpaceMembers" /// The bottom sheet that list all space options. - case SpaceMenu + case SpaceMenu = "SpaceMenu" /// The screen shown to create a new direct room. - case StartChat + case StartChat = "StartChat" /// The screen shown to select which room directory you'd like to use. - case SwitchDirectory + case SwitchDirectory = "SwitchDirectory" /// Screen that displays list of threads for a room. - case ThreadList + case ThreadList = "ThreadList" /// A screen that shows information about a room member. - case User + case User = "User" /// The splash screen. - case Welcome + case Welcome = "Welcome" } public var properties: [String: Any] { diff --git a/types/swift/PerformanceTimer.swift b/types/swift/PerformanceTimer.swift index 9a6dd76..5e1a1ac 100644 --- a/types/swift/PerformanceTimer.swift +++ b/types/swift/PerformanceTimer.swift @@ -42,21 +42,21 @@ extension AnalyticsEvent { public enum Name: String { /// The time spent parsing the response from an initial /sync request. In this case, `itemCount` should contain the number of joined rooms. - case InitialSyncParsing + case InitialSyncParsing = "InitialSyncParsing" /// The time spent waiting for a response to an initial /sync request. In this case, `itemCount` should contain the number of joined rooms. - case InitialSyncRequest + case InitialSyncRequest = "InitialSyncRequest" /// The time taken to display an event in the timeline that was opened from a notification. - case NotificationsOpenEvent + case NotificationsOpenEvent = "NotificationsOpenEvent" /// The duration of a regular /sync request when resuming the app. In this case, `itemCount` should contain the number of joined rooms in the response. - case StartupIncrementalSync + case StartupIncrementalSync = "StartupIncrementalSync" /// The duration of an initial /sync request during startup (if the store has been wiped). In this case, `itemCount` should contain the number of joined rooms. - case StartupInitialSync + case StartupInitialSync = "StartupInitialSync" /// How long the app launch screen is displayed for. - case StartupLaunchScreen + case StartupLaunchScreen = "StartupLaunchScreen" /// The time to preload data in the MXStore on iOS. In this case, `itemCount` should contain the number of rooms in the store. - case StartupStorePreload + case StartupStorePreload = "StartupStorePreload" /// The time to load all data from the store (including StartupStorePreload time). In this case, `itemCount` should contain the number of rooms loaded into the session - case StartupStoreReady + case StartupStoreReady = "StartupStoreReady" } public var properties: [String: Any] { diff --git a/types/swift/PermissionChanged.swift b/types/swift/PermissionChanged.swift index 7f778ab..c6c5e9f 100644 --- a/types/swift/PermissionChanged.swift +++ b/types/swift/PermissionChanged.swift @@ -36,7 +36,7 @@ extension AnalyticsEvent { public enum Permission: String { /// Permissions related to sending notifications have changed. - case Notification + case Notification = "Notification" } public var properties: [String: Any] { diff --git a/types/swift/PollCreation.swift b/types/swift/PollCreation.swift index 951bd56..da9ff9d 100644 --- a/types/swift/PollCreation.swift +++ b/types/swift/PollCreation.swift @@ -39,9 +39,9 @@ extension AnalyticsEvent { public enum Action: String { /// Newly created poll. - case Create + case Create = "Create" /// Edit of an existing poll. - case Edit + case Edit = "Edit" } public var properties: [String: Any] { diff --git a/types/swift/RoomModeration.swift b/types/swift/RoomModeration.swift index ed26d9a..460dfd4 100644 --- a/types/swift/RoomModeration.swift +++ b/types/swift/RoomModeration.swift @@ -36,42 +36,42 @@ extension AnalyticsEvent { public enum Action: String { /// Banned a room member. - case BanMember + case BanMember = "BanMember" /// Changed a room member's power level. - case ChangeMemberRole + case ChangeMemberRole = "ChangeMemberRole" /// Changed the power level required to ban room members. - case ChangePermissionsBanMembers + case ChangePermissionsBanMembers = "ChangePermissionsBanMembers" /// Changed the power level required to invite users to the room. - case ChangePermissionsInviteUsers + case ChangePermissionsInviteUsers = "ChangePermissionsInviteUsers" /// Changed the power level required to kick room members. - case ChangePermissionsKickMembers + case ChangePermissionsKickMembers = "ChangePermissionsKickMembers" /// Changed the power level required to redact messages in the room. - case ChangePermissionsRedactMessages + case ChangePermissionsRedactMessages = "ChangePermissionsRedactMessages" /// Changed the power level required to set the room's avatar. - case ChangePermissionsRoomAvatar + case ChangePermissionsRoomAvatar = "ChangePermissionsRoomAvatar" /// Changed the power level required to set the room's name. - case ChangePermissionsRoomName + case ChangePermissionsRoomName = "ChangePermissionsRoomName" /// Changed the power level required to set the room's topic. - case ChangePermissionsRoomTopic + case ChangePermissionsRoomTopic = "ChangePermissionsRoomTopic" /// Changed the power level required to send messages in the room. - case ChangePermissionsSendMessages + case ChangePermissionsSendMessages = "ChangePermissionsSendMessages" /// Kicked a room member. - case KickMember + case KickMember = "KickMember" /// Reset all of the room permissions back to their default values. - case ResetPermissions + case ResetPermissions = "ResetPermissions" /// Unbanned a room member. - case UnbanMember + case UnbanMember = "UnbanMember" } public enum Role: String { /// A power level of 100. - case Administrator + case Administrator = "Administrator" /// A power level of 50. - case Moderator + case Moderator = "Moderator" /// Any other power level. - case Other + case Other = "Other" /// A power level of 0. - case User + case User = "User" } public var properties: [String: Any] { diff --git a/types/swift/Signup.swift b/types/swift/Signup.swift index 4d68fd0..f8312d6 100644 --- a/types/swift/Signup.swift +++ b/types/swift/Signup.swift @@ -33,21 +33,21 @@ extension AnalyticsEvent { public enum AuthenticationType: String { /// Social login using Apple. - case Apple + case Apple = "Apple" /// Social login using Facebook. - case Facebook + case Facebook = "Facebook" /// Social login using GitHub. - case GitHub + case GitHub = "GitHub" /// Social login using GitLab. - case GitLab + case GitLab = "GitLab" /// Social login using Google. - case Google + case Google = "Google" /// Registration using some other mechanism such as fallback. - case Other + case Other = "Other" /// Registration with a username and password. - case Password + case Password = "Password" /// Registration using another SSO provider. - case SSO + case SSO = "SSO" } public var properties: [String: Any] { diff --git a/types/swift/SlashCommand.swift b/types/swift/SlashCommand.swift index 0469b9f..e1fda48 100644 --- a/types/swift/SlashCommand.swift +++ b/types/swift/SlashCommand.swift @@ -32,8 +32,8 @@ extension AnalyticsEvent { } public enum Command: String { - case Invite - case Part + case Invite = "Invite" + case Part = "Part" } public var properties: [String: Any] { diff --git a/types/swift/SuperProperties.swift b/types/swift/SuperProperties.swift index ee4e3e6..12ef46c 100644 --- a/types/swift/SuperProperties.swift +++ b/types/swift/SuperProperties.swift @@ -41,26 +41,26 @@ extension AnalyticsEvent { public enum CryptoSDK: String { /// Legacy crypto backend specific to each platform. - case Legacy + case Legacy = "Legacy" /// Cross-platform crypto backend written in Rust. - case Rust + case Rust = "Rust" } public enum PlatformCodeName: String { /// Element Desktop platform code. - case Desktop + case Desktop = "Desktop" /// Element Android platform code. - case EA + case EA = "EA" /// Element iOS platform code. - case EI + case EI = "EI" /// Element-X Android platform code. - case EXA + case EXA = "EXA" /// Element-X iOS platform code. - case EXI + case EXI = "EXI" /// Other Platform code. - case Other + case Other = "Other" /// Element Web platform code. - case Web + case Web = "Web" } public var properties: [String: Any?] { diff --git a/types/swift/UnauthenticatedError.swift b/types/swift/UnauthenticatedError.swift index 144f597..423473e 100644 --- a/types/swift/UnauthenticatedError.swift +++ b/types/swift/UnauthenticatedError.swift @@ -41,9 +41,9 @@ extension AnalyticsEvent { } public enum ErrorCode: String { - case M_FORBIDDEN - case M_UNKNOWN - case M_UNKNOWN_TOKEN + case M_FORBIDDEN = "M_FORBIDDEN" + case M_UNKNOWN = "M_UNKNOWN" + case M_UNKNOWN_TOKEN = "M_UNKNOWN_TOKEN" } public var properties: [String: Any] { diff --git a/types/swift/UserProperties.swift b/types/swift/UserProperties.swift index ae67dd9..8f0defa 100644 --- a/types/swift/UserProperties.swift +++ b/types/swift/UserProperties.swift @@ -47,40 +47,40 @@ extension AnalyticsEvent { public enum FtueUseCaseSelection: String { /// The third option, Communities. - case CommunityMessaging + case CommunityMessaging = "CommunityMessaging" /// The first option, Friends and family. - case PersonalMessaging + case PersonalMessaging = "PersonalMessaging" /// The footer option to skip the question. - case Skip + case Skip = "Skip" /// The second option, Teams. - case WorkMessaging + case WorkMessaging = "WorkMessaging" } public enum AllChatsActiveFilter: String { /// Filters are activated and All is selected. - case All + case All = "All" /// Filters are activated and Favourites is selected. - case Favourites + case Favourites = "Favourites" /// Filters are activated and People is selected. - case People + case People = "People" /// Filters are activated and Unreads is selected. - case Unreads + case Unreads = "Unreads" } public enum VerificationState: String { /// The device is unverified. - case NotVerified + case NotVerified = "NotVerified" /// The device is considered to be verified, it has been signed by its user identity. - case Verified + case Verified = "Verified" } public enum RecoveryState: String { /// No default secret storage key exists or it is disabled explicitly using the account data event. - case Disabled + case Disabled = "Disabled" /// Secret storage is set up and we have all the secrets locally. - case Enabled + case Enabled = "Enabled" /// Secret storage is set up but we're missing some secrets. - case Incomplete + case Incomplete = "Incomplete" } public var properties: [String: Any?] { diff --git a/types/swift/ViewRoom.swift b/types/swift/ViewRoom.swift index b5cced6..2caf40f 100644 --- a/types/swift/ViewRoom.swift +++ b/types/swift/ViewRoom.swift @@ -45,100 +45,100 @@ extension AnalyticsEvent { public enum Trigger: String { /// Room accessed due to being just created. - case Created + case Created = "Created" /// Room switched due to user interacting with a message search result. - case MessageSearch + case MessageSearch = "MessageSearch" /// Room switched due to user selecting a user to go to a DM with. - case MessageUser + case MessageUser = "MessageUser" /// Room accessed via space explore. - case MobileExploreRooms + case MobileExploreRooms = "MobileExploreRooms" /// Room switched due to user interacting with a file search result. - case MobileFileSearch + case MobileFileSearch = "MobileFileSearch" /// Room accessed via interacting with the incall screen. - case MobileInCall + case MobileInCall = "MobileInCall" /// Room accessed during external sharing. - case MobileLinkShare + case MobileLinkShare = "MobileLinkShare" /// Room accessed via link. - case MobilePermalink + case MobilePermalink = "MobilePermalink" /// Room accessed via interacting with direct chat item in the room contact detail screen. - case MobileRoomMemberDetail + case MobileRoomMemberDetail = "MobileRoomMemberDetail" /// Room accessed via preview. - case MobileRoomPreview + case MobileRoomPreview = "MobileRoomPreview" /// Room switched due to user interacting with a room search result. - case MobileRoomSearch + case MobileRoomSearch = "MobileRoomSearch" /// Room accessed via interacting with direct chat item in the search contact detail screen. - case MobileSearchContactDetail + case MobileSearchContactDetail = "MobileSearchContactDetail" /// Room accessed via space bottom sheet list. - case MobileSpaceBottomSheet + case MobileSpaceBottomSheet = "MobileSpaceBottomSheet" /// Room accessed via interacting with direct chat item in the space contact detail screen. - case MobileSpaceMemberDetail + case MobileSpaceMemberDetail = "MobileSpaceMemberDetail" /// Room accessed via space members list. - case MobileSpaceMembers + case MobileSpaceMembers = "MobileSpaceMembers" /// Space accessed via interacting with the space menu. - case MobileSpaceMenu + case MobileSpaceMenu = "MobileSpaceMenu" /// Space accessed via interacting with a space settings menu item. - case MobileSpaceSettings + case MobileSpaceSettings = "MobileSpaceSettings" /// Room accessed via a push/desktop notification. - case Notification + case Notification = "Notification" /// Room accessed via the predecessor link at the top of the upgraded room. - case Predecessor + case Predecessor = "Predecessor" /// Room accessed via the public rooms directory. - case RoomDirectory + case RoomDirectory = "RoomDirectory" /// Room accessed via the room list. - case RoomList + case RoomList = "RoomList" /// Room accessed via a shortcut. - case Shortcut + case Shortcut = "Shortcut" /// Room accessed via a slash command in Element Web/Desktop like /goto. - case SlashCommand + case SlashCommand = "SlashCommand" /// Room accessed via the space hierarchy view. - case SpaceHierarchy + case SpaceHierarchy = "SpaceHierarchy" /// Room accessed via a timeline pill or link in another room. - case Timeline + case Timeline = "Timeline" /// Room accessed via a tombstone at the bottom of a predecessor room. - case Tombstone + case Tombstone = "Tombstone" /// Room switched due to user interacting with incoming verification request. - case VerificationRequest + case VerificationRequest = "VerificationRequest" /// Room switched due to accepting a call in a different room in Element Web/Desktop. - case WebAcceptCall + case WebAcceptCall = "WebAcceptCall" /// Room switched due to making a call via the dial pad in Element Web/Desktop. - case WebDialPad + case WebDialPad = "WebDialPad" /// Room accessed via interacting with the floating call or Jitsi PIP in Element Web/Desktop. - case WebFloatingCallWindow + case WebFloatingCallWindow = "WebFloatingCallWindow" /// Room accessed via the shortcut in Element Web/Desktop's forward modal. - case WebForwardShortcut + case WebForwardShortcut = "WebForwardShortcut" /// Room accessed via the Element Web/Desktop horizontal breadcrumbs at the top of the room list. - case WebHorizontalBreadcrumbs + case WebHorizontalBreadcrumbs = "WebHorizontalBreadcrumbs" /// Room accessed via an Element Web/Desktop keyboard shortcut like go to next room with unread messages. - case WebKeyboardShortcut + case WebKeyboardShortcut = "WebKeyboardShortcut" /// Room accessed via Element Web/Desktop's notification panel. - case WebNotificationPanel + case WebNotificationPanel = "WebNotificationPanel" /// Room accessed via the predecessor link in Settings > Advanced in Element Web/Desktop. - case WebPredecessorSettings + case WebPredecessorSettings = "WebPredecessorSettings" /// Room accessed via clicking on a notifications badge on a room list sublist in Element Web/Desktop. - case WebRoomListNotificationBadge + case WebRoomListNotificationBadge = "WebRoomListNotificationBadge" /// Room switched due to the user changing space in Element Web/Desktop. - case WebSpaceContextSwitch + case WebSpaceContextSwitch = "WebSpaceContextSwitch" /// Room accessed via clicking on the notifications badge on the currently selected space in Element Web/Desktop. - case WebSpacePanelNotificationBadge + case WebSpacePanelNotificationBadge = "WebSpacePanelNotificationBadge" /// Room accessed via interacting with the Threads Activity Centre in Element Web/Desktop. - case WebThreadsActivityCentre + case WebThreadsActivityCentre = "WebThreadsActivityCentre" /// Room accessed via Element Web/Desktop's Unified Search modal. - case WebUnifiedSearch + case WebUnifiedSearch = "WebUnifiedSearch" /// Room accessed via the Element Web/Desktop vertical breadcrumb hover menu. - case WebVerticalBreadcrumbs + case WebVerticalBreadcrumbs = "WebVerticalBreadcrumbs" /// Room switched due to widget interaction. - case Widget + case Widget = "Widget" } public enum ActiveSpace: String { /// Active space is Home. - case Home + case Home = "Home" /// Active space is a meta space. - case Meta + case Meta = "Meta" /// Active space is a private space. - case Private + case Private = "Private" /// Active space is a public space. - case Public + case Public = "Public" } public var properties: [String: Any] {