@bash-app/bash-common 30.306.0 → 30.308.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 (36) hide show
  1. package/dist/__tests__/guestPartySize.test.d.ts +2 -0
  2. package/dist/__tests__/guestPartySize.test.d.ts.map +1 -0
  3. package/dist/__tests__/guestPartySize.test.js +22 -0
  4. package/dist/__tests__/guestPartySize.test.js.map +1 -0
  5. package/dist/__tests__/sideQuestIdeas.test.d.ts +2 -0
  6. package/dist/__tests__/sideQuestIdeas.test.d.ts.map +1 -0
  7. package/dist/__tests__/sideQuestIdeas.test.js +13 -0
  8. package/dist/__tests__/sideQuestIdeas.test.js.map +1 -0
  9. package/dist/extendedSchemas.d.ts +4 -0
  10. package/dist/extendedSchemas.d.ts.map +1 -1
  11. package/dist/extendedSchemas.js.map +1 -1
  12. package/dist/guestPartySize.d.ts +18 -0
  13. package/dist/guestPartySize.d.ts.map +1 -0
  14. package/dist/guestPartySize.js +72 -0
  15. package/dist/guestPartySize.js.map +1 -0
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +2 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/mirroredPrismaEnums.d.ts +3 -0
  21. package/dist/mirroredPrismaEnums.d.ts.map +1 -1
  22. package/dist/mirroredPrismaEnums.js +3 -0
  23. package/dist/mirroredPrismaEnums.js.map +1 -1
  24. package/dist/sideQuestIdeas.d.ts +51 -0
  25. package/dist/sideQuestIdeas.d.ts.map +1 -0
  26. package/dist/sideQuestIdeas.js +215 -0
  27. package/dist/sideQuestIdeas.js.map +1 -0
  28. package/package.json +1 -1
  29. package/prisma/schema.prisma +204 -0
  30. package/src/__tests__/guestPartySize.test.ts +31 -0
  31. package/src/__tests__/sideQuestIdeas.test.ts +16 -0
  32. package/src/extendedSchemas.ts +4 -0
  33. package/src/guestPartySize.ts +83 -0
  34. package/src/index.ts +2 -0
  35. package/src/mirroredPrismaEnums.ts +3 -0
  36. package/src/sideQuestIdeas.ts +260 -0
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Side Quest starter templates and category display metadata.
3
+ * Behavior design: Action → Prove (quest type) → Reward.
4
+ */
5
+
6
+ export type SideQuestCategoryId =
7
+ | "Explore"
8
+ | "Connect"
9
+ | "Discover"
10
+ | "SupportLocal"
11
+ | "Compete"
12
+ | "Transit"
13
+ | "Create"
14
+ | "GiveBack";
15
+
16
+ export type SideQuestTypeId =
17
+ | "Qr"
18
+ | "Code"
19
+ | "Gps"
20
+ | "Photo"
21
+ | "CheckIn"
22
+ | "Purchase"
23
+ | "Vote"
24
+ | "Sponsor"
25
+ | "Social"
26
+ | "Trivia";
27
+
28
+ export const SIDE_QUEST_CATEGORY_META: Record<
29
+ SideQuestCategoryId,
30
+ { label: string; emoji: string }
31
+ > = {
32
+ Explore: { label: "Explore", emoji: "🧭" },
33
+ Connect: { label: "Connect", emoji: "🤝" },
34
+ Discover: { label: "Discover", emoji: "🎵" },
35
+ SupportLocal: { label: "Support Local", emoji: "🛍️" },
36
+ Compete: { label: "Compete", emoji: "🏆" },
37
+ Transit: { label: "Transit", emoji: "🚆" },
38
+ Create: { label: "Create", emoji: "📸" },
39
+ GiveBack: { label: "Give Back", emoji: "❤️" },
40
+ };
41
+
42
+ /** Phase 1 host-selectable quest types */
43
+ export const SIDE_QUEST_PHASE1_TYPES: SideQuestTypeId[] = ["Qr", "Code"];
44
+
45
+ export const SIDE_QUEST_TYPE_META: Record<
46
+ SideQuestTypeId,
47
+ { label: string; description: string; phase1: boolean }
48
+ > = {
49
+ Qr: {
50
+ label: "QR Quest",
51
+ description: "Guest scans a printed QR at the location.",
52
+ phase1: true,
53
+ },
54
+ Code: {
55
+ label: "Code Quest",
56
+ description: "Guest enters a short code shown on-site.",
57
+ phase1: true,
58
+ },
59
+ Gps: {
60
+ label: "GPS Quest",
61
+ description: "Guest checks in near a location.",
62
+ phase1: false,
63
+ },
64
+ Photo: {
65
+ label: "Photo Quest",
66
+ description: "Guest uploads a photo as proof.",
67
+ phase1: false,
68
+ },
69
+ CheckIn: {
70
+ label: "Check-in Quest",
71
+ description: "Tied to event ticket check-in.",
72
+ phase1: false,
73
+ },
74
+ Purchase: {
75
+ label: "Purchase Quest",
76
+ description: "Completes after a qualifying purchase.",
77
+ phase1: false,
78
+ },
79
+ Vote: {
80
+ label: "Vote Quest",
81
+ description: "Completes after voting in a competition.",
82
+ phase1: false,
83
+ },
84
+ Sponsor: {
85
+ label: "Sponsor Quest",
86
+ description: "Visit or engage with a sponsor booth.",
87
+ phase1: false,
88
+ },
89
+ Social: {
90
+ label: "Social Quest",
91
+ description: "Share or tag on social.",
92
+ phase1: false,
93
+ },
94
+ Trivia: {
95
+ label: "Trivia Quest",
96
+ description: "Answer a question correctly.",
97
+ phase1: false,
98
+ },
99
+ };
100
+
101
+ export interface SideQuestIdea {
102
+ id: string;
103
+ title: string;
104
+ description: string;
105
+ category: SideQuestCategoryId;
106
+ questType: SideQuestTypeId;
107
+ pointsReward: number;
108
+ tags: string[];
109
+ }
110
+
111
+ export const SIDE_QUEST_IDEAS: SideQuestIdea[] = [
112
+ {
113
+ id: "festival-transit",
114
+ title: "Ride transit to the festival",
115
+ description: "Take FrontRunner, TRAX, or the bus — scan the code at the station booth.",
116
+ category: "Transit",
117
+ questType: "Qr",
118
+ pointsReward: 100,
119
+ tags: ["festival", "transit"],
120
+ },
121
+ {
122
+ id: "festival-vendor",
123
+ title: "Try food from a local vendor",
124
+ description: "Support a food vendor on site and grab their quest code.",
125
+ category: "SupportLocal",
126
+ questType: "Code",
127
+ pointsReward: 50,
128
+ tags: ["festival", "food"],
129
+ },
130
+ {
131
+ id: "festival-artists",
132
+ title: "Watch 3 different artists",
133
+ description: "Catch three sets — collect the stage code after the third.",
134
+ category: "Discover",
135
+ questType: "Code",
136
+ pointsReward: 75,
137
+ tags: ["festival", "music"],
138
+ },
139
+ {
140
+ id: "festival-photo",
141
+ title: "Take a photo at the landmark",
142
+ description: "Find the landmark and scan the QR nearby.",
143
+ category: "Create",
144
+ questType: "Qr",
145
+ pointsReward: 25,
146
+ tags: ["festival", "photo"],
147
+ },
148
+ {
149
+ id: "market-three-vendors",
150
+ title: "Buy from 3 vendors",
151
+ description: "Support three market stalls — get the code from the info booth when done.",
152
+ category: "SupportLocal",
153
+ questType: "Code",
154
+ pointsReward: 75,
155
+ tags: ["market"],
156
+ },
157
+ {
158
+ id: "market-meet-farmer",
159
+ title: "Meet a farmer",
160
+ description: "Say hello to a grower and scan their booth QR.",
161
+ category: "Connect",
162
+ questType: "Qr",
163
+ pointsReward: 50,
164
+ tags: ["market"],
165
+ },
166
+ {
167
+ id: "conference-keynote",
168
+ title: "Attend a keynote",
169
+ description: "Sit in on a keynote — scan the room QR on the way out.",
170
+ category: "Discover",
171
+ questType: "Qr",
172
+ pointsReward: 50,
173
+ tags: ["conference"],
174
+ },
175
+ {
176
+ id: "conference-meet-five",
177
+ title: "Meet five new people",
178
+ description: "Network intentionally — enter the lounge code when you've made five intros.",
179
+ category: "Connect",
180
+ questType: "Code",
181
+ pointsReward: 75,
182
+ tags: ["conference"],
183
+ },
184
+ {
185
+ id: "campus-club",
186
+ title: "Join a club fair booth",
187
+ description: "Stop by a student org table and scan their QR.",
188
+ category: "Connect",
189
+ questType: "Qr",
190
+ pointsReward: 40,
191
+ tags: ["campus"],
192
+ },
193
+ {
194
+ id: "downtown-mural",
195
+ title: "Find a hidden mural",
196
+ description: "Hunt the mural and scan the nearby QR.",
197
+ category: "Explore",
198
+ questType: "Qr",
199
+ pointsReward: 60,
200
+ tags: ["downtown"],
201
+ },
202
+ {
203
+ id: "give-back-volunteer",
204
+ title: "Complete a volunteer shift",
205
+ description: "Help out — staff will share the completion code.",
206
+ category: "GiveBack",
207
+ questType: "Code",
208
+ pointsReward: 100,
209
+ tags: ["volunteer"],
210
+ },
211
+ {
212
+ id: "compete-vote",
213
+ title: "Vote for your favorite",
214
+ description: "Cast your vote — use the code shown after you submit.",
215
+ category: "Compete",
216
+ questType: "Code",
217
+ pointsReward: 25,
218
+ tags: ["festival", "vote"],
219
+ },
220
+ ];
221
+
222
+ export function filterSideQuestIdeas(search: string): SideQuestIdea[] {
223
+ const q = search.trim().toLowerCase();
224
+ if (!q) return SIDE_QUEST_IDEAS;
225
+ return SIDE_QUEST_IDEAS.filter(
226
+ (idea) =>
227
+ idea.title.toLowerCase().includes(q) ||
228
+ idea.description.toLowerCase().includes(q) ||
229
+ idea.tags.some((t) => t.toLowerCase().includes(q)) ||
230
+ idea.category.toLowerCase().includes(q)
231
+ );
232
+ }
233
+
234
+ /** Lifetime achievement catalog (Phase 2 awarding; definitions ship now). */
235
+ export const ADVENTURE_ACHIEVEMENT_CATALOG = [
236
+ {
237
+ id: "explorer",
238
+ name: "Explorer",
239
+ description: "Completed 100 Side Quests",
240
+ threshold: 100,
241
+ },
242
+ {
243
+ id: "foodie",
244
+ name: "Foodie",
245
+ description: "Visited 50 vendors via Support Local quests",
246
+ threshold: 50,
247
+ },
248
+ {
249
+ id: "festival-veteran",
250
+ name: "Festival Veteran",
251
+ description: "Attended 25 festivals with Side Quests",
252
+ threshold: 25,
253
+ },
254
+ {
255
+ id: "transit-hero",
256
+ name: "Transit Hero",
257
+ description: "Rode transit to 15 events",
258
+ threshold: 15,
259
+ },
260
+ ] as const;