feat(strapi): migrate initial collection types from Contentful
This commit is contained in:
@ -33,6 +33,8 @@ services:
|
||||
POSTGRES_PASSWORD: strapi
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
volumes:
|
||||
strapi_uploads:
|
||||
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
90
src/api/common-page/content-types/common-page/schema.json
Normal file
90
src/api/common-page/content-types/common-page/schema.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
7
src/api/common-page/controllers/common-page.ts
Normal file
7
src/api/common-page/controllers/common-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* common-page controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::common-page.common-page');
|
7
src/api/common-page/routes/common-page.ts
Normal file
7
src/api/common-page/routes/common-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* common-page router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::common-page.common-page');
|
7
src/api/common-page/services/common-page.ts
Normal file
7
src/api/common-page/services/common-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* common-page service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::common-page.common-page');
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* cotizador-renta-segura controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::cotizador-renta-segura.cotizador-renta-segura');
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* cotizador-renta-segura router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::cotizador-renta-segura.cotizador-renta-segura');
|
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* cotizador-renta-segura service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::cotizador-renta-segura.cotizador-renta-segura');
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
7
src/api/entrada-de-blog/controllers/entrada-de-blog.ts
Normal file
7
src/api/entrada-de-blog/controllers/entrada-de-blog.ts
Normal 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');
|
7
src/api/entrada-de-blog/routes/entrada-de-blog.ts
Normal file
7
src/api/entrada-de-blog/routes/entrada-de-blog.ts
Normal 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');
|
7
src/api/entrada-de-blog/services/entrada-de-blog.ts
Normal file
7
src/api/entrada-de-blog/services/entrada-de-blog.ts
Normal 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');
|
59
src/api/footer/content-types/footer/schema.json
Normal file
59
src/api/footer/content-types/footer/schema.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
7
src/api/footer/controllers/footer.ts
Normal file
7
src/api/footer/controllers/footer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* footer controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::footer.footer');
|
7
src/api/footer/routes/footer.ts
Normal file
7
src/api/footer/routes/footer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* footer router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::footer.footer');
|
7
src/api/footer/services/footer.ts
Normal file
7
src/api/footer/services/footer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* footer service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::footer.footer');
|
22
src/api/home-page/content-types/home-page/schema.json
Normal file
22
src/api/home-page/content-types/home-page/schema.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
7
src/api/home-page/controllers/home-page.ts
Normal file
7
src/api/home-page/controllers/home-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::home-page.home-page');
|
7
src/api/home-page/routes/home-page.ts
Normal file
7
src/api/home-page/routes/home-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::home-page.home-page');
|
7
src/api/home-page/services/home-page.ts
Normal file
7
src/api/home-page/services/home-page.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::home-page.home-page');
|
14
src/components/shared/tag.json
Normal file
14
src/components/shared/tag.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"collectionName": "components_shared_tags",
|
||||
"info": {
|
||||
"displayName": "Tag"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"Tag": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
86
types/generated/components.d.ts
vendored
Normal file
86
types/generated/components.d.ts
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
import type { Schema, Struct } from '@strapi/strapi';
|
||||
|
||||
export interface SharedMedia extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_media';
|
||||
info: {
|
||||
displayName: 'Media';
|
||||
icon: 'file-video';
|
||||
};
|
||||
attributes: {
|
||||
file: Schema.Attribute.Media<'images' | 'files' | 'videos'>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SharedQuote extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_quotes';
|
||||
info: {
|
||||
displayName: 'Quote';
|
||||
icon: 'indent';
|
||||
};
|
||||
attributes: {
|
||||
body: Schema.Attribute.Text;
|
||||
title: Schema.Attribute.String;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SharedRichText extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_rich_texts';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Rich text';
|
||||
icon: 'align-justify';
|
||||
};
|
||||
attributes: {
|
||||
body: Schema.Attribute.RichText;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SharedSeo extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_seos';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Seo';
|
||||
icon: 'allergies';
|
||||
name: 'Seo';
|
||||
};
|
||||
attributes: {
|
||||
metaDescription: Schema.Attribute.Text & Schema.Attribute.Required;
|
||||
metaTitle: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
shareImage: Schema.Attribute.Media<'images'>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SharedSlider extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_sliders';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Slider';
|
||||
icon: 'address-book';
|
||||
};
|
||||
attributes: {
|
||||
files: Schema.Attribute.Media<'images', true>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SharedTag extends Struct.ComponentSchema {
|
||||
collectionName: 'components_shared_tags';
|
||||
info: {
|
||||
displayName: 'Tag';
|
||||
};
|
||||
attributes: {
|
||||
Tag: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
declare module '@strapi/strapi' {
|
||||
export module Public {
|
||||
export interface ComponentSchemas {
|
||||
'shared.media': SharedMedia;
|
||||
'shared.quote': SharedQuote;
|
||||
'shared.rich-text': SharedRichText;
|
||||
'shared.seo': SharedSeo;
|
||||
'shared.slider': SharedSlider;
|
||||
'shared.tag': SharedTag;
|
||||
}
|
||||
}
|
||||
}
|
1259
types/generated/contentTypes.d.ts
vendored
Normal file
1259
types/generated/contentTypes.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user