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:
+106
-113
@@ -39,7 +39,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "List companies with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -251,7 +251,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Create a new company",
|
||||
"parameters": [
|
||||
@@ -326,7 +326,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by industry",
|
||||
"parameters": [
|
||||
@@ -410,7 +410,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Advanced search for companies",
|
||||
"parameters": [
|
||||
@@ -562,7 +562,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company statistics",
|
||||
"responses": {
|
||||
@@ -608,7 +608,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by status",
|
||||
"parameters": [
|
||||
@@ -698,7 +698,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by type",
|
||||
"parameters": [
|
||||
@@ -789,7 +789,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company by ID",
|
||||
"parameters": [
|
||||
@@ -854,7 +854,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company information",
|
||||
"parameters": [
|
||||
@@ -940,7 +940,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Delete company",
|
||||
"parameters": [
|
||||
@@ -995,7 +995,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Activate company",
|
||||
"parameters": [
|
||||
@@ -1050,7 +1050,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company status",
|
||||
"parameters": [
|
||||
@@ -1120,7 +1120,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Suspend company",
|
||||
"parameters": [
|
||||
@@ -1190,7 +1190,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company tags",
|
||||
"parameters": [
|
||||
@@ -1260,7 +1260,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Add tags to company",
|
||||
"parameters": [
|
||||
@@ -1330,7 +1330,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Remove tags from company",
|
||||
"parameters": [
|
||||
@@ -1400,7 +1400,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company verification status",
|
||||
"parameters": [
|
||||
@@ -1470,7 +1470,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Verify company",
|
||||
"parameters": [
|
||||
@@ -1525,7 +1525,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -1691,7 +1691,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Create a new customer",
|
||||
"parameters": [
|
||||
@@ -1766,7 +1766,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by company ID",
|
||||
"parameters": [
|
||||
@@ -1842,7 +1842,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by status",
|
||||
"parameters": [
|
||||
@@ -1932,7 +1932,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by type",
|
||||
"parameters": [
|
||||
@@ -2021,7 +2021,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with companies and filters",
|
||||
"parameters": [
|
||||
@@ -2189,7 +2189,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID",
|
||||
"parameters": [
|
||||
@@ -2254,7 +2254,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer information",
|
||||
"parameters": [
|
||||
@@ -2340,7 +2340,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Delete customer",
|
||||
"parameters": [
|
||||
@@ -2395,7 +2395,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Activate customer",
|
||||
"parameters": [
|
||||
@@ -2450,7 +2450,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Assign companies to a customer",
|
||||
"parameters": [
|
||||
@@ -2520,7 +2520,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Remove companies from a customer",
|
||||
"parameters": [
|
||||
@@ -2590,7 +2590,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer status",
|
||||
"parameters": [
|
||||
@@ -2660,7 +2660,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Suspend customer",
|
||||
"parameters": [
|
||||
@@ -2730,7 +2730,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer verification status",
|
||||
"parameters": [
|
||||
@@ -2800,7 +2800,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Verify customer",
|
||||
"parameters": [
|
||||
@@ -2855,7 +2855,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID with companies",
|
||||
"parameters": [
|
||||
@@ -2917,7 +2917,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Health"
|
||||
"Admin-Health"
|
||||
],
|
||||
"summary": "Health check endpoint",
|
||||
"responses": {
|
||||
@@ -2951,7 +2951,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get authenticated user profile",
|
||||
"responses": {
|
||||
@@ -3007,7 +3007,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update authenticated user profile",
|
||||
"parameters": [
|
||||
@@ -3088,7 +3088,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Change user password",
|
||||
"parameters": [
|
||||
@@ -3146,7 +3146,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Authenticate user login",
|
||||
"parameters": [
|
||||
@@ -3227,7 +3227,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Logout authenticated user",
|
||||
"responses": {
|
||||
@@ -3262,7 +3262,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Refresh access token",
|
||||
"parameters": [
|
||||
@@ -3332,7 +3332,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Initiate password reset process",
|
||||
"parameters": [
|
||||
@@ -3401,7 +3401,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "List users",
|
||||
"parameters": [
|
||||
@@ -3513,7 +3513,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Create new user account",
|
||||
"parameters": [
|
||||
@@ -3600,7 +3600,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by company ID",
|
||||
"parameters": [
|
||||
@@ -3686,7 +3686,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by role",
|
||||
"parameters": [
|
||||
@@ -3772,7 +3772,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get user by ID",
|
||||
"parameters": [
|
||||
@@ -3849,7 +3849,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user",
|
||||
"parameters": [
|
||||
@@ -3935,7 +3935,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Delete user",
|
||||
"parameters": [
|
||||
@@ -4002,7 +4002,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user role",
|
||||
"parameters": [
|
||||
@@ -4078,7 +4078,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user status",
|
||||
"parameters": [
|
||||
@@ -4139,7 +4139,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/": {
|
||||
"/api/v1/profile": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4154,7 +4154,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile",
|
||||
"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": {
|
||||
"post": {
|
||||
"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"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Customer login",
|
||||
"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": {
|
||||
"post": {
|
||||
"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"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Refresh customer access token",
|
||||
"parameters": [
|
||||
@@ -4377,7 +4377,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/with-companies": {
|
||||
"/api/v1/profile/with-companies": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4392,7 +4392,7 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile with companies",
|
||||
"responses": {
|
||||
@@ -5223,10 +5223,6 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"company_name": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_person": {
|
||||
"description": "Contact person (for company customers)",
|
||||
"allOf": [
|
||||
@@ -5274,6 +5270,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"registration_number": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"tax_id": {
|
||||
@@ -5928,31 +5925,27 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
{
|
||||
"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",
|
||||
"name": "Authorization"
|
||||
"name": "Admin-Authorization"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"name": "Customers-Admin"
|
||||
},
|
||||
{
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Customers-Authorization"
|
||||
"name": "Admin-Customers"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"name": "Companies-Mobile"
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Authorization"
|
||||
}
|
||||
]
|
||||
}`
|
||||
|
||||
+106
-113
@@ -33,7 +33,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "List companies with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -245,7 +245,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Create a new company",
|
||||
"parameters": [
|
||||
@@ -320,7 +320,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by industry",
|
||||
"parameters": [
|
||||
@@ -404,7 +404,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Advanced search for companies",
|
||||
"parameters": [
|
||||
@@ -556,7 +556,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company statistics",
|
||||
"responses": {
|
||||
@@ -602,7 +602,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by status",
|
||||
"parameters": [
|
||||
@@ -692,7 +692,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by type",
|
||||
"parameters": [
|
||||
@@ -783,7 +783,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company by ID",
|
||||
"parameters": [
|
||||
@@ -848,7 +848,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company information",
|
||||
"parameters": [
|
||||
@@ -934,7 +934,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Delete company",
|
||||
"parameters": [
|
||||
@@ -989,7 +989,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Activate company",
|
||||
"parameters": [
|
||||
@@ -1044,7 +1044,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company status",
|
||||
"parameters": [
|
||||
@@ -1114,7 +1114,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Suspend company",
|
||||
"parameters": [
|
||||
@@ -1184,7 +1184,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company tags",
|
||||
"parameters": [
|
||||
@@ -1254,7 +1254,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Add tags to company",
|
||||
"parameters": [
|
||||
@@ -1324,7 +1324,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Remove tags from company",
|
||||
"parameters": [
|
||||
@@ -1394,7 +1394,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company verification status",
|
||||
"parameters": [
|
||||
@@ -1464,7 +1464,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Verify company",
|
||||
"parameters": [
|
||||
@@ -1519,7 +1519,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -1685,7 +1685,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Create a new customer",
|
||||
"parameters": [
|
||||
@@ -1760,7 +1760,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by company ID",
|
||||
"parameters": [
|
||||
@@ -1836,7 +1836,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by status",
|
||||
"parameters": [
|
||||
@@ -1926,7 +1926,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by type",
|
||||
"parameters": [
|
||||
@@ -2015,7 +2015,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with companies and filters",
|
||||
"parameters": [
|
||||
@@ -2183,7 +2183,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID",
|
||||
"parameters": [
|
||||
@@ -2248,7 +2248,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer information",
|
||||
"parameters": [
|
||||
@@ -2334,7 +2334,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Delete customer",
|
||||
"parameters": [
|
||||
@@ -2389,7 +2389,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Activate customer",
|
||||
"parameters": [
|
||||
@@ -2444,7 +2444,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Assign companies to a customer",
|
||||
"parameters": [
|
||||
@@ -2514,7 +2514,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Remove companies from a customer",
|
||||
"parameters": [
|
||||
@@ -2584,7 +2584,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer status",
|
||||
"parameters": [
|
||||
@@ -2654,7 +2654,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Suspend customer",
|
||||
"parameters": [
|
||||
@@ -2724,7 +2724,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer verification status",
|
||||
"parameters": [
|
||||
@@ -2794,7 +2794,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Verify customer",
|
||||
"parameters": [
|
||||
@@ -2849,7 +2849,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID with companies",
|
||||
"parameters": [
|
||||
@@ -2911,7 +2911,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Health"
|
||||
"Admin-Health"
|
||||
],
|
||||
"summary": "Health check endpoint",
|
||||
"responses": {
|
||||
@@ -2945,7 +2945,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get authenticated user profile",
|
||||
"responses": {
|
||||
@@ -3001,7 +3001,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update authenticated user profile",
|
||||
"parameters": [
|
||||
@@ -3082,7 +3082,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Change user password",
|
||||
"parameters": [
|
||||
@@ -3140,7 +3140,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Authenticate user login",
|
||||
"parameters": [
|
||||
@@ -3221,7 +3221,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Logout authenticated user",
|
||||
"responses": {
|
||||
@@ -3256,7 +3256,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Refresh access token",
|
||||
"parameters": [
|
||||
@@ -3326,7 +3326,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Initiate password reset process",
|
||||
"parameters": [
|
||||
@@ -3395,7 +3395,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "List users",
|
||||
"parameters": [
|
||||
@@ -3507,7 +3507,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Create new user account",
|
||||
"parameters": [
|
||||
@@ -3594,7 +3594,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by company ID",
|
||||
"parameters": [
|
||||
@@ -3680,7 +3680,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by role",
|
||||
"parameters": [
|
||||
@@ -3766,7 +3766,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get user by ID",
|
||||
"parameters": [
|
||||
@@ -3843,7 +3843,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user",
|
||||
"parameters": [
|
||||
@@ -3929,7 +3929,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Delete user",
|
||||
"parameters": [
|
||||
@@ -3996,7 +3996,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user role",
|
||||
"parameters": [
|
||||
@@ -4072,7 +4072,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user status",
|
||||
"parameters": [
|
||||
@@ -4133,7 +4133,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/": {
|
||||
"/api/v1/profile": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4148,7 +4148,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile",
|
||||
"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": {
|
||||
"post": {
|
||||
"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"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Customer login",
|
||||
"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": {
|
||||
"post": {
|
||||
"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"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Refresh customer access token",
|
||||
"parameters": [
|
||||
@@ -4371,7 +4371,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/with-companies": {
|
||||
"/api/v1/profile/with-companies": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4386,7 +4386,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile with companies",
|
||||
"responses": {
|
||||
@@ -5217,10 +5217,6 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"company_name": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_person": {
|
||||
"description": "Contact person (for company customers)",
|
||||
"allOf": [
|
||||
@@ -5268,6 +5264,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"registration_number": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"tax_id": {
|
||||
@@ -5922,31 +5919,27 @@
|
||||
"tags": [
|
||||
{
|
||||
"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",
|
||||
"name": "Authorization"
|
||||
"name": "Admin-Authorization"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"name": "Customers-Admin"
|
||||
},
|
||||
{
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Customers-Authorization"
|
||||
"name": "Admin-Customers"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"name": "Companies-Mobile"
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Authorization"
|
||||
}
|
||||
]
|
||||
}
|
||||
+92
-97
@@ -511,9 +511,6 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
company_name:
|
||||
description: Company customer fields
|
||||
type: string
|
||||
contact_person:
|
||||
allOf:
|
||||
- $ref: '#/definitions/customer.ContactPersonForm'
|
||||
@@ -545,6 +542,7 @@ definitions:
|
||||
phone:
|
||||
type: string
|
||||
registration_number:
|
||||
description: Company customer fields
|
||||
type: string
|
||||
tax_id:
|
||||
type: string
|
||||
@@ -1148,7 +1146,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: List companies with filters and pagination
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1196,7 +1194,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Create a new company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -1231,7 +1229,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Delete company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1270,7 +1268,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get company by ID
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1325,7 +1323,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update company information
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/activate:
|
||||
post:
|
||||
consumes:
|
||||
@@ -1360,7 +1358,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Activate company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/status:
|
||||
patch:
|
||||
consumes:
|
||||
@@ -1405,7 +1403,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update company status
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/suspend:
|
||||
post:
|
||||
consumes:
|
||||
@@ -1450,7 +1448,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Suspend company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/tags:
|
||||
put:
|
||||
consumes:
|
||||
@@ -1496,7 +1494,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update company tags
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/tags/add:
|
||||
post:
|
||||
consumes:
|
||||
@@ -1541,7 +1539,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Add tags to company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/tags/remove:
|
||||
post:
|
||||
consumes:
|
||||
@@ -1586,7 +1584,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Remove tags from company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/verification:
|
||||
patch:
|
||||
consumes:
|
||||
@@ -1631,7 +1629,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update company verification status
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/{id}/verify:
|
||||
post:
|
||||
consumes:
|
||||
@@ -1666,7 +1664,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Verify company
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/industry/{industry}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -1719,7 +1717,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get companies by industry
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/search:
|
||||
get:
|
||||
consumes:
|
||||
@@ -1817,7 +1815,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Advanced search for companies
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/stats:
|
||||
get:
|
||||
consumes:
|
||||
@@ -1843,7 +1841,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get company statistics
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/status/{status}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -1902,7 +1900,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get companies by status
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/companies/type/{type}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -1962,7 +1960,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get companies by type
|
||||
tags:
|
||||
- Companies-Admin
|
||||
- Admin-Companies
|
||||
/admin/v1/customers:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2077,7 +2075,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: List customers with filters and pagination
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2124,7 +2122,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Create a new customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -2159,7 +2157,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Delete customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2198,7 +2196,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customer by ID
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2252,7 +2250,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update customer information
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/activate:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2287,7 +2285,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Activate customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/companies/assign:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2332,7 +2330,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Assign companies to a customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/companies/remove:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2377,7 +2375,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Remove companies from a customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/status:
|
||||
patch:
|
||||
consumes:
|
||||
@@ -2422,7 +2420,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update customer status
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/suspend:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2467,7 +2465,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Suspend customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/verification:
|
||||
patch:
|
||||
consumes:
|
||||
@@ -2512,7 +2510,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update customer verification status
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/verify:
|
||||
post:
|
||||
consumes:
|
||||
@@ -2547,7 +2545,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Verify customer
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/{id}/with-companies:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2588,7 +2586,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customer by ID with companies
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/company/{companyId}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2634,7 +2632,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customers by company ID
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/status/{status}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2693,7 +2691,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customers by status
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/type/{type}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2751,7 +2749,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customers by type
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/customers/with-companies:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2866,7 +2864,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: List customers with companies and filters
|
||||
tags:
|
||||
- Customers-Admin
|
||||
- Admin-Customers
|
||||
/admin/v1/health:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2887,7 +2885,7 @@ paths:
|
||||
$ref: '#/definitions/main.HealthResponse'
|
||||
summary: Health check endpoint
|
||||
tags:
|
||||
- Health
|
||||
- Admin-Health
|
||||
/admin/v1/profile:
|
||||
get:
|
||||
consumes:
|
||||
@@ -2923,7 +2921,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get authenticated user profile
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2974,7 +2972,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update authenticated user profile
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/profile/change-password:
|
||||
put:
|
||||
consumes:
|
||||
@@ -3018,7 +3016,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Change user password
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/profile/login:
|
||||
post:
|
||||
consumes:
|
||||
@@ -3067,7 +3065,7 @@ paths:
|
||||
$ref: '#/definitions/response.APIResponse'
|
||||
summary: Authenticate user login
|
||||
tags:
|
||||
- Authorization
|
||||
- Admin-Authorization
|
||||
/admin/v1/profile/logout:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -3094,7 +3092,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Logout authenticated user
|
||||
tags:
|
||||
- Authorization
|
||||
- Admin-Authorization
|
||||
/admin/v1/profile/refresh-token:
|
||||
post:
|
||||
consumes:
|
||||
@@ -3139,7 +3137,7 @@ paths:
|
||||
$ref: '#/definitions/response.APIResponse'
|
||||
summary: Refresh access token
|
||||
tags:
|
||||
- Authorization
|
||||
- Admin-Authorization
|
||||
/admin/v1/profile/reset-password:
|
||||
post:
|
||||
consumes:
|
||||
@@ -3183,7 +3181,7 @@ paths:
|
||||
$ref: '#/definitions/response.APIResponse'
|
||||
summary: Initiate password reset process
|
||||
tags:
|
||||
- Authorization
|
||||
- Admin-Authorization
|
||||
/admin/v1/users:
|
||||
get:
|
||||
consumes:
|
||||
@@ -3254,7 +3252,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: List users
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -3310,7 +3308,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Create new user account
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/users/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -3353,7 +3351,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Delete user
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -3400,7 +3398,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get user by ID
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -3453,7 +3451,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update user
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/users/{id}/role:
|
||||
put:
|
||||
consumes:
|
||||
@@ -3502,7 +3500,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update user role
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/users/{id}/status:
|
||||
put:
|
||||
consumes:
|
||||
@@ -3551,7 +3549,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Update user status
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/users/company/{company_id}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -3604,7 +3602,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get users by company ID
|
||||
tags:
|
||||
- Users
|
||||
- Admin-Users
|
||||
/admin/v1/users/role/{role}:
|
||||
get:
|
||||
consumes:
|
||||
@@ -3657,8 +3655,8 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get users by role
|
||||
tags:
|
||||
- Users
|
||||
/api/v1/:
|
||||
- Admin-Users
|
||||
/api/v1/profile:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -3691,32 +3689,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customer profile
|
||||
tags:
|
||||
- Customers-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
|
||||
- Authorization
|
||||
/api/v1/profile/login:
|
||||
post:
|
||||
consumes:
|
||||
@@ -3760,7 +3733,32 @@ paths:
|
||||
$ref: '#/definitions/response.APIResponse'
|
||||
summary: Customer login
|
||||
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:
|
||||
post:
|
||||
consumes:
|
||||
@@ -3804,8 +3802,8 @@ paths:
|
||||
$ref: '#/definitions/response.APIResponse'
|
||||
summary: Refresh customer access token
|
||||
tags:
|
||||
- Customers-Authorization
|
||||
/api/v1/with-companies:
|
||||
- Authorization
|
||||
/api/v1/profile/with-companies:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -3839,7 +3837,7 @@ paths:
|
||||
- BearerAuth: []
|
||||
summary: Get customer profile with companies
|
||||
tags:
|
||||
- Customers-Authorization
|
||||
- Authorization
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
description: 'Type "Bearer" followed by a space and JWT token. Example: "Bearer
|
||||
@@ -3851,24 +3849,21 @@ swagger: "2.0"
|
||||
tags:
|
||||
- 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
|
||||
name: Authorization
|
||||
name: Admin-Authorization
|
||||
- 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
|
||||
name: Customers-Admin
|
||||
- description: Customer authentication and authorization operations for mobile application
|
||||
including login, logout, token refresh, and profile access
|
||||
name: Customers-Authorization
|
||||
name: Admin-Customers
|
||||
- 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
|
||||
- description: Company-related operations for mobile application including company
|
||||
lookup, search, and basic information retrieval
|
||||
name: Companies-Mobile
|
||||
name: Admin-Companies
|
||||
- description: Customer authentication and authorization operations for mobile application
|
||||
including login, logout, token refresh, and profile access
|
||||
name: Authorization
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// @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.
|
||||
// @Tags Health
|
||||
// @Tags Admin-Health
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} HealthResponse "System is healthy and operational"
|
||||
|
||||
+7
-10
@@ -20,26 +20,23 @@ package main
|
||||
// @name Authorization
|
||||
// @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.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.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.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.name Customers-Authorization
|
||||
// @tag.description Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access
|
||||
|
||||
// @tag.name Companies-Admin
|
||||
// @tag.name Admin-Companies
|
||||
// @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.description Company-related operations for mobile application including company lookup, search, and basic information retrieval
|
||||
// @tag.name Authorization
|
||||
// @tag.description Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
@@ -99,7 +99,7 @@ func RegisterPublicRoutes(e *echo.Echo, customerHandler *customer.Handler) {
|
||||
customerGP.POST("/login", customerHandler.Login)
|
||||
customerGP.POST("/refresh-token", customerHandler.RefreshToken)
|
||||
|
||||
profileGP := v1.Group("")
|
||||
profileGP := customerGP.Group("")
|
||||
profileGP.Use(customerHandler.AuthMiddleware())
|
||||
profileGP.GET("", customerHandler.GetProfile)
|
||||
profileGP.GET("/with-companies", customerHandler.GetProfileWithCompanies)
|
||||
|
||||
Reference in New Issue
Block a user