diff --git a/openapi.yaml b/openapi.yaml index 4071b18a..c4e9e8fa 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -762,6 +762,23 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + put: + tags: + - Orders + summary: Update order (alias) + description: Update an existing order + operationId: updateOrders + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OrderUpdate' + responses: + '200': + description: Order updated successfully + '400': + $ref: '#/components/responses/BadRequest' /order: get: @@ -1066,6 +1083,36 @@ paths: responses: '201': description: Category added to department successfully + delete: + tags: + - Departments + summary: Remove category from department + operationId: removeDepartmentCategory + parameters: + - name: department_id + in: query + required: true + schema: {type: integer} + - name: category_id + in: query + required: true + schema: {type: integer} + responses: + '200': {description: Success} + + /departments/order/recommended: + get: + tags: + - Departments + summary: Get recommended order for department + operationId: getDepartmentRecommendedOrder + parameters: + - name: department_id + in: query + required: true + schema: {type: integer} + responses: + '200': {description: Success} /department/lanes: get: @@ -1198,6 +1245,11 @@ paths: schema: type: integer description: Get specific product by ID + - name: final_price + in: query + schema: + type: boolean + description: Whether to return final prices including discounts - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/PerPageParam' responses: @@ -1503,6 +1555,15 @@ paths: parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/PerPageParam' + - name: id + in: query + schema: {type: integer} + - name: reg + in: query + schema: {type: string} + - name: customer_id + in: query + schema: {type: integer} responses: '200': description: Vehicles retrieved successfully @@ -1512,6 +1573,57 @@ paths: type: array items: $ref: '#/components/schemas/Vehicle' + post: + tags: + - Vehicles + summary: Add vehicle + operationId: addVehicle + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [reg, customer_id] + properties: + reg: {type: string} + customer_id: {type: integer} + type: {type: integer} + reference: {type: string} + responses: + '200': {description: Success} + put: + tags: + - Vehicles + summary: Edit vehicle + operationId: editVehicle + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [id] + properties: + id: {type: integer} + reg: {type: string} + customer_id: {type: integer} + type: {type: integer} + reference: {type: string} + responses: + '200': {description: Success} + delete: + tags: + - Vehicles + summary: Delete vehicle + operationId: deleteVehicle + parameters: + - name: id + in: query + required: true + schema: {type: integer} + responses: + '200': {description: Success} /vehicles/addons/available: get: @@ -1553,6 +1665,104 @@ paths: '200': description: Vehicle addon toggled successfully + /department/vehicles/unknown-customer: + get: + tags: + - Vehicles + summary: Get unknown customer vehicles in department + operationId: getUnknownCustomerVehicles + responses: + '200': {description: Success} + + /department/vehicle/customer-suggestions: + get: + tags: + - Vehicles + summary: Get vehicle customer suggestions + operationId: getVehicleCustomerSuggestions + parameters: + - name: reg + in: query + required: true + schema: {type: string} + responses: + '200': {description: Success} + + /vehicles/set-auto-start-on-lpr: + post: + tags: + - Vehicles + summary: Set auto start on LPR + operationId: setVehicleAutoStartOnLpr + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [reg, auto_start_on_lpr] + properties: + reg: {type: string} + auto_start_on_lpr: {type: boolean} + responses: + '200': {description: Success} + + /vehicles/set-vehicle-type-id: + post: + tags: + - Vehicles + summary: Set vehicle type ID + operationId: setVehicleTypeId + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [reg, vehicle_type_id] + properties: + reg: {type: string} + vehicle_type_id: {type: integer} + responses: + '200': {description: Success} + + /superuser/users-with-vehicle-subscriptions: + get: + tags: + - Vehicles + summary: Get users with vehicle subscriptions + operationId: getUsersWithVehicleSubscriptions + responses: + '200': {description: Success} + + /vehicles/status: + get: + tags: + - Vehicles + summary: Get vehicle status + operationId: getVehicleStatus + parameters: + - name: reg + in: query + required: true + schema: {type: string} + responses: + '200': {description: Success} + + /vehicles/search: + get: + tags: + - Vehicles + summary: Search vehicles + operationId: searchVehicles + parameters: + - name: search + in: query + required: true + schema: {type: string} + responses: + '200': {description: Success} + # Notifications Endpoints /notifications: get: @@ -1682,6 +1892,42 @@ paths: '200': description: This year's income statistics retrieved successfully + /statistics/income/departments: + get: + tags: + - Statistics + summary: Get total income today by departments + operationId: getTotalIncomeTodayByDepartments + responses: + '200': {description: Success} + + /statistics/economic/totals: + get: + tags: + - Statistics + summary: Get total economic statistics + operationId: getEconomicTotals + responses: + '200': {description: Success} + + /statistics/economic/totals/department_sent_invoice_totals: + get: + tags: + - Statistics + summary: Get department sent invoice totals + operationId: getDepartmentSentInvoiceTotals + responses: + '200': {description: Success} + + /statistics/economic/totals/department_draft_invoice_totals: + get: + tags: + - Statistics + summary: Get department draft invoice totals + operationId: getDepartmentDraftInvoiceTotals + responses: + '200': {description: Success} + # Worker Endpoints /worker/version: get: