@financial-times/cp-content-pipeline-schema 1.4.3 → 1.5.0
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.
- package/CHANGELOG.md +24 -0
- package/lib/fixtures/capiObject.js +1 -1
- package/lib/fixtures/capiObject.js.map +1 -1
- package/lib/fixtures/clipSet.d.ts +2 -0
- package/lib/fixtures/clipSet.js +70 -0
- package/lib/fixtures/clipSet.js.map +1 -0
- package/lib/generated/index.d.ts +136 -3
- package/lib/model/CapiResponse.d.ts +3 -2
- package/lib/model/CapiResponse.js +10 -1
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/Clip.d.ts +28 -0
- package/lib/model/Clip.js +51 -0
- package/lib/model/Clip.js.map +1 -0
- package/lib/model/schemas/capi/article.d.ts +605 -9
- package/lib/model/schemas/capi/article.js +1 -0
- package/lib/model/schemas/capi/article.js.map +1 -1
- package/lib/model/schemas/capi/audio.d.ts +34 -31
- package/lib/model/schemas/capi/audio.js +1 -0
- package/lib/model/schemas/capi/audio.js.map +1 -1
- package/lib/model/schemas/capi/base-schema.d.ts +1358 -14
- package/lib/model/schemas/capi/base-schema.js +46 -2
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +6 -3
- package/lib/model/schemas/capi/content-package.js +1 -0
- package/lib/model/schemas/capi/content-package.js.map +1 -1
- package/lib/model/schemas/capi/live-blog-package.d.ts +605 -9
- package/lib/model/schemas/capi/live-blog-package.js +1 -0
- package/lib/model/schemas/capi/live-blog-package.js.map +1 -1
- package/lib/model/schemas/capi/placeholder.d.ts +605 -9
- package/lib/model/schemas/capi/placeholder.js +1 -0
- package/lib/model/schemas/capi/placeholder.js.map +1 -1
- package/lib/resolvers/clip.d.ts +10 -0
- package/lib/resolvers/clip.js +13 -0
- package/lib/resolvers/clip.js.map +1 -0
- package/lib/resolvers/content-tree/Workarounds.d.ts +10 -2
- package/lib/resolvers/content-tree/nodePredicates.d.ts +3 -3
- package/lib/resolvers/content-tree/references/ClipSet.d.ts +27 -0
- package/lib/resolvers/content-tree/references/ClipSet.js +37 -0
- package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -0
- package/lib/resolvers/content-tree/references/ImageSet.js +3 -2
- package/lib/resolvers/content-tree/references/ImageSet.js.map +1 -1
- package/lib/resolvers/content-tree/references/Reference.d.ts +1 -1
- package/lib/resolvers/content-tree/references/ScrollyImage.js +3 -2
- package/lib/resolvers/content-tree/references/ScrollyImage.js.map +1 -1
- package/lib/resolvers/content-tree/references/index.d.ts +4 -1
- package/lib/resolvers/content-tree/references/index.js +4 -0
- package/lib/resolvers/content-tree/references/index.js.map +1 -1
- package/lib/resolvers/content-tree/tagMappings.js +9 -0
- package/lib/resolvers/content-tree/tagMappings.js.map +1 -1
- package/lib/resolvers/content.d.ts +1 -0
- package/lib/resolvers/content.js +1 -0
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/index.d.ts +10 -0
- package/lib/resolvers/index.js +2 -0
- package/lib/resolvers/index.js.map +1 -1
- package/lib/resolvers/scalars.d.ts +2 -0
- package/lib/resolvers/scalars.js +6 -1
- package/lib/resolvers/scalars.js.map +1 -1
- package/package.json +1 -1
- package/src/fixtures/capiObject.ts +1 -1
- package/src/fixtures/clipSet.ts +72 -0
- package/src/generated/index.ts +144 -3
- package/src/model/CapiResponse.ts +12 -2
- package/src/model/Clip.ts +75 -0
- package/src/model/__snapshots__/RichText.test.ts.snap +25 -0
- package/src/model/schemas/capi/article.ts +1 -0
- package/src/model/schemas/capi/audio.ts +1 -0
- package/src/model/schemas/capi/base-schema.ts +50 -1
- package/src/model/schemas/capi/content-package.ts +1 -0
- package/src/model/schemas/capi/live-blog-package.ts +1 -0
- package/src/model/schemas/capi/placeholder.ts +1 -0
- package/src/resolvers/clip.ts +13 -0
- package/src/resolvers/content-tree/Workarounds.ts +13 -2
- package/src/resolvers/content-tree/references/ClipSet.ts +49 -0
- package/src/resolvers/content-tree/references/ImageSet.ts +9 -5
- package/src/resolvers/content-tree/references/ScrollyImage.ts +9 -5
- package/src/resolvers/content-tree/references/index.ts +6 -0
- package/src/resolvers/content-tree/tagMappings.ts +10 -0
- package/src/resolvers/content.ts +1 -0
- package/src/resolvers/index.ts +2 -0
- package/src/resolvers/scalars.ts +8 -0
- package/src/types/internal-content.d.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/clip.graphql +28 -0
- package/typedefs/content.graphql +8 -2
- package/typedefs/references/clipSet.graphql +19 -0
- package/typedefs/scalars.graphql +1 -0
|
@@ -96,6 +96,20 @@ Object {
|
|
|
96
96
|
"type": "image-set",
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
|
+
Object {
|
|
100
|
+
"contentApiData": undefined,
|
|
101
|
+
"reference": Object {
|
|
102
|
+
"autoplay": true,
|
|
103
|
+
"data": Object {
|
|
104
|
+
"referenceIndex": 9,
|
|
105
|
+
},
|
|
106
|
+
"dataLayout": "in-line",
|
|
107
|
+
"id": "http://api-t.ft.com/content/f17fe25b-cdea-4d5f-a6af-40e56e33e888",
|
|
108
|
+
"loop": true,
|
|
109
|
+
"muted": true,
|
|
110
|
+
"type": "clip-set",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
99
113
|
],
|
|
100
114
|
"text": "Eliot After The Waste Land (Eliot Biographies, 2)by Robert Crawford, Jonathan Cape £25
|
|
101
115
|
|
|
@@ -905,6 +919,17 @@ Join our online book group on Facebook at FT Books Café",
|
|
|
905
919
|
],
|
|
906
920
|
"type": "paragraph",
|
|
907
921
|
},
|
|
922
|
+
Object {
|
|
923
|
+
"autoplay": true,
|
|
924
|
+
"data": Object {
|
|
925
|
+
"referenceIndex": 9,
|
|
926
|
+
},
|
|
927
|
+
"dataLayout": "in-line",
|
|
928
|
+
"id": "http://api-t.ft.com/content/f17fe25b-cdea-4d5f-a6af-40e56e33e888",
|
|
929
|
+
"loop": true,
|
|
930
|
+
"muted": true,
|
|
931
|
+
"type": "clip-set",
|
|
932
|
+
},
|
|
908
933
|
Object {
|
|
909
934
|
"children": Array [
|
|
910
935
|
Object {
|
|
@@ -88,6 +88,50 @@ export const AlternativeImage = z.object({
|
|
|
88
88
|
promotionalImage: BaseImage,
|
|
89
89
|
})
|
|
90
90
|
|
|
91
|
+
const ClipSource = z.object({
|
|
92
|
+
audioCodec: z.string().optional(),
|
|
93
|
+
binaryUrl: z.string().optional(),
|
|
94
|
+
duration: z.number().optional(),
|
|
95
|
+
mediaType: z.string().optional(),
|
|
96
|
+
pixelHeight: z.number().optional(),
|
|
97
|
+
pixelWidth: z.number().optional(),
|
|
98
|
+
videoCodec: z.string().optional(),
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
export const Clip = z.object({
|
|
102
|
+
id: z.string(),
|
|
103
|
+
type: z.literal('http://www.ft.com/ontology/content/Clip'),
|
|
104
|
+
format: z
|
|
105
|
+
.union([z.literal('standardInline'), z.literal('mobile')])
|
|
106
|
+
.optional(),
|
|
107
|
+
dataSource: ClipSource.array(),
|
|
108
|
+
poster: ImageSet.optional(),
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
export const ClipSet = z.object({
|
|
112
|
+
id: z.string(),
|
|
113
|
+
type: z.literal('http://www.ft.com/ontology/content/ClipSet'),
|
|
114
|
+
members: Clip.array(),
|
|
115
|
+
caption: z.string().optional(),
|
|
116
|
+
dataCopyright: z.string().optional(),
|
|
117
|
+
description: z.string().optional(),
|
|
118
|
+
displayTitle: z.string().optional(),
|
|
119
|
+
contentWarning: z.string().array().optional(),
|
|
120
|
+
noAudio: z.boolean().optional(),
|
|
121
|
+
source: z.string().optional(),
|
|
122
|
+
subtitle: z.string().optional(),
|
|
123
|
+
publishedDate: z.string().optional(),
|
|
124
|
+
accessibility: z.object({
|
|
125
|
+
captions: z.array(
|
|
126
|
+
z.object({
|
|
127
|
+
mediaType: z.string(),
|
|
128
|
+
url: z.string(),
|
|
129
|
+
})
|
|
130
|
+
),
|
|
131
|
+
transcript: z.string().optional(),
|
|
132
|
+
}),
|
|
133
|
+
})
|
|
134
|
+
|
|
91
135
|
export const DataSource = z.object({
|
|
92
136
|
binaryUrl: z.string(),
|
|
93
137
|
duration: z.number(),
|
|
@@ -154,6 +198,11 @@ export const baseMetadataSchema = z.object({
|
|
|
154
198
|
z.literal('withContributorPayment'),
|
|
155
199
|
z.literal('unknown'),
|
|
156
200
|
]),
|
|
201
|
+
canBeDistributed: z.union([
|
|
202
|
+
z.literal('yes'),
|
|
203
|
+
z.literal('no'),
|
|
204
|
+
z.literal('verify'),
|
|
205
|
+
]),
|
|
157
206
|
topper: Topper.optional(),
|
|
158
207
|
comments: z
|
|
159
208
|
.object({
|
|
@@ -208,6 +257,6 @@ export const baseMediaSchema = z.object({
|
|
|
208
257
|
mainImage: MainImage.optional(),
|
|
209
258
|
leadImages: LeadImage.array().optional(),
|
|
210
259
|
alternativeImages: AlternativeImage.optional(),
|
|
211
|
-
embeds:
|
|
260
|
+
embeds: z.array(z.union([ImageSet, ClipSet])).optional(),
|
|
212
261
|
dataSource: DataSource.array().optional(),
|
|
213
262
|
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClipResolvers } from '../generated'
|
|
2
|
+
|
|
3
|
+
const resolvers = {
|
|
4
|
+
Clip: {
|
|
5
|
+
__resolveType: () => 'Clip',
|
|
6
|
+
dataSource: (clip) => clip.dataSource(),
|
|
7
|
+
type: (clip) => clip.type(),
|
|
8
|
+
format: (clip) => clip.format(),
|
|
9
|
+
poster: (clip) => clip.poster(),
|
|
10
|
+
},
|
|
11
|
+
} satisfies { Clip: ClipResolvers }
|
|
12
|
+
|
|
13
|
+
export default resolvers
|
|
@@ -68,7 +68,7 @@ export interface YoutubeVideo extends ContentTree.Node {
|
|
|
68
68
|
url: string
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export interface
|
|
71
|
+
export interface OldClip extends ContentTree.Node {
|
|
72
72
|
type: 'clip'
|
|
73
73
|
url: string
|
|
74
74
|
autoplay: boolean
|
|
@@ -83,6 +83,16 @@ export interface Clip extends ContentTree.Node {
|
|
|
83
83
|
credits: string
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
// this type is used for bodyXML transformation ONLY in tagMappings
|
|
87
|
+
export interface ClipSet extends ContentTree.Node {
|
|
88
|
+
type: 'clip-set'
|
|
89
|
+
id: string
|
|
90
|
+
autoplay: boolean
|
|
91
|
+
loop: boolean
|
|
92
|
+
muted: boolean
|
|
93
|
+
dataLayout: 'in-line' | 'mid-grid' | 'full-grid'
|
|
94
|
+
}
|
|
95
|
+
|
|
86
96
|
export type TableColumnSettings = {
|
|
87
97
|
hideOnMobile: boolean
|
|
88
98
|
sortable: boolean
|
|
@@ -148,6 +158,8 @@ export type AnyNode =
|
|
|
148
158
|
| ContentTree.Blockquote
|
|
149
159
|
| ContentTree.Pullquote
|
|
150
160
|
| ContentTree.ImageSet
|
|
161
|
+
| ClipSet
|
|
162
|
+
| OldClip
|
|
151
163
|
| ContentTree.Recommended
|
|
152
164
|
| ContentTree.Tweet
|
|
153
165
|
| ContentTree.Flourish
|
|
@@ -168,7 +180,6 @@ export type AnyNode =
|
|
|
168
180
|
| TableCell
|
|
169
181
|
| Video
|
|
170
182
|
| YoutubeVideo
|
|
171
|
-
| Clip
|
|
172
183
|
| MainImage
|
|
173
184
|
| MainImageRaw
|
|
174
185
|
| RawImage
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ClipSet as CAPIClipSet } from '../../../types/internal-content'
|
|
2
|
+
import type { ClipSet as ClipSetWorkaroundContentTree, OldClip as OldClipContentTree } from '../Workarounds'
|
|
3
|
+
import { uuidFromUrl } from '../../../helpers/metadata'
|
|
4
|
+
import { Clip } from '../../../model/Clip'
|
|
5
|
+
import { ClipSetResolvers } from '../../../generated'
|
|
6
|
+
import { ReferenceWithCAPIData } from '.'
|
|
7
|
+
|
|
8
|
+
function getClipSet(
|
|
9
|
+
parent: ReferenceWithCAPIData<ClipSetWorkaroundContentTree|OldClipContentTree>
|
|
10
|
+
) {
|
|
11
|
+
const clipSets = parent.contentApiData
|
|
12
|
+
?.embeds()
|
|
13
|
+
?.filter((embedded) => embedded.type.includes('ClipSet')) as
|
|
14
|
+
| CAPIClipSet[]
|
|
15
|
+
| []
|
|
16
|
+
|
|
17
|
+
const clipSet = clipSets?.find(
|
|
18
|
+
(embed: CAPIClipSet) =>
|
|
19
|
+
uuidFromUrl(embed.id) === uuidFromUrl((parent.reference as ClipSetWorkaroundContentTree).id)
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
return clipSet as CAPIClipSet
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const ClipSet = {
|
|
26
|
+
// amend id, caption, description, credits when v1 is no longer supported
|
|
27
|
+
id: (parent) => ((parent.reference as ClipSetWorkaroundContentTree).id ? uuidFromUrl((parent.reference as ClipSetWorkaroundContentTree).id) : ''),
|
|
28
|
+
autoplay: (parent) => parent.reference.autoplay,
|
|
29
|
+
noAudio: (parent) => getClipSet(parent)?.noAudio || null,
|
|
30
|
+
loop: (parent) => parent.reference.loop,
|
|
31
|
+
muted: (parent) => parent.reference.muted,
|
|
32
|
+
dataLayout: (parent) => parent.reference.dataLayout,
|
|
33
|
+
caption: (parent) => ((parent.reference as OldClipContentTree).caption ?? getClipSet(parent)?.caption),
|
|
34
|
+
accessibility: (parent) => getClipSet(parent)?.accessibility || null,
|
|
35
|
+
description: (parent) => ((parent.reference as OldClipContentTree).description ?? getClipSet(parent)?.description),
|
|
36
|
+
credits: (parent) => ((parent.reference as OldClipContentTree).credits ?? getClipSet(parent)?.dataCopyright),
|
|
37
|
+
displayTitle: (parent) => getClipSet(parent)?.displayTitle || null,
|
|
38
|
+
contentWarning: (parent) => getClipSet(parent)?.contentWarning || null,
|
|
39
|
+
source: (parent) => getClipSet(parent)?.source || null,
|
|
40
|
+
subtitle: (parent) => getClipSet(parent)?.subtitle || null,
|
|
41
|
+
publishedDate: (parent) => getClipSet(parent)?.publishedDate || null,
|
|
42
|
+
async clips(parent) {
|
|
43
|
+
const clipSet = getClipSet(parent)
|
|
44
|
+
|
|
45
|
+
return clipSet && clipSet.members && clipSet.members.length > 0
|
|
46
|
+
? clipSet.members.map((clip) => new Clip(clip))
|
|
47
|
+
: null
|
|
48
|
+
},
|
|
49
|
+
} satisfies ClipSetResolvers
|
|
@@ -7,12 +7,16 @@ export const ImageSet = {
|
|
|
7
7
|
async picture(parent, _args, context) {
|
|
8
8
|
const isLiveBlog = parent.contentApiData?.type() === 'LiveBlogPost'
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const imageSets = parent.contentApiData
|
|
11
11
|
?.embeds()
|
|
12
|
-
?.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
?.filter((embedded) => embedded.type.includes('ImageSet')) as
|
|
13
|
+
| CAPIImageSet[]
|
|
14
|
+
| []
|
|
15
|
+
|
|
16
|
+
const imageSet = imageSets?.find(
|
|
17
|
+
(embed: CAPIImageSet) =>
|
|
18
|
+
uuidFromUrl(embed.id) === uuidFromUrl(parent.reference.id)
|
|
19
|
+
)
|
|
16
20
|
|
|
17
21
|
return imageSet && imageSet.members && imageSet.members.length > 0
|
|
18
22
|
? new Picture(imageSet, isLiveBlog, context)
|
|
@@ -7,12 +7,16 @@ export const ScrollyImage = {
|
|
|
7
7
|
picture(parent, _args, context) {
|
|
8
8
|
const isLiveBlog = parent.contentApiData?.type() === 'LiveBlogPost'
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const imageSets = parent.contentApiData
|
|
11
11
|
?.embeds()
|
|
12
|
-
?.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
?.filter((embedded) => embedded.type.includes('ImageSet')) as
|
|
13
|
+
| CAPIImageSet[]
|
|
14
|
+
| []
|
|
15
|
+
|
|
16
|
+
const imageSet = imageSets?.find(
|
|
17
|
+
(embed: CAPIImageSet) =>
|
|
18
|
+
uuidFromUrl(embed.id) === uuidFromUrl(parent.reference.id)
|
|
19
|
+
)
|
|
16
20
|
|
|
17
21
|
return imageSet ? new Picture(imageSet, isLiveBlog, context) : null
|
|
18
22
|
},
|
|
@@ -7,6 +7,7 @@ import { Reference } from './Reference'
|
|
|
7
7
|
|
|
8
8
|
import { Tweet } from './Tweet'
|
|
9
9
|
import { ImageSet } from './ImageSet'
|
|
10
|
+
import { ClipSet } from './ClipSet'
|
|
10
11
|
import { Video } from './Video'
|
|
11
12
|
import { Flourish } from './Flourish'
|
|
12
13
|
import { Recommended } from './Recommended'
|
|
@@ -16,6 +17,7 @@ import { ScrollyImage } from './ScrollyImage'
|
|
|
16
17
|
import {
|
|
17
18
|
FlourishResolvers,
|
|
18
19
|
ImageSetResolvers,
|
|
20
|
+
ClipSetResolvers,
|
|
19
21
|
LayoutImageResolvers,
|
|
20
22
|
RawImageResolvers,
|
|
21
23
|
RecommendedResolvers,
|
|
@@ -35,6 +37,7 @@ export const resolvers: {
|
|
|
35
37
|
Reference: ReferenceResolvers
|
|
36
38
|
Tweet: TweetResolvers
|
|
37
39
|
ImageSet: ImageSetResolvers
|
|
40
|
+
ClipSet: ClipSetResolvers
|
|
38
41
|
VideoReference: VideoReferenceResolvers
|
|
39
42
|
Flourish: FlourishResolvers
|
|
40
43
|
Recommended: RecommendedResolvers
|
|
@@ -45,6 +48,7 @@ export const resolvers: {
|
|
|
45
48
|
Reference,
|
|
46
49
|
Tweet,
|
|
47
50
|
ImageSet,
|
|
51
|
+
ClipSet,
|
|
48
52
|
VideoReference: Video,
|
|
49
53
|
Flourish,
|
|
50
54
|
Recommended,
|
|
@@ -57,6 +61,8 @@ export const mapNodeToReference = {
|
|
|
57
61
|
flourish: 'Flourish',
|
|
58
62
|
tweet: 'Tweet',
|
|
59
63
|
'image-set': 'ImageSet',
|
|
64
|
+
'clip-set': 'ClipSet',
|
|
65
|
+
clip: 'ClipSet',
|
|
60
66
|
video: 'VideoReference',
|
|
61
67
|
recommended: 'Recommended',
|
|
62
68
|
'layout-image': 'LayoutImage',
|
|
@@ -600,6 +600,16 @@ const commonTagMappings: TagMappings = {
|
|
|
600
600
|
level: 'subheading',
|
|
601
601
|
children: everyChildIsType('text', traverse(), 'heading', context),
|
|
602
602
|
}),
|
|
603
|
+
'ft-content[type="http://www.ft.com/ontology/content/ClipSet"]': ($el) => ({
|
|
604
|
+
type: 'clip-set',
|
|
605
|
+
id: $el.attr('url') || '',
|
|
606
|
+
autoplay: getBooleanAttributeValue($el, 'autoplay'),
|
|
607
|
+
loop: getBooleanAttributeValue($el, 'loop'),
|
|
608
|
+
muted: getBooleanAttributeValue($el, 'muted'),
|
|
609
|
+
dataLayout:
|
|
610
|
+
($el.attr('data-layout') as 'full-grid' | 'in-line' | 'mid-grid') ||
|
|
611
|
+
'in-line',
|
|
612
|
+
}),
|
|
603
613
|
}
|
|
604
614
|
|
|
605
615
|
// We can't trust cheerio.attr() method since with attributes like "autoplay"
|
package/src/resolvers/content.ts
CHANGED
|
@@ -55,6 +55,7 @@ const resolvers = {
|
|
|
55
55
|
annotations: (parent) => parent.annotations(),
|
|
56
56
|
accessLevel: (parent) => parent.accessLevel(),
|
|
57
57
|
canBeSyndicated: (parent) => parent.canBeSyndicated(),
|
|
58
|
+
originatingParty: (parent) => parent.originatingParty(),
|
|
58
59
|
commentsEnabled: (parent) => parent.commentsEnabled(),
|
|
59
60
|
design: (parent) => parent.design(),
|
|
60
61
|
},
|
package/src/resolvers/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as concept } from './concept'
|
|
|
2
2
|
import { default as content } from './content'
|
|
3
3
|
import { default as core } from './core'
|
|
4
4
|
import { default as image } from './image'
|
|
5
|
+
import { default as clip } from './clip'
|
|
5
6
|
import { default as metaLink } from './meta-link'
|
|
6
7
|
import { default as picture } from './picture'
|
|
7
8
|
import { default as richText } from './richText'
|
|
@@ -16,6 +17,7 @@ const resolvers = {
|
|
|
16
17
|
...content,
|
|
17
18
|
...core,
|
|
18
19
|
...image,
|
|
20
|
+
...clip,
|
|
19
21
|
...metaLink,
|
|
20
22
|
...picture,
|
|
21
23
|
...references,
|
package/src/resolvers/scalars.ts
CHANGED
|
@@ -103,6 +103,13 @@ export const ImageType = new LiteralUnionScalar<['image', 'graphic']>({
|
|
|
103
103
|
values: ['image', 'graphic'],
|
|
104
104
|
})
|
|
105
105
|
|
|
106
|
+
export const ClipFormat = new LiteralUnionScalar<['standard-inline', 'mobile']>(
|
|
107
|
+
{
|
|
108
|
+
name: 'ClipFormat',
|
|
109
|
+
values: ['standard-inline', 'mobile'],
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
|
|
106
113
|
export const RichTextSource = new LiteralUnionScalar<
|
|
107
114
|
['standfirst', 'summary', 'bodyXML']
|
|
108
115
|
>({
|
|
@@ -138,6 +145,7 @@ export const ContentType = new LiteralUnionScalar<
|
|
|
138
145
|
})
|
|
139
146
|
|
|
140
147
|
const resolvers = {
|
|
148
|
+
ClipFormat,
|
|
141
149
|
ImageFormat,
|
|
142
150
|
PackageDesign,
|
|
143
151
|
TopperBackgroundColour,
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
Annotation,
|
|
8
8
|
Image,
|
|
9
9
|
ImageSet,
|
|
10
|
+
Clip,
|
|
11
|
+
ClipSet,
|
|
10
12
|
MainImage,
|
|
11
13
|
LeadImage,
|
|
12
14
|
capiNotificationResponse,
|
|
@@ -39,6 +41,8 @@ type Image = z.infer<typeof Image>
|
|
|
39
41
|
type LeadImage = z.infer<typeof LeadImage>
|
|
40
42
|
type ImageSet = z.infer<typeof ImageSet>
|
|
41
43
|
type MainImage = z.infer<typeof MainImage>
|
|
44
|
+
type Clip = z.infer<typeof Clip>
|
|
45
|
+
type ClipSet = z.infer<typeof ClipSet>
|
|
42
46
|
|
|
43
47
|
type ContentTypeSchemas =
|
|
44
48
|
| Article
|