make-mp-data 2.1.11 → 3.0.1
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.
- package/README.md +31 -0
- package/dungeons/adspend.js +2 -2
- package/dungeons/ai-chat-analytics-ed.js +3 -2
- package/dungeons/anon.js +2 -2
- package/dungeons/array-of-object-loopup.js +181 -0
- package/dungeons/benchmark-heavy.js +241 -0
- package/dungeons/benchmark-light.js +141 -0
- package/dungeons/big.js +9 -8
- package/dungeons/business.js +2 -1
- package/dungeons/clinch-agi.js +632 -0
- package/dungeons/complex.js +3 -2
- package/dungeons/copilot.js +383 -0
- package/dungeons/ecommerce-store.js +0 -0
- package/dungeons/experiments.js +5 -4
- package/dungeons/foobar.js +1 -1
- package/dungeons/funnels.js +2 -2
- package/dungeons/gaming.js +3 -2
- package/dungeons/harness/harness-education.js +988 -0
- package/dungeons/harness/harness-fintech.js +976 -0
- package/dungeons/harness/harness-food.js +985 -0
- package/dungeons/harness/harness-gaming.js +1178 -0
- package/dungeons/harness/harness-media.js +961 -0
- package/dungeons/harness/harness-sass.js +923 -0
- package/dungeons/harness/harness-social.js +928 -0
- package/dungeons/kurby.js +211 -0
- package/dungeons/media.js +5 -4
- package/dungeons/mil.js +4 -3
- package/dungeons/mirror.js +2 -2
- package/dungeons/money2020-ed.js +8 -7
- package/dungeons/sanity.js +3 -2
- package/dungeons/scd.js +3 -2
- package/dungeons/simple.js +30 -15
- package/dungeons/strict-event-test.js +30 -0
- package/dungeons/student-teacher.js +3 -2
- package/dungeons/text-generation.js +84 -85
- package/dungeons/too-big-events.js +166 -0
- package/dungeons/uday-schema.json +220 -0
- package/dungeons/userAgent.js +4 -3
- package/index.js +41 -54
- package/lib/core/config-validator.js +122 -7
- package/lib/core/context.js +7 -14
- package/lib/core/storage.js +57 -25
- package/lib/generators/adspend.js +12 -12
- package/lib/generators/events.js +6 -5
- package/lib/generators/funnels.js +32 -10
- package/lib/generators/product-lookup.js +262 -0
- package/lib/generators/product-names.js +195 -0
- package/lib/generators/profiles.js +3 -3
- package/lib/generators/scd.js +13 -3
- package/lib/generators/text.js +17 -4
- package/lib/orchestrators/mixpanel-sender.js +244 -204
- package/lib/orchestrators/user-loop.js +54 -16
- package/lib/templates/funnels-instructions.txt +272 -0
- package/lib/templates/hook-examples.json +187 -0
- package/lib/templates/hooks-instructions.txt +295 -8
- package/lib/templates/phrases.js +473 -16
- package/lib/templates/refine-instructions.txt +485 -0
- package/lib/templates/schema-instructions.txt +239 -109
- package/lib/templates/schema.d.ts +173 -0
- package/lib/templates/verbose-schema.js +140 -206
- package/lib/utils/ai.js +853 -77
- package/lib/utils/chart.js +210 -0
- package/lib/utils/function-registry.js +285 -0
- package/lib/utils/json-evaluator.js +172 -0
- package/lib/utils/logger.js +38 -0
- package/lib/utils/mixpanel.js +101 -0
- package/lib/utils/project.js +3 -2
- package/lib/utils/utils.js +41 -4
- package/package.json +15 -21
- package/types.d.ts +15 -5
- package/lib/generators/text-bak-old.js +0 -1121
- package/lib/orchestrators/worker-manager.js +0 -203
- package/lib/templates/phrases-bak.js +0 -925
- package/lib/templates/prompt (old).txt +0 -98
- package/lib/templates/scratch-dungeon-template.js +0 -116
- package/lib/templates/textQuickTest.js +0 -172
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* and how they might be implemented with extensive comments so an AI can understand it
|
|
4
4
|
* it is not meant to be used as a template, but rather as a reference for how to create a dungeon
|
|
5
5
|
* it is also used as a test for the AI to see if it can generate a dungeon with the same structure
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This file uses the NEW JSON format for function calls with "functionName" and "args"
|
|
6
8
|
*/
|
|
7
9
|
|
|
8
10
|
|
|
@@ -13,13 +15,22 @@ import dayjs from "dayjs";
|
|
|
13
15
|
import utc from "dayjs/plugin/utc.js";
|
|
14
16
|
dayjs.extend(utc);
|
|
15
17
|
import "dotenv/config";
|
|
16
|
-
import { weighNumRange, range, date, initChance, exhaust,
|
|
18
|
+
import { weighNumRange, range, date, initChance, exhaust, integer, decimal, odds } from "../utils/utils.js";
|
|
17
19
|
const { NODE_ENV = "unknown" } = process.env;
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
/** @type {import("../../types.js").Dungeon} */
|
|
21
23
|
//SPLIT HERE
|
|
22
24
|
const DUNGEON = {
|
|
25
|
+
/**
|
|
26
|
+
* ⚠️ IMPORTANT NOTE ABOUT THIS EXAMPLE:
|
|
27
|
+
* This is a comprehensive example showing ALL possible features.
|
|
28
|
+
* Most dungeons will NOT need all these features, especially:
|
|
29
|
+
* - Groups (groupKeys, groupProps) - ONLY for B2B/SaaS scenarios
|
|
30
|
+
* - SCDs - ONLY when properties change over time
|
|
31
|
+
*
|
|
32
|
+
* Focus on the REQUIRED fields: events, funnels, superProps, userProps
|
|
33
|
+
*/
|
|
23
34
|
|
|
24
35
|
/**
|
|
25
36
|
* events are the core building blocks of the dungeon
|
|
@@ -29,29 +40,30 @@ const DUNGEON = {
|
|
|
29
40
|
* they can be simple values or functions that return a value
|
|
30
41
|
* we have a few built-in functions to help you generate data
|
|
31
42
|
* you MUST create events for every dungeon
|
|
43
|
+
*
|
|
44
|
+
* IMPORTANT: All function calls use the new JSON format with functionName and args
|
|
32
45
|
*/
|
|
33
46
|
events: [
|
|
34
47
|
{
|
|
35
48
|
event: "checkout",
|
|
36
49
|
weight: 2,
|
|
37
50
|
properties: {
|
|
38
|
-
amount: weighNumRange
|
|
51
|
+
amount: { "functionName": "weighNumRange", "args": [5, 500, 0.25] }, // weighted random number in range
|
|
39
52
|
currency: ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
|
|
40
53
|
coupon: ["none", "none", "none", "none", "10%OFF", "20%OFF", "10%OFF", "20%OFF", "30%OFF", "40%OFF", "50%OFF"],
|
|
41
|
-
numItems: weighNumRange
|
|
42
|
-
|
|
54
|
+
numItems: { "functionName": "weighNumRange", "args": [1, 10] },
|
|
43
55
|
}
|
|
44
56
|
},
|
|
45
57
|
{
|
|
46
58
|
event: "add to cart",
|
|
47
59
|
weight: 4,
|
|
48
60
|
properties: {
|
|
49
|
-
amount: weighNumRange
|
|
50
|
-
rating: weighNumRange
|
|
51
|
-
reviews: weighNumRange
|
|
61
|
+
amount: { "functionName": "weighNumRange", "args": [5, 500, 0.25] },
|
|
62
|
+
rating: { "functionName": "weighNumRange", "args": [1, 5] },
|
|
63
|
+
reviews: { "functionName": "weighNumRange", "args": [0, 35] },
|
|
52
64
|
isFeaturedItem: [true, false, false],
|
|
53
65
|
itemCategory: ["Books", "Movies", "Music", "Games", "Electronics", "Computers", "Smart Home", "Home", "Garden", "Pet", "Beauty", "Health", "Toys", "Kids", "Baby", "Handmade", "Sports", "Outdoors", "Automotive", "Industrial", "Entertainment", "Art", "Food", "Appliances", "Office", "Wedding", "Software"],
|
|
54
|
-
dateItemListed: date
|
|
66
|
+
dateItemListed: { "functionName": "date", "args": [30, true, "YYYY-MM-DD"] } // date in the last 30 days
|
|
55
67
|
}
|
|
56
68
|
},
|
|
57
69
|
{
|
|
@@ -68,12 +80,10 @@ const DUNGEON = {
|
|
|
68
80
|
properties: {
|
|
69
81
|
videoCategory: ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"],
|
|
70
82
|
isFeaturedItem: [true, false, false],
|
|
71
|
-
watchTimeSec: weighNumRange
|
|
83
|
+
watchTimeSec: { "functionName": "weighNumRange", "args": [10, 600, 0.25] },
|
|
72
84
|
quality: ["2160p", "1440p", "1080p", "720p", "480p", "360p", "240p"],
|
|
73
85
|
format: ["mp4", "avi", "mov", "mpg"],
|
|
74
|
-
uploader_id: chance.guid
|
|
75
|
-
video_id: range(1, 1000) // SEE LOOKUP TABLES BELOW
|
|
76
|
-
|
|
86
|
+
uploader_id: { "functionName": "chance.guid", "args": [] } // Using chance.js library with dot notation
|
|
77
87
|
}
|
|
78
88
|
},
|
|
79
89
|
{
|
|
@@ -82,8 +92,7 @@ const DUNGEON = {
|
|
|
82
92
|
properties: {
|
|
83
93
|
isFeaturedItem: [true, false, false],
|
|
84
94
|
itemCategory: ["Books", "Movies", "Music", "Games", "Electronics", "Computers", "Smart Home", "Home", "Garden", "Pet", "Beauty", "Health", "Toys", "Kids", "Baby", "Handmade", "Sports", "Outdoors", "Automotive", "Industrial", "Entertainment", "Art", "Food", "Appliances", "Office", "Wedding", "Software"],
|
|
85
|
-
dateItemListed: date
|
|
86
|
-
product_id: range(1, 1000) // SEE LOOKUP TABLES BELOW
|
|
95
|
+
dateItemListed: { "functionName": "date", "args": [30, true, "YYYY-MM-DD"] }
|
|
87
96
|
}
|
|
88
97
|
},
|
|
89
98
|
{
|
|
@@ -92,247 +101,172 @@ const DUNGEON = {
|
|
|
92
101
|
properties: {
|
|
93
102
|
isFeaturedItem: [true, false, false],
|
|
94
103
|
itemCategory: ["Books", "Movies", "Music", "Games", "Electronics", "Computers", "Smart Home", "Home", "Garden", "Pet", "Beauty", "Health", "Toys", "Kids", "Baby", "Handmade", "Sports", "Outdoors", "Automotive", "Industrial", "Entertainment", "Art", "Food", "Appliances", "Office", "Wedding", "Software"],
|
|
95
|
-
dateItemListed: date
|
|
104
|
+
dateItemListed: { "functionName": "date", "args": [30, true, "YYYY-MM-DD"] },
|
|
96
105
|
}
|
|
97
106
|
},
|
|
98
107
|
{
|
|
99
108
|
event: "sign up",
|
|
100
109
|
isFirstEvent: true,
|
|
101
|
-
weight:
|
|
110
|
+
weight: 1,
|
|
111
|
+
properties: {
|
|
112
|
+
wasReferred: [true, false, false, false],
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
event: "search",
|
|
117
|
+
weight: 6,
|
|
118
|
+
properties: {
|
|
119
|
+
query: { "functionName": "chance.word", "args": [] },
|
|
120
|
+
resultsFound: { "functionName": "weighNumRange", "args": [0, 100, 0.25] },
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
event: "remove from cart",
|
|
125
|
+
weight: 1,
|
|
102
126
|
properties: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
flags: ["on", "off"],
|
|
106
|
-
experiment_ids: ["1234", "5678", "9012", "3456", "7890"],
|
|
107
|
-
multiVariate: [true, false]
|
|
127
|
+
amount: { "functionName": "weighNumRange", "args": [5, 500, 0.25] },
|
|
128
|
+
reason: ["changed mind", "too expensive", "found better", "not needed"],
|
|
108
129
|
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
event: "share item",
|
|
133
|
+
weight: 2,
|
|
134
|
+
properties: {
|
|
135
|
+
medium: ["email", "facebook", "twitter", "whatsapp", "sms", "slack"],
|
|
136
|
+
recipient_count: { "functionName": "weighNumRange", "args": [1, 10] },
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
event: "session end",
|
|
141
|
+
weight: 1
|
|
109
142
|
}
|
|
110
143
|
],
|
|
144
|
+
|
|
111
145
|
/**
|
|
112
|
-
* superProps are properties that are
|
|
113
|
-
* they are selected randomly each time an event is generated
|
|
146
|
+
* superProps are properties that are added to EVERY event
|
|
114
147
|
* they can be simple values or functions that return a value
|
|
115
|
-
*
|
|
148
|
+
* the random values will be chosen for each event
|
|
149
|
+
* you MUST create superProps for every dungeon
|
|
116
150
|
*/
|
|
117
151
|
superProps: {
|
|
118
|
-
|
|
152
|
+
plan: ["free", "free", "free", "plus", "plus", "pro"], // arrays are randomly sampled from
|
|
153
|
+
// using arrow functions with the new format
|
|
154
|
+
region: { "functionName": "arrow", "body": "chance.pickone(['North America', 'Europe', 'Asia', 'South America', 'Africa', 'Oceania'])" }
|
|
119
155
|
},
|
|
156
|
+
|
|
120
157
|
/**
|
|
121
|
-
*
|
|
122
|
-
* except each user has a single set of user properties
|
|
123
|
-
* these are properties that are attached to the user profile
|
|
158
|
+
* userProps are properties that are associated with a user
|
|
124
159
|
* they can be simple values or functions that return a value
|
|
160
|
+
* this is the $set property on the user profile
|
|
125
161
|
* you MUST create userProps for every dungeon
|
|
126
162
|
*/
|
|
127
163
|
userProps: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
164
|
+
favoriteBrand: ["nike", "adidas", "puma", "reebok", "new balance", "asics", "vans", "converse"],
|
|
165
|
+
favoriteProduct: ["shoes", "clothing", "sports", "equipment"],
|
|
166
|
+
// Example using chance.integer with options
|
|
167
|
+
age: { "functionName": "chance.integer", "args": [{"min": 18, "max": 65}] },
|
|
168
|
+
isSubscribed: [true, false],
|
|
169
|
+
plan: ["free", "free", "free", "plus", "plus", "pro"],
|
|
170
|
+
signupDate: { "functionName": "date", "args": [365, true, "YYYY-MM-DD"] },
|
|
171
|
+
// Example using arrow function for complex expression
|
|
172
|
+
user_id: { "functionName": "arrow", "body": "`user_${chance.guid()}`" },
|
|
173
|
+
company: { "functionName": "chance.company", "args": [] },
|
|
174
|
+
email: { "functionName": "chance.email", "args": [] },
|
|
175
|
+
name: { "functionName": "chance.name", "args": [] }
|
|
132
176
|
},
|
|
177
|
+
|
|
133
178
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* Funnels are the primary mechanism used to generate the example data, and it's critical sequences match events in the events array.
|
|
140
|
-
* there are many different options for the funnels like:
|
|
141
|
-
* isFirstFunnel, conversionRate, isChurnFunnel, order, props, requireRepeats, timeToConvert, weight, conditions
|
|
142
|
-
*
|
|
143
|
-
* isFirstFunnel are funnels a user will only go through once (like a sign up)
|
|
144
|
-
* non isFirstFunnel are funnels a user will go through multiple times (like a purchase)
|
|
145
|
-
*
|
|
146
|
-
* conditions are used to filter which users are eligible for a specific funnel based on their user properties
|
|
147
|
-
* this is useful when different user segments should have different behavioral patterns
|
|
148
|
-
* for example: premium users might have access to advanced features, students vs teachers have different workflows
|
|
149
|
-
*
|
|
179
|
+
* funnels are sequences of events that represent a user journey
|
|
180
|
+
* each funnel has a sequence of events and a conversion rate
|
|
181
|
+
* the conversion rate determines how many users complete the funnel
|
|
182
|
+
* you can also add conditions to funnels to filter users based on properties
|
|
183
|
+
* you MUST create funnels for every dungeon
|
|
150
184
|
*/
|
|
151
185
|
funnels: [
|
|
152
186
|
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
sequence: ["page view", "page view", "sign up"],
|
|
156
|
-
isFirstFunnel: true,
|
|
157
|
-
conversionRate: 50, // 50% of users will convert
|
|
158
|
-
order: "sequential", // events must occur in order
|
|
159
|
-
requireRepeats: false, // users can repeat events in the funnel
|
|
160
|
-
props: {}, // you can add properties to the funnel
|
|
161
|
-
timeToConvert: 1, // time to convert in hours
|
|
187
|
+
sequence: ["sign up", "page view", "view item", "add to cart", "checkout"],
|
|
188
|
+
conversionRate: 15, // Integer 0-100 representing percentage
|
|
162
189
|
},
|
|
163
190
|
{
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
sequence: ["page view", "view item", "add to cart", "checkout"],
|
|
167
|
-
isFirstFunnel: false,
|
|
168
|
-
conversionRate: 10,
|
|
169
|
-
timeToConvert: 24,
|
|
170
|
-
requireRepeats: true, // users can repeat events in the funnel
|
|
171
|
-
order: "first-and-last-fixed"
|
|
191
|
+
sequence: ["page view", "watch video"],
|
|
192
|
+
conversionRate: 65,
|
|
172
193
|
},
|
|
173
194
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
isFirstFunnel: false,
|
|
178
|
-
conversionRate: 65,
|
|
179
|
-
timeToConvert: 2,
|
|
180
|
-
requireRepeats: true, // users can repeat events in the funnel
|
|
181
|
-
order: "random",
|
|
182
|
-
props: {
|
|
183
|
-
"browsing type": ["casual", "intentional", "exploratory"] // you can add properties to the funnel
|
|
184
|
-
}
|
|
195
|
+
sequence: ["page view", "view item", "save item"],
|
|
196
|
+
conversionRate: 25,
|
|
197
|
+
conditions: { plan: "free" } // Conditions must be an object, not a string expression
|
|
185
198
|
},
|
|
186
199
|
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
conditions: {
|
|
194
|
-
role: "premium" // only users with role "premium" are eligible for this funnel
|
|
195
|
-
},
|
|
196
|
-
order: "sequential",
|
|
197
|
-
props: {
|
|
198
|
-
"feature_tier": "premium"
|
|
199
|
-
}
|
|
200
|
+
sequence: ["search", "view item", "add to cart"],
|
|
201
|
+
conversionRate: 35
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
sequence: ["page view", "view item", "share item"],
|
|
205
|
+
conversionRate: 10
|
|
200
206
|
}
|
|
201
207
|
],
|
|
208
|
+
|
|
202
209
|
/**
|
|
203
|
-
* scdProps are
|
|
204
|
-
* these are properties that change over time
|
|
205
|
-
*
|
|
206
|
-
*
|
|
210
|
+
* scdProps are Slowly Changing Dimensions properties
|
|
211
|
+
* these are properties that change over time for users or groups
|
|
212
|
+
* each SCD property has a type (user or group), frequency, values, timing, and max changes
|
|
213
|
+
* OPTIONAL: only include if your use case involves properties that change over time
|
|
207
214
|
*/
|
|
208
215
|
scdProps: {
|
|
209
216
|
role: {
|
|
210
217
|
type: "user",
|
|
211
|
-
frequency: "
|
|
212
|
-
values: ["admin", "
|
|
213
|
-
timing: "
|
|
214
|
-
max:
|
|
218
|
+
frequency: "month", // how often the property changes
|
|
219
|
+
values: ["admin", "user", "viewer", "editor"],
|
|
220
|
+
timing: "fixed", // fixed or fuzzy
|
|
221
|
+
max: 5 // maximum number of changes per entity
|
|
215
222
|
},
|
|
216
|
-
|
|
223
|
+
subscription_tier: {
|
|
217
224
|
type: "user",
|
|
218
|
-
frequency: "
|
|
219
|
-
values: weighNumRange(1, 10, 2, 150),
|
|
220
|
-
timing: "fuzzy",
|
|
221
|
-
max: 10
|
|
222
|
-
},
|
|
223
|
-
MRR: {
|
|
224
|
-
type: "company_id",
|
|
225
|
-
frequency: "month",
|
|
226
|
-
values: weighNumRange(0, 10000, .15),
|
|
227
|
-
timing: "fixed",
|
|
228
|
-
max: 10
|
|
229
|
-
},
|
|
230
|
-
AccountHealthScore: {
|
|
231
|
-
type: "company_id",
|
|
232
|
-
frequency: "week",
|
|
233
|
-
values: weighNumRange(1, 10, .15),
|
|
234
|
-
timing: "fixed",
|
|
235
|
-
max: 40
|
|
236
|
-
},
|
|
237
|
-
plan: {
|
|
238
|
-
type: "company_id",
|
|
239
|
-
frequency: "month",
|
|
225
|
+
frequency: "month", // Changed from "quarter" - valid options are: day, week, month, year
|
|
240
226
|
values: ["free", "basic", "premium", "enterprise"],
|
|
241
|
-
timing: "
|
|
242
|
-
max:
|
|
227
|
+
timing: "fuzzy", // Changed from "random" - valid options are: fixed, fuzzy
|
|
228
|
+
max: 3
|
|
243
229
|
}
|
|
244
230
|
},
|
|
245
231
|
|
|
246
|
-
|
|
247
232
|
/**
|
|
248
|
-
* groupKeys
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
233
|
+
* groupKeys define the types of groups in your data
|
|
234
|
+
* Each group key is a tuple of [groupName, numberOfGroups]
|
|
235
|
+
*
|
|
236
|
+
* ⚠️ IMPORTANT: Groups are OPTIONAL and should ONLY be included when:
|
|
237
|
+
* - The use case explicitly involves B2B relationships
|
|
238
|
+
* - You have SaaS with company/team accounts
|
|
239
|
+
* - There's a clear one-to-many relationship (one company → many users)
|
|
240
|
+
* - Keywords mentioned: "company", "organization", "team", "workspace", "account"
|
|
241
|
+
*
|
|
242
|
+
* DO NOT include for B2C (business to consumer) scenarios
|
|
243
|
+
* DO NOT include unless explicitly needed for group analytics
|
|
253
244
|
*/
|
|
254
245
|
groupKeys: [
|
|
255
|
-
["company_id",
|
|
256
|
-
["
|
|
246
|
+
["company_id", 1000], // 1000 companies
|
|
247
|
+
["team_id", 5000] // 5000 teams
|
|
257
248
|
],
|
|
258
|
-
groupProps: {
|
|
259
|
-
company_id: {
|
|
260
|
-
name: () => { return chance.company(); }, // YOU CAN USE CHANCE IT"S BUILT IN!
|
|
261
|
-
email: () => { return `CSM: ${chance.pickone(["AK", "Jessica", "Michelle", "Dana", "Brian", "Dave"])}`; },
|
|
262
|
-
"# of employees": weighNumRange(3, 10000),
|
|
263
|
-
"industry": ["tech", "finance", "healthcare", "education", "government", "non-profit"],
|
|
264
|
-
"segment": ["enterprise", "SMB", "mid-market"],
|
|
265
|
-
"products": [["core"], ["core"], ["core", "add-ons"], ["core", "pro-serve"], ["core", "add-ons", "pro-serve"], ["core", "BAA", "enterprise"], ["free"], ["free"], ["free", "addons"]],
|
|
266
|
-
},
|
|
267
|
-
room_id: {
|
|
268
|
-
name: () => { return `#${chance.word({ length: integer(4, 24), capitalize: true })}`; },
|
|
269
|
-
email: ["public", "private"],
|
|
270
|
-
"room provider": ["partner", "core", "core", "core"],
|
|
271
|
-
"room capacity": weighNumRange(3, 1000000),
|
|
272
|
-
"isPublic": [true, false, false, false, false],
|
|
273
|
-
"country": chance.country.bind(chance),
|
|
274
|
-
"isVerified": [true, true, false, false, false],
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
249
|
|
|
278
250
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
|
|
284
|
-
groupEvents: [
|
|
285
|
-
{
|
|
286
|
-
attribute_to_user: false,
|
|
287
|
-
event: "card charged",
|
|
288
|
-
weight: 1,
|
|
289
|
-
|
|
290
|
-
frequency: 30,
|
|
291
|
-
group_key: "company_id",
|
|
292
|
-
group_size: 500,
|
|
293
|
-
properties: {
|
|
294
|
-
amount: weighNumRange(5, 500, .25),
|
|
295
|
-
currency: ["USD", "USD", "USD", "CAD", "EUR", "EUR", "BTC", "BTC", "ETH", "JPY"],
|
|
296
|
-
plan: ["basic", "premium", "enterprise"],
|
|
297
|
-
"payment method": []
|
|
298
|
-
}
|
|
299
|
-
}],
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* lookupTables are used to represent static data that can be used in events
|
|
303
|
-
* they are an array of objects, where each object is a key-value pair
|
|
304
|
-
* this is useful for representing static data that can be used in events
|
|
305
|
-
* like product information, user information, etc...
|
|
306
|
-
* you do NOT need to make lookupTables for every dungeon; only the ones with a use case for them
|
|
307
|
-
* if you DO make a lookupTable, you MUST provide a key in some events whose value will be numerical
|
|
251
|
+
* groupProps are properties associated with groups
|
|
252
|
+
* Similar to userProps but for group entities
|
|
253
|
+
*
|
|
254
|
+
* ⚠️ IMPORTANT: ONLY include if you have groupKeys defined
|
|
255
|
+
* These represent attributes of the group entities (companies, teams, etc.)
|
|
308
256
|
*/
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
-
"rating": weighNumRange(1, 5),
|
|
321
|
-
"reviews": weighNumRange(0, 35)
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
key: "video_id",
|
|
327
|
-
entries: 50000,
|
|
328
|
-
attributes: {
|
|
329
|
-
isFlagged: [true, false, false, false, false],
|
|
330
|
-
copyright: ["all rights reserved", "creative commons", "creative commons", "public domain", "fair use"],
|
|
331
|
-
uploader_id: chance.guid.bind(chance),
|
|
332
|
-
"uploader influence": ["low", "low", "low", "medium", "medium", "high"],
|
|
333
|
-
thumbs: weighNumRange(0, 35),
|
|
334
|
-
rating: ["G", "PG", "PG-13", "R", "NC-17", "PG-13", "R", "NC-17", "R", "PG", "PG"]
|
|
257
|
+
groupProps: {
|
|
258
|
+
company_id: {
|
|
259
|
+
name: { "functionName": "chance.company", "args": [] },
|
|
260
|
+
plan: ["startup", "growth", "enterprise"],
|
|
261
|
+
employees: { "functionName": "weighNumRange", "args": [1, 5000, 0.3] },
|
|
262
|
+
industry: { "functionName": "chance.pickone", "args": [["tech", "finance", "healthcare", "retail", "manufacturing"]] }
|
|
263
|
+
},
|
|
264
|
+
team_id: {
|
|
265
|
+
name: { "functionName": "arrow", "body": "`Team ${chance.word()}`" },
|
|
266
|
+
size: { "functionName": "weighNumRange", "args": [2, 50, 0.2] },
|
|
267
|
+
department: ["engineering", "sales", "marketing", "support", "product"]
|
|
335
268
|
}
|
|
336
|
-
|
|
337
|
-
}],
|
|
269
|
+
}
|
|
338
270
|
};
|
|
271
|
+
|
|
272
|
+
export default DUNGEON;
|