@financial-times/cp-content-pipeline-schema 3.0.1 → 3.0.2
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 +7 -0
- package/lib/generated/index.d.ts +33 -22
- package/lib/resolvers/content.d.ts +0 -7
- package/lib/resolvers/content.js +2 -7
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/index.d.ts +9 -7
- 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 +35 -22
- package/src/resolvers/content.ts +2 -7
- package/src/resolvers/teaser.ts +14 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/teaser.graphql +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.2](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.0.1...cp-content-pipeline-schema-v3.0.2) (2024-08-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **schema:** rename Teaser's Indicators type to TeaserIndicators ([ce862e4](https://github.com/Financial-Times/cp-content-pipeline/commit/ce862e4e54dab3793f0436d3da8ebd1dd4f751d4))
|
|
9
|
+
|
|
3
10
|
## [3.0.1](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.0.0...cp-content-pipeline-schema-v3.0.1) (2024-08-28)
|
|
4
11
|
|
|
5
12
|
|
package/lib/generated/index.d.ts
CHANGED
|
@@ -1000,22 +1000,9 @@ export type ImageWideSourceSetArgs = {
|
|
|
1000
1000
|
maxDpr?: InputMaybe<Scalars['Int']['input']>;
|
|
1001
1001
|
width?: InputMaybe<Scalars['Int']['input']>;
|
|
1002
1002
|
};
|
|
1003
|
-
/** Indicators are used to determine teaser styling. */
|
|
1004
1003
|
export type Indicators = {
|
|
1005
|
-
/**
|
|
1006
|
-
readonly accessLevel: Scalars['AccessLevel']['output'];
|
|
1007
|
-
/** Whether the teaser is a column, ie. has one author. */
|
|
1008
|
-
readonly isColumn?: Maybe<Scalars['Boolean']['output']>;
|
|
1009
|
-
/** Whether the teaser is an editor's choice. */
|
|
1010
|
-
readonly isEditorsChoice?: Maybe<Scalars['Boolean']['output']>;
|
|
1011
|
-
/** Whether the teaser is exclusive. */
|
|
1012
|
-
readonly isExclusive?: Maybe<Scalars['Boolean']['output']>;
|
|
1013
|
-
/** Whether the teaser is an opinion piece. */
|
|
1004
|
+
/** Whether the content is an opinion piece. */
|
|
1014
1005
|
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1015
|
-
/** Whether the teaser is a podcast. */
|
|
1016
|
-
readonly isPodcast?: Maybe<Scalars['Boolean']['output']>;
|
|
1017
|
-
/** Whether the teaser is a scoop. */
|
|
1018
|
-
readonly isScoop?: Maybe<Scalars['Boolean']['output']>;
|
|
1019
1006
|
};
|
|
1020
1007
|
export type LayoutImage = Reference & {
|
|
1021
1008
|
/** A set of images with different sizes and formats. */
|
|
@@ -1548,7 +1535,7 @@ export type Teaser = {
|
|
|
1548
1535
|
/** The image to be used as a thumbnail for the teaser. */
|
|
1549
1536
|
readonly image?: Maybe<Image>;
|
|
1550
1537
|
/** An object containing a map of indicator items to boolean values, eg. accessLevel, isOpinion. */
|
|
1551
|
-
readonly indicators:
|
|
1538
|
+
readonly indicators: TeaserIndicators;
|
|
1552
1539
|
/** An object containing the metadata details of the teaser, eg. id, url, prefLabel. */
|
|
1553
1540
|
readonly metaAltLink?: Maybe<MetaLink>;
|
|
1554
1541
|
/** An object containing the metadata details of the teaser, eg. id, url, prefLabel. */
|
|
@@ -1573,6 +1560,23 @@ export type Teaser = {
|
|
|
1573
1560
|
export type TeaserUrlArgs = {
|
|
1574
1561
|
relative?: InputMaybe<Scalars['Boolean']['input']>;
|
|
1575
1562
|
};
|
|
1563
|
+
/** Indicators are used to determine teaser styling. */
|
|
1564
|
+
export type TeaserIndicators = {
|
|
1565
|
+
/** The access level of the teaser, eg. 'free' or 'premium'. */
|
|
1566
|
+
readonly accessLevel: Scalars['AccessLevel']['output'];
|
|
1567
|
+
/** Whether the teaser is a column, ie. has one author. */
|
|
1568
|
+
readonly isColumn?: Maybe<Scalars['Boolean']['output']>;
|
|
1569
|
+
/** Whether the teaser is an editor's choice. */
|
|
1570
|
+
readonly isEditorsChoice?: Maybe<Scalars['Boolean']['output']>;
|
|
1571
|
+
/** Whether the teaser is exclusive. */
|
|
1572
|
+
readonly isExclusive?: Maybe<Scalars['Boolean']['output']>;
|
|
1573
|
+
/** Whether the teaser is an opinion piece. */
|
|
1574
|
+
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1575
|
+
/** Whether the teaser is a podcast. */
|
|
1576
|
+
readonly isPodcast?: Maybe<Scalars['Boolean']['output']>;
|
|
1577
|
+
/** Whether the teaser is a scoop. */
|
|
1578
|
+
readonly isScoop?: Maybe<Scalars['Boolean']['output']>;
|
|
1579
|
+
};
|
|
1576
1580
|
export type Topper = {
|
|
1577
1581
|
/** Whether the topper should have a background box. */
|
|
1578
1582
|
readonly backgroundBox?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -1860,6 +1864,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1860
1864
|
}>;
|
|
1861
1865
|
TableOfContents: ResolverTypeWrapper<TableOfContents>;
|
|
1862
1866
|
Teaser: ResolverTypeWrapper<CapiResponse>;
|
|
1867
|
+
TeaserIndicators: ResolverTypeWrapper<TeaserIndicators>;
|
|
1863
1868
|
Topper: ResolverTypeWrapper<TopperModel>;
|
|
1864
1869
|
TopperBackgroundColour: ResolverTypeWrapper<Scalars['TopperBackgroundColour']['output']>;
|
|
1865
1870
|
TopperWithBrand: ResolverTypeWrapper<TopperModel>;
|
|
@@ -1960,6 +1965,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
1960
1965
|
};
|
|
1961
1966
|
TableOfContents: TableOfContents;
|
|
1962
1967
|
Teaser: CapiResponse;
|
|
1968
|
+
TeaserIndicators: TeaserIndicators;
|
|
1963
1969
|
Topper: TopperModel;
|
|
1964
1970
|
TopperBackgroundColour: Scalars['TopperBackgroundColour']['output'];
|
|
1965
1971
|
TopperWithBrand: TopperModel;
|
|
@@ -2452,13 +2458,7 @@ export type ImageWideResolvers<ContextType = QueryContext, ParentType extends Re
|
|
|
2452
2458
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2453
2459
|
}>;
|
|
2454
2460
|
export type IndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Indicators'] = ResolversParentTypes['Indicators']> = ResolversObject<{
|
|
2455
|
-
accessLevel: Resolver<ResolversTypes['AccessLevel'], ParentType, ContextType>;
|
|
2456
|
-
isColumn: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2457
|
-
isEditorsChoice: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2458
|
-
isExclusive: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2459
2461
|
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2460
|
-
isPodcast: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2461
|
-
isScoop: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2462
2462
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2463
2463
|
}>;
|
|
2464
2464
|
export interface JsonScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['JSON'], any> {
|
|
@@ -2765,7 +2765,7 @@ export type TeaserResolvers<ContextType = QueryContext, ParentType extends Resol
|
|
|
2765
2765
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2766
2766
|
id: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2767
2767
|
image: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2768
|
-
indicators: Resolver<ResolversTypes['
|
|
2768
|
+
indicators: Resolver<ResolversTypes['TeaserIndicators'], ParentType, ContextType>;
|
|
2769
2769
|
metaAltLink: Resolver<Maybe<ResolversTypes['MetaLink']>, ParentType, ContextType>;
|
|
2770
2770
|
metaLink: Resolver<Maybe<ResolversTypes['MetaLink']>, ParentType, ContextType>;
|
|
2771
2771
|
metaPrefixText: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
@@ -2778,6 +2778,16 @@ export type TeaserResolvers<ContextType = QueryContext, ParentType extends Resol
|
|
|
2778
2778
|
url: Resolver<ResolversTypes['String'], ParentType, ContextType, Partial<TeaserUrlArgs>>;
|
|
2779
2779
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2780
2780
|
}>;
|
|
2781
|
+
export type TeaserIndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['TeaserIndicators'] = ResolversParentTypes['TeaserIndicators']> = ResolversObject<{
|
|
2782
|
+
accessLevel: Resolver<ResolversTypes['AccessLevel'], ParentType, ContextType>;
|
|
2783
|
+
isColumn: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2784
|
+
isEditorsChoice: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2785
|
+
isExclusive: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2786
|
+
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2787
|
+
isPodcast: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2788
|
+
isScoop: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2789
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2790
|
+
}>;
|
|
2781
2791
|
export type TopperResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Topper'] = ResolversParentTypes['Topper']> = ResolversObject<{
|
|
2782
2792
|
__resolveType?: TypeResolveFn<'BasicTopper' | 'BrandedTopper' | 'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'OpinionTopper' | 'PartnerContentTopper' | 'PodcastTopper' | 'SplitTextTopper' | 'TopperWithFlourish', ParentType, ContextType>;
|
|
2783
2793
|
backgroundBox: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
@@ -2948,6 +2958,7 @@ export type Resolvers<ContextType = QueryContext> = ResolversObject<{
|
|
|
2948
2958
|
StructuredContent: StructuredContentResolvers<ContextType>;
|
|
2949
2959
|
TableOfContents: TableOfContentsResolvers<ContextType>;
|
|
2950
2960
|
Teaser: TeaserResolvers<ContextType>;
|
|
2961
|
+
TeaserIndicators: TeaserIndicatorsResolvers<ContextType>;
|
|
2951
2962
|
Topper: TopperResolvers<ContextType>;
|
|
2952
2963
|
TopperBackgroundColour: GraphQLScalarType;
|
|
2953
2964
|
TopperWithBrand: TopperWithBrandResolvers<ContextType>;
|
|
@@ -98,7 +98,6 @@ declare const resolvers: {
|
|
|
98
98
|
LiveBlogPost: {
|
|
99
99
|
containedIn: (parent: import("../model/CapiResponse").CapiResponse) => Promise<import("../model/CapiResponse").CapiResponse | null>;
|
|
100
100
|
indicators(parent: import("../model/CapiResponse").CapiResponse): {
|
|
101
|
-
accessLevel: "premium" | "subscribed" | "registered" | "free";
|
|
102
101
|
isOpinion: boolean;
|
|
103
102
|
};
|
|
104
103
|
isPinned: (parent: import("../model/CapiResponse").CapiResponse) => boolean;
|
|
@@ -276,13 +275,7 @@ declare const resolvers: {
|
|
|
276
275
|
theme: (parent: import("../generated").Design) => "special-report" | "extra" | "basic" | "extra-wide" | null;
|
|
277
276
|
};
|
|
278
277
|
Indicators: {
|
|
279
|
-
accessLevel: (parent: import("../generated").Indicators) => "premium" | "subscribed" | "registered" | "free";
|
|
280
278
|
isOpinion: (parent: import("../generated").Indicators) => boolean | null;
|
|
281
|
-
isColumn: (parent: import("../generated").Indicators) => boolean | null;
|
|
282
|
-
isPodcast: (parent: import("../generated").Indicators) => boolean | null;
|
|
283
|
-
isEditorsChoice: (parent: import("../generated").Indicators) => boolean | null;
|
|
284
|
-
isExclusive: (parent: import("../generated").Indicators) => boolean | null;
|
|
285
|
-
isScoop: (parent: import("../generated").Indicators) => boolean | null;
|
|
286
279
|
};
|
|
287
280
|
Media: {
|
|
288
281
|
url: (parent: import("../generated").Media) => string | null;
|
package/lib/resolvers/content.js
CHANGED
|
@@ -56,7 +56,6 @@ const resolvers = {
|
|
|
56
56
|
containedIn: (parent) => parent.containedIn(),
|
|
57
57
|
indicators(parent) {
|
|
58
58
|
return {
|
|
59
|
-
accessLevel: parent.accessLevel(),
|
|
60
59
|
isOpinion: parent.isOpinion(),
|
|
61
60
|
};
|
|
62
61
|
},
|
|
@@ -95,14 +94,10 @@ const resolvers = {
|
|
|
95
94
|
layout: (parent) => parent.layout ?? null,
|
|
96
95
|
theme: (parent) => parent.theme ?? null,
|
|
97
96
|
},
|
|
97
|
+
// TODO:20240829:IM Rename this to ContentIndicators to clearly differentiate
|
|
98
|
+
// it from other Indicators types in the next major release.
|
|
98
99
|
Indicators: {
|
|
99
|
-
accessLevel: (parent) => parent.accessLevel,
|
|
100
100
|
isOpinion: (parent) => parent.isOpinion ?? null,
|
|
101
|
-
isColumn: (parent) => parent.isColumn ?? null,
|
|
102
|
-
isPodcast: (parent) => parent.isPodcast ?? null,
|
|
103
|
-
isEditorsChoice: (parent) => parent.isEditorsChoice ?? null,
|
|
104
|
-
isExclusive: (parent) => parent.isExclusive ?? null,
|
|
105
|
-
isScoop: (parent) => parent.isScoop ?? null,
|
|
106
101
|
},
|
|
107
102
|
Media: {
|
|
108
103
|
url: (parent) => parent.url ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.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;QACV,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI;KAChD;IAED,KAAK,EAAE;QACL,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI;QACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;QAC7C,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;KAChD;IAED,eAAe,EAAE;QACf,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;KAC9C;CAgBF,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
package/lib/resolvers/index.d.ts
CHANGED
|
@@ -231,6 +231,15 @@ declare const resolvers: {
|
|
|
231
231
|
theme: (parent: import("../model/CapiResponse").CapiResponse) => "special-report" | "extra" | "basic" | "extra-wide";
|
|
232
232
|
title: (parent: import("../model/CapiResponse").CapiResponse) => string;
|
|
233
233
|
};
|
|
234
|
+
TeaserIndicators: {
|
|
235
|
+
accessLevel: (parent: import("../generated").TeaserIndicators) => "premium" | "subscribed" | "registered" | "free";
|
|
236
|
+
isOpinion: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
237
|
+
isColumn: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
238
|
+
isPodcast: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
239
|
+
isEditorsChoice: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
240
|
+
isExclusive: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
241
|
+
isScoop: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
242
|
+
};
|
|
234
243
|
ClipFormat: import("./literal-union").LiteralUnionScalar<["standard-inline", "mobile"]>;
|
|
235
244
|
ImageFormat: import("./literal-union").LiteralUnionScalar<["standard", "standard-inline", "desktop", "mobile", "wide", "square", "square-ftedit", "portrait", "landscape"]>;
|
|
236
245
|
PackageDesign: import("./literal-union").LiteralUnionScalar<["special-report", "extra", "basic", "extra-wide"]>;
|
|
@@ -599,7 +608,6 @@ declare const resolvers: {
|
|
|
599
608
|
LiveBlogPost: {
|
|
600
609
|
containedIn: (parent: import("../model/CapiResponse").CapiResponse) => Promise<import("../model/CapiResponse").CapiResponse | null>;
|
|
601
610
|
indicators(parent: import("../model/CapiResponse").CapiResponse): {
|
|
602
|
-
accessLevel: "premium" | "subscribed" | "registered" | "free";
|
|
603
611
|
isOpinion: boolean;
|
|
604
612
|
};
|
|
605
613
|
isPinned: (parent: import("../model/CapiResponse").CapiResponse) => boolean;
|
|
@@ -777,13 +785,7 @@ declare const resolvers: {
|
|
|
777
785
|
theme: (parent: import("../generated").Design) => "special-report" | "extra" | "basic" | "extra-wide" | null;
|
|
778
786
|
};
|
|
779
787
|
Indicators: {
|
|
780
|
-
accessLevel: (parent: import("../generated").Indicators) => "premium" | "subscribed" | "registered" | "free";
|
|
781
788
|
isOpinion: (parent: import("../generated").Indicators) => boolean | null;
|
|
782
|
-
isColumn: (parent: import("../generated").Indicators) => boolean | null;
|
|
783
|
-
isPodcast: (parent: import("../generated").Indicators) => boolean | null;
|
|
784
|
-
isEditorsChoice: (parent: import("../generated").Indicators) => boolean | null;
|
|
785
|
-
isExclusive: (parent: import("../generated").Indicators) => boolean | null;
|
|
786
|
-
isScoop: (parent: import("../generated").Indicators) => boolean | null;
|
|
787
789
|
};
|
|
788
790
|
Media: {
|
|
789
791
|
url: (parent: import("../generated").Media) => string | null;
|
|
@@ -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,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ED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/src/generated/index.ts
CHANGED
|
@@ -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 & {
|
|
@@ -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']>;
|
|
@@ -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;
|
|
@@ -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
|
|
|
@@ -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>;
|
|
@@ -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>;
|
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
|