feat(strapi): migrate initial collection types from Contentful

This commit is contained in:
Martin Garnica
2025-08-25 09:12:34 -06:00
parent f59458c431
commit d282784c00
26 changed files with 1780 additions and 19 deletions

View File

@ -27,13 +27,11 @@
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": ["images", "files", "videos"]
},
"author": {
"type": "relation",
"relation": "manyToOne",
"target": "api::author.author",
"inversedBy": "articles"
"allowedTypes": [
"images",
"files",
"videos"
]
},
"category": {
"type": "relation",
@ -43,7 +41,12 @@
},
"blocks": {
"type": "dynamiczone",
"components": ["shared.media", "shared.quote", "shared.rich-text", "shared.slider"]
"components": [
"shared.media",
"shared.quote",
"shared.rich-text",
"shared.slider"
]
}
}
}

View File

@ -12,23 +12,33 @@
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
"NombreCompleto": {
"type": "string",
"required": true
},
"avatar": {
"Foto": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": ["images", "files", "videos"]
"required": true,
"allowedTypes": [
"images",
"files",
"videos"
]
},
"email": {
"PuestoCargo": {
"type": "string",
"required": true
},
"Descripcion": {
"type": "string",
"required": true
},
"Twitter": {
"type": "string"
},
"articles": {
"type": "relation",
"relation": "oneToMany",
"target": "api::article.article",
"mappedBy": "author"
"Linkedin": {
"type": "string"
}
}
}

View File

@ -0,0 +1,90 @@
{
"kind": "collectionType",
"collectionName": "common_pages",
"info": {
"singularName": "common-page",
"pluralName": "common-pages",
"displayName": "CommonPage"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"Title": {
"type": "string",
"required": true
},
"Slug": {
"type": "string",
"required": true
},
"LogoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
},
"MainImage": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
},
"Frase": {
"type": "string",
"required": false
},
"Azul": {
"type": "boolean"
},
"Video": {
"type": "media",
"multiple": false,
"allowedTypes": [
"videos"
]
},
"VideoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"videos"
]
},
"VideoCaption": {
"type": "media",
"multiple": false,
"allowedTypes": [
"images",
"videos"
]
},
"Content": {
"type": "text",
"required": true
},
"ButtonText": {
"type": "string"
},
"ButtonLink": {
"type": "string"
},
"SEODescription": {
"type": "string",
"required": true
},
"cloudinaryUrl": {
"type": "string"
},
"whatsappMessage": {
"type": "string"
}
}
}

View File

@ -0,0 +1,7 @@
/**
* common-page controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::common-page.common-page');

View File

@ -0,0 +1,7 @@
/**
* common-page router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::common-page.common-page');

View File

@ -0,0 +1,7 @@
/**
* common-page service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::common-page.common-page');

View File

@ -0,0 +1,46 @@
{
"kind": "singleType",
"collectionName": "cotizador_renta_seguras",
"info": {
"singularName": "cotizador-renta-segura",
"pluralName": "cotizador-renta-seguras",
"displayName": "CotizadorRentaSegura"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"TituloCotizador": {
"type": "string",
"required": true
},
"MainImage": {
"type": "media",
"multiple": false,
"allowedTypes": [
"images"
]
},
"LogoTitle": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
},
"DescriptionText": {
"type": "text",
"required": true
},
"DescriptionSelectProducts": {
"type": "text",
"required": true
},
"Products": {
"type": "json",
"required": true
}
}
}

View File

@ -0,0 +1,7 @@
/**
* cotizador-renta-segura controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::cotizador-renta-segura.cotizador-renta-segura');

View File

@ -0,0 +1,7 @@
/**
* cotizador-renta-segura router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::cotizador-renta-segura.cotizador-renta-segura');

View File

@ -0,0 +1,7 @@
/**
* cotizador-renta-segura service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::cotizador-renta-segura.cotizador-renta-segura');

View File

@ -0,0 +1,65 @@
{
"kind": "collectionType",
"collectionName": "entrada_de_blogs",
"info": {
"singularName": "entrada-de-blog",
"pluralName": "entrada-de-blogs",
"displayName": "EntradaDeBlog"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"Title": {
"type": "string",
"required": true
},
"Slug": {
"type": "string",
"required": true
},
"MainImage": {
"type": "media",
"multiple": true,
"allowedTypes": [
"images"
]
},
"cloudinaryUrl": {
"type": "string"
},
"FechaDePublicacion": {
"type": "date",
"required": true
},
"Autor": {
"type": "relation",
"relation": "oneToOne",
"target": "api::author.author"
},
"Contenido": {
"type": "text",
"required": true
},
"ButtonText": {
"type": "string"
},
"ButtonBlogLink": {
"type": "string"
},
"Tags": {
"type": "component",
"component": "shared.tag",
"repeatable": true,
"required": false
},
"SEODescription": {
"type": "string",
"required": true
},
"whatsappMessage": {
"type": "string"
}
}
}

View File

@ -0,0 +1,7 @@
/**
* entrada-de-blog controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::entrada-de-blog.entrada-de-blog');

View File

@ -0,0 +1,7 @@
/**
* entrada-de-blog router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::entrada-de-blog.entrada-de-blog');

View File

@ -0,0 +1,7 @@
/**
* entrada-de-blog service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::entrada-de-blog.entrada-de-blog');

View File

@ -0,0 +1,59 @@
{
"kind": "singleType",
"collectionName": "footers",
"info": {
"singularName": "footer",
"pluralName": "footers",
"displayName": "Footer"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"Name": {
"type": "string",
"required": true
},
"NewsletterTitle": {
"type": "string",
"required": true
},
"NewsletterDescription": {
"type": "string",
"required": true
},
"NewsletterButton": {
"type": "string",
"required": true
},
"SecondMenu": {
"type": "json",
"required": true
},
"FacebookURL": {
"type": "string"
},
"InstagramURL": {
"type": "string"
},
"LinkedinURL": {
"type": "string"
},
"YouTubeURL": {
"type": "string"
},
"Address": {
"type": "string",
"required": true
},
"BolitasBackground": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
}
}
}

View File

@ -0,0 +1,7 @@
/**
* footer controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::footer.footer');

View File

@ -0,0 +1,7 @@
/**
* footer router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::footer.footer');

View File

@ -0,0 +1,7 @@
/**
* footer service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::footer.footer');

View File

@ -0,0 +1,22 @@
{
"kind": "singleType",
"collectionName": "home_pages",
"info": {
"singularName": "home-page",
"pluralName": "home-pages",
"displayName": "HomePage"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"Title": {
"type": "string",
"required": true
},
"whatsappMessage": {
"type": "string"
}
}
}

View File

@ -0,0 +1,7 @@
/**
* home-page controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::home-page.home-page');

View File

@ -0,0 +1,7 @@
/**
* home-page router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::home-page.home-page');

View File

@ -0,0 +1,7 @@
/**
* home-page service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::home-page.home-page');

View File

@ -0,0 +1,14 @@
{
"collectionName": "components_shared_tags",
"info": {
"displayName": "Tag"
},
"options": {},
"attributes": {
"Tag": {
"type": "string",
"required": true
}
},
"config": {}
}