@ak--47/dungeon-master 1.3.0 → 1.4.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dungeons/technical/array-of-object-lookup.js +0 -2
  3. package/dungeons/technical/hook-helpers-verify.js +89 -0
  4. package/dungeons/technical/identity-model-verify.js +47 -0
  5. package/dungeons/technical/pattern-aggregate-by-bin.js +41 -0
  6. package/dungeons/technical/pattern-attributed-by-source.js +42 -0
  7. package/dungeons/technical/pattern-frequency-by-frequency.js +40 -0
  8. package/dungeons/technical/pattern-funnel-frequency.js +54 -0
  9. package/dungeons/technical/pattern-ttc-by-segment.js +45 -0
  10. package/dungeons/technical/simple.js +3 -4
  11. package/dungeons/technical/simplest-schema.json +5 -0
  12. package/dungeons/technical/text-generation.js +1 -1
  13. package/dungeons/vertical/ai-platform.js +216 -164
  14. package/dungeons/vertical/community.js +74 -41
  15. package/dungeons/vertical/crypto.js +343 -233
  16. package/dungeons/vertical/dating.js +246 -292
  17. package/dungeons/vertical/devtools.js +179 -70
  18. package/dungeons/vertical/ecommerce.js +275 -122
  19. package/dungeons/vertical/education.js +345 -312
  20. package/dungeons/vertical/fintech.js +445 -314
  21. package/dungeons/vertical/fitness.js +199 -165
  22. package/dungeons/vertical/food-delivery.js +309 -330
  23. package/dungeons/vertical/gaming.js +387 -241
  24. package/dungeons/vertical/healthcare.js +149 -66
  25. package/dungeons/vertical/insurance-application.js +173 -75
  26. package/dungeons/vertical/logistics.js +107 -12
  27. package/dungeons/vertical/marketplace.js +171 -76
  28. package/dungeons/vertical/media.js +259 -402
  29. package/dungeons/vertical/real-estate.js +336 -318
  30. package/dungeons/vertical/sass.js +294 -288
  31. package/dungeons/vertical/social.js +289 -234
  32. package/dungeons/vertical/travel.js +66 -20
  33. package/index.js +17 -17
  34. package/lib/core/config-validator.js +226 -175
  35. package/lib/core/context.js +10 -24
  36. package/lib/core/storage.js +6 -1
  37. package/lib/generators/events.js +57 -104
  38. package/lib/generators/funnels.js +212 -93
  39. package/lib/generators/mirror.js +3 -2
  40. package/lib/generators/product-names.js +1 -1
  41. package/lib/generators/scd.js +2 -1
  42. package/lib/generators/text.js +1 -1
  43. package/lib/hook-helpers/_internal.js +23 -0
  44. package/lib/hook-helpers/cohort.js +124 -0
  45. package/lib/hook-helpers/identity.js +56 -0
  46. package/lib/hook-helpers/index.js +44 -0
  47. package/lib/hook-helpers/inject.js +99 -0
  48. package/lib/hook-helpers/mutate.js +151 -0
  49. package/lib/hook-helpers/timing.js +99 -0
  50. package/lib/hook-patterns/aggregate-per-user-by-bin.js +38 -0
  51. package/lib/hook-patterns/attributed-by-source.js +72 -0
  52. package/lib/hook-patterns/frequency-by-frequency.js +46 -0
  53. package/lib/hook-patterns/funnel-frequency-breakdown.js +73 -0
  54. package/lib/hook-patterns/index.js +14 -0
  55. package/lib/hook-patterns/time-to-convert-by-segment.js +41 -0
  56. package/lib/orchestrators/user-loop.js +143 -293
  57. package/lib/utils/utils.js +97 -52
  58. package/lib/verify/emulate-breakdown.js +281 -0
  59. package/lib/verify/index.js +12 -0
  60. package/lib/verify/verify-dungeon.js +61 -0
  61. package/package.json +6 -4
  62. package/scripts/smoke-test-all.mjs +162 -0
  63. package/scripts/verify-runner.mjs +72 -24
  64. package/types.d.ts +434 -225
  65. package/dungeons/technical/ad-spend-schema.json +0 -128
  66. package/dungeons/technical/anonymous-users-schema.json +0 -92
  67. package/dungeons/technical/array-of-object-lookup-schema.json +0 -191
  68. package/dungeons/technical/experiments-schema.json +0 -203
  69. package/dungeons/technical/foobar-schema.json +0 -362
  70. package/dungeons/technical/group-analytics-schema.json +0 -241
  71. package/dungeons/technical/mirror-strategies-schema.json +0 -84
  72. package/dungeons/technical/nested-objects-schema.json +0 -145
  73. package/dungeons/technical/retention-cadence-schema.json +0 -37
  74. package/dungeons/technical/sanity-schema.json +0 -185
  75. package/dungeons/technical/scale-test-schema.json +0 -70
  76. package/dungeons/technical/scd-schema.json +0 -467
  77. package/dungeons/technical/simple-schema.json +0 -362
  78. package/dungeons/technical/text-generation-schema.json +0 -1062
  79. package/dungeons/vertical/ai-platform-schema.json +0 -617
  80. package/dungeons/vertical/community-schema.json +0 -579
  81. package/dungeons/vertical/crypto-schema.json +0 -546
  82. package/dungeons/vertical/dating-schema.json +0 -401
  83. package/dungeons/vertical/devtools-schema.json +0 -601
  84. package/dungeons/vertical/ecommerce-schema.json +0 -604
  85. package/dungeons/vertical/education-schema.json +0 -5686
  86. package/dungeons/vertical/fintech-schema.json +0 -630
  87. package/dungeons/vertical/fitness-schema.json +0 -530
  88. package/dungeons/vertical/food-delivery-schema.json +0 -36728
  89. package/dungeons/vertical/gaming-schema.json +0 -2703
  90. package/dungeons/vertical/healthcare-schema.json +0 -549
  91. package/dungeons/vertical/insurance-application-schema.json +0 -485
  92. package/dungeons/vertical/logistics-schema.json +0 -574
  93. package/dungeons/vertical/marketplace-schema.json +0 -533
  94. package/dungeons/vertical/media-schema.json +0 -4749
  95. package/dungeons/vertical/real-estate-schema.json +0 -527
  96. package/dungeons/vertical/sass-schema.json +0 -3128
  97. package/dungeons/vertical/social-schema.json +0 -620
  98. package/dungeons/vertical/travel-schema.json +0 -580
