Skip to content

Commit 5160600

Browse files
committed
fix: update event schema
1 parent ae37780 commit 5160600

5 files changed

Lines changed: 97 additions & 25 deletions

File tree

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"kind": "collectionType",
2+
"kind": "singleType",
33
"collectionName": "event_pages",
44
"info": {
55
"singularName": "event-page",
@@ -12,23 +12,17 @@
1212
},
1313
"pluginOptions": {},
1414
"attributes": {
15-
"title": {
16-
"type": "string"
15+
"body": {
16+
"type": "dynamiczone",
17+
"components": [
18+
"section-hero.resource-hero-section",
19+
"section-cards.event-cards"
20+
]
1721
},
18-
"description": {
19-
"type": "text"
20-
},
21-
"slug": {
22-
"type": "string"
23-
},
24-
"eventDate": {
25-
"type": "date"
26-
},
27-
"place": {
28-
"type": "string"
29-
},
30-
"eventType": {
31-
"type": "string"
22+
"seo": {
23+
"type": "component",
24+
"repeatable": false,
25+
"component": "seo.seo"
3226
}
3327
}
3428
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"collectionName": "components_elements_event_card_items",
3+
"info": {
4+
"displayName": "Event CardItem"
5+
},
6+
"options": {},
7+
"attributes": {
8+
"title": {
9+
"type": "string"
10+
},
11+
"description": {
12+
"type": "text"
13+
},
14+
"eventType": {
15+
"type": "string"
16+
},
17+
"eventPlace": {
18+
"type": "string"
19+
},
20+
"eventStartDate": {
21+
"type": "date"
22+
},
23+
"eventEndDate": {
24+
"type": "date"
25+
}
26+
}
27+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"collectionName": "components_section_cards_event_cards",
3+
"info": {
4+
"displayName": "EventCards",
5+
"description": ""
6+
},
7+
"options": {},
8+
"attributes": {
9+
"heading": {
10+
"type": "component",
11+
"repeatable": false,
12+
"component": "elements.heading"
13+
},
14+
"items": {
15+
"type": "component",
16+
"repeatable": true,
17+
"component": "elements.event-card-item"
18+
}
19+
}
20+
}

types/generated/components.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ export interface ElementsCompanyCustomerFeature extends Struct.ComponentSchema {
110110
};
111111
}
112112

113+
export interface ElementsEventCardItem extends Struct.ComponentSchema {
114+
collectionName: 'components_elements_event_card_items';
115+
info: {
116+
displayName: 'Event CardItem';
117+
};
118+
attributes: {
119+
description: Schema.Attribute.Text;
120+
eventEndDate: Schema.Attribute.Date;
121+
eventPlace: Schema.Attribute.String;
122+
eventStartDate: Schema.Attribute.Date;
123+
eventType: Schema.Attribute.String;
124+
title: Schema.Attribute.String;
125+
};
126+
}
127+
113128
export interface ElementsFaqItem extends Struct.ComponentSchema {
114129
collectionName: 'components_elements_faq_items';
115130
info: {
@@ -448,6 +463,18 @@ export interface SectionCardsCommunitySupport extends Struct.ComponentSchema {
448463
};
449464
}
450465

466+
export interface SectionCardsEventCards extends Struct.ComponentSchema {
467+
collectionName: 'components_section_cards_event_cards';
468+
info: {
469+
description: '';
470+
displayName: 'EventCards';
471+
};
472+
attributes: {
473+
heading: Schema.Attribute.Component<'elements.heading', false>;
474+
items: Schema.Attribute.Component<'elements.event-card-item', true>;
475+
};
476+
}
477+
451478
export interface SectionCardsFeature1 extends Struct.ComponentSchema {
452479
collectionName: 'components_section_cards_feature1s';
453480
info: {
@@ -1024,6 +1051,7 @@ declare module '@strapi/strapi' {
10241051
'elements.card-item': ElementsCardItem;
10251052
'elements.case-study-item': ElementsCaseStudyItem;
10261053
'elements.company-customer-feature': ElementsCompanyCustomerFeature;
1054+
'elements.event-card-item': ElementsEventCardItem;
10271055
'elements.faq-item': ElementsFaqItem;
10281056
'elements.faq-section': ElementsFaqSection;
10291057
'elements.feature-description': ElementsFeatureDescription;
@@ -1048,6 +1076,7 @@ declare module '@strapi/strapi' {
10481076
'section-cards.case-studies': SectionCardsCaseStudies;
10491077
'section-cards.clients': SectionCardsClients;
10501078
'section-cards.community-support': SectionCardsCommunitySupport;
1079+
'section-cards.event-cards': SectionCardsEventCards;
10511080
'section-cards.feature1': SectionCardsFeature1;
10521081
'section-cards.feature3': SectionCardsFeature3;
10531082
'section-cards.feature4': SectionCardsFeature4;

types/generated/contentTypes.d.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ export interface ApiEnterpriseLicenseEnterpriseLicense
774774
};
775775
}
776776

777-
export interface ApiEventPageEventPage extends Struct.CollectionTypeSchema {
777+
export interface ApiEventPageEventPage extends Struct.SingleTypeSchema {
778778
collectionName: 'event_pages';
779779
info: {
780780
description: '';
@@ -786,22 +786,20 @@ export interface ApiEventPageEventPage extends Struct.CollectionTypeSchema {
786786
draftAndPublish: true;
787787
};
788788
attributes: {
789+
body: Schema.Attribute.DynamicZone<
790+
['section-hero.resource-hero-section', 'section-cards.event-cards']
791+
>;
789792
createdAt: Schema.Attribute.DateTime;
790793
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
791794
Schema.Attribute.Private;
792-
description: Schema.Attribute.Text;
793-
eventDate: Schema.Attribute.Date;
794-
eventType: Schema.Attribute.String;
795795
locale: Schema.Attribute.String & Schema.Attribute.Private;
796796
localizations: Schema.Attribute.Relation<
797797
'oneToMany',
798798
'api::event-page.event-page'
799799
> &
800800
Schema.Attribute.Private;
801-
place: Schema.Attribute.String;
802801
publishedAt: Schema.Attribute.DateTime;
803-
slug: Schema.Attribute.String;
804-
title: Schema.Attribute.String;
802+
seo: Schema.Attribute.Component<'seo.seo', false>;
805803
updatedAt: Schema.Attribute.DateTime;
806804
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
807805
Schema.Attribute.Private;
@@ -915,6 +913,7 @@ export interface ApiGlobalAdsBannerGlobalAdsBanner
915913
extends Struct.SingleTypeSchema {
916914
collectionName: 'global_ads_banners';
917915
info: {
916+
description: '';
918917
displayName: 'Global Ads Banner';
919918
pluralName: 'global-ads-banners';
920919
singularName: 'global-ads-banner';
@@ -936,7 +935,10 @@ export interface ApiGlobalAdsBannerGlobalAdsBanner
936935
primaryButton: Schema.Attribute.Component<'elements.button', false>;
937936
publishedAt: Schema.Attribute.DateTime;
938937
tag: Schema.Attribute.String;
939-
title: Schema.Attribute.String;
938+
title: Schema.Attribute.String &
939+
Schema.Attribute.SetMinMaxLength<{
940+
maxLength: 60;
941+
}>;
940942
updatedAt: Schema.Attribute.DateTime;
941943
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
942944
Schema.Attribute.Private;

0 commit comments

Comments
 (0)