-
Notifications
You must be signed in to change notification settings - Fork 293
Expand file tree
/
Copy pathlog.ts
More file actions
602 lines (588 loc) · 20 KB
/
log.ts
File metadata and controls
602 lines (588 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
import type { PurchaseType } from '../graphql/paddle';
export enum Origin {
ShareBar = 'share bar',
ReadingHistoryContextMenu = 'reading history context menu',
ArticlePage = 'article page',
ArticleModal = 'article modal',
Companion = 'companion',
Feed = 'feed',
CommentFeed = 'comment feed',
CustomFeed = 'custom feed',
PostContextMenu = 'post context menu',
PostCommentContextMenu = 'post comment context menu',
TagsFilter = 'tags filter',
TagsSearch = 'tags search',
RealTime = 'realtime',
NonRealTime = 'nonrealtime',
ChangelogPopup = 'changelog popup',
BlockedFilter = 'blocked filter',
SourcePage = 'source page',
TagPage = 'tag page',
Profile = 'profile',
PostTags = 'post tags',
// squads - start
NewSquadModal = 'new squad modal',
SquadDirectory = 'squad directory',
SquadCreation = 'squad creation',
SquadPage = 'squad page',
Auto = 'auto',
Sidebar = 'sidebar',
Share = 'share',
Notification = 'notification',
NotificationsPage = 'notifications page',
Boot = 'boot',
SquadMembersList = 'squad members list',
SquadChecklist = 'squad checklist',
SquadInvitation = 'squad invitation',
// squads - end
PostCommentButton = 'comment button',
PollCommentButton = 'poll comment button',
StartDiscussion = 'start discussion button',
CompanionContextMenu = 'companion context menu',
// search - start
HomePage = 'home page',
SearchPage = 'search page',
HistoryPage = 'history page',
HistoryTooltip = 'history tooltip',
// search - end
PostContent = 'post content',
History = 'history',
FeedbackCard = 'feedback card',
InitializeRegistrationFlow = 'initialize registration flow',
Onboarding = 'onboarding',
ManageTag = 'manage_tag',
EditTag = 'edit_tag',
// Collection
CollectionModal = 'collection modal',
Settings = 'settings',
WorkspaceDropdown = 'workspace dropdown',
UserFollowingList = 'user following list',
UserFollowersList = 'user followers list',
UserUpvotesList = 'user upvotes list',
UserRepostsList = 'user reposts list',
FollowFilter = 'follow filter',
PostSharedBy = 'post shared by',
// Marketing
InAppPromotion = 'in app promotion',
Suggestions = 'suggestions',
// Start Credits
WalletPageCTA = 'wallet page cta',
WalletPagePackage = 'wallet page package',
Award = 'award',
BoostPost = 'BoostPost',
CoresPage = 'cores page',
AwardsList = 'awards list',
// End Credits
ProfileMenu = 'profile menu',
StreakRecover = 'streak recover',
BriefModal = 'brief modal',
BriefPage = 'brief page',
SquadBoost = 'squad boost',
HotTakeList = 'hot take list',
HotAndCold = 'hot and cold',
Leaderboard = 'leaderboard',
ExplorePage = 'explore page',
}
export enum LogEvent {
HidePost = 'hide post',
ReportSquad = 'report squad',
Click = 'click',
CommentPost = 'comment post',
CommentsClick = 'comments click',
StartSubmitArticle = 'start submit article',
Impression = 'impression',
ManageTags = 'click manage tags',
SearchTags = 'search tags',
ClickOnboardingBack = 'click onboarding back',
ClickOnboardingNext = 'click onboarding next',
OnboardingSkip = 'my feed onboarding skip',
GlobalError = 'global error',
ClickArticleAnonymousCTA = 'click article anonymous cta',
ClickScrollBlock = 'click scroll block',
KeyboardShortcutTriggered = 'keyboard shortcut triggered',
FeedEmpty = 'feed empty',
FinishFeed = 'finish feed',
// notifications - start
ClickNotificationIcon = 'click notification icon',
OpenNotificationList = 'open notification list',
ClickNotification = 'click notification',
ClickNotificationCta = 'click notification cta',
ClickEnableNotification = 'click enable notification',
ClickNotificationDismiss = 'click notification dismiss',
ImpressionNotificationCta = 'impression notification cta',
EnableNotification = 'enable notification',
DisableNotification = 'disable notification',
ScheduleDigest = 'schedule digest',
// notifications - end
// squads - start
ViewSquadInvitation = 'view squad invitation',
ClickJoinSquad = 'click join squad',
CompleteJoiningSquad = 'complete joining squad',
DeleteSquad = 'delete squad',
LeaveSquad = 'leave squad',
ShareSquadInvitation = 'share squad invitation',
ViewSquadPage = 'view squad page',
ViewSquadForbiddenPage = 'view squad forbidden',
CompleteSquadCreation = 'complete squad creation',
StartShareToSquad = 'start share to squad',
ShareToSquad = 'share to squad',
ChecklistClose = 'checklist close',
DeletePost = 'delete post',
DeleteComment = 'delete comment',
// squads - end
EligibleScrollBlock = 'eligible scroll block',
OpenComment = 'open comment modal',
// vote - start
UpvotePost = 'upvote post',
RemovePostUpvote = 'remove post upvote',
DownvotePost = 'downvote post',
RemovePostDownvote = 'remove post downvote',
ClickDismissFeedback = 'click dismiss feedback',
UpvoteComment = 'upvote comment',
RemoveCommentUpvote = 'remove comment upvote',
DownvoteComment = 'downvote comment',
RemoveCommentDownvote = 'remove comment downvote',
// vote - end
// moderation - start
ApprovePost = 'approve post',
RejectPost = 'reject post',
ReportPost = 'report post',
// moderation - end
// bookmark - start
BookmarkPost = 'bookmark post',
RemovePostBookmark = 'remove post bookmark',
SetBookmarkReminder = 'set bookmark reminder',
RemoveBookmarkReminder = 'remove bookmark reminder',
MoveBookmarkToFolder = 'change bookmark folder',
CreateBookmarkFolder = 'create bookmark folder',
RenameBookmarkFolder = 'rename bookmark folder',
DeleteBookmarkFolder = 'delete bookmark folder',
// bookmark - end
ReportComment = 'report comment',
// search start
FocusSearch = 'focus search',
SubmitSearch = 'submit search',
OpenSearchHistory = 'open search history',
UpvoteSearch = 'upvote search',
DownvoteSearch = 'downvote search',
CopySearch = 'copy search',
CopyKeyLink = 'copy key link',
HideFromHeader = 'hide from header',
CloseInvitationPopup = 'close invitation popup',
ErrorSearch = 'error search',
AcceptInvitation = 'accept invitation',
DownloadExtension = 'download extension',
DownloadApp = 'download app',
SearchHighlightAnimation = 'highlight search',
SwitchSearch = 'switch search',
// search end
RequestContentScripts = 'request content scripts',
ApproveContentScripts = 'approve content scripts',
DeclineContentScripts = 'decline content scripts',
ToggleFeedPreview = 'toggle feed preview',
CreateFeed = 'create feed',
// Referral campaign
CopyReferralLink = 'copy referral link',
InviteReferral = 'invite referral',
// Shortcuts
RevokeShortcutAccess = 'revoke shortcut access',
SaveShortcutAccess = 'save shortcut access',
OpenShortcutConfig = 'open shortcut config',
// Devcard
ShareDevcard = 'share devcard',
GenerateDevcard = 'generate devcard',
DownloadDevcard = 'download devcard',
CopyDevcardCode = 'copy devcard code',
// Reading Streaks
OpenStreaks = 'open streaks',
DismissStreaksMilestone = 'dismiss streaks milestone',
ScheduleStreakReminder = 'schedule streak reminder',
StreakRecover = 'restore streak',
DismissStreakRecover = 'dimiss streaks milestone',
StreakTimezoneMismatch = 'streak timezone mismatch',
// 404 page
View404Page = '404 page',
// Follow Actions - start
Follow = 'follow',
Unfollow = 'unfollow',
Block = 'block',
Unblock = 'unblock',
Subscribe = 'subscribe',
Unsubscribe = 'unsubscribe',
// Follow Actions - end
// Tags - start
BlockTag = 'block',
UnblockTag = 'unblock',
// Tags - end
// marketing CTA
MarketingCtaDismiss = 'dismiss promotion',
// Reading reminder
ScheduleReadingReminder = 'schedule reading reminder',
SkipReadingReminder = 'skip reading reminder',
// custom feeds start
StartCustomFeed = 'start custom feed',
CreateCustomFeed = 'create custom feed',
UpdateCustomFeed = 'update custom feed',
DeleteCustomFeed = 'delete custom feed',
// custom feeds end
// Settings
ChangeSettings = 'change settings',
// End settings
// Integrations
StartAddingWorkspace = 'start adding workspace',
StartAddingIntegration = 'start adding integration',
ManageIntegration = 'manage integration',
SetIntegration = 'set integration',
RemoveIntegration = 'remove integration',
RevokeIntegrationAccess = 'revoke integration access',
// End integrations
// Post snippets
CopySnippet = 'copy snippet',
NextSnippet = 'next snippet',
PreviousSnippet = 'previous snippet',
// End post snippets
TopReaderModalClose = 'close badge',
TopReaderBadgeDownload = 'download badge',
// AI quiz
StartAiFluencyQuiz = 'start ai fluency quiz',
CompleteAiFluencyQuiz = 'complete ai fluency quiz',
ShareAiFluencyQuiz = 'share ai fluency quiz',
// Plus subscription
UpgradeSubscription = 'upgrade subscription',
ManageSubscription = 'manage subscription',
SelectBillingCycle = 'select billing cycle',
SelectCheckoutPayment = 'select checkout payment',
InitiateCheckout = 'initiate checkout',
CompleteCheckout = 'complete checkout',
WarningCheckout = 'warning checkout',
ErrorCheckout = 'error checkout',
InitiatePayment = 'initiate payment',
ErrorPayment = 'error payment',
HoverPlusFeature = 'hover plus feature',
ClickPlusFeature = 'click plus feature',
ClosePlusFeature = 'close plus feature',
CancelSubscription = 'cancel subscription',
ReceivePayment = 'receive payment',
OnboardingSkipPlus = 'skip upgrade subscription',
OnboardingUpgradePlus = 'upgrade subscription',
GiftSubscription = 'gift subscription',
CompleteGiftCheckout = 'complete gift checkout',
ClickPlusFaq = 'click plus faq',
HoverCheckoutWidget = 'hover checkout widget',
PageScroll = 'page scroll',
SelectSubscriptionType = 'select subscription type',
SetOrgSize = 'set org size',
// End Plus subscription
// Clickbait Shield
ToggleClickbaitShield = 'toggle clickbait shield',
ClickbaitShieldTitle = 'clickbait shield title',
// End Clickbait Shield
InstallPWA = 'install pwa',
// Start Share
ShareProfile = 'share profile',
ShareSource = 'share source',
ShareTag = 'share tag',
SharePost = 'share post',
ShareComment = 'share comment',
ShareLog = 'share log',
// End Share
// Start Smart Prompts
SmartPrompt = 'smart prompt',
ToggleSmartPrompts = 'toggle smart prompts',
// End Smart Prompts
// Navigation
NavigatePrevious = 'navigate previous',
NavigateNext = 'navigate next',
// End Navigation
// Start Profile
ProfileView = 'profile view',
UpdateProfile = 'update profile',
UpdateProfileImage = 'update profile image',
HoverUserCard = 'hover user card',
// End Profile
TranslatePost = 'translate post',
// Start Credits
StartBuyingCredits = 'start buying credits',
SelectCreditsQuantity = 'select credits quantity',
StartAwardUser = 'start award user',
PickAwardUser = 'pick award user',
AwardUser = 'award user',
StartAwardPost = 'start award post',
PickAwardPost = 'pick award post',
AwardPost = 'award post',
StartAwardComment = 'start award comment',
PickAwardComment = 'pick award comment',
AwardComment = 'award comment',
StartAwardSquad = 'start award Squad',
PickAwardSquad = 'pick award Squad',
AwardSquad = 'award Squad',
// End Credits
// Start Brief
ImpressionBrief = 'impression brief',
ClickBrief = 'click brief',
StartBriefPurchase = 'start brief purchase',
BriefPaywall = 'brief paywall',
// End Brief
// CV Upload
UploadCv = 'upload cv',
ClearCv = 'clear cv',
// end CV Upload
VotePoll = 'vote poll',
ImpressionComment = 'impression comment',
// Opportunity
ImpressionOpportunityNudge = 'impression opportunity nudge',
ClickOpportunityNudge = 'click opportunity nudge',
OnboardingCandidate = 'onboarding candidate',
CompleteOnboardingCandidate = 'complete onboarding candidate',
OpportunityMatchView = 'opportunity match view',
RejectOpportunityMatch = 'reject opportunity match',
ApproveOpportunityMatch = 'approve opportunity match',
AnswerScreeningQuestion = 'answer screening question',
CompleteScreening = 'complete screening',
AnswerFeedbackQuestion = 'answer feedback question',
CompleteFeedback = 'complete feedback',
ConfirmCandidateContact = 'confirm candidate contact',
SelectCandidateAvailability = 'select candidate availability',
UpdateCandidatePreferences = 'update candidate preferences',
ClickCandidatePreferences = 'click candidate preferences',
ClickStartHiring = 'click start hiring',
// End Opportunity
UploadEmploymentAgreement = 'upload employment agreement',
ClearEmploymentAgreement = 'clear employment agreement',
// Experience
StartAddExperience = 'start add experience',
AddExperience = 'add experience',
RemoveExperience = 'remove experience',
// User Stack (profile technologies)
StartAddUserStack = 'start add user stack',
AddUserStack = 'add user stack',
UpdateUserStack = 'update user stack',
RemoveUserStack = 'remove user stack',
ReorderUserStack = 'reorder user stack',
// Hot Takes
StartAddHotTake = 'start add hot take',
AddHotTake = 'add hot take',
UpdateHotTake = 'update hot take',
RemoveHotTake = 'remove hot take',
ReorderHotTake = 'reorder hot take',
UpvoteHotTake = 'upvote hot take',
RemoveHotTakeUpvote = 'remove hot take upvote',
OpenHotAndCold = 'open hot and cold',
VoteHotAndCold = 'vote hot and cold',
SwipeHotTake = 'swipe hot take',
SkipHotTake = 'skip hot take',
// My Setup - Workspace Photos
StartAddWorkspacePhoto = 'start add workspace photo',
AddWorkspacePhoto = 'add workspace photo',
RemoveWorkspacePhoto = 'remove workspace photo',
ReorderWorkspacePhoto = 'reorder workspace photo',
// My Setup - Gear
StartAddGear = 'start add gear',
AddGear = 'add gear',
RemoveGear = 'remove gear',
ReorderGear = 'reorder gear',
// Log
ViewLogPage = 'view log page',
ViewLogCard = 'view log card',
// Achievements
TrackAchievement = 'track achievement',
UntrackAchievement = 'untrack achievement',
OpenAchievementPickerModal = 'open achievement picker',
SyncAchievements = 'sync achievements',
CompleteSyncAchievements = 'complete sync achievements',
ClickAchievementTrackerButton = 'click achievement tracker',
FilterAchievements = 'filter achievements',
ImpressionAchievementSyncPrompt = 'impression achievement sync',
DismissAchievementSyncPrompt = 'dismiss achievement sync',
DismissAchievementCompletion = 'dismiss achievement completion',
// Quests
ClaimQuest = 'claim quest',
Dismiss = 'dismiss',
}
export enum TargetType {
MyFeedModal = 'my feed modal',
ArticleAnonymousCTA = 'article anonymous cta',
EnableNotifications = 'enable notifications',
OnboardingChecklist = 'onboarding checklist',
LoginButton = 'login button',
SignupButton = 'signup button',
SquadJoinButton = 'squad join button',
SearchRecommendation = 'search rec',
SearchHistory = 'search history',
SearchSource = 'search source',
SearchInviteButton = 'search invite button',
HideInviteCheckbox = 'hide invite mechanism',
ReferralPopup = 'referral popup',
InviteFriendsPage = 'invite friends page',
ProfilePage = 'profile page',
GenericReferralPopup = 'generic referral popup',
Shortcuts = 'shortcuts',
VerifyEmail = 'verify email',
ResendVerificationCode = 'resend verification code',
StreaksMilestone = 'streaks milestone',
StreakRecover = 'streak restore',
PromotionCard = 'promotion_card',
MarketingCtaPopover = 'promotion_popover',
MarketingCtaPopoverSmall = 'promotion_popover_small',
MarketingCtaPlus = 'promotion_plus',
MarketingCtaBrief = 'promotion_briefing',
PlusEntryCard = 'plus_entry_card',
PlusEntryForYouTab = 'plus_entry_for_you_tab',
PlusEntryBookmarkTab = 'plus_entry_bookmark_tab',
PlusEntryAnnouncementBar = 'plus_entry_announcement_bar',
Comment = 'comment',
ReadingReminder = 'reading reminder',
Source = 'source',
Tag = 'tag',
Quest = 'quest',
// Settings
Layout = 'layout',
Theme = 'theme',
Language = 'language',
FeedbackButton = 'feedback button',
// End settings
SocialLink = 'social link',
Badge = 'badge',
AchievementCompletion = 'achievement completion',
Plus = 'plus',
// Browsers
Chrome = 'chrome',
Edge = 'edge',
Credits = 'credits',
List = 'list',
Grid = 'grid',
// CV
CvBanner = 'cv banner',
Post = 'post',
Recruiter = 'recruiter',
ProfileCompletionCard = 'profile completion card',
OpportunityInterestButton = 'opportunity interest button',
AchievementTracker = 'achievement tracker',
AchievementCard = 'achievement card',
BriefCard = 'brief card',
}
export enum TargetId {
On = 'on',
Off = 'off',
SearchReferralBadge = 'search referral badge',
InviteBanner = 'invite banner',
InviteProfileMenu = 'invite in profile menu',
SearchActivation = 'search activation',
// Referral campaign
GenericReferralPopup = 'generic referral popup',
ProfilePage = 'profile page',
InviteFriendsPage = 'invite friends page',
Squad = 'squad',
General = 'general',
OrganizationsPage = 'organizations page',
// Settings
Cards = 'cards',
List = 'list',
// End settings
TopReader = 'top reader',
Sidebar = 'sidebar',
Header = 'header',
ProfileDropdown = 'profile dropdown',
Ads = 'ads',
MyProfile = 'my profile',
PlusBadge = 'plus badge',
PlusPage = 'plus page',
Onboarding = 'onboarding',
BlockedWords = 'block words',
CustomFeed = 'custom feed',
BookmarkFolder = 'bookmark folder',
FeedSettings = 'feed settings',
ClickbaitShield = 'clickbait shield',
StreakTimezoneLabel = 'streak timezone label',
StreakTimezoneMismatchPrompt = 'streak timezone mismatch prompt',
ContextMenu = 'context',
SmartPrompt = 'smart prompt',
Account = 'account',
Brief = 'brief',
NotificationSettings = 'notification settings',
Feed = 'feed',
CVWidget = 'cv widget',
Scroll = 'scroll',
OpportunityDonePage = 'opportunity done page',
OpportunityPassiveDonePage = 'opportunity passive done page',
OpportunityUnavailablePage = 'opportunity unavailable page',
OpportunityWelcomePage = 'opportunity welcome page',
ProfileSettingsMenu = 'profile settings menu',
Fullscreen = 'fullscreen',
Popover = 'popover',
QuestDropdown = 'quest dropdown',
Navigation = 'navigation',
DigestUpsell = 'digest upsell',
DigestUpsellBookmarks = 'digest upsell bookmarks',
AskPage = 'ask page',
AskUpsellSearch = 'ask upsell search',
}
export enum NotificationChannel {
Email = 'email',
Web = 'web',
}
export enum NotificationCategory {
Marketing = 'marketing',
Product = 'product',
Digest = 'digest',
ReadingReminder = 'reading reminder',
StreakReminder = 'streak reminder',
Following = 'following',
Award = 'award',
}
export enum NotificationTarget {
Header = 'header',
Footer = 'footer',
Icon = 'notifications icon',
}
export enum NotificationCtaPlacement {
TopHero = 'top-hero',
InFeedHero = 'in-feed-hero',
CommentInline = 'comment-inline',
UserCard = 'user-card',
SourceCard = 'source-card',
SquadCard = 'squad-card',
PostActions = 'post-actions',
SquadShareToast = 'squad-share-toast',
ExploreQuickActions = 'explore-quick-actions',
}
export enum NotificationCtaKind {
PushCta = 'push_cta',
ReadingReminder = 'reading_reminder',
FollowUpCta = 'followup_cta',
ToastCta = 'toast_cta',
}
export enum NotificationPromptSource {
BookmarkReminder = 'bookmark reminder',
NotificationsPage = 'notifications page',
NewComment = 'new comment',
NewSourceModal = 'new source modal',
SquadPage = 'squad page',
NotificationItem = 'notification item',
SquadPostCommentary = 'squad post commentary',
SquadPostModal = 'squad post modal',
SquadChecklist = 'squad checklist',
SourceSubscribe = 'source subscribe',
ReadingReminder = 'reading reminder',
ExplorePage = 'explore page',
}
export enum ShortcutsSourceType {
Custom = 'custom',
Browser = 'browser',
Placeholder = 'placeholder',
Button = 'button',
}
export enum UserAcquisitionEvent {
Dismiss = 'dismiss ua',
Submit = 'choose ua',
}
export enum StreakTimezonePromptAction {
Settings = 'settings',
Ignore = 'ignore',
}
export const purchaseTypeToTargetType: Record<PurchaseType, TargetType> = {
cores: TargetType.Credits,
plus: TargetType.Plus,
organization: TargetType.Plus,
recruiter: TargetType.Recruiter,
};