Compare commits
2 commits
91e22ed95d
...
df2b2a4247
| Author | SHA256 | Date | |
|---|---|---|---|
| df2b2a4247 | |||
| 36c952fe81 |
8 changed files with 173 additions and 17 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.3.1
|
0.3.3
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
"username": "string",
|
"username": "string",
|
||||||
"password": "string",
|
"password": "string",
|
||||||
"email": "string"
|
"email": "string?"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ Registers a new user
|
||||||
{
|
{
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"username": "string",
|
"username": "string",
|
||||||
"registerDate": 0
|
"registerDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Returns a channel with id = {id}
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"communityId": "string",
|
"communityId": "string",
|
||||||
"creationDate": 0
|
"creationDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -39,3 +39,42 @@ Creates a new channel and returns it
|
||||||
"communityId": "string"
|
"communityId": "string"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PATCH /api/v1/channel/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string?"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Updates a channel with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## DELETE /api/v1/channel/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
Removes a channel with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Returns a community with id = {id}
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"description": "string",
|
"description": "string",
|
||||||
"ownerId": "string",
|
"ownerId": "string",
|
||||||
"creationDate": 0
|
"creationDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -65,6 +65,20 @@ Updates a community with id = {id}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## DELETE /api/v1/community/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
Removes a community with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## GET /api/v1/community/{id}/members
|
## GET /api/v1/community/{id}/members
|
||||||
|
|
||||||
_Requires an authorization header_
|
_Requires an authorization header_
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@ Returns an invite with id = {id}
|
||||||
{
|
{
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"communityId": "string",
|
"communityId": "string",
|
||||||
"valid": true,
|
"valid": "boolean",
|
||||||
"unlimitedInvites": false,
|
"unlimitedInvites": "boolean",
|
||||||
"hasExpiration": false,
|
"hasExpiration": "boolean",
|
||||||
"totalInvites": 0,
|
"totalInvites": "number",
|
||||||
"remainingInvites": 0,
|
"remainingInvites": "number",
|
||||||
"creationDate": 0,
|
"creationDate": "number",
|
||||||
"expirationDate": 0
|
"expirationDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,25 @@ Returns a role with id = {id}
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"communityId": "string",
|
"communityId": "string",
|
||||||
"creationDate": 0
|
"creationDate": "number"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## GET /api/v1/role/{id}/permissions
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
Returns a role with id = {id} and permissions
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string",
|
||||||
|
"permissions": "string[]".
|
||||||
|
"creationDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -41,6 +59,32 @@ Creates a new role and returns it
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PATCH /api/v1/role/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string?",
|
||||||
|
"permissions": "string[]?"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Updates a role with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string",
|
||||||
|
"permissions": "string[]"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## POST /api/v1/role/{id}/assign
|
## POST /api/v1/role/{id}/assign
|
||||||
|
|
||||||
_Requires an authorization header_
|
_Requires an authorization header_
|
||||||
|
|
@ -90,3 +134,18 @@ Unassigns a role from a user
|
||||||
"userId": "string"
|
"userId": "string"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## DELETE /api/v1/role/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
Removes a role with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Returns a session with id = {id}
|
||||||
{
|
{
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"userId": "string",
|
"userId": "string",
|
||||||
"creationDate": 0
|
"creationDate": "number"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,39 @@ Returns a user with id = {id}
|
||||||
"username": "string",
|
"username": "string",
|
||||||
"email": "string",
|
"email": "string",
|
||||||
"description": "string",
|
"description": "string",
|
||||||
"admin": false,
|
"admin": "boolean",
|
||||||
"registerDate": 0,
|
"registerDate": "number",
|
||||||
"lastLogin": 0
|
"lastLogin": "number"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## POST /api/v1/user
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"username": "string",
|
||||||
|
"password": "string",
|
||||||
|
"email": "string?",
|
||||||
|
"description": "string?",
|
||||||
|
"admin": "boolean?"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a new user and returns it
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"username": "string",
|
||||||
|
"email": "string",
|
||||||
|
"description": "string",
|
||||||
|
"admin": "boolean"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -43,6 +73,20 @@ Updates a user with id = {id}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## DELETE /api/v1/user/{id}
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
Removes a user with id = {id}
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## GET /api/v1/user/{id}/sessions
|
## GET /api/v1/user/{id}/sessions
|
||||||
|
|
||||||
_Requires an authorization header_
|
_Requires an authorization header_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue