@financial-times/cp-content-pipeline-schema 2.5.2 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +187 -41
  3. package/lib/datasources/base.d.ts +1 -0
  4. package/lib/datasources/capi.js +1 -0
  5. package/lib/datasources/capi.js.map +1 -1
  6. package/lib/datasources/instrumented.d.ts +1 -0
  7. package/lib/datasources/instrumented.js +1 -9
  8. package/lib/datasources/instrumented.js.map +1 -1
  9. package/lib/datasources/origami-image.js +1 -0
  10. package/lib/datasources/origami-image.js.map +1 -1
  11. package/lib/datasources/twitter.js +1 -0
  12. package/lib/datasources/twitter.js.map +1 -1
  13. package/lib/datasources/url-management.d.ts +1 -0
  14. package/lib/datasources/url-management.js +2 -0
  15. package/lib/datasources/url-management.js.map +1 -1
  16. package/lib/generated/index.d.ts +1214 -909
  17. package/lib/model/CapiResponse.d.ts +14 -4
  18. package/lib/model/CapiResponse.js +19 -4
  19. package/lib/model/CapiResponse.js.map +1 -1
  20. package/lib/model/RichText.d.ts +1 -1
  21. package/lib/model/RichText.js.map +1 -1
  22. package/lib/model/Topper.d.ts +2 -2
  23. package/lib/model/Topper.js +2 -2
  24. package/lib/model/Topper.js.map +1 -1
  25. package/lib/model/schemas/capi/content-package.d.ts +18 -0
  26. package/lib/model/schemas/capi/content-package.js +1 -0
  27. package/lib/model/schemas/capi/content-package.js.map +1 -1
  28. package/lib/resolvers/clip.d.ts +10 -0
  29. package/lib/resolvers/clip.js +10 -0
  30. package/lib/resolvers/clip.js.map +1 -1
  31. package/lib/resolvers/content-tree/references/ClipSet.d.ts +13 -0
  32. package/lib/resolvers/content-tree/references/ClipSet.js +12 -1
  33. package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -1
  34. package/lib/resolvers/content-tree/references/Flourish.d.ts +6 -0
  35. package/lib/resolvers/content-tree/references/Flourish.js +15 -1
  36. package/lib/resolvers/content-tree/references/Flourish.js.map +1 -1
  37. package/lib/resolvers/content-tree/references/ImageSet.d.ts +1 -0
  38. package/lib/resolvers/content-tree/references/ImageSet.js +3 -0
  39. package/lib/resolvers/content-tree/references/ImageSet.js.map +1 -1
  40. package/lib/resolvers/content-tree/references/LayoutImage.d.ts +1 -0
  41. package/lib/resolvers/content-tree/references/LayoutImage.js +3 -0
  42. package/lib/resolvers/content-tree/references/LayoutImage.js.map +1 -1
  43. package/lib/resolvers/content-tree/references/RawImage.d.ts +1 -0
  44. package/lib/resolvers/content-tree/references/RawImage.js +3 -0
  45. package/lib/resolvers/content-tree/references/RawImage.js.map +1 -1
  46. package/lib/resolvers/content-tree/references/Recommended.d.ts +1 -0
  47. package/lib/resolvers/content-tree/references/Recommended.js +3 -0
  48. package/lib/resolvers/content-tree/references/Recommended.js.map +1 -1
  49. package/lib/resolvers/content-tree/references/Reference.d.ts +1 -1
  50. package/lib/resolvers/content-tree/references/Reference.js +1 -3
  51. package/lib/resolvers/content-tree/references/Reference.js.map +1 -1
  52. package/lib/resolvers/content-tree/references/ScrollyImage.d.ts +1 -0
  53. package/lib/resolvers/content-tree/references/ScrollyImage.js +3 -0
  54. package/lib/resolvers/content-tree/references/ScrollyImage.js.map +1 -1
  55. package/lib/resolvers/content-tree/references/Tweet.d.ts +1 -0
  56. package/lib/resolvers/content-tree/references/Tweet.js +3 -0
  57. package/lib/resolvers/content-tree/references/Tweet.js.map +1 -1
  58. package/lib/resolvers/content-tree/references/Video.d.ts +2 -1
  59. package/lib/resolvers/content-tree/references/Video.js +4 -3
  60. package/lib/resolvers/content-tree/references/Video.js.map +1 -1
  61. package/lib/resolvers/content-tree/references/index.d.ts +5 -1
  62. package/lib/resolvers/content-tree/references/index.js +4 -0
  63. package/lib/resolvers/content-tree/references/index.js.map +1 -1
  64. package/lib/resolvers/content.d.ts +242 -33
  65. package/lib/resolvers/content.js +66 -31
  66. package/lib/resolvers/content.js.map +1 -1
  67. package/lib/resolvers/image.d.ts +142 -12
  68. package/lib/resolvers/image.js +45 -10
  69. package/lib/resolvers/image.js.map +1 -1
  70. package/lib/resolvers/index.d.ts +588 -60
  71. package/lib/resolvers/picture.d.ts +41 -8
  72. package/lib/resolvers/picture.js +19 -21
  73. package/lib/resolvers/picture.js.map +1 -1
  74. package/lib/resolvers/richText.d.ts +14 -2
  75. package/lib/resolvers/richText.js +8 -6
  76. package/lib/resolvers/richText.js.map +1 -1
  77. package/lib/resolvers/scalars.d.ts +2 -0
  78. package/lib/resolvers/scalars.js +2 -0
  79. package/lib/resolvers/scalars.js.map +1 -1
  80. package/lib/resolvers/teaser.d.ts +5 -0
  81. package/lib/resolvers/teaser.js +6 -1
  82. package/lib/resolvers/teaser.js.map +1 -1
  83. package/lib/resolvers/topper.d.ts +127 -7
  84. package/lib/resolvers/topper.js +64 -6
  85. package/lib/resolvers/topper.js.map +1 -1
  86. package/package.json +1 -1
  87. package/src/datasources/base.ts +1 -0
  88. package/src/datasources/capi.ts +1 -0
  89. package/src/datasources/instrumented.ts +1 -11
  90. package/src/datasources/origami-image.ts +3 -0
  91. package/src/datasources/twitter.ts +2 -0
  92. package/src/datasources/url-management.ts +2 -0
  93. package/src/generated/index.ts +1214 -670
  94. package/src/model/CapiResponse.ts +32 -7
  95. package/src/model/RichText.ts +1 -1
  96. package/src/model/Topper.ts +2 -2
  97. package/src/model/schemas/capi/content-package.ts +1 -0
  98. package/src/resolvers/clip.ts +13 -2
  99. package/src/resolvers/content-tree/references/ClipSet.ts +22 -2
  100. package/src/resolvers/content-tree/references/Flourish.ts +20 -1
  101. package/src/resolvers/content-tree/references/ImageSet.ts +4 -0
  102. package/src/resolvers/content-tree/references/LayoutImage.ts +4 -0
  103. package/src/resolvers/content-tree/references/RawImage.ts +4 -0
  104. package/src/resolvers/content-tree/references/Recommended.ts +4 -0
  105. package/src/resolvers/content-tree/references/Reference.ts +1 -3
  106. package/src/resolvers/content-tree/references/ScrollyImage.ts +4 -0
  107. package/src/resolvers/content-tree/references/Tweet.ts +4 -0
  108. package/src/resolvers/content-tree/references/Video.ts +5 -3
  109. package/src/resolvers/content-tree/references/index.ts +13 -2
  110. package/src/resolvers/content.ts +88 -38
  111. package/src/resolvers/image.ts +75 -5
  112. package/src/resolvers/picture.ts +35 -23
  113. package/src/resolvers/richText.ts +13 -8
  114. package/src/resolvers/scalars.ts +2 -0
  115. package/src/resolvers/teaser.ts +6 -2
  116. package/src/resolvers/topper.ts +86 -6
  117. package/tsconfig.tsbuildinfo +1 -1
  118. package/typedefs/clip.graphql +28 -0
  119. package/typedefs/concept.graphql +21 -2
  120. package/typedefs/content.graphql +441 -36
  121. package/typedefs/core.graphql +6 -0
  122. package/typedefs/image.graphql +210 -15
  123. package/typedefs/picture.graphql +54 -1
  124. package/typedefs/references/clipSet.graphql +34 -1
  125. package/typedefs/references/flourish.graphql +8 -0
  126. package/typedefs/references/imageSet.graphql +6 -0
  127. package/typedefs/references/layoutImage.graphql +3 -0
  128. package/typedefs/references/rawImage.graphql +3 -0
  129. package/typedefs/references/recommended.graphql +3 -0
  130. package/typedefs/references/reference.graphql +1 -0
  131. package/typedefs/references/scrollyImage.graphql +3 -0
  132. package/typedefs/references/tweet.graphql +3 -0
  133. package/typedefs/references/video.graphql +5 -0
  134. package/typedefs/richText.graphql +7 -4
  135. package/typedefs/teaser.graphql +42 -1
  136. package/typedefs/topper.graphql +219 -7
