basePath: /api/v1 definitions: dto.AssignMenusToClientRequest: properties: menu_ids: items: type: string type: array required: - menu_ids type: object dto.MaintGroupCreateRequest: properties: client_id: type: string code: maxLength: 50 minLength: 2 type: string description: type: string maintenance_group_roles: items: $ref: '#/definitions/dto.MaintenanceGroupRole' type: array name: maxLength: 100 minLength: 2 type: string required: - client_id - code - maintenance_group_roles - name type: object dto.MaintGroupUpdateRequest: properties: client_id: type: string code: maxLength: 50 minLength: 2 type: string description: type: string maintenance_group_roles: items: $ref: '#/definitions/dto.MaintenanceGroupRoleUpdate' type: array name: maxLength: 100 minLength: 2 type: string type: object dto.MaintenanceGroupRole: properties: level: type: integer maintenance_group_role_users: items: $ref: '#/definitions/dto.MaintenanceGroupRoleUser' type: array role_id: type: string required: - level - maintenance_group_role_users - role_id type: object dto.MaintenanceGroupRoleUpdate: properties: id: type: string level: type: integer maintenance_group_role_users: items: $ref: '#/definitions/dto.MaintenanceGroupRoleUser' type: array role_id: type: string type: object dto.MaintenanceGroupRoleUser: properties: user_id: type: string required: - user_id type: object dto.MenuCreateRequest: properties: icon_url: maxLength: 100 minLength: 2 type: string mode: maxLength: 20 minLength: 8 type: string name: maxLength: 100 minLength: 2 type: string parent_id: type: string sequence: type: integer status: type: string table_name: maxLength: 10 type: string url: minLength: 8 type: string required: - mode - name - sequence - url type: object dto.MenuUpdateRequest: properties: icon_url: maxLength: 100 minLength: 2 type: string mode: maxLength: 20 minLength: 2 type: string name: maxLength: 100 minLength: 2 type: string parent_id: type: string sequence: type: integer status: type: string table_name: maxLength: 10 type: string url: minLength: 8 type: string type: object dto.RemoveMenusFromClientRequest: properties: menu_ids: items: type: string type: array required: - menu_ids type: object dto.SendVerificationEmailRequest: properties: email: type: string required: - email type: object dto.UserCreateRequest: properties: address: type: string client_id: type: string email: type: string gender: maxLength: 10 type: string location_id: type: string maintenance_group_user_id: type: string name: maxLength: 100 minLength: 2 type: string password: minLength: 8 type: string phone: maxLength: 20 minLength: 8 type: string photo_url: type: string username: maxLength: 100 minLength: 2 type: string required: - client_id - email - name - password - username type: object dto.UserLoginRequest: properties: email: type: string password: type: string required: - email - password type: object dto.UserUpdateRequest: properties: address: type: string client_id: type: string email: type: string gender: maxLength: 10 type: string location_id: type: string maintenance_group_user_id: type: string name: maxLength: 100 minLength: 2 type: string password: minLength: 8 type: string phone: maxLength: 20 minLength: 8 type: string photo_url: type: string username: maxLength: 100 minLength: 2 type: string type: object dto.VerifyEmailRequest: properties: token: type: string required: - token type: object utils.PaginationResponse: properties: max_page: type: integer page: type: integer per_page: type: integer total: type: integer type: object utils.Response: properties: data: {} error: {} message: type: string meta: {} status: type: boolean type: object utils.ResponseWithPagination: properties: code: type: integer data: {} message: type: string pagination: $ref: '#/definitions/utils.PaginationResponse' status: type: string type: object externalDocs: description: OpenAPI url: https://swagger.io/resources/open-api/ host: localhost:8888 info: contact: email: support@swagger.io name: API Support url: http://www.swagger.io/support description: This is a sample server celler server. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: http://swagger.io/terms/ title: WMS Wareify API Docs version: "1.0" paths: /auth/login: post: consumes: - application/json description: Authenticate user and return access & refresh tokens. parameters: - description: Login payload in: body name: body required: true schema: $ref: '#/definitions/dto.UserLoginRequest' produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object summary: User login tags: - Auth /auth/refresh: post: consumes: - application/json description: Exchange a refresh token for a new access token (and optionally a new refresh token). parameters: - description: Refresh token payload in: body name: request required: true schema: type: object produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object "401": description: Unauthorized schema: additionalProperties: true type: object summary: Refresh auth token tags: - Auth /clients: get: consumes: - application/json description: Get paginated list of clients with filtering and sorting capabilities parameters: - description: Filter by name (partial match) in: query name: name type: string - description: Filter by code (partial match) in: query name: code type: string - description: 'Page size (default: 10)' in: query name: per_page type: integer - description: 'Page number (default: 1)' in: query name: page type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.ResponseWithPagination' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Get list of clients tags: - Clients post: consumes: - multipart/form-data description: Create a new client with the provided information parameters: - description: Client name in: formData name: name required: true type: string - description: Client code in: formData name: code required: true type: string - description: Client logo (optional) in: formData name: logo type: file produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "500": description: Internal Server Error schema: $ref: '#/definitions/utils.Response' summary: Create a new client tags: - Clients /clients/{id}: delete: consumes: - application/json description: Delete a client by ID parameters: - description: Client ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "500": description: Internal Server Error schema: $ref: '#/definitions/utils.Response' summary: Delete client tags: - Clients get: consumes: - application/json description: Get detailed information of a specific client by their ID parameters: - description: Client ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "404": description: Not Found schema: $ref: '#/definitions/utils.Response' summary: Get client by ID tags: - Clients put: consumes: - multipart/form-data description: Update client information by ID parameters: - description: Client ID in: path name: id required: true type: string - description: Client name in: formData name: name type: string - description: Client code in: formData name: code type: string - description: Client logo (optional) in: formData name: logo type: file produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "500": description: Internal Server Error schema: $ref: '#/definitions/utils.Response' summary: Update client tags: - Clients /clients/{id}/assign-menus: post: consumes: - application/json description: Assign one or more menus to a client parameters: - description: Client ID in: path name: id required: true type: string - description: Menu assignment data in: body name: request required: true schema: $ref: '#/definitions/dto.AssignMenusToClientRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Assign menus to client tags: - Clients /clients/{id}/remove-menus: post: consumes: - application/json description: Remove one or more menus from a client parameters: - description: Client ID in: path name: id required: true type: string - description: Menu removal data in: body name: request required: true schema: $ref: '#/definitions/dto.RemoveMenusFromClientRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Remove menus from client tags: - Clients /example/helloworld: get: consumes: - application/json description: do ping produces: - application/json responses: "200": description: OK schema: type: string summary: ping example tags: - example /maintenance-groups: get: consumes: - application/json description: Get all maintenance groups produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/utils.Response' type: array "400": description: Bad Request schema: additionalProperties: true type: object summary: Get all maintenance groups tags: - MaintenanceGroup post: consumes: - application/json description: Create a new maintenance group parameters: - description: Create payload in: body name: body required: true schema: $ref: '#/definitions/dto.MaintGroupCreateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object summary: Create a new maintenance group tags: - MaintenanceGroup put: consumes: - application/json description: Update maintenance group parameters: - description: Update payload in: body name: body required: true schema: $ref: '#/definitions/dto.MaintGroupUpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object summary: Update maintenance group tags: - MaintenanceGroup /maintenance-groups/{id}: delete: consumes: - application/json description: Delete maintenance group parameters: - description: MaintenanceGroup ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object summary: Delete maintenance group tags: - MaintenanceGroup get: consumes: - application/json description: Get maintenance group by ID parameters: - description: MaintenanceGroup ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object summary: Get maintenance group by ID tags: - MaintenanceGroup /menus: get: consumes: - application/json description: Get paginated list of menus with filtering and sorting capabilities parameters: - description: Filter by name (partial match) in: query name: name type: string - description: Filter by parent menu ID in: query name: parent_id type: string - collectionFormat: csv description: Include related entities in: query items: type: string name: includes type: array - description: 'Page number (default: 1)' in: query name: page type: integer - description: 'Page size (default: 10)' in: query name: page_size type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.ResponseWithPagination' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Get list of menus tags: - Menus post: consumes: - application/json description: Create a new menu with the provided information parameters: - description: Menu creation data in: body name: request required: true schema: $ref: '#/definitions/dto.MenuCreateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Create a new menu tags: - Menus /menus/{id}: delete: consumes: - application/json description: Delete a menu by ID parameters: - description: Menu ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "404": description: Not Found schema: $ref: '#/definitions/utils.Response' summary: Delete menu tags: - Menus get: consumes: - application/json description: Get detailed information of a specific menu by its ID parameters: - description: Menu ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' "404": description: Not Found schema: $ref: '#/definitions/utils.Response' summary: Get menu by ID tags: - Menus put: consumes: - application/json description: Update menu information by ID parameters: - description: Menu ID in: path name: id required: true type: string - description: Menu update data in: body name: request required: true schema: $ref: '#/definitions/dto.MenuUpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Update menu tags: - Menus /menus/by-name: get: consumes: - application/json description: Get menu information by its name parameters: - description: Menu name in: query name: name required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: $ref: '#/definitions/utils.Response' summary: Get menu by name tags: - Menus /users: delete: consumes: - application/json description: Delete the authenticated user's account (soft/hard depends on implementation). produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object security: - ApiKeyAuth: [] summary: Delete current user tags: - Users get: consumes: - application/json description: Get paginated list of users for the current client. Supports filtering by name and including related roles. parameters: - description: Filter by name (partial match) in: query name: name type: string - description: 'Page number (default: 1)' in: query name: page type: integer - description: 'Page size (default: 10)' in: query name: page_size type: integer - description: Sort expression, e.g. created_at desc in: query name: sort type: string produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/utils.ResponseWithPagination' type: array "400": description: Bad Request schema: additionalProperties: true type: object security: - ApiKeyAuth: [] summary: Get list of users tags: - Users put: consumes: - application/json description: Update profile of the authenticated user. Use multipart/form-data if uploading files (photo). parameters: - description: Update payload in: body name: body required: true schema: $ref: '#/definitions/dto.UserUpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object security: - ApiKeyAuth: [] summary: Update current user tags: - Users /users/{id}: get: consumes: - application/json description: Get details of a user by their ID. Requires appropriate permissions. parameters: - description: User ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object security: - ApiKeyAuth: [] summary: Get user by ID tags: - Users /users/me: get: consumes: - application/json description: Return the authenticated user's profile. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object security: - ApiKeyAuth: [] summary: Get current user tags: - Users /users/register: post: consumes: - application/json description: Create a new user under the authenticated client. Validates input and returns created user. parameters: - description: Register payload in: body name: body required: true schema: $ref: '#/definitions/dto.UserCreateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Register a new user tags: - Users /users/send-verification-email: post: consumes: - application/json description: Send email with verification code/link to a user's email address. parameters: - description: Email request payload in: body name: body required: true schema: $ref: '#/definitions/dto.SendVerificationEmailRequest' produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object summary: Send verification email tags: - Users /users/verify-email: post: consumes: - application/json description: Verify a user's email using code or token sent via email. parameters: - description: Verify email payload in: body name: body required: true schema: $ref: '#/definitions/dto.VerifyEmailRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: additionalProperties: true type: object summary: Verify user email tags: - Users securityDefinitions: BearerAuth: description: Bearer token for authentication in: header name: Authorization type: apiKey swagger: "2.0"