3149 lines
81 KiB
JSON
3149 lines
81 KiB
JSON
{
|
||
"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"
|
||
]
|
||
}
|
||
},
|
||
"/oauth-access-tokens": {
|
||
"post": {
|
||
"operationId": "OauthAccessTokensController_create",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CreateOauthAccessTokenDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "OAuth access token created",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/OAuthAccessTokenEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create OAuth access token",
|
||
"tags": [
|
||
"OAuth Access Tokens"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "OauthAccessTokensController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of OAuth access token found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/OAuthAccessTokenEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of OAuth access token not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all OAuth access token",
|
||
"tags": [
|
||
"OAuth Access Tokens"
|
||
]
|
||
}
|
||
},
|
||
"/oauth-access-tokens/{id}": {
|
||
"get": {
|
||
"operationId": "OauthAccessTokensController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "OAuth access token found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/OAuthAccessTokenEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "OAuth access token not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find OAuth access token",
|
||
"tags": [
|
||
"OAuth Access Tokens"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "OauthAccessTokensController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateOauthAccessTokenDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "OAuth access token updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/OAuthAccessTokenEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "OAuth access token not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update OAuth access token",
|
||
"tags": [
|
||
"OAuth Access Tokens"
|
||
]
|
||
},
|
||
"delete": {
|
||
"operationId": "OauthAccessTokensController_remove",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "OAuth access token deleted",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/OAuthAccessTokenEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "OAuth access token not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete OAuth access token",
|
||
"tags": [
|
||
"OAuth Access Tokens"
|
||
]
|
||
}
|
||
},
|
||
"/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/CustomerEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/CustomerEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/CustomerEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/CustomerEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/CustomerEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Customer not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete customer",
|
||
"tags": [
|
||
"Customers"
|
||
]
|
||
}
|
||
},
|
||
"/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/EmployeeEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create employee",
|
||
"tags": [
|
||
"Employees"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "EmployeesController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of employees found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/EmployeeEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of employees not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all employees",
|
||
"tags": [
|
||
"Employees"
|
||
]
|
||
}
|
||
},
|
||
"/employees/{id}": {
|
||
"get": {
|
||
"operationId": "EmployeesController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Employee found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/EmployeeEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Employee not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find employee",
|
||
"tags": [
|
||
"Employees"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "EmployeesController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateEmployeeDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Employee updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/EmployeeEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Employee not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update employee",
|
||
"tags": [
|
||
"Employees"
|
||
]
|
||
},
|
||
"delete": {
|
||
"operationId": "EmployeesController_remove",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Employee deleted",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/EmployeeEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Employee not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete employee",
|
||
"tags": [
|
||
"Employees"
|
||
]
|
||
}
|
||
},
|
||
"/leave-requests": {
|
||
"post": {
|
||
"operationId": "LeaveRequestController_create",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CreateLeaveRequestsDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Leave request created",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LeaveRequestEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create leave request",
|
||
"tags": [
|
||
"Leave Requests"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "LeaveRequestController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of Leave requests found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/LeaveRequestEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of leave request not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all leave request",
|
||
"tags": [
|
||
"Leave Requests"
|
||
]
|
||
}
|
||
},
|
||
"/leave-requests/{id}": {
|
||
"get": {
|
||
"operationId": "LeaveRequestController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Leave request found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LeaveRequestEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Leave request not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find leave request",
|
||
"tags": [
|
||
"Leave Requests"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "LeaveRequestController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateLeaveRequestsDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Leave request updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LeaveRequestEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Leave request not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update leave request",
|
||
"tags": [
|
||
"Leave Requests"
|
||
]
|
||
},
|
||
"delete": {
|
||
"operationId": "LeaveRequestController_remove",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Leave request deleted",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LeaveRequestEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Leave request not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete leave request",
|
||
"tags": [
|
||
"Leave Requests"
|
||
]
|
||
}
|
||
},
|
||
"/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/ExpenseEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ExpenseEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ExpenseEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ExpenseEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ExpenseEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Expense not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete expense",
|
||
"tags": [
|
||
"Expenses"
|
||
]
|
||
}
|
||
},
|
||
"/expense-codes": {
|
||
"post": {
|
||
"operationId": "ExpenseCodesController_create",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CreateExpenseCodeDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Expense code created",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ExpenseCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create expense code",
|
||
"tags": [
|
||
"Expense Codes"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "ExpenseCodesController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of expense codes found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/ExpenseCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of expense codes not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all expense codes",
|
||
"tags": [
|
||
"Expense Codes"
|
||
]
|
||
}
|
||
},
|
||
"/expense-codes/{id}": {
|
||
"get": {
|
||
"operationId": "ExpenseCodesController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Expense code found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ExpenseCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Expense code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find expense code",
|
||
"tags": [
|
||
"Expense Codes"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "ExpenseCodesController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateExpenseCodeDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Expense code updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ExpenseCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Expense code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update expense code",
|
||
"tags": [
|
||
"Expense Codes"
|
||
]
|
||
},
|
||
"delete": {
|
||
"operationId": "ExpenseCodesController_remove",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Expense code deleted",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ExpenseCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Expense code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete expense code",
|
||
"tags": [
|
||
"Expense Codes"
|
||
]
|
||
}
|
||
},
|
||
"/shift-codes": {
|
||
"post": {
|
||
"operationId": "ShiftCodesController_create",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CreateShiftCodeDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Shift code created",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ShiftCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create shift code",
|
||
"tags": [
|
||
"Shift Codes"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "ShiftCodesController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of shift codes found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/ShiftCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of shift codes not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all shift codes",
|
||
"tags": [
|
||
"Shift Codes"
|
||
]
|
||
}
|
||
},
|
||
"/shift-codes/{id}": {
|
||
"get": {
|
||
"operationId": "ShiftCodesController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Shift code found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ShiftCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Shift code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find shift code",
|
||
"tags": [
|
||
"Shift Codes"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "ShiftCodesController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateShiftCodeDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Shift code updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ShiftCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Shift code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update shift code",
|
||
"tags": [
|
||
"Shift Codes"
|
||
]
|
||
},
|
||
"delete": {
|
||
"operationId": "ShiftCodesController_remove",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Shift code deleted",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ShiftCodesEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Shift code not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete shift code",
|
||
"tags": [
|
||
"Shift Codes"
|
||
]
|
||
}
|
||
},
|
||
"/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/ShiftEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ShiftEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ShiftEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ShiftEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"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/ShiftEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Shift not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete shift",
|
||
"tags": [
|
||
"Shifts"
|
||
]
|
||
}
|
||
},
|
||
"/timesheets": {
|
||
"post": {
|
||
"operationId": "TimesheetsController_create",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CreateTimesheetDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Timesheet created",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TimesheetEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Incomplete task or invalid data"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Create timesheet",
|
||
"tags": [
|
||
"Timesheets"
|
||
]
|
||
},
|
||
"get": {
|
||
"operationId": "TimesheetsController_findAll",
|
||
"parameters": [],
|
||
"responses": {
|
||
"201": {
|
||
"description": "List of timesheet found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/TimesheetEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of timesheets not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find all timesheets",
|
||
"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/TimesheetEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Timesheet not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Find timesheet",
|
||
"tags": [
|
||
"Timesheets"
|
||
]
|
||
},
|
||
"patch": {
|
||
"operationId": "TimesheetsController_update",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UpdateTimesheetDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Timesheet updated",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TimesheetEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Timesheet not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Update 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/TimesheetEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Timesheet not found"
|
||
}
|
||
},
|
||
"security": [
|
||
{
|
||
"access-token": []
|
||
}
|
||
],
|
||
"summary": "Delete timesheet",
|
||
"tags": [
|
||
"Timesheets"
|
||
]
|
||
}
|
||
},
|
||
"/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"
|
||
]
|
||
}
|
||
},
|
||
"/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/PayPeriodEntity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "List of pay period not found"
|
||
}
|
||
},
|
||
"summary": "Find all pay period",
|
||
"tags": [
|
||
"pay-periods"
|
||
]
|
||
}
|
||
},
|
||
"/pay-periods/{periodNumber}": {
|
||
"get": {
|
||
"operationId": "PayPeriodsController_findOne",
|
||
"parameters": [
|
||
{
|
||
"name": "periodNumber",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Pay period found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/PayPeriodEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Pay period not found"
|
||
}
|
||
},
|
||
"summary": "Find pay period",
|
||
"tags": [
|
||
"pay-periods"
|
||
]
|
||
}
|
||
},
|
||
"/pay-periods/{periodNumber}/overview": {
|
||
"get": {
|
||
"operationId": "PayPeriodsController_getOverview",
|
||
"parameters": [
|
||
{
|
||
"name": "periodNumber",
|
||
"required": true,
|
||
"in": "path",
|
||
"schema": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Pay period overview found",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/PayPeriodOverviewDto"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Pay period not found"
|
||
}
|
||
},
|
||
"summary": "detailed view of a pay period",
|
||
"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/PayPeriodEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Pay period not found for the selected date date"
|
||
}
|
||
},
|
||
"summary": "cherry picking a date to find a period",
|
||
"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": {
|
||
"CreateOauthAccessTokenDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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": [
|
||
"user_id",
|
||
"application",
|
||
"access_token",
|
||
"refresh_token",
|
||
"access_token_expiry"
|
||
]
|
||
},
|
||
"OAuthAccessTokenEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"example": "cklwi0vb70000z2z20q6f19qk",
|
||
"description": "Unique ID of an OAuth token (auto-generated)"
|
||
},
|
||
"user_id": {
|
||
"type": "string",
|
||
"example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d",
|
||
"description": "UUID 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": "3018-12-25T00:00:00.000Z",
|
||
"description": "Access token`s expiry date"
|
||
},
|
||
"refresh_token_expiry": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3019-02-26T00:00:00.000Z",
|
||
"description": "Refresh token`s expiry date (optional)"
|
||
},
|
||
"scopes": {
|
||
"example": [
|
||
"email",
|
||
"profile",
|
||
"access_tolkiens"
|
||
],
|
||
"description": "scopes of infos linked to the access token",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"is_revoked": {
|
||
"type": "boolean",
|
||
"example": false,
|
||
"description": "revoke status"
|
||
},
|
||
"created_at": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "2025-07-22",
|
||
"description": "creation date"
|
||
},
|
||
"updated_at": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "2025-07-23",
|
||
"description": "Latest update (optional)"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"user_id",
|
||
"application",
|
||
"access_token",
|
||
"refresh_token",
|
||
"access_token_expiry",
|
||
"is_revoked",
|
||
"created_at"
|
||
]
|
||
},
|
||
"UpdateOauthAccessTokenDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"CreateCustomerDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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": "number",
|
||
"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": [
|
||
"first_name",
|
||
"last_name",
|
||
"email",
|
||
"phone_number"
|
||
]
|
||
},
|
||
"CustomerEntity": {
|
||
"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"
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"example": "you_shall_not_pass@middleEarth.com",
|
||
"description": "customer`s email (optional)"
|
||
},
|
||
"phone_number": {
|
||
"type": "number",
|
||
"example": 8436637464,
|
||
"description": "customer`s phone number (numbers only)"
|
||
},
|
||
"residence": {
|
||
"type": "string",
|
||
"example": "1 Ringbearer’s way, Mount Doom city, ME, T1R 1N6",
|
||
"description": "customer`s residence address (optional)"
|
||
},
|
||
"invoice_id": {
|
||
"type": "number",
|
||
"example": 4263253,
|
||
"description": "customer`s invoice number (optionnal, unique)"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"user_id",
|
||
"phone_number"
|
||
]
|
||
},
|
||
"UpdateCustomerDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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": "number",
|
||
"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"
|
||
}
|
||
}
|
||
},
|
||
"CreateEmployeeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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": "number",
|
||
"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": "BagginsF7464",
|
||
"description": "Employee`s payroll id"
|
||
},
|
||
"company_code": {
|
||
"type": "number",
|
||
"example": "335567447",
|
||
"description": "Employee`s company code"
|
||
},
|
||
"first_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "23/09/3018",
|
||
"description": "Employee`s first working day"
|
||
},
|
||
"last_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "25/03/3019",
|
||
"description": "Employee`s last working day"
|
||
}
|
||
},
|
||
"required": [
|
||
"first_name",
|
||
"last_name",
|
||
"email",
|
||
"phone_number",
|
||
"external_payroll_id",
|
||
"company_code",
|
||
"first_work_day"
|
||
]
|
||
},
|
||
"EmployeeEntity": {
|
||
"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"
|
||
},
|
||
"external_payroll_id": {
|
||
"type": "number",
|
||
"example": 7464,
|
||
"description": "external ID for the pay system"
|
||
},
|
||
"company_code": {
|
||
"type": "number",
|
||
"example": 335567447,
|
||
"description": "company code"
|
||
},
|
||
"first_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3018-09-23T00:00:00.000Z",
|
||
"description": "Employee first day at work"
|
||
},
|
||
"last_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3019-03-25T00:00:00.000Z",
|
||
"description": "Employee last day at work"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"user_id",
|
||
"external_payroll_id",
|
||
"company_code",
|
||
"first_work_day"
|
||
]
|
||
},
|
||
"UpdateEmployeeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"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": "number",
|
||
"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": "BagginsF7464",
|
||
"description": "Employee`s payroll id"
|
||
},
|
||
"company_code": {
|
||
"type": "number",
|
||
"example": "335567447",
|
||
"description": "Employee`s company code"
|
||
},
|
||
"first_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "23/09/3018",
|
||
"description": "Employee`s first working day"
|
||
},
|
||
"last_work_day": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "25/03/3019",
|
||
"description": "Employee`s last working day"
|
||
}
|
||
}
|
||
},
|
||
"CreateLeaveRequestsDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": "4655867",
|
||
"description": "Employee`s id"
|
||
},
|
||
"leave_type": {
|
||
"type": "string",
|
||
"example": "Sick or Vacation or Unpaid or Bereavement or Parental or Legal",
|
||
"description": "type of leave request for an accounting perception"
|
||
},
|
||
"start_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "22/06/2463",
|
||
"description": "Leave request`s start date"
|
||
},
|
||
"end_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "25/03/3019",
|
||
"description": "Leave request`s end date"
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"example": "My precious",
|
||
"description": "Leave request`s comment"
|
||
},
|
||
"approval_status": {
|
||
"type": "string",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Leave request`s approval status"
|
||
}
|
||
},
|
||
"required": [
|
||
"employee_id",
|
||
"leave_type",
|
||
"start_date_time",
|
||
"end_date_time",
|
||
"comment",
|
||
"approval_status"
|
||
]
|
||
},
|
||
"LeaveRequestEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "Leave request`s unique id(auto-incremented)"
|
||
},
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": 42,
|
||
"description": "ID of concerned employee"
|
||
},
|
||
"leave_type": {
|
||
"type": "string",
|
||
"example": "SICK",
|
||
"enum": [
|
||
"SICK",
|
||
"VACATION",
|
||
"UNPAID",
|
||
"BEREAVEMENT",
|
||
"PARENTAL",
|
||
"LEGAL"
|
||
],
|
||
"description": "type of leave request for an accounting perception"
|
||
},
|
||
"start_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "22/06/2463",
|
||
"description": "Leave request`s start date"
|
||
},
|
||
"end_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "25/03/3019",
|
||
"description": "Leave request`s end date (optionnal)"
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"example": "My precious",
|
||
"description": "Leave request employee`s comment"
|
||
},
|
||
"approval_status": {
|
||
"type": "string",
|
||
"example": "PENDING",
|
||
"enum": [
|
||
"PENDING",
|
||
"APPROVED",
|
||
"DENIED",
|
||
"CANCELLED",
|
||
"ESCALATED"
|
||
],
|
||
"description": "Leave request`s approval status"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"employee_id",
|
||
"leave_type",
|
||
"start_date_time",
|
||
"comment",
|
||
"approval_status"
|
||
]
|
||
},
|
||
"UpdateLeaveRequestsDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": "4655867",
|
||
"description": "Employee`s id"
|
||
},
|
||
"leave_type": {
|
||
"type": "string",
|
||
"example": "Sick or Vacation or Unpaid or Bereavement or Parental or Legal",
|
||
"description": "type of leave request for an accounting perception"
|
||
},
|
||
"start_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "22/06/2463",
|
||
"description": "Leave request`s start date"
|
||
},
|
||
"end_date_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "25/03/3019",
|
||
"description": "Leave request`s end date"
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"example": "My precious",
|
||
"description": "Leave request`s comment"
|
||
},
|
||
"approval_status": {
|
||
"type": "string",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Leave request`s approval status"
|
||
}
|
||
}
|
||
},
|
||
"CreateExpenseDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"timesheet_id": {
|
||
"type": "number",
|
||
"example": "Th3F3110w5h1pX2024",
|
||
"description": "ID number for a set timesheet"
|
||
},
|
||
"expense_code_id": {
|
||
"type": "number",
|
||
"example": "0n3R1n962Ru13xX",
|
||
"description": "ID number of an expense code (link with shift-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "20/10/3018",
|
||
"description": "Date where the expense was made"
|
||
},
|
||
"amount": {
|
||
"type": "number",
|
||
"example": "280 000 000,00",
|
||
"description": "Amount of the expense"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": "Spent for mileage between A and B",
|
||
"description": "explain`s why the expense was made"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Expense`s approval 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": [
|
||
"timesheet_id",
|
||
"expense_code_id",
|
||
"date",
|
||
"amount",
|
||
"description",
|
||
"is_approved",
|
||
"supervisor_comment"
|
||
]
|
||
},
|
||
"ExpenseEntity": {
|
||
"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"
|
||
},
|
||
"expense": {
|
||
"type": "number",
|
||
"example": 7,
|
||
"description": "ID number of an expense code (link with expense-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3018-10-20T00:00:00.000Z",
|
||
"description": "Date where the expense was made"
|
||
},
|
||
"is_approuved": {
|
||
"type": "boolean",
|
||
"example": "DENIED, APPROUVED, PENDING, etc...",
|
||
"description": "validation status"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": "Spent for mileage between A and B",
|
||
"description": "explain`s why the expense was made"
|
||
},
|
||
"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",
|
||
"expense",
|
||
"date",
|
||
"is_approuved",
|
||
"description",
|
||
"supervisor_comment"
|
||
]
|
||
},
|
||
"UpdateExpenseDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"timesheet_id": {
|
||
"type": "number",
|
||
"example": "Th3F3110w5h1pX2024",
|
||
"description": "ID number for a set timesheet"
|
||
},
|
||
"expense_code_id": {
|
||
"type": "number",
|
||
"example": "0n3R1n962Ru13xX",
|
||
"description": "ID number of an expense code (link with shift-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "20/10/3018",
|
||
"description": "Date where the expense was made"
|
||
},
|
||
"amount": {
|
||
"type": "number",
|
||
"example": "280 000 000,00",
|
||
"description": "Amount of the expense"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": "Spent for mileage between A and B",
|
||
"description": "explain`s why the expense was made"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Expense`s approval 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"
|
||
}
|
||
}
|
||
},
|
||
"CreateExpenseCodeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expense_type": {
|
||
"type": "string",
|
||
"example": "mileage, overnight, etc...",
|
||
"description": "Type of expenses for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G500, G501, etc...",
|
||
"description": "bank`s code related to the type of expense"
|
||
}
|
||
},
|
||
"required": [
|
||
"expense_type",
|
||
"bank_code"
|
||
]
|
||
},
|
||
"ExpenseCodesEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "Unique ID of a expense-code (auto-generated)"
|
||
},
|
||
"shift_type": {
|
||
"type": "string",
|
||
"example": "Mileage",
|
||
"description": "Type of expenses for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G501",
|
||
"description": "bank`s code related to the type of expense"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"shift_type",
|
||
"bank_code"
|
||
]
|
||
},
|
||
"UpdateExpenseCodeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expense_type": {
|
||
"type": "string",
|
||
"example": "mileage, overnight, etc...",
|
||
"description": "Type of expenses for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G500, G501, etc...",
|
||
"description": "bank`s code related to the type of expense"
|
||
}
|
||
}
|
||
},
|
||
"CreateShiftCodeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"shift_type": {
|
||
"type": "string",
|
||
"example": "Regular or Night or Emergency, etc...",
|
||
"description": "Type of shifts for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G1, G2, G3, etc...",
|
||
"description": "bank`s code related to the type of shift"
|
||
}
|
||
},
|
||
"required": [
|
||
"shift_type",
|
||
"bank_code"
|
||
]
|
||
},
|
||
"ShiftCodesEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "Unique ID of a shift-code (auto-generated)"
|
||
},
|
||
"shift_type": {
|
||
"type": "string",
|
||
"example": "Night",
|
||
"description": "Type of shifts for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G2",
|
||
"description": "bank`s code related to the type of shift"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"shift_type",
|
||
"bank_code"
|
||
]
|
||
},
|
||
"UpdateShiftCodeDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"shift_type": {
|
||
"type": "string",
|
||
"example": "Regular or Night or Emergency, etc...",
|
||
"description": "Type of shifts for an account perception"
|
||
},
|
||
"bank_code": {
|
||
"type": "string",
|
||
"example": "G1, G2, G3, etc...",
|
||
"description": "bank`s code related to the type of shift"
|
||
}
|
||
}
|
||
},
|
||
"CreateShiftDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"timesheet_id": {
|
||
"type": "number",
|
||
"example": "Th3F3110w5h1pX2024",
|
||
"description": "ID number for a set timesheet"
|
||
},
|
||
"shift_code_id": {
|
||
"type": "number",
|
||
"example": "0n3R1n962Ru13xX",
|
||
"description": "ID number of a shift code (link with shift-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "20/10/3018",
|
||
"description": "Date where the shift takes place"
|
||
},
|
||
"start_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "08:00",
|
||
"description": "Start time of the said shift"
|
||
},
|
||
"end_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "17:00",
|
||
"description": "End time of the said shift"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": "Called for an emergency at X` place",
|
||
"description": "justify the purpose of the shift"
|
||
}
|
||
},
|
||
"required": [
|
||
"timesheet_id",
|
||
"shift_code_id",
|
||
"date",
|
||
"start_time",
|
||
"end_time",
|
||
"description"
|
||
]
|
||
},
|
||
"ShiftEntity": {
|
||
"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"
|
||
},
|
||
"shift_code_id": {
|
||
"type": "number",
|
||
"example": 7,
|
||
"description": "ID number of a shift code (link with shift-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3018-10-20T00:00:00.000Z",
|
||
"description": "Date where the shift takes place"
|
||
},
|
||
"start_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3018-10-20T08:00:00.000Z",
|
||
"description": "Start time of the said shift"
|
||
},
|
||
"end_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "3018-10-20T17:00:00.000Z",
|
||
"description": "End time of the said shift"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"timesheet_id",
|
||
"shift_code_id",
|
||
"date",
|
||
"start_time",
|
||
"end_time"
|
||
]
|
||
},
|
||
"UpdateShiftsDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"timesheet_id": {
|
||
"type": "number",
|
||
"example": "Th3F3110w5h1pX2024",
|
||
"description": "ID number for a set timesheet"
|
||
},
|
||
"shift_code_id": {
|
||
"type": "number",
|
||
"example": "0n3R1n962Ru13xX",
|
||
"description": "ID number of a shift code (link with shift-codes)"
|
||
},
|
||
"date": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "20/10/3018",
|
||
"description": "Date where the shift takes place"
|
||
},
|
||
"start_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "08:00",
|
||
"description": "Start time of the said shift"
|
||
},
|
||
"end_time": {
|
||
"format": "date-time",
|
||
"type": "string",
|
||
"example": "17:00",
|
||
"description": "End time of the said shift"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": "Called for an emergency at X` place",
|
||
"description": "justify the purpose of the shift"
|
||
}
|
||
}
|
||
},
|
||
"CreateTimesheetDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": "426433",
|
||
"description": "employee`s ID number of linked timsheet"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Timesheet`s approval status"
|
||
}
|
||
},
|
||
"required": [
|
||
"employee_id",
|
||
"is_approved"
|
||
]
|
||
},
|
||
"TimesheetEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "timesheet`s unique ID (auto-generated)"
|
||
},
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": 426433,
|
||
"description": "employee`s ID number of linked timsheet"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": true,
|
||
"description": "Timesheet`s approval status"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"employee_id",
|
||
"is_approved"
|
||
]
|
||
},
|
||
"UpdateTimesheetDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"employee_id": {
|
||
"type": "number",
|
||
"example": "426433",
|
||
"description": "employee`s ID number of linked timsheet"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": "True or False or Pending or Denied or Cancelled or Escalated",
|
||
"description": "Timesheet`s approval status"
|
||
}
|
||
}
|
||
},
|
||
"PayPeriodEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"period_number": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "numéro cyclique de la période entre 1 et 26"
|
||
},
|
||
"start_date": {
|
||
"type": "string",
|
||
"example": "2023-12-17",
|
||
"format": "date"
|
||
},
|
||
"end_date": {
|
||
"type": "string",
|
||
"example": "2023-12-30",
|
||
"format": "date"
|
||
},
|
||
"year": {
|
||
"type": "number",
|
||
"example": 2023
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"example": "2023-12-17 → 2023-12-30"
|
||
}
|
||
},
|
||
"required": [
|
||
"period_number",
|
||
"start_date",
|
||
"end_date",
|
||
"year",
|
||
"label"
|
||
]
|
||
},
|
||
"EmployeePeriodOverviewDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"employee_id": {
|
||
"type": "string",
|
||
"example": "a1b2c3d4",
|
||
"description": "Employee`s ID"
|
||
},
|
||
"employee_name": {
|
||
"type": "string",
|
||
"example": "Alex Dupont",
|
||
"description": "Employee`s full name"
|
||
},
|
||
"total_hours": {
|
||
"type": "number",
|
||
"example": 34,
|
||
"description": "period`s total worked hours"
|
||
},
|
||
"is_approved": {
|
||
"type": "boolean",
|
||
"example": true,
|
||
"description": "All timesheets are approved for this employee"
|
||
}
|
||
},
|
||
"required": [
|
||
"employee_id",
|
||
"employee_name",
|
||
"total_hours",
|
||
"is_approved"
|
||
]
|
||
},
|
||
"PayPeriodOverviewDto": {
|
||
"type": "object",
|
||
"properties": {
|
||
"period_number": {
|
||
"type": "number",
|
||
"example": 1,
|
||
"description": "period`s number ( 1-26 )"
|
||
},
|
||
"start_date": {
|
||
"type": "string",
|
||
"example": "2023-12-17",
|
||
"format": "date",
|
||
"description": "Period`s starting date"
|
||
},
|
||
"end_date": {
|
||
"type": "string",
|
||
"example": "2023-12-30",
|
||
"format": "date",
|
||
"description": "Period`s ending date"
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"example": "2023-12-17 → 2023-12-30",
|
||
"description": "period`s label for showing"
|
||
},
|
||
"employees_overview": {
|
||
"description": "Detailed view by employee for a chosen period",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/EmployeePeriodOverviewDto"
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"period_number",
|
||
"start_date",
|
||
"end_date",
|
||
"label",
|
||
"employees_overview"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
} |