@@ -1,135 +1,330 @@
1
1
  type ImageSource {
2
+ "The url of the image source, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
2
3
  url: String!
4
+
5
+ "The width of the image source in pixels."
3
6
  width: Int
7
+
8
+ "The device pixel ratio. DPR is calculated as DPR = Physical Pixels (pixels seen on screen) / Logical Pixels (pixel that can fit in a given space)."
4
9
  dpr: Int
5
10
  }
6
11
 
7
12
  interface Image {
13
+ "The unique identifier of the image - a uuid or a url."
14
+ id: String!
15
+
16
+ "The type of the image, eg. 'graphic'."
8
17
  type: ImageType
18
+
19
+ "The format of the image, eg. 'portrait'."
9
20
  format: ImageFormat!
21
+
22
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
10
23
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
24
+
25
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
11
26
  url: String
27
+
28
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
12
29
  altText: String
30
+
31
+ "The width of the image in pixels."
13
32
  width: Int
33
+
34
+ "The height of the image in pixels."
14
35
  height: Int
36
+
37
+ "The credit of the image, eg. 'Getty Images'."
15
38
  credit: String
39
+
40
+ "Text describing the content of the image, always shown next to the image."
16
41
  caption: String
17
- id: String!
18
42
  }
19
43
 
20
44
  type ImageStandardInline implements Image {
45
+ "The unique identifier of the image - a uuid or a url."
46
+ id: String!
47
+
48
+ "The type of the image, eg. 'graphic'."
21
49
  type: ImageType
50
+
51
+ "The format of the image, eg. 'portrait'."
22
52
  format: ImageFormat!
53
+
54
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
23
55
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
56
+
57
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
24
58
  url: String
59
+
60
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
25
61
  altText: String
62
+
63
+ "The width of the image in pixels."
26
64
  width: Int
65
+
66
+ "The height of the image in pixels."
27
67
  height: Int
68
+
69
+ "The credit of the image, eg. 'Getty Images'."
28
70
  credit: String
71
+
72
+ "Text describing the content of the image, always shown next to the image."
29
73
  caption: String
30
- id: String!
31
74
  }
