add/fix: small changes on docs and comment style
This commit is contained in:
175
docs/ENDPOINTS.md
Normal file
175
docs/ENDPOINTS.md
Normal file
@@ -0,0 +1,175 @@
|
||||
## 📌 API Endpoint Overview
|
||||
|
||||
This document provides a categorized and role-specific overview of all API endpoints implemented (or to be implemented) in the system. It is structured for easy readability, regular updates, and fast navigation.
|
||||
|
||||
---
|
||||
|
||||
### ⚖️ Roles
|
||||
|
||||
* `admin` — Endpoints accessible only to admins.
|
||||
* `user` — Endpoints accessible to regular authenticated users.
|
||||
|
||||
> Status Legend:
|
||||
>
|
||||
> * `ok` — Fully implemented and tested
|
||||
> * `partial` — Implemented but incomplete or unstable
|
||||
> * `TODO` — Needs implementation
|
||||
> * `not ok` — Implemented but incorrect or buggy
|
||||
|
||||
---
|
||||
|
||||
## 🔑 Auth & Users
|
||||
|
||||
#### users:
|
||||
|
||||
* `POST /auth/register` — user — remake
|
||||
* `POST /auth/verify` — user — ok
|
||||
* `GET /auth/me` — user — ok
|
||||
|
||||
#### me/companies:
|
||||
|
||||
* `GET /me/companies` — user — ok
|
||||
* `POST /me/companies` — user — ok
|
||||
|
||||
#### users/<uuid>:
|
||||
|
||||
* `GET /users/<uuid:pk>/companies` — user — ok
|
||||
* `POST /users/<uuid:pk>/companies` — user — ok
|
||||
|
||||
---
|
||||
|
||||
## 🏢 Companies
|
||||
|
||||
#### companies:
|
||||
|
||||
* `GET /companies` — admin — ok
|
||||
|
||||
* `POST /companies` — admin — ok
|
||||
|
||||
* `GET /companies/<uuid:pk>` — admin — ok
|
||||
|
||||
* `DELETE /companies/<uuid:pk>` — admin — ok
|
||||
|
||||
* `PATCH /companies/<uuid:pk>` — admin — ok
|
||||
|
||||
* `GET /companies/<uuid:pk>/contracts` — user — partial
|
||||
|
||||
* filters: `folder`, `status: list[str]`
|
||||
|
||||
* `GET /companies/<uuid:pk>/folders` — user — ok
|
||||
|
||||
* `POST /companies/<uuid:pk>/folders` — user — ok
|
||||
|
||||
* `GET /companies/<uuid:pk>/accounts` — user — ok
|
||||
|
||||
* `POST /companies/<uuid:pk>/accounts` — user — TODO
|
||||
|
||||
---
|
||||
|
||||
## 💳 Company Accounts
|
||||
|
||||
* `GET /company-accounts` — admin — ok
|
||||
|
||||
* `POST /company-accounts` — admin — ok
|
||||
|
||||
* `GET /company-accounts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `PATCH /company-accounts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `DELETE /company-accounts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `POST /accounts/verify` — user — TODO
|
||||
|
||||
* required: `phone`, `code`
|
||||
|
||||
---
|
||||
|
||||
## 🌐 Banks
|
||||
|
||||
* `GET /banks` — admin — ok
|
||||
* `POST /banks` — admin — ok
|
||||
* `GET /banks/<uuid:pk>` — admin — ok
|
||||
* `DELETE /banks/<uuid:pk>` — admin — ok
|
||||
* `PATCH /banks/<uuid:pk>` — admin — ok
|
||||
|
||||
---
|
||||
|
||||
## 📍 Contracts
|
||||
|
||||
* `GET /contracts` — admin — ok
|
||||
|
||||
* `POST /contracts` — user — ok
|
||||
|
||||
* `GET /contracts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `DELETE /contracts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `PATCH /contracts/<uuid:pk>` — admin — ok
|
||||
|
||||
* `GET /contracts/<uuid:pk>/files` — user — ok
|
||||
|
||||
* `GET /contracts/<uuid:pk>/owners` — user — ok
|
||||
|
||||
---
|
||||
|
||||
## 📄 Contract Owners
|
||||
|
||||
* `GET /contract-owners` — admin — ok
|
||||
|
||||
* `POST /contract-owners` — admin — ok
|
||||
|
||||
* `GET /contract-owners/<uuid:pk>` — admin — ok
|
||||
|
||||
* `DELETE /contract-owners/<uuid:pk>` — admin — ok
|
||||
|
||||
* `PATCH /contract-owners/<uuid:pk>` — admin — ok
|
||||
|
||||
* `GET /contract-owners/<uuid:pk>/contract` — user — ok
|
||||
|
||||
* `POST /contract-owners/<uuid:pk>/files` — user — not ok
|
||||
|
||||
* `GET /contract-owners/<uuid:pk>/files` — user — not ok
|
||||
|
||||
* `DELETE /contract-owners/<uuid:pk>/files/<uuid:pk>` — user — ok
|
||||
|
||||
* `POST /contract-owners/<uuid:pk>/files/<uuid:pk>/upload` — user — ok
|
||||
|
||||
---
|
||||
|
||||
## 📂 Files
|
||||
|
||||
* `GET /files` — admin — ok
|
||||
* `POST /files` — admin — ok
|
||||
* `GET /files/<uuid:pk>` — admin — ok
|
||||
* `DELETE /files/<uuid:pk>` — admin — ok
|
||||
* `PATCH /files/<uuid:pk>` — admin — ok
|
||||
|
||||
---
|
||||
|
||||
## 📁 Folders
|
||||
|
||||
* `GET /folders` — admin — ok
|
||||
|
||||
* `POST /folders` — admin — ok
|
||||
|
||||
* `GET /folders/<uuid:pk>` — admin — ok
|
||||
|
||||
* `DELETE /folders/<uuid:pk>` — admin — ok
|
||||
|
||||
* `PATCH /folders/<uuid:pk>` — admin — ok
|
||||
|
||||
* `GET /folders/<uuid:pk>/contracts` — admin — ok
|
||||
|
||||
---
|
||||
|
||||
## 📋 File Contents
|
||||
|
||||
* `GET /file-contents` — admin — ok
|
||||
* `POST /file-contents` — admin — ok
|
||||
* `GET /file-contents/<uuid:pk>` — admin — ok
|
||||
* `DELETE /file-contents/<uuid:pk>` — admin — ok
|
||||
* `PATCH /file-contents/<uuid:pk>` — admin — ok
|
||||
|
||||
---
|
||||
|
||||
This structure ensures developers can **navigate quickly**, **see responsibilities by domain**, and easily **track implementation status**. Update it regularly as your API evolves.
|
||||
Reference in New Issue
Block a user