From 1186463e11e8cef62653240ec5f88f6ea736bcec Mon Sep 17 00:00:00 2001 From: jvdb Date: Thu, 15 Jan 2026 09:38:47 +0100 Subject: [PATCH] 0.12.17 : change ad feature --- package-lock.json | 44 ++- package.json | 2 +- src/api/ad/content-types/ad/schema.json | 18 +- src/api/ad/controllers/ad.ts | 45 ++- .../1.0.0/full_documentation.json | 332 +++++++++++++++--- types/generated/contentTypes.d.ts | 6 +- 6 files changed, 391 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65daf8a..11f5363 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "harmony-back", - "version": "0.11.6", + "version": "0.12.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "harmony-back", - "version": "0.11.6", + "version": "0.12.16", "dependencies": { "@strapi/plugin-cloud": "5.8.1", "@strapi/plugin-documentation": "^5.12.6", @@ -373,6 +373,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.600.0.tgz", "integrity": "sha512-7+I8RWURGfzvChyNQSyj5/tKrqRbzRl7H+BnTOf/4Vsw1nFOi5ROhlhD4X/Y0QCTacxnaoNcIrqnY7uGGvVRzw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", @@ -450,6 +451,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.600.0.tgz", "integrity": "sha512-KQG97B7LvTtTiGmjlrG1LRAY8wUvCQzrmZVV5bjrJ/1oXAU7DITYwVbSJeX9NWg6hDuSk0VE3MFwIXS2SvfLIA==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", @@ -2234,6 +2236,7 @@ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.2.tgz", "integrity": "sha512-DZ6ONbs8qdJK0fdN7AB82CgI6tYXf4HWk1wSVa0+9bhVznCuuvhQtX8bFBoy3dv8rZSQqUd8GvhVAcielcidrA==", "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.5.0", "style-mod": "^4.1.0", @@ -6051,6 +6054,7 @@ "resolved": "https://registry.npmjs.org/@strapi/admin/-/admin-5.8.1.tgz", "integrity": "sha512-Rb6MMOhyjzYJktG4T8CheAIaMHwc5zqMBRz7oSlwgR7Y8VJ7YiN+1sn4fGRD5r4K0+7MLK2CbsYy3piu42GZdw==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@casl/ability": "6.5.0", "@internationalized/date": "3.5.4", @@ -6180,6 +6184,7 @@ "resolved": "https://registry.npmjs.org/@strapi/content-manager/-/content-manager-5.8.1.tgz", "integrity": "sha512-aaJKJ3sLDerFvztEOs6sfcvAu7b3bDuDbj5Of0v4iEeGY0vWqFm2TKA6EeTSqKWsVDsM/BFmmxDVsgYqddqxiA==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@radix-ui/react-toolbar": "1.0.4", "@reduxjs/toolkit": "1.9.7", @@ -6415,6 +6420,7 @@ "resolved": "https://registry.npmjs.org/@strapi/data-transfer/-/data-transfer-5.8.1.tgz", "integrity": "sha512-uIyYhoJOldzkAyeJi2tJ5JzWfTnHiVX79trLKZcZjyL357ipG3CUVhyoFOmy0xpNlBplq0v1RUGJ/GZBpNpkVA==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@strapi/logger": "5.8.1", "@strapi/types": "5.8.1", @@ -6580,6 +6586,7 @@ "resolved": "https://registry.npmjs.org/@strapi/icons/-/icons-2.0.0-rc.14.tgz", "integrity": "sha512-6kamFHcsoFpffp96HmFGgpM8FDezwb86sJ4c3Ydp7+eTgtEsHd8yLekAQhpaWXd2ZsHwRDbLLR0Tu1orgvRVYg==", "license": "MIT", + "peer": true, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0", @@ -7109,6 +7116,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -7791,6 +7799,7 @@ "resolved": "https://registry.npmjs.org/@strapi/icons/-/icons-2.0.0-rc.23.tgz", "integrity": "sha512-sJ7iQ8kZ28z3mTkDm/gnsWIQljK3w0UaOk2irO77iSmbh+uR3W9gDF5CP/4Z+KDUqnjDke2kaOIPRI67etvi9A==", "license": "MIT", + "peer": true, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0", @@ -8160,6 +8169,7 @@ "resolved": "https://registry.npmjs.org/@strapi/strapi/-/strapi-5.8.1.tgz", "integrity": "sha512-i1l+CaLNjHdZ6o0GLwlK2eBRmQ/hQwC3Tl4aYK7IsRfbyeT0+1ScEtJF5WIn51ENmvnD+BCual6oz5D3T3g02A==", "license": "SEE LICENSE IN LICENSE", + "peer": true, "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "0.5.15", "@strapi/admin": "5.8.1", @@ -8648,6 +8658,7 @@ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.1.0.tgz", "integrity": "sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -9089,6 +9100,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz", "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -9099,6 +9111,7 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.5.tgz", "integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==", "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^18.0.0" } @@ -9507,6 +9520,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -10155,6 +10169,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -11613,6 +11628,7 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.21.0" }, @@ -11961,7 +11977,8 @@ "version": "0.0.1413902", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1413902.tgz", "integrity": "sha512-yRtvFD8Oyk7C9Os3GmnFZLu53yAfsnyw1s+mLmHHUK0GQEc9zthHWvS1r67Zqzm5t7v56PILHIVZ7kmFMaL2yQ==", - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "peer": true }, "node_modules/dezalgo": { "version": "1.0.4", @@ -12366,6 +12383,7 @@ "integrity": "sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==", "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -13381,6 +13399,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -15567,6 +15586,7 @@ "resolved": "https://registry.npmjs.org/koa/-/koa-2.15.2.tgz", "integrity": "sha512-MXTeZH3M6AJ8ukW2QZ8wqO3Dcdfh2WRRmjCBkEP+NhKNCiqlO5RDqHmSnsyNrbRJrdjyvIGSJho4vQiWgQJSVA==", "license": "MIT", + "peer": true, "dependencies": { "accepts": "^1.3.5", "cache-content-type": "^1.0.0", @@ -18830,6 +18850,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -19531,6 +19552,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -19582,6 +19604,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -19729,6 +19752,7 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -19800,6 +19824,7 @@ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.2.tgz", "integrity": "sha512-O81EWqNJWqvlN/a7eTudAdQm0TbI7hw+WIi7OwwMcTn5JMyZ0ibTFNGz+t+Lju0df4LcqowCegcrK22lB1q9Kw==", "license": "MIT", + "peer": true, "dependencies": { "@remix-run/router": "1.21.1", "react-router": "6.28.2" @@ -20040,6 +20065,7 @@ "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.9.2" } @@ -20601,6 +20627,7 @@ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -21023,6 +21050,7 @@ "resolved": "https://registry.npmjs.org/slate/-/slate-0.94.1.tgz", "integrity": "sha512-GH/yizXr1ceBoZ9P9uebIaHe3dC/g6Plpf9nlUwnvoyf6V1UOYrRwkabtOCd3ZfIGxomY4P7lfgLr7FPH8/BKA==", "license": "MIT", + "peer": true, "dependencies": { "immer": "^9.0.6", "is-plain-object": "^5.0.0", @@ -21534,6 +21562,7 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.14.tgz", "integrity": "sha512-KtfwhU5jw7UoxdM0g6XU9VZQFV4do+KrM8idiVCH5h4v49W+3p3yMe0icYwJgZQZepa5DbH04Qv8P0/RdcLcgg==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -21771,6 +21800,7 @@ "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -22050,6 +22080,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { "node": ">=10" }, @@ -22090,6 +22121,7 @@ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.10.tgz", "integrity": "sha512-v10rtOFojrjW9og3T+6wAKeJaGMuojU87DXGZ33sfs+554wgPTRG+s07Ag1BjPZI85Y5QPVouPI63JQ6fcQM5w==", "license": "Apache-2.0", + "peer": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -22121,6 +22153,7 @@ "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz", "integrity": "sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw==", "license": "MIT", + "peer": true, "dependencies": { "handlebars": "^4.7.7" }, @@ -22133,6 +22166,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -22476,6 +22510,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.14.tgz", "integrity": "sha512-TFQLuwWLPms+NBNlh0D9LZQ+HXW471COABxw/9TEUBrjuHMo9BrYBPrN/SYAwIuVL+rLerycxiLT41t4f5MZpA==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.20.1", "postcss": "^8.4.38", @@ -22977,6 +23012,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -23107,6 +23143,7 @@ "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.26.1.tgz", "integrity": "sha512-khZGfAeJx6I8K9zKohEWWYN6KDlVw2DHownoe+6Vtwj1LP9WFgegXnVMSkZ/dBEBtXFwrkkydsaPFlB7f8wU2A==", "license": "MIT", + "peer": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", @@ -23137,6 +23174,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/package.json b/package.json index a13d3c5..19f4998 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "harmony-back", - "version": "0.12.16", + "version": "0.12.17", "private": true, "description": "A Strapi application", "scripts": { diff --git a/src/api/ad/content-types/ad/schema.json b/src/api/ad/content-types/ad/schema.json index b482b88..e7af88d 100644 --- a/src/api/ad/content-types/ad/schema.json +++ b/src/api/ad/content-types/ad/schema.json @@ -42,11 +42,6 @@ "applies": { "type": "integer" }, - "location": { - "type": "component", - "repeatable": false, - "component": "address.full-address" - }, "contactname": { "type": "string" }, @@ -58,6 +53,19 @@ }, "featured": { "type": "boolean" + }, + "location": { + "type": "text" + }, + "medias": { + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ], + "type": "media", + "multiple": true } } } diff --git a/src/api/ad/controllers/ad.ts b/src/api/ad/controllers/ad.ts index 17818e2..8c89b0c 100644 --- a/src/api/ad/controllers/ad.ts +++ b/src/api/ad/controllers/ad.ts @@ -2,6 +2,47 @@ * ad controller */ -import { factories } from '@strapi/strapi' +import { factories } from "@strapi/strapi"; -export default factories.createCoreController('api::ad.ad'); +export default factories.createCoreController("api::ad.ad", ({ strapi }) => ({ + async create(ctx) { + // 1) Prépare le payload + upload banner + const body = ctx.request.body as any; + const data = + typeof body?.data === "string" ? JSON.parse(body.data) : body?.data || {}; + data.author = ctx.state.user.id; + data.medias = []; + + const bannerInput = (ctx.request.files as any)?.medias; + if (bannerInput) { + const files = Array.isArray(bannerInput) ? bannerInput : [bannerInput]; + + for (const file of files) { + const uploaded = await strapi + .plugin("upload") + .service("upload") + .upload({ + data: { + fileInfo: { + alternativeText: data?.name || "media", + caption: "media", + name: file.originalFilename || "media", + }, + }, + files: file, + }); + + if (uploaded?.[0]?.id) { + data.medias.push(uploaded[0].id); + } + } + } + + //delete data.medias; + + // 2) Crée le group via core controller + ctx.request.body = { data }; + const response = await super.create(ctx); // { data: { id, attributes }, meta: {} } + return response; + }, +})); 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 1ee4c95..2cca1d6 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": "2025-12-12T18:29:01.167Z" + "x-generation-date": "2026-01-15T08:01:40.043Z" }, "x-strapi-config": { "plugins": [ @@ -16533,9 +16533,6 @@ "applies": { "type": "integer" }, - "location": { - "$ref": "#/components/schemas/AddressFullAddressComponent" - }, "contactname": { "type": "string" }, @@ -16548,6 +16545,23 @@ "featured": { "type": "boolean" }, + "location": { + "type": "string" + }, + "medias": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + } + }, "locale": { "type": "string" }, @@ -20282,9 +20296,6 @@ "applies": { "type": "integer" }, - "location": { - "$ref": "#/components/schemas/AddressFullAddressComponent" - }, "contactname": { "type": "string" }, @@ -20297,6 +20308,141 @@ "featured": { "type": "boolean" }, + "location": { + "type": "string" + }, + "medias": { + "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" @@ -20382,9 +20528,6 @@ "applies": { "type": "integer" }, - "location": { - "$ref": "#/components/schemas/AddressFullAddressComponent" - }, "contactname": { "type": "string" }, @@ -20397,6 +20540,141 @@ "featured": { "type": "boolean" }, + "location": { + "type": "string" + }, + "medias": { + "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" @@ -20464,40 +20742,6 @@ } } }, - "AddressFullAddressComponent": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "freeaddress": { - "type": "string" - }, - "housenumber": { - "type": "string" - }, - "road": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "postcode": { - "type": "string" - }, - "long": { - "type": "number", - "format": "float" - }, - "lat": { - "type": "number", - "format": "float" - } - } - }, "SocialTagsComponent": { "type": "object", "properties": { diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 0ca6772..9ff22ab 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -400,7 +400,11 @@ export interface ApiAdAd extends Struct.CollectionTypeSchema { locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation<'oneToMany', 'api::ad.ad'> & Schema.Attribute.Private; - location: Schema.Attribute.Component<'address.full-address', false>; + location: Schema.Attribute.Text; + medias: Schema.Attribute.Media< + 'images' | 'files' | 'videos' | 'audios', + true + >; publishedAt: Schema.Attribute.DateTime; title: Schema.Attribute.String; updatedAt: Schema.Attribute.DateTime;