32
75
 
33
76
  type ImageDesktop implements Image {
77
+ "The unique identifier of the image - a uuid or a url."
78
+ id: String!
79
+
80
+ "The type of the image, eg. 'graphic'."
34
81
  type: ImageType
82
+
83
+ "The format of the image, eg. 'portrait'."
35
84
  format: ImageFormat!
85
+
86
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
36
87
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
88
+
89
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
37
90
  url: String
91
+
92
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
38
93
  altText: String
94
+
95
+ "The width of the image in pixels."
39
96
  width: Int
97
+
98
+ "The height of the image in pixels."
40
99
  height: Int
100
+
101
+ "The credit of the image, eg. 'Getty Images'."
41
102
  credit: String
103
+
104
+ "Text describing the content of the image, always shown next to the image."
42
105
  caption: String
43
- id: String!
44
106
  }
45
107
 
46
108
  type ImageMobile implements Image {
109
+ "The unique identifier of the image - a uuid or a url."
110
+ id: String!
111
+
112
+ "The type of the image, eg. 'graphic'."
47
113
  type: ImageType
114
+
115
+ "The format of the image, eg. 'portrait'."
48
116
  format: ImageFormat!
117
+
118
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
49
119
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
120
+
121
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
50
122
  url: String
123
+
124
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
51
125
  altText: String
126
+
127
+ "The width of the image in pixels."
52
128
  width: Int
129
+
130
+ "The height of the image in pixels."
53
131
  height: Int
132
+
133
+ "The credit of the image, eg. 'Getty Images'."
54
134
  credit: String
135
+
136
+ "Text describing the content of the image, always shown next to the image."
55
137
  caption: String
56
- id: String!
57
138
  }
