diff --git a/docs/api/channel.md b/docs/api/channel.md index ba52dbe..465117a 100644 --- a/docs/api/channel.md +++ b/docs/api/channel.md @@ -14,3 +14,28 @@ Returns a channel with id = {id} "creationDate": 0 } ``` + +## POST /api/v1/channel + +_Requires an authorization header_ + +### Request: + +```json +{ + "name": "string", + "communityId": "string" +} +``` + +Creates a new channel and returns it + +### Response: + +```json +{ + "id": "string", + "name": "string", + "communityId": "string" +} +``` diff --git a/docs/api/community.md b/docs/api/community.md index 0139661..80c4326 100644 --- a/docs/api/community.md +++ b/docs/api/community.md @@ -9,10 +9,37 @@ Returns a community with id = {id} "id": "string", "name": "string", "description": "string", + "ownerId": "string", "creationDate": 0 } ``` +## POST /api/v1/community + +_Requires an authorization header_ + +### Request: + +```json +{ + "name": "string", + "description": "string?" +} +``` + +Creates a new community and returns it + +### Response: + +```json +{ + "id": "string", + "name": "string", + "description": "string", + "ownerId": "string" +} +``` + ## PATCH /api/v1/community/{id} _Requires an authorization header_ @@ -109,7 +136,6 @@ _Requires an authorization header_ ```json { - "creatorId": "string", "totalInvites": "number?", "expirationDate": "number?" } diff --git a/docs/api/invite.md b/docs/api/invite.md index 59bfa46..b240449 100644 --- a/docs/api/invite.md +++ b/docs/api/invite.md @@ -11,6 +11,7 @@ Returns an invite with id = {id} "valid": true, "unlimitedInvites": false, "hasExpiration": false, + "totalInvites": 0, "remainingInvites": 0, "creationDate": 0, "expirationDate": 0 @@ -32,18 +33,10 @@ Removes an invite with id = {id} } ``` -## POST /api/v1/invite/{id}/accept +## GET /api/v1/invite/{id}/accept _Requires an authorization header_ -### Request: - -```json -{ - "userId": "string" -} -``` - Accepts an invite and joins user to a community with id = {id} ### Response: diff --git a/docs/api/role.md b/docs/api/role.md index 8900585..5bbea39 100644 --- a/docs/api/role.md +++ b/docs/api/role.md @@ -14,3 +14,29 @@ Returns a role with id = {id} "creationDate": 0 } ``` + +## POST /api/v1/role + +_Requires an authorization header_ + +### Request: + +```json +{ + "name": "string", + "communityId": "string", + "permissions": "string[]" +} +``` + +Creates a new role and returns it + +### Response: + +```json +{ + "id": "string", + "name": "string", + "communityId": "string" +} +```