@financial-times/cp-content-pipeline-schema 2.14.2 → 2.15.1
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 +16 -0
- package/lib/datasources/capi.d.ts +2 -0
- package/lib/datasources/capi.js +17 -1
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/capi.test.js +6 -1
- package/lib/datasources/capi.test.js.map +1 -1
- package/lib/datasources/instrumented.js.map +1 -1
- package/lib/datasources/origami-image.js.map +1 -1
- package/lib/datasources/twitter.js.map +1 -1
- package/lib/datasources/url-management.js.map +1 -1
- package/lib/fixtures/dummyContext.js.map +1 -1
- package/lib/generated/index.d.ts +78 -16
- package/lib/helpers/decorateHeadshotUrl.js +1 -1
- package/lib/helpers/decorateHeadshotUrl.js.map +1 -1
- package/lib/helpers/flatten-formatted-zod-errors.d.ts +6 -0
- package/lib/helpers/flatten-formatted-zod-errors.js +39 -0
- package/lib/helpers/flatten-formatted-zod-errors.js.map +1 -0
- package/lib/helpers/imageService.js +1 -1
- package/lib/helpers/imageService.js.map +1 -1
- package/lib/helpers/isError.js +1 -1
- package/lib/helpers/isError.js.map +1 -1
- package/lib/helpers/metadata.js +1 -2
- package/lib/helpers/metadata.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js.map +1 -1
- package/lib/model/Byline.js +1 -1
- package/lib/model/Byline.js.map +1 -1
- package/lib/model/CapiList.d.ts +17 -0
- package/lib/model/CapiList.js +87 -0
- package/lib/model/CapiList.js.map +1 -0
- package/lib/model/CapiResponse.d.ts +1 -1
- package/lib/model/CapiResponse.js +8 -39
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Concept.js.map +1 -1
- package/lib/model/FlourishSource.js.map +1 -1
- package/lib/model/Image.d.ts +2 -34
- package/lib/model/Image.js +1 -1
- package/lib/model/Image.js.map +1 -1
- package/lib/model/Person.js.map +1 -1
- package/lib/model/Picture.js.map +1 -1
- package/lib/model/RichText.d.ts +1 -1
- package/lib/model/RichText.js.map +1 -1
- package/lib/model/Topper.d.ts +2 -2
- package/lib/model/Topper.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +3 -3
- package/lib/model/schemas/capi/audio.d.ts +3 -3
- package/lib/model/schemas/capi/base-schema.d.ts +3 -3
- package/lib/model/schemas/capi/base-schema.js +1 -1
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +3 -3
- package/lib/model/schemas/capi/index.d.ts +15 -15
- package/lib/model/schemas/capi/index.js.map +1 -1
- package/lib/model/schemas/capi/list.d.ts +48 -0
- package/lib/model/schemas/capi/list.js +35 -0
- package/lib/model/schemas/capi/list.js.map +1 -0
- package/lib/model/schemas/capi/live-blog-package.d.ts +3 -3
- package/lib/model/schemas/capi/placeholder.d.ts +3 -3
- package/lib/model/schemas/capi/video.d.ts +3 -3
- package/lib/resolvers/clip.d.ts +5 -5
- package/lib/resolvers/content-tree/bodyXMLToTree.js +1 -1
- package/lib/resolvers/content-tree/bodyXMLToTree.js.map +1 -1
- package/lib/resolvers/content-tree/extractText.js +1 -1
- package/lib/resolvers/content-tree/extractText.js.map +1 -1
- package/lib/resolvers/content-tree/nodePredicates.d.ts +3 -3
- package/lib/resolvers/content-tree/nodePredicates.js.map +1 -1
- package/lib/resolvers/content-tree/references/ClipSet.d.ts +2 -2
- package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -1
- package/lib/resolvers/content-tree/references/Flourish.js.map +1 -1
- package/lib/resolvers/content-tree/references/RawImage.js.map +1 -1
- package/lib/resolvers/content-tree/references/Recommended.js.map +1 -1
- package/lib/resolvers/content-tree/references/Reference.d.ts +2 -2
- package/lib/resolvers/content-tree/references/Reference.js.map +1 -1
- package/lib/resolvers/content-tree/references/Tweet.js.map +1 -1
- package/lib/resolvers/content-tree/references/Video.js.map +1 -1
- package/lib/resolvers/content-tree/tagMappings.js +5 -5
- package/lib/resolvers/content-tree/tagMappings.js.map +1 -1
- package/lib/resolvers/content-tree/updateTreeWithReferenceIds.js +1 -1
- package/lib/resolvers/content-tree/updateTreeWithReferenceIds.js.map +1 -1
- package/lib/resolvers/content.d.ts +16 -16
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/core.d.ts +1 -0
- package/lib/resolvers/core.js +27 -21
- package/lib/resolvers/core.js.map +1 -1
- package/lib/resolvers/image.js.map +1 -1
- package/lib/resolvers/index.d.ts +56 -44
- package/lib/resolvers/index.js +2 -0
- package/lib/resolvers/index.js.map +1 -1
- package/lib/resolvers/list.d.ts +14 -0
- package/lib/resolvers/list.js +16 -0
- package/lib/resolvers/list.js.map +1 -0
- package/lib/resolvers/literal-union.js.map +1 -1
- package/lib/resolvers/meta-link.js.map +1 -1
- package/lib/resolvers/richText.d.ts +5 -5
- package/lib/resolvers/scalars.d.ts +4 -0
- package/lib/resolvers/scalars.js +18 -1
- package/lib/resolvers/scalars.js.map +1 -1
- package/lib/types/cache.js +1 -2
- package/lib/types/cache.js.map +1 -1
- package/package.json +1 -1
- package/src/datasources/capi.test.ts +6 -1
- package/src/datasources/capi.ts +19 -1
- package/src/fixtures/dummyContext.ts +1 -1
- package/src/generated/index.ts +78 -16
- package/src/helpers/flatten-formatted-zod-errors.ts +67 -0
- package/src/index.ts +3 -1
- package/src/model/CapiList.ts +103 -0
- package/src/model/CapiResponse.ts +8 -70
- package/src/model/schemas/capi/base-schema.ts +1 -1
- package/src/model/schemas/capi/list.ts +36 -0
- package/src/resolvers/core.ts +29 -22
- package/src/resolvers/index.ts +2 -0
- package/src/resolvers/list.ts +15 -0
- package/src/resolvers/scalars.ts +30 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/content.graphql +8 -8
- package/typedefs/core.graphql +3 -0
- package/typedefs/list.graphql +20 -0
- package/typedefs/scalars.graphql +2 -0
package/typedefs/content.graphql
CHANGED
|
@@ -78,7 +78,7 @@ interface Content {
|
|
|
78
78
|
firstPublishedDate: String!
|
|
79
79
|
|
|
80
80
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
81
|
-
publishReference: String
|
|
81
|
+
publishReference: String
|
|
82
82
|
|
|
83
83
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
84
84
|
mainImage: Image
|
|
@@ -155,7 +155,7 @@ type Article implements Content {
|
|
|
155
155
|
firstPublishedDate: String!
|
|
156
156
|
|
|
157
157
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
158
|
-
publishReference: String
|
|
158
|
+
publishReference: String
|
|
159
159
|
|
|
160
160
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
161
161
|
mainImage: Image
|
|
@@ -235,7 +235,7 @@ type Placeholder implements Content {
|
|
|
235
235
|
firstPublishedDate: String!
|
|
236
236
|
|
|
237
237
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
238
|
-
publishReference: String
|
|
238
|
+
publishReference: String
|
|
239
239
|
|
|
240
240
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
241
241
|
mainImage: Image
|
|
@@ -315,7 +315,7 @@ type LiveBlogPackage implements Content {
|
|
|
315
315
|
firstPublishedDate: String!
|
|
316
316
|
|
|
317
317
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
318
|
-
publishReference: String
|
|
318
|
+
publishReference: String
|
|
319
319
|
|
|
320
320
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
321
321
|
mainImage: Image
|
|
@@ -406,7 +406,7 @@ type LiveBlogPost implements Content {
|
|
|
406
406
|
firstPublishedDate: String!
|
|
407
407
|
|
|
408
408
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
409
|
-
publishReference: String
|
|
409
|
+
publishReference: String
|
|
410
410
|
|
|
411
411
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
412
412
|
mainImage: Image
|
|
@@ -493,7 +493,7 @@ type Audio implements Content {
|
|
|
493
493
|
firstPublishedDate: String!
|
|
494
494
|
|
|
495
495
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
496
|
-
publishReference: String
|
|
496
|
+
publishReference: String
|
|
497
497
|
|
|
498
498
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
499
499
|
mainImage: Image
|
|
@@ -573,7 +573,7 @@ type Video implements Content {
|
|
|
573
573
|
firstPublishedDate: String!
|
|
574
574
|
|
|
575
575
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
576
|
-
publishReference: String
|
|
576
|
+
publishReference: String
|
|
577
577
|
|
|
578
578
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
579
579
|
mainImage: Image
|
|
@@ -650,7 +650,7 @@ type ContentPackage implements Content {
|
|
|
650
650
|
firstPublishedDate: String!
|
|
651
651
|
|
|
652
652
|
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
653
|
-
publishReference: String
|
|
653
|
+
publishReference: String
|
|
654
654
|
|
|
655
655
|
"An image object containing the url and the caption, to be displayed usually before the article content."
|
|
656
656
|
mainImage: Image
|
package/typedefs/core.graphql
CHANGED
|
@@ -7,6 +7,9 @@ type Query {
|
|
|
7
7
|
"The resolved article content for given uuid."
|
|
8
8
|
content(uuid: String!): Content!
|
|
9
9
|
|
|
10
|
+
"Resolve a content list from a uuid."
|
|
11
|
+
list(uuid: String!): List!
|
|
12
|
+
|
|
10
13
|
"The article content as resolved from passed-in content-api json data."
|
|
11
14
|
contentFromJSON(content: JSON!): Content!
|
|
12
15
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type List {
|
|
2
|
+
"The UUID of the list"
|
|
3
|
+
id: String!
|
|
4
|
+
"The upstream API URL for the list"
|
|
5
|
+
apiUrl: String!
|
|
6
|
+
"The title of the list"
|
|
7
|
+
title: String!
|
|
8
|
+
"The content items referenced by this list"
|
|
9
|
+
items: [Content!]!
|
|
10
|
+
"The type of the list, e.g. Recommended"
|
|
11
|
+
listType: ListType!
|
|
12
|
+
"The date when this list was published"
|
|
13
|
+
publishedDate: String!
|
|
14
|
+
"Used by ft.com to determine the visual style to use on the website"
|
|
15
|
+
layoutHint: LayoutHint
|
|
16
|
+
"Array of publication IDs this list pertains to, e.g. 88fdde6c-2aa4-4f78-af02-9f680097cfd6 for FT Pink"
|
|
17
|
+
publication: [String!]
|
|
18
|
+
"A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'."
|
|
19
|
+
publishReference: String
|
|
20
|
+
}
|