You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5efb46d
Browse filesBrowse the repository at this point in the historyBrowse files
**Note:** Each event's `participantIds` is populated with participant `name` and `userId` fields, enabling the frontend to load participant connections.
448
+
429
449
**Error Responses:**
430
450
431
451
| Status | Error |
@@ -456,6 +476,8 @@ Update a user's profile. Users can only update their own profile.
|`organization`| string | Where the user works/studies |
480
+
|`title`| string | Job title or role |
459
481
460
482
**Success Response (200):**
461
483
@@ -716,13 +738,13 @@ Join an event as a registered (authenticated) user.
716
738
| 404 |`"User not found"`|
717
739
| 404 |`"Event not found"`|
718
740
| 409 |`"User already joined"`|
719
-
| 409 |`"This name is already taken in this event"`|
720
741
721
742
**Special Behavior:**
722
743
- Creates a Participant record linking user to event
744
+
- If the display name is already taken in the event, a `#XXX` suffix is automatically appended (e.g., `John` becomes `John#472`). The response `participant.name` reflects the final display name.
723
745
- Adds participant to event's `participantIds` array
724
746
- Adds event to user's `eventHistoryIds` array
725
-
- Triggers Pusher event `participant-joined` on channel `event-{eventId}` with payload `{ participantId, name }`
747
+
- Triggers Pusher event `participant-joined` on channel `event-{eventId}` with payload `{ participantId, name }` (using the final display name)
726
748
727
749
---
728
750
@@ -740,9 +762,18 @@ Join an event as a guest (no account required).
740
762
741
763
**Request Body:**
742
764
743
-
| Field | Type | Required |
744
-
|--------|--------|----------|
745
-
|`name`| string | Yes |
765
+
| Field | Type | Required | Description |
766
+
|--------|--------|----------|-------------|
767
+
|`name`| string | Yes | Display name |
768
+
|`email`| string | No*| Email address |
769
+
|`socialLinks`| object | No*| Social links |
770
+
|`socialLinks.linkedin`| string | No | LinkedIn URL |
771
+
|`socialLinks.github`| string | No | GitHub URL |
772
+
|`socialLinks.other`| string | No | Other URL |
773
+
|`organization`| string | No*| Where the guest works/studies |
774
+
|`title`| string | No | Job title or role |
775
+
776
+
\* At least one of the following is required: `email`, a non-empty field in `socialLinks`, or `organization`.
746
777
747
778
**Success Response (200):**
748
779
@@ -765,15 +796,18 @@ Join an event as a guest (no account required).
765
796
| Status | Error |
766
797
|--------|-------|
767
798
| 400 |`"Missing fields: guest name and eventId are required"`|
799
+
| 400 |`"At least one contact method (email or social link) or organization is required"`|
800
+
| 400 |`"Invalid email format"`|
768
801
| 400 |`"Event is full"`|
769
802
| 404 |`"Event not found"`|
770
-
| 409 |`"This name is already taken in this event"`|
803
+
| 409 |`"A user with this email already exists"`|
771
804
772
805
**Special Behavior:**
773
-
- Creates a guest User (`authProvider: 'guest'`, no email/password)
806
+
- Creates a guest User (`authProvider: 'guest'`) with the provided contact info (email, social links, and/or organization)
807
+
- If the display name is already taken in the event, a `#XXX` suffix is automatically appended (e.g., `John` becomes `John#472`). The response `participant.name` reflects the final display name, and the guest User's name is updated to match.
774
808
- Returns a JWT so the guest can make authenticated requests
775
809
- Guest can later upgrade to a full account via `PUT /api/users/:userId`
776
-
- Triggers Pusher event `participant-joined` on channel `event-{eventId}` with payload `{ participantId, name }`
810
+
- Triggers Pusher event `participant-joined` on channel `event-{eventId}` with payload `{ participantId, name }` (using the final display name)
777
811
778
812
---
779
813
@@ -827,9 +861,9 @@ Create a bingo game for an event.
827
861
828
862
| Field | Type | Required | Notes |
829
863
|---------------|------------|----------|-------|
830
-
|`_eventId`| ObjectId | Yes | Must reference an existing event |
831
-
|`description`| string | No ||
832
-
|`grid`|string[][]| No | 2D array of strings|
864
+
|`_eventId`| ObjectId | Yes | Must reference an existing event |
865
+
|`description`| string | No ||
866
+
|`grid`|BingoTile\[\]\[\]| No | 2D array of `{ question: string, shortQuestion: string }`|
833
867
834
868
**Success Response (201):**
835
869
@@ -842,9 +876,16 @@ Create a bingo game for an event.
842
876
"_eventId": "665a...",
843
877
"description": "Networking Bingo",
844
878
"grid": [
845
-
["Has a pet", "Speaks 3 languages", "Loves hiking"],
846
-
["Works remotely", "Free space", "Plays guitar"],
847
-
["From another country", "Has a blog", "Codes in Rust"]
879
+
[
880
+
{ "question": "Has a pet", "shortQuestion": "Has pet" },
|`id`| string | Yes | Bingo `_id` or event `_eventId`|
909
-
|`description`| string | No ||
910
-
|`grid`|string[][]| No | 2D array of strings|
954
+
|`id`| string | Yes | Bingo `_id` or event `_eventId`|
955
+
|`description`| string | No ||
956
+
|`grid`|BingoTile\[\]\[\]| No | 2D array of `{ question: string, shortQuestion: string }`|
911
957
912
958
**Success Response (200):**
913
959
@@ -924,14 +970,67 @@ Update a bingo game.
924
970
|--------|-------|
925
971
| 400 |`"id is required"`|
926
972
| 400 |`"description must be a string"`|
927
-
| 400 |`"grid must be a 2D array of strings"`|
973
+
| 400 |`"grid must be a 2D array of { question: string, shortQuestion: string }"`|
928
974
| 400 |`"Nothing to update: provide description and/or grid"`|
929
975
| 404 |`"Bingo not found"`|
930
976
931
977
**Special Behavior:** Tries to find by `_id` first, then falls back to `_eventId`.
932
978
933
979
---
934
980
981
+
### POST `/api/bingo/generate`
982
+
983
+
Generate an AI-powered bingo grid based on a given context.
984
+
985
+
-**Auth:** Protected
986
+
987
+
**Request Body:**
988
+
989
+
| Field | Type | Required | Notes |
990
+
|-----------|--------|----------|-------|
991
+
|`context`| string | Yes | Context used to generate bingo content |
992
+
|`n_rows`| number | Yes | Number of rows (1–5) |
993
+
|`n_cols`| number | Yes | Number of columns (1–5) |
994
+
995
+
**Example Request:**
996
+
997
+
```json
998
+
{
999
+
"context": "Software engineer networking event where developers meet, discuss tech stacks, exchange ideas, talk about startups, open source, AI, and career opportunities",
1000
+
"n_rows": 2,
1001
+
"n_cols": 2
1002
+
}
1003
+
```
1004
+
1005
+
**Example Response:**
1006
+
```
1007
+
{
1008
+
"status": true,
1009
+
"bingo_grid": [
1010
+
[
1011
+
{
1012
+
"question": "Sketches architecture on a napkin",
1013
+
"shortQuestion": "Napkin architecture"
1014
+
},
1015
+
{
1016
+
"question": "Shows a product demo on phone",
1017
+
"shortQuestion": "Phone product demo"
1018
+
}
1019
+
],
1020
+
[
1021
+
{
1022
+
"question": "Explains their open-source contribution",
0 commit comments