@apex-inc/sdk 0.7.3 → 0.9.0

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.
@@ -0,0 +1,736 @@
1
+ /**
2
+ * GENERATED FILE — DO NOT EDIT BY HAND.
3
+ *
4
+ * Typed Apex event payloads, generated from the Apex Spec registries by
5
+ * `app/scripts/generate-spec-types.ts`. Regenerate with:
6
+ *
7
+ * npx tsx app/scripts/generate-spec-types.ts
8
+ *
9
+ * The `codegen.test.ts` stale gate fails CI if this drifts from the spec.
10
+ */
11
+ export interface ApexEventPayloads {
12
+ "activated": {
13
+ criterion?: string;
14
+ };
15
+ "add_to_cart": {
16
+ product_id: string;
17
+ product_name?: string;
18
+ value?: number;
19
+ cart_value?: number;
20
+ currency?: string;
21
+ quantity?: number;
22
+ item_count?: number;
23
+ cart_id?: string;
24
+ };
25
+ "add_to_wishlist": {
26
+ product_id: string;
27
+ product_name?: string;
28
+ value?: number;
29
+ currency?: string;
30
+ };
31
+ "anomaly_detected": {
32
+ metric_name: string;
33
+ scope?: string;
34
+ delta?: string;
35
+ investigate_url: string;
36
+ anomaly_url?: string;
37
+ };
38
+ "apex_setup_first_belief_created": {
39
+ belief_id?: string;
40
+ source?: string;
41
+ };
42
+ "apex_setup_first_event_detected": {
43
+ platform?: string;
44
+ event_name?: string;
45
+ };
46
+ "apex_setup_first_identified_event": {
47
+ surface?: string;
48
+ };
49
+ "apex_setup_source_connected": {
50
+ source_kind: string;
51
+ source_id?: string;
52
+ };
53
+ "apex_setup_templates_unlocked": {
54
+ unlock_id?: string;
55
+ track_id?: string;
56
+ template_count?: number;
57
+ };
58
+ "app_background": Record<string, never>;
59
+ "app_crash": {
60
+ message?: string;
61
+ stack?: string;
62
+ fatal?: boolean;
63
+ };
64
+ "app_install": Record<string, never>;
65
+ "app_open": {
66
+ source?: string;
67
+ };
68
+ "app_reinstall": Record<string, never>;
69
+ "app_uninstall": Record<string, never>;
70
+ "badge_awarded": {
71
+ badge_name: string;
72
+ category?: string;
73
+ impact_message?: string;
74
+ total_badges?: number;
75
+ next_badge?: string;
76
+ growth_journey_url?: string;
77
+ };
78
+ "buyer_review_requested": {
79
+ order_id?: string;
80
+ product_name?: string;
81
+ seller_name?: string;
82
+ };
83
+ "campaign_milestone_reached": {
84
+ campaign_id?: string;
85
+ campaign_name?: string;
86
+ milestone?: string;
87
+ business_impact?: string;
88
+ };
89
+ "cart_snapshot": {
90
+ items: unknown[];
91
+ value?: number;
92
+ currency?: string;
93
+ item_count?: number;
94
+ cart_id?: string;
95
+ };
96
+ "cart_view": {
97
+ value?: number;
98
+ currency?: string;
99
+ item_count?: number;
100
+ cart_id?: string;
101
+ };
102
+ "checkout_completed": {
103
+ order_id?: string;
104
+ value: number;
105
+ currency: string;
106
+ item_count?: number;
107
+ items?: unknown[];
108
+ cart_id?: string;
109
+ subtotal?: number;
110
+ total?: number;
111
+ tax?: number;
112
+ shipping?: number;
113
+ handling?: number;
114
+ discount?: number;
115
+ coupon?: string;
116
+ };
117
+ "checkout_started": {
118
+ value?: number;
119
+ currency?: string;
120
+ item_count?: number;
121
+ cart_id?: string;
122
+ };
123
+ "click": {
124
+ target?: string;
125
+ };
126
+ "client_onboarded": {
127
+ client_id?: string;
128
+ client_name?: string;
129
+ manager_name?: string;
130
+ };
131
+ "cognito_verification_code": {
132
+ code: string;
133
+ code_parameter?: string;
134
+ };
135
+ "content_view": {
136
+ content_id: string;
137
+ content_type?: string;
138
+ duration_ms?: number;
139
+ };
140
+ "contract_renewal_approaching": {
141
+ contract_id?: string;
142
+ days_remaining?: number;
143
+ renewal_date?: string;
144
+ contract_period?: string;
145
+ };
146
+ "custom": Record<string, never>;
147
+ "dead_click": {
148
+ target?: string;
149
+ };
150
+ "deep_link_open": {
151
+ url: string;
152
+ source?: string;
153
+ campaign_id?: string;
154
+ referrer?: string;
155
+ };
156
+ "developer_invite_sent": {
157
+ inviter_name: string;
158
+ inviter_role?: string;
159
+ developer_email: string;
160
+ workspace_name?: string;
161
+ note?: string;
162
+ handoff_url: string;
163
+ signup_url?: string;
164
+ };
165
+ "drip_step_scheduled": {
166
+ step_label: string;
167
+ step_body?: string;
168
+ step_url?: string;
169
+ };
170
+ "email_clicked": {
171
+ message_id?: string;
172
+ campaign_id?: string;
173
+ link?: string;
174
+ };
175
+ "email_opened": {
176
+ message_id?: string;
177
+ campaign_id?: string;
178
+ };
179
+ "engagement": Record<string, never>;
180
+ "experiment_awaiting_promotion": {
181
+ experiment_name: string;
182
+ winning_arm?: string;
183
+ confidence?: string;
184
+ experiment_url?: string;
185
+ };
186
+ "experiment_concluded": {
187
+ experiment_name: string;
188
+ result?: string;
189
+ lift?: string;
190
+ confidence?: string;
191
+ confidence_interval?: string;
192
+ safety_verdict?: string;
193
+ experiment_url?: string;
194
+ result_label?: string;
195
+ };
196
+ "experiment_exposure": {
197
+ experiment_id: string;
198
+ variant_key: string;
199
+ surface?: string;
200
+ assignment_id?: string;
201
+ };
202
+ "experiment_invalid": {
203
+ experiment_id?: string;
204
+ experiment_name: string;
205
+ href?: string;
206
+ };
207
+ "experiment_launched": {
208
+ experiment_name: string;
209
+ experiment_url?: string;
210
+ hypothesis?: string;
211
+ };
212
+ "experiment_promoted": {
213
+ experiment_name: string;
214
+ winning_arm?: string;
215
+ experiment_url?: string;
216
+ };
217
+ "experiment_significant": {
218
+ experiment_name: string;
219
+ winning_arm?: string;
220
+ lift?: string;
221
+ experiment_url?: string;
222
+ };
223
+ "experiment_stale": {
224
+ experiment_name: string;
225
+ reason?: string;
226
+ conclusion?: string;
227
+ experiment_url?: string;
228
+ };
229
+ "experiment_started": {
230
+ experiment_name: string;
231
+ experiment_url?: string;
232
+ };
233
+ "feature_unused_for_7d": {
234
+ name?: string;
235
+ first_name?: string;
236
+ feature_name: string;
237
+ cta_url?: string;
238
+ };
239
+ "feature_used": {
240
+ feature_name: string;
241
+ count?: number;
242
+ };
243
+ "first_sale_completed": {
244
+ order_id?: string;
245
+ value?: number;
246
+ currency?: string;
247
+ buyer_name?: string;
248
+ product_name?: string;
249
+ payout_days?: number;
250
+ };
251
+ "form_submit": {
252
+ form_id?: string;
253
+ };
254
+ "goal_conversion": {
255
+ goal_id: string;
256
+ value?: number;
257
+ };
258
+ "guardrail_autopaused": {
259
+ experiment_id?: string;
260
+ experiment_name: string;
261
+ href?: string;
262
+ };
263
+ "guardrail_breached": {
264
+ experiment_id?: string;
265
+ experiment_name: string;
266
+ href?: string;
267
+ };
268
+ "heartbeat": Record<string, never>;
269
+ "in_app_message_clicked": {
270
+ message_id?: string;
271
+ campaign_id?: string;
272
+ cta?: string;
273
+ };
274
+ "in_app_message_seen": {
275
+ message_id?: string;
276
+ campaign_id?: string;
277
+ };
278
+ "in_app_purchase": {
279
+ order_id: string;
280
+ value: number;
281
+ currency: string;
282
+ product_id?: string;
283
+ product_name?: string;
284
+ transaction_id?: string;
285
+ items?: unknown[];
286
+ is_restored?: boolean;
287
+ subtotal?: number;
288
+ total?: number;
289
+ tax?: number;
290
+ shipping?: number;
291
+ handling?: number;
292
+ discount?: number;
293
+ coupon?: string;
294
+ };
295
+ "integration_connected": {
296
+ integration_name: string;
297
+ integrations_url?: string;
298
+ };
299
+ "integration_sync_completed": {
300
+ integration_name: string;
301
+ row_count?: number;
302
+ performance_url?: string;
303
+ integrations_url?: string;
304
+ };
305
+ "integration_sync_failed": {
306
+ integration_name: string;
307
+ error_message?: string;
308
+ integrations_url?: string;
309
+ };
310
+ "invoice_paid": {
311
+ invoice_id: string;
312
+ amount: number;
313
+ currency: string;
314
+ subscription_id?: string;
315
+ next_billing_date?: string;
316
+ };
317
+ "js_error": {
318
+ message?: string;
319
+ stack?: string;
320
+ };
321
+ "lifecycle_transition": Record<string, never>;
322
+ "listing_created": {
323
+ listing_id?: string;
324
+ product_name?: string;
325
+ price?: number;
326
+ currency?: string;
327
+ };
328
+ "loyalty_milestone_reached": {
329
+ points?: number;
330
+ reward?: string;
331
+ milestone?: string;
332
+ };
333
+ "new_capability_launched": {
334
+ capability_id?: string;
335
+ capability_name?: string;
336
+ capability_description?: string;
337
+ };
338
+ "nudge_scheduled": {
339
+ name?: string;
340
+ first_name?: string;
341
+ nudge_body: string;
342
+ nudge_url?: string;
343
+ };
344
+ "onboarding_completed": {
345
+ duration_ms?: number;
346
+ steps_completed?: number;
347
+ };
348
+ "onboarding_in_progress": {
349
+ name?: string;
350
+ first_name?: string;
351
+ steps_remaining?: number;
352
+ onboarding_url?: string;
353
+ };
354
+ "onboarding_step_completed": {
355
+ step_id?: string;
356
+ step_index?: number;
357
+ step_name?: string;
358
+ };
359
+ "order_delivered": {
360
+ order_id: string;
361
+ delivered_at?: string;
362
+ };
363
+ "order_placed": {
364
+ order_id: string;
365
+ value: number;
366
+ currency?: string;
367
+ item_count?: number;
368
+ product_name?: string;
369
+ order_url?: string;
370
+ subtotal?: number;
371
+ total?: number;
372
+ tax?: number;
373
+ shipping?: number;
374
+ handling?: number;
375
+ discount?: number;
376
+ coupon?: string;
377
+ };
378
+ "order_shipped": {
379
+ order_id: string;
380
+ carrier?: string;
381
+ tracking_url?: string;
382
+ delivery_estimate?: string;
383
+ shipped_at?: string;
384
+ };
385
+ "page_view": {
386
+ path?: string;
387
+ title?: string;
388
+ referrer?: string;
389
+ };
390
+ "pageview": {
391
+ path?: string;
392
+ title?: string;
393
+ referrer?: string;
394
+ };
395
+ "password_reset_requested": {
396
+ name?: string;
397
+ reset_url: string;
398
+ };
399
+ "payment_failed": {
400
+ invoice_id: string;
401
+ amount: number;
402
+ currency: string;
403
+ subscription_id?: string;
404
+ transaction_id?: string;
405
+ attempt_number?: number;
406
+ next_retry_at?: string;
407
+ update_payment_url?: string;
408
+ };
409
+ "payment_recovered": {
410
+ invoice_id: string;
411
+ amount: number;
412
+ currency: string;
413
+ subscription_id?: string;
414
+ transaction_id?: string;
415
+ };
416
+ "payout_sent": {
417
+ amount: number;
418
+ currency: string;
419
+ payout_id?: string;
420
+ transaction_count?: number;
421
+ payment_method?: string;
422
+ processing_days?: number;
423
+ };
424
+ "portfolio_access_approved": {
425
+ granter_name: string;
426
+ scope?: string;
427
+ portfolio_url?: string;
428
+ portfolio_name?: string;
429
+ };
430
+ "portfolio_access_rejected": {
431
+ granter_name: string;
432
+ portfolio_name?: string;
433
+ reason?: string;
434
+ };
435
+ "portfolio_access_requested": {
436
+ requester_name: string;
437
+ requester_email?: string;
438
+ portfolio_name?: string;
439
+ approve_url: string;
440
+ reject_url?: string;
441
+ };
442
+ "portfolio_share_accepted": {
443
+ viewer_email: string;
444
+ portfolio_name?: string;
445
+ portfolio_url?: string;
446
+ owner_name?: string;
447
+ shared_at?: string;
448
+ };
449
+ "price_dropped": {
450
+ product_id?: string;
451
+ product_name: string;
452
+ old_price?: number;
453
+ new_price?: number;
454
+ discount_percent?: number;
455
+ currency?: string;
456
+ product_url?: string;
457
+ };
458
+ "product_view": {
459
+ product_id: string;
460
+ product_name?: string;
461
+ category?: string;
462
+ value?: number;
463
+ currency?: string;
464
+ };
465
+ "purchase_refunded": {
466
+ order_id: string;
467
+ value: number;
468
+ currency: string;
469
+ reason?: string;
470
+ };
471
+ "push_opened": {
472
+ message_id?: string;
473
+ campaign_id?: string;
474
+ deep_link?: string;
475
+ };
476
+ "push_received": {
477
+ message_id?: string;
478
+ campaign_id?: string;
479
+ };
480
+ "rage_click": {
481
+ target?: string;
482
+ };
483
+ "rate_change_scheduled": {
484
+ name?: string;
485
+ first_name?: string;
486
+ org_name?: string;
487
+ rate_card: string;
488
+ effective_period: string;
489
+ effective_label?: string;
490
+ changes_summary: string;
491
+ pricing_url?: string;
492
+ };
493
+ "reattribution": {
494
+ partner_id?: string;
495
+ original_install_id?: string;
496
+ };
497
+ "reengagement": {
498
+ partner_id?: string;
499
+ inactive_days?: number;
500
+ };
501
+ "remove_from_cart": {
502
+ product_id: string;
503
+ product_name?: string;
504
+ value?: number;
505
+ currency?: string;
506
+ quantity?: number;
507
+ cart_id?: string;
508
+ };
509
+ "report_generated": {
510
+ report_type?: string;
511
+ report_id?: string;
512
+ period?: string;
513
+ highlights?: string;
514
+ report_url?: string;
515
+ };
516
+ "restock_due": {
517
+ product_id?: string;
518
+ product_name: string;
519
+ days_since_purchase?: number;
520
+ product_url?: string;
521
+ };
522
+ "review_request_due": {
523
+ product_id?: string;
524
+ product_name: string;
525
+ order_id?: string;
526
+ days_ago?: number;
527
+ review_url?: string;
528
+ };
529
+ "screen_view": {
530
+ screen_name: string;
531
+ previous_screen?: string;
532
+ };
533
+ "search": {
534
+ query: string;
535
+ results_count?: number;
536
+ };
537
+ "seller_signup": {
538
+ seller_id?: string;
539
+ store_name?: string;
540
+ };
541
+ "session_end": {
542
+ session_id?: string;
543
+ duration_ms?: number;
544
+ };
545
+ "session_start": {
546
+ session_id?: string;
547
+ };
548
+ "share": {
549
+ content_id?: string;
550
+ channel?: string;
551
+ };
552
+ "smart_banner_click": Record<string, never>;
553
+ "smart_banner_dismiss": Record<string, never>;
554
+ "smart_banner_impression": Record<string, never>;
555
+ "subscription_canceled": {
556
+ product_id: string;
557
+ reason?: string;
558
+ expires_at?: string;
559
+ };
560
+ "subscription_downgraded": {
561
+ name?: string;
562
+ first_name?: string;
563
+ from_plan: string;
564
+ to_plan: string;
565
+ dashboard_url?: string;
566
+ };
567
+ "subscription_event": {
568
+ product_id: string;
569
+ action: string;
570
+ amount?: number;
571
+ currency?: string;
572
+ period_type?: string;
573
+ transaction_id?: string;
574
+ expires_at?: string;
575
+ is_trial?: boolean;
576
+ };
577
+ "subscription_renewed": {
578
+ product_id?: string;
579
+ amount?: number;
580
+ currency?: string;
581
+ period_type?: string;
582
+ transaction_id?: string;
583
+ };
584
+ "subscription_started": {
585
+ product_id: string;
586
+ amount?: number;
587
+ currency?: string;
588
+ period_type?: string;
589
+ transaction_id?: string;
590
+ is_trial?: boolean;
591
+ };
592
+ "subscription_upgraded": {
593
+ name?: string;
594
+ first_name?: string;
595
+ from_plan: string;
596
+ to_plan: string;
597
+ dashboard_url?: string;
598
+ };
599
+ "survey_completed": {
600
+ survey_id?: string;
601
+ score?: number;
602
+ };
603
+ "survey_started": {
604
+ survey_id?: string;
605
+ };
606
+ "tier_limit_approaching": {
607
+ name?: string;
608
+ first_name?: string;
609
+ current_tier: string;
610
+ next_tier?: string;
611
+ feature_count?: number;
612
+ top_feature?: string;
613
+ usage_percent?: number;
614
+ usage_current?: number;
615
+ usage_limit?: number;
616
+ resource_name?: string;
617
+ recommended_plan?: string;
618
+ upgrade_url?: string;
619
+ };
620
+ "trial_expired": {
621
+ plan?: string;
622
+ };
623
+ "trial_expiring": {
624
+ name?: string;
625
+ first_name?: string;
626
+ days_remaining?: number;
627
+ plan?: string;
628
+ value_summary?: string;
629
+ upgrade_url?: string;
630
+ };
631
+ "trust_badge_earned": {
632
+ badge_name: string;
633
+ };
634
+ "unsubscribed": {
635
+ message_id?: string;
636
+ campaign_id?: string;
637
+ list_id?: string;
638
+ };
639
+ "usage_milestone_reached": {
640
+ milestone?: string;
641
+ percentile?: number;
642
+ };
643
+ "usage_period_reset": {
644
+ name?: string;
645
+ first_name?: string;
646
+ period: string;
647
+ usage_url?: string;
648
+ };
649
+ "usage_statement_ready": {
650
+ name?: string;
651
+ first_name?: string;
652
+ period: string;
653
+ est_total?: number;
654
+ statement_url?: string;
655
+ };
656
+ "usage_threshold_reached": {
657
+ name?: string;
658
+ first_name?: string;
659
+ billing_class: string;
660
+ meter_label: string;
661
+ usage_pct: number;
662
+ free_limit: number;
663
+ usage_current: number;
664
+ period: string;
665
+ cap_kind: string;
666
+ overage_rate?: number;
667
+ usage_url?: string;
668
+ };
669
+ "user_churned": {
670
+ reason?: string;
671
+ };
672
+ "user_identified": {
673
+ user_id: string;
674
+ traits?: Record<string, unknown>;
675
+ };
676
+ "user_invitation_accepted": {
677
+ member_name: string;
678
+ inviter_name?: string;
679
+ inviter_email?: string;
680
+ org_name: string;
681
+ role: string;
682
+ invitee_email?: string;
683
+ href?: string;
684
+ };
685
+ "user_invitation_created": {
686
+ inviter_name: string;
687
+ inviter_email?: string;
688
+ org_name: string;
689
+ org_id: string;
690
+ invitee_email: string;
691
+ role: string;
692
+ accept_url: string;
693
+ invitation_token?: string;
694
+ invitation_id?: string;
695
+ };
696
+ "user_level_up": {
697
+ name?: string;
698
+ first_name?: string;
699
+ level: string;
700
+ previous_level?: string;
701
+ score?: number;
702
+ growth_journey_url?: string;
703
+ };
704
+ "user_reactivated": {
705
+ inactive_days?: number;
706
+ changes_summary?: string;
707
+ };
708
+ "user_signed_in": {
709
+ method?: string;
710
+ };
711
+ "user_signed_out": Record<string, never>;
712
+ "user_signed_up": {
713
+ method?: string;
714
+ referrer?: string;
715
+ };
716
+ "user_signup": {
717
+ name?: string;
718
+ first_name?: string;
719
+ onboarding_url?: string;
720
+ };
721
+ "webinar_registered": {
722
+ webinar_topic?: string;
723
+ webinar_date?: string;
724
+ };
725
+ "weekly_digest_scheduled": {
726
+ name?: string;
727
+ first_name?: string;
728
+ period: string;
729
+ digest_url?: string;
730
+ total_imports?: string;
731
+ active_integrations?: string;
732
+ experiments?: string;
733
+ };
734
+ }
735
+ export type ApexEventName = keyof ApexEventPayloads;
736
+ //# sourceMappingURL=event-payloads.d.ts.map