@slatesvideo/shared 0.7.18 → 0.7.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ export const ANALYTICS_EVENTS = [
40
40
  { name: 'license_purchased', senders: API, kind: 'purchase', what: 'The base license, with the bump inside its value' },
41
41
  { name: 'bump_skills_purchased', senders: API, kind: 'purchase', what: 'The Skills Pack bump, its own cents only' },
42
42
  { name: 'pro_license_purchased', senders: API, kind: 'purchase', what: 'Pro bought outright (the $297 checkout)' },
43
- { name: 'pro_upgraded', senders: API, kind: 'purchase', what: 'Base to Pro: the /letsgo/pro upsell or the /upgrade page' },
43
+ { name: 'pro_upgraded', senders: API, kind: 'purchase', what: 'Base to Pro: the /offer/pro upsell or the /upgrade page' },
44
44
  { name: 'mega_credits_purchased', senders: API, kind: 'purchase', what: 'The mega credit pack upsell' },
45
45
  { name: 'credit_boost_purchased', senders: API, kind: 'purchase', what: 'The credit boost upsell' },
46
46
  { name: 'credits_purchased', senders: API, kind: 'purchase', what: 'A credit pack bought on its own' },
@@ -52,54 +52,49 @@ export const ANALYTICS_EVENTS = [
52
52
  { name: '$pageleave', senders: APP, kind: 'funnel', what: "posthog-js's own leave event in the app (capture_pageleave)", library: true },
53
53
  { name: 'view_content', senders: WEB, kind: 'funnel', what: 'A sales page seen; browser pixel and PostHog with one id' },
54
54
  { name: 'initiate_checkout', senders: WEB, kind: 'funnel', what: 'The checkout opened; browser pixel and PostHog with one id' },
55
- { name: 'checkout_started', senders: API, kind: 'funnel', what: "The API first learns the buyer's email for a PaymentIntent" },
55
+ { name: 'checkout_started', senders: API, kind: 'funnel', what: "A checkout first learns the buyer's email: the lead post (lead_source) or the PaymentIntent attach (payment_intent_id), whichever comes first, once per email an hour; carries utm_*, ft_utm_* and lp_*" },
56
56
  { name: 'thumbs_checkout_started', senders: API, kind: 'funnel', what: 'A Thumbs checkout created' },
57
57
  { name: 'checkout_payment_intent_failed', senders: WEB, kind: 'funnel', what: 'The checkout could not create its PaymentIntent' },
58
- { name: 'headline_variant_shown', senders: WEB, kind: 'funnel', what: 'The /letsgo headline arm shown' },
59
- { name: 'theme_variant_shown', senders: WEB, kind: 'funnel', what: 'The /letsgo theme arm shown' },
58
+ { name: 'headline_variant_shown', senders: WEB, kind: 'funnel', what: 'The sales page hero headline arm shown' },
60
59
  { name: 'funnel_step', senders: WEB, kind: 'funnel', what: 'An upsell or success page reached' },
61
60
  { name: 'oto_decision', senders: WEB, kind: 'funnel', what: 'An upsell accepted or declined' },
62
61
  { name: 'bump_skills_toggled', senders: WEB, kind: 'funnel', what: 'The Skills Pack bump ticked or unticked' },
63
62
  { name: 'aov_running_total', senders: WEB, kind: 'funnel', what: "The buyer's running order value on each upsell page" },
64
63
  { name: 'tier_at_purchase', senders: WEB, kind: 'funnel', what: 'The tier the success page shows' },
65
- { name: 'currency_displayed', senders: WEB, kind: 'funnel', what: 'The currency /letsgo priced in' },
66
- { name: 'checkout_theme_toggled', senders: WEB, kind: 'funnel', what: 'The checkout switched light or dark' },
64
+ { name: 'sales_exit_shown', senders: WEB, kind: 'funnel', what: "The sales page's exit popup shown" },
65
+ { name: 'sales_exit_kept', senders: WEB, kind: 'funnel', what: "The buyer took the sales page's exit popup to checkout" },
66
+ { name: 'sales_exit_dismissed', senders: WEB, kind: 'funnel', what: "The buyer closed the sales page's exit popup" },
67
67
  { name: 'checkout_exit_intent_shown', senders: WEB, kind: 'funnel', what: 'The checkout exit prompt shown' },
68
68
  { name: 'checkout_exit_intent_kept', senders: WEB, kind: 'funnel', what: 'The buyer stayed at the exit prompt' },
69
69
  { name: 'checkout_exit_intent_dismissed', senders: WEB, kind: 'funnel', what: 'The buyer left at the exit prompt' },
70
+ { name: 'checkout_pay_mode', senders: WEB, kind: 'funnel', what: 'The checkout settled its pay area: wallet first or the card form (late when the wallet answered after the 6 s wait); carries wallet and currency' },
71
+ { name: 'checkout_pay_with_card', senders: WEB, kind: 'funnel', what: "The buyer tapped Pay with card under the wallet button; carries wallet and currency" },
72
+ { name: 'checkout_use_wallet', senders: WEB, kind: 'funnel', what: 'The buyer went back from the card form to the wallet button; carries wallet and currency' },
70
73
  { name: 'decoy_coupon_removed', senders: WEB, kind: 'funnel', what: 'The decoy coupon removed' },
71
74
  { name: 'decoy_coupon_reapplied', senders: WEB, kind: 'funnel', what: 'The decoy coupon put back' },
72
75
  { name: 'pro_upgrade_accepted', senders: WEB, kind: 'funnel', what: 'The success-page Pro offer accepted' },
73
76
  { name: 'pro_upgrade_declined', senders: WEB, kind: 'funnel', what: 'The success-page Pro offer declined' },
74
77
  { name: 'upgrade_page_viewed', senders: WEB, kind: 'funnel', what: 'The /upgrade page seen' },
75
- { name: 'skills_pack_download_clicked', senders: WEB, kind: 'funnel', what: 'The Skills Pack download pressed on the success page' },
78
+ { name: 'hdyhau_answered', senders: WEB, kind: 'funnel', what: 'The buyer answered "How did you hear about Slates?" on the success page; sets the person property hdyhau' },
76
79
  { name: 'video_play', senders: WEB, kind: 'funnel', what: 'A sales-page video started' },
77
- { name: 'video_unmute', senders: WEB, kind: 'funnel', what: 'A sales-page video unmuted' },
78
80
  { name: 'video_watch_25', senders: WEB, kind: 'funnel', what: 'A quarter of a sales-page video watched (forwarded to Meta)' },
79
81
  { name: 'video_watch_50', senders: WEB, kind: 'funnel', what: 'Half a sales-page video watched' },
80
82
  { name: 'video_watch_75', senders: WEB, kind: 'funnel', what: 'Three quarters of a sales-page video watched' },
81
83
  { name: 'video_watch_100', senders: WEB, kind: 'funnel', what: 'A sales-page video watched to the end' },
84
+ { name: 'partner_invite_opened', senders: WEB, kind: 'funnel', what: "A personal partner invite (/affiliates?invite=) opened in a browser; carries invite_slug, never the person's name" },
85
+ { name: 'partner_invite_joined', senders: API, kind: 'funnel', what: 'A personal partner invite claimed by an apply or join (slates-api partner_invite.claimed_at); carries invite_slug and claimed_by (token or email)' },
82
86
  { name: 'web_login_link_sent', senders: WEB, kind: 'account', what: 'A web sign-in link sent' },
83
87
  { name: 'web_login_google_started', senders: WEB, kind: 'account', what: 'A web Google sign-in started' },
84
88
  { name: 'web_login_completed', senders: WEB, kind: 'account', what: 'A web sign-in finished' },
85
89
  { name: 'charge_upsell_initial_pi_rejected', senders: API, kind: 'ops', what: 'An upsell refused: its base payment did not qualify' },
86
90
  { name: 'charge_upsell_no_initial_pi', senders: API, kind: 'ops', what: 'An upsell refused: no base payment named' },
87
91
  // ── Offers and leads ──
88
- { name: 'lead_captured', senders: [...API, ...WEB], kind: 'offer', what: 'An email typed at checkout and kept before payment' },
92
+ { name: 'lead_captured', senders: [...API, ...WEB], kind: 'offer', what: 'An email kept before payment: typed at checkout, left on a phone to send Slates to a computer, or left on a paused sales-page video to finish it later (source finish_video)' },
89
93
  { name: 'offer_code_issued', senders: API, kind: 'offer', what: 'A personal offer code minted' },
90
94
  { name: 'offer_code_redeemed', senders: API, kind: 'offer', what: 'A personal offer code spent by a payment' },
91
95
  { name: 'deal_viewed', senders: WEB, kind: 'offer', what: 'A page showing a live deal seen' },
92
96
  { name: 'deal_expired', senders: WEB, kind: 'offer', what: "A deal's clock ran out on screen" },
93
97
  { name: 'personal_deal_viewed', senders: WEB, kind: 'offer', what: 'A personal code page seen' },
94
- { name: 'letsgo_unlock_shown', senders: WEB, kind: 'offer', what: 'The /letsgo unlock offer shown' },
95
- { name: 'letsgo_unlock_applied', senders: WEB, kind: 'offer', what: 'The /letsgo unlock offer taken' },
96
- { name: 'letsgo_unlock_dismissed', senders: WEB, kind: 'offer', what: 'The /letsgo unlock offer closed' },
97
- { name: 'checkout_unlock_shown', senders: WEB, kind: 'offer', what: 'The checkout unlock offer shown' },
98
- { name: 'checkout_unlock_applied', senders: WEB, kind: 'offer', what: 'The checkout unlock offer taken' },
99
- { name: 'checkout_unlock_dismissed', senders: WEB, kind: 'offer', what: 'The checkout unlock offer closed' },
100
- { name: 'exit_capture_shown', senders: WEB, kind: 'offer', what: 'The exit email popup shown' },
101
- { name: 'exit_capture_submitted', senders: WEB, kind: 'offer', what: 'The exit email popup filled in' },
102
- { name: 'exit_capture_dismissed', senders: WEB, kind: 'offer', what: 'The exit email popup closed' },
103
98
  { name: 'offer_shown', senders: APP, kind: 'offer', what: 'An in-app offer shown' },
104
99
  { name: 'offer_dismissed', senders: APP, kind: 'offer', what: 'An in-app offer dismissed' },
105
100
  { name: 'offer_clicked', senders: APP, kind: 'offer', what: 'An in-app offer clicked' },
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { BRAIN_SHAPE, SKILLS } from './skills/content.js';
5
5
  export { BRAIN_CACHE, brainFiles, clearServedBrain, refreshServedBrain, servedBrain, useBrainSource, type LockedGuide, type ServedBrain } from './skills/served.js';
6
6
  export { myBrainProblems, type BrainShape, type MyBrainProblem } from './skills/brain-check.js';
7
7
  export { parseSkillMetadata, type SkillMetadata } from './skills/metadata.js';
8
+ export { MY_BRAIN_RULES, myBrainLearning, myBrainLessons, remember, setMyBrainLearning, type MyBrainLesson, type RememberInput, type RememberResult } from './skills/my-brain-write.js';
8
9
  export { ARCHIVE_AFTER_DAYS, archiveUnused, archiveUnusedDaily, brainSkills, loadMyBrain, myBrainDir, myBrainPreload, noteUsed, MY_BRAIN_PRELOAD_CHARS, type Brain } from './skills/my-brain.js';
9
10
  export * as operations from './operations/index.js';
10
11
  export { ALL_OPERATIONS, VIDEO_MODELS, AUDIO_MODELS, IMAGE_MODELS, defaultContext, OperationCancelledError, type Operation, type OperationContext, type OperationResult, type OperationAnnotations, type OperationTier, type OperationGroup } from './operations/index.js';
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ export { BRAIN_SHAPE, SKILLS } from './skills/content.js';
5
5
  export { BRAIN_CACHE, brainFiles, clearServedBrain, refreshServedBrain, servedBrain, useBrainSource } from './skills/served.js';
6
6
  export { myBrainProblems } from './skills/brain-check.js';
7
7
  export { parseSkillMetadata } from './skills/metadata.js';
8
+ export { MY_BRAIN_RULES, myBrainLearning, myBrainLessons, remember, setMyBrainLearning } from './skills/my-brain-write.js';
8
9
  export { ARCHIVE_AFTER_DAYS, archiveUnused, archiveUnusedDaily, brainSkills, loadMyBrain, myBrainDir, myBrainPreload, noteUsed, MY_BRAIN_PRELOAD_CHARS } from './skills/my-brain.js';
9
10
  export * as operations from './operations/index.js';
10
11
  export { ALL_OPERATIONS, VIDEO_MODELS, AUDIO_MODELS, IMAGE_MODELS, defaultContext, OperationCancelledError } from './operations/index.js';