@@ -1,630 +0,0 @@
1
- {
2
- "events": [
3
- {
4
- "event": "account opened",
5
- "isFirstEvent": true,
6
- "properties": {
7
- "account_type": [
8
- "personal",
9
- "business"
10
- ],
11
- "signup_channel": [
12
- "app",
13
- "web",
14
- "referral",
15
- "branch"
16
- ]
17
- }
18
- },
19
- {
20
- "event": "app session",
21
- "weight": 20,
22
- "properties": {
23
- "session_duration_sec": {
24
- "$range": [
25
- 115,
26
- 487
27
- ]
28
- },
29
- "pages_viewed": [
30
- 5,
31
- 10,
32
- 4
33
- ],
34
- "month_end_anxiety": [
35
- false
36
- ]
37
- }
38
- },
39
- {
40
- "event": "balance checked",
41
- "weight": 15,
42
- "properties": {
43
- "account_balance": {
44
- "$range": [
45
- 4,
46
- 49589
47
- ]
48
- },
49
- "account_type": [
50
- "checking",
51
- "savings",
52
- "investment"
53
- ],
54
- "month_end_check": [
55
- false
56
- ]
57
- }
58
- },
59
- {
60
- "event": "transaction completed",
61
- "weight": 18,
62
- "properties": {
63
- "transaction_type": [
64
- "purchase",
65
- "atm",
66
- "direct_deposit",
67
- "refund"
68
- ],
69
- "amount": {
70
- "$range": [
71
- 996,
72
- 3927
73
- ]
74
- },
75
- "merchant_category": [
76
- "grocery",
77
- "restaurant",
78
- "gas",
79
- "retail",
80
- "online",
81
- "subscription",
82
- "utilities"
83
- ],
84
- "payment_method": [
85
- "debit",
86
- "credit",
87
- "contactless",
88
- "online"
89
- ],
90
- "payday": [
91
- false
92
- ],
93
- "fraud_sequence": [
94
- false
95
- ]
96
- }
97
- },
98
- {
99
- "event": "transfer sent",
100
- "weight": 8,
101
- "properties": {
102
- "transfer_type": [
103
- "internal",
104
- "external",
105
- "p2p",
106
- "wire"
107
- ],
108
- "amount": {
109
- "$range": [
110
- 1690,
111
- 8053
112
- ]
113
- },
114
- "recipient_type": [
115
- "friend",
116
- "family",
117
- "business",
118
- "self"
119
- ],
120
- "post_payday_spending": [
121
- false
122
- ]
123
- }
124
- },
125
- {
126
- "event": "bill paid",
127
- "weight": 6,
128
- "properties": {
129
- "bill_type": [
130
- "rent",
131
- "utilities",
132
- "phone",
133
- "insurance",
134
- "subscription",
135
- "loan_payment"
136
- ],
137
- "amount": {
138
- "$range": [
139
- 376,
140
- 2710
141
- ]
142
- },
143
- "auto_pay": [
144
- false,
145
- true
146
- ],
147
- "missed_payment": [
148
- false
149
- ],
150
- "manual_payment": [
151
- false
152
- ]
153
- }
154
- },
155
- {
156
- "event": "budget created",
157
- "weight": 3,
158
- "properties": {
159
- "category": [
160
- "food",
161
- "transport",
162
- "entertainment",
163
- "shopping",
164
- "bills",
165
- "savings"
166
- ],
167
- "monthly_limit": {
168
- "$range": [
169
- 233,
170
- 1774
171
- ]
172
- }
173
- }
174
- },
175
- {
176
- "event": "budget alert",
177
- "weight": 4,
178
- "properties": {
179
- "alert_type": [
180
- "approaching_limit",
181
- "exceeded",
182
- "on_track"
183
- ],
184
- "percent_used": {
185
- "$range": [
186
- 52,
187
- 145
188
- ]
189
- }
190
- }
191
- },
192
- {
193
- "event": "savings goal set",
194
- "weight": 3,
195
- "properties": {
196
- "goal_type": [
197
- "emergency",
198
- "vacation",
199
- "car",
200
- "home",
201
- "education",
202
- "retirement"
203
- ],
204
- "target_amount": {
205
- "$range": [
206
- 7730,
207
- 41915
208
- ]
209
- },
210
- "monthly_contribution": {
211
- "$range": [
212
- 289,
213
- 1749
214
- ]
215
- },
216
- "budget_discipline": [
217
- false
218
- ]
219
- }
220
- },
221
- {
222
- "event": "investment made",
223
- "weight": 4,
224
- "properties": {
225
- "investment_type": [
226
- "stocks",
227
- "etf",
228
- "crypto",
229
- "bonds",
230
- "mutual_fund"
231
- ],
232
- "amount": {
233
- "$range": [
234
- 1880,
235
- 8014
236
- ]
237
- },
238
- "action": [
239
- "buy",
240
- "sell"
241
- ],
242
- "premium_returns": [
243
- false
244
- ],
245
- "budget_discipline": [
246
- false
247
- ]
248
- }
249
- },
250
- {
251
- "event": "card locked",
252
- "properties": {
253
- "reason": [
254
- "lost",
255
- "stolen",
256
- "suspicious_activity",
257
- "travel"
258
- ],
259
- "fraud_sequence": [
260
- false
261
- ]
262
- }
263
- },
264
- {
265
- "event": "dispute filed",
266
- "properties": {
267
- "dispute_amount": {
268
- "$range": [
269
- 216,
270
- 1663
271
- ]
272
- },
273
- "reason": [
274
- "unauthorized",
275
- "duplicate",
276
- "not_received",
277
- "damaged",
278
- "wrong_amount"
279
- ],
280
- "fraud_sequence": [
281
- false
282
- ]
283
- }
284
- },
285
- {
286
- "event": "loan applied",
287
- "weight": 2,
288
- "properties": {
289
- "loan_type": [
290
- "personal",
291
- "auto",
292
- "home",
293
- "student",
294
- "business"
295
- ],
296
- "requested_amount": {
297
- "$range": [
298
- 15174,
299
- 84022
300
- ]
301
- }
302
- }
303
- },
304
- {
305
- "event": "loan approved",
306
- "properties": {
307
- "loan_type": [
308
- "personal",
309
- "auto",
310
- "home",
311
- "student",
312
- "business"
313
- ],
314
- "approved_amount": {
315
- "$range": [
316
- 15610,
317
- 85097
318
- ]
319
- },
320
- "interest_rate": [
321
- 17,
322
- 10,
323
- 18,
324
- 8,
325
- 9,
326
- 6
327
- ]
328
- }
329
- },
330
- {
331
- "event": "premium upgraded",
332
- "weight": 2,
333
- "properties": {
334
- "old_tier": [
335
- "basic",
336
- "plus",
337
- "premium"
338
- ],
339
- "new_tier": [
340
- "plus",
341
- "premium"
342
- ],
343
- "monthly_fee": [
344
- 4.99,
345
- 9.99,
346
- 14.99
347
- ]
348
- }
349
- },
350
- {
351
- "event": "support contacted",
352
- "weight": 3,
353
- "properties": {
354
- "channel": [
355
- "chat",
356
- "phone",
357
- "email",
358
- "in_app"
359
- ],
360
- "issue_type": [
361
- "transaction",
362
- "account",
363
- "card",
364
- "transfer",
365
- "technical"
366
- ],
367
- "resolved": [
368
- false,
369
- true
370
- ],
371
- "fraud_sequence": [
372
- false
373
- ]
374
- }
375
- },
376
- {
377
- "event": "notification opened",
378
- "weight": 10,
379
- "properties": {
380
- "notification_type": [
381
- "transaction",
382
- "low_balance",
383
- "bill_due",
384
- "reward",
385
- "security",
386
- "promo"
387
- ],
388
- "action_taken": [
389
- false,
390
- true
391
- ]
392
- }
393
- },
394
- {
395
- "event": "reward redeemed",
396
- "weight": 4,
397
- "properties": {
398
- "reward_type": [
399
- "cashback",
400
- "points",
401
- "discount",
402
- "partner_offer"
403
- ],
404
- "value": [
405
- 74,
406
- 39,
407
- 23,
408
- 30,
409
- 60,
410
- 73,
411
- 46,
412
- 25,
413
- 27
414
- ],
415
- "premium_reward": [
416
- false
417
- ]
418
- }
419
- }
420
- ],
421
- "funnels": [
422
- {
423
- "sequence": [
424
- "account opened",
425
- "app session",
426
- "balance checked"
427
- ],
428
- "isFirstFunnel": true,
429
- "conversionRate": 85,
430
- "timeToConvert": 0.25
431
- },
432
- {
433
- "sequence": [
434
- "app session",
435
- "balance checked",
436
- "transaction completed"
437
- ],
438
- "conversionRate": 80,
439
- "timeToConvert": 0.5,
440
- "weight": 5
441
- },
442
- {
443
- "sequence": [
444
- "app session",
445
- "transfer sent",
446
- "notification opened"
447
- ],
448
- "conversionRate": 50,
449
- "timeToConvert": 1,
450
- "weight": 3
451
- },
452
- {
453
- "sequence": [
454
- "app session",
455
- "bill paid",
456
- "notification opened"
457
- ],
458
- "conversionRate": 60,
459
- "timeToConvert": 1,
460
- "weight": 3
461
- },
462
- {
463
- "sequence": [
464
- "budget created",
465
- "budget alert",
466
- "savings goal set"
467
- ],
468
- "conversionRate": 40,
469
- "timeToConvert": 12,
470
- "weight": 2
471
- },
472
- {
473
- "sequence": [
474
- "balance checked",
475
- "investment made",
476
- "reward redeemed"
477
- ],
478
- "conversionRate": 30,
479
- "timeToConvert": 5,
480
- "weight": 2
481
- },
482
- {
483
- "sequence": [
484
- "support contacted",
485
- "card locked",
486
- "dispute filed"
487
- ],
488
- "conversionRate": 35,
489
- "timeToConvert": 2
490
- },
491
- {
492
- "sequence": [
493
- "loan applied",
494
- "loan approved",
495
- "premium upgraded"
496
- ],
497
- "conversionRate": 25,
498
- "timeToConvert": 10
499
- }
500
- ],
501
- "superProps": {
502
- "account_tier": [
503
- "basic",
504
- "plus",
505
- "premium"
506
- ],
507
- "Platform": [
508
- "ios",
509
- "android",
510
- "web"
511
- ],
512
- "low_balance_churn": [
513
- false
514
- ]
515
- },
516
- "userProps": {
517
- "credit_score_range": [
518
- "300-579",
519
- "580-669",
520
- "670-739",
521
- "740-799",
522
- "800-850"
523
- ],
524
- "income_bracket": [
525
- "under_30k",
526
- "30k_50k",
527
- "50k_75k",
528
- "75k_100k",
529
- "100k_150k",
530
- "over_150k"
531
- ],
532
- "account_age_months": {
533
- "$range": [
534
- 15,
535
- 44
536
- ]
537
- },
538
- "total_balance": {
539
- "$range": [
540
- 16006,
541
- 83008
542
- ]
543
- },
544
- "has_direct_deposit": [
545
- false,
546
- true
547
- ],
548
- "account_segment": [
549
- "personal"
550
- ],
551
- "employee_count": [
552
- 0
553
- ],
554
- "annual_revenue": [
555
- 0
556
- ],
557
- "industry": [
558
- ""
559
- ],
560
- "age_range": [
561
- ""
562
- ],
563
- "life_stage": [
564
- ""
565
- ]
566
- },
567
- "groupKeys": [
568
- {
569
- "key": "household_id",
570
- "count": 500,
571
- "affectsEvents": [
572
- "transaction completed",
573
- "transfer sent",
574
- "bill paid",
575
- "savings goal set"
576
- ]
577
- }
578
- ],
579
- "groupProps": {
580
- "household_id": {
581
- "household_size": {
582
- "$range": [
583
- 1,
584
- 6
585
- ]
586
- },
587
- "combined_income": {
588
- "$range": [
589
- 61633,
590
- 263131
591
- ]
592
- },
593
- "financial_health_score": {
594
- "$range": [
595
- 12,
596
- 81
597
- ]
598
- },
599
- "primary_bank": [
600
- "NexBank_only",
601
- "multi_bank"
602
- ]
603
- }
604
- },
605
- "scdProps": {
606
- "account_tier": {
607
- "type": "user",
608
- "frequency": "month",
609
- "timing": "fuzzy",
610
- "max": 6,
611
- "values": [
612
- "basic",
613
- "plus",
614
- "premium"
615
- ]
616
- },
617
- "risk_category": {
618
- "type": "household_id",
619
- "frequency": "month",
620
- "timing": "fixed",
621
- "max": 8,
622
- "values": [
623
- "low",
624
- "medium",
625
- "high",
626
- "critical"
627
- ]
628
- }
629
- }
630
- }