Skip to content

Commit e196dbd

Browse files
committed
Add CallToActionAtomBlockElement to FEElement type and generated schemas
1 parent 41556fa commit e196dbd

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

dotcom-rendering/src/frontend/schemas/feArticle.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,9 @@
617617
{
618618
"$ref": "#/definitions/CalloutBlockElementV2"
619619
},
620+
{
621+
"$ref": "#/definitions/CallToActionAtomBlockElement"
622+
},
620623
{
621624
"$ref": "#/definitions/ReporterCalloutBlockElement"
622625
},
@@ -1559,6 +1562,46 @@
15591562
"value"
15601563
]
15611564
},
1565+
"CallToActionAtomBlockElement": {
1566+
"type": "object",
1567+
"properties": {
1568+
"_type": {
1569+
"type": "string",
1570+
"const": "model.dotcomrendering.pageElements.CallToActionAtomBlockElement"
1571+
},
1572+
"elementId": {
1573+
"type": "string"
1574+
},
1575+
"id": {
1576+
"type": "string"
1577+
},
1578+
"title": {
1579+
"type": "string"
1580+
},
1581+
"url": {
1582+
"type": "string"
1583+
},
1584+
"image": {
1585+
"type": "string"
1586+
},
1587+
"label": {
1588+
"type": "string"
1589+
},
1590+
"trackingCode": {
1591+
"type": "string"
1592+
},
1593+
"btnText": {
1594+
"type": "string"
1595+
}
1596+
},
1597+
"required": [
1598+
"_type",
1599+
"elementId",
1600+
"id",
1601+
"title",
1602+
"url"
1603+
]
1604+
},
15621605
"ReporterCalloutBlockElement": {
15631606
"type": "object",
15641607
"properties": {

dotcom-rendering/src/model/block-schema.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
{
100100
"$ref": "#/definitions/CalloutBlockElementV2"
101101
},
102+
{
103+
"$ref": "#/definitions/CallToActionAtomBlockElement"
104+
},
102105
{
103106
"$ref": "#/definitions/ReporterCalloutBlockElement"
104107
},
@@ -1041,6 +1044,46 @@
10411044
"value"
10421045
]
10431046
},
1047+
"CallToActionAtomBlockElement": {
1048+
"type": "object",
1049+
"properties": {
1050+
"_type": {
1051+
"type": "string",
1052+
"const": "model.dotcomrendering.pageElements.CallToActionAtomBlockElement"
1053+
},
1054+
"elementId": {
1055+
"type": "string"
1056+
},
1057+
"id": {
1058+
"type": "string"
1059+
},
1060+
"title": {
1061+
"type": "string"
1062+
},
1063+
"url": {
1064+
"type": "string"
1065+
},
1066+
"image": {
1067+
"type": "string"
1068+
},
1069+
"label": {
1070+
"type": "string"
1071+
},
1072+
"trackingCode": {
1073+
"type": "string"
1074+
},
1075+
"btnText": {
1076+
"type": "string"
1077+
}
1078+
},
1079+
"required": [
1080+
"_type",
1081+
"elementId",
1082+
"id",
1083+
"title",
1084+
"url"
1085+
]
1086+
},
10441087
"ReporterCalloutBlockElement": {
10451088
"type": "object",
10461089
"properties": {

dotcom-rendering/src/types/content.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ export interface CalloutBlockElementV2 {
112112
contacts?: CalloutContactType[];
113113
}
114114

115+
export interface CallToActionAtomBlockElement {
116+
_type: 'model.dotcomrendering.pageElements.CallToActionAtomBlockElement';
117+
elementId: string;
118+
id: string;
119+
title: string;
120+
url: string;
121+
image?: string;
122+
label?: string;
123+
trackingCode?: string;
124+
btnText?: string;
125+
}
126+
115127
export interface ReporterCalloutBlockElement {
116128
_type: 'model.dotcomrendering.pageElements.ReporterCalloutBlockElement';
117129
elementId: string;
@@ -827,6 +839,7 @@ export type FEElement =
827839
| CaptionBlockElement
828840
| CalloutBlockElement
829841
| CalloutBlockElementV2
842+
| CallToActionAtomBlockElement
830843
| ReporterCalloutBlockElement
831844
| CartoonBlockElement
832845
| ChartAtomBlockElement

0 commit comments

Comments
 (0)