672 lines
14 KiB
JSON
672 lines
14 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"paths": {
|
|
"/health": {
|
|
"get": {
|
|
"operationId": "HealthController_check",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Health"
|
|
]
|
|
}
|
|
},
|
|
"/auth/v1/login": {
|
|
"get": {
|
|
"operationId": "AuthController_login",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Auth"
|
|
]
|
|
}
|
|
},
|
|
"/auth/callback": {
|
|
"get": {
|
|
"operationId": "AuthController_loginCallback",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Auth"
|
|
]
|
|
}
|
|
},
|
|
"/auth/me": {
|
|
"get": {
|
|
"operationId": "AuthController_getProfile",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Auth"
|
|
]
|
|
}
|
|
},
|
|
"/notifications/summary": {
|
|
"get": {
|
|
"operationId": "NotificationsController_summary",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Notifications"
|
|
]
|
|
}
|
|
},
|
|
"/notifications/stream": {
|
|
"get": {
|
|
"operationId": "NotificationsController_stream",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Notifications"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/current-and-all": {
|
|
"get": {
|
|
"operationId": "PayPeriodsController_getCurrentAndAll",
|
|
"parameters": [
|
|
{
|
|
"name": "date",
|
|
"required": true,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/date/{date}": {
|
|
"get": {
|
|
"operationId": "PayPeriodsController_findByDate",
|
|
"parameters": [
|
|
{
|
|
"name": "date",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/{year}/{periodNumber}": {
|
|
"get": {
|
|
"operationId": "PayPeriodsController_findOneByYear",
|
|
"parameters": [
|
|
{
|
|
"name": "year",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "periodNumber",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/crew/pay-period-approval": {
|
|
"patch": {
|
|
"operationId": "PayPeriodsController_bulkApproval",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkCrewApprovalDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/crew/{year}/{periodNumber}": {
|
|
"get": {
|
|
"operationId": "PayPeriodsController_getCrewOverview",
|
|
"parameters": [
|
|
{
|
|
"name": "year",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "periodNumber",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/pay-periods/overview/{year}/{periodNumber}": {
|
|
"get": {
|
|
"operationId": "PayPeriodsController_getOverviewByYear",
|
|
"parameters": [
|
|
{
|
|
"name": "year",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "periodNumber",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"PayPeriods"
|
|
]
|
|
}
|
|
},
|
|
"/timesheets": {
|
|
"get": {
|
|
"operationId": "TimesheetController_getTimesheetByPayPeriod",
|
|
"parameters": [
|
|
{
|
|
"name": "year",
|
|
"required": true,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "period_number",
|
|
"required": true,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Timesheet"
|
|
]
|
|
}
|
|
},
|
|
"/timesheets/timesheet-approval": {
|
|
"patch": {
|
|
"operationId": "TimesheetController_approveTimesheet",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Timesheet"
|
|
]
|
|
}
|
|
},
|
|
"/preferences": {
|
|
"patch": {
|
|
"operationId": "PreferencesController_updatePreferences",
|
|
"parameters": [
|
|
{
|
|
"name": "PreferencesDto",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PreferencesDto"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Preferences"
|
|
]
|
|
}
|
|
},
|
|
"/shift/create": {
|
|
"post": {
|
|
"operationId": "ShiftController_createBatch",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Shift"
|
|
]
|
|
}
|
|
},
|
|
"/shift/update": {
|
|
"patch": {
|
|
"operationId": "ShiftController_updateBatch",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Shift"
|
|
]
|
|
}
|
|
},
|
|
"/shift/{shift_id}": {
|
|
"delete": {
|
|
"operationId": "ShiftController_remove",
|
|
"parameters": [
|
|
{
|
|
"name": "shift_id",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Shift"
|
|
]
|
|
}
|
|
},
|
|
"/schedule-presets/create": {
|
|
"post": {
|
|
"operationId": "SchedulePresetsController_createPreset",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SchedulePresetsDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"SchedulePresets"
|
|
]
|
|
}
|
|
},
|
|
"/schedule-presets/update/{preset_id}": {
|
|
"patch": {
|
|
"operationId": "SchedulePresetsController_updatePreset",
|
|
"parameters": [
|
|
{
|
|
"name": "preset_id",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SchedulePresetsUpdateDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"SchedulePresets"
|
|
]
|
|
}
|
|
},
|
|
"/schedule-presets/delete/{preset_id}": {
|
|
"delete": {
|
|
"operationId": "SchedulePresetsController_deletePreset",
|
|
"parameters": [
|
|
{
|
|
"name": "preset_id",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"SchedulePresets"
|
|
]
|
|
}
|
|
},
|
|
"/schedule-presets/find-list": {
|
|
"get": {
|
|
"operationId": "SchedulePresetsController_findListById",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"SchedulePresets"
|
|
]
|
|
}
|
|
},
|
|
"/schedule-presets/apply-presets": {
|
|
"post": {
|
|
"operationId": "SchedulePresetsController_applyPresets",
|
|
"parameters": [
|
|
{
|
|
"name": "preset",
|
|
"required": true,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "start",
|
|
"required": true,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"SchedulePresets"
|
|
]
|
|
}
|
|
},
|
|
"/expense/create": {
|
|
"post": {
|
|
"operationId": "ExpenseController_create",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExpenseDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Expense"
|
|
]
|
|
}
|
|
},
|
|
"/expense/update": {
|
|
"patch": {
|
|
"operationId": "ExpenseController_update",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Expense"
|
|
]
|
|
}
|
|
},
|
|
"/expense/delete/{expense_id}": {
|
|
"delete": {
|
|
"operationId": "ExpenseController_remove",
|
|
"parameters": [
|
|
{
|
|
"name": "expense_id",
|
|
"required": true,
|
|
"in": "path",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": [
|
|
"Expense"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"BulkCrewApprovalDto": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"PreferencesDto": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"SchedulePresetsDto": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"SchedulePresetsUpdateDto": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"ExpenseDto": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
}
|
|
} |