diff --git a/backend/package-lock.json b/backend/package-lock.json index 6245f67..c743554 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -25,8 +25,8 @@ "styled-components": "5.3.3" }, "engines": { - "node": ">=18.0.0 <=20.x.x", - "npm": ">=6.0.0" + "node": "20.x.x", + "npm": ">=10.4.0" } }, "node_modules/@ampproject/remapping": { diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 4678774..f419bb7 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + images: { + domains: ["www.ntnu.edu"], // Add your domain(s) here + }, +}; export default nextConfig; diff --git a/frontend/src/app/(about)/partners/page.tsx b/frontend/src/app/(about)/partners/page.tsx index 2eb7bf4..a37c7af 100644 --- a/frontend/src/app/(about)/partners/page.tsx +++ b/frontend/src/app/(about)/partners/page.tsx @@ -1,7 +1,65 @@ +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import Image from "next/image"; +import Link from "next/link"; + +interface PartnerInfo { + id: number; + name: string; + src: string; + URL: string; +} + export default function PartnersPage() { + const data: PartnerInfo[] = [ + { + id: 1, + name: "NTNU OCEANS", + src: "https://www.ntnu.edu/documents/919518/981063644/oceans_webbanner_TSO_1200x168.jpg/1b662672-7ddd-4a62-aec0-9d11aa30faa7?t=1432636474377", + URL: "https://www.ntnu.edu/oceans", + }, + { + id: 2, + name: "NTNU AMOS", + src: "https://www.ntnu.edu/documents/1277411470/0/amos_logo.png/5549873f-873d-4ea7-b772-47bd690f4db9?t=1514638950115", + URL: "https://www.ntnu.edu/amos", + }, + { + id: 3, + name: "The Research Council of Norway", + src: "https://www.forskningsradet.no/siteassets/logoer/forskningsradet-logo-en-svart.svg", + URL: "https://www.forskningsradet.no/en/", + }, + ]; + return ( -
-

Partners

+
+

+ Partners and Collaborators +

+ {data.map((partner) => ( + + + + +

{partner.name}

+
+
+ + {partner.name} + +
+ + ))}
); } diff --git a/frontend/src/types/strapi.ts b/frontend/src/types/strapi.ts index f851c71..54e21b6 100644 --- a/frontend/src/types/strapi.ts +++ b/frontend/src/types/strapi.ts @@ -3,1068 +3,1122 @@ * Do not make direct changes to the file. */ - export interface paths { - "/articles": { - get: operations["get/articles"]; - post: operations["post/articles"]; - }; - "/articles/{id}": { - get: operations["get/articles/{id}"]; - put: operations["put/articles/{id}"]; - delete: operations["delete/articles/{id}"]; - }; - "/authors": { - get: operations["get/authors"]; - post: operations["post/authors"]; - }; - "/authors/{id}": { - get: operations["get/authors/{id}"]; - put: operations["put/authors/{id}"]; - delete: operations["delete/authors/{id}"]; - }; - "/upload": { - /** @description Upload files */ - post: { - /** @description Upload files */ - requestBody: { - content: { - "multipart/form-data": { - /** @description The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3). */ - path?: string; - /** @description The ID of the entry which the file(s) will be linked to */ - refId?: string; - /** @description The unique ID (uid) of the model which the file(s) will be linked to (api::restaurant.restaurant). */ - ref?: string; - /** @description The field of the entry which the file(s) will be precisely linked to. */ - field?: string; - files: string[]; - }; - }; - }; - responses: { - /** @description response */ - 200: { - content: { - "application/json": components["schemas"]["UploadFile"][]; - }; - }; - }; - }; - }; - "/upload?id={id}": { - /** @description Upload file information */ - post: { - parameters: { - query: { - /** @description File id */ - id: string; - }; - }; - /** @description Upload files */ - requestBody: { - content: { - "multipart/form-data": { - fileInfo?: { - name?: string; - alternativeText?: string; - caption?: string; - }; - /** Format: binary */ - files?: string; - }; - }; - }; - responses: { - /** @description response */ - 200: { - content: { - "application/json": components["schemas"]["UploadFile"][]; - }; - }; - }; - }; - }; - "/upload/files": { - get: { - responses: { - /** @description Get a list of files */ - 200: { - content: { - "application/json": components["schemas"]["UploadFile"][]; - }; - }; - }; - }; - }; - "/upload/files/{id}": { - get: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Get a specific file */ - 200: { - content: { - "application/json": components["schemas"]["UploadFile"]; - }; - }; - }; - }; - delete: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Delete a file */ - 200: { - content: { - "application/json": components["schemas"]["UploadFile"]; - }; - }; - }; - }; - }; - "/connect/{provider}": { - /** - * Login with a provider - * @description Redirects to provider login before being redirect to /auth/{provider}/callback - */ - get: { - parameters: { - path: { - /** @description Provider name */ - provider: string; - }; - }; - responses: { - /** @description Redirect response */ - 301: { - content: never; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - }; - "/auth/local": { - /** - * Local login - * @description Returns a jwt token and user info - */ - post: { - requestBody: { - content: { - /** - * @example { - * "identifier": "foobar", - * "password": "Test1234" - * } - */ - "application/json": { - identifier?: string; - password?: string; - }; - }; - }; - responses: { - /** @description Connection */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/articles": { + get: operations["get/articles"]; + post: operations["post/articles"]; + }; + "/articles/{id}": { + get: operations["get/articles/{id}"]; + put: operations["put/articles/{id}"]; + delete: operations["delete/articles/{id}"]; + }; + "/authors": { + get: operations["get/authors"]; + post: operations["post/authors"]; + }; + "/authors/{id}": { + get: operations["get/authors/{id}"]; + put: operations["put/authors/{id}"]; + delete: operations["delete/authors/{id}"]; + }; + "/upload": { + /** @description Upload files */ + post: { + /** @description Upload files */ + requestBody: { + content: { + "multipart/form-data": { + /** @description The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3). */ + path?: string; + /** @description The ID of the entry which the file(s) will be linked to */ + refId?: string; + /** @description The unique ID (uid) of the model which the file(s) will be linked to (api::restaurant.restaurant). */ + ref?: string; + /** @description The field of the entry which the file(s) will be precisely linked to. */ + field?: string; + files: string[]; + }; + }; + }; + responses: { + /** @description response */ + 200: { + content: { + "application/json": components["schemas"]["UploadFile"][]; + }; + }; + }; + }; }; - }; - "/auth/local/register": { - /** - * Register a user - * @description Returns a jwt token and user info - */ - post: { - requestBody: { - content: { - /** - * @example { - * "username": "foobar", - * "email": "foo.bar@strapi.io", - * "password": "Test1234" - * } - */ - "application/json": { - username?: string; - email?: string; - password?: string; - }; - }; - }; - responses: { - /** @description Successful registration */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/upload?id={id}": { + /** @description Upload file information */ + post: { + parameters: { + query: { + /** @description File id */ + id: string; + }; + }; + /** @description Upload files */ + requestBody: { + content: { + "multipart/form-data": { + fileInfo?: { + name?: string; + alternativeText?: string; + caption?: string; + }; + /** Format: binary */ + files?: string; + }; + }; + }; + responses: { + /** @description response */ + 200: { + content: { + "application/json": components["schemas"]["UploadFile"][]; + }; + }; + }; + }; }; - }; - "/auth/{provider}/callback": { - /** Default Callback from provider auth */ - get: { - parameters: { - path: { - /** @description Provider name */ - provider: string; - }; - }; - responses: { - /** @description Returns a jwt token and user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/upload/files": { + get: { + responses: { + /** @description Get a list of files */ + 200: { + content: { + "application/json": components["schemas"]["UploadFile"][]; + }; + }; + }; + }; }; - }; - "/auth/forgot-password": { - /** Send rest password email */ - post: { - requestBody: { - content: { - /** - * @example { - * "email": "foo.bar@strapi.io" - * } - */ - "application/json": { - email?: string; - }; - }; - }; - responses: { - /** @description Returns ok */ - 200: { - content: { - "application/json": { - /** @enum {string} */ - ok?: true; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/upload/files/{id}": { + get: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** @description Get a specific file */ + 200: { + content: { + "application/json": components["schemas"]["UploadFile"]; + }; + }; + }; + }; + delete: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** @description Delete a file */ + 200: { + content: { + "application/json": components["schemas"]["UploadFile"]; + }; + }; + }; + }; }; - }; - "/auth/reset-password": { - /** Rest user password */ - post: { - requestBody: { - content: { - /** - * @example { - * "password": "Test1234", - * "passwordConfirmation": "Test1234", - * "code": "zertyoaizndoianzodianzdonaizdoinaozdnia" - * } - */ - "application/json": { - password?: string; - passwordConfirmation?: string; - code?: string; - }; - }; - }; - responses: { - /** @description Returns a jwt token and user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/connect/{provider}": { + /** + * Login with a provider + * @description Redirects to provider login before being redirect to /auth/{provider}/callback + */ + get: { + parameters: { + path: { + /** @description Provider name */ + provider: string; + }; + }; + responses: { + /** @description Redirect response */ + 301: { + content: never; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/auth/change-password": { - /** Update user's own password */ - post: { - requestBody: { - content: { - "application/json": { - password: string; - currentPassword: string; - passwordConfirmation: string; - }; - }; - }; - responses: { - /** @description Returns a jwt token and user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/local": { + /** + * Local login + * @description Returns a jwt token and user info + */ + post: { + requestBody: { + content: { + /** + * @example { + * "identifier": "foobar", + * "password": "Test1234" + * } + */ + "application/json": { + identifier?: string; + password?: string; + }; + }; + }; + responses: { + /** @description Connection */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/auth/email-confirmation": { - /** Confirm user email */ - get: { - parameters: { - query?: { - /** @description confirmation token received by email */ - confirmation?: string; - }; - }; - responses: { - /** @description Redirects to the configure email confirmation redirect url */ - 301: { - content: never; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/local/register": { + /** + * Register a user + * @description Returns a jwt token and user info + */ + post: { + requestBody: { + content: { + /** + * @example { + * "username": "foobar", + * "email": "foo.bar@strapi.io", + * "password": "Test1234" + * } + */ + "application/json": { + username?: string; + email?: string; + password?: string; + }; + }; + }; + responses: { + /** @description Successful registration */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/auth/send-email-confirmation": { - /** Send confirmation email */ - post: { - requestBody: { - content: { - "application/json": { - email?: string; - }; - }; - }; - responses: { - /** @description Returns email and boolean to confirm email was sent */ - 200: { - content: { - "application/json": { - email?: string; - /** @enum {string} */ - sent?: true; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/{provider}/callback": { + /** Default Callback from provider auth */ + get: { + parameters: { + path: { + /** @description Provider name */ + provider: string; + }; + }; + responses: { + /** @description Returns a jwt token and user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users-permissions/permissions": { - /** Get default generated permissions */ - get: { - responses: { - /** @description Returns the permissions tree */ - 200: { - content: { - "application/json": { - permissions?: components["schemas"]["Users-Permissions-PermissionsTree"]; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/forgot-password": { + /** Send rest password email */ + post: { + requestBody: { + content: { + /** + * @example { + * "email": "foo.bar@strapi.io" + * } + */ + "application/json": { + email?: string; + }; + }; + }; + responses: { + /** @description Returns ok */ + 200: { + content: { + "application/json": { + /** @enum {string} */ + ok?: true; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users-permissions/roles": { - /** List roles */ - get: { - responses: { - /** @description Returns list of roles */ - 200: { - content: { - "application/json": { - roles?: (components["schemas"]["Users-Permissions-Role"] & { - nb_users?: number; - })[]; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/reset-password": { + /** Rest user password */ + post: { + requestBody: { + content: { + /** + * @example { + * "password": "Test1234", + * "passwordConfirmation": "Test1234", + * "code": "zertyoaizndoianzodianzdonaizdoinaozdnia" + * } + */ + "application/json": { + password?: string; + passwordConfirmation?: string; + code?: string; + }; + }; + }; + responses: { + /** @description Returns a jwt token and user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - /** Create a role */ - post: { - requestBody: components["requestBodies"]["Users-Permissions-RoleRequest"]; - responses: { - /** @description Returns ok if the role was create */ - 200: { - content: { - "application/json": { - /** @enum {string} */ - ok?: true; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/change-password": { + /** Update user's own password */ + post: { + requestBody: { + content: { + "application/json": { + password: string; + currentPassword: string; + passwordConfirmation: string; + }; + }; + }; + responses: { + /** @description Returns a jwt token and user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-UserRegistration"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users-permissions/roles/{id}": { - /** Get a role */ - get: { - parameters: { - path: { - /** @description role Id */ - id: string; - }; - }; - responses: { - /** @description Returns the role */ - 200: { - content: { - "application/json": { - role?: components["schemas"]["Users-Permissions-Role"]; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/email-confirmation": { + /** Confirm user email */ + get: { + parameters: { + query?: { + /** @description confirmation token received by email */ + confirmation?: string; + }; + }; + responses: { + /** @description Redirects to the configure email confirmation redirect url */ + 301: { + content: never; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users-permissions/roles/{role}": { - /** Update a role */ - put: { - parameters: { - path: { - /** @description role Id */ - role: string; - }; - }; - requestBody: components["requestBodies"]["Users-Permissions-RoleRequest"]; - responses: { - /** @description Returns ok if the role was udpated */ - 200: { - content: { - "application/json": { - /** @enum {string} */ - ok?: true; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/auth/send-email-confirmation": { + /** Send confirmation email */ + post: { + requestBody: { + content: { + "application/json": { + email?: string; + }; + }; + }; + responses: { + /** @description Returns email and boolean to confirm email was sent */ + 200: { + content: { + "application/json": { + email?: string; + /** @enum {string} */ + sent?: true; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - /** Delete a role */ - delete: { - parameters: { - path: { - /** @description role Id */ - role: string; - }; - }; - responses: { - /** @description Returns ok if the role was delete */ - 200: { - content: { - "application/json": { - /** @enum {string} */ - ok?: true; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users-permissions/permissions": { + /** Get default generated permissions */ + get: { + responses: { + /** @description Returns the permissions tree */ + 200: { + content: { + "application/json": { + permissions?: components["schemas"]["Users-Permissions-PermissionsTree"]; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users": { - /** Get list of users */ - get: { - responses: { - /** @description Returns an array of users */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"][]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users-permissions/roles": { + /** List roles */ + get: { + responses: { + /** @description Returns list of roles */ + 200: { + content: { + "application/json": { + roles?: (components["schemas"]["Users-Permissions-Role"] & { + nb_users?: number; + })[]; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; + /** Create a role */ + post: { + requestBody: components["requestBodies"]["Users-Permissions-RoleRequest"]; + responses: { + /** @description Returns ok if the role was create */ + 200: { + content: { + "application/json": { + /** @enum {string} */ + ok?: true; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - /** Create a user */ - post: { - requestBody: { - content: { - /** - * @example { - * "username": "foo", - * "email": "foo@strapi.io", - * "password": "foo-password" - * } - */ - "application/json": { - email: string; - username: string; - password: string; - }; - }; - }; - responses: { - /** @description Returns created user info */ - 201: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"] & { - role?: components["schemas"]["Users-Permissions-Role"]; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users-permissions/roles/{id}": { + /** Get a role */ + get: { + parameters: { + path: { + /** @description role Id */ + id: string; + }; + }; + responses: { + /** @description Returns the role */ + 200: { + content: { + "application/json": { + role?: components["schemas"]["Users-Permissions-Role"]; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users/{id}": { - /** Get a user */ - get: { - parameters: { - path: { - /** @description user Id */ - id: string; - }; - }; - responses: { - /** @description Returns a user */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users-permissions/roles/{role}": { + /** Update a role */ + put: { + parameters: { + path: { + /** @description role Id */ + role: string; + }; + }; + requestBody: components["requestBodies"]["Users-Permissions-RoleRequest"]; + responses: { + /** @description Returns ok if the role was udpated */ + 200: { + content: { + "application/json": { + /** @enum {string} */ + ok?: true; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; + /** Delete a role */ + delete: { + parameters: { + path: { + /** @description role Id */ + role: string; + }; + }; + responses: { + /** @description Returns ok if the role was delete */ + 200: { + content: { + "application/json": { + /** @enum {string} */ + ok?: true; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - /** Update a user */ - put: { - parameters: { - path: { - /** @description user Id */ - id: string; - }; - }; - requestBody: { - content: { - /** - * @example { - * "username": "foo", - * "email": "foo@strapi.io", - * "password": "foo-password" - * } - */ - "application/json": { - email: string; - username: string; - password: string; - }; - }; - }; - responses: { - /** @description Returns updated user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"] & { - role?: components["schemas"]["Users-Permissions-Role"]; - }; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users": { + /** Get list of users */ + get: { + responses: { + /** @description Returns an array of users */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"][]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; + /** Create a user */ + post: { + requestBody: { + content: { + /** + * @example { + * "username": "foo", + * "email": "foo@strapi.io", + * "password": "foo-password" + * } + */ + "application/json": { + email: string; + username: string; + password: string; + }; + }; + }; + responses: { + /** @description Returns created user info */ + 201: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"] & { + role?: components["schemas"]["Users-Permissions-Role"]; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - /** Delete a user */ - delete: { - parameters: { - path: { - /** @description user Id */ - id: string; - }; - }; - responses: { - /** @description Returns deleted user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users/{id}": { + /** Get a user */ + get: { + parameters: { + path: { + /** @description user Id */ + id: string; + }; + }; + responses: { + /** @description Returns a user */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; + /** Update a user */ + put: { + parameters: { + path: { + /** @description user Id */ + id: string; + }; + }; + requestBody: { + content: { + /** + * @example { + * "username": "foo", + * "email": "foo@strapi.io", + * "password": "foo-password" + * } + */ + "application/json": { + email: string; + username: string; + password: string; + }; + }; + }; + responses: { + /** @description Returns updated user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"] & { + role?: components["schemas"]["Users-Permissions-Role"]; + }; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; + /** Delete a user */ + delete: { + parameters: { + path: { + /** @description user Id */ + id: string; + }; + }; + responses: { + /** @description Returns deleted user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users/me": { - /** Get authenticated user info */ - get: { - responses: { - /** @description Returns user info */ - 200: { - content: { - "application/json": components["schemas"]["Users-Permissions-User"]; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users/me": { + /** Get authenticated user info */ + get: { + responses: { + /** @description Returns user info */ + 200: { + content: { + "application/json": components["schemas"]["Users-Permissions-User"]; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; - "/users/count": { - /** Get user count */ - get: { - responses: { - /** @description Returns a number */ - 200: { - content: { - "application/json": number; - }; - }; - /** @description Error */ - default: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; + "/users/count": { + /** Get user count */ + get: { + responses: { + /** @description Returns a number */ + 200: { + content: { + "application/json": number; + }; + }; + /** @description Error */ + default: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; }; - }; } export type webhooks = Record; export interface components { - schemas: { - Error: { - data?: Record | Record[] | null; - error: { - status?: number; - name?: string; - message?: string; - details?: Record; - }; - }; - ArticleRequest: { - data: { - title?: string; - subtitle?: string; - /** @example string or id */ - coverImage?: number | string; - /** Format: date */ - datePublished?: string; - body?: unknown; - /** @example string or id */ - author?: number | string; - slug?: string; - }; - }; - ArticleListResponseDataItem: { - id?: number; - attributes?: components["schemas"]["Article"]; - }; - ArticleListResponse: { - data?: components["schemas"]["ArticleListResponseDataItem"][]; - meta?: { - pagination?: { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; - }; - }; - }; - Article: { - title?: string; - subtitle?: string; - coverImage?: { - data?: { - id?: number; - attributes?: { - name?: string; - alternativeText?: string; - caption?: string; - width?: number; - height?: number; - formats?: unknown; - hash?: string; - ext?: string; - mime?: string; - /** Format: float */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: unknown; - related?: { - data?: { - id?: number; - attributes?: Record; - }[]; + schemas: { + Error: { + data?: Record | Record[] | null; + error: { + status?: number; + name?: string; + message?: string; + details?: Record; }; - folder?: { - data?: { - id?: number; - attributes?: { - name?: string; - pathId?: number; - parent?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - children?: { - data?: { - id?: number; - attributes?: Record; - }[]; - }; - files?: { - data?: { - id?: number; - attributes?: { - name?: string; - alternativeText?: string; - caption?: string; - width?: number; - height?: number; - formats?: unknown; - hash?: string; - ext?: string; - mime?: string; - /** Format: float */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: unknown; - related?: { + }; + ArticleRequest: { + data: { + title?: string; + subtitle?: string; + /** @example string or id */ + coverImage?: number | string; + /** Format: date */ + datePublished?: string; + body?: unknown; + /** @example string or id */ + author?: number | string; + slug?: string; + }; + }; + ArticleListResponseDataItem: { + id?: number; + attributes?: components["schemas"]["Article"]; + }; + ArticleListResponse: { + data?: components["schemas"]["ArticleListResponseDataItem"][]; + meta?: { + pagination?: { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; + }; + }; + }; + Article: { + title?: string; + subtitle?: string; + coverImage?: { + data?: { + id?: number; + attributes?: { + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { data?: { id?: number; attributes?: Record; - }[]; - }; - folder?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - folderPath?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { + }[]; + }; + folder?: { data?: { - id?: number; - attributes?: { - firstname?: string; - lastname?: string; - username?: string; - /** Format: email */ - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: { - data?: { - id?: number; - attributes?: { - name?: string; - code?: string; - description?: string; - users?: { - data?: { - id?: number; - attributes?: Record; - }[]; + id?: number; + attributes?: { + name?: string; + pathId?: number; + parent?: { + data?: { + id?: number; + attributes?: Record; }; - permissions?: { - data?: { - id?: number; - attributes?: { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: { - data?: { - id?: number; - attributes?: Record; - }; + }; + children?: { + data?: { + id?: number; + attributes?: Record; + }[]; + }; + files?: { + data?: { + id?: number; + attributes?: { + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }[]; + }; + folder?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; }; + folderPath?: string; /** Format: date-time */ createdAt?: string; /** Format: date-time */ updatedAt?: string; createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; + data?: { + id?: number; + attributes?: { + firstname?: string; + lastname?: string; + username?: string; + /** Format: email */ + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: { + data?: { + id?: number; + attributes?: { + name?: string; + code?: string; + description?: string; + users?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }[]; + }; + permissions?: { + data?: { + id?: number; + attributes?: { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; + }[]; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; + }[]; + }; + blocked?: boolean; + preferedLanguage?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; + }; }; updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; }; - }; - }[]; - }; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { + }; + }[]; + }; + path?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { id?: number; attributes?: Record; - }; }; - updatedBy?: { - data?: { + }; + updatedBy?: { + data?: { id?: number; attributes?: Record; - }; }; - }; - }[]; - }; - blocked?: boolean; - preferedLanguage?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; + }; }; - }; }; - }; - updatedBy?: { + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + updatedBy?: { data?: { - id?: number; - attributes?: Record; + id?: number; + attributes?: Record; }; - }; }; - }[]; - }; - path?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; }; - }; }; - }; }; - folderPath?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - }; - }; - }; - /** Format: date */ - datePublished?: string; - body?: unknown; - author?: { - data?: { - id?: number; - attributes?: { - name?: string; - avatar?: { - data?: { - id?: number; - attributes?: { - name?: string; - alternativeText?: string; - caption?: string; - width?: number; - height?: number; - formats?: unknown; - hash?: string; - ext?: string; - mime?: string; - /** Format: float */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: unknown; - related?: { - data?: { - id?: number; - attributes?: Record; - }[]; - }; - folder?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - folderPath?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; + /** Format: date */ + datePublished?: string; + body?: unknown; + author?: { + data?: { + id?: number; + attributes?: { + name?: string; + avatar?: { + data?: { + id?: number; + attributes?: { + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + data?: { + id?: number; + attributes?: Record; + }[]; + }; + folder?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + }; + }[]; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; }; - }; - }[]; + }; }; + slug?: string; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -1072,435 +1126,446 @@ export interface components { /** Format: date-time */ publishedAt?: string; createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; + data?: { + id?: number; + attributes?: Record; + }; }; updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - }; - }; - }; - slug?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - /** Format: date-time */ - publishedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - }; - ArticleResponseDataObject: { - id?: number; - attributes?: components["schemas"]["Article"]; - }; - ArticleResponse: { - data?: components["schemas"]["ArticleResponseDataObject"]; - meta?: Record; - }; - AuthorRequest: { - data: { - name?: string; - avatar?: (number | string)[]; - }; - }; - AuthorListResponseDataItem: { - id?: number; - attributes?: components["schemas"]["Author"]; - }; - AuthorListResponse: { - data?: components["schemas"]["AuthorListResponseDataItem"][]; - meta?: { - pagination?: { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; - }; - }; - }; - Author: { - name?: string; - avatar?: { - data?: { - id?: number; - attributes?: { - name?: string; - alternativeText?: string; - caption?: string; - width?: number; - height?: number; - formats?: unknown; - hash?: string; - ext?: string; - mime?: string; - /** Format: float */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: unknown; - related?: { data?: { id?: number; attributes?: Record; - }[]; - }; - folder?: { + }; + }; + }; + ArticleResponseDataObject: { + id?: number; + attributes?: components["schemas"]["Article"]; + }; + ArticleResponse: { + data?: components["schemas"]["ArticleResponseDataObject"]; + meta?: Record; + }; + AuthorRequest: { + data: { + name?: string; + avatar?: (number | string)[]; + }; + }; + AuthorListResponseDataItem: { + id?: number; + attributes?: components["schemas"]["Author"]; + }; + AuthorListResponse: { + data?: components["schemas"]["AuthorListResponseDataItem"][]; + meta?: { + pagination?: { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; + }; + }; + }; + Author: { + name?: string; + avatar?: { data?: { - id?: number; - attributes?: { - name?: string; - pathId?: number; - parent?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - children?: { - data?: { - id?: number; - attributes?: Record; - }[]; - }; - files?: { - data?: { - id?: number; - attributes?: { - name?: string; - alternativeText?: string; - caption?: string; - width?: number; - height?: number; - formats?: unknown; - hash?: string; - ext?: string; - mime?: string; - /** Format: float */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: unknown; - related?: { - data?: { - id?: number; - attributes?: Record; - }[]; - }; - folder?: { - data?: { + id?: number; + attributes?: { + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + data?: { id?: number; attributes?: Record; - }; - }; - folderPath?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { + }[]; + }; + folder?: { + data?: { id?: number; attributes?: { - firstname?: string; - lastname?: string; - username?: string; - /** Format: email */ - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: { - data?: { - id?: number; - attributes?: { - name?: string; - code?: string; - description?: string; - users?: { - data?: { - id?: number; - attributes?: Record; - }[]; - }; - permissions?: { - data?: { - id?: number; - attributes?: { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: { + name?: string; + pathId?: number; + parent?: { + data?: { + id?: number; + attributes?: Record; + }; + }; + children?: { + data?: { + id?: number; + attributes?: Record; + }[]; + }; + files?: { + data?: { + id?: number; + attributes?: { + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }[]; + }; + folder?: { data?: { - id?: number; - attributes?: Record; + id?: number; + attributes?: Record< + string, + never + >; }; - }; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { data?: { - id?: number; - attributes?: Record; + id?: number; + attributes?: { + firstname?: string; + lastname?: string; + username?: string; + /** Format: email */ + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: { + data?: { + id?: number; + attributes?: { + name?: string; + code?: string; + description?: string; + users?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }[]; + }; + permissions?: { + data?: { + id?: number; + attributes?: { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; + }[]; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; + }[]; + }; + blocked?: boolean; + preferedLanguage?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record< + string, + never + >; + }; + }; + }; }; - }; - updatedBy?: { + }; + updatedBy?: { data?: { - id?: number; - attributes?: Record; + id?: number; + attributes?: Record< + string, + never + >; }; - }; }; - }[]; - }; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; }; - }; + }[]; + }; + path?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { + id?: number; + attributes?: Record; }; - }[]; - }; - blocked?: boolean; - preferedLanguage?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; + updatedBy?: { + data?: { + id?: number; + attributes?: Record; + }; }; - }; }; - }; }; - updatedBy?: { - data?: { + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + createdBy?: { + data?: { id?: number; attributes?: Record; - }; }; - }; - }[]; - }; - path?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; + }; + updatedBy?: { + data?: { + id?: number; + attributes?: Record; + }; + }; }; - }; - }; - }; - folderPath?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - createdBy?: { + }[]; + }; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { data?: { - id?: number; - attributes?: Record; + id?: number; + attributes?: Record; }; - }; - updatedBy?: { + }; + updatedBy?: { data?: { - id?: number; - attributes?: Record; - }; - }; - }; - }[]; - }; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - /** Format: date-time */ - publishedAt?: string; - createdBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - updatedBy?: { - data?: { - id?: number; - attributes?: Record; - }; - }; - }; - AuthorResponseDataObject: { - id?: number; - attributes?: components["schemas"]["Author"]; - }; - AuthorResponse: { - data?: components["schemas"]["AuthorResponseDataObject"]; - meta?: Record; - }; - UploadFile: { - id?: number; - name?: string; - alternativeText?: string; - caption?: string; - /** Format: integer */ - width?: number; - /** Format: integer */ - height?: number; - formats?: number; - hash?: string; - ext?: string; - mime?: string; - /** Format: double */ - size?: number; - url?: string; - previewUrl?: string; - provider?: string; - provider_metadata?: Record; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - }; - "Users-Permissions-Role": { - id?: number; - name?: string; - description?: string; - type?: string; - /** Format: date-time */ - createdAt?: string; - /** Format: date-time */ - updatedAt?: string; - }; - "Users-Permissions-User": { - /** @example 1 */ - id?: number; - /** @example foo.bar */ - username?: string; - /** @example foo.bar@strapi.io */ - email?: string; - /** @example local */ - provider?: string; - /** @example true */ - confirmed?: boolean; - /** @example false */ - blocked?: boolean; - /** - * Format: date-time - * @example 2022-06-02T08:32:06.258Z - */ - createdAt?: string; - /** - * Format: date-time - * @example 2022-06-02T08:32:06.267Z - */ - updatedAt?: string; - }; - "Users-Permissions-UserRegistration": { - /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c */ - jwt?: string; - user?: components["schemas"]["Users-Permissions-User"]; - }; - "Users-Permissions-PermissionsTree": { - [key: string]: { - /** @description every controller of the api */ - controllers?: { - [key: string]: { + id?: number; + attributes?: Record; + }; + }; + }; + AuthorResponseDataObject: { + id?: number; + attributes?: components["schemas"]["Author"]; + }; + AuthorResponse: { + data?: components["schemas"]["AuthorResponseDataObject"]; + meta?: Record; + }; + UploadFile: { + id?: number; + name?: string; + alternativeText?: string; + caption?: string; + /** Format: integer */ + width?: number; + /** Format: integer */ + height?: number; + formats?: number; + hash?: string; + ext?: string; + mime?: string; + /** Format: double */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: Record; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + }; + "Users-Permissions-Role": { + id?: number; + name?: string; + description?: string; + type?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + }; + "Users-Permissions-User": { + /** @example 1 */ + id?: number; + /** @example foo.bar */ + username?: string; + /** @example foo.bar@strapi.io */ + email?: string; + /** @example local */ + provider?: string; + /** @example true */ + confirmed?: boolean; + /** @example false */ + blocked?: boolean; + /** + * Format: date-time + * @example 2022-06-02T08:32:06.258Z + */ + createdAt?: string; + /** + * Format: date-time + * @example 2022-06-02T08:32:06.267Z + */ + updatedAt?: string; + }; + "Users-Permissions-UserRegistration": { + /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c */ + jwt?: string; + user?: components["schemas"]["Users-Permissions-User"]; + }; + "Users-Permissions-PermissionsTree": { [key: string]: { - enabled?: boolean; - policy?: string; + /** @description every controller of the api */ + controllers?: { + [key: string]: { + [key: string]: { + enabled?: boolean; + policy?: string; + }; + }; + }; }; - }; }; - }; }; - }; - responses: never; - parameters: never; - requestBodies: { - "Users-Permissions-RoleRequest": { - content: { - /** - * @example { - * "name": "foo", - * "description": "role foo", - * "permissions": { - * "api::content-type.content-type": { - * "controllers": { - * "controllerA": { - * "find": { - * "enabled": true - * } - * } - * } - * } - * } - * } - */ - "application/json": { - name?: string; - description?: string; - type?: string; - permissions?: components["schemas"]["Users-Permissions-PermissionsTree"]; + responses: never; + parameters: never; + requestBodies: { + "Users-Permissions-RoleRequest": { + content: { + /** + * @example { + * "name": "foo", + * "description": "role foo", + * "permissions": { + * "api::content-type.content-type": { + * "controllers": { + * "controllerA": { + * "find": { + * "enabled": true + * } + * } + * } + * } + * } + * } + */ + "application/json": { + name?: string; + description?: string; + type?: string; + permissions?: components["schemas"]["Users-Permissions-PermissionsTree"]; + }; + }; }; - }; }; - }; - headers: never; - pathItems: never; + headers: never; + pathItems: never; } export type $defs = Record; @@ -1508,503 +1573,502 @@ export type $defs = Record; export type external = Record; export interface operations { - - "get/articles": { - parameters: { - query?: { - /** @description Sort by attributes ascending (asc) or descending (desc) */ - sort?: string; - /** @description Return page/pageSize (default: true) */ - "pagination[withCount]"?: boolean; - /** @description Page number (default: 0) */ - "pagination[page]"?: number; - /** @description Page size (default: 25) */ - "pagination[pageSize]"?: number; - /** @description Offset value (default: 0) */ - "pagination[start]"?: number; - /** @description Number of entities to return (default: 25) */ - "pagination[limit]"?: number; - /** @description Fields to return (ex: title,author) */ - fields?: string; - /** @description Relations to return */ - populate?: string; - /** @description Filters to apply */ - filters?: Record; - /** @description Locale to apply */ - locale?: string; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["ArticleListResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "post/articles": { - requestBody: { - content: { - "application/json": components["schemas"]["ArticleRequest"]; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["ArticleResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "get/articles/{id}": { - parameters: { - path: { - id: number; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["ArticleResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "put/articles/{id}": { - parameters: { - path: { - id: number; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ArticleRequest"]; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["ArticleResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "delete/articles/{id}": { - parameters: { - path: { - id: number; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": number; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "get/authors": { - parameters: { - query?: { - /** @description Sort by attributes ascending (asc) or descending (desc) */ - sort?: string; - /** @description Return page/pageSize (default: true) */ - "pagination[withCount]"?: boolean; - /** @description Page number (default: 0) */ - "pagination[page]"?: number; - /** @description Page size (default: 25) */ - "pagination[pageSize]"?: number; - /** @description Offset value (default: 0) */ - "pagination[start]"?: number; - /** @description Number of entities to return (default: 25) */ - "pagination[limit]"?: number; - /** @description Fields to return (ex: title,author) */ - fields?: string; - /** @description Relations to return */ - populate?: string; - /** @description Filters to apply */ - filters?: Record; - /** @description Locale to apply */ - locale?: string; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["AuthorListResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; + "get/articles": { + parameters: { + query?: { + /** @description Sort by attributes ascending (asc) or descending (desc) */ + sort?: string; + /** @description Return page/pageSize (default: true) */ + "pagination[withCount]"?: boolean; + /** @description Page number (default: 0) */ + "pagination[page]"?: number; + /** @description Page size (default: 25) */ + "pagination[pageSize]"?: number; + /** @description Offset value (default: 0) */ + "pagination[start]"?: number; + /** @description Number of entities to return (default: 25) */ + "pagination[limit]"?: number; + /** @description Fields to return (ex: title,author) */ + fields?: string; + /** @description Relations to return */ + populate?: string; + /** @description Filters to apply */ + filters?: Record; + /** @description Locale to apply */ + locale?: string; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["ArticleListResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - }; - "post/authors": { - requestBody: { - content: { - "application/json": components["schemas"]["AuthorRequest"]; - }; + "post/articles": { + requestBody: { + content: { + "application/json": components["schemas"]["ArticleRequest"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["ArticleResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["AuthorResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; + "get/articles/{id}": { + parameters: { + path: { + id: number; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["ArticleResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - }; - "get/authors/{id}": { - parameters: { - path: { - id: number; - }; + "put/articles/{id}": { + parameters: { + path: { + id: number; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ArticleRequest"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["ArticleResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["AuthorResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; + "delete/articles/{id}": { + parameters: { + path: { + id: number; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": number; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - }; - "put/authors/{id}": { - parameters: { - path: { - id: number; - }; + "get/authors": { + parameters: { + query?: { + /** @description Sort by attributes ascending (asc) or descending (desc) */ + sort?: string; + /** @description Return page/pageSize (default: true) */ + "pagination[withCount]"?: boolean; + /** @description Page number (default: 0) */ + "pagination[page]"?: number; + /** @description Page size (default: 25) */ + "pagination[pageSize]"?: number; + /** @description Offset value (default: 0) */ + "pagination[start]"?: number; + /** @description Number of entities to return (default: 25) */ + "pagination[limit]"?: number; + /** @description Fields to return (ex: title,author) */ + fields?: string; + /** @description Relations to return */ + populate?: string; + /** @description Filters to apply */ + filters?: Record; + /** @description Locale to apply */ + locale?: string; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["AuthorListResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - requestBody: { - content: { - "application/json": components["schemas"]["AuthorRequest"]; - }; + "post/authors": { + requestBody: { + content: { + "application/json": components["schemas"]["AuthorRequest"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["AuthorResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": components["schemas"]["AuthorResponse"]; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; + "get/authors/{id}": { + parameters: { + path: { + id: number; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["AuthorResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - }; - "delete/authors/{id}": { - parameters: { - path: { - id: number; - }; + "put/authors/{id}": { + parameters: { + path: { + id: number; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AuthorRequest"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["AuthorResponse"]; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": number; - }; - }; - /** @description Bad Request */ - 400: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Unauthorized */ - 401: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Forbidden */ - 403: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Not Found */ - 404: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - content: { - "application/json": components["schemas"]["Error"]; - }; - }; + "delete/authors/{id}": { + parameters: { + path: { + id: number; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": number; + }; + }; + /** @description Bad Request */ + 400: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Forbidden */ + 403: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Not Found */ + 404: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + /** @description Internal Server Error */ + 500: { + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; }; - }; }