@ak--47/dungeon-master 1.1.0 → 1.2.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 (67) hide show
  1. package/dungeons/technical/ad-spend-schema.json +2 -2
  2. package/dungeons/technical/ad-spend.js +1 -1
  3. package/dungeons/technical/anonymous-users-schema.json +4 -3
  4. package/dungeons/technical/anonymous-users.js +1 -1
  5. package/dungeons/technical/array-of-object-lookup-schema.json +1 -1
  6. package/dungeons/technical/array-of-object-lookup.js +1 -1
  7. package/dungeons/technical/experiments-schema.json +25 -19
  8. package/dungeons/technical/experiments.js +1 -1
  9. package/dungeons/technical/foobar.js +1 -1
  10. package/dungeons/technical/group-analytics-schema.json +92 -0
  11. package/dungeons/technical/group-analytics.js +1 -1
  12. package/dungeons/technical/mirror-strategies-schema.json +4 -4
  13. package/dungeons/technical/mirror-strategies.js +1 -1
  14. package/dungeons/technical/nested-objects.js +1 -1
  15. package/dungeons/technical/retention-cadence.js +1 -2
  16. package/dungeons/technical/sanity-schema.json +22 -22
  17. package/dungeons/technical/sanity.js +1 -0
  18. package/dungeons/technical/scale-test.js +1 -1
  19. package/dungeons/technical/scd-schema.json +230 -33
  20. package/dungeons/technical/scd.js +1 -0
  21. package/dungeons/technical/simple-schema.json +132 -48
  22. package/dungeons/technical/simple.js +1 -1
  23. package/dungeons/technical/simplest-schema.json +168 -79
  24. package/dungeons/technical/simplest.js +1 -1
  25. package/dungeons/technical/text-generation-schema.json +7 -4
  26. package/dungeons/technical/text-generation.js +1 -2
  27. package/dungeons/vertical/community-schema.json +71 -49
  28. package/dungeons/vertical/community.js +8 -2
  29. package/dungeons/vertical/devtools-schema.json +69 -48
  30. package/dungeons/vertical/devtools.js +8 -2
  31. package/dungeons/vertical/ecommerce-schema.json +126 -108
  32. package/dungeons/vertical/ecommerce.js +9 -2
  33. package/dungeons/vertical/education-schema.json +5261 -272
  34. package/dungeons/vertical/education.js +16 -3
  35. package/dungeons/vertical/fintech-schema.json +165 -98
  36. package/dungeons/vertical/fintech.js +16 -3
  37. package/dungeons/vertical/fitness-schema.json +69 -47
  38. package/dungeons/vertical/fitness.js +8 -2
  39. package/dungeons/vertical/food-delivery-schema.json +36237 -187
  40. package/dungeons/vertical/food-delivery.js +16 -3
  41. package/dungeons/vertical/gaming-schema.json +103 -59
  42. package/dungeons/vertical/gaming.js +20 -9
  43. package/dungeons/vertical/healthcare-schema.json +70 -48
  44. package/dungeons/vertical/healthcare.js +8 -2
  45. package/dungeons/vertical/insurance-application-schema.json +66 -47
  46. package/dungeons/vertical/insurance-application.js +8 -2
  47. package/dungeons/vertical/logistics-schema.json +60 -38
  48. package/dungeons/vertical/logistics.js +8 -2
  49. package/dungeons/vertical/marketplace-schema.json +65 -43
  50. package/dungeons/vertical/marketplace.js +8 -2
  51. package/dungeons/vertical/media-schema.json +4085 -123
  52. package/dungeons/vertical/media.js +9 -3
  53. package/dungeons/vertical/rpg-schema.json +1984 -147
  54. package/dungeons/vertical/rpg.js +9 -3
  55. package/dungeons/vertical/sass-schema.json +2622 -147
  56. package/dungeons/vertical/sass.js +16 -3
  57. package/dungeons/vertical/social-schema.json +146 -78
  58. package/dungeons/vertical/social.js +16 -3
  59. package/dungeons/vertical/travel-schema.json +57 -35
  60. package/dungeons/vertical/travel.js +8 -2
  61. package/index.js +1 -1
  62. package/lib/core/context.js +9 -0
  63. package/lib/core/storage.js +2 -0
  64. package/lib/orchestrators/user-loop.js +4 -1
  65. package/package.json +1 -1
  66. package/scripts/extract-dungeon-schema.mjs +64 -18
  67. package/types.d.ts +3 -0
