@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,580 +0,0 @@
1
- {
2
- "events": [
3
- {
4
- "event": "account created",
5
- "isFirstEvent": true,
6
- "properties": {
7
- "signup_source": [
8
- "organic",
9
- "google",
10
- "instagram",
11
- "tripadvisor",
12
- "referral",
13
- "email_campaign"
14
- ]
15
- }
16
- },
17
- {
18
- "event": "destination searched",
19
- "weight": 8,
20
- "properties": {
21
- "destination": [
22
- "Amsterdam",
23
- "Bali",
24
- "Bangkok",
25
- "Barcelona",
26
- "Cancun",
27
- "Dubai",
28
- "Lisbon",
29
- "London",
30
- "Miami",
31
- "New York",
32
- "Paris",
33
- "Rome",
34
- "Singapore",
35
- "Tokyo"
36
- ],
37
- "check_in_days_out": {
38
- "$range": [
39
- 15,
40
- 59
41
- ]
42
- },
43
- "nights": [
44
- 11,
45
- 4,
46
- 9
47
- ],
48
- "guests": [
49
- 2
50
- ],
51
- "search_filters": [
52
- "price",
53
- "rating",
54
- "location",
55
- "amenities",
56
- "pool",
57
- "breakfast"
58
- ]
59
- }
60
- },
61
- {
62
- "event": "hotel viewed",
63
- "weight": 7,
64
- "properties": {
65
- "hotel_id": {
66
- "$type": "string"
67
- },
68
- "destination": [
69
- "Amsterdam",
70
- "Bangkok",
71
- "Barcelona",
72
- "Dubai",
73
- "Lisbon",
74
- "London",
75
- "Miami",
76
- "New York",
77
- "Paris",
78
- "Rome",
79
- "Singapore",
80
- "Sydney",
81
- "Tokyo"
82
- ],
83
- "star_rating": [
84
- 3,
85
- 4,
86
- 5
87
- ],
88
- "nightly_rate": {
89
- "$range": [
90
- 124,
91
- 415
92
- ]
93
- },
94
- "has_pool": [
95
- true,
96
- false
97
- ],
98
- "has_breakfast": [
99
- true,
100
- false
101
- ],
102
- "photos_viewed": [
103
- 5,
104
- 3,
105
- 7,
106
- 6
107
- ]
108
- }
109
- },
110
- {
111
- "event": "price compared",
112
- "weight": 4,
113
- "properties": {
114
- "hotels_compared": {
115
- "$range": [
116
- 2,
117
- 5
118
- ]
119
- },
120
- "price_difference_pct": [
121
- 28,
122
- 10,
123
- 23,
124
- 21,
125
- 8,
126
- 11,
127
- 15,
128
- 9,
129
- 16,
130
- 36
131
- ],
132
- "chose_cheapest": [
133
- true,
134
- false
135
- ]
136
- }
137
- },
138
- {
139
- "event": "booking completed",
140
- "weight": 3,
141
- "properties": {
142
- "hotel_id": {
143
- "$type": "string"
144
- },
145
- "destination": [
146
- "Amsterdam",
147
- "Bali",
148
- "Bangkok",
149
- "Barcelona",
150
- "Dubai",
151
- "Lisbon",
152
- "London",
153
- "Miami",
154
- "New York",
155
- "Paris",
156
- "Rome",
157
- "Singapore",
158
- "Sydney",
159
- "Tokyo"
160
- ],
161
- "nightly_rate": {
162
- "$range": [
163
- 144,
164
- 411
165
- ]
166
- },
167
- "total_cost": {
168
- "$range": [
169
- 862,
170
- 4246
171
- ]
172
- },
173
- "nights": [
174
- 11,
175
- 10,
176
- 3
177
- ],
178
- "guests": [
179
- 4,
180
- 5
181
- ],
182
- "booking_window": [
183
- "advance",
184
- "standard",
185
- "last_minute"
186
- ],
187
- "payment_method": [
188
- "credit_card",
189
- "debit",
190
- "paypal",
191
- "apple_pay"
192
- ],
193
- "loyalty_points": {
194
- "$range": [
195
- 65,
196
- 421
197
- ]
198
- }
199
- }
200
- },
201
- {
202
- "event": "room upgrade selected",
203
- "weight": 2,
204
- "properties": {
205
- "upgrade_type": [
206
- "suite",
207
- "ocean_view",
208
- "executive_floor",
209
- "club_lounge",
210
- "premium_king"
211
- ],
212
- "upgrade_cost": {
213
- "$range": [
214
- 55,
215
- 167
216
- ]
217
- },
218
- "hotel_id": {
219
- "$type": "string"
220
- }
221
- }
222
- },
223
- {
224
- "event": "booking cancelled",
225
- "weight": 2,
226
- "properties": {
227
- "cancellation_reason": [
228
- "change_of_plans",
229
- "found_cheaper",
230
- "travel_restriction",
231
- "schedule_conflict",
232
- "weather"
233
- ],
234
- "refund_amount": {
235
- "$range": [
236
- 305,
237
- 1689
238
- ]
239
- },
240
- "days_before_checkin": {
241
- "$range": [
242
- 12,
243
- 47
244
- ]
245
- },
246
- "booking_window": [
247
- "advance",
248
- "standard",
249
- "last_minute"
250
- ]
251
- }
252
- },
253
- {
254
- "event": "check in completed",
255
- "weight": 2,
256
- "properties": {
257
- "hotel_id": {
258
- "$type": "string"
259
- },
260
- "check_in_method": [
261
- "app",
262
- "front_desk",
263
- "kiosk"
264
- ],
265
- "early_checkin": [
266
- false,
267
- true
268
- ]
269
- }
270
- },
271
- {
272
- "event": "amenity used",
273
- "weight": 4,
274
- "properties": {
275
- "amenity_type": [
276
- "pool",
277
- "gym",
278
- "spa",
279
- "restaurant",
280
- "bar",
281
- "room_service",
282
- "business_center",
283
- "concierge"
284
- ],
285
- "spend_amount": {
286
- "$range": [
287
- 41,
288
- 155
289
- ]
290
- }
291
- }
292
- },
293
- {
294
- "event": "review submitted",
295
- "weight": 2,
296
- "properties": {
297
- "hotel_id": {
298
- "$type": "string"
299
- },
300
- "stay_rating": [
301
- 3,
302
- 4,
303
- 2,
304
- 1
305
- ],
306
- "review_length": {
307
- "$range": [
308
- 44,
309
- 263
310
- ]
311
- },
312
- "would_return": [
313
- true,
314
- false
315
- ]
316
- }
317
- },
318
- {
319
- "event": "loyalty points redeemed",
320
- "properties": {
321
- "points_used": {
322
- "$range": [
323
- 852,
324
- 4276
325
- ]
326
- },
327
- "redemption_type": [
328
- "room_discount",
329
- "free_night",
330
- "upgrade",
331
- "amenity_credit"
332
- ]
333
- }
334
- },
335
- {
336
- "event": "notification received",
337
- "weight": 5,
338
- "properties": {
339
- "notification_type": [
340
- "deal_alert",
341
- "booking_confirmation",
342
- "checkin_reminder",
343
- "review_prompt",
344
- "loyalty_update"
345
- ],
346
- "channel": [
347
- "push",
348
- "email",
349
- "sms"
350
- ],
351
- "opened": [
352
- true,
353
- false
354
- ]
355
- }
356
- },
357
- {
358
- "event": "wishlist updated",
359
- "weight": 3,
360
- "properties": {
361
- "action": [
362
- "added",
363
- "removed"
364
- ],
365
- "destination": [
366
- "Amsterdam",
367
- "Bali",
368
- "Bangkok",
369
- "Barcelona",
370
- "Cancun",
371
- "Lisbon",
372
- "London",
373
- "Miami",
374
- "New York",
375
- "Paris",
376
- "Rome",
377
- "Singapore",
378
- "Sydney",
379
- "Tokyo"
380
- ],
381
- "hotel_id": {
382
- "$type": "string"
383
- }
384
- }
385
- },
386
- {
387
- "event": "support contacted",
388
- "properties": {
389
- "issue_type": [
390
- "booking_change",
391
- "refund",
392
- "complaint",
393
- "question",
394
- "loyalty_inquiry"
395
- ],
396
- "channel": [
397
- "chat",
398
- "phone",
399
- "email"
400
- ],
401
- "resolution_time_hours": [
402
- 14,
403
- 34,
404
- 12
405
- ]
406
- }
407
- },
408
- {
409
- "event": "app session",
410
- "weight": 7,
411
- "properties": {
412
- "session_duration_sec": {
413
- "$range": [
414
- 177,
415
- 985
416
- ]
417
- },
418
- "pages_viewed": [
419
- 15,
420
- 6
421
- ]
422
- }
423
- },
424
- {
425
- "event": "price alert set",
426
- "weight": 2,
427
- "properties": {
428
- "destination": [
429
- "Bali",
430
- "Bangkok",
431
- "Cancun",
432
- "Dubai",
433
- "London",
434
- "Miami",
435
- "New York",
436
- "Paris",
437
- "Rome",
438
- "Singapore",
439
- "Sydney",
440
- "Tokyo"
441
- ],
442
- "target_price": {
443
- "$range": [
444
- 81,
445
- 261
446
- ]
447
- },
448
- "alert_status": [
449
- "active",
450
- "triggered",
451
- "expired"
452
- ]
453
- }
454
- },
455
- {
456
- "event": "account deactivated",
457
- "isChurnEvent": true,
458
- "returnLikelihood": 0.2,
459
- "isStrictEvent": true,
460
- "properties": {
461
- "reason": [
462
- "found_alternative",
463
- "too_expensive",
464
- "poor_experience",
465
- "infrequent_travel",
466
- "privacy"
467
- ]
468
- }
469
- }
470
- ],
471
- "funnels": [
472
- {
473
- "sequence": [
474
- "account created",
475
- "destination searched",
476
- "hotel viewed",
477
- "booking completed"
478
- ],
479
- "name": "Onboarding to First Booking",
480
- "isFirstFunnel": true,
481
- "conversionRate": 35,
482
- "timeToConvert": 72,
483
- "weight": 3
484
- },
485
- {
486
- "sequence": [
487
- "destination searched",
488
- "hotel viewed",
489
- "price compared",
490
- "booking completed"
491
- ],
492
- "name": "Search to Book",
493
- "conversionRate": 25,
494
- "timeToConvert": 48,
495
- "weight": 5
496
- },
497
- {
498
- "sequence": [
499
- "booking completed",
500
- "check in completed",
501
- "amenity used",
502
- "review submitted"
503
- ],
504
- "name": "Full Stay Journey",
505
- "conversionRate": 30,
506
- "timeToConvert": 336,
507
- "weight": 3
508
- },
509
- {
510
- "sequence": [
511
- "booking completed",
512
- "loyalty points redeemed",
513
- "review submitted"
514
- ],
515
- "name": "Loyalty Engagement",
516
- "conversionRate": 15,
517
- "timeToConvert": 720,
518
- "weight": 2
519
- },
520
- {
521
- "sequence": [
522
- "hotel viewed",
523
- "booking completed",
524
- "room upgrade selected"
525
- ],
526
- "name": "Upsell Path",
527
- "conversionRate": 20,
528
- "timeToConvert": 24,
529
- "weight": 2
530
- }
531
- ],
532
- "superProps": {
533
- "Platform": [
534
- "ios",
535
- "android",
536
- "web"
537
- ],
538
- "membership_tier": [
539
- "standard",
540
- "gold",
541
- "platinum"
542
- ]
543
- },
544
- "userProps": {
545
- "customer_segment": [
546
- "leisure_family"
547
- ],
548
- "travel_frequency": [
549
- "occasional",
550
- "monthly",
551
- "weekly"
552
- ],
553
- "company_name": [
554
- "none"
555
- ],
556
- "preferred_destination": {
557
- "$type": "string"
558
- },
559
- "avg_budget_per_night": {
560
- "$range": [
561
- 98,
562
- 339
563
- ]
564
- }
565
- },
566
- "scdProps": {
567
- "membership_tier": {
568
- "type": "user",
569
- "frequency": "month",
570
- "timing": "fuzzy",
571
- "max": 8,
572
- "values": [
573
- "member",
574
- "silver",
575
- "gold",
576
- "platinum"
577
- ]
578
- }
579
- }
580
- }