{ "openapi": "3.0.0", "paths": { "/": { "get": { "operationId": "AppController_getHello", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "App" ] } }, "/health": { "get": { "operationId": "HealthController_check", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Health" ] } }, "/archives/employees": { "get": { "operationId": "EmployeesArchiveController_findOneArchived", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Archived employee found" } }, "summary": "Fetch employee in archives with its Id", "tags": [ "Employee Archives" ] } }, "/archives/expenses": { "get": { "operationId": "ExpensesArchiveController_findOneArchived", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Archived expense found" } }, "summary": "Fetch expense in archives with its Id", "tags": [ "Expense Archives" ] } }, "/archives/shifts": { "get": { "operationId": "ShiftsArchiveController_findOneArchived", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Archived shift found" } }, "summary": "Fetch shift in archives with its Id", "tags": [ "Shift Archives" ] } }, "/archives/timesheets": { "get": { "operationId": "TimesheetsArchiveController_findOneArchived", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Archived timesheet found" } }, "summary": "Fetch timesheet in archives with its Id", "tags": [ "Timesheet Archives" ] } }, "/employees": { "post": { "operationId": "EmployeesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } }, "responses": { "201": { "description": "Employee created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } }, "400": { "description": "Incomplete task or invalid data" } }, "security": [ { "access-token": [] } ], "summary": "Create employee", "tags": [ "Employees" ] }, "get": { "operationId": "EmployeesController_findAll", "parameters": [], "responses": { "200": { "description": "List of employees found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } } }, "400": { "description": "List of employees not found" } }, "security": [ { "access-token": [] } ], "summary": "Find all employees", "tags": [ "Employees" ] } }, "/employees/employee-list": { "get": { "operationId": "EmployeesController_findListEmployees", "parameters": [], "responses": { "200": { "description": "List of employees with scoped info found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeeListItemDto" } } } } }, "400": { "description": "List of employees with scoped info not found" } }, "security": [ { "access-token": [] } ], "summary": "Find all employees with scoped info", "tags": [ "Employees" ] } }, "/employees/{email}": { "get": { "operationId": "EmployeesController_findOne", "parameters": [ { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Employee found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } }, "400": { "description": "Employee not found" } }, "security": [ { "access-token": [] } ], "summary": "Find employee", "tags": [ "Employees" ] }, "delete": { "operationId": "EmployeesController_remove", "parameters": [ { "name": "email", "required": true, "in": "path", "description": "Email of the employee to delete", "schema": { "type": "number" } } ], "responses": { "204": { "description": "Employee deleted" }, "404": { "description": "Employee not found" } }, "security": [ { "access-token": [] } ], "summary": "Delete employee", "tags": [ "Employees" ] }, "patch": { "operationId": "EmployeesController_updateOrArchiveOrRestore", "parameters": [ { "name": "email", "required": true, "in": "path", "description": "Email of the employee", "schema": { "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEmployeeDto" } } } }, "responses": { "200": { "description": "Employee updated or restored", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } }, "202": { "description": "Employee archived successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmployeeDto" } } } }, "404": { "description": "Employee not found in active or archive" } }, "security": [ { "access-token": [] }, { "access-token": [] } ], "summary": "Update, archive or restore an employee", "tags": [ "Employees" ] } }, "/employees/profile/{email}": { "get": { "operationId": "EmployeesController_findOneProfile", "parameters": [ { "name": "email", "required": true, "in": "path", "description": "Identifier of the employee", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Employee profile found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmployeeProfileItemDto" } } } }, "400": { "description": "Employee profile not found" } }, "security": [ { "access-token": [] } ], "summary": "Find employee profile", "tags": [ "Employees" ] } }, "/timesheets": { "get": { "operationId": "TimesheetsController_getPeriodByQuery", "parameters": [ { "name": "year", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "period_no", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "email", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Timesheets" ] } }, "/timesheets/{email}": { "get": { "operationId": "TimesheetsController_getByEmail", "parameters": [ { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Timesheets" ] } }, "/timesheets/shifts/{email}": { "post": { "operationId": "TimesheetsController_createTimesheetShifts", "parameters": [ { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWeekShiftsDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Timesheets" ] } }, "/timesheets/{id}": { "get": { "operationId": "TimesheetsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Timesheet found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTimesheetDto" } } } }, "400": { "description": "Timesheet not found" } }, "security": [ { "access-token": [] } ], "summary": "Find timesheet", "tags": [ "Timesheets" ] }, "delete": { "operationId": "TimesheetsController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Timesheet deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTimesheetDto" } } } }, "400": { "description": "Timesheet not found" } }, "security": [ { "access-token": [] } ], "summary": "Delete timesheet", "tags": [ "Timesheets" ] } }, "/timesheets/approval/{id}": { "patch": { "operationId": "TimesheetsController_approve", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Timesheets" ] } }, "/Expenses/upsert/{email}/{date}": { "put": { "operationId": "ExpensesController_upsert_by_date", "parameters": [ { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "date", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertExpenseDto" } } } }, "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Expenses" ] } }, "/Expenses": { "post": { "operationId": "ExpensesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExpenseDto" } } } }, "responses": { "201": { "description": "Expense created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExpenseDto" } } } }, "400": { "description": "Incomplete task or invalid data" } }, "security": [ { "access-token": [] } ], "summary": "Create expense", "tags": [ "Expenses" ] }, "get": { "operationId": "ExpensesController_findAll", "parameters": [], "responses": { "201": { "description": "List of expenses found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateExpenseDto" } } } } }, "400": { "description": "List of expenses not found" } }, "security": [ { "access-token": [] } ], "summary": "Find all expenses", "tags": [ "Expenses" ] } }, "/Expenses/{id}": { "get": { "operationId": "ExpensesController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Expense found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExpenseDto" } } } }, "400": { "description": "Expense not found" } }, "security": [ { "access-token": [] } ], "summary": "Find expense", "tags": [ "Expenses" ] }, "patch": { "operationId": "ExpensesController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateExpenseDto" } } } }, "responses": { "201": { "description": "Expense updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExpenseDto" } } } }, "400": { "description": "Expense not found" } }, "security": [ { "access-token": [] } ], "summary": "Expense shift", "tags": [ "Expenses" ] }, "delete": { "operationId": "ExpensesController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Expense deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExpenseDto" } } } }, "400": { "description": "Expense not found" } }, "security": [ { "access-token": [] } ], "summary": "Delete expense", "tags": [ "Expenses" ] } }, "/Expenses/approval/{id}": { "patch": { "operationId": "ExpensesController_approve", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Expenses" ] } }, "/shifts/upsert/{email}/{date}": { "put": { "operationId": "ShiftsController_upsert_by_date", "parameters": [ { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "date", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertShiftDto" } } } }, "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Shifts" ] } }, "/shifts": { "post": { "operationId": "ShiftsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShiftDto" } } } }, "responses": { "201": { "description": "Shift created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShiftDto" } } } }, "400": { "description": "Incomplete task or invalid data" } }, "security": [ { "access-token": [] } ], "summary": "Create shift", "tags": [ "Shifts" ] }, "get": { "operationId": "ShiftsController_findAll", "parameters": [], "responses": { "201": { "description": "List of shifts found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateShiftDto" } } } } }, "400": { "description": "List of shifts not found" } }, "security": [ { "access-token": [] } ], "summary": "Find all shifts", "tags": [ "Shifts" ] } }, "/shifts/{id}": { "get": { "operationId": "ShiftsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Shift found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShiftDto" } } } }, "400": { "description": "Shift not found" } }, "security": [ { "access-token": [] } ], "summary": "Find shift", "tags": [ "Shifts" ] }, "patch": { "operationId": "ShiftsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateShiftsDto" } } } }, "responses": { "201": { "description": "Shift updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShiftDto" } } } }, "400": { "description": "Shift not found" } }, "security": [ { "access-token": [] } ], "summary": "Update shift", "tags": [ "Shifts" ] }, "delete": { "operationId": "ShiftsController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Shift deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShiftDto" } } } }, "400": { "description": "Shift not found" } }, "security": [ { "access-token": [] } ], "summary": "Delete shift", "tags": [ "Shifts" ] } }, "/shifts/approval/{id}": { "patch": { "operationId": "ShiftsController_approve", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Shifts" ] } }, "/shifts/summary": { "get": { "operationId": "ShiftsController_getSummary", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Shifts" ] } }, "/shifts/export.csv": { "get": { "operationId": "ShiftsController_exportCsv", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Shifts" ] } }, "/notifications/summary": { "get": { "operationId": "NotificationsController_summary", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Notifications" ] } }, "/notifications/stream": { "get": { "operationId": "NotificationsController_stream", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Notifications" ] } }, "/leave-requests/holiday": { "post": { "operationId": "LeaveRequestController_upsertHoliday", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertHolidayDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "access-token": [] } ], "tags": [ "Leave Requests" ] } }, "/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" ] } }, "/bank-codes": { "post": { "operationId": "BankCodesControllers_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBankCodeDto" } } } }, "responses": { "201": { "description": "Bank code successfully created." }, "400": { "description": "Invalid input data." } }, "summary": "Create a new bank code", "tags": [ "BankCodesControllers" ] }, "get": { "operationId": "BankCodesControllers_findAll", "parameters": [], "responses": { "200": { "description": "List of bank codes." } }, "summary": "Retrieve all bank codes", "tags": [ "BankCodesControllers" ] } }, "/bank-codes/{id}": { "get": { "operationId": "BankCodesControllers_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "404": { "description": "Bank code not found." } }, "summary": "Retrieve a bank code by its ID", "tags": [ "BankCodesControllers" ] }, "patch": { "operationId": "BankCodesControllers_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBankCodeDto" } } } }, "responses": { "404": { "description": "Bank code not found." } }, "summary": "Update an existing bank code", "tags": [ "BankCodesControllers" ] }, "delete": { "operationId": "BankCodesControllers_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "404": { "description": "Bank code not found." } }, "summary": "Delete a bank code", "tags": [ "BankCodesControllers" ] } }, "/customers": { "post": { "operationId": "CustomersController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerDto" } } } }, "responses": { "201": { "description": "Customer created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerDto" } } } }, "400": { "description": "Invalid task or invalid data" } }, "security": [ { "access-token": [] } ], "summary": "Create customer", "tags": [ "Customers" ] }, "get": { "operationId": "CustomersController_findAll", "parameters": [], "responses": { "201": { "description": "List of customers found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateCustomerDto" } } } } }, "400": { "description": "List of customers not found" } }, "security": [ { "access-token": [] } ], "summary": "Find all customers", "tags": [ "Customers" ] } }, "/customers/{id}": { "get": { "operationId": "CustomersController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Customer found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerDto" } } } }, "400": { "description": "Customer not found" } }, "security": [ { "access-token": [] } ], "summary": "Find customer", "tags": [ "Customers" ] }, "patch": { "operationId": "CustomersController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCustomerDto" } } } }, "responses": { "201": { "description": "Customer updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerDto" } } } }, "400": { "description": "Customer not found" } }, "security": [ { "access-token": [] } ], "summary": "Update customer", "tags": [ "Customers" ] }, "delete": { "operationId": "CustomersController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "Customer deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerDto" } } } }, "400": { "description": "Customer not found" } }, "security": [ { "access-token": [] } ], "summary": "Delete customer", "tags": [ "Customers" ] } }, "/oauth-sessions": { "post": { "operationId": "OauthSessionsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } }, "responses": { "201": { "description": "OAuth session created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } }, "400": { "description": "Incomplete task or invalid data" } }, "security": [ { "sessions": [] } ], "summary": "Create OAuth session", "tags": [ "OAuth Sessions" ] }, "get": { "operationId": "OauthSessionsController_findAll", "parameters": [], "responses": { "201": { "description": "List of OAuth session found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } } }, "400": { "description": "List of OAuth session not found" } }, "security": [ { "sessions": [] } ], "summary": "Find all OAuth session", "tags": [ "OAuth Sessions" ] } }, "/oauth-sessions/{id}": { "get": { "operationId": "OauthSessionsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "OAuth session found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } }, "400": { "description": "OAuth session not found" } }, "security": [ { "sessions": [] } ], "summary": "Find OAuth session", "tags": [ "OAuth Sessions" ] }, "patch": { "operationId": "OauthSessionsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOauthSessionDto" } } } }, "responses": { "201": { "description": "OAuth session updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } }, "400": { "description": "OAuth session not found" } }, "security": [ { "sessions": [] } ], "summary": "Update OAuth session", "tags": [ "OAuth Sessions" ] }, "delete": { "operationId": "OauthSessionsController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "OAuth session deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOauthSessionDto" } } } }, "400": { "description": "OAuth session not found" } }, "security": [ { "sessions": [] } ], "summary": "Delete OAuth session", "tags": [ "OAuth Sessions" ] } }, "/pay-periods": { "get": { "operationId": "PayPeriodsController_findAll", "parameters": [], "responses": { "200": { "description": "List of pay period found", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayPeriodDto" } } } } } }, "summary": "Find all pay period", "tags": [ "pay-periods" ] } }, "/pay-periods/current-and-all": { "get": { "operationId": "PayPeriodsController_getCurrentAndAll", "parameters": [ { "name": "date", "required": false, "in": "query", "description": "Override for resolving the current period", "schema": { "example": "2025-08-11", "type": "string" } } ], "responses": { "200": { "description": "Find current and all pay periods", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPeriodBundleDto" } } } } }, "summary": "Return current pay period and the full list", "tags": [ "pay-periods" ] } }, "/pay-periods/date/{date}": { "get": { "operationId": "PayPeriodsController_findByDate", "parameters": [ { "name": "date", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pay period found for the selected date", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPeriodDto" } } } }, "404": { "description": "Pay period not found for the selected date" } }, "summary": "Resolve a period by a date within it", "tags": [ "pay-periods" ] } }, "/pay-periods/{year}/{periodNumber}": { "get": { "operationId": "PayPeriodsController_findOneByYear", "parameters": [ { "name": "year", "required": true, "in": "path", "schema": { "example": 2024, "type": "number" } }, { "name": "periodNumber", "required": true, "in": "path", "description": "1..26", "schema": { "example": 1, "type": "number" } } ], "responses": { "200": { "description": "Pay period found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPeriodDto" } } } }, "404": { "description": "Pay period not found" } }, "summary": "Find pay period by year and period number", "tags": [ "pay-periods" ] } }, "/pay-periods/crew/bulk-approval": { "patch": { "operationId": "PayPeriodsController_bulkApproval", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkCrewApprovalDto" } } } }, "responses": { "200": { "description": "Pay period approved" } }, "summary": "Approve all selected timesheets in the period", "tags": [ "pay-periods" ] } }, "/pay-periods/{year}/{periodNumber}/{email}": { "get": { "operationId": "PayPeriodsController_getCrewOverview", "parameters": [ { "name": "year", "required": true, "in": "path", "schema": { "example": 2024, "type": "number" } }, { "name": "periodNumber", "required": true, "in": "path", "description": "1..26", "schema": { "example": 1, "type": "number" } }, { "name": "email", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "includeSubtree", "required": false, "in": "query", "description": "Include indirect reports", "schema": { "example": false, "type": "boolean" } } ], "responses": { "200": { "description": "Crew overview", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPeriodOverviewDto" } } } }, "404": { "description": "Pay period not found" } }, "summary": "Supervisor crew overview for a given pay period", "tags": [ "pay-periods" ] } }, "/pay-periods/overview/{year}/{periodNumber}": { "get": { "operationId": "PayPeriodsController_getOverviewByYear", "parameters": [ { "name": "year", "required": true, "in": "path", "schema": { "example": 2024, "type": "number" } }, { "name": "periodNumber", "required": true, "in": "path", "description": "1..26", "schema": { "example": 1, "type": "number" } } ], "responses": { "200": { "description": "Pay period overview found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPeriodOverviewDto" } } } }, "404": { "description": "Pay period not found" } }, "summary": "Detailed view of a pay period by year + number", "tags": [ "pay-periods" ] } } }, "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": { "CreateEmployeeDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of an employee(primary-key, auto-incremented)" }, "user_id": { "type": "string", "example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d", "description": "UUID of the user linked to that employee" }, "first_name": { "type": "string", "example": "Frodo", "description": "Employee`s first name" }, "last_name": { "type": "string", "example": "Baggins", "description": "Employee`s last name" }, "email": { "type": "string", "example": "i_cant_do_this_sam@targointernet.com", "description": "Employee`s email" }, "phone_number": { "type": "string", "example": "82538437464", "description": "Employee`s phone number" }, "residence": { "type": "string", "example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth", "description": "Employee`s residence" }, "external_payroll_id": { "type": "number", "example": 7464, "description": "external ID for the pay system" }, "company_code": { "type": "number", "example": 335567447, "description": "Employee`s company code" }, "job_title": { "type": "string", "example": "technicient", "description": "employee`s job title" }, "first_work_day": { "type": "string", "example": "23/09/3018", "description": "Employee`s first working day" }, "last_work_day": { "type": "string", "example": "25/03/3019", "description": "Employee`s last working day" } }, "required": [ "id", "user_id", "first_name", "last_name", "email", "phone_number", "external_payroll_id", "company_code", "job_title", "first_work_day" ] }, "EmployeeListItemDto": { "type": "object", "properties": {} }, "EmployeeProfileItemDto": { "type": "object", "properties": {} }, "UpdateEmployeeDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of an employee(primary-key, auto-incremented)" }, "user_id": { "type": "string", "example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d", "description": "UUID of the user linked to that employee" }, "first_name": { "type": "string", "example": "Frodo", "description": "Employee`s first name" }, "last_name": { "type": "string", "example": "Baggins", "description": "Employee`s last name" }, "email": { "type": "string", "example": "i_cant_do_this_sam@targointernet.com", "description": "Employee`s email" }, "phone_number": { "type": "string", "example": "82538437464", "description": "Employee`s phone number" }, "residence": { "type": "string", "example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth", "description": "Employee`s residence" }, "external_payroll_id": { "type": "number", "example": 7464, "description": "external ID for the pay system" }, "company_code": { "type": "number", "example": 335567447, "description": "Employee`s company code" }, "job_title": { "type": "string", "example": "technicient", "description": "employee`s job title" }, "first_work_day": { "format": "date-time", "type": "string", "example": "23/09/3018", "description": "New hire date or undefined" }, "last_work_day": { "format": "date-time", "type": "string", "example": "25/03/3019", "description": "Termination date (null to restore)" }, "supervisor_id": { "type": "number", "description": "Supervisor ID" } } }, "CreateWeekShiftsDto": { "type": "object", "properties": {} }, "CreateTimesheetDto": { "type": "object", "properties": {} }, "UpsertExpenseDto": { "type": "object", "properties": {} }, "CreateExpenseDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of the expense (auto-generated)" }, "timesheet_id": { "type": "number", "example": 101, "description": "ID number for a set timesheet" }, "bank_code_id": { "type": "number", "example": 7, "description": "ID number of an bank code (link with bank-codes)" }, "date": { "type": "string", "example": "3018-10-20T00:00:00.000Z", "description": "Date where the expense was made" }, "amount": { "type": "number", "example": 17.82, "description": "amount in $ for a refund" }, "comment": { "type": "string", "example": "Spent for mileage between A and B", "description": "explain`s why the expense was made" }, "is_approved": { "type": "boolean", "example": "DENIED, APPROUVED, PENDING, etc...", "description": "validation status" }, "supervisor_comment": { "type": "string", "example": "Asked X to go there as an emergency response", "description": "Supervisro`s justification for the spending of an employee" } }, "required": [ "id", "timesheet_id", "bank_code_id", "date", "amount", "comment", "is_approved", "supervisor_comment" ] }, "UpdateExpenseDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of the expense (auto-generated)" }, "timesheet_id": { "type": "number", "example": 101, "description": "ID number for a set timesheet" }, "bank_code_id": { "type": "number", "example": 7, "description": "ID number of an bank code (link with bank-codes)" }, "date": { "type": "string", "example": "3018-10-20T00:00:00.000Z", "description": "Date where the expense was made" }, "amount": { "type": "number", "example": 17.82, "description": "amount in $ for a refund" }, "comment": { "type": "string", "example": "Spent for mileage between A and B", "description": "explain`s why the expense was made" }, "is_approved": { "type": "boolean", "example": "DENIED, APPROUVED, PENDING, etc...", "description": "validation status" }, "supervisor_comment": { "type": "string", "example": "Asked X to go there as an emergency response", "description": "Supervisro`s justification for the spending of an employee" } } }, "UpsertShiftDto": { "type": "object", "properties": {} }, "CreateShiftDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of the shift (auto-generated)" }, "timesheet_id": { "type": "number", "example": 101, "description": "ID number for a set timesheet" }, "bank_code_id": { "type": "number", "example": 7, "description": "ID number of a shift code (link with bank-codes)" }, "date": { "type": "string", "example": "3018-10-20T00:00:00.000Z", "description": "Date where the shift takes place" }, "start_time": { "type": "string", "example": "3018-10-20T08:00:00.000Z", "description": "Start time of the said shift" }, "end_time": { "type": "string", "example": "3018-10-20T17:00:00.000Z", "description": "End time of the said shift" } }, "required": [ "id", "timesheet_id", "bank_code_id", "date", "start_time", "end_time" ] }, "UpdateShiftsDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of the shift (auto-generated)" }, "timesheet_id": { "type": "number", "example": 101, "description": "ID number for a set timesheet" }, "bank_code_id": { "type": "number", "example": 7, "description": "ID number of a shift code (link with bank-codes)" }, "date": { "type": "string", "example": "3018-10-20T00:00:00.000Z", "description": "Date where the shift takes place" }, "start_time": { "type": "string", "example": "3018-10-20T08:00:00.000Z", "description": "Start time of the said shift" }, "end_time": { "type": "string", "example": "3018-10-20T17:00:00.000Z", "description": "End time of the said shift" } } }, "UpsertHolidayDto": { "type": "object", "properties": {} }, "CreateBankCodeDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of a bank-code (auto-generated)", "readOnly": true }, "type": { "type": "string", "example": "regular, vacation, emergency, sick, parental, etc", "description": "Type of codes" }, "categorie": { "type": "string", "example": "shift, expense, leave", "description": "categorie of the related code" }, "modifier": { "type": "number", "example": "0, 0.72, 1, 1.5, 2", "description": "modifier number to apply to salary" }, "bank_code": { "type": "string", "example": "G1, G345, G501, G43, G700", "description": "codes given by the bank" } }, "required": [ "id", "type", "categorie", "modifier", "bank_code" ] }, "UpdateBankCodeDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of a bank-code (auto-generated)", "readOnly": true }, "type": { "type": "string", "example": "regular, vacation, emergency, sick, parental, etc", "description": "Type of codes" }, "categorie": { "type": "string", "example": "shift, expense, leave", "description": "categorie of the related code" }, "modifier": { "type": "number", "example": "0, 0.72, 1, 1.5, 2", "description": "modifier number to apply to salary" }, "bank_code": { "type": "string", "example": "G1, G345, G501, G43, G700", "description": "codes given by the bank" } } }, "CreateCustomerDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of a customer(primary-key, auto-incremented)" }, "user_id": { "type": "string", "example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d", "description": "UUID of the user linked to that customer" }, "first_name": { "type": "string", "example": "Gandalf", "description": "Customer`s first name" }, "last_name": { "type": "string", "example": "TheGray", "description": "Customer`s last name" }, "email": { "type": "string", "example": "you_shall_not_pass@middleEarth.com", "description": "Customer`s email" }, "phone_number": { "type": "string", "example": "8436637464", "description": "Customer`s phone number" }, "residence": { "type": "string", "example": "1 Ringbearer`s way, Mount Doom city, ME, T1R 1N6 ", "description": "Customer`s residence" }, "invoice_id": { "type": "number", "example": "4263253", "description": "Customer`s invoice number" } }, "required": [ "id", "user_id", "first_name", "last_name", "email", "phone_number" ] }, "UpdateCustomerDto": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "description": "Unique ID of a customer(primary-key, auto-incremented)" }, "user_id": { "type": "string", "example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d", "description": "UUID of the user linked to that customer" }, "first_name": { "type": "string", "example": "Gandalf", "description": "Customer`s first name" }, "last_name": { "type": "string", "example": "TheGray", "description": "Customer`s last name" }, "email": { "type": "string", "example": "you_shall_not_pass@middleEarth.com", "description": "Customer`s email" }, "phone_number": { "type": "string", "example": "8436637464", "description": "Customer`s phone number" }, "residence": { "type": "string", "example": "1 Ringbearer`s way, Mount Doom city, ME, T1R 1N6 ", "description": "Customer`s residence" }, "invoice_id": { "type": "number", "example": "4263253", "description": "Customer`s invoice number" } } }, "CreateOauthSessionDto": { "type": "object", "properties": { "id": { "type": "string", "example": "cklwi0vb70000z2z20q6f19qk", "description": "Unique ID of an OAuth token (auto-generated)" }, "user_id": { "type": "string", "example": "S7A2U8R7O6N6", "description": "User`s unique identification number" }, "application": { "type": "string", "example": "app.targo.ca", "description": "URL in which the access token is used for" }, "access_token": { "type": "string", "example": "L5O6R4D3/O6F3#T8H4E3&R6I4N6G4S7 ...", "description": "Access token" }, "refresh_token": { "type": "string", "example": "Th3731102h1p07Th3R1n92", "description": "Refresh token" }, "access_token_expiry": { "format": "date-time", "type": "string", "example": "25/12/3018", "description": "Access token`s expiry date" }, "refresh_token_expiry": { "format": "date-time", "type": "string", "example": "26/02/3019", "description": "Refresh token`s expiry date" }, "scopes": { "example": "access tolkiens, email, etc... ", "description": "scopes of infos linked to the access token", "type": "array", "items": { "type": "string" } } }, "required": [ "id", "user_id", "application", "access_token", "refresh_token", "access_token_expiry" ] }, "UpdateOauthSessionDto": { "type": "object", "properties": { "id": { "type": "string", "example": "cklwi0vb70000z2z20q6f19qk", "description": "Unique ID of an OAuth token (auto-generated)" }, "user_id": { "type": "string", "example": "S7A2U8R7O6N6", "description": "User`s unique identification number" }, "application": { "type": "string", "example": "app.targo.ca", "description": "URL in which the access token is used for" }, "access_token": { "type": "string", "example": "L5O6R4D3/O6F3#T8H4E3&R6I4N6G4S7 ...", "description": "Access token" }, "refresh_token": { "type": "string", "example": "Th3731102h1p07Th3R1n92", "description": "Refresh token" }, "access_token_expiry": { "format": "date-time", "type": "string", "example": "25/12/3018", "description": "Access token`s expiry date" }, "refresh_token_expiry": { "format": "date-time", "type": "string", "example": "26/02/3019", "description": "Refresh token`s expiry date" }, "scopes": { "example": "access tolkiens, email, etc... ", "description": "scopes of infos linked to the access token", "type": "array", "items": { "type": "string" } } } }, "PayPeriodDto": { "type": "object", "properties": { "pay_period_no": { "type": "number", "example": 1, "description": "numéro cyclique de la période entre 1 et 26" }, "period_start": { "type": "string", "example": "2023-12-17", "format": "date" }, "period_end": { "type": "string", "example": "2023-12-30", "format": "date" }, "payday": { "type": "string", "example": "2023-01-04", "format": "date" }, "pay_year": { "type": "number", "example": 2023 }, "label": { "type": "string", "example": "2023-12-17 → 2023-12-30" } }, "required": [ "pay_period_no", "period_start", "period_end", "payday", "pay_year", "label" ] }, "PayPeriodBundleDto": { "type": "object", "properties": { "current": { "description": "Current pay period (resolved from date)", "allOf": [ { "$ref": "#/components/schemas/PayPeriodDto" } ] }, "periods": { "description": "All pay periods", "type": "array", "items": { "$ref": "#/components/schemas/PayPeriodDto" } } }, "required": [ "current", "periods" ] }, "BulkCrewApprovalDto": { "type": "object", "properties": {} }, "EmployeePeriodOverviewDto": { "type": "object", "properties": { "employee_name": { "type": "string", "example": "Alex Dupont", "description": "Nom complet de lemployé" }, "regular_hours": { "type": "number", "example": 40, "description": "pay-period`s regular hours" }, "evening_hours": { "type": "number", "example": 0, "description": "pay-period`s evening hours" }, "emergency_hours": { "type": "number", "example": 0, "description": "pay-period`s emergency hours" }, "overtime_hours": { "type": "number", "example": 2, "description": "pay-period`s overtime hours" }, "expenses": { "type": "number", "example": 420.69, "description": "pay-period`s total expenses ($)" }, "mileage": { "type": "number", "example": 40, "description": "pay-period total mileages (km)" }, "is_approved": { "type": "boolean", "example": true, "description": "Tous les timesheets de la période sont approuvés pour cet employé" } }, "required": [ "employee_name", "regular_hours", "evening_hours", "emergency_hours", "overtime_hours", "expenses", "mileage", "is_approved" ] }, "PayPeriodOverviewDto": { "type": "object", "properties": { "pay_period_no": { "type": "number", "example": 1, "description": "Period number (1–26)" }, "pay_year": { "type": "number", "example": 2023, "description": "Calendar year of the period" }, "period_start": { "type": "string", "example": "2023-12-17", "format": "date", "description": "Period start date (YYYY-MM-DD)" }, "period_end": { "type": "string", "example": "2023-12-30", "format": "date", "description": "Period end date (YYYY-MM-DD)" }, "payday": { "type": "string", "example": "2023-12-30", "format": "date", "description": "Period pay day(YYYY-MM-DD)" }, "label": { "type": "string", "example": "2023-12-17 → 2023-12-30", "description": "Human-readable label" }, "employees_overview": { "description": "Per-employee overview for the period", "type": "array", "items": { "$ref": "#/components/schemas/EmployeePeriodOverviewDto" } } }, "required": [ "pay_period_no", "pay_year", "period_start", "period_end", "payday", "label", "employees_overview" ] } } } }