@apex-inc/sdk 0.8.0 → 0.10.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,855 @@
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
+ "api_request_completed": {
59
+ endpoint?: string;
60
+ count?: number;
61
+ };
62
+ "app_background": Record<string, never>;
63
+ "app_crash": {
64
+ message?: string;
65
+ stack?: string;
66
+ fatal?: boolean;
67
+ };
68
+ "app_install": Record<string, never>;
69
+ "app_open": {
70
+ source?: string;
71
+ };
72
+ "app_reinstall": Record<string, never>;
73
+ "app_uninstall": Record<string, never>;
74
+ "asset_uploaded": {
75
+ asset_id?: string;
76
+ asset_type?: string;
77
+ };
78
+ "badge_awarded": {
79
+ badge_name: string;
80
+ category?: string;
81
+ impact_message?: string;
82
+ total_badges?: number;
83
+ next_badge?: string;
84
+ growth_journey_url?: string;
85
+ };
86
+ "buyer_review_requested": {
87
+ order_id?: string;
88
+ product_name?: string;
89
+ seller_name?: string;
90
+ };
91
+ "campaign_milestone_reached": {
92
+ campaign_id?: string;
93
+ campaign_name?: string;
94
+ milestone?: string;
95
+ business_impact?: string;
96
+ };
97
+ "cart_snapshot": {
98
+ items: unknown[];
99
+ value?: number;
100
+ currency?: string;
101
+ item_count?: number;
102
+ cart_id?: string;
103
+ };
104
+ "cart_view": {
105
+ value?: number;
106
+ currency?: string;
107
+ item_count?: number;
108
+ cart_id?: string;
109
+ };
110
+ "checkout_completed": {
111
+ order_id?: string;
112
+ value: number;
113
+ currency: string;
114
+ item_count?: number;
115
+ items?: unknown[];
116
+ cart_id?: string;
117
+ subtotal?: number;
118
+ total?: number;
119
+ tax?: number;
120
+ shipping?: number;
121
+ handling?: number;
122
+ discount?: number;
123
+ coupon?: string;
124
+ };
125
+ "checkout_started": {
126
+ value?: number;
127
+ currency?: string;
128
+ item_count?: number;
129
+ cart_id?: string;
130
+ };
131
+ "click": {
132
+ target?: string;
133
+ };
134
+ "client_onboarded": {
135
+ client_id?: string;
136
+ client_name?: string;
137
+ manager_name?: string;
138
+ };
139
+ "client_report_viewed": {
140
+ report_id?: string;
141
+ client_id?: string;
142
+ };
143
+ "cognito_verification_code": {
144
+ code: string;
145
+ code_parameter?: string;
146
+ };
147
+ "comment_added": {
148
+ target_id?: string;
149
+ };
150
+ "content_view": {
151
+ content_id: string;
152
+ content_type?: string;
153
+ duration_ms?: number;
154
+ };
155
+ "content_viewed": {
156
+ content_id?: string;
157
+ content_type?: string;
158
+ };
159
+ "contract_renewal_approaching": {
160
+ contract_id?: string;
161
+ days_remaining?: number;
162
+ renewal_date?: string;
163
+ contract_period?: string;
164
+ };
165
+ "custom": Record<string, never>;
166
+ "dead_click": {
167
+ target?: string;
168
+ };
169
+ "deep_link_open": {
170
+ url: string;
171
+ source?: string;
172
+ campaign_id?: string;
173
+ referrer?: string;
174
+ };
175
+ "developer_invite_sent": {
176
+ inviter_name: string;
177
+ inviter_role?: string;
178
+ developer_email: string;
179
+ workspace_name?: string;
180
+ note?: string;
181
+ handoff_url: string;
182
+ signup_url?: string;
183
+ };
184
+ "dispute_opened": {
185
+ transaction_id?: string;
186
+ reason?: string;
187
+ opened_by?: string;
188
+ };
189
+ "drip_step_scheduled": {
190
+ step_label: string;
191
+ step_body?: string;
192
+ step_url?: string;
193
+ };
194
+ "email_clicked": {
195
+ message_id?: string;
196
+ campaign_id?: string;
197
+ link?: string;
198
+ };
199
+ "email_opened": {
200
+ message_id?: string;
201
+ campaign_id?: string;
202
+ };
203
+ "engagement": Record<string, never>;
204
+ "experiment_awaiting_promotion": {
205
+ experiment_name: string;
206
+ winning_arm?: string;
207
+ confidence?: string;
208
+ experiment_url?: string;
209
+ };
210
+ "experiment_concluded": {
211
+ experiment_name: string;
212
+ result?: string;
213
+ lift?: string;
214
+ confidence?: string;
215
+ confidence_interval?: string;
216
+ safety_verdict?: string;
217
+ experiment_url?: string;
218
+ result_label?: string;
219
+ };
220
+ "experiment_exposure": {
221
+ experiment_id: string;
222
+ variant_key: string;
223
+ surface?: string;
224
+ assignment_id?: string;
225
+ };
226
+ "experiment_invalid": {
227
+ experiment_id?: string;
228
+ experiment_name: string;
229
+ href?: string;
230
+ };
231
+ "experiment_launched": {
232
+ experiment_name: string;
233
+ experiment_url?: string;
234
+ hypothesis?: string;
235
+ };
236
+ "experiment_promoted": {
237
+ experiment_name: string;
238
+ winning_arm?: string;
239
+ experiment_url?: string;
240
+ };
241
+ "experiment_significant": {
242
+ experiment_name: string;
243
+ winning_arm?: string;
244
+ lift?: string;
245
+ experiment_url?: string;
246
+ };
247
+ "experiment_stale": {
248
+ experiment_name: string;
249
+ reason?: string;
250
+ conclusion?: string;
251
+ experiment_url?: string;
252
+ };
253
+ "experiment_started": {
254
+ experiment_name: string;
255
+ experiment_url?: string;
256
+ };
257
+ "feature_unused_for_7d": {
258
+ name?: string;
259
+ first_name?: string;
260
+ feature_name: string;
261
+ cta_url?: string;
262
+ };
263
+ "feature_used": {
264
+ feature_name: string;
265
+ count?: number;
266
+ };
267
+ "first_sale_completed": {
268
+ order_id?: string;
269
+ value?: number;
270
+ currency?: string;
271
+ buyer_name?: string;
272
+ product_name?: string;
273
+ payout_days?: number;
274
+ };
275
+ "form_submit": {
276
+ form_id?: string;
277
+ };
278
+ "goal_conversion": {
279
+ goal_id: string;
280
+ value?: number;
281
+ };
282
+ "guardrail_autopaused": {
283
+ experiment_id?: string;
284
+ experiment_name: string;
285
+ href?: string;
286
+ };
287
+ "guardrail_breached": {
288
+ experiment_id?: string;
289
+ experiment_name: string;
290
+ href?: string;
291
+ };
292
+ "heartbeat": Record<string, never>;
293
+ "in_app_message_clicked": {
294
+ message_id?: string;
295
+ campaign_id?: string;
296
+ cta?: string;
297
+ };
298
+ "in_app_message_seen": {
299
+ message_id?: string;
300
+ campaign_id?: string;
301
+ };
302
+ "in_app_purchase": {
303
+ order_id: string;
304
+ value: number;
305
+ currency: string;
306
+ product_id?: string;
307
+ product_name?: string;
308
+ transaction_id?: string;
309
+ items?: unknown[];
310
+ is_restored?: boolean;
311
+ subtotal?: number;
312
+ total?: number;
313
+ tax?: number;
314
+ shipping?: number;
315
+ handling?: number;
316
+ discount?: number;
317
+ coupon?: string;
318
+ };
319
+ "inquiry_started": {
320
+ listing_id?: string;
321
+ thread_id?: string;
322
+ };
323
+ "integration_connected": {
324
+ integration_name: string;
325
+ integrations_url?: string;
326
+ };
327
+ "integration_sync_completed": {
328
+ integration_name: string;
329
+ row_count?: number;
330
+ performance_url?: string;
331
+ integrations_url?: string;
332
+ };
333
+ "integration_sync_failed": {
334
+ integration_name: string;
335
+ error_message?: string;
336
+ integrations_url?: string;
337
+ };
338
+ "invoice_paid": {
339
+ invoice_id: string;
340
+ amount: number;
341
+ currency: string;
342
+ subscription_id?: string;
343
+ next_billing_date?: string;
344
+ };
345
+ "item_saved": {
346
+ listing_id?: string;
347
+ product_name?: string;
348
+ };
349
+ "js_error": {
350
+ message?: string;
351
+ stack?: string;
352
+ };
353
+ "lifecycle_transition": Record<string, never>;
354
+ "listing_created": {
355
+ listing_id?: string;
356
+ product_name?: string;
357
+ price?: number;
358
+ currency?: string;
359
+ };
360
+ "listing_viewed": {
361
+ listing_id?: string;
362
+ product_name?: string;
363
+ };
364
+ "loyalty_milestone_reached": {
365
+ points?: number;
366
+ reward?: string;
367
+ milestone?: string;
368
+ };
369
+ "match_created": {
370
+ listing_id?: string;
371
+ buyer_id?: string;
372
+ seller_id?: string;
373
+ amount?: number;
374
+ currency?: string;
375
+ };
376
+ "message_sent": {
377
+ thread_id?: string;
378
+ };
379
+ "new_capability_launched": {
380
+ capability_id?: string;
381
+ capability_name?: string;
382
+ capability_description?: string;
383
+ };
384
+ "nudge_scheduled": {
385
+ name?: string;
386
+ first_name?: string;
387
+ nudge_body: string;
388
+ nudge_url?: string;
389
+ };
390
+ "offer_submitted": {
391
+ listing_id?: string;
392
+ amount?: number;
393
+ currency?: string;
394
+ };
395
+ "onboarding_completed": {
396
+ duration_ms?: number;
397
+ steps_completed?: number;
398
+ };
399
+ "onboarding_in_progress": {
400
+ name?: string;
401
+ first_name?: string;
402
+ steps_remaining?: number;
403
+ onboarding_url?: string;
404
+ };
405
+ "onboarding_step_completed": {
406
+ step_id?: string;
407
+ step_index?: number;
408
+ step_name?: string;
409
+ };
410
+ "order_delivered": {
411
+ order_id: string;
412
+ delivered_at?: string;
413
+ };
414
+ "order_placed": {
415
+ order_id: string;
416
+ value: number;
417
+ currency?: string;
418
+ item_count?: number;
419
+ product_name?: string;
420
+ order_url?: string;
421
+ subtotal?: number;
422
+ total?: number;
423
+ tax?: number;
424
+ shipping?: number;
425
+ handling?: number;
426
+ discount?: number;
427
+ coupon?: string;
428
+ };
429
+ "order_shipped": {
430
+ order_id: string;
431
+ carrier?: string;
432
+ tracking_url?: string;
433
+ delivery_estimate?: string;
434
+ shipped_at?: string;
435
+ };
436
+ "page_view": {
437
+ path?: string;
438
+ title?: string;
439
+ referrer?: string;
440
+ };
441
+ "pageview": {
442
+ path?: string;
443
+ title?: string;
444
+ referrer?: string;
445
+ };
446
+ "password_reset_requested": {
447
+ name?: string;
448
+ reset_url: string;
449
+ };
450
+ "payment_failed": {
451
+ invoice_id: string;
452
+ amount: number;
453
+ currency: string;
454
+ subscription_id?: string;
455
+ transaction_id?: string;
456
+ attempt_number?: number;
457
+ next_retry_at?: string;
458
+ update_payment_url?: string;
459
+ };
460
+ "payment_recovered": {
461
+ invoice_id: string;
462
+ amount: number;
463
+ currency: string;
464
+ subscription_id?: string;
465
+ transaction_id?: string;
466
+ };
467
+ "payout_sent": {
468
+ amount: number;
469
+ currency: string;
470
+ payout_id?: string;
471
+ transaction_count?: number;
472
+ payment_method?: string;
473
+ processing_days?: number;
474
+ };
475
+ "portfolio_access_approved": {
476
+ granter_name: string;
477
+ scope?: string;
478
+ portfolio_url?: string;
479
+ portfolio_name?: string;
480
+ };
481
+ "portfolio_access_rejected": {
482
+ granter_name: string;
483
+ portfolio_name?: string;
484
+ reason?: string;
485
+ };
486
+ "portfolio_access_requested": {
487
+ requester_name: string;
488
+ requester_email?: string;
489
+ portfolio_name?: string;
490
+ approve_url: string;
491
+ reject_url?: string;
492
+ };
493
+ "portfolio_share_accepted": {
494
+ viewer_email: string;
495
+ portfolio_name?: string;
496
+ portfolio_url?: string;
497
+ owner_name?: string;
498
+ shared_at?: string;
499
+ };
500
+ "price_dropped": {
501
+ product_id?: string;
502
+ product_name: string;
503
+ old_price?: number;
504
+ new_price?: number;
505
+ discount_percent?: number;
506
+ currency?: string;
507
+ product_url?: string;
508
+ };
509
+ "product_view": {
510
+ product_id: string;
511
+ product_name?: string;
512
+ category?: string;
513
+ value?: number;
514
+ currency?: string;
515
+ };
516
+ "project_created": {
517
+ project_id?: string;
518
+ project_name?: string;
519
+ };
520
+ "purchase_refunded": {
521
+ order_id: string;
522
+ value: number;
523
+ currency: string;
524
+ reason?: string;
525
+ product_id?: string;
526
+ };
527
+ "push_opened": {
528
+ message_id?: string;
529
+ campaign_id?: string;
530
+ deep_link?: string;
531
+ };
532
+ "push_received": {
533
+ message_id?: string;
534
+ campaign_id?: string;
535
+ };
536
+ "rage_click": {
537
+ target?: string;
538
+ };
539
+ "rate_change_scheduled": {
540
+ name?: string;
541
+ first_name?: string;
542
+ org_name?: string;
543
+ rate_card: string;
544
+ effective_period: string;
545
+ effective_label?: string;
546
+ changes_summary: string;
547
+ pricing_url?: string;
548
+ };
549
+ "reattribution": {
550
+ partner_id?: string;
551
+ original_install_id?: string;
552
+ };
553
+ "reengagement": {
554
+ partner_id?: string;
555
+ inactive_days?: number;
556
+ };
557
+ "remove_from_cart": {
558
+ product_id: string;
559
+ product_name?: string;
560
+ value?: number;
561
+ currency?: string;
562
+ quantity?: number;
563
+ cart_id?: string;
564
+ };
565
+ "report_generated": {
566
+ report_type?: string;
567
+ report_id?: string;
568
+ period?: string;
569
+ highlights?: string;
570
+ report_url?: string;
571
+ };
572
+ "report_viewed": {
573
+ report_id?: string;
574
+ report_name?: string;
575
+ };
576
+ "restock_due": {
577
+ product_id?: string;
578
+ product_name: string;
579
+ days_since_purchase?: number;
580
+ product_url?: string;
581
+ };
582
+ "return_completed": {
583
+ order_id: string;
584
+ product_id?: string;
585
+ reason?: string;
586
+ condition?: string;
587
+ refunded?: boolean;
588
+ };
589
+ "return_requested": {
590
+ order_id: string;
591
+ product_id?: string;
592
+ reason?: string;
593
+ quantity?: number;
594
+ };
595
+ "review_request_due": {
596
+ product_id?: string;
597
+ product_name: string;
598
+ order_id?: string;
599
+ days_ago?: number;
600
+ review_url?: string;
601
+ };
602
+ "review_submitted": {
603
+ transaction_id?: string;
604
+ listing_id?: string;
605
+ rating?: number;
606
+ reviewer_side?: string;
607
+ };
608
+ "screen_view": {
609
+ screen_name: string;
610
+ previous_screen?: string;
611
+ };
612
+ "search": {
613
+ query: string;
614
+ results_count?: number;
615
+ };
616
+ "seller_signup": {
617
+ seller_id?: string;
618
+ store_name?: string;
619
+ };
620
+ "seller_viewed": {
621
+ seller_id?: string;
622
+ store_name?: string;
623
+ };
624
+ "session_end": {
625
+ session_id?: string;
626
+ duration_ms?: number;
627
+ };
628
+ "session_start": {
629
+ session_id?: string;
630
+ };
631
+ "share": {
632
+ content_id?: string;
633
+ channel?: string;
634
+ };
635
+ "smart_banner_click": Record<string, never>;
636
+ "smart_banner_dismiss": Record<string, never>;
637
+ "smart_banner_impression": Record<string, never>;
638
+ "subscription_canceled": {
639
+ product_id: string;
640
+ reason?: string;
641
+ expires_at?: string;
642
+ };
643
+ "subscription_downgraded": {
644
+ product_id?: string;
645
+ from_plan?: string;
646
+ to_plan?: string;
647
+ amount?: number;
648
+ currency?: string;
649
+ period_type?: string;
650
+ seat_count?: number;
651
+ reason?: string;
652
+ };
653
+ "subscription_event": {
654
+ product_id: string;
655
+ action: string;
656
+ amount?: number;
657
+ currency?: string;
658
+ period_type?: string;
659
+ transaction_id?: string;
660
+ expires_at?: string;
661
+ is_trial?: boolean;
662
+ seat_count?: number;
663
+ };
664
+ "subscription_renewed": {
665
+ product_id?: string;
666
+ amount?: number;
667
+ currency?: string;
668
+ period_type?: string;
669
+ transaction_id?: string;
670
+ };
671
+ "subscription_started": {
672
+ product_id: string;
673
+ amount?: number;
674
+ currency?: string;
675
+ period_type?: string;
676
+ transaction_id?: string;
677
+ is_trial?: boolean;
678
+ };
679
+ "subscription_upgraded": {
680
+ product_id?: string;
681
+ from_plan?: string;
682
+ to_plan?: string;
683
+ amount?: number;
684
+ currency?: string;
685
+ period_type?: string;
686
+ seat_count?: number;
687
+ };
688
+ "survey_completed": {
689
+ survey_id?: string;
690
+ score?: number;
691
+ };
692
+ "survey_started": {
693
+ survey_id?: string;
694
+ };
695
+ "task_completed": {
696
+ task_id?: string;
697
+ task_type?: string;
698
+ };
699
+ "task_updated": {
700
+ task_id?: string;
701
+ status?: string;
702
+ };
703
+ "tier_limit_approaching": {
704
+ name?: string;
705
+ first_name?: string;
706
+ current_tier: string;
707
+ next_tier?: string;
708
+ feature_count?: number;
709
+ top_feature?: string;
710
+ usage_percent?: number;
711
+ usage_current?: number;
712
+ usage_limit?: number;
713
+ resource_name?: string;
714
+ recommended_plan?: string;
715
+ upgrade_url?: string;
716
+ };
717
+ "time_logged": {
718
+ minutes?: number;
719
+ project_id?: string;
720
+ };
721
+ "transaction_canceled": {
722
+ transaction_id?: string;
723
+ reason?: string;
724
+ canceled_by?: string;
725
+ };
726
+ "transaction_completed": {
727
+ transaction_id?: string;
728
+ amount?: number;
729
+ fee_amount?: number;
730
+ cost_amount?: number;
731
+ currency?: string;
732
+ buyer_id?: string;
733
+ seller_id?: string;
734
+ listing_id?: string;
735
+ category?: string;
736
+ geo?: string;
737
+ price_band?: string;
738
+ };
739
+ "trial_expired": {
740
+ plan?: string;
741
+ };
742
+ "trial_expiring": {
743
+ name?: string;
744
+ first_name?: string;
745
+ days_remaining?: number;
746
+ plan?: string;
747
+ value_summary?: string;
748
+ upgrade_url?: string;
749
+ };
750
+ "trust_badge_earned": {
751
+ badge_name: string;
752
+ };
753
+ "unsubscribed": {
754
+ message_id?: string;
755
+ campaign_id?: string;
756
+ list_id?: string;
757
+ };
758
+ "usage_milestone_reached": {
759
+ milestone?: string;
760
+ percentile?: number;
761
+ };
762
+ "usage_period_reset": {
763
+ name?: string;
764
+ first_name?: string;
765
+ period: string;
766
+ usage_url?: string;
767
+ };
768
+ "usage_statement_ready": {
769
+ name?: string;
770
+ first_name?: string;
771
+ period: string;
772
+ est_total?: number;
773
+ statement_url?: string;
774
+ };
775
+ "usage_threshold_reached": {
776
+ name?: string;
777
+ first_name?: string;
778
+ billing_class: string;
779
+ meter_label: string;
780
+ usage_pct: number;
781
+ free_limit: number;
782
+ usage_current: number;
783
+ period: string;
784
+ cap_kind: string;
785
+ overage_rate?: number;
786
+ usage_url?: string;
787
+ };
788
+ "user_churned": {
789
+ reason?: string;
790
+ };
791
+ "user_identified": {
792
+ user_id: string;
793
+ traits?: Record<string, unknown>;
794
+ };
795
+ "user_invitation_accepted": {
796
+ member_name: string;
797
+ inviter_name?: string;
798
+ inviter_email?: string;
799
+ org_name: string;
800
+ role: string;
801
+ invitee_email?: string;
802
+ href?: string;
803
+ };
804
+ "user_invitation_created": {
805
+ inviter_name: string;
806
+ inviter_email?: string;
807
+ org_name: string;
808
+ org_id: string;
809
+ invitee_email: string;
810
+ role: string;
811
+ accept_url: string;
812
+ invitation_token?: string;
813
+ invitation_id?: string;
814
+ };
815
+ "user_level_up": {
816
+ name?: string;
817
+ first_name?: string;
818
+ level: string;
819
+ previous_level?: string;
820
+ score?: number;
821
+ growth_journey_url?: string;
822
+ };
823
+ "user_reactivated": {
824
+ inactive_days?: number;
825
+ changes_summary?: string;
826
+ };
827
+ "user_signed_in": {
828
+ method?: string;
829
+ };
830
+ "user_signed_out": Record<string, never>;
831
+ "user_signed_up": {
832
+ method?: string;
833
+ referrer?: string;
834
+ };
835
+ "user_signup": {
836
+ name?: string;
837
+ first_name?: string;
838
+ onboarding_url?: string;
839
+ };
840
+ "webinar_registered": {
841
+ webinar_topic?: string;
842
+ webinar_date?: string;
843
+ };
844
+ "weekly_digest_scheduled": {
845
+ name?: string;
846
+ first_name?: string;
847
+ period: string;
848
+ digest_url?: string;
849
+ total_imports?: string;
850
+ active_integrations?: string;
851
+ experiments?: string;
852
+ };
853
+ }
854
+ export type ApexEventName = keyof ApexEventPayloads;
855
+ //# sourceMappingURL=event-payloads.d.ts.map