diff --git a/docs/swagger/swagger-spec.json b/docs/swagger/swagger-spec.json new file mode 100644 index 0000000..4033b53 --- /dev/null +++ b/docs/swagger/swagger-spec.json @@ -0,0 +1,814 @@ +{ + "openapi": "3.0.0", + "paths": { + "/auth/v1/login": { + "get": { + "operationId": "AuthController_login", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Auth" + ] + } + }, + "/auth/callback": { + "get": { + "operationId": "AuthController_loginCallback", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Auth" + ] + } + }, + "/auth/me": { + "get": { + "operationId": "AuthController_getProfile", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Auth" + ] + } + }, + "/notifications/summary": { + "get": { + "operationId": "NotificationsController_summary", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Notifications" + ] + } + }, + "/notifications/stream": { + "get": { + "operationId": "NotificationsController_stream", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Notifications" + ] + } + }, + "/timesheets/{year}/{period_number}": { + "get": { + "operationId": "TimesheetController_getTimesheetByPayPeriod", + "parameters": [ + { + "name": "year", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "period_number", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "employee_email", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Timesheet" + ] + } + }, + "/timesheets/timesheet-approval": { + "patch": { + "operationId": "TimesheetController_approveTimesheet", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Timesheet" + ] + } + }, + "/shift/create": { + "post": { + "operationId": "ShiftController_createBatch", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "Shift" + ] + } + }, + "/shift/update": { + "patch": { + "operationId": "ShiftController_updateBatch", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Shift" + ] + } + }, + "/shift/{shift_id}": { + "delete": { + "operationId": "ShiftController_remove", + "parameters": [ + { + "name": "shift_id", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Shift" + ] + } + }, + "/schedule-presets/find-list": { + "get": { + "operationId": "SchedulePresetsController_findListById", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "SchedulePresets" + ] + } + }, + "/schedule-presets/create": { + "post": { + "operationId": "SchedulePresetsController_createPreset", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulePresetsDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "SchedulePresets" + ] + } + }, + "/schedule-presets/update": { + "patch": { + "operationId": "SchedulePresetsController_updatePreset", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulePresetsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "SchedulePresets" + ] + } + }, + "/schedule-presets/delete/{id}": { + "delete": { + "operationId": "SchedulePresetsController_deletePreset", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "SchedulePresets" + ] + } + }, + "/expense/create": { + "post": { + "operationId": "ExpenseController_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExpenseDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "Expense" + ] + } + }, + "/expense/update": { + "patch": { + "operationId": "ExpenseController_update", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExpenseDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Expense" + ] + } + }, + "/expense/delete/{expense_id}": { + "delete": { + "operationId": "ExpenseController_remove", + "parameters": [ + { + "name": "expense_id", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Expense" + ] + } + }, + "/pay-periods/current-and-all": { + "get": { + "operationId": "PayPeriodsController_getCurrentAndAll", + "parameters": [ + { + "name": "date", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/pay-periods/date/{date}": { + "get": { + "operationId": "PayPeriodsController_findByDate", + "parameters": [ + { + "name": "date", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/pay-periods/{year}/{periodNumber}": { + "get": { + "operationId": "PayPeriodsController_findOneByYear", + "parameters": [ + { + "name": "year", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "periodNumber", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/pay-periods/crew/pay-period-approval": { + "patch": { + "operationId": "PayPeriodsController_bulkApproval", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkCrewApprovalDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/pay-periods/crew/{year}/{periodNumber}": { + "get": { + "operationId": "PayPeriodsController_getCrewOverview", + "parameters": [ + { + "name": "year", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "periodNumber", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/pay-periods/overview/{year}/{periodNumber}": { + "get": { + "operationId": "PayPeriodsController_getOverviewByYear", + "parameters": [ + { + "name": "year", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "periodNumber", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "PayPeriods" + ] + } + }, + "/exports/csv": { + "get": { + "operationId": "CsvExportController_exportCsv", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "CsvExport" + ] + } + }, + "/employees/personal-profile": { + "get": { + "operationId": "EmployeesController_findOwnProfile", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Employees" + ] + } + }, + "/employees/profile": { + "get": { + "operationId": "EmployeesController_findProfile", + "parameters": [ + { + "name": "employee_email", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Employees" + ] + } + }, + "/employees/employee-list": { + "get": { + "operationId": "EmployeesController_findListEmployees", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Employees" + ] + } + }, + "/employees/create": { + "post": { + "operationId": "EmployeesController_createEmployee", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeDetailedDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "Employees" + ] + } + }, + "/employees/update": { + "patch": { + "operationId": "EmployeesController_updateEmployee", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeDetailedDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Employees" + ] + } + }, + "/preferences/update": { + "patch": { + "operationId": "PreferencesController_updatePreferences", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreferencesDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Preferences" + ] + } + }, + "/preferences": { + "get": { + "operationId": "PreferencesController_findPreferences", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Preferences" + ] + } + }, + "/module_access": { + "get": { + "operationId": "ModuleAccessController_findAccess", + "parameters": [ + { + "name": "employee_email", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "ModuleAccess" + ] + } + }, + "/module_access/update": { + "patch": { + "operationId": "ModuleAccessController_updateAccess", + "parameters": [ + { + "name": "employee_email", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModuleAccess" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "ModuleAccess" + ] + } + } + }, + "info": { + "title": "Targo_Backend", + "description": "Documentation de l`API REST pour Targo (NestJS + Prisma)", + "version": "1.0", + "contact": {} + }, + "tags": [ + { + "name": "Users", + "description": "" + }, + { + "name": "Employees", + "description": "" + }, + { + "name": "Customers", + "description": "" + }, + { + "name": "Timesheets", + "description": "" + }, + { + "name": "Shifts", + "description": "" + }, + { + "name": "Leave Requests", + "description": "" + }, + { + "name": "Shift Codes", + "description": "" + }, + { + "name": "OAuth Access Tokens", + "description": "" + }, + { + "name": "Authorization", + "description": "" + } + ], + "servers": [], + "components": { + "securitySchemes": { + "access-token": { + "scheme": "bearer", + "bearerFormat": "JWT", + "type": "http", + "name": "Authorization", + "description": "Invalid JWT token", + "in": "header" + } + }, + "schemas": { + "SchedulePresetsDto": { + "type": "object", + "properties": {} + }, + "ExpenseDto": { + "type": "object", + "properties": {} + }, + "BulkCrewApprovalDto": { + "type": "object", + "properties": {} + }, + "EmployeeDetailedDto": { + "type": "object", + "properties": {} + }, + "PreferencesDto": { + "type": "object", + "properties": {} + }, + "ModuleAccess": { + "type": "object", + "properties": {} + } + } + } +} \ No newline at end of file