From bd52f5c996bc4bf8d1df7f864ec56ba1f654f28f Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Sun, 3 Nov 2024 15:34:29 +0100 Subject: [PATCH] vehicles --- .../article/content-types/article/schema.json | 9 +- .../collection-lookup/schema.json | 5 + .../content-types/operation/schema.json | 4 +- .../vehicle/content-types/vehicle/schema.json | 53 + src/api/vehicle/controllers/vehicle.ts | 7 + src/api/vehicle/routes/vehicle.ts | 7 + src/api/vehicle/services/vehicle.ts | 7 + src/components/shared/list.json | 2 +- .../1.0.0/full_documentation.json | 1772 ++++++++++++++++- types/generated/components.d.ts | 2 +- types/generated/contentTypes.d.ts | 44 +- 11 files changed, 1892 insertions(+), 20 deletions(-) create mode 100644 src/api/vehicle/content-types/vehicle/schema.json create mode 100644 src/api/vehicle/controllers/vehicle.ts create mode 100644 src/api/vehicle/routes/vehicle.ts create mode 100644 src/api/vehicle/services/vehicle.ts diff --git a/src/api/article/content-types/article/schema.json b/src/api/article/content-types/article/schema.json index f8c9d9f..68f71e9 100644 --- a/src/api/article/content-types/article/schema.json +++ b/src/api/article/content-types/article/schema.json @@ -37,10 +37,7 @@ "multiple": false, "required": true, "allowedTypes": [ - "images", - "files", - "videos", - "audios" + "images" ], "pluginOptions": {} }, @@ -49,9 +46,7 @@ "multiple": true, "required": false, "allowedTypes": [ - "images", - "files", - "videos" + "images" ], "pluginOptions": {} }, diff --git a/src/api/collection-lookup/content-types/collection-lookup/schema.json b/src/api/collection-lookup/content-types/collection-lookup/schema.json index 47cf802..5302923 100644 --- a/src/api/collection-lookup/content-types/collection-lookup/schema.json +++ b/src/api/collection-lookup/content-types/collection-lookup/schema.json @@ -19,6 +19,11 @@ "collection": { "type": "uid", "required": true + }, + "imageItem": { + "type": "boolean", + "default": false, + "required": true } } } diff --git a/src/api/operation/content-types/operation/schema.json b/src/api/operation/content-types/operation/schema.json index 1aa2466..ed0ad7d 100644 --- a/src/api/operation/content-types/operation/schema.json +++ b/src/api/operation/content-types/operation/schema.json @@ -33,9 +33,7 @@ "multiple": true, "required": false, "allowedTypes": [ - "images", - "files", - "videos" + "images" ], "pluginOptions": {} }, diff --git a/src/api/vehicle/content-types/vehicle/schema.json b/src/api/vehicle/content-types/vehicle/schema.json new file mode 100644 index 0000000..a72e1cb --- /dev/null +++ b/src/api/vehicle/content-types/vehicle/schema.json @@ -0,0 +1,53 @@ +{ + "kind": "collectionType", + "collectionName": "vehicles", + "info": { + "singularName": "vehicle", + "pluralName": "vehicles", + "displayName": "Fahrzeuge" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "title": { + "pluginOptions": {}, + "type": "string", + "required": true + }, + "description": { + "pluginOptions": {}, + "type": "string", + "required": true + }, + "slug": { + "pluginOptions": {}, + "type": "uid", + "targetField": "title", + "required": true + }, + "content": { + "pluginOptions": {}, + "type": "blocks" + }, + "image": { + "type": "media", + "multiple": false, + "required": true, + "allowedTypes": [ + "images" + ], + "pluginOptions": {} + }, + "attachment": { + "type": "media", + "multiple": true, + "required": false, + "allowedTypes": [ + "images" + ], + "pluginOptions": {} + } + } +} diff --git a/src/api/vehicle/controllers/vehicle.ts b/src/api/vehicle/controllers/vehicle.ts new file mode 100644 index 0000000..270c0d4 --- /dev/null +++ b/src/api/vehicle/controllers/vehicle.ts @@ -0,0 +1,7 @@ +/** + * vehicle controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::vehicle.vehicle'); diff --git a/src/api/vehicle/routes/vehicle.ts b/src/api/vehicle/routes/vehicle.ts new file mode 100644 index 0000000..7fe170b --- /dev/null +++ b/src/api/vehicle/routes/vehicle.ts @@ -0,0 +1,7 @@ +/** + * vehicle router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::vehicle.vehicle'); diff --git a/src/api/vehicle/services/vehicle.ts b/src/api/vehicle/services/vehicle.ts new file mode 100644 index 0000000..6b9d33c --- /dev/null +++ b/src/api/vehicle/services/vehicle.ts @@ -0,0 +1,7 @@ +/** + * vehicle service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::vehicle.vehicle'); diff --git a/src/components/shared/list.json b/src/components/shared/list.json index ada7676..7aa84e4 100644 --- a/src/components/shared/list.json +++ b/src/components/shared/list.json @@ -12,7 +12,7 @@ "default": false, "required": true }, - "sammlungs_referenz": { + "lookup": { "type": "relation", "relation": "oneToOne", "target": "api::collection-lookup.collection-lookup" diff --git a/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 453bd67..b2b7b98 100644 --- a/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-11-03T11:11:26.368Z" + "x-generation-date": "2024-11-03T14:29:07.198Z" }, "x-strapi-config": { "plugins": [ @@ -3214,6 +3214,512 @@ "operationId": "delete/pages/{id}" } }, + "/vehicles": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleListResponse" + } + } + } + }, + "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": [ + "Vehicle" + ], + "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", + "additionalProperties": true + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/vehicles" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleResponse" + } + } + } + }, + "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": [ + "Vehicle" + ], + "parameters": [], + "operationId": "post/vehicles", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleRequest" + } + } + } + } + } + }, + "/vehicles/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleResponse" + } + } + } + }, + "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": [ + "Vehicle" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/vehicles/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleResponse" + } + } + } + }, + "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": [ + "Vehicle" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/vehicles/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VehicleRequest" + } + } + } + } + }, + "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": [ + "Vehicle" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/vehicles/{id}" + } + }, "/upload": { "post": { "description": "Upload files", @@ -5936,7 +6442,8 @@ "data": { "required": [ "reference", - "collection" + "collection", + "imageItem" ], "type": "object", "properties": { @@ -5946,6 +6453,9 @@ "collection": { "type": "string" }, + "imageItem": { + "type": "boolean" + }, "locale": { "type": "string" }, @@ -6006,7 +6516,8 @@ "type": "object", "required": [ "reference", - "collection" + "collection", + "imageItem" ], "properties": { "id": { @@ -6021,6 +6532,9 @@ "collection": { "type": "string" }, + "imageItem": { + "type": "boolean" + }, "createdAt": { "type": "string", "format": "date-time" @@ -6327,6 +6841,9 @@ "collection": { "type": "string" }, + "imageItem": { + "type": "boolean" + }, "createdAt": { "type": "string", "format": "date-time" @@ -8000,7 +8517,7 @@ "enable_detail": { "type": "boolean" }, - "sammlungs_referenz": { + "lookup": { "type": "object", "properties": { "id": { @@ -10400,6 +10917,1253 @@ } } }, + "VehicleRequest": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "required": [ + "title", + "description", + "slug", + "image" + ], + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "content": {}, + "image": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + }, + "attachment": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + } + } + } + } + } + }, + "VehicleListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vehicle" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer", + "minimum": 25 + }, + "pageCount": { + "type": "integer", + "maximum": 1 + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "Vehicle": { + "type": "object", + "required": [ + "title", + "description", + "slug", + "image" + ], + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "content": {}, + "image": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "pathId": { + "type": "integer" + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "permissions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + }, + "path": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, + "attachment": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "content": {}, + "image": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, + "attachment": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "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": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "VehicleResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Vehicle" + }, + "meta": { + "type": "object" + } + } + }, "UploadFile": { "properties": { "id": { diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index 42ced92..00b7873 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -180,7 +180,7 @@ export interface SharedList extends Struct.ComponentSchema { enable_detail: Schema.Attribute.Boolean & Schema.Attribute.Required & Schema.Attribute.DefaultTo; - sammlungs_referenz: Schema.Attribute.Relation< + lookup: Schema.Attribute.Relation< 'oneToOne', 'api::collection-lookup.collection-lookup' >; diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 1b34dc6..ee00a61 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -381,15 +381,14 @@ export interface ApiArticleArticle extends Struct.CollectionTypeSchema { draftAndPublish: true; }; attributes: { - attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>; + attachment: Schema.Attribute.Media<'images', true>; content: Schema.Attribute.Blocks; createdAt: Schema.Attribute.DateTime; createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; date: Schema.Attribute.Date & Schema.Attribute.Required; description: Schema.Attribute.String & Schema.Attribute.Required; - image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'> & - Schema.Attribute.Required; + image: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation< 'oneToMany', @@ -422,6 +421,9 @@ export interface ApiCollectionLookupCollectionLookup createdAt: Schema.Attribute.DateTime; createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; + imageItem: Schema.Attribute.Boolean & + Schema.Attribute.Required & + Schema.Attribute.DefaultTo; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation< 'oneToMany', @@ -548,7 +550,7 @@ export interface ApiOperationOperation extends Struct.CollectionTypeSchema { draftAndPublish: true; }; attributes: { - attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>; + attachment: Schema.Attribute.Media<'images', true>; content: Schema.Attribute.Blocks; createdAt: Schema.Attribute.DateTime; createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & @@ -611,6 +613,39 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema { }; } +export interface ApiVehicleVehicle extends Struct.CollectionTypeSchema { + collectionName: 'vehicles'; + info: { + displayName: 'Fahrzeuge'; + pluralName: 'vehicles'; + singularName: 'vehicle'; + }; + options: { + draftAndPublish: true; + }; + attributes: { + attachment: Schema.Attribute.Media<'images', true>; + content: Schema.Attribute.Blocks; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + description: Schema.Attribute.String & Schema.Attribute.Required; + image: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'api::vehicle.vehicle' + > & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + slug: Schema.Attribute.UID<'title'> & Schema.Attribute.Required; + title: Schema.Attribute.String & Schema.Attribute.Required; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + export interface PluginContentReleasesRelease extends Struct.CollectionTypeSchema { collectionName: 'strapi_releases'; @@ -1123,6 +1158,7 @@ declare module '@strapi/strapi' { 'api::homepage.homepage': ApiHomepageHomepage; 'api::operation.operation': ApiOperationOperation; 'api::page.page': ApiPagePage; + 'api::vehicle.vehicle': ApiVehicleVehicle; 'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; 'plugin::i18n.locale': PluginI18NLocale;