Refactor API documentation and update endpoint tags for clarity
- Updated README.md to reflect changes in endpoint categories, renaming "Customers-Admin" to "Admin-Customers" and "Companies-Admin" to "Admin-Companies" for consistency. - Modified health check endpoint tags from "Health" to "Admin-Health" to align with the new naming convention. - Adjusted Swagger documentation to replace outdated tags and ensure accurate representation of the API structure. - Enhanced user and customer handler documentation to reflect the new "Admin-Authorization" and "Admin-Users" tags, improving clarity in the API documentation.
This commit is contained in:
@@ -64,10 +64,9 @@ The Tender Management API features comprehensive, auto-generated Swagger documen
|
|||||||
- **Health**: System monitoring and health check endpoints
|
- **Health**: System monitoring and health check endpoints
|
||||||
- **Authorization**: User authentication, token management, and session handling
|
- **Authorization**: User authentication, token management, and session handling
|
||||||
- **Users**: Administrative user management with RBAC (Role-Based Access Control)
|
- **Users**: Administrative user management with RBAC (Role-Based Access Control)
|
||||||
- **Customers-Admin**: Web panel customer management with advanced filtering
|
- **Admin-Customers**: Web panel customer management with advanced filtering
|
||||||
- **Customers-Authorization**: Mobile app customer authentication and profile access
|
- **Customers-Authorization**: Mobile app customer authentication and profile access
|
||||||
- **Companies-Admin**: Comprehensive company management with search, filtering, and analytics
|
- **Admin-Companies**: Comprehensive company management with search, filtering, and analytics
|
||||||
- **Companies-Mobile**: Mobile-optimized company lookup and information retrieval
|
|
||||||
|
|
||||||
#### 🔧 **Documentation Access**
|
#### 🔧 **Documentation Access**
|
||||||
- **Local Development**: `http://localhost:8081/swagger/`
|
- **Local Development**: `http://localhost:8081/swagger/`
|
||||||
|
|||||||
+106
-113
@@ -39,7 +39,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "List companies with filters and pagination",
|
"summary": "List companies with filters and pagination",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -251,7 +251,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Create a new company",
|
"summary": "Create a new company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -326,7 +326,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by industry",
|
"summary": "Get companies by industry",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -410,7 +410,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Advanced search for companies",
|
"summary": "Advanced search for companies",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -562,7 +562,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get company statistics",
|
"summary": "Get company statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -608,7 +608,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by status",
|
"summary": "Get companies by status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -698,7 +698,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by type",
|
"summary": "Get companies by type",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -789,7 +789,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get company by ID",
|
"summary": "Get company by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -854,7 +854,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company information",
|
"summary": "Update company information",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -940,7 +940,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Delete company",
|
"summary": "Delete company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -995,7 +995,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Activate company",
|
"summary": "Activate company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1050,7 +1050,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company status",
|
"summary": "Update company status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1120,7 +1120,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Suspend company",
|
"summary": "Suspend company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1190,7 +1190,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company tags",
|
"summary": "Update company tags",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1260,7 +1260,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Add tags to company",
|
"summary": "Add tags to company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1330,7 +1330,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Remove tags from company",
|
"summary": "Remove tags from company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1400,7 +1400,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company verification status",
|
"summary": "Update company verification status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1470,7 +1470,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Verify company",
|
"summary": "Verify company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1525,7 +1525,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "List customers with filters and pagination",
|
"summary": "List customers with filters and pagination",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1691,7 +1691,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Create a new customer",
|
"summary": "Create a new customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1766,7 +1766,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by company ID",
|
"summary": "Get customers by company ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1842,7 +1842,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by status",
|
"summary": "Get customers by status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1932,7 +1932,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by type",
|
"summary": "Get customers by type",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2021,7 +2021,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "List customers with companies and filters",
|
"summary": "List customers with companies and filters",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2189,7 +2189,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customer by ID",
|
"summary": "Get customer by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2254,7 +2254,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer information",
|
"summary": "Update customer information",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2340,7 +2340,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Delete customer",
|
"summary": "Delete customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2395,7 +2395,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Activate customer",
|
"summary": "Activate customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2450,7 +2450,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Assign companies to a customer",
|
"summary": "Assign companies to a customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2520,7 +2520,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Remove companies from a customer",
|
"summary": "Remove companies from a customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2590,7 +2590,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer status",
|
"summary": "Update customer status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2660,7 +2660,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Suspend customer",
|
"summary": "Suspend customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2730,7 +2730,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer verification status",
|
"summary": "Update customer verification status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2800,7 +2800,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Verify customer",
|
"summary": "Verify customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2855,7 +2855,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customer by ID with companies",
|
"summary": "Get customer by ID with companies",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2917,7 +2917,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Health"
|
"Admin-Health"
|
||||||
],
|
],
|
||||||
"summary": "Health check endpoint",
|
"summary": "Health check endpoint",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -2951,7 +2951,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get authenticated user profile",
|
"summary": "Get authenticated user profile",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -3007,7 +3007,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update authenticated user profile",
|
"summary": "Update authenticated user profile",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3088,7 +3088,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Change user password",
|
"summary": "Change user password",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3146,7 +3146,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Authenticate user login",
|
"summary": "Authenticate user login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3227,7 +3227,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Logout authenticated user",
|
"summary": "Logout authenticated user",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -3262,7 +3262,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Refresh access token",
|
"summary": "Refresh access token",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3332,7 +3332,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Initiate password reset process",
|
"summary": "Initiate password reset process",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3401,7 +3401,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "List users",
|
"summary": "List users",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3513,7 +3513,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Create new user account",
|
"summary": "Create new user account",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3600,7 +3600,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get users by company ID",
|
"summary": "Get users by company ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3686,7 +3686,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get users by role",
|
"summary": "Get users by role",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3772,7 +3772,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get user by ID",
|
"summary": "Get user by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3849,7 +3849,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user",
|
"summary": "Update user",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3935,7 +3935,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Delete user",
|
"summary": "Delete user",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4002,7 +4002,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user role",
|
"summary": "Update user role",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4078,7 +4078,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user status",
|
"summary": "Update user status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4139,7 +4139,7 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/": {
|
"/api/v1/profile": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -4154,7 +4154,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Get customer profile",
|
"summary": "Get customer profile",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -4197,46 +4197,6 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/logout": {
|
|
||||||
"delete": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Logout customer and invalidate access token",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"Customers-Authorization"
|
|
||||||
],
|
|
||||||
"summary": "Customer logout",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Logout successful",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"401": {
|
|
||||||
"description": "Unauthorized - Invalid or missing token",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal server error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/profile/login": {
|
"/api/v1/profile/login": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.",
|
"description": "Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.",
|
||||||
@@ -4247,7 +4207,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Customer login",
|
"summary": "Customer login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4307,6 +4267,46 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/profile/logout": {
|
||||||
|
"delete": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Logout customer and invalidate access token",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Authorization"
|
||||||
|
],
|
||||||
|
"summary": "Customer logout",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Logout successful",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized - Invalid or missing token",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/profile/refresh-token": {
|
"/api/v1/profile/refresh-token": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.",
|
"description": "Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.",
|
||||||
@@ -4317,7 +4317,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Refresh customer access token",
|
"summary": "Refresh customer access token",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4377,7 +4377,7 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/with-companies": {
|
"/api/v1/profile/with-companies": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -4392,7 +4392,7 @@ const docTemplate = `{
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Get customer profile with companies",
|
"summary": "Get customer profile with companies",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -5223,10 +5223,6 @@ const docTemplate = `{
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"company_name": {
|
|
||||||
"description": "Company customer fields",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"contact_person": {
|
"contact_person": {
|
||||||
"description": "Contact person (for company customers)",
|
"description": "Contact person (for company customers)",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@@ -5274,6 +5270,7 @@ const docTemplate = `{
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"registration_number": {
|
"registration_number": {
|
||||||
|
"description": "Company customer fields",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tax_id": {
|
"tax_id": {
|
||||||
@@ -5928,31 +5925,27 @@ const docTemplate = `{
|
|||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"description": "System health check operations for monitoring application status and dependencies",
|
"description": "System health check operations for monitoring application status and dependencies",
|
||||||
"name": "Health"
|
"name": "Admin-Health"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration",
|
"description": "User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration",
|
||||||
"name": "Authorization"
|
"name": "Admin-Authorization"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators",
|
"description": "Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators",
|
||||||
"name": "Users"
|
"name": "Admin-Users"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination",
|
"description": "Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination",
|
||||||
"name": "Customers-Admin"
|
"name": "Admin-Customers"
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
|
||||||
"name": "Customers-Authorization"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting",
|
"description": "Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting",
|
||||||
"name": "Companies-Admin"
|
"name": "Admin-Companies"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Company-related operations for mobile application including company lookup, search, and basic information retrieval",
|
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||||
"name": "Companies-Mobile"
|
"name": "Authorization"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}`
|
}`
|
||||||
|
|||||||
+106
-113
@@ -33,7 +33,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "List companies with filters and pagination",
|
"summary": "List companies with filters and pagination",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Create a new company",
|
"summary": "Create a new company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -320,7 +320,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by industry",
|
"summary": "Get companies by industry",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Advanced search for companies",
|
"summary": "Advanced search for companies",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -556,7 +556,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get company statistics",
|
"summary": "Get company statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -602,7 +602,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by status",
|
"summary": "Get companies by status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -692,7 +692,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get companies by type",
|
"summary": "Get companies by type",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -783,7 +783,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Get company by ID",
|
"summary": "Get company by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -848,7 +848,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company information",
|
"summary": "Update company information",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -934,7 +934,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Delete company",
|
"summary": "Delete company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -989,7 +989,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Activate company",
|
"summary": "Activate company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1044,7 +1044,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company status",
|
"summary": "Update company status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1114,7 +1114,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Suspend company",
|
"summary": "Suspend company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1184,7 +1184,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company tags",
|
"summary": "Update company tags",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1254,7 +1254,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Add tags to company",
|
"summary": "Add tags to company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1324,7 +1324,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Remove tags from company",
|
"summary": "Remove tags from company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1394,7 +1394,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Update company verification status",
|
"summary": "Update company verification status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1464,7 +1464,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Companies-Admin"
|
"Admin-Companies"
|
||||||
],
|
],
|
||||||
"summary": "Verify company",
|
"summary": "Verify company",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1519,7 +1519,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "List customers with filters and pagination",
|
"summary": "List customers with filters and pagination",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1685,7 +1685,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Create a new customer",
|
"summary": "Create a new customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1760,7 +1760,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by company ID",
|
"summary": "Get customers by company ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1836,7 +1836,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by status",
|
"summary": "Get customers by status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -1926,7 +1926,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customers by type",
|
"summary": "Get customers by type",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2015,7 +2015,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "List customers with companies and filters",
|
"summary": "List customers with companies and filters",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2183,7 +2183,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customer by ID",
|
"summary": "Get customer by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2248,7 +2248,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer information",
|
"summary": "Update customer information",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2334,7 +2334,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Delete customer",
|
"summary": "Delete customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2389,7 +2389,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Activate customer",
|
"summary": "Activate customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2444,7 +2444,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Assign companies to a customer",
|
"summary": "Assign companies to a customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2514,7 +2514,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Remove companies from a customer",
|
"summary": "Remove companies from a customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2584,7 +2584,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer status",
|
"summary": "Update customer status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2654,7 +2654,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Suspend customer",
|
"summary": "Suspend customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2724,7 +2724,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Update customer verification status",
|
"summary": "Update customer verification status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2794,7 +2794,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Verify customer",
|
"summary": "Verify customer",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2849,7 +2849,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Admin"
|
"Admin-Customers"
|
||||||
],
|
],
|
||||||
"summary": "Get customer by ID with companies",
|
"summary": "Get customer by ID with companies",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -2911,7 +2911,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Health"
|
"Admin-Health"
|
||||||
],
|
],
|
||||||
"summary": "Health check endpoint",
|
"summary": "Health check endpoint",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -2945,7 +2945,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get authenticated user profile",
|
"summary": "Get authenticated user profile",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -3001,7 +3001,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update authenticated user profile",
|
"summary": "Update authenticated user profile",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3082,7 +3082,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Change user password",
|
"summary": "Change user password",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3140,7 +3140,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Authenticate user login",
|
"summary": "Authenticate user login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3221,7 +3221,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Logout authenticated user",
|
"summary": "Logout authenticated user",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -3256,7 +3256,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Refresh access token",
|
"summary": "Refresh access token",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3326,7 +3326,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Authorization"
|
"Admin-Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Initiate password reset process",
|
"summary": "Initiate password reset process",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3395,7 +3395,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "List users",
|
"summary": "List users",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3507,7 +3507,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Create new user account",
|
"summary": "Create new user account",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3594,7 +3594,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get users by company ID",
|
"summary": "Get users by company ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3680,7 +3680,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get users by role",
|
"summary": "Get users by role",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3766,7 +3766,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Get user by ID",
|
"summary": "Get user by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3843,7 +3843,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user",
|
"summary": "Update user",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3929,7 +3929,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Delete user",
|
"summary": "Delete user",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -3996,7 +3996,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user role",
|
"summary": "Update user role",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4072,7 +4072,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Users"
|
"Admin-Users"
|
||||||
],
|
],
|
||||||
"summary": "Update user status",
|
"summary": "Update user status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4133,7 +4133,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/": {
|
"/api/v1/profile": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -4148,7 +4148,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Get customer profile",
|
"summary": "Get customer profile",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -4191,46 +4191,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/logout": {
|
|
||||||
"delete": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Logout customer and invalidate access token",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"Customers-Authorization"
|
|
||||||
],
|
|
||||||
"summary": "Customer logout",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Logout successful",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"401": {
|
|
||||||
"description": "Unauthorized - Invalid or missing token",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal server error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.APIResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/profile/login": {
|
"/api/v1/profile/login": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.",
|
"description": "Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.",
|
||||||
@@ -4241,7 +4201,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Customer login",
|
"summary": "Customer login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4301,6 +4261,46 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/profile/logout": {
|
||||||
|
"delete": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Logout customer and invalidate access token",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Authorization"
|
||||||
|
],
|
||||||
|
"summary": "Customer logout",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Logout successful",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized - Invalid or missing token",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.APIResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/profile/refresh-token": {
|
"/api/v1/profile/refresh-token": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.",
|
"description": "Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.",
|
||||||
@@ -4311,7 +4311,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Refresh customer access token",
|
"summary": "Refresh customer access token",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@@ -4371,7 +4371,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/with-companies": {
|
"/api/v1/profile/with-companies": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -4386,7 +4386,7 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Customers-Authorization"
|
"Authorization"
|
||||||
],
|
],
|
||||||
"summary": "Get customer profile with companies",
|
"summary": "Get customer profile with companies",
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -5217,10 +5217,6 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"company_name": {
|
|
||||||
"description": "Company customer fields",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"contact_person": {
|
"contact_person": {
|
||||||
"description": "Contact person (for company customers)",
|
"description": "Contact person (for company customers)",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@@ -5268,6 +5264,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"registration_number": {
|
"registration_number": {
|
||||||
|
"description": "Company customer fields",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tax_id": {
|
"tax_id": {
|
||||||
@@ -5922,31 +5919,27 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"description": "System health check operations for monitoring application status and dependencies",
|
"description": "System health check operations for monitoring application status and dependencies",
|
||||||
"name": "Health"
|
"name": "Admin-Health"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration",
|
"description": "User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration",
|
||||||
"name": "Authorization"
|
"name": "Admin-Authorization"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators",
|
"description": "Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators",
|
||||||
"name": "Users"
|
"name": "Admin-Users"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination",
|
"description": "Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination",
|
||||||
"name": "Customers-Admin"
|
"name": "Admin-Customers"
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
|
||||||
"name": "Customers-Authorization"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting",
|
"description": "Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting",
|
||||||
"name": "Companies-Admin"
|
"name": "Admin-Companies"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Company-related operations for mobile application including company lookup, search, and basic information retrieval",
|
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||||
"name": "Companies-Mobile"
|
"name": "Authorization"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+92
-97
@@ -511,9 +511,6 @@ definitions:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
company_name:
|
|
||||||
description: Company customer fields
|
|
||||||
type: string
|
|
||||||
contact_person:
|
contact_person:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/customer.ContactPersonForm'
|
- $ref: '#/definitions/customer.ContactPersonForm'
|
||||||
@@ -545,6 +542,7 @@ definitions:
|
|||||||
phone:
|
phone:
|
||||||
type: string
|
type: string
|
||||||
registration_number:
|
registration_number:
|
||||||
|
description: Company customer fields
|
||||||
type: string
|
type: string
|
||||||
tax_id:
|
tax_id:
|
||||||
type: string
|
type: string
|
||||||
@@ -1148,7 +1146,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: List companies with filters and pagination
|
summary: List companies with filters and pagination
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -1196,7 +1194,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Create a new company
|
summary: Create a new company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}:
|
/admin/v1/companies/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1231,7 +1229,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Delete company
|
summary: Delete company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -1270,7 +1268,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get company by ID
|
summary: Get company by ID
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -1325,7 +1323,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update company information
|
summary: Update company information
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/activate:
|
/admin/v1/companies/{id}/activate:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1360,7 +1358,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Activate company
|
summary: Activate company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/status:
|
/admin/v1/companies/{id}/status:
|
||||||
patch:
|
patch:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1405,7 +1403,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update company status
|
summary: Update company status
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/suspend:
|
/admin/v1/companies/{id}/suspend:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1450,7 +1448,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Suspend company
|
summary: Suspend company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/tags:
|
/admin/v1/companies/{id}/tags:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1496,7 +1494,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update company tags
|
summary: Update company tags
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/tags/add:
|
/admin/v1/companies/{id}/tags/add:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1541,7 +1539,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Add tags to company
|
summary: Add tags to company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/tags/remove:
|
/admin/v1/companies/{id}/tags/remove:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1586,7 +1584,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Remove tags from company
|
summary: Remove tags from company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/verification:
|
/admin/v1/companies/{id}/verification:
|
||||||
patch:
|
patch:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1631,7 +1629,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update company verification status
|
summary: Update company verification status
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/{id}/verify:
|
/admin/v1/companies/{id}/verify:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1666,7 +1664,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Verify company
|
summary: Verify company
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/industry/{industry}:
|
/admin/v1/companies/industry/{industry}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1719,7 +1717,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get companies by industry
|
summary: Get companies by industry
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/search:
|
/admin/v1/companies/search:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1817,7 +1815,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Advanced search for companies
|
summary: Advanced search for companies
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/stats:
|
/admin/v1/companies/stats:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1843,7 +1841,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get company statistics
|
summary: Get company statistics
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/status/{status}:
|
/admin/v1/companies/status/{status}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1902,7 +1900,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get companies by status
|
summary: Get companies by status
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/companies/type/{type}:
|
/admin/v1/companies/type/{type}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1962,7 +1960,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get companies by type
|
summary: Get companies by type
|
||||||
tags:
|
tags:
|
||||||
- Companies-Admin
|
- Admin-Companies
|
||||||
/admin/v1/customers:
|
/admin/v1/customers:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2077,7 +2075,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: List customers with filters and pagination
|
summary: List customers with filters and pagination
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -2124,7 +2122,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Create a new customer
|
summary: Create a new customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}:
|
/admin/v1/customers/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2159,7 +2157,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Delete customer
|
summary: Delete customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -2198,7 +2196,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customer by ID
|
summary: Get customer by ID
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -2252,7 +2250,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update customer information
|
summary: Update customer information
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/activate:
|
/admin/v1/customers/{id}/activate:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2287,7 +2285,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Activate customer
|
summary: Activate customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/companies/assign:
|
/admin/v1/customers/{id}/companies/assign:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2332,7 +2330,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Assign companies to a customer
|
summary: Assign companies to a customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/companies/remove:
|
/admin/v1/customers/{id}/companies/remove:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2377,7 +2375,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Remove companies from a customer
|
summary: Remove companies from a customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/status:
|
/admin/v1/customers/{id}/status:
|
||||||
patch:
|
patch:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2422,7 +2420,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update customer status
|
summary: Update customer status
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/suspend:
|
/admin/v1/customers/{id}/suspend:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2467,7 +2465,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Suspend customer
|
summary: Suspend customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/verification:
|
/admin/v1/customers/{id}/verification:
|
||||||
patch:
|
patch:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2512,7 +2510,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update customer verification status
|
summary: Update customer verification status
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/verify:
|
/admin/v1/customers/{id}/verify:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2547,7 +2545,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Verify customer
|
summary: Verify customer
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/{id}/with-companies:
|
/admin/v1/customers/{id}/with-companies:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2588,7 +2586,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customer by ID with companies
|
summary: Get customer by ID with companies
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/company/{companyId}:
|
/admin/v1/customers/company/{companyId}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2634,7 +2632,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customers by company ID
|
summary: Get customers by company ID
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/status/{status}:
|
/admin/v1/customers/status/{status}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2693,7 +2691,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customers by status
|
summary: Get customers by status
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/type/{type}:
|
/admin/v1/customers/type/{type}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2751,7 +2749,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customers by type
|
summary: Get customers by type
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/customers/with-companies:
|
/admin/v1/customers/with-companies:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2866,7 +2864,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: List customers with companies and filters
|
summary: List customers with companies and filters
|
||||||
tags:
|
tags:
|
||||||
- Customers-Admin
|
- Admin-Customers
|
||||||
/admin/v1/health:
|
/admin/v1/health:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2887,7 +2885,7 @@ paths:
|
|||||||
$ref: '#/definitions/main.HealthResponse'
|
$ref: '#/definitions/main.HealthResponse'
|
||||||
summary: Health check endpoint
|
summary: Health check endpoint
|
||||||
tags:
|
tags:
|
||||||
- Health
|
- Admin-Health
|
||||||
/admin/v1/profile:
|
/admin/v1/profile:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2923,7 +2921,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get authenticated user profile
|
summary: Get authenticated user profile
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -2974,7 +2972,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update authenticated user profile
|
summary: Update authenticated user profile
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/profile/change-password:
|
/admin/v1/profile/change-password:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3018,7 +3016,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Change user password
|
summary: Change user password
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/profile/login:
|
/admin/v1/profile/login:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3067,7 +3065,7 @@ paths:
|
|||||||
$ref: '#/definitions/response.APIResponse'
|
$ref: '#/definitions/response.APIResponse'
|
||||||
summary: Authenticate user login
|
summary: Authenticate user login
|
||||||
tags:
|
tags:
|
||||||
- Authorization
|
- Admin-Authorization
|
||||||
/admin/v1/profile/logout:
|
/admin/v1/profile/logout:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3094,7 +3092,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Logout authenticated user
|
summary: Logout authenticated user
|
||||||
tags:
|
tags:
|
||||||
- Authorization
|
- Admin-Authorization
|
||||||
/admin/v1/profile/refresh-token:
|
/admin/v1/profile/refresh-token:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3139,7 +3137,7 @@ paths:
|
|||||||
$ref: '#/definitions/response.APIResponse'
|
$ref: '#/definitions/response.APIResponse'
|
||||||
summary: Refresh access token
|
summary: Refresh access token
|
||||||
tags:
|
tags:
|
||||||
- Authorization
|
- Admin-Authorization
|
||||||
/admin/v1/profile/reset-password:
|
/admin/v1/profile/reset-password:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3183,7 +3181,7 @@ paths:
|
|||||||
$ref: '#/definitions/response.APIResponse'
|
$ref: '#/definitions/response.APIResponse'
|
||||||
summary: Initiate password reset process
|
summary: Initiate password reset process
|
||||||
tags:
|
tags:
|
||||||
- Authorization
|
- Admin-Authorization
|
||||||
/admin/v1/users:
|
/admin/v1/users:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3254,7 +3252,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: List users
|
summary: List users
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -3310,7 +3308,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Create new user account
|
summary: Create new user account
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/users/{id}:
|
/admin/v1/users/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3353,7 +3351,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Delete user
|
summary: Delete user
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -3400,7 +3398,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get user by ID
|
summary: Get user by ID
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -3453,7 +3451,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update user
|
summary: Update user
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/users/{id}/role:
|
/admin/v1/users/{id}/role:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3502,7 +3500,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update user role
|
summary: Update user role
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/users/{id}/status:
|
/admin/v1/users/{id}/status:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3551,7 +3549,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Update user status
|
summary: Update user status
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/users/company/{company_id}:
|
/admin/v1/users/company/{company_id}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3604,7 +3602,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get users by company ID
|
summary: Get users by company ID
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/admin/v1/users/role/{role}:
|
/admin/v1/users/role/{role}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3657,8 +3655,8 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get users by role
|
summary: Get users by role
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Admin-Users
|
||||||
/api/v1/:
|
/api/v1/profile:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -3691,32 +3689,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customer profile
|
summary: Get customer profile
|
||||||
tags:
|
tags:
|
||||||
- Customers-Authorization
|
- Authorization
|
||||||
/api/v1/logout:
|
|
||||||
delete:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Logout customer and invalidate access token
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Logout successful
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/response.APIResponse'
|
|
||||||
"401":
|
|
||||||
description: Unauthorized - Invalid or missing token
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/response.APIResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal server error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/response.APIResponse'
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Customer logout
|
|
||||||
tags:
|
|
||||||
- Customers-Authorization
|
|
||||||
/api/v1/profile/login:
|
/api/v1/profile/login:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3760,7 +3733,32 @@ paths:
|
|||||||
$ref: '#/definitions/response.APIResponse'
|
$ref: '#/definitions/response.APIResponse'
|
||||||
summary: Customer login
|
summary: Customer login
|
||||||
tags:
|
tags:
|
||||||
- Customers-Authorization
|
- Authorization
|
||||||
|
/api/v1/profile/logout:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Logout customer and invalidate access token
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Logout successful
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/response.APIResponse'
|
||||||
|
"401":
|
||||||
|
description: Unauthorized - Invalid or missing token
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/response.APIResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal server error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/response.APIResponse'
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
summary: Customer logout
|
||||||
|
tags:
|
||||||
|
- Authorization
|
||||||
/api/v1/profile/refresh-token:
|
/api/v1/profile/refresh-token:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -3804,8 +3802,8 @@ paths:
|
|||||||
$ref: '#/definitions/response.APIResponse'
|
$ref: '#/definitions/response.APIResponse'
|
||||||
summary: Refresh customer access token
|
summary: Refresh customer access token
|
||||||
tags:
|
tags:
|
||||||
- Customers-Authorization
|
- Authorization
|
||||||
/api/v1/with-companies:
|
/api/v1/profile/with-companies:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -3839,7 +3837,7 @@ paths:
|
|||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Get customer profile with companies
|
summary: Get customer profile with companies
|
||||||
tags:
|
tags:
|
||||||
- Customers-Authorization
|
- Authorization
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
BearerAuth:
|
BearerAuth:
|
||||||
description: 'Type "Bearer" followed by a space and JWT token. Example: "Bearer
|
description: 'Type "Bearer" followed by a space and JWT token. Example: "Bearer
|
||||||
@@ -3851,24 +3849,21 @@ swagger: "2.0"
|
|||||||
tags:
|
tags:
|
||||||
- description: System health check operations for monitoring application status and
|
- description: System health check operations for monitoring application status and
|
||||||
dependencies
|
dependencies
|
||||||
name: Health
|
name: Admin-Health
|
||||||
- description: User authentication and authorization operations including login, logout,
|
- description: User authentication and authorization operations including login, logout,
|
||||||
token refresh, and password management for web panel administration
|
token refresh, and password management for web panel administration
|
||||||
name: Authorization
|
name: Admin-Authorization
|
||||||
- description: Administrative user management operations including CRUD operations,
|
- description: Administrative user management operations including CRUD operations,
|
||||||
role management, status updates, and profile management for web panel administrators
|
role management, status updates, and profile management for web panel administrators
|
||||||
name: Users
|
name: Admin-Users
|
||||||
- description: Administrative customer management operations for web panel including
|
- description: Administrative customer management operations for web panel including
|
||||||
CRUD operations, company assignment, verification, status management, and comprehensive
|
CRUD operations, company assignment, verification, status management, and comprehensive
|
||||||
filtering with pagination
|
filtering with pagination
|
||||||
name: Customers-Admin
|
name: Admin-Customers
|
||||||
- description: Customer authentication and authorization operations for mobile application
|
|
||||||
including login, logout, token refresh, and profile access
|
|
||||||
name: Customers-Authorization
|
|
||||||
- description: Administrative company management operations for web panel including
|
- description: Administrative company management operations for web panel including
|
||||||
CRUD operations, tag management, verification, status updates, comprehensive search
|
CRUD operations, tag management, verification, status updates, comprehensive search
|
||||||
and filtering, and statistical reporting
|
and filtering, and statistical reporting
|
||||||
name: Companies-Admin
|
name: Admin-Companies
|
||||||
- description: Company-related operations for mobile application including company
|
- description: Customer authentication and authorization operations for mobile application
|
||||||
lookup, search, and basic information retrieval
|
including login, logout, token refresh, and profile access
|
||||||
name: Companies-Mobile
|
name: Authorization
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
// @Summary Health check endpoint
|
// @Summary Health check endpoint
|
||||||
// @Description Get comprehensive server health status including system information, dependencies status, and performance metrics. This endpoint is used for monitoring and load balancer health checks.
|
// @Description Get comprehensive server health status including system information, dependencies status, and performance metrics. This endpoint is used for monitoring and load balancer health checks.
|
||||||
// @Tags Health
|
// @Tags Admin-Health
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} HealthResponse "System is healthy and operational"
|
// @Success 200 {object} HealthResponse "System is healthy and operational"
|
||||||
|
|||||||
+7
-10
@@ -20,26 +20,23 @@ package main
|
|||||||
// @name Authorization
|
// @name Authorization
|
||||||
// @description Type "Bearer" followed by a space and JWT token. Example: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
// @description Type "Bearer" followed by a space and JWT token. Example: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
|
||||||
// @tag.name Health
|
// @tag.name Admin-Health
|
||||||
// @tag.description System health check operations for monitoring application status and dependencies
|
// @tag.description System health check operations for monitoring application status and dependencies
|
||||||
|
|
||||||
// @tag.name Authorization
|
// @tag.name Admin-Authorization
|
||||||
// @tag.description User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration
|
// @tag.description User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration
|
||||||
|
|
||||||
// @tag.name Users
|
// @tag.name Admin-Users
|
||||||
// @tag.description Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators
|
// @tag.description Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators
|
||||||
|
|
||||||
// @tag.name Customers-Admin
|
// @tag.name Admin-Customers
|
||||||
// @tag.description Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination
|
// @tag.description Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination
|
||||||
|
|
||||||
// @tag.name Customers-Authorization
|
// @tag.name Admin-Companies
|
||||||
// @tag.description Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access
|
|
||||||
|
|
||||||
// @tag.name Companies-Admin
|
|
||||||
// @tag.description Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting
|
// @tag.description Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting
|
||||||
|
|
||||||
// @tag.name Companies-Mobile
|
// @tag.name Authorization
|
||||||
// @tag.description Company-related operations for mobile application including company lookup, search, and basic information retrieval
|
// @tag.description Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ func RegisterPublicRoutes(e *echo.Echo, customerHandler *customer.Handler) {
|
|||||||
customerGP.POST("/login", customerHandler.Login)
|
customerGP.POST("/login", customerHandler.Login)
|
||||||
customerGP.POST("/refresh-token", customerHandler.RefreshToken)
|
customerGP.POST("/refresh-token", customerHandler.RefreshToken)
|
||||||
|
|
||||||
profileGP := v1.Group("")
|
profileGP := customerGP.Group("")
|
||||||
profileGP.Use(customerHandler.AuthMiddleware())
|
profileGP.Use(customerHandler.AuthMiddleware())
|
||||||
profileGP.GET("", customerHandler.GetProfile)
|
profileGP.GET("", customerHandler.GetProfile)
|
||||||
profileGP.GET("/with-companies", customerHandler.GetProfileWithCompanies)
|
profileGP.GET("/with-companies", customerHandler.GetProfileWithCompanies)
|
||||||
|
|||||||
+18
-18
@@ -28,7 +28,7 @@ func NewHandler(service Service, userHandler *user.Handler, logger logger.Logger
|
|||||||
// CreateCompany creates a new company (Web Panel)
|
// CreateCompany creates a new company (Web Panel)
|
||||||
// @Summary Create a new company
|
// @Summary Create a new company
|
||||||
// @Description Create a new company with comprehensive information including business details, address, tags, and customer assignment. This endpoint is used by the web panel for full company registration.
|
// @Description Create a new company with comprehensive information including business details, address, tags, and customer assignment. This endpoint is used by the web panel for full company registration.
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param company body CreateCompanyForm true "Company information including type, business details, address, tags, and optional customer assignment"
|
// @Param company body CreateCompanyForm true "Company information including type, business details, address, tags, and optional customer assignment"
|
||||||
@@ -67,7 +67,7 @@ func (h *Handler) CreateCompany(c echo.Context) error {
|
|||||||
// GetCompany retrieves a company by ID (Web Panel)
|
// GetCompany retrieves a company by ID (Web Panel)
|
||||||
// @Summary Get company by ID
|
// @Summary Get company by ID
|
||||||
// @Description Retrieve detailed company information by company ID
|
// @Description Retrieve detailed company information by company ID
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -94,7 +94,7 @@ func (h *Handler) GetCompany(c echo.Context) error {
|
|||||||
// UpdateCompany updates a company (Web Panel)
|
// UpdateCompany updates a company (Web Panel)
|
||||||
// @Summary Update company information
|
// @Summary Update company information
|
||||||
// @Description Update company information including business details, address, tags, and customer assignment
|
// @Description Update company information including business details, address, tags, and customer assignment
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -139,7 +139,7 @@ func (h *Handler) UpdateCompany(c echo.Context) error {
|
|||||||
// DeleteCompany deletes a company (Web Panel)
|
// DeleteCompany deletes a company (Web Panel)
|
||||||
// @Summary Delete company
|
// @Summary Delete company
|
||||||
// @Description Soft delete a company by setting status to inactive
|
// @Description Soft delete a company by setting status to inactive
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -174,7 +174,7 @@ func (h *Handler) DeleteCompany(c echo.Context) error {
|
|||||||
// ListCompanies lists companies with filters and pagination (Web Panel)
|
// ListCompanies lists companies with filters and pagination (Web Panel)
|
||||||
// @Summary List companies with filters and pagination
|
// @Summary List companies with filters and pagination
|
||||||
// @Description Retrieve a paginated list of companies with advanced filtering options including search, type, status, industry, verification status, tags, and business criteria. Supports sorting and pagination.
|
// @Description Retrieve a paginated list of companies with advanced filtering options including search, type, status, industry, verification status, tags, and business criteria. Supports sorting and pagination.
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param search query string false "Search term to filter companies by name, description, or industry"
|
// @Param search query string false "Search term to filter companies by name, description, or industry"
|
||||||
@@ -220,7 +220,7 @@ func (h *Handler) ListCompanies(c echo.Context) error {
|
|||||||
// SearchCompanies searches companies with advanced filters (Web Panel)
|
// SearchCompanies searches companies with advanced filters (Web Panel)
|
||||||
// @Summary Advanced search for companies
|
// @Summary Advanced search for companies
|
||||||
// @Description Search companies with advanced filtering capabilities including tags, business criteria, and location
|
// @Description Search companies with advanced filtering capabilities including tags, business criteria, and location
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param q query string false "Search query"
|
// @Param q query string false "Search query"
|
||||||
@@ -261,7 +261,7 @@ func (h *Handler) SearchCompanies(c echo.Context) error {
|
|||||||
// UpdateCompanyStatus updates company status (Web Panel)
|
// UpdateCompanyStatus updates company status (Web Panel)
|
||||||
// @Summary Update company status
|
// @Summary Update company status
|
||||||
// @Description Update company account status (active, inactive, suspended, pending)
|
// @Description Update company account status (active, inactive, suspended, pending)
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -302,7 +302,7 @@ func (h *Handler) UpdateCompanyStatus(c echo.Context) error {
|
|||||||
// UpdateCompanyVerification updates company verification status (Web Panel)
|
// UpdateCompanyVerification updates company verification status (Web Panel)
|
||||||
// @Summary Update company verification status
|
// @Summary Update company verification status
|
||||||
// @Description Update company verification and compliance status
|
// @Description Update company verification and compliance status
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -343,7 +343,7 @@ func (h *Handler) UpdateCompanyVerification(c echo.Context) error {
|
|||||||
// UpdateCompanyTags updates company tags (Web Panel)
|
// UpdateCompanyTags updates company tags (Web Panel)
|
||||||
// @Summary Update company tags
|
// @Summary Update company tags
|
||||||
// @Description Update company tags (CPV, categories, keywords, specializations, certifications)
|
// @Description Update company tags (CPV, categories, keywords, specializations, certifications)
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -384,7 +384,7 @@ func (h *Handler) UpdateCompanyTags(c echo.Context) error {
|
|||||||
// AddTags adds tags to a company (Web Panel)
|
// AddTags adds tags to a company (Web Panel)
|
||||||
// @Summary Add tags to company
|
// @Summary Add tags to company
|
||||||
// @Description Add specific tags to a company
|
// @Description Add specific tags to a company
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -425,7 +425,7 @@ func (h *Handler) AddTags(c echo.Context) error {
|
|||||||
// RemoveTags removes tags from a company (Web Panel)
|
// RemoveTags removes tags from a company (Web Panel)
|
||||||
// @Summary Remove tags from company
|
// @Summary Remove tags from company
|
||||||
// @Description Remove specific tags from a company
|
// @Description Remove specific tags from a company
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -466,7 +466,7 @@ func (h *Handler) RemoveTags(c echo.Context) error {
|
|||||||
// VerifyCompany verifies a company (Web Panel)
|
// VerifyCompany verifies a company (Web Panel)
|
||||||
// @Summary Verify company
|
// @Summary Verify company
|
||||||
// @Description Mark a company as verified
|
// @Description Mark a company as verified
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -501,7 +501,7 @@ func (h *Handler) VerifyCompany(c echo.Context) error {
|
|||||||
// SuspendCompany suspends a company (Web Panel)
|
// SuspendCompany suspends a company (Web Panel)
|
||||||
// @Summary Suspend company
|
// @Summary Suspend company
|
||||||
// @Description Suspend a company account with reason
|
// @Description Suspend a company account with reason
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -542,7 +542,7 @@ func (h *Handler) SuspendCompany(c echo.Context) error {
|
|||||||
// ActivateCompany activates a company (Web Panel)
|
// ActivateCompany activates a company (Web Panel)
|
||||||
// @Summary Activate company
|
// @Summary Activate company
|
||||||
// @Description Activate a suspended company account
|
// @Description Activate a suspended company account
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Company ID"
|
// @Param id path string true "Company ID"
|
||||||
@@ -577,7 +577,7 @@ func (h *Handler) ActivateCompany(c echo.Context) error {
|
|||||||
// GetCompanyStats returns company statistics (Web Panel)
|
// GetCompanyStats returns company statistics (Web Panel)
|
||||||
// @Summary Get company statistics
|
// @Summary Get company statistics
|
||||||
// @Description Get comprehensive company statistics for dashboard
|
// @Description Get comprehensive company statistics for dashboard
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} response.APIResponse{data=CompanyStatsResponse} "Company statistics retrieved successfully"
|
// @Success 200 {object} response.APIResponse{data=CompanyStatsResponse} "Company statistics retrieved successfully"
|
||||||
@@ -596,7 +596,7 @@ func (h *Handler) GetCompanyStats(c echo.Context) error {
|
|||||||
// GetCompaniesByType retrieves companies by type (Web Panel)
|
// GetCompaniesByType retrieves companies by type (Web Panel)
|
||||||
// @Summary Get companies by type
|
// @Summary Get companies by type
|
||||||
// @Description Retrieve companies filtered by their type (private, public, government, ngo, startup)
|
// @Description Retrieve companies filtered by their type (private, public, government, ngo, startup)
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param type path string true "Company type" Enums(private, public, government, ngo, startup)
|
// @Param type path string true "Company type" Enums(private, public, government, ngo, startup)
|
||||||
@@ -654,7 +654,7 @@ func (h *Handler) GetCompaniesByType(c echo.Context) error {
|
|||||||
// GetCompaniesByStatus retrieves companies by status (Web Panel)
|
// GetCompaniesByStatus retrieves companies by status (Web Panel)
|
||||||
// @Summary Get companies by status
|
// @Summary Get companies by status
|
||||||
// @Description Retrieve companies filtered by their status (active, inactive, suspended, pending)
|
// @Description Retrieve companies filtered by their status (active, inactive, suspended, pending)
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param status path string true "Company status" Enums(active, inactive, suspended, pending)
|
// @Param status path string true "Company status" Enums(active, inactive, suspended, pending)
|
||||||
@@ -711,7 +711,7 @@ func (h *Handler) GetCompaniesByStatus(c echo.Context) error {
|
|||||||
// GetCompaniesByIndustry retrieves companies by industry (Web Panel)
|
// GetCompaniesByIndustry retrieves companies by industry (Web Panel)
|
||||||
// @Summary Get companies by industry
|
// @Summary Get companies by industry
|
||||||
// @Description Retrieve companies filtered by their industry
|
// @Description Retrieve companies filtered by their industry
|
||||||
// @Tags Companies-Admin
|
// @Tags Admin-Companies
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param industry path string true "Industry"
|
// @Param industry path string true "Industry"
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ type CreateCustomerForm struct {
|
|||||||
Mobile *string `json:"mobile,omitempty" valid:"optional,length(10|20)"`
|
Mobile *string `json:"mobile,omitempty" valid:"optional,length(10|20)"`
|
||||||
|
|
||||||
// Company customer fields
|
// Company customer fields
|
||||||
CompanyName *string `json:"company_name,omitempty" valid:"optional,length(2|200)"`
|
|
||||||
RegistrationNumber *string `json:"registration_number,omitempty" valid:"optional,length(5|50)"`
|
RegistrationNumber *string `json:"registration_number,omitempty" valid:"optional,length(5|50)"`
|
||||||
TaxID *string `json:"tax_id,omitempty" valid:"optional,length(5|50)"`
|
TaxID *string `json:"tax_id,omitempty" valid:"optional,length(5|50)"`
|
||||||
Industry *string `json:"industry,omitempty" valid:"optional,length(2|100)"`
|
Industry *string `json:"industry,omitempty" valid:"optional,length(2|100)"`
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ func NewHandler(service Service, userHandler *user.Handler, authService authoriz
|
|||||||
// CreateCustomer creates a new customer (Web Panel)
|
// CreateCustomer creates a new customer (Web Panel)
|
||||||
// @Summary Create a new customer
|
// @Summary Create a new customer
|
||||||
// @Description Create a new customer with comprehensive information including personal details, company information, address, and business details. This endpoint is used by the web panel for full customer registration.
|
// @Description Create a new customer with comprehensive information including personal details, company information, address, and business details. This endpoint is used by the web panel for full customer registration.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param customer body CreateCustomerForm true "Customer information including type (individual|company|government), personal details, company info, address, and business details"
|
// @Param customer body CreateCustomerForm true "Customer information including type (individual|company|government), personal details, company info, address, and business details"
|
||||||
@@ -71,7 +71,7 @@ func (h *Handler) CreateCustomer(c echo.Context) error {
|
|||||||
// GetCustomerByID retrieves a customer by ID (Web Panel)
|
// GetCustomerByID retrieves a customer by ID (Web Panel)
|
||||||
// @Summary Get customer by ID
|
// @Summary Get customer by ID
|
||||||
// @Description Retrieve detailed customer information by customer ID
|
// @Description Retrieve detailed customer information by customer ID
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -98,7 +98,7 @@ func (h *Handler) GetCustomerByID(c echo.Context) error {
|
|||||||
// GetCustomerByIDWithCompanies retrieves a customer by ID with companies (Web Panel)
|
// GetCustomerByIDWithCompanies retrieves a customer by ID with companies (Web Panel)
|
||||||
// @Summary Get customer by ID with companies
|
// @Summary Get customer by ID with companies
|
||||||
// @Description Retrieve detailed customer information by customer ID including assigned companies
|
// @Description Retrieve detailed customer information by customer ID including assigned companies
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -125,7 +125,7 @@ func (h *Handler) GetCustomerByIDWithCompanies(c echo.Context) error {
|
|||||||
// UpdateCustomer updates a customer (Web Panel)
|
// UpdateCustomer updates a customer (Web Panel)
|
||||||
// @Summary Update customer information
|
// @Summary Update customer information
|
||||||
// @Description Update customer information including personal details, company information, address, and business details
|
// @Description Update customer information including personal details, company information, address, and business details
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -171,7 +171,7 @@ func (h *Handler) UpdateCustomer(c echo.Context) error {
|
|||||||
// DeleteCustomer deletes a customer (Web Panel)
|
// DeleteCustomer deletes a customer (Web Panel)
|
||||||
// @Summary Delete customer
|
// @Summary Delete customer
|
||||||
// @Description Soft delete a customer by setting status to inactive
|
// @Description Soft delete a customer by setting status to inactive
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -206,7 +206,7 @@ func (h *Handler) DeleteCustomer(c echo.Context) error {
|
|||||||
// ListCustomers lists customers with filters and pagination
|
// ListCustomers lists customers with filters and pagination
|
||||||
// @Summary List customers with filters and pagination
|
// @Summary List customers with filters and pagination
|
||||||
// @Description Retrieve a paginated list of customers with advanced filtering options including search, type, status, company, industry, verification status, and compliance status. Supports sorting and pagination.
|
// @Description Retrieve a paginated list of customers with advanced filtering options including search, type, status, company, industry, verification status, and compliance status. Supports sorting and pagination.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param search query string false "Search term to filter customers by name, email, or company name"
|
// @Param search query string false "Search term to filter customers by name, email, or company name"
|
||||||
@@ -245,7 +245,7 @@ func (h *Handler) ListCustomers(c echo.Context) error {
|
|||||||
// ListCustomersWithCompanies lists customers with companies and filters
|
// ListCustomersWithCompanies lists customers with companies and filters
|
||||||
// @Summary List customers with companies and filters
|
// @Summary List customers with companies and filters
|
||||||
// @Description Retrieve a paginated list of customers with their assigned companies and advanced filtering options including search, type, status, company, industry, verification status, and compliance status. Supports sorting and pagination.
|
// @Description Retrieve a paginated list of customers with their assigned companies and advanced filtering options including search, type, status, company, industry, verification status, and compliance status. Supports sorting and pagination.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param search query string false "Search term to filter customers by name, email, or company name"
|
// @Param search query string false "Search term to filter customers by name, email, or company name"
|
||||||
@@ -284,7 +284,7 @@ func (h *Handler) ListCustomersWithCompanies(c echo.Context) error {
|
|||||||
// UpdateCustomerStatus updates customer status (Web Panel)
|
// UpdateCustomerStatus updates customer status (Web Panel)
|
||||||
// @Summary Update customer status
|
// @Summary Update customer status
|
||||||
// @Description Update customer account status (active, inactive, suspended, pending)
|
// @Description Update customer account status (active, inactive, suspended, pending)
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -325,7 +325,7 @@ func (h *Handler) UpdateCustomerStatus(c echo.Context) error {
|
|||||||
// UpdateCustomerVerification updates customer verification status (Web Panel)
|
// UpdateCustomerVerification updates customer verification status (Web Panel)
|
||||||
// @Summary Update customer verification status
|
// @Summary Update customer verification status
|
||||||
// @Description Update customer verification and compliance status
|
// @Description Update customer verification and compliance status
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -366,7 +366,7 @@ func (h *Handler) UpdateCustomerVerification(c echo.Context) error {
|
|||||||
// VerifyCustomer verifies a customer (Web Panel)
|
// VerifyCustomer verifies a customer (Web Panel)
|
||||||
// @Summary Verify customer
|
// @Summary Verify customer
|
||||||
// @Description Mark a customer as verified
|
// @Description Mark a customer as verified
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -401,7 +401,7 @@ func (h *Handler) VerifyCustomer(c echo.Context) error {
|
|||||||
// SuspendCustomer suspends a customer (Web Panel)
|
// SuspendCustomer suspends a customer (Web Panel)
|
||||||
// @Summary Suspend customer
|
// @Summary Suspend customer
|
||||||
// @Description Suspend a customer account with optional reason
|
// @Description Suspend a customer account with optional reason
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -442,7 +442,7 @@ func (h *Handler) SuspendCustomer(c echo.Context) error {
|
|||||||
// ActivateCustomer activates a customer (Web Panel)
|
// ActivateCustomer activates a customer (Web Panel)
|
||||||
// @Summary Activate customer
|
// @Summary Activate customer
|
||||||
// @Description Activate a suspended customer account
|
// @Description Activate a suspended customer account
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -477,7 +477,7 @@ func (h *Handler) ActivateCustomer(c echo.Context) error {
|
|||||||
// GetCustomersByCompanyID retrieves customers by company ID (Web Panel)
|
// GetCustomersByCompanyID retrieves customers by company ID (Web Panel)
|
||||||
// @Summary Get customers by company ID
|
// @Summary Get customers by company ID
|
||||||
// @Description Retrieve all customers associated with a specific company
|
// @Description Retrieve all customers associated with a specific company
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param companyId path string true "Company ID"
|
// @Param companyId path string true "Company ID"
|
||||||
@@ -529,7 +529,7 @@ func (h *Handler) GetCustomersByCompanyID(c echo.Context) error {
|
|||||||
// GetCustomersByType retrieves customers by type
|
// GetCustomersByType retrieves customers by type
|
||||||
// @Summary Get customers by type
|
// @Summary Get customers by type
|
||||||
// @Description Retrieve customers filtered by their type (individual, company, or government). Useful for administrative reporting and management.
|
// @Description Retrieve customers filtered by their type (individual, company, or government). Useful for administrative reporting and management.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param type path string true "Customer type" Enums(individual, company, government)
|
// @Param type path string true "Customer type" Enums(individual, company, government)
|
||||||
@@ -585,7 +585,7 @@ func (h *Handler) GetCustomersByType(c echo.Context) error {
|
|||||||
// GetCustomersByStatus retrieves customers by status
|
// GetCustomersByStatus retrieves customers by status
|
||||||
// @Summary Get customers by status
|
// @Summary Get customers by status
|
||||||
// @Description Retrieve customers filtered by their account status (active, inactive, suspended, or pending). Useful for administrative monitoring and management.
|
// @Description Retrieve customers filtered by their account status (active, inactive, suspended, or pending). Useful for administrative monitoring and management.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param status path string true "Customer status" Enums(active, inactive, suspended, pending)
|
// @Param status path string true "Customer status" Enums(active, inactive, suspended, pending)
|
||||||
@@ -641,7 +641,7 @@ func (h *Handler) GetCustomersByStatus(c echo.Context) error {
|
|||||||
// AssignCompaniesToCustomer assigns companies to a customer (Web Panel)
|
// AssignCompaniesToCustomer assigns companies to a customer (Web Panel)
|
||||||
// @Summary Assign companies to a customer
|
// @Summary Assign companies to a customer
|
||||||
// @Description Assign one or more companies to a specific customer.
|
// @Description Assign one or more companies to a specific customer.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -682,7 +682,7 @@ func (h *Handler) AssignCompaniesToCustomer(c echo.Context) error {
|
|||||||
// RemoveCompaniesFromCustomer removes companies from a customer (Web Panel)
|
// RemoveCompaniesFromCustomer removes companies from a customer (Web Panel)
|
||||||
// @Summary Remove companies from a customer
|
// @Summary Remove companies from a customer
|
||||||
// @Description Remove one or more companies from a specific customer.
|
// @Description Remove one or more companies from a specific customer.
|
||||||
// @Tags Customers-Admin
|
// @Tags Admin-Customers
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path string true "Customer ID"
|
// @Param id path string true "Customer ID"
|
||||||
@@ -723,7 +723,7 @@ func (h *Handler) RemoveCompaniesFromCustomer(c echo.Context) error {
|
|||||||
// Login handles customer authentication
|
// Login handles customer authentication
|
||||||
// @Summary Customer login
|
// @Summary Customer login
|
||||||
// @Description Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.
|
// @Description Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.
|
||||||
// @Tags Customers-Authorization
|
// @Tags Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param login body LoginForm true "Login credentials (username/email and password)"
|
// @Param login body LoginForm true "Login credentials (username/email and password)"
|
||||||
@@ -757,7 +757,7 @@ func (h *Handler) Login(c echo.Context) error {
|
|||||||
// RefreshToken handles customer token refresh
|
// RefreshToken handles customer token refresh
|
||||||
// @Summary Refresh customer access token
|
// @Summary Refresh customer access token
|
||||||
// @Description Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.
|
// @Description Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.
|
||||||
// @Tags Customers-Authorization
|
// @Tags Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param refresh body RefreshTokenForm true "Refresh token for generating new access token"
|
// @Param refresh body RefreshTokenForm true "Refresh token for generating new access token"
|
||||||
@@ -788,7 +788,7 @@ func (h *Handler) RefreshToken(c echo.Context) error {
|
|||||||
// GetProfile retrieves customer profile information (Mobile)
|
// GetProfile retrieves customer profile information (Mobile)
|
||||||
// @Summary Get customer profile
|
// @Summary Get customer profile
|
||||||
// @Description Retrieve current customer profile information
|
// @Description Retrieve current customer profile information
|
||||||
// @Tags Customers-Authorization
|
// @Tags Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -796,7 +796,7 @@ func (h *Handler) RefreshToken(c echo.Context) error {
|
|||||||
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
||||||
// @Failure 404 {object} response.APIResponse "Not found - Customer not found"
|
// @Failure 404 {object} response.APIResponse "Not found - Customer not found"
|
||||||
// @Failure 500 {object} response.APIResponse "Internal server error"
|
// @Failure 500 {object} response.APIResponse "Internal server error"
|
||||||
// @Router /api/v1/ [get]
|
// @Router /api/v1/profile [get]
|
||||||
func (h *Handler) GetProfile(c echo.Context) error {
|
func (h *Handler) GetProfile(c echo.Context) error {
|
||||||
// Extract customer ID from JWT token context
|
// Extract customer ID from JWT token context
|
||||||
customerID, err := GetCustomerIDFromContext(c)
|
customerID, err := GetCustomerIDFromContext(c)
|
||||||
@@ -818,7 +818,7 @@ func (h *Handler) GetProfile(c echo.Context) error {
|
|||||||
// GetProfileWithCompanies retrieves customer profile with companies (Mobile)
|
// GetProfileWithCompanies retrieves customer profile with companies (Mobile)
|
||||||
// @Summary Get customer profile with companies
|
// @Summary Get customer profile with companies
|
||||||
// @Description Retrieve current customer profile information along with their assigned companies.
|
// @Description Retrieve current customer profile information along with their assigned companies.
|
||||||
// @Tags Customers-Authorization
|
// @Tags Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -826,7 +826,7 @@ func (h *Handler) GetProfile(c echo.Context) error {
|
|||||||
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
||||||
// @Failure 404 {object} response.APIResponse "Not found - Customer not found"
|
// @Failure 404 {object} response.APIResponse "Not found - Customer not found"
|
||||||
// @Failure 500 {object} response.APIResponse "Internal server error"
|
// @Failure 500 {object} response.APIResponse "Internal server error"
|
||||||
// @Router /api/v1/with-companies [get]
|
// @Router /api/v1/profile/with-companies [get]
|
||||||
func (h *Handler) GetProfileWithCompanies(c echo.Context) error {
|
func (h *Handler) GetProfileWithCompanies(c echo.Context) error {
|
||||||
// Extract customer ID from JWT token context
|
// Extract customer ID from JWT token context
|
||||||
customerID, err := GetCustomerIDFromContext(c)
|
customerID, err := GetCustomerIDFromContext(c)
|
||||||
@@ -848,14 +848,14 @@ func (h *Handler) GetProfileWithCompanies(c echo.Context) error {
|
|||||||
// Logout handles customer logout (Mobile)
|
// Logout handles customer logout (Mobile)
|
||||||
// @Summary Customer logout
|
// @Summary Customer logout
|
||||||
// @Description Logout customer and invalidate access token
|
// @Description Logout customer and invalidate access token
|
||||||
// @Tags Customers-Authorization
|
// @Tags Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
// @Success 200 {object} response.APIResponse "Logout successful"
|
// @Success 200 {object} response.APIResponse "Logout successful"
|
||||||
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
// @Failure 401 {object} response.APIResponse "Unauthorized - Invalid or missing token"
|
||||||
// @Failure 500 {object} response.APIResponse "Internal server error"
|
// @Failure 500 {object} response.APIResponse "Internal server error"
|
||||||
// @Router /api/v1/logout [delete]
|
// @Router /api/v1/profile/logout [delete]
|
||||||
func (h *Handler) Logout(c echo.Context) error {
|
func (h *Handler) Logout(c echo.Context) error {
|
||||||
// Extract customer ID from JWT token context
|
// Extract customer ID from JWT token context
|
||||||
customerID, err := GetCustomerIDFromContext(c)
|
customerID, err := GetCustomerIDFromContext(c)
|
||||||
|
|||||||
@@ -81,14 +81,6 @@ func (s *customerService) CreateCustomer(ctx context.Context, form *CreateCustom
|
|||||||
return nil, errors.New("customer with this email already exists")
|
return nil, errors.New("customer with this email already exists")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if company name already exists (for company customers)
|
|
||||||
if form.Type == string(CustomerTypeCompany) && form.CompanyName != nil {
|
|
||||||
existingCustomer, _ = s.repository.GetByCompanyName(ctx, *form.CompanyName)
|
|
||||||
if existingCustomer != nil {
|
|
||||||
return nil, errors.New("company with this name already exists")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if registration number already exists (for company customers)
|
// Check if registration number already exists (for company customers)
|
||||||
if form.Type == string(CustomerTypeCompany) && form.RegistrationNumber != nil {
|
if form.Type == string(CustomerTypeCompany) && form.RegistrationNumber != nil {
|
||||||
existingCustomer, _ = s.repository.GetByRegistrationNumber(ctx, *form.RegistrationNumber)
|
existingCustomer, _ = s.repository.GetByRegistrationNumber(ctx, *form.RegistrationNumber)
|
||||||
|
|||||||
+16
-16
@@ -31,7 +31,7 @@ func NewUserHandler(service Service, logger logger.Logger, validator ValidationS
|
|||||||
// Login handles user login
|
// Login handles user login
|
||||||
// @Summary Authenticate user login
|
// @Summary Authenticate user login
|
||||||
// @Description Authenticate user with username/email and password to obtain access and refresh tokens for web panel administration. This endpoint validates credentials and returns JWT tokens for subsequent API calls.
|
// @Description Authenticate user with username/email and password to obtain access and refresh tokens for web panel administration. This endpoint validates credentials and returns JWT tokens for subsequent API calls.
|
||||||
// @Tags Authorization
|
// @Tags Admin-Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param login body LoginForm true "User login credentials including username/email and password"
|
// @Param login body LoginForm true "User login credentials including username/email and password"
|
||||||
@@ -60,7 +60,7 @@ func (h *Handler) Login(c echo.Context) error {
|
|||||||
// RefreshToken handles token refresh
|
// RefreshToken handles token refresh
|
||||||
// @Summary Refresh access token
|
// @Summary Refresh access token
|
||||||
// @Description Generate a new access token using a valid refresh token. This endpoint allows clients to obtain fresh access tokens without re-authentication, maintaining session continuity.
|
// @Description Generate a new access token using a valid refresh token. This endpoint allows clients to obtain fresh access tokens without re-authentication, maintaining session continuity.
|
||||||
// @Tags Authorization
|
// @Tags Admin-Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param refresh body RefreshTokenForm true "Refresh token for generating new access token"
|
// @Param refresh body RefreshTokenForm true "Refresh token for generating new access token"
|
||||||
@@ -87,7 +87,7 @@ func (h *Handler) RefreshToken(c echo.Context) error {
|
|||||||
// ResetPassword handles password reset request
|
// ResetPassword handles password reset request
|
||||||
// @Summary Initiate password reset process
|
// @Summary Initiate password reset process
|
||||||
// @Description Send password reset email to user with reset token. This endpoint validates the email address and sends a secure reset link to the user's registered email address.
|
// @Description Send password reset email to user with reset token. This endpoint validates the email address and sends a secure reset link to the user's registered email address.
|
||||||
// @Tags Authorization
|
// @Tags Admin-Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param reset body ResetPasswordForm true "Email address for password reset request"
|
// @Param reset body ResetPasswordForm true "Email address for password reset request"
|
||||||
@@ -117,7 +117,7 @@ func (h *Handler) ResetPassword(c echo.Context) error {
|
|||||||
// GetProfile gets current user profile
|
// GetProfile gets current user profile
|
||||||
// @Summary Get authenticated user profile
|
// @Summary Get authenticated user profile
|
||||||
// @Description Retrieve complete profile information for the currently authenticated user including personal details, role information, permissions, and account status. This endpoint requires valid authentication token.
|
// @Description Retrieve complete profile information for the currently authenticated user including personal details, role information, permissions, and account status. This endpoint requires valid authentication token.
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -144,7 +144,7 @@ func (h *Handler) GetProfile(c echo.Context) error {
|
|||||||
// UpdateProfile updates current user profile
|
// UpdateProfile updates current user profile
|
||||||
// @Summary Update authenticated user profile
|
// @Summary Update authenticated user profile
|
||||||
// @Description Update profile information for the currently authenticated user including personal details, contact information, and preferences. Only the authenticated user can update their own profile.
|
// @Description Update profile information for the currently authenticated user including personal details, contact information, and preferences. Only the authenticated user can update their own profile.
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -179,7 +179,7 @@ func (h *Handler) UpdateProfile(c echo.Context) error {
|
|||||||
// ChangePassword changes current user password
|
// ChangePassword changes current user password
|
||||||
// @Summary Change user password
|
// @Summary Change user password
|
||||||
// @Description Change password for the currently authenticated user. Requires current password verification and enforces password policy. This operation invalidates all existing sessions and requires re-authentication.
|
// @Description Change password for the currently authenticated user. Requires current password verification and enforces password policy. This operation invalidates all existing sessions and requires re-authentication.
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -214,7 +214,7 @@ func (h *Handler) ChangePassword(c echo.Context) error {
|
|||||||
// Logout handles user logout
|
// Logout handles user logout
|
||||||
// @Summary Logout authenticated user
|
// @Summary Logout authenticated user
|
||||||
// @Description Logout the currently authenticated user by invalidating their access and refresh tokens. This endpoint ensures secure session termination and prevents further use of the user's tokens.
|
// @Description Logout the currently authenticated user by invalidating their access and refresh tokens. This endpoint ensures secure session termination and prevents further use of the user's tokens.
|
||||||
// @Tags Authorization
|
// @Tags Admin-Authorization
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -247,7 +247,7 @@ func (h *Handler) Logout(c echo.Context) error {
|
|||||||
// CreateUser creates a new user (admin only)
|
// CreateUser creates a new user (admin only)
|
||||||
// @Summary Create new user account
|
// @Summary Create new user account
|
||||||
// @Description Create a new user account with specified role and permissions. This endpoint is restricted to administrators only and allows creation of various user types including admins, managers, and operators with appropriate access levels.
|
// @Description Create a new user account with specified role and permissions. This endpoint is restricted to administrators only and allows creation of various user types including admins, managers, and operators with appropriate access levels.
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -289,7 +289,7 @@ func (h *Handler) CreateUser(c echo.Context) error {
|
|||||||
// ListUsers lists users with search and filters (admin only)
|
// ListUsers lists users with search and filters (admin only)
|
||||||
// @Summary List users
|
// @Summary List users
|
||||||
// @Description List users with search and filters (admin only)
|
// @Description List users with search and filters (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -330,7 +330,7 @@ func (h *Handler) ListUsers(c echo.Context) error {
|
|||||||
// GetUserByID gets a user by ID (admin only)
|
// GetUserByID gets a user by ID (admin only)
|
||||||
// @Summary Get user by ID
|
// @Summary Get user by ID
|
||||||
// @Description Get user details by ID (admin only)
|
// @Description Get user details by ID (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -356,7 +356,7 @@ func (h *Handler) GetUserByID(c echo.Context) error {
|
|||||||
// UpdateUser updates a user (admin only)
|
// UpdateUser updates a user (admin only)
|
||||||
// @Summary Update user
|
// @Summary Update user
|
||||||
// @Description Update user information (admin only)
|
// @Description Update user information (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -400,7 +400,7 @@ func (h *Handler) UpdateUser(c echo.Context) error {
|
|||||||
// DeleteUser deletes a user (admin only)
|
// DeleteUser deletes a user (admin only)
|
||||||
// @Summary Delete user
|
// @Summary Delete user
|
||||||
// @Description Delete a user (admin only)
|
// @Description Delete a user (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -434,7 +434,7 @@ func (h *Handler) DeleteUser(c echo.Context) error {
|
|||||||
// UpdateUserStatus updates user status (admin only)
|
// UpdateUserStatus updates user status (admin only)
|
||||||
// @Summary Update user status
|
// @Summary Update user status
|
||||||
// @Description Update user account status (admin only)
|
// @Description Update user account status (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -479,7 +479,7 @@ func (h *Handler) UpdateUserStatus(c echo.Context) error {
|
|||||||
// UpdateUserRole updates user role (admin only)
|
// UpdateUserRole updates user role (admin only)
|
||||||
// @Summary Update user role
|
// @Summary Update user role
|
||||||
// @Description Update user role (admin only)
|
// @Description Update user role (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -525,7 +525,7 @@ func (h *Handler) UpdateUserRole(c echo.Context) error {
|
|||||||
// GetUsersByCompanyID gets users by company ID (admin only)
|
// GetUsersByCompanyID gets users by company ID (admin only)
|
||||||
// @Summary Get users by company ID
|
// @Summary Get users by company ID
|
||||||
// @Description Get users belonging to a specific company (admin only)
|
// @Description Get users belonging to a specific company (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
@@ -585,7 +585,7 @@ func (h *Handler) GetUsersByCompanyID(c echo.Context) error {
|
|||||||
// GetUsersByRole gets users by role (admin only)
|
// GetUsersByRole gets users by role (admin only)
|
||||||
// @Summary Get users by role
|
// @Summary Get users by role
|
||||||
// @Description Get users with a specific role (admin only)
|
// @Description Get users with a specific role (admin only)
|
||||||
// @Tags Users
|
// @Tags Admin-Users
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
|
|||||||
Reference in New Issue
Block a user