-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: new endpoint for organization admins to get pending invitati…
…ons (#24) * new endpoint for organization members to get pending invitations * check db cursors errors
- Loading branch information
1 parent
062b090
commit 42de217
Showing
8 changed files
with
169 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
- [🔍 Organization info](#-organization-info) | ||
- [🧑🤝🧑 Organization members](#-organization-members) | ||
- [🧑💼 Invite organization member](#-invite-organization-member) | ||
- [⏳ List pending invitations](#-list-pending-invitations) | ||
- [🤝 Accept organization invitation](#-accept-organization-invitation) | ||
- [🤠 Available organization members roles](#-available-organization-members-roles) | ||
- [🏛️ Available organization types](#-available-organization-types) | ||
|
@@ -575,6 +576,8 @@ Only the following parameters can be changed. Every parameter is optional. | |
|
||
* **Path** `/organizations/{address}/members` | ||
* **Method** `POST` | ||
* **Headers** | ||
* `Authentication: Bearer <user_token>` | ||
* **Request** | ||
```json | ||
{ | ||
|
@@ -598,6 +601,35 @@ Only the following parameters can be changed. Every parameter is optional. | |
| `409` | `40901` | `duplicate conflict` | | ||
| `500` | `50002` | `internal server error` | | ||
|
||
### ⏳ List pending invitations | ||
|
||
* **Path** `/organizations/{address}/members/pending` | ||
* **Method** `GET` | ||
* **Headers** | ||
* `Authentication: Bearer <user_token>` | ||
* **Response** | ||
```json | ||
{ | ||
"pending": [ | ||
{ | ||
"email": "[email protected]", | ||
"role": "admin", | ||
"expiration": "2024-12-12T12:00:00.000Z" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
* **Errors** | ||
|
||
| HTTP Status | Error code | Message | | ||
|:---:|:---:|:---| | ||
| `401` | `40001` | `user not authorized` | | ||
| `400` | `40009` | `organization not found` | | ||
| `400` | `40011` | `no organization provided` | | ||
| `401` | `40014` | `user account not verified` | | ||
| `500` | `50002` | `internal server error` | | ||
|
||
### 🤝 Accept organization invitation | ||
|
||
* **Path** `/organizations/{address}/members/accept` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters