Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TODO-Rooms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TODO:

1. Background color spills over
2. Add react-hook form for more homogeneous form validation
21 changes: 21 additions & 0 deletions backend/api-files/Create Room.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
meta {
name: Create Room
type: http
seq: 2
}

post {
url: https://localhost:1926/api/auth/room
body: json
auth: none
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im1pY2hhZWxAZHVuZGVybWlmZmxpbi5jb20iLCJleHAiOjE3ODkzMzQxODl9.56ZzU1MPIp8eIIavgvXxWLkGO1hgfTrbxIY99TpQKEo
}

body:json {
{
"name": "Watercooler"
}
}
4 changes: 2 additions & 2 deletions backend/api-files/Create User.bru
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ body:json {
{
"first_name": "Costa",
"last_name": "Alexoglou",
"email": "kostakos14@gmail.com",
"email": "test-abcde@gmail.com",
"password": "hoppless",
"team_name": "The Hustlers"
"team_invite_uuid": "0198d2c9-40ec-7b46-b318-bb3ec64f5e27"
}
}
19 changes: 19 additions & 0 deletions backend/api-files/Delete Room.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
meta {
name: Delete Room
type: http
seq: 14
}

delete {
url: https://localhost:1926/api/auth/room/:id
body: json
auth: none
}

params:path {
id: 20
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im1pY2hhZWxAZHVuZGVybWlmZmxpbi5jb20iLCJleHAiOjE3ODkwNjM5OTd9.4cNbNEHiLjuflD4ZDzLnoLCoSBstC0CbwX6P4i9HOj0
}
19 changes: 19 additions & 0 deletions backend/api-files/Get Room.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
meta {
name: Get Room
type: http
seq: 15
}

get {
url: https://localhost:1926/api/auth/room/:id
body: json
auth: none
}

params:path {
id: 20
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImR3aWdodEBkdW5kZXJtaWZmbGluLmNvbSIsImV4cCI6MTc4OTE1NzQzNH0.2f6apCqEGGGzPV3shdXzCBTOofrMCa-584Y2ZtnxIQY
}
15 changes: 15 additions & 0 deletions backend/api-files/Get Rooms.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: Get Rooms
type: http
seq: 16
}

get {
url: https://localhost:1926/api/auth/rooms
body: json
auth: none
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImR3aWdodEBkdW5kZXJtaWZmbGluLmNvbSIsImV4cCI6MTc4OTE1NzQzNH0.2f6apCqEGGGzPV3shdXzCBTOofrMCa-584Y2ZtnxIQY
}
2 changes: 1 addition & 1 deletion backend/api-files/Get user info.bru
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ get {
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImtvbnNhbGV4ZWVAZ21haWwuY29tIiwiZXhwIjoxNzY3MTg5NzQ0fQ.qIvEcVY00s9xqzlMAD8811lnR6rShveAbYLtEat_uiU
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im1pY2hhZWxAZHVuZGVybWlmZmxpbi5jb20iLCJleHAiOjE3OTAwNjczMTh9.Syi8XUiGChyT_z5WWXhqvpA4OU6D-cztGoN7MrrYS8Q
}
25 changes: 25 additions & 0 deletions backend/api-files/Update Room.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
meta {
name: Update Room
type: http
seq: 13
}

put {
url: https://localhost:1926/api/auth/room/:id
body: json
auth: none
}

params:path {
id: 20
}

headers {
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im1pY2hhZWxAZHVuZGVybWlmZmxpbi5jb20iLCJleHAiOjE3ODkwNjM5OTd9.4cNbNEHiLjuflD4ZDzLnoLCoSBstC0CbwX6P4i9HOj0
}

body:json {
{
"name": "Umair"
}
}
151 changes: 148 additions & 3 deletions backend/api-files/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ components:
nullable: true
description: When the trial period ends (null if not in trial or has active subscription)

type: object
Room:
required:
- id
- name
- user_id
properties:
id:
type: string
format: uuid
name:
type: string
user_id:
type: string

Error:
type: object
properties:
Expand Down Expand Up @@ -505,11 +520,72 @@ paths:
schema:
$ref: "#/components/schemas/Error"

/api/auth/watercooler:
/api/auth/room:
post:
summary: Create a new room
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the room
responses:
"200":
description: LiveKit tokens retrieved successfully
content:
application/json:
schema:
$ref: "#/components/schemas/Room"
required:
- id
- name
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/api/auth/rooms:
get:
summary: Get LiveKit tokens for joining the team's watercooler room
summary: Get all rooms for the user
security:
- BearerAuth: []
responses:
"200":
description: Rooms for user retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Room"

/api/auth/room/{id}:
get:
summary: Get LiveKit tokens for joining the team's selected room
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
description: The ID of the room to retrieve
schema:
type: string
format: uuid
responses:
"200":
description: LiveKit tokens retrieved successfully
Expand All @@ -532,12 +608,81 @@ paths:
- cameraToken
- participant

/api/auth/watercooler/anonymous:
put:
summary: Update room details
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
description: The ID of the room to update
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the room
responses:
"200":
description: Room updated successfully
content:
application/json:
schema:
$ref: "#/components/schemas/Room"
required:
- id
- name
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

delete:
summary: Get LiveKit tokens for joining the team's selected room
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
description: The ID of the room to delete
schema:
type: string
format: uuid
responses:
"204":
description: User successfully deleted (no content)

/api/auth/room/anonymous:
get:
summary: Get a link that will have an encoded token that will be used
description: Get a link that will have an encoded token that will be used
security:
- BearerAuth: []
parameters:
- name: room_id
in: query
required: true
description: The ID of the room to generate an anonymous link for
schema:
type: string
format: uuid
responses:
"200":
description: Link with encoded token retrieved successfully
Expand Down
Loading