@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,549 +0,0 @@
1
- {
2
- "events": [
3
- {
4
- "event": "account created",
5
- "isFirstEvent": true,
6
- "properties": {
7
- "referral_source": [
8
- "organic",
9
- "doctor_referral",
10
- "insurance_partner",
11
- "social_media",
12
- "search"
13
- ]
14
- }
15
- },
16
- {
17
- "event": "symptom search",
18
- "weight": 7,
19
- "properties": {
20
- "search_term": [
21
- "headache",
22
- "fever",
23
- "cough",
24
- "back pain",
25
- "fatigue",
26
- "anxiety",
27
- "rash",
28
- "nausea",
29
- "chest pain",
30
- "joint pain"
31
- ],
32
- "results_count": {
33
- "$range": [
34
- 4,
35
- 20
36
- ]
37
- }
38
- }
39
- },
40
- {
41
- "event": "appointment booked",
42
- "weight": 6,
43
- "properties": {
44
- "doctor_id": {
45
- "$type": "string"
46
- },
47
- "clinic_id": {
48
- "$type": "string"
49
- },
50
- "condition_type": [
51
- "general",
52
- "respiratory",
53
- "dermatology",
54
- "mental_health",
55
- "chronic",
56
- "pediatric"
57
- ],
58
- "wait_time_hours": {
59
- "$range": [
60
- 10,
61
- 59
62
- ]
63
- },
64
- "appointment_type": [
65
- "new_patient",
66
- "follow_up",
67
- "urgent",
68
- "routine"
69
- ],
70
- "after_hours": [
71
- false
72
- ]
73
- }
74
- },
75
- {
76
- "event": "consultation completed",
77
- "weight": 5,
78
- "properties": {
79
- "doctor_id": {
80
- "$type": "string"
81
- },
82
- "consultation_mode": [
83
- "phone"
84
- ],
85
- "duration_minutes": {
86
- "$range": [
87
- 12,
88
- 46
89
- ]
90
- },
91
- "consultation_fee": {
92
- "$range": [
93
- 46,
94
- 167
95
- ]
96
- },
97
- "satisfaction_score": [
98
- 2
99
- ],
100
- "condition_type": [
101
- "general",
102
- "respiratory",
103
- "dermatology",
104
- "mental_health",
105
- "chronic",
106
- "pediatric"
107
- ],
108
- "after_hours": [
109
- false
110
- ]
111
- }
112
- },
113
- {
114
- "event": "prescription issued",
115
- "weight": 4,
116
- "properties": {
117
- "medication_type": [
118
- "antibiotic",
119
- "antiviral",
120
- "painkiller",
121
- "anti_inflammatory",
122
- "antidepressant",
123
- "inhaler",
124
- "topical",
125
- "chronic_maintenance"
126
- ],
127
- "quantity": {
128
- "$range": [
129
- 20,
130
- 71
131
- ]
132
- },
133
- "condition_type": [
134
- "general",
135
- "respiratory",
136
- "dermatology",
137
- "mental_health",
138
- "chronic",
139
- "pediatric"
140
- ],
141
- "refill_count": {
142
- "$range": [
143
- 0,
144
- 3
145
- ]
146
- }
147
- }
148
- },
149
- {
150
- "event": "prescription refill",
151
- "weight": 3,
152
- "properties": {
153
- "medication_type": [
154
- "antibiotic",
155
- "antiviral",
156
- "painkiller",
157
- "anti_inflammatory",
158
- "antidepressant",
159
- "inhaler",
160
- "topical",
161
- "chronic_maintenance"
162
- ],
163
- "quantity": {
164
- "$range": [
165
- 19,
166
- 70
167
- ]
168
- },
169
- "condition_type": [
170
- "general",
171
- "respiratory",
172
- "dermatology",
173
- "mental_health",
174
- "chronic",
175
- "pediatric"
176
- ],
177
- "refill_count": {
178
- "$range": [
179
- 1,
180
- 5
181
- ]
182
- }
183
- }
184
- },
185
- {
186
- "event": "follow up scheduled",
187
- "weight": 3,
188
- "properties": {
189
- "doctor_id": {
190
- "$type": "string"
191
- },
192
- "days_until_followup": [
193
- 21,
194
- 12,
195
- 23,
196
- 11,
197
- 17,
198
- 10
199
- ],
200
- "condition_type": [
201
- "general",
202
- "respiratory",
203
- "dermatology",
204
- "mental_health",
205
- "chronic",
206
- "pediatric"
207
- ],
208
- "consultation_mode": [
209
- "phone"
210
- ]
211
- }
212
- },
213
- {
214
- "event": "message sent",
215
- "weight": 5,
216
- "properties": {
217
- "message_type": [
218
- "question",
219
- "update",
220
- "result_inquiry",
221
- "prescription_question",
222
- "scheduling"
223
- ],
224
- "recipient_role": [
225
- "doctor",
226
- "nurse",
227
- "support"
228
- ],
229
- "response_time_hours": [
230
- 11,
231
- 13,
232
- 18
233
- ]
234
- }
235
- },
236
- {
237
- "event": "lab results viewed",
238
- "weight": 3,
239
- "properties": {
240
- "test_type": [
241
- "blood_panel",
242
- "urinalysis",
243
- "imaging",
244
- "allergy_test",
245
- "metabolic_panel",
246
- "thyroid"
247
- ],
248
- "result_status": [
249
- "normal",
250
- "abnormal",
251
- "pending"
252
- ]
253
- }
254
- },
255
- {
256
- "event": "health record accessed",
257
- "weight": 4,
258
- "properties": {
259
- "record_type": [
260
- "visit_summary",
261
- "lab_results",
262
- "prescriptions",
263
- "immunizations",
264
- "billing"
265
- ],
266
- "access_method": [
267
- "app",
268
- "web_portal"
269
- ]
270
- }
271
- },
272
- {
273
- "event": "insurance verified",
274
- "weight": 2,
275
- "properties": {
276
- "insurance_type": [
277
- "private",
278
- "employer",
279
- "medicare",
280
- "medicaid",
281
- "self_pay"
282
- ],
283
- "verification_status": [
284
- "approved",
285
- "pending",
286
- "denied"
287
- ],
288
- "copay_amount": {
289
- "$range": [
290
- 12,
291
- 61
292
- ]
293
- }
294
- }
295
- },
296
- {
297
- "event": "payment processed",
298
- "weight": 3,
299
- "properties": {
300
- "amount": {
301
- "$range": [
302
- 105,
303
- 431
304
- ]
305
- },
306
- "payment_method": [
307
- "credit_card",
308
- "insurance_claim",
309
- "hsa_fsa",
310
- "debit"
311
- ],
312
- "payment_status": [
313
- "success",
314
- "failed"
315
- ]
316
- }
317
- },
318
- {
319
- "event": "notification received",
320
- "weight": 6,
321
- "properties": {
322
- "notification_type": [
323
- "appointment_reminder",
324
- "lab_ready",
325
- "prescription_ready",
326
- "message_received",
327
- "billing"
328
- ],
329
- "channel": [
330
- "push",
331
- "email",
332
- "sms"
333
- ],
334
- "opened": [
335
- true,
336
- false
337
- ]
338
- }
339
- },
340
- {
341
- "event": "provider rated",
342
- "weight": 2,
343
- "properties": {
344
- "doctor_id": {
345
- "$type": "string"
346
- },
347
- "rating": [
348
- 4,
349
- 2
350
- ],
351
- "would_recommend": [
352
- true,
353
- false
354
- ]
355
- }
356
- },
357
- {
358
- "event": "support ticket created",
359
- "properties": {
360
- "category": [
361
- "billing",
362
- "technical",
363
- "scheduling",
364
- "prescription",
365
- "insurance",
366
- "other"
367
- ],
368
- "priority": [
369
- "low",
370
- "medium",
371
- "high"
372
- ],
373
- "resolution_hours": {
374
- "$range": [
375
- 20,
376
- 75
377
- ]
378
- }
379
- }
380
- },
381
- {
382
- "event": "profile updated",
383
- "weight": 2,
384
- "properties": {
385
- "field_updated": [
386
- "insurance",
387
- "address",
388
- "phone",
389
- "emergency_contact",
390
- "allergies",
391
- "medications"
392
- ]
393
- }
394
- },
395
- {
396
- "event": "app session",
397
- "weight": 8,
398
- "properties": {
399
- "session_duration_sec": {
400
- "$range": [
401
- 264,
402
- 1480
403
- ]
404
- },
405
- "pages_viewed": [
406
- 11,
407
- 7,
408
- 9
409
- ]
410
- }
411
- },
412
- {
413
- "event": "account deactivated",
414
- "isChurnEvent": true,
415
- "returnLikelihood": 0.15,
416
- "isStrictEvent": true,
417
- "properties": {
418
- "reason": [
419
- "switched_provider",
420
- "cost",
421
- "no_longer_needed",
422
- "poor_experience",
423
- "insurance_change"
424
- ]
425
- }
426
- }
427
- ],
428
- "funnels": [
429
- {
430
- "sequence": [
431
- "account created",
432
- "insurance verified",
433
- "symptom search",
434
- "appointment booked"
435
- ],
436
- "name": "Onboarding Flow",
437
- "isFirstFunnel": true,
438
- "conversionRate": 45,
439
- "timeToConvert": 72,
440
- "weight": 3
441
- },
442
- {
443
- "sequence": [
444
- "symptom search",
445
- "appointment booked",
446
- "consultation completed"
447
- ],
448
- "name": "Booking to Consultation",
449
- "conversionRate": 40,
450
- "timeToConvert": 48,
451
- "weight": 5
452
- },
453
- {
454
- "sequence": [
455
- "appointment booked",
456
- "consultation completed",
457
- "prescription issued",
458
- "follow up scheduled"
459
- ],
460
- "name": "Full Care Journey",
461
- "conversionRate": 30,
462
- "timeToConvert": 168,
463
- "weight": 3
464
- },
465
- {
466
- "sequence": [
467
- "prescription issued",
468
- "prescription refill",
469
- "payment processed"
470
- ],
471
- "name": "Prescription Lifecycle",
472
- "conversionRate": 55,
473
- "timeToConvert": 720,
474
- "weight": 2
475
- },
476
- {
477
- "sequence": [
478
- "consultation completed",
479
- "provider rated",
480
- "follow up scheduled"
481
- ],
482
- "name": "Patient Satisfaction",
483
- "conversionRate": 25,
484
- "timeToConvert": 72,
485
- "weight": 2
486
- }
487
- ],
488
- "superProps": {
489
- "subscription_tier": [
490
- "free",
491
- "basic",
492
- "premium"
493
- ],
494
- "Platform": [
495
- "ios",
496
- "android",
497
- "web"
498
- ]
499
- },
500
- "userProps": {
501
- "role": [
502
- "patient",
503
- "nurse",
504
- "doctor"
505
- ],
506
- "specialty": [
507
- "none"
508
- ],
509
- "years_experience": {
510
- "$range": [
511
- 0,
512
- 5
513
- ]
514
- },
515
- "preferred_language": [
516
- "en",
517
- "es",
518
- "pt",
519
- "de",
520
- "fr"
521
- ],
522
- "has_chronic_condition": [
523
- false,
524
- true
525
- ],
526
- "age_range": [
527
- "18-25",
528
- "26-35",
529
- "36-45",
530
- "46-55",
531
- "56-65",
532
- "65+"
533
- ]
534
- },
535
- "scdProps": {
536
- "care_plan": {
537
- "type": "user",
538
- "frequency": "month",
539
- "timing": "fuzzy",
540
- "max": 8,
541
- "values": [
542
- "preventive",
543
- "routine",
544
- "chronic",
545
- "acute"
546
- ]
547
- }
548
- }
549
- }