@financial-times/cp-content-pipeline-schema 3.0.1 → 3.0.3
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 +14 -0
- package/lib/generated/index.d.ts +49 -38
- package/lib/model/CapiResponse.d.ts +1 -1
- package/lib/model/CapiResponse.js +3 -1
- package/lib/model/CapiResponse.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/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/content.d.ts +8 -15
- package/lib/resolvers/content.js +2 -7
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/index.d.ts +17 -15
- package/lib/resolvers/teaser.d.ts +9 -0
- package/lib/resolvers/teaser.js +9 -0
- package/lib/resolvers/teaser.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/index.ts +51 -38
- package/src/model/CapiResponse.ts +3 -1
- package/src/model/schemas/capi/base-schema.ts +1 -1
- package/src/resolvers/content.ts +2 -7
- package/src/resolvers/teaser.ts +14 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/content.graphql +8 -8
- package/typedefs/teaser.graphql +2 -2
|
@@ -23,5 +23,14 @@ declare const resolvers: {
|
|
|
23
23
|
theme: (parent: import("../model/CapiResponse").CapiResponse) => "special-report" | "extra" | "basic" | "extra-wide";
|
|
24
24
|
title: (parent: import("../model/CapiResponse").CapiResponse) => string;
|
|
25
25
|
};
|
|
26
|
+
TeaserIndicators: {
|
|
27
|
+
accessLevel: (parent: import("../generated").TeaserIndicators) => "premium" | "subscribed" | "registered" | "free";
|
|
28
|
+
isOpinion: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
29
|
+
isColumn: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
30
|
+
isPodcast: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
31
|
+
isEditorsChoice: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
32
|
+
isExclusive: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
33
|
+
isScoop: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
34
|
+
};
|
|
26
35
|
};
|
|
27
36
|
export default resolvers;
|
package/lib/resolvers/teaser.js
CHANGED
|
@@ -32,6 +32,15 @@ const resolvers = {
|
|
|
32
32
|
theme: (parent) => parent.design().theme,
|
|
33
33
|
title: (parent) => parent.title(),
|
|
34
34
|
},
|
|
35
|
+
TeaserIndicators: {
|
|
36
|
+
accessLevel: (parent) => parent.accessLevel,
|
|
37
|
+
isOpinion: (parent) => parent.isOpinion ?? null,
|
|
38
|
+
isColumn: (parent) => parent.isColumn ?? null,
|
|
39
|
+
isPodcast: (parent) => parent.isPodcast ?? null,
|
|
40
|
+
isEditorsChoice: (parent) => parent.isEditorsChoice ?? null,
|
|
41
|
+
isExclusive: (parent) => parent.isExclusive ?? null,
|
|
42
|
+
isScoop: (parent) => parent.isScoop ?? null,
|
|
43
|
+
},
|
|
35
44
|
};
|
|
36
45
|
exports.default = resolvers;
|
|
37
46
|
//# sourceMappingURL=teaser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teaser.js","sourceRoot":"","sources":["../../src/resolvers/teaser.ts"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE;QACN,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QACvC,IAAI,EAAE,CAAC,MAAM,EAAE,EAA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CAAC,OAAO,EAAE;aAC1B,CAAA;QACH,CAAC;QACD,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE;QAC3C,kBAAkB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;QAC3D,EAAE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QAC3B,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;QACjD,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK;QACxC,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;KAClC;IACD,gBAAgB,EAAE;QAChB,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW;QAC3C,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;QAC/C,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;QAC7C,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;QAC/C,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,IAAI,IAAI;QAC3D,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI;QACnD,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI;KAC5C;CAIF,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/src/generated/index.ts
CHANGED
|
@@ -96,7 +96,7 @@ export type Article = Content & {
|
|
|
96
96
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
97
97
|
readonly mainImage?: Maybe<Image>;
|
|
98
98
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
99
|
-
readonly modifiedTimestamp
|
|
99
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
100
100
|
/** The party that originated the article, eg. 'FT'. */
|
|
101
101
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
102
102
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -169,7 +169,7 @@ export type Audio = Content & {
|
|
|
169
169
|
/** An array of media objects containing the url, the duration, the filesize and the media type. */
|
|
170
170
|
readonly media?: Maybe<ReadonlyArray<Maybe<Media>>>;
|
|
171
171
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
172
|
-
readonly modifiedTimestamp
|
|
172
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
173
173
|
/** The party that originated the article, eg. 'FT'. */
|
|
174
174
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
175
175
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -466,7 +466,7 @@ export type Content = {
|
|
|
466
466
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
467
467
|
readonly mainImage?: Maybe<Image>;
|
|
468
468
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
469
|
-
readonly modifiedTimestamp
|
|
469
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
470
470
|
/** The party that originated the article, eg. 'FT'. */
|
|
471
471
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
472
472
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -541,7 +541,7 @@ export type ContentPackage = Content & {
|
|
|
541
541
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
542
542
|
readonly mainImage?: Maybe<Image>;
|
|
543
543
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
544
|
-
readonly modifiedTimestamp
|
|
544
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
545
545
|
/** The party that originated the article, eg. 'FT'. */
|
|
546
546
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
547
547
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -1019,22 +1019,9 @@ export type ImageWideSourceSetArgs = {
|
|
|
1019
1019
|
width?: InputMaybe<Scalars['Int']['input']>;
|
|
1020
1020
|
};
|
|
1021
1021
|
|
|
1022
|
-
/** Indicators are used to determine teaser styling. */
|
|
1023
1022
|
export type Indicators = {
|
|
1024
|
-
/**
|
|
1025
|
-
readonly accessLevel: Scalars['AccessLevel']['output'];
|
|
1026
|
-
/** Whether the teaser is a column, ie. has one author. */
|
|
1027
|
-
readonly isColumn?: Maybe<Scalars['Boolean']['output']>;
|
|
1028
|
-
/** Whether the teaser is an editor's choice. */
|
|
1029
|
-
readonly isEditorsChoice?: Maybe<Scalars['Boolean']['output']>;
|
|
1030
|
-
/** Whether the teaser is exclusive. */
|
|
1031
|
-
readonly isExclusive?: Maybe<Scalars['Boolean']['output']>;
|
|
1032
|
-
/** Whether the teaser is an opinion piece. */
|
|
1023
|
+
/** Whether the content is an opinion piece. */
|
|
1033
1024
|
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1034
|
-
/** Whether the teaser is a podcast. */
|
|
1035
|
-
readonly isPodcast?: Maybe<Scalars['Boolean']['output']>;
|
|
1036
|
-
/** Whether the teaser is a scoop. */
|
|
1037
|
-
readonly isScoop?: Maybe<Scalars['Boolean']['output']>;
|
|
1038
1025
|
};
|
|
1039
1026
|
|
|
1040
1027
|
export type LayoutImage = Reference & {
|
|
@@ -1109,7 +1096,7 @@ export type LiveBlogPackage = Content & {
|
|
|
1109
1096
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
1110
1097
|
readonly mainImage?: Maybe<Image>;
|
|
1111
1098
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
1112
|
-
readonly modifiedTimestamp
|
|
1099
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
1113
1100
|
/** The party that originated the article, eg. 'FT'. */
|
|
1114
1101
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
1115
1102
|
/** The pinned article of this live blog package. */
|
|
@@ -1195,7 +1182,7 @@ export type LiveBlogPost = Content & {
|
|
|
1195
1182
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
1196
1183
|
readonly mainImage?: Maybe<Image>;
|
|
1197
1184
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
1198
|
-
readonly modifiedTimestamp
|
|
1185
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
1199
1186
|
/** The party that originated the article, eg. 'FT'. */
|
|
1200
1187
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
1201
1188
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -1433,7 +1420,7 @@ export type Placeholder = Content & {
|
|
|
1433
1420
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
1434
1421
|
readonly mainImage?: Maybe<Image>;
|
|
1435
1422
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
1436
|
-
readonly modifiedTimestamp
|
|
1423
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
1437
1424
|
/** The party that originated the article, eg. 'FT'. */
|
|
1438
1425
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
1439
1426
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -1627,7 +1614,7 @@ export type Teaser = {
|
|
|
1627
1614
|
/** The image to be used as a thumbnail for the teaser. */
|
|
1628
1615
|
readonly image?: Maybe<Image>;
|
|
1629
1616
|
/** An object containing a map of indicator items to boolean values, eg. accessLevel, isOpinion. */
|
|
1630
|
-
readonly indicators:
|
|
1617
|
+
readonly indicators: TeaserIndicators;
|
|
1631
1618
|
/** An object containing the metadata details of the teaser, eg. id, url, prefLabel. */
|
|
1632
1619
|
readonly metaAltLink?: Maybe<MetaLink>;
|
|
1633
1620
|
/** An object containing the metadata details of the teaser, eg. id, url, prefLabel. */
|
|
@@ -1655,6 +1642,24 @@ export type TeaserUrlArgs = {
|
|
|
1655
1642
|
relative?: InputMaybe<Scalars['Boolean']['input']>;
|
|
1656
1643
|
};
|
|
1657
1644
|
|
|
1645
|
+
/** Indicators are used to determine teaser styling. */
|
|
1646
|
+
export type TeaserIndicators = {
|
|
1647
|
+
/** The access level of the teaser, eg. 'free' or 'premium'. */
|
|
1648
|
+
readonly accessLevel: Scalars['AccessLevel']['output'];
|
|
1649
|
+
/** Whether the teaser is a column, ie. has one author. */
|
|
1650
|
+
readonly isColumn?: Maybe<Scalars['Boolean']['output']>;
|
|
1651
|
+
/** Whether the teaser is an editor's choice. */
|
|
1652
|
+
readonly isEditorsChoice?: Maybe<Scalars['Boolean']['output']>;
|
|
1653
|
+
/** Whether the teaser is exclusive. */
|
|
1654
|
+
readonly isExclusive?: Maybe<Scalars['Boolean']['output']>;
|
|
1655
|
+
/** Whether the teaser is an opinion piece. */
|
|
1656
|
+
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1657
|
+
/** Whether the teaser is a podcast. */
|
|
1658
|
+
readonly isPodcast?: Maybe<Scalars['Boolean']['output']>;
|
|
1659
|
+
/** Whether the teaser is a scoop. */
|
|
1660
|
+
readonly isScoop?: Maybe<Scalars['Boolean']['output']>;
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1658
1663
|
export type Topper = {
|
|
1659
1664
|
/** Whether the topper should have a background box. */
|
|
1660
1665
|
readonly backgroundBox?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -1778,7 +1783,7 @@ export type Video = Content & {
|
|
|
1778
1783
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
1779
1784
|
readonly mainImage?: Maybe<Image>;
|
|
1780
1785
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
1781
|
-
readonly modifiedTimestamp
|
|
1786
|
+
readonly modifiedTimestamp?: Maybe<Scalars['Float']['output']>;
|
|
1782
1787
|
/** The party that originated the article, eg. 'FT'. */
|
|
1783
1788
|
readonly originatingParty?: Maybe<Scalars['String']['output']>;
|
|
1784
1789
|
/** A string ID used to trace content publishes through the pipeline, e.g. 'republish_tid_JNhUrBjdXo'. */
|
|
@@ -1998,6 +2003,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1998
2003
|
StructuredContent: ResolverTypeWrapper<Omit<StructuredContent, 'references'> & { references: ReadonlyArray<ResolversTypes['Reference']> }>;
|
|
1999
2004
|
TableOfContents: ResolverTypeWrapper<TableOfContents>;
|
|
2000
2005
|
Teaser: ResolverTypeWrapper<CapiResponse>;
|
|
2006
|
+
TeaserIndicators: ResolverTypeWrapper<TeaserIndicators>;
|
|
2001
2007
|
Topper: ResolverTypeWrapper<TopperModel>;
|
|
2002
2008
|
TopperBackgroundColour: ResolverTypeWrapper<Scalars['TopperBackgroundColour']['output']>;
|
|
2003
2009
|
TopperWithBrand: ResolverTypeWrapper<TopperModel>;
|
|
@@ -2095,6 +2101,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2095
2101
|
StructuredContent: Omit<StructuredContent, 'references'> & { references: ReadonlyArray<ResolversParentTypes['Reference']> };
|
|
2096
2102
|
TableOfContents: TableOfContents;
|
|
2097
2103
|
Teaser: CapiResponse;
|
|
2104
|
+
TeaserIndicators: TeaserIndicators;
|
|
2098
2105
|
Topper: TopperModel;
|
|
2099
2106
|
TopperBackgroundColour: Scalars['TopperBackgroundColour']['output'];
|
|
2100
2107
|
TopperWithBrand: TopperModel;
|
|
@@ -2145,7 +2152,7 @@ export type ArticleResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2145
2152
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2146
2153
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2147
2154
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2148
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2155
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2149
2156
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2150
2157
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2151
2158
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2176,7 +2183,7 @@ export type AudioResolvers<ContextType = QueryContext, ParentType extends Resolv
|
|
|
2176
2183
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2177
2184
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2178
2185
|
media: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Media']>>>, ParentType, ContextType>;
|
|
2179
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2186
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2180
2187
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2181
2188
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2182
2189
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2335,7 +2342,7 @@ export type ContentResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2335
2342
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2336
2343
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2337
2344
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2338
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2345
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2339
2346
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2340
2347
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2341
2348
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2366,7 +2373,7 @@ export type ContentPackageResolvers<ContextType = QueryContext, ParentType exten
|
|
|
2366
2373
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2367
2374
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2368
2375
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2369
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2376
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2370
2377
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2371
2378
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2372
2379
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2631,13 +2638,7 @@ export type ImageWideResolvers<ContextType = QueryContext, ParentType extends Re
|
|
|
2631
2638
|
}>;
|
|
2632
2639
|
|
|
2633
2640
|
export type IndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Indicators'] = ResolversParentTypes['Indicators']> = ResolversObject<{
|
|
2634
|
-
accessLevel: Resolver<ResolversTypes['AccessLevel'], ParentType, ContextType>;
|
|
2635
|
-
isColumn: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2636
|
-
isEditorsChoice: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2637
|
-
isExclusive: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2638
2641
|
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2639
|
-
isPodcast: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2640
|
-
isScoop: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2641
2642
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2642
2643
|
}>;
|
|
2643
2644
|
|
|
@@ -2697,7 +2698,7 @@ export type LiveBlogPackageResolvers<ContextType = QueryContext, ParentType exte
|
|
|
2697
2698
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2698
2699
|
liveBlogPosts: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Content']>>>, ParentType, ContextType>;
|
|
2699
2700
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2700
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2701
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2701
2702
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2702
2703
|
pinnedPost: Resolver<Maybe<ResolversTypes['Content']>, ParentType, ContextType>;
|
|
2703
2704
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
@@ -2733,7 +2734,7 @@ export type LiveBlogPostResolvers<ContextType = QueryContext, ParentType extends
|
|
|
2733
2734
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2734
2735
|
isPinned: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2735
2736
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2736
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2737
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2737
2738
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2738
2739
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2739
2740
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2869,7 +2870,7 @@ export type PlaceholderResolvers<ContextType = QueryContext, ParentType extends
|
|
|
2869
2870
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2870
2871
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2871
2872
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2872
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
2873
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2873
2874
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2874
2875
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2875
2876
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -2977,7 +2978,7 @@ export type TeaserResolvers<ContextType = QueryContext, ParentType extends Resol
|
|
|
2977
2978
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2978
2979
|
id: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2979
2980
|
image: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2980
|
-
indicators: Resolver<ResolversTypes['
|
|
2981
|
+
indicators: Resolver<ResolversTypes['TeaserIndicators'], ParentType, ContextType>;
|
|
2981
2982
|
metaAltLink: Resolver<Maybe<ResolversTypes['MetaLink']>, ParentType, ContextType>;
|
|
2982
2983
|
metaLink: Resolver<Maybe<ResolversTypes['MetaLink']>, ParentType, ContextType>;
|
|
2983
2984
|
metaPrefixText: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
@@ -2991,6 +2992,17 @@ export type TeaserResolvers<ContextType = QueryContext, ParentType extends Resol
|
|
|
2991
2992
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2992
2993
|
}>;
|
|
2993
2994
|
|
|
2995
|
+
export type TeaserIndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['TeaserIndicators'] = ResolversParentTypes['TeaserIndicators']> = ResolversObject<{
|
|
2996
|
+
accessLevel: Resolver<ResolversTypes['AccessLevel'], ParentType, ContextType>;
|
|
2997
|
+
isColumn: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2998
|
+
isEditorsChoice: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2999
|
+
isExclusive: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3000
|
+
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3001
|
+
isPodcast: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3002
|
+
isScoop: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3003
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
3004
|
+
}>;
|
|
3005
|
+
|
|
2994
3006
|
export type TopperResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Topper'] = ResolversParentTypes['Topper']> = ResolversObject<{
|
|
2995
3007
|
__resolveType?: TypeResolveFn<'BasicTopper' | 'BrandedTopper' | 'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'OpinionTopper' | 'PartnerContentTopper' | 'PodcastTopper' | 'SplitTextTopper' | 'TopperWithFlourish', ParentType, ContextType>;
|
|
2996
3008
|
backgroundBox: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
@@ -3073,7 +3085,7 @@ export type VideoResolvers<ContextType = QueryContext, ParentType extends Resolv
|
|
|
3073
3085
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
3074
3086
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
3075
3087
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
3076
|
-
modifiedTimestamp: Resolver<ResolversTypes['Float']
|
|
3088
|
+
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
3077
3089
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
3078
3090
|
publishReference: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
3079
3091
|
publishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -3172,6 +3184,7 @@ export type Resolvers<ContextType = QueryContext> = ResolversObject<{
|
|
|
3172
3184
|
StructuredContent: StructuredContentResolvers<ContextType>;
|
|
3173
3185
|
TableOfContents: TableOfContentsResolvers<ContextType>;
|
|
3174
3186
|
Teaser: TeaserResolvers<ContextType>;
|
|
3187
|
+
TeaserIndicators: TeaserIndicatorsResolvers<ContextType>;
|
|
3175
3188
|
Topper: TopperResolvers<ContextType>;
|
|
3176
3189
|
TopperBackgroundColour: GraphQLScalarType;
|
|
3177
3190
|
TopperWithBrand: TopperWithBrandResolvers<ContextType>;
|
|
@@ -365,7 +365,9 @@ export class CapiResponse {
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
modifiedTimestamp() {
|
|
368
|
-
return
|
|
368
|
+
return this.capiData.lastModified
|
|
369
|
+
? new Date(this.capiData.lastModified).getTime()
|
|
370
|
+
: null
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
publishReference() {
|
|
@@ -195,7 +195,7 @@ export const baseMetadataSchema = z.object({
|
|
|
195
195
|
publishedDate: z.string(),
|
|
196
196
|
firstPublishedDate: z.string(),
|
|
197
197
|
publishReference: z.string().optional(),
|
|
198
|
-
lastModified: z.string(),
|
|
198
|
+
lastModified: z.string().optional(),
|
|
199
199
|
realtime: z.boolean(),
|
|
200
200
|
editorialDesk: z.string().optional(),
|
|
201
201
|
accessLevel: z
|
package/src/resolvers/content.ts
CHANGED
|
@@ -78,7 +78,6 @@ const resolvers = {
|
|
|
78
78
|
containedIn: (parent) => parent.containedIn(),
|
|
79
79
|
indicators(parent) {
|
|
80
80
|
return {
|
|
81
|
-
accessLevel: parent.accessLevel(),
|
|
82
81
|
isOpinion: parent.isOpinion(),
|
|
83
82
|
}
|
|
84
83
|
},
|
|
@@ -125,14 +124,10 @@ const resolvers = {
|
|
|
125
124
|
theme: (parent) => parent.theme ?? null,
|
|
126
125
|
},
|
|
127
126
|
|
|
127
|
+
// TODO:20240829:IM Rename this to ContentIndicators to clearly differentiate
|
|
128
|
+
// it from other Indicators types in the next major release.
|
|
128
129
|
Indicators: {
|
|
129
|
-
accessLevel: (parent) => parent.accessLevel,
|
|
130
130
|
isOpinion: (parent) => parent.isOpinion ?? null,
|
|
131
|
-
isColumn: (parent) => parent.isColumn ?? null,
|
|
132
|
-
isPodcast: (parent) => parent.isPodcast ?? null,
|
|
133
|
-
isEditorsChoice: (parent) => parent.isEditorsChoice ?? null,
|
|
134
|
-
isExclusive: (parent) => parent.isExclusive ?? null,
|
|
135
|
-
isScoop: (parent) => parent.isScoop ?? null,
|
|
136
131
|
},
|
|
137
132
|
|
|
138
133
|
Media: {
|
package/src/resolvers/teaser.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TeaserResolvers } from '../generated'
|
|
1
|
+
import { TeaserResolvers, TeaserIndicatorsResolvers } from '../generated'
|
|
2
2
|
|
|
3
3
|
const resolvers = {
|
|
4
4
|
Teaser: {
|
|
@@ -33,6 +33,18 @@ const resolvers = {
|
|
|
33
33
|
theme: (parent) => parent.design().theme,
|
|
34
34
|
title: (parent) => parent.title(),
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
TeaserIndicators: {
|
|
37
|
+
accessLevel: (parent) => parent.accessLevel,
|
|
38
|
+
isOpinion: (parent) => parent.isOpinion ?? null,
|
|
39
|
+
isColumn: (parent) => parent.isColumn ?? null,
|
|
40
|
+
isPodcast: (parent) => parent.isPodcast ?? null,
|
|
41
|
+
isEditorsChoice: (parent) => parent.isEditorsChoice ?? null,
|
|
42
|
+
isExclusive: (parent) => parent.isExclusive ?? null,
|
|
43
|
+
isScoop: (parent) => parent.isScoop ?? null,
|
|
44
|
+
},
|
|
45
|
+
} satisfies {
|
|
46
|
+
Teaser: TeaserResolvers
|
|
47
|
+
TeaserIndicators: TeaserIndicatorsResolvers
|
|
48
|
+
}
|
|
37
49
|
|
|
38
50
|
export default resolvers
|