58
139
 
59
140
  type ImageStandard implements Image {
141
+ "The unique identifier of the image - a uuid or a url."
142
+ id: String!
143
+
144
+ "The type of the image, eg. 'graphic'."
60
145
  type: ImageType
146
+
147
+ "The format of the image, eg. 'portrait'."
61
148
  format: ImageFormat!
149
+
150
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
62
151
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
152
+
153
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
63
154
  url: String
155
+
156
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
64
157
  altText: String
158
+
159
+ "The width of the image in pixels."
65
160
  width: Int
161
+
162
+ "The height of the image in pixels."
66
163
  height: Int
164
+
165
+ "The credit of the image, eg. 'Getty Images'."
67
166
  credit: String
167
+
168
+ "Text describing the content of the image, always shown next to the image."
68
169
  caption: String
69
- id: String!
70
170
  }
71
171
 
72
172
  type ImageSquare implements Image {
173
+ "The unique identifier of the image - a uuid or a url."
174
+ id: String!
175
+
176
+ "The type of the image, eg. 'graphic'."
73
177
  type: ImageType
178
+
179
+ "The format of the image, eg. 'portrait'."
74
180
  format: ImageFormat!
181
+
182
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
75
183
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
184
+
185
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
76
186
  url: String
77
- width: Int
187
+
188
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
78
189
  altText: String
190
+
191
+ "The width of the image in pixels."
192
+ width: Int
193
+
194
+ "The height of the image in pixels."
79
195
  height: Int
196
+
197
+ "The credit of the image, eg. 'Getty Images'."
80
198
  credit: String
199
+
200
+ "Text describing the content of the image, always shown next to the image."
81
201
  caption: String
82
- id: String!
83
202
  }
84
203
 
85
204
  type ImageWide implements Image {
205
+ "The unique identifier of the image - a uuid or a url."
206
+ id: String!
207
+
208
+ "The type of the image, eg. 'graphic'."
86
209
  type: ImageType
210
+
211
+ "The format of the image, eg. 'portrait'."
87
212
  format: ImageFormat!
213
+
214
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
88
215
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
216
+
217
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
89
218
  url: String
90
- width: Int
219
+
220
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
91
221
  altText: String
222
+
223
+ "The width of the image in pixels."
224
+ width: Int
225
+
226
+ "The height of the image in pixels."
92
227
  height: Int
228
+
229
+ "The credit of the image, eg. 'Getty Images'."
93
230
  credit: String
231
+
232
+ "Text describing the content of the image, always shown next to the image."
94
233
  caption: String
95
- id: String!
96
234
  }
97
235
 
98
236
  type ImageSquareFTEdit implements Image {
237
+ "The unique identifier of the image - a uuid or a url."
238
+ id: String!
239
+
240
+ "The type of the image, eg. 'graphic'."
99
241
  type: ImageType
242
+
243
+ "The format of the image, eg. 'portrait'."
100
244
  format: ImageFormat!
245
+
246
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
101
247
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
248
+
249
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
102
250
  url: String
103
- width: Int
251
+
252
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
104
253
  altText: String
254
+
255
+ "The width of the image in pixels."
256
+ width: Int
257
+
258
+ "The height of the image in pixels."
105
259
  height: Int
260
+
261
+ "The credit of the image, eg. 'Getty Images'."
106
262
  credit: String
263
+
264
+ "Text describing the content of the image, always shown next to the image."
107
265
  caption: String
108
- id: String!
109
266
  }
110
267
 
111
268
  type ImagePortrait implements Image {
269
+ "The unique identifier of the image - a uuid or a url."
270
+ id: String!
271
+
272
+ "The type of the image, eg. 'graphic'."
112
273
  type: ImageType
274
+
275
+ "The format of the image, eg. 'portrait'."
113
276
  format: ImageFormat!
277
+
278
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
114
279
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
280
+
281
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
115
282
  url: String
116
- width: Int
283
+
284
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
117
285
  altText: String
286
+
287
+ "The width of the image in pixels."
288
+ width: Int
289
+
290
+ "The height of the image in pixels."
118
291
  height: Int
292
+
293
+ "The credit of the image, eg. 'Getty Images'."
119
294
  credit: String
295
+
296
+ "Text describing the content of the image, always shown next to the image."
120
297
  caption: String
121
- id: String!
122
298
  }