@@ -120,9 +120,9 @@
120
120
  "enterprise"
121
121
  ],
122
122
  "signup_source": [
123
- "referral",
123
+ "organic",
124
124
  "paid",
125
- "organic"
125
+ "referral"
126
126
  ]
127
127
  }
128
128
  }
@@ -6,6 +6,7 @@ dayjs.extend(utc);
6
6
  import { uid, comma } from 'ak-tools';
7
7
  import { weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
8
8
 
9
+ /** @typedef {import("../../types").Dungeon} Config */
9
10
  /**
10
11
  * ═══════════════════════════════════════════════════════════════
11
12
  * TECHNICAL TEST: Ad Spend & Campaign Attribution
@@ -43,7 +44,6 @@ const config = {
43
44
  isAnonymous: false,
44
45
  alsoInferFunnels: false,
45
46
  concurrency: 1,
46
- batchSize: 500_000,
47
47
  writeToDisk: false,
48
48
 
49
49
  events: [
@@ -5,9 +5,10 @@
5
5
  "weight": 10,
6
6
  "properties": {
7
7
  "page": [
8
+ "/",
8
9
  "/features",
9
- "/docs",
10
10
  "/pricing",
11
+ "/docs",
11
12
  "/blog"
12
13
  ],
13
14
  "referrer": [
@@ -50,8 +51,8 @@
50
51
  "properties": {
51
52
  "amount": {
52
53
  "$range": [
53
- 108,
54
- 392
54
+ 114,
55
+ 397
55
56
  ]
56
57
  },
57
58
  "plan": [
@@ -14,6 +14,7 @@ import Chance from 'chance';
14
14
  let chance = new Chance();
15
15
  import { weighNumRange, weighChoices } from "../../lib/utils/utils.js";
16
16
 
17
+ /** @typedef {import("../../types").Dungeon} Config */
17
18
  /** @type {import('../../types').Dungeon} */
18
19
  const config = {
19
20
  token: "",
@@ -35,7 +36,6 @@ const config = {
35
36
  hasCampaigns: false,
36
37
  alsoInferFunnels: false,
37
38
  concurrency: 1,
38
- batchSize: 2_500_000,
39
39
  writeToDisk: false,
40
40
 
41
41
  events: [
@@ -92,8 +92,8 @@
92
92
  ],
93
93
  "superProps": {
94
94
  "theme": [
95
- "dark",
96
95
  "light",
96
+ "dark",
97
97
  "custom"
98
98
  ]
99
99
  },
@@ -6,6 +6,7 @@ dayjs.extend(utc);
6
6
  import { uid, comma } from 'ak-tools';
7
7
  import { weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
8
8
 
9
+ /** @typedef {import("../../types").Dungeon} Config */
9
10
  const videoCategories = ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"];
10
11
  const spiritAnimals = ["duck", "dog", "otter", "penguin", "cat", "elephant", "lion", "cheetah", "giraffe", "zebra", "rhino", "hippo", "whale", "dolphin", "shark", "octopus", "squid", "jellyfish", "starfish", "seahorse", "crab", "lobster", "shrimp", "clam", "snail", "slug", "butterfly", "moth", "bee", "wasp", "ant", "beetle", "ladybug", "caterpillar", "centipede", "millipede", "scorpion", "spider", "tarantula", "tick", "mite", "mosquito", "fly", "dragonfly", "damselfly", "grasshopper", "cricket", "locust", "mantis", "cockroach", "termite", "praying mantis", "walking stick", "stick bug", "leaf insect", "lacewing", "aphid", "cicada", "thrips", "psyllid", "scale insect", "whitefly", "mealybug", "planthopper", "leafhopper", "treehopper", "flea", "louse", "bedbug", "flea beetle", "weevil", "longhorn beetle", "leaf beetle", "tiger beetle", "ground beetle", "lady beetle", "firefly", "click beetle", "rove beetle", "scarab beetle", "dung beetle", "stag beetle", "rhinoceros beetle", "hercules beetle", "goliath beetle", "jewel beetle", "tortoise beetle"];
11
12
 
@@ -59,7 +60,6 @@ const config = {
59
60
  isAnonymous: false,
60
61
  alsoInferFunnels: true,
61
62
  concurrency: 1,
62
- batchSize: 250_000,
63
63
  writeToDisk: false,
64
64
  events: [
65
65
  {
@@ -5,8 +5,9 @@
5
5
  "weight": 10,
6
6
  "properties": {
7
7
  "page": [
8
- "/pricing",
8
+ "/",
9
9
  "/features",
10
+ "/pricing",
10
11
  "/docs",
11
12
  "/about"
12
13
  ]
@@ -72,8 +73,8 @@
72
73
  "properties": {
73
74
  "amount": {
74
75
  "$range": [
75
- 129,
76
- 400
76
+ 123,
77
+ 389
77
78
  ]
78
79
  },
79
80
  "plan": [
@@ -120,21 +121,6 @@
120
121
  }
121
122
  }
122
123
  ],
123
- "superProps": {
124
- "platform": [
125
- "ios",
126
- "web",
127
- "android"
128
- ]
129
- },
130
- "userProps": {
131
- "plan": [
132
- "free",
133
- "starter",
134
- "growth",
135
- "enterprise"
136
- ]
137
- },
138
124
  "funnels": [
139
125
  {
140
126
  "sequence": [
@@ -143,6 +129,7 @@
143
129
  "feature viewed",
144
130
  "action taken"
145
131
  ],
132
+ "name": "Onboarding Flow",
146
133
  "isFirstFunnel": true,
147
134
  "conversionRate": 45,
148
135
  "timeToConvert": 3,
@@ -156,6 +143,7 @@
156
143
  "button click",
157
144
  "checkout"
158
145
  ],
146
+ "name": "Purchase Funnel",
159
147
  "conversionRate": 30,
160
148
  "timeToConvert": 5,
161
149
  "order": "first-and-last-fixed",
@@ -169,12 +157,14 @@
169
157
  "help viewed",
170
158
  "action taken"
171
159
  ],
160
+ "name": "Feature Adoption",
172
161
  "conversionRate": 50,
173
162
  "timeToConvert": 2,
174
163
  "order": "random",
175
164
  "weight": 4,
176
165
  "requireRepeats": true,
177
166
  "experiment": true,
167
+ "bindPropsIndex": 2,
178
168
  "props": {
179
169
  "experiment_cohort": [
180
170
  "new_ui",
@@ -188,10 +178,26 @@
188
178
  "button click",
189
179
  "signup"
190
180
  ],
181
+ "name": "Quick Signup",
191
182
  "isFirstFunnel": true,
192
183
  "conversionRate": 40,
193
184
  "timeToConvert": 1,
194
185
  "weight": 6
195
186
  }
196
- ]
187
+ ],
188
+ "superProps": {
189
+ "platform": [
190
+ "web",
191
+ "ios",
192
+ "android"
193
+ ]
194
+ },
195
+ "userProps": {
196
+ "plan": [
197
+ "free",
198
+ "starter",
199
+ "growth",
200
+ "enterprise"
201
+ ]
202
+ }
197
203
  }
@@ -14,6 +14,7 @@ import Chance from 'chance';
14
14
  let chance = new Chance();
15
15
  import { weighNumRange, weighChoices } from "../../lib/utils/utils.js";
16
16
 
17
+ /** @typedef {import("../../types").Dungeon} Config */
17
18
  /** @type {import('../../types').Dungeon} */
18
19
  const config = {
19
20
  token: "",
@@ -35,7 +36,6 @@ const config = {
35
36
  isAnonymous: false,
36
37
  alsoInferFunnels: false,
37
38
  concurrency: 1,
38
- batchSize: 2_500_000,
39
39
  writeToDisk: false,
40
40
 
41
41
  events: [
@@ -46,6 +46,7 @@ function integer(min = 1, max = 100) {
46
46
  return Math.floor(Math.random() * (max - min + 1)) + min;
47
47
  }
48
48
 
49
+ /** @typedef {import("../../types").Dungeon} Config */
49
50
 
50
51
  const dates = [
51
52
  "2024-09-18T21:48:28.173Z",
@@ -168,7 +169,6 @@ const config = {
168
169
  region: "US",
169
170
  hasAnonIds: false, //if true, anonymousIds are created for each user
170
171
  hasSessionIds: false, //if true, hasSessionIds are created for each user
171
- batchSize: 2_500_000,
172
172
  hasAdSpend: false,
173
173
  hasAvatar: false,
174
174
  hasBrowser: false,
@@ -145,5 +145,97 @@
145
145
  "manager",
146
146
  "exec"
147
147
  ]
148
+ },
149
+ "groupKeys": [
150
+ {
151
+ "key": "company_id",
152
+ "count": 50,
153
+ "affectsEvents": [
154
+ "feature used",
155
+ "subscription change",
156
+ "support ticket"
157
+ ]
158
+ },
159
+ {
160
+ "key": "team_id",
161
+ "count": 200,
162
+ "affectsEvents": [
163
+ "feature used",
164
+ "task completed",
165
+ "meeting scheduled"
166
+ ]
167
+ },
168
+ {
169
+ "key": "project_id",
170
+ "count": 500,
171
+ "affectsEvents": [
172
+ "task completed",
173
+ "code committed",
174
+ "deployment run"
175
+ ]
176
+ }
177
+ ],
178
+ "groupProps": {
179
+ "company_id": {
180
+ "name": {
181
+ "$type": "string"
182
+ },
183
+ "industry": [
184
+ "technology",
185
+ "finance",
186
+ "healthcare",
187
+ "retail",
188
+ "education",
189
+ "manufacturing"
190
+ ],
191
+ "plan": [
192
+ "free",
193
+ "starter",
194
+ "business",
195
+ "enterprise"
196
+ ],
197
+ "employee_count": {
198
+ "$range": [
199
+ 964,
200
+ 3784
201
+ ]
202
+ }
203
+ },
204
+ "team_id": {
205
+ "name": {
206
+ "$type": "string"
207
+ },
208
+ "department": [
209
+ "engineering",
210
+ "design",
211
+ "product",
212
+ "marketing",
213
+ "sales",
214
+ "support"
215
+ ],
216
+ "size": {
217
+ "$range": [
218
+ 3,
219
+ 20
220
+ ]
221
+ }
222
+ },
223
+ "project_id": {
224
+ "name": {
225
+ "$type": "string"
226
+ },
227
+ "status": [
228
+ "active",
229
+ "paused",
230
+ "completed",
231
+ "archived"
232
+ ],
233
+ "priority": [
234
+ "low",
235
+ "medium",
236
+ "high",
237
+ "critical"
238
+ ]
239
+ }
148
240
  }
149
241
  }
@@ -14,6 +14,7 @@ import Chance from 'chance';
14
14
  let chance = new Chance();
15
15
  import { weighNumRange, weighChoices } from "../../lib/utils/utils.js";
16
16
 
17
+ /** @typedef {import("../../types").Dungeon} Config */
17
18
  /** @type {import('../../types').Dungeon} */
18
19
  const config = {
19
20
  token: "",
@@ -35,7 +36,6 @@ const config = {
35
36
  isAnonymous: false,
36
37
  alsoInferFunnels: false,
37
38
  concurrency: 1,
38
- batchSize: 2_500_000,
39
39
  writeToDisk: false,
40
40
 
41
41
  events: [
@@ -5,11 +5,11 @@
5
5
  "weight": 10,
6
6
  "properties": {
7
7
  "page": [
8
- "/account",
9
8
  "/",
10
9
  "/help",
11
- "/product",
12
- "/pricing"
10
+ "/account",
11
+ "/pricing",
12
+ "/product"
13
13
  ]
14
14
  }
15
15
  },
@@ -20,7 +20,7 @@
20
20
  "amount": {
21
21
  "$range": [
22
22
  44,
23
- 154
23
+ 157
24
24
  ]
25
25
  },
26
26
  "currency": [
@@ -13,6 +13,7 @@ import Chance from 'chance';
13
13
  let chance = new Chance();
14
14
  import { weighNumRange, weighChoices } from "../../lib/utils/utils.js";
15
15
 
16
+ /** @typedef {import("../../types").Dungeon} Config */
16
17
  /** @type {import('../../types').Dungeon} */
17
18
  const config = {
18
19
  token: "",
@@ -34,7 +35,6 @@ const config = {
34
35
  isAnonymous: false,
35
36
  alsoInferFunnels: false,
36
37
  concurrency: 1,
37
- batchSize: 2_500_000,
38
38
  writeToDisk: false,
39
39
 
40
40
  events: [
@@ -6,6 +6,7 @@ dayjs.extend(utc);
6
6
  import { uid, comma } from 'ak-tools';
7
7
  import { weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
8
8
 
9
+ /** @typedef {import("../../types").Dungeon} Config */
9
10
  /**
10
11
  * ═══════════════════════════════════════════════════════════════
11
12
  * TECHNICAL TEST: Nested Objects & High Cardinality
@@ -48,7 +49,6 @@ const config = {
48
49
  isAnonymous: false,
49
50
  alsoInferFunnels: false,
50
51
  concurrency: 1,
51
- batchSize: 500_000,
52
52
  writeToDisk: false,
53
53
 
54
54
  events: [
@@ -9,7 +9,7 @@ const chance = u.initChance(SEED);
9
9
  const num_users = 100;
10
10
  const days = 360;
11
11
 
12
- /** @typedef {import("../types.js").Dungeon} Config */
12
+ /** @typedef {import("../../types").Dungeon} Config */
13
13
 
14
14
  /**
15
15
  * ═══════════════════════════════════════════════════════════════
@@ -119,7 +119,6 @@ const config = {
119
119
  isAnonymous: false,
120
120
  hasAdSpend: false,
121
121
  hasAvatar: false,
122
- batchSize: 5_500_000,
123
122
  concurrency: 1,
124
123
  writeToDisk: false,
125
124
  percentUsersBornInDataset: 100,
@@ -41,6 +41,27 @@
41
41
  "event": "yak"
42
42
  }
43
43
  ],
44
+ "funnels": [
45
+ {
46
+ "sequence": [
47
+ "qux",
48
+ "garply",
49
+ "durtle",
50
+ "linny",
51
+ "fonk",
52
+ "crumn",
53
+ "yak"
54
+ ]
55
+ },
56
+ {
57
+ "sequence": [
58
+ "foo",
59
+ "bar",
60
+ "baz"
61
+ ],
62
+ "isFirstFunnel": true
63
+ }
64
+ ],
44
65
  "superProps": {
45
66
  "color": [
46
67
  "red",
@@ -160,26 +181,5 @@
160
181
  "jewel beetle",
161
182
  "tortoise beetle"
162
183
  ]
163
- },
164
- "funnels": [
165
- {
166
- "sequence": [
167
- "qux",
168
- "garply",
169
- "durtle",
170
- "linny",
171
- "fonk",
172
- "crumn",
173
- "yak"
174
- ]
175
- },
176
- {
177
- "sequence": [
178
- "foo",
179
- "bar",
180
- "baz"
181
- ],
182
- "isFirstFunnel": true
183
- }
184
- ]
184
+ }
185
185
  }
@@ -5,6 +5,7 @@ import utc from 'dayjs/plugin/utc.js';
5
5
  dayjs.extend(utc);
6
6
  import { weighNumRange, integer } from "../../lib/utils/utils.js";
7
7
 
8
+ /** @typedef {import("../../types").Dungeon} Config */
8
9
  /**
9
10
  * ═══════════════════════════════════════════════════════════════
10
11
  * DATASET OVERVIEW
@@ -6,6 +6,7 @@ dayjs.extend(utc);
6
6
  import { uid, comma } from 'ak-tools';
7
7
  import { weighNumRange, date, integer, weighChoices } from "../../lib/utils/utils.js";
8
8
 
9
+ /** @typedef {import("../../types").Dungeon} Config */
9
10
  /**
10
11
  * ═══════════════════════════════════════════════════════════════
11
12
  * TECHNICAL TEST: Scale & Performance
@@ -30,7 +31,6 @@ const config = {
30
31
  numUsers: 10_000,
31
32
  format: 'json',
32
33
  gzip: true,
33
- batchSize: 500_000,
34
34
  concurrency: 1,
35
35
  region: "US",
36
36
  hasAnonIds: false,