diff --git a/backend/src/api/person/content-types/person/schema.json b/backend/src/api/person/content-types/person/schema.json new file mode 100644 index 0000000..6d115b1 --- /dev/null +++ b/backend/src/api/person/content-types/person/schema.json @@ -0,0 +1,51 @@ +{ + "kind": "collectionType", + "collectionName": "people", + "info": { + "singularName": "person", + "pluralName": "people", + "displayName": "person", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "workTitle": { + "type": "string", + "required": false + }, + "employeeLink": { + "type": "string" + }, + "profilePicture": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ] + }, + "profilePictureURL": { + "type": "string" + }, + "role": { + "type": "enumeration", + "enum": [ + "Researchers", + "PhD candidates", + "Engineers", + "Contact us" + ], + "required": true + } + } +} diff --git a/backend/src/api/person/controllers/person.js b/backend/src/api/person/controllers/person.js new file mode 100644 index 0000000..64b51a8 --- /dev/null +++ b/backend/src/api/person/controllers/person.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * person controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::person.person'); diff --git a/backend/src/api/person/documentation/1.0.0/person.json b/backend/src/api/person/documentation/1.0.0/person.json new file mode 100644 index 0000000..4199bb7 --- /dev/null +++ b/backend/src/api/person/documentation/1.0.0/person.json @@ -0,0 +1,507 @@ +{ + "/people": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Person" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/people" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Person" + ], + "parameters": [], + "operationId": "post/people", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonRequest" + } + } + } + } + } + }, + "/people/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Person" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/people/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Person" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/people/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Person" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/people/{id}" + } + } +} diff --git a/backend/src/api/person/routes/person.js b/backend/src/api/person/routes/person.js new file mode 100644 index 0000000..1b8cfd4 --- /dev/null +++ b/backend/src/api/person/routes/person.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * person router + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::person.person'); diff --git a/backend/src/api/person/services/person.js b/backend/src/api/person/services/person.js new file mode 100644 index 0000000..5b06112 --- /dev/null +++ b/backend/src/api/person/services/person.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * person service + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::person.person'); diff --git a/backend/src/api/ph-d-project/content-types/ph-d-project/schema.json b/backend/src/api/ph-d-project/content-types/ph-d-project/schema.json new file mode 100644 index 0000000..00393aa --- /dev/null +++ b/backend/src/api/ph-d-project/content-types/ph-d-project/schema.json @@ -0,0 +1,28 @@ +{ + "kind": "collectionType", + "collectionName": "ph_d_projects", + "info": { + "singularName": "ph-d-project", + "pluralName": "ph-d-projects", + "displayName": "PhD Project", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "title": { + "type": "string", + "required": false + }, + "keywords": { + "type": "string", + "required": false + } + } +} diff --git a/backend/src/api/ph-d-project/controllers/ph-d-project.js b/backend/src/api/ph-d-project/controllers/ph-d-project.js new file mode 100644 index 0000000..ccc94ba --- /dev/null +++ b/backend/src/api/ph-d-project/controllers/ph-d-project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ph-d-project controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::ph-d-project.ph-d-project'); diff --git a/backend/src/api/ph-d-project/documentation/1.0.0/ph-d-project.json b/backend/src/api/ph-d-project/documentation/1.0.0/ph-d-project.json new file mode 100644 index 0000000..74eee6b --- /dev/null +++ b/backend/src/api/ph-d-project/documentation/1.0.0/ph-d-project.json @@ -0,0 +1,507 @@ +{ + "/ph-d-projects": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Ph-d-project" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/ph-d-projects" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Ph-d-project" + ], + "parameters": [], + "operationId": "post/ph-d-projects", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectRequest" + } + } + } + } + } + }, + "/ph-d-projects/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Ph-d-project" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/ph-d-projects/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Ph-d-project" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/ph-d-projects/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhDProjectRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Ph-d-project" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/ph-d-projects/{id}" + } + } +} diff --git a/backend/src/api/ph-d-project/routes/ph-d-project.js b/backend/src/api/ph-d-project/routes/ph-d-project.js new file mode 100644 index 0000000..0facaae --- /dev/null +++ b/backend/src/api/ph-d-project/routes/ph-d-project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ph-d-project router + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::ph-d-project.ph-d-project'); diff --git a/backend/src/api/ph-d-project/services/ph-d-project.js b/backend/src/api/ph-d-project/services/ph-d-project.js new file mode 100644 index 0000000..e7bf1e6 --- /dev/null +++ b/backend/src/api/ph-d-project/services/ph-d-project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ph-d-project service + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::ph-d-project.ph-d-project'); diff --git a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 94c1cd9..107bb2d 100644 --- a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,8 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-01-29T13:13:34.705Z" + "x-generation-date": "2024-01-30T16:29:51.556Z" + }, "x-strapi-config": { "path": "/documentation", @@ -2665,215 +2666,2448 @@ } } }, - "UploadFile": { + "PersonRequest": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "required": [ + "name", + "role" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "workTitle": { + "type": "string" + }, + "employeeLink": { + "type": "string" + }, + "profilePicture": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + }, + "profilePictureURL": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "Researchers", + "PhD candidates", + "Engineers", + "Contact us" + ] + } + } + } + } + }, + "PersonListResponseDataItem": { + "type": "object", "properties": { "id": { "type": "number" }, + "attributes": { + "$ref": "#/components/schemas/Person" + } + } + }, + "PersonListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonListResponseDataItem" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer", + "minimum": 25 + }, + "pageCount": { + "type": "integer", + "maximum": 1 + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "Person": { + "type": "object", + "required": [ + "name", + "role" + ], + "properties": { "name": { "type": "string" }, - "alternativeText": { + "workTitle": { "type": "string" }, - "caption": { + "employeeLink": { "type": "string" }, - "width": { - "type": "number", - "format": "integer" - }, - "height": { - "type": "number", - "format": "integer" - }, - "formats": { - "type": "number" + "profilePicture": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pathId": { + "type": "integer" + }, + "parent": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "children": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "files": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "resetPasswordToken": { + "type": "string" + }, + "registrationToken": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "roles": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "path": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "profilePictureURL": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "Researchers", + "PhD candidates", + "Engineers", + "Contact us" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + }, + "PersonResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/Person" + } + } + }, + "PersonResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PersonResponseDataObject" + }, + "meta": { + "type": "object" + } + } + }, + "PhDProjectRequest": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "keywords": { + "type": "string" + } + } + } + } + }, + "PhDProjectListResponseDataItem": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/PhDProject" + } + } + }, + "PhDProjectListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhDProjectListResponseDataItem" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer", + "minimum": 25 + }, + "pageCount": { + "type": "integer", + "maximum": 1 + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "PhDProject": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "keywords": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "resetPasswordToken": { + "type": "string" + }, + "registrationToken": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "roles": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + }, + "PhDProjectResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/PhDProject" + } + } + }, + "PhDProjectResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PhDProjectResponseDataObject" + }, + "meta": { + "type": "object" + } + } + }, + "UploadFile": { + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "number", + "format": "integer" + }, + "height": { + "type": "number", + "format": "integer" + }, + "formats": { + "type": "number" + }, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "double" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": { + "type": "object" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "Users-Permissions-Role": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "Users-Permissions-User": { + "type": "object", + "properties": { + "id": { + "type": "number", + "example": 1 + }, + "username": { + "type": "string", + "example": "foo.bar" + }, + "email": { + "type": "string", + "example": "foo.bar@strapi.io" + }, + "provider": { + "type": "string", + "example": "local" + }, + "confirmed": { + "type": "boolean", + "example": true + }, + "blocked": { + "type": "boolean", + "example": false + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2022-06-02T08:32:06.258Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2022-06-02T08:32:06.267Z" + } + } + }, + "Users-Permissions-UserRegistration": { + "type": "object", + "properties": { + "jwt": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "user": { + "$ref": "#/components/schemas/Users-Permissions-User" + } + } + }, + "Users-Permissions-PermissionsTree": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "every api", + "properties": { + "controllers": { + "description": "every controller of the api", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "description": "every action of every controller", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "policy": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "requestBodies": { + "Users-Permissions-RoleRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "permissions": { + "$ref": "#/components/schemas/Users-Permissions-PermissionsTree" + } + } + }, + "example": { + "name": "foo", + "description": "role foo", + "permissions": { + "api::content-type.content-type": { + "controllers": { + "controllerA": { + "find": { + "enabled": true + } + } + } + } + } + } + } + } + } + } + }, + "paths": { + "/articles": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Article" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/articles" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Article" + ], + "parameters": [], + "operationId": "post/articles", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleRequest" + } + } + } + } + } + }, + "/articles/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Article" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/articles/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Article" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/articles/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Article" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/articles/{id}" + } + }, + "/authors": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Author" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/authors" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorResponse" + } + } + } }, - "hash": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "ext": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "mime": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "size": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "url": { - "type": "string" + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Author" + ], + "parameters": [], + "operationId": "post/authors", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorRequest" + } + } + } + } + } + }, + "/authors/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorResponse" + } + } + } }, - "previewUrl": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "provider": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "provider_metadata": { - "type": "object" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "createdAt": { - "type": "string", - "format": "date-time" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time" + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } + }, + "tags": [ + "Author" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/authors/{id}" }, - "Users-Permissions-Role": { - "type": "object", - "properties": { - "id": { - "type": "number" + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorResponse" + } + } + } }, - "name": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "description": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "type": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "createdAt": { - "type": "string", - "format": "date-time" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time" + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Author" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/authors/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorRequest" + } + } } } }, - "Users-Permissions-User": { - "type": "object", - "properties": { - "id": { - "type": "number", - "example": 1 - }, - "username": { - "type": "string", - "example": "foo.bar" - }, - "email": { - "type": "string", - "example": "foo.bar@strapi.io" - }, - "provider": { - "type": "string", - "example": "local" - }, - "confirmed": { - "type": "boolean", - "example": true - }, - "blocked": { - "type": "boolean", - "example": false + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } }, - "createdAt": { - "type": "string", - "format": "date-time", - "example": "2022-06-02T08:32:06.258Z" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time", - "example": "2022-06-02T08:32:06.267Z" - } - } - }, - "Users-Permissions-UserRegistration": { - "type": "object", - "properties": { - "jwt": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "user": { - "$ref": "#/components/schemas/Users-Permissions-User" - } - } - }, - "Users-Permissions-PermissionsTree": { - "type": "object", - "additionalProperties": { - "type": "object", - "description": "every api", - "properties": { - "controllers": { - "description": "every controller of the api", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "description": "every action of every controller", - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "policy": { - "type": "string" - } - } + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - } - } - }, - "requestBodies": { - "Users-Permissions-RoleRequest": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - }, - "permissions": { - "$ref": "#/components/schemas/Users-Permissions-PermissionsTree" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } - }, - "example": { - "name": "foo", - "description": "role foo", - "permissions": { - "api::content-type.content-type": { - "controllers": { - "controllerA": { - "find": { - "enabled": true - } - } - } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "tags": [ + "Author" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/authors/{id}" } - } - }, - "paths": { - "/articles": { + }, + "/partners": { "get": { "responses": { "200": { @@ -2881,7 +5115,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleListResponse" + "$ref": "#/components/schemas/PartnerListResponse" } } } @@ -2938,7 +5172,7 @@ } }, "tags": [ - "Article" + "Partner" ], "parameters": [ { @@ -3043,7 +5277,7 @@ } } ], - "operationId": "get/articles" + "operationId": "get/partners" }, "post": { "responses": { @@ -3052,7 +5286,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleResponse" + "$ref": "#/components/schemas/PartnerResponse" } } } @@ -3109,23 +5343,23 @@ } }, "tags": [ - "Article" + "Partner" ], "parameters": [], - "operationId": "post/articles", + "operationId": "post/partners", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleRequest" + "$ref": "#/components/schemas/PartnerRequest" } } } } } }, - "/articles/{id}": { + "/partners/{id}": { "get": { "responses": { "200": { @@ -3133,7 +5367,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleResponse" + "$ref": "#/components/schemas/PartnerResponse" } } } @@ -3190,7 +5424,7 @@ } }, "tags": [ - "Article" + "Partner" ], "parameters": [ { @@ -3204,7 +5438,7 @@ } } ], - "operationId": "get/articles/{id}" + "operationId": "get/partners/{id}" }, "put": { "responses": { @@ -3213,7 +5447,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleResponse" + "$ref": "#/components/schemas/PartnerResponse" } } } @@ -3270,7 +5504,7 @@ } }, "tags": [ - "Article" + "Partner" ], "parameters": [ { @@ -3284,13 +5518,13 @@ } } ], - "operationId": "put/articles/{id}", + "operationId": "put/partners/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArticleRequest" + "$ref": "#/components/schemas/PartnerRequest" } } } @@ -3361,7 +5595,7 @@ } }, "tags": [ - "Article" + "Partner" ], "parameters": [ { @@ -3375,10 +5609,10 @@ } } ], - "operationId": "delete/articles/{id}" + "operationId": "delete/partners/{id}" } }, - "/authors": { + "/people": { "get": { "responses": { "200": { @@ -3386,7 +5620,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorListResponse" + "$ref": "#/components/schemas/PersonListResponse" } } } @@ -3443,7 +5677,7 @@ } }, "tags": [ - "Author" + "Person" ], "parameters": [ { @@ -3548,7 +5782,7 @@ } } ], - "operationId": "get/authors" + "operationId": "get/people" }, "post": { "responses": { @@ -3557,7 +5791,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorResponse" + "$ref": "#/components/schemas/PersonResponse" } } } @@ -3614,23 +5848,23 @@ } }, "tags": [ - "Author" + "Person" ], "parameters": [], - "operationId": "post/authors", + "operationId": "post/people", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorRequest" + "$ref": "#/components/schemas/PersonRequest" } } } } } }, - "/authors/{id}": { + "/people/{id}": { "get": { "responses": { "200": { @@ -3638,7 +5872,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorResponse" + "$ref": "#/components/schemas/PersonResponse" } } } @@ -3695,7 +5929,7 @@ } }, "tags": [ - "Author" + "Person" ], "parameters": [ { @@ -3709,7 +5943,7 @@ } } ], - "operationId": "get/authors/{id}" + "operationId": "get/people/{id}" }, "put": { "responses": { @@ -3718,7 +5952,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorResponse" + "$ref": "#/components/schemas/PersonResponse" } } } @@ -3775,7 +6009,7 @@ } }, "tags": [ - "Author" + "Person" ], "parameters": [ { @@ -3789,13 +6023,13 @@ } } ], - "operationId": "put/authors/{id}", + "operationId": "put/people/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorRequest" + "$ref": "#/components/schemas/PersonRequest" } } } @@ -3866,7 +6100,7 @@ } }, "tags": [ - "Author" + "Person" ], "parameters": [ { @@ -3880,10 +6114,10 @@ } } ], - "operationId": "delete/authors/{id}" + "operationId": "delete/people/{id}" } }, - "/partners": { + "/ph-d-projects": { "get": { "responses": { "200": { @@ -3891,7 +6125,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerListResponse" + "$ref": "#/components/schemas/PhDProjectListResponse" } } } @@ -3948,7 +6182,7 @@ } }, "tags": [ - "Partner" + "Ph-d-project" ], "parameters": [ { @@ -4053,7 +6287,7 @@ } } ], - "operationId": "get/partners" + "operationId": "get/ph-d-projects" }, "post": { "responses": { @@ -4062,7 +6296,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerResponse" + "$ref": "#/components/schemas/PhDProjectResponse" } } } @@ -4119,23 +6353,23 @@ } }, "tags": [ - "Partner" + "Ph-d-project" ], "parameters": [], - "operationId": "post/partners", + "operationId": "post/ph-d-projects", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerRequest" + "$ref": "#/components/schemas/PhDProjectRequest" } } } } } }, - "/partners/{id}": { + "/ph-d-projects/{id}": { "get": { "responses": { "200": { @@ -4143,7 +6377,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerResponse" + "$ref": "#/components/schemas/PhDProjectResponse" } } } @@ -4200,7 +6434,7 @@ } }, "tags": [ - "Partner" + "Ph-d-project" ], "parameters": [ { @@ -4214,7 +6448,7 @@ } } ], - "operationId": "get/partners/{id}" + "operationId": "get/ph-d-projects/{id}" }, "put": { "responses": { @@ -4223,7 +6457,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerResponse" + "$ref": "#/components/schemas/PhDProjectResponse" } } } @@ -4280,7 +6514,7 @@ } }, "tags": [ - "Partner" + "Ph-d-project" ], "parameters": [ { @@ -4294,13 +6528,13 @@ } } ], - "operationId": "put/partners/{id}", + "operationId": "put/ph-d-projects/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartnerRequest" + "$ref": "#/components/schemas/PhDProjectRequest" } } } @@ -4371,7 +6605,7 @@ } }, "tags": [ - "Partner" + "Ph-d-project" ], "parameters": [ { @@ -4385,7 +6619,7 @@ } } ], - "operationId": "delete/partners/{id}" + "operationId": "delete/ph-d-projects/{id}" } }, "/upload": { diff --git a/backend/types/generated/contentTypes.d.ts b/backend/types/generated/contentTypes.d.ts index 94c532b..3105820 100644 --- a/backend/types/generated/contentTypes.d.ts +++ b/backend/types/generated/contentTypes.d.ts @@ -362,112 +362,6 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType { }; } -export interface ApiArticleArticle extends Schema.CollectionType { - collectionName: 'articles'; - info: { - singularName: 'article'; - pluralName: 'articles'; - displayName: 'Article'; - description: ''; - }; - options: { - draftAndPublish: true; - }; - attributes: { - title: Attribute.String; - subtitle: Attribute.String; - coverImage: Attribute.Media; - datePublished: Attribute.Date; - body: Attribute.Blocks; - author: Attribute.Relation< - 'api::article.article', - 'oneToOne', - 'api::author.author' - >; - slug: Attribute.UID; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'api::article.article', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'api::article.article', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface ApiAuthorAuthor extends Schema.CollectionType { - collectionName: 'authors'; - info: { - singularName: 'author'; - pluralName: 'authors'; - displayName: 'Author'; - description: ''; - }; - options: { - draftAndPublish: true; - }; - attributes: { - name: Attribute.String; - avatar: Attribute.Media; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'api::author.author', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'api::author.author', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface ApiPartnerPartner extends Schema.CollectionType { - collectionName: 'partners'; - info: { - singularName: 'partner'; - pluralName: 'partners'; - displayName: 'Partner'; - }; - options: { - draftAndPublish: true; - }; - attributes: { - partnerName: Attribute.String & Attribute.Required; - logoUrl: Attribute.String; - logoImage: Attribute.Media; - websiteUrl: Attribute.String; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'api::partner.partner', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'api::partner.partner', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - export interface PluginUploadFile extends Schema.CollectionType { collectionName: 'files'; info: { @@ -887,6 +781,184 @@ export interface PluginUsersPermissionsUser extends Schema.CollectionType { }; } +export interface ApiArticleArticle extends Schema.CollectionType { + collectionName: 'articles'; + info: { + singularName: 'article'; + pluralName: 'articles'; + displayName: 'Article'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + attributes: { + title: Attribute.String; + subtitle: Attribute.String; + coverImage: Attribute.Media; + datePublished: Attribute.Date; + body: Attribute.Blocks; + author: Attribute.Relation< + 'api::article.article', + 'oneToOne', + 'api::author.author' + >; + slug: Attribute.UID; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::article.article', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::article.article', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + +export interface ApiAuthorAuthor extends Schema.CollectionType { + collectionName: 'authors'; + info: { + singularName: 'author'; + pluralName: 'authors'; + displayName: 'Author'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + attributes: { + name: Attribute.String; + avatar: Attribute.Media; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::author.author', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::author.author', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + +export interface ApiPartnerPartner extends Schema.CollectionType { + collectionName: 'partners'; + info: { + singularName: 'partner'; + pluralName: 'partners'; + displayName: 'Partner'; + }; + options: { + draftAndPublish: true; + }; + attributes: { + partnerName: Attribute.String & Attribute.Required; + logoUrl: Attribute.String; + logoImage: Attribute.Media; + websiteUrl: Attribute.String; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::partner.partner', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::partner.partner', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + +export interface ApiPersonPerson extends Schema.CollectionType { + collectionName: 'people'; + info: { + singularName: 'person'; + pluralName: 'people'; + displayName: 'person'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + attributes: { + name: Attribute.String & Attribute.Required; + workTitle: Attribute.String; + employeeLink: Attribute.String; + profilePicture: Attribute.Media; + profilePictureURL: Attribute.String; + role: Attribute.Enumeration< + ['Researchers', 'PhD candidates', 'Engineers', 'Contact us'] + > & + Attribute.Required; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::person.person', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::person.person', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + +export interface ApiPhDProjectPhDProject extends Schema.CollectionType { + collectionName: 'ph_d_projects'; + info: { + singularName: 'ph-d-project'; + pluralName: 'ph-d-projects'; + displayName: 'PhD Project'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + attributes: { + name: Attribute.String & Attribute.Required; + title: Attribute.String; + keywords: Attribute.String; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::ph-d-project.ph-d-project', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::ph-d-project.ph-d-project', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + }; +} + declare module '@strapi/types' { export module Shared { export interface ContentTypes { @@ -897,9 +969,6 @@ declare module '@strapi/types' { 'admin::api-token-permission': AdminApiTokenPermission; 'admin::transfer-token': AdminTransferToken; 'admin::transfer-token-permission': AdminTransferTokenPermission; - 'api::article.article': ApiArticleArticle; - 'api::author.author': ApiAuthorAuthor; - 'api::partner.partner': ApiPartnerPartner; 'plugin::upload.file': PluginUploadFile; 'plugin::upload.folder': PluginUploadFolder; 'plugin::content-releases.release': PluginContentReleasesRelease; @@ -908,6 +977,11 @@ declare module '@strapi/types' { 'plugin::users-permissions.permission': PluginUsersPermissionsPermission; 'plugin::users-permissions.role': PluginUsersPermissionsRole; 'plugin::users-permissions.user': PluginUsersPermissionsUser; + 'api::article.article': ApiArticleArticle; + 'api::author.author': ApiAuthorAuthor; + 'api::partner.partner': ApiPartnerPartner; + 'api::person.person': ApiPersonPerson; + 'api::ph-d-project.ph-d-project': ApiPhDProjectPhDProject; } } } diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 43d1187..b4426a6 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -6,6 +6,10 @@ const nextConfig = { protocol: "https", hostname: "**", }, + { + protocol: "http", + hostname: "localhost", + }, ], }, }; diff --git a/frontend/src/__generated__/gql.ts b/frontend/src/__generated__/gql.ts index 9c29717..3dc1b96 100644 --- a/frontend/src/__generated__/gql.ts +++ b/frontend/src/__generated__/gql.ts @@ -14,6 +14,8 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ */ const documents = { "\nquery GET_PARTNERS {\n partners {\n data {\n attributes {\n partnerName\n logoUrl\n websiteUrl\n logoImage {\n data {\n attributes {\n url\n }\n }\n }\n }\n }\n }\n }\n": types.Get_PartnersDocument, + "\nquery PhDProjects {\n phDProjects {\n data {\n attributes {\n name\n title\n keywords\n }\n id\n }\n }\n}\n": types.PhDProjectsDocument, + "\nquery People {\n people {\n data {\n id\n attributes {\n name\n workTitle\n employeeLink\n profilePicture {\n data {\n attributes {\n url\n }\n }\n }\n profilePictureURL\n role\n }\n }\n }\n }\n": types.PeopleDocument, "query ArticleWithSlug($articlesFilters: ArticleFiltersInput) {\n articles(filters: $articlesFilters) {\n data {\n attributes {\n author {\n data {\n attributes {\n name\n avatar {\n data {\n attributes {\n url\n }\n }\n }\n }\n }\n }\n body\n coverImage {\n data {\n attributes {\n url\n }\n }\n }\n datePublished\n subtitle\n title\n }\n }\n }\n }\n \n ": types.ArticleWithSlugDocument, "\nquery GET_ARTICLES {\n articles(sort: [\"datePublished:desc\"]) {\n data {\n id\n attributes {\n author {\n data {\n attributes {\n name\n avatar {\n data {\n attributes {\n url\n }\n }\n }\n }\n }\n }\n title\n datePublished\n body\n coverImage {\n data {\n attributes {\n url\n }\n }\n }\n createdAt\n publishedAt\n slug\n subtitle\n }\n }\n }\n}\n": types.Get_ArticlesDocument, }; @@ -36,6 +38,14 @@ export function gql(source: string): unknown; * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql(source: "\nquery GET_PARTNERS {\n partners {\n data {\n attributes {\n partnerName\n logoUrl\n websiteUrl\n logoImage {\n data {\n attributes {\n url\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\nquery GET_PARTNERS {\n partners {\n data {\n attributes {\n partnerName\n logoUrl\n websiteUrl\n logoImage {\n data {\n attributes {\n url\n }\n }\n }\n }\n }\n }\n }\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\nquery PhDProjects {\n phDProjects {\n data {\n attributes {\n name\n title\n keywords\n }\n id\n }\n }\n}\n"): (typeof documents)["\nquery PhDProjects {\n phDProjects {\n data {\n attributes {\n name\n title\n keywords\n }\n id\n }\n }\n}\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\nquery People {\n people {\n data {\n id\n attributes {\n name\n workTitle\n employeeLink\n profilePicture {\n data {\n attributes {\n url\n }\n }\n }\n profilePictureURL\n role\n }\n }\n }\n }\n"): (typeof documents)["\nquery People {\n people {\n data {\n id\n attributes {\n name\n workTitle\n employeeLink\n profilePicture {\n data {\n attributes {\n url\n }\n }\n }\n profilePictureURL\n role\n }\n }\n }\n }\n"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/frontend/src/__generated__/graphql.ts b/frontend/src/__generated__/graphql.ts index b65cdb6..1c25fd3 100644 --- a/frontend/src/__generated__/graphql.ts +++ b/frontend/src/__generated__/graphql.ts @@ -316,6 +316,13 @@ export enum Enum_Contentreleasesreleaseaction_Type { Unpublish = 'unpublish' } +export enum Enum_Person_Role { + ContactUs = 'Contact_us', + Engineers = 'Engineers', + PhDCandidates = 'PhD_candidates', + Researchers = 'Researchers' +} + export type FileInfoInput = { alternativeText?: InputMaybe; caption?: InputMaybe; @@ -347,7 +354,7 @@ export type FloatFilterInput = { startsWith?: InputMaybe; }; -export type GenericMorph = Article | Author | ContentReleasesRelease | ContentReleasesReleaseAction | I18NLocale | Partner | UploadFile | UploadFolder | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser; +export type GenericMorph = Article | Author | ContentReleasesRelease | ContentReleasesReleaseAction | I18NLocale | Partner | Person | PhDProject | UploadFile | UploadFolder | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser; export type I18NLocale = { __typename?: 'I18NLocale'; @@ -469,6 +476,8 @@ export type Mutation = { createContentReleasesRelease?: Maybe; createContentReleasesReleaseAction?: Maybe; createPartner?: Maybe; + createPerson?: Maybe; + createPhDProject?: Maybe; createUploadFile?: Maybe; createUploadFolder?: Maybe; /** Create a new role */ @@ -480,6 +489,8 @@ export type Mutation = { deleteContentReleasesRelease?: Maybe; deleteContentReleasesReleaseAction?: Maybe; deletePartner?: Maybe; + deletePerson?: Maybe; + deletePhDProject?: Maybe; deleteUploadFile?: Maybe; deleteUploadFolder?: Maybe; /** Delete an existing role */ @@ -503,6 +514,8 @@ export type Mutation = { updateContentReleasesReleaseAction?: Maybe; updateFileInfo: UploadFileEntityResponse; updatePartner?: Maybe; + updatePerson?: Maybe; + updatePhDProject?: Maybe; updateUploadFile?: Maybe; updateUploadFolder?: Maybe; /** Update an existing role */ @@ -545,6 +558,16 @@ export type MutationCreatePartnerArgs = { }; +export type MutationCreatePersonArgs = { + data: PersonInput; +}; + + +export type MutationCreatePhDProjectArgs = { + data: PhDProjectInput; +}; + + export type MutationCreateUploadFileArgs = { data: UploadFileInput; }; @@ -590,6 +613,16 @@ export type MutationDeletePartnerArgs = { }; +export type MutationDeletePersonArgs = { + id: Scalars['ID']['input']; +}; + + +export type MutationDeletePhDProjectArgs = { + id: Scalars['ID']['input']; +}; + + export type MutationDeleteUploadFileArgs = { id: Scalars['ID']['input']; }; @@ -686,6 +719,18 @@ export type MutationUpdatePartnerArgs = { }; +export type MutationUpdatePersonArgs = { + data: PersonInput; + id: Scalars['ID']['input']; +}; + + +export type MutationUpdatePhDProjectArgs = { + data: PhDProjectInput; + id: Scalars['ID']['input']; +}; + + export type MutationUpdateUploadFileArgs = { data: UploadFileInput; id: Scalars['ID']['input']; @@ -782,6 +827,108 @@ export type PartnerInput = { websiteUrl?: InputMaybe; }; +export type Person = { + __typename?: 'Person'; + createdAt?: Maybe; + employeeLink?: Maybe; + name: Scalars['String']['output']; + profilePicture?: Maybe; + profilePictureURL?: Maybe; + publishedAt?: Maybe; + role: Enum_Person_Role; + updatedAt?: Maybe; + workTitle?: Maybe; +}; + +export type PersonEntity = { + __typename?: 'PersonEntity'; + attributes?: Maybe; + id?: Maybe; +}; + +export type PersonEntityResponse = { + __typename?: 'PersonEntityResponse'; + data?: Maybe; +}; + +export type PersonEntityResponseCollection = { + __typename?: 'PersonEntityResponseCollection'; + data: Array; + meta: ResponseCollectionMeta; +}; + +export type PersonFiltersInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + employeeLink?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + profilePictureURL?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + updatedAt?: InputMaybe; + workTitle?: InputMaybe; +}; + +export type PersonInput = { + employeeLink?: InputMaybe; + name?: InputMaybe; + profilePicture?: InputMaybe; + profilePictureURL?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + workTitle?: InputMaybe; +}; + +export type PhDProject = { + __typename?: 'PhDProject'; + createdAt?: Maybe; + keywords?: Maybe; + name: Scalars['String']['output']; + publishedAt?: Maybe; + title?: Maybe; + updatedAt?: Maybe; +}; + +export type PhDProjectEntity = { + __typename?: 'PhDProjectEntity'; + attributes?: Maybe; + id?: Maybe; +}; + +export type PhDProjectEntityResponse = { + __typename?: 'PhDProjectEntityResponse'; + data?: Maybe; +}; + +export type PhDProjectEntityResponseCollection = { + __typename?: 'PhDProjectEntityResponseCollection'; + data: Array; + meta: ResponseCollectionMeta; +}; + +export type PhDProjectFiltersInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + id?: InputMaybe; + keywords?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + title?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type PhDProjectInput = { + keywords?: InputMaybe; + name?: InputMaybe; + publishedAt?: InputMaybe; + title?: InputMaybe; +}; + export enum PublicationState { Live = 'LIVE', Preview = 'PREVIEW' @@ -802,6 +949,10 @@ export type Query = { me?: Maybe; partner?: Maybe; partners?: Maybe; + people?: Maybe; + person?: Maybe; + phDProject?: Maybe; + phDProjects?: Maybe; uploadFile?: Maybe; uploadFiles?: Maybe; uploadFolder?: Maybe; @@ -888,6 +1039,32 @@ export type QueryPartnersArgs = { }; +export type QueryPeopleArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + publicationState?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type QueryPersonArgs = { + id?: InputMaybe; +}; + + +export type QueryPhDProjectArgs = { + id?: InputMaybe; +}; + + +export type QueryPhDProjectsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + publicationState?: InputMaybe; + sort?: InputMaybe>>; +}; + + export type QueryUploadFileArgs = { id?: InputMaybe; }; @@ -1343,6 +1520,16 @@ export type Get_PartnersQueryVariables = Exact<{ [key: string]: never; }>; export type Get_PartnersQuery = { __typename?: 'Query', partners?: { __typename?: 'PartnerEntityResponseCollection', data: Array<{ __typename?: 'PartnerEntity', attributes?: { __typename?: 'Partner', partnerName: string, logoUrl?: string | null, websiteUrl?: string | null, logoImage?: { __typename?: 'UploadFileEntityResponse', data?: { __typename?: 'UploadFileEntity', attributes?: { __typename?: 'UploadFile', url: string } | null } | null } | null } | null }> } | null }; +export type PhDProjectsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type PhDProjectsQuery = { __typename?: 'Query', phDProjects?: { __typename?: 'PhDProjectEntityResponseCollection', data: Array<{ __typename?: 'PhDProjectEntity', id?: string | null, attributes?: { __typename?: 'PhDProject', name: string, title?: string | null, keywords?: string | null } | null }> } | null }; + +export type PeopleQueryVariables = Exact<{ [key: string]: never; }>; + + +export type PeopleQuery = { __typename?: 'Query', people?: { __typename?: 'PersonEntityResponseCollection', data: Array<{ __typename?: 'PersonEntity', id?: string | null, attributes?: { __typename?: 'Person', name: string, workTitle?: string | null, employeeLink?: string | null, profilePictureURL?: string | null, role: Enum_Person_Role, profilePicture?: { __typename?: 'UploadFileEntityResponse', data?: { __typename?: 'UploadFileEntity', attributes?: { __typename?: 'UploadFile', url: string } | null } | null } | null } | null }> } | null }; + export type ArticleWithSlugQueryVariables = Exact<{ articlesFilters?: InputMaybe; }>; @@ -1357,5 +1544,7 @@ export type Get_ArticlesQuery = { __typename?: 'Query', articles?: { __typename? export const Get_PartnersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GET_PARTNERS"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"partners"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"partnerName"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}},{"kind":"Field","name":{"kind":"Name","value":"logoImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const PhDProjectsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"PhDProjects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"phDProjects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"keywords"}}]}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode; +export const PeopleDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"People"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"people"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"workTitle"}},{"kind":"Field","name":{"kind":"Name","value":"employeeLink"}},{"kind":"Field","name":{"kind":"Name","value":"profilePicture"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"profilePictureURL"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const ArticleWithSlugDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ArticleWithSlug"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"articlesFilters"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ArticleFiltersInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"articles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"Variable","name":{"kind":"Name","value":"articlesFilters"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"coverImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"datePublished"}},{"kind":"Field","name":{"kind":"Name","value":"subtitle"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const Get_ArticlesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GET_ARTICLES"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"articles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"sort"},"value":{"kind":"ListValue","values":[{"kind":"StringValue","value":"datePublished:desc","block":false}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"datePublished"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"coverImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attributes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"publishedAt"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"subtitle"}}]}}]}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/frontend/src/app/(about)/team/page.tsx b/frontend/src/app/(about)/team/page.tsx index b10f519..6867f6f 100644 --- a/frontend/src/app/(about)/team/page.tsx +++ b/frontend/src/app/(about)/team/page.tsx @@ -1,7 +1,193 @@ -export default function TeamPage() { +export const runtime = "edge"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import Link from "next/link"; +import { getClient } from "@/lib/ApolloClient"; +import { gql } from "@/__generated__/gql"; + +import { + Table, + TableBody, + TableCaption, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; + +const GET_PROJECTS = gql(` +query PhDProjects { + phDProjects { + data { + attributes { + name + title + keywords + } + id + } + } +} +`); + +const GET_PEOPLE = gql(` +query People { + people { + data { + id + attributes { + name + workTitle + employeeLink + profilePicture { + data { + attributes { + url + } + } + } + profilePictureURL + role + } + } + } + } +`); + +export default async function TeamPage() { + const graphqlData = await getClient().query({ + query: GET_PROJECTS, + }); + + const projectsData = graphqlData?.data?.phDProjects?.data || []; + + const graphqlPeopleData = await getClient().query({ + query: GET_PEOPLE, + }); + + const peopleData = graphqlPeopleData?.data?.people?.data || []; + + const filterPeopleByRole = (role: string) => { + return peopleData.filter( + (person) => person.attributes?.role.replace("_", " ") === role, + ); + }; return ( -
-

Team

+
+ {peopleData.length == 0 ? ( +
There are no team members to show.
+ ) : ( +
+

+ MEET THE TEAM +

+ {[ + "Researchers", + "PhD candidates", + "Engineers", + "Contact us", + ].map((role, index) => ( +
+ {" "} + {/* Add margin bottom */} +

+ {role} +

{" "} + {/* Increase margin bottom and adjust font size */} +
+ {filterPeopleByRole(role || "").map( + (person, index) => { + const name = + person.attributes?.name || ""; + const employeeLink = + person.attributes?.employeeLink || + ""; + const workTitle = + person.attributes?.workTitle || ""; + const profilePictureURL = + person.attributes + ?.profilePictureURL || ""; + + return ( + + + + +

{name}

+
+
+ + + + + {name} + + +
+

+ {workTitle} +

+
+
+
+ + ); + }, + )} +
+
+ ))} +
+ )} + {projectsData.length == 0 ? ( +
There are no projects to show.
+ ) : ( +
+

+ Ongoing PhD Projects +

+ + Ongoing PhD Projects + + + Name + + Title (PhD title) + + Keywords + + + + {projectsData.map((project, index) => { + const name = project.attributes?.name || ""; + const title = project.attributes?.title || ""; + const keywords = + project.attributes?.keywords || ""; + return ( + + + {name} + + + {title} + + {keywords} + + ); + })} + +
+
+ )}
); } diff --git a/frontend/src/components/ui/table.tsx b/frontend/src/components/ui/table.tsx new file mode 100644 index 0000000..2f06543 --- /dev/null +++ b/frontend/src/components/ui/table.tsx @@ -0,0 +1,120 @@ +import * as React from "react"; + +import { cn } from "@/lib/utils"; + +const Table = React.forwardRef< + HTMLTableElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+ + +)); +Table.displayName = "Table"; + +const TableHeader = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableHeader.displayName = "TableHeader"; + +const TableBody = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableBody.displayName = "TableBody"; + +const TableFooter = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + tr]:last:border-b-0", + className, + )} + {...props} + /> +)); +TableFooter.displayName = "TableFooter"; + +const TableRow = React.forwardRef< + HTMLTableRowElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableRow.displayName = "TableRow"; + +const TableHead = React.forwardRef< + HTMLTableCellElement, + React.ThHTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +TableHead.displayName = "TableHead"; + +const TableCell = React.forwardRef< + HTMLTableCellElement, + React.TdHTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableCell.displayName = "TableCell"; + +const TableCaption = React.forwardRef< + HTMLTableCaptionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +TableCaption.displayName = "TableCaption"; + +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption, +};