123
299
 
124
300
  type ImageLandscape implements Image {
301
+ "The unique identifier of the image - a uuid or a url."
302
+ id: String!
303
+
304
+ "The type of the image, eg. 'graphic'."
125
305
  type: ImageType
306
+
307
+ "The format of the image, eg. 'portrait'."
126
308
  format: ImageFormat!
309
+
310
+ "An array of image sources, ie. different images to render based on input width resulting in responsive images."
127
311
  sourceSet(width: Int, maxDpr: Int): [ImageSource!]!
312
+
313
+ "The url of the image, eg. 'https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3Aimage%3A0e7e7b6e-4e7b-11e9-bde6-79e4b4311f90?source=next&fit=scale-down&width=700'."
128
314
  url: String
129
- width: Int
315
+
316
+ "Text describing the content of the image, usually hidden from the user unless the image is not available. It is to be read by screen readers."
130
317
  altText: String
318
+
319
+ "The width of the image in pixels."
320
+ width: Int
321
+
322
+ "The height of the image in pixels."
131
323
  height: Int
324
+
325
+ "The credit of the image, eg. 'Getty Images'."
132
326
  credit: String
327
+
328
+ "Text describing the content of the image, always shown next to the image."
133
329
  caption: String
134
- id: String!
135
330
  }
