From d9868a1d5df9b7de20dd0663a2b7741c8a906e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 3 Jul 2026 16:57:06 +0400 Subject: [PATCH] refactor: generaliser stems en kits (type Stems/Acapella+Instru) --- .../parole/content-types/parole/schema.json | 4 +-- src/components/{stem => kit}/lyen.json | 9 ++++-- types/generated/components.d.ts | 32 ++++++++++--------- types/generated/contentTypes.d.ts | 2 +- 4 files changed, 27 insertions(+), 20 deletions(-) rename src/components/{stem => kit}/lyen.json (60%) diff --git a/src/api/parole/content-types/parole/schema.json b/src/api/parole/content-types/parole/schema.json index a3a1a8c..a1ef029 100644 --- a/src/api/parole/content-types/parole/schema.json +++ b/src/api/parole/content-types/parole/schema.json @@ -153,9 +153,9 @@ "karaokeDesktopUrl": { "type": "string" }, - "stems": { + "kits": { "type": "component", - "component": "stem.lyen", + "component": "kit.lyen", "repeatable": true } } diff --git a/src/components/stem/lyen.json b/src/components/kit/lyen.json similarity index 60% rename from src/components/stem/lyen.json rename to src/components/kit/lyen.json index 37b23c5..8523c5d 100644 --- a/src/components/stem/lyen.json +++ b/src/components/kit/lyen.json @@ -1,7 +1,7 @@ { - "collectionName": "components_stem_lyens", + "collectionName": "components_kit_lyens", "info": { - "displayName": "Stems", + "displayName": "Kit", "icon": "database", "description": "" }, @@ -15,6 +15,11 @@ "type": "enumeration", "enum": ["kDrive", "NIYAJ"], "required": true + }, + "type": { + "type": "enumeration", + "enum": ["Stems", "Acapella + Instru"], + "required": true } } } diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index fd501cd..5adc3cc 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -25,6 +25,22 @@ export interface DifferenceParolesDiff extends Struct.ComponentSchema { }; } +export interface KitLyen extends Struct.ComponentSchema { + collectionName: 'components_kit_lyens'; + info: { + description: ''; + displayName: 'Kit'; + icon: 'database'; + }; + attributes: { + plateforme: Schema.Attribute.Enumeration<['kDrive', 'NIYAJ']> & + Schema.Attribute.Required; + type: Schema.Attribute.Enumeration<['Stems', 'Acapella + Instru']> & + Schema.Attribute.Required; + url: Schema.Attribute.String & Schema.Attribute.Required; + }; +} + export interface SocialRezoSosyal extends Struct.ComponentSchema { collectionName: 'components_social_rezo_sosyal'; info: { @@ -59,20 +75,6 @@ export interface SocialRezoSosyal extends Struct.ComponentSchema { }; } -export interface StemLyen extends Struct.ComponentSchema { - collectionName: 'components_stem_lyens'; - info: { - description: ''; - displayName: 'Stems'; - icon: 'database'; - }; - attributes: { - plateforme: Schema.Attribute.Enumeration<['kDrive', 'NIYAJ']> & - Schema.Attribute.Required; - url: Schema.Attribute.String & Schema.Attribute.Required; - }; -} - export interface StoreAlbum extends Struct.ComponentSchema { collectionName: 'components_store_albums'; info: { @@ -135,8 +137,8 @@ declare module '@strapi/strapi' { export module Public { export interface ComponentSchemas { 'difference.paroles-diff': DifferenceParolesDiff; + 'kit.lyen': KitLyen; 'social.rezo-sosyal': SocialRezoSosyal; - 'stem.lyen': StemLyen; 'store.album': StoreAlbum; 'trad.traductions': TradTraductions; 'url.liens': UrlLiens; diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 75bab7d..89f6933 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -547,6 +547,7 @@ export interface ApiParoleParole extends Struct.CollectionTypeSchema { isNewRelease: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; karaokeDesktopUrl: Schema.Attribute.String; karaokeUrl: Schema.Attribute.String; + kits: Schema.Attribute.Component<'kit.lyen', true>; langueSource: Schema.Attribute.Enumeration< ['ka', 'fr', 'en', 'es', 'de', 'it'] > & @@ -568,7 +569,6 @@ export interface ApiParoleParole extends Struct.CollectionTypeSchema { 'manyToOne', 'api::parole.parole' >; - stems: Schema.Attribute.Component<'stem.lyen', true>; streamAudio: Schema.Attribute.Component<'store.album', true>; streamVideo: Schema.Attribute.Component<'url.liens', true>; titre: Schema.Attribute.String & Schema.Attribute.Required;