@@ -1,39 +1,92 @@
1
- interface Picture {
1
+ "A wrapper for images."
2
+ interface Picture {
3
+ "A set of images with different sizes and formats."
2
4
  images: [Image!]!
5
+
6
+ "The alt text of the image to be used for accessibility."
3
7
  alt: String!
8
+
9
+ "The caption of the image."
4
10
  caption: String
11
+
12
+ "The credit of the image, eg. 'Getty Images'."
5
13
  credit: String
14
+
15
+ "The layout width of the image, eg, 'standard'."
6
16
  layoutWidth: String
17
+
18
+ "The type of the image, eg. 'image' or 'graphic'."
7
19
  imageType: ImageType!
20
+
21
+ "A fallback image to be used if the 'images' are not available."
8
22
  fallbackImage: Image!
9
23
  }
10
24
 
11
25
  type PictureStandard implements Picture {
26
+ "A set of images with different sizes and formats."
12
27
  images: [Image!]!
28
+
29
+ "The alt text of the image to be used for accessibility."
13
30
  alt: String!
31
+
32
+ "The caption of the image."
14
33
  caption: String
34
+
35
+ "The credit of the image, eg. 'Getty Images'."
15
36
  credit: String
37
+
38
+ "The layout width of the image, eg, 'standard'."
16
39
  layoutWidth: String
40
+
41
+ "The type of the image, eg. 'image' or 'graphic'."
17
42
  imageType: ImageType!
43
+
44
+ "A fallback image to be used if the 'images' are not available."
18
45
  fallbackImage: Image!
19
46
  }
20
47
 
21
48
  type PictureInline implements Picture {
49
+ "A set of images with different sizes and formats."
22
50
  images: [Image!]!
51
+
52
+ "The alt text of the image to be used for accessibility."
23
53
  alt: String!
54
+
55
+ "The caption of the image."
24
56
  caption: String
57
+
58
+ "The credit of the image, eg. 'Getty Images'."
25
59
  credit: String
60
+
61
+ "The layout width of the image, eg, 'standard'."
26
62
  layoutWidth: String
63
+
64
+ "The type of the image, eg. 'image' or 'graphic'."
27
65
  imageType: ImageType!
66
+
67
+ "A fallback image to be used if the 'images' are not available."
28
68
  fallbackImage: Image!
29
69
  }
30
70
 
31
71
  type PictureFullBleed implements Picture {
72
+ "A set of images with different sizes and formats."
32
73
  images: [Image!]!
74
+
75
+ "The alt text of the image to be used for accessibility."
33
76
  alt: String!
77
+
78
+ "The caption of the image."
34
79
  caption: String
80
+
81
+ "The credit of the image, eg. 'Getty Images'."
35
82
  credit: String
83
+
84
+ "The layout width of the image, eg, 'standard'."
36
85
  layoutWidth: String
86
+
87
+ "The type of the image, eg. 'image' or 'graphic'."
37
88
  imageType: ImageType!
89
+
90
+ "A fallback image to be used if the 'images' are not available."
38
91
  fallbackImage: Image!
39
92
  }
@@ -1,19 +1,52 @@
1
1
  type ClipSet implements Reference {
2
+ "The unique identifier of the clip set."
3
+ id: String!
4
+
5
+ "The type of the clip set, eg. 'video'."
2
6
  type: String!
7
+
8
+ "Whether the clip should play automatically when loaded."
3
9
  autoplay: Boolean
10
+
11
+ "An object containing the accessibility details of the clip."
4
12
  accessibility: Accessibility
13
+
14
+ "Whether the clip should loop."
5
15
  loop: Boolean
16
+
17
+ "Whether the clip should be muted."
6
18
  muted: Boolean
19
+
20
+ "The layout of the clip set, eg. 'in-line'."
7
21
  dataLayout: String
8
- id: String!
22
+
23
+ "Whether the clip set should **not** include audio."
9
24
  noAudio: Boolean
25
+
26
+ "Text describing the content of the clip, to be shown next to the clip."
10
27
  caption: String
28
+
29
+ "The credit text of the clip, eg. 'Getty Images'."
11
30
  credits: String
31
+
32
+ "The description of the clip."
12
33
  description: String
34
+
35
+ "The title to be displayed for the clip set."
13
36
  displayTitle: String
37
+
38
+ "An array of content warnings for the clip set."
14
39
  contentWarning: [String]
40
+
41
+ "The source of the clip set, eg. 'YouTube'."
15
42
  source: String
43
+
44
+ "The subtitle of the clip set."
16
45
  subtitle: String
46
+
47
+ "The date the clip set was published."
17
48
  publishedDate: String
49
+
50
+ "An array of clips in the clip set."
18
51
  clips: [Clip]
19
52
  }
@@ -1,9 +1,17 @@
1
1
  type FlourishFallback {
2
+ "The url of the fallback image."
2
3
  url: String
4
+
5
+ "The width in pixels of the fallback image."
3
6
  width: Int
7
+
8
+ "The height in pixels of the fallback image."
4
9
  height: Int
5
10
  }
6
11
  type Flourish implements Reference {
12
+ "The type of the reference, eg. 'flourish'."
7
13
  type: String!
14
+
15
+ "The fallback image to be used if the flourish graphics cannot be loaded."
8
16
  fallbackImage: FlourishFallback
9
17
  }
@@ -1,9 +1,15 @@
1
1
  type ImageSet implements Reference {
2
+ "The type of the reference, eg. 'image-set'."
2
3
  type: String!
4
+
5
+ "A set of images with different sizes and formats."
3
6
  picture: Picture
4
7
  }
5
8
 
6
9
  type MainImage implements Reference {
10
+ "The type of the reference, eg. 'main-image'."
7
11
  type: String!
12
+
13
+ "A set of images with different sizes and formats."
8
14
  picture: Picture
9
15
  }
@@ -1,4 +1,7 @@
1
1
  type LayoutImage implements Reference {
2
+ "The type of the reference, eg. 'layout-image'."
2
3
  type: String!
4
+
5
+ "A set of images with different sizes and formats."
3
6
  picture: Picture
4
7
  }
@@ -1,4 +1,7 @@
1
1
  type RawImage implements Reference {
2
+ "The type of the reference, eg. 'raw-image'."
2
3
  type: String!
4
+
5
+ "The raw image object."
3
6
  image: Image!
4
7
  }
@@ -1,4 +1,7 @@
1
1
  type Recommended implements Reference {
2
+ "The type of the reference, eg. 'recommended'."
2
3
  type: String!
4
+
5
+ "Recommended references contain teaser thumbnails of related articles."
3
6
  teaser: Teaser
4
7
  }
@@ -1,3 +1,4 @@
1
1
  interface Reference {
2
+ "The type of the reference, eg. 'image-set'. References are additional data that cannot be loaded by content-tree. They will be appended to content-tree nodes during resolution."
2
3
  type: String!
3
4
  }
@@ -1,4 +1,7 @@
1
1
  type ScrollyImage implements Reference {
2
+ "The type of the reference, eg. 'scrolly-image'."
2
3
  type: String!
4
+
5
+ "A set of images with different sizes and formats."
3
6
  picture: Picture
4
7
  }
@@ -1,4 +1,7 @@
1
1
  type Tweet implements Reference {
2
+ "The type of the reference, eg. 'tweet'."
2
3
  type: String!
4
+
5
+ "The raw HTML of the tweet."
3
6
  html: String
4
7
  }
@@ -1,5 +1,10 @@
1
1
  type VideoReference implements Reference {
2
+ "The type of the reference, eg. 'video'."
2
3
  type: String!
4
+
5
+ "The unique identifier of the video - a uuid or a url."
3
6
  id: String!
7
+
8
+ "The title of the video."
4
9
  title: String!
5
10
  }
@@ -1,11 +1,12 @@
1
- """
2
- Describes the structure of content as an abstract syntax tree
3
- """
1
+ "Describes the structure of content as an abstract syntax tree."
2
+
4
3
  type StructuredContent {
5
4
  "bodyXML is converted to a json tree by bodyXMLtoTree(). tagMappings.ts provides the logic for node traversal."
6
5
  tree: JSON!
6
+
7
7
  "An array of objects containing extra information for nodes, which is fetched from external sources eg. Twitter API."
8
8
  references: [Reference!]!
9
+
9
10
  "The tree json as text."
10
11
  text: String
11
12
  }
@@ -13,8 +14,10 @@ type StructuredContent {
13
14
  type RichText {
14
15
  "The source format eg. bodyXML."
15
16
  source: RichTextSource!
16
- "Raw string of the XML as returned from ContentAPI."
17
+
18
+ "Raw string of the XML as returned from content-api."
17
19
  raw: String
20
+
18
21
  "Content tree data with references."
19
22
  structured: StructuredContent!
20
23
  }
@@ -1,28 +1,69 @@
1
1
  union MetaLink = Concept | ContentPackage
2
2
 
3
3
  type Teaser {
4
+ "The unique identifier of the teaser, a uuid or a url."
5
+ id: String
6
+
7
+ "The url of the content that the teaser refers to."
4
8
  url(relative: Boolean): String!
9
+
10
+ "The type of the teaser, eg. 'article' or 'video'."
5
11
  type: String
12
+
13
+ "The title of the teaser."
6
14
  title: String
7
- id: String
15
+
16
+ "The image to be used as a thumbnail for the teaser."
8
17
  image: Image
18
+
19
+ "The date the content of the teaser was published."
9
20
  publishedDate: String
21
+
22
+ "The date the content of the teaser was first published."
10
23
  firstPublishedDate: String
24
+
25
+ "An object containing the metadata details of the teaser, eg. id, url, prefLabel."
11
26
  metaLink: MetaLink
27
+
28
+ "An object containing the metadata details of the teaser, eg. id, url, prefLabel."
12
29
  metaAltLink: MetaLink
30
+
31
+ "The text to be displayed before the metadata of the teaser."
13
32
  metaPrefixText: String
33
+
34
+ "The text to be displayed after the metadata of the teaser."
14
35
  metaSuffixText: String
36
+
37
+ "An object containing a map of indicator items to boolean values, eg. accessLevel, isOpinion."
15
38
  indicators: Indicators
39
+
40
+ "The theme to use for the teaser, eg. 'opinion' or 'news'."
16
41
  theme: String
42
+
43
+ "The introductory text of the teaser."
17
44
  standfirst: String
18
45
  }
19
46
 
47
+ "Indicators are used to determine teaser styling."
20
48
  type Indicators {
49
+ "The access level of the teaser, eg. 'free' or 'premium'."
21
50
  accessLevel: AccessLevel
51
+
52
+ "Whether the teaser is an opinion piece."
22
53
  isOpinion: Boolean
54
+
55
+ "Whether the teaser is a column, ie. has one author."
23
56
  isColumn: Boolean
57
+
58
+ "Whether the teaser is a podcast."
24
59
  isPodcast: Boolean
60
+
61
+ "Whether the teaser is an editor's choice."
25
62
  isEditorsChoice: Boolean
63
+
64
+ "Whether the teaser is exclusive."
26
65
  isExclusive: Boolean
66
+
67
+ "Whether the teaser is a scoop."
27
68
  isScoop: Boolean
28
69
  }