@financial-times/cp-content-pipeline-schema 3.7.3 → 3.9.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 +19 -0
- package/lib/datasources/capi.d.ts +4 -4
- package/lib/datasources/capi.js +4 -4
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/capi.test.js +3 -3
- package/lib/datasources/capi.test.js.map +1 -1
- package/lib/fixtures/dummyContext.js +2 -2
- package/lib/fixtures/dummyContext.js.map +1 -1
- package/lib/generated/index.d.ts +44 -23
- package/lib/model/Byline.d.ts +2 -2
- package/lib/model/Byline.js.map +1 -1
- package/lib/model/{CapiResponse.d.ts → Content.d.ts} +13 -12
- package/lib/model/{CapiResponse.js → Content.js} +14 -7
- package/lib/model/Content.js.map +1 -0
- package/lib/model/{CapiResponse.test.js → Content.test.js} +56 -15
- package/lib/model/Content.test.js.map +1 -0
- package/lib/model/LeadFlourish.d.ts +2 -2
- package/lib/model/LeadFlourish.js.map +1 -1
- package/lib/model/LeadFlourish.test.js +3 -3
- package/lib/model/LeadFlourish.test.js.map +1 -1
- package/lib/model/{CapiList.d.ts → List.d.ts} +5 -5
- package/lib/model/{CapiList.js → List.js} +5 -5
- package/lib/model/List.js.map +1 -0
- package/lib/model/RichText.d.ts +2 -2
- 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/Topper.test.js +22 -22
- package/lib/model/Topper.test.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +5 -1
- 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 +5 -1
- 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 +5 -0
- package/lib/model/schemas/capi/base-schema.js +1 -0
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +5 -1
- 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/custom-code-component.d.ts +3 -0
- package/lib/model/schemas/capi/index.d.ts +28 -5
- package/lib/model/schemas/capi/live-blog-package.d.ts +5 -1
- 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 +5 -1
- package/lib/model/schemas/capi/placeholder.js +1 -0
- package/lib/model/schemas/capi/placeholder.js.map +1 -1
- package/lib/model/schemas/capi/video.d.ts +5 -1
- package/lib/model/schemas/capi/video.js +1 -0
- package/lib/model/schemas/capi/video.js.map +1 -1
- package/lib/resolvers/content-tree/references/CustomCodeComponent.js.map +1 -1
- package/lib/resolvers/content-tree/references/Recommended.d.ts +1 -1
- package/lib/resolvers/content-tree/references/index.d.ts +2 -2
- package/lib/resolvers/content-tree/tagMappings.d.ts +2 -2
- package/lib/resolvers/content-tree/tagMappings.js.map +1 -1
- package/lib/resolvers/content-tree/updateTreeWithReferenceIds.d.ts +2 -2
- package/lib/resolvers/content-tree/updateTreeWithReferenceIds.js.map +1 -1
- package/lib/resolvers/content.d.ts +251 -235
- package/lib/resolvers/content.js +27 -0
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/core.d.ts +4 -4
- package/lib/resolvers/core.js +2 -2
- package/lib/resolvers/core.js.map +1 -1
- package/lib/resolvers/index.d.ts +278 -260
- package/lib/resolvers/list.d.ts +9 -9
- package/lib/resolvers/teaser.d.ts +15 -13
- package/lib/resolvers/teaser.js +2 -0
- package/lib/resolvers/teaser.js.map +1 -1
- package/package.json +1 -1
- package/queries/article.graphql +20 -0
- package/src/datasources/capi.test.ts +3 -3
- package/src/datasources/capi.ts +6 -9
- package/src/fixtures/dummyContext.ts +2 -2
- package/src/generated/index.ts +44 -23
- package/src/model/Byline.ts +2 -2
- package/src/model/{CapiResponse.test.ts → Content.test.ts} +65 -17
- package/src/model/{CapiResponse.ts → Content.ts} +24 -17
- package/src/model/LeadFlourish.test.ts +6 -5
- package/src/model/LeadFlourish.ts +2 -5
- package/src/model/{CapiList.ts → List.ts} +5 -5
- package/src/model/RichText.ts +2 -2
- package/src/model/Topper.test.ts +23 -26
- package/src/model/Topper.ts +2 -5
- 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 +1 -0
- 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/model/schemas/capi/video.ts +1 -0
- package/src/resolvers/content-tree/references/CustomCodeComponent.ts +2 -2
- package/src/resolvers/content-tree/references/index.ts +2 -2
- package/src/resolvers/content-tree/tagMappings.ts +2 -2
- package/src/resolvers/content-tree/updateTreeWithReferenceIds.ts +2 -2
- package/src/resolvers/content.ts +27 -0
- package/src/resolvers/core.ts +2 -2
- package/src/resolvers/teaser.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/content.graphql +19 -1
- package/typedefs/teaser.graphql +3 -0
- package/lib/model/CapiList.js.map +0 -1
- package/lib/model/CapiResponse.js.map +0 -1
- package/lib/model/CapiResponse.test.js.map +0 -1
- /package/lib/model/{CapiResponse.test.d.ts → Content.test.d.ts} +0 -0
package/lib/resolvers/list.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
List: {
|
|
3
|
-
id: (parent: import("../model/
|
|
4
|
-
apiUrl: (parent: import("../model/
|
|
5
|
-
title: (parent: import("../model/
|
|
6
|
-
items: (parent: import("../model/
|
|
7
|
-
listType: (parent: import("../model/
|
|
8
|
-
publishedDate: (parent: import("../model/
|
|
9
|
-
layoutHint: (parent: import("../model/
|
|
10
|
-
publication: (parent: import("../model/
|
|
11
|
-
publishReference: (parent: import("../model/
|
|
3
|
+
id: (parent: import("../model/List").List) => string;
|
|
4
|
+
apiUrl: (parent: import("../model/List").List) => string;
|
|
5
|
+
title: (parent: import("../model/List").List) => string;
|
|
6
|
+
items: (parent: import("../model/List").List) => Promise<import("../model/Content").Content[]>;
|
|
7
|
+
listType: (parent: import("../model/List").List) => "OpinionAnalysis" | "Promotional" | "Recommended" | "TopStories" | "TopStoriesBeta" | "KeyDevelopments";
|
|
8
|
+
publishedDate: (parent: import("../model/List").List) => string;
|
|
9
|
+
layoutHint: (parent: import("../model/List").List) => "landscape" | "standaloneimage" | "bigstory" | "assassination" | null;
|
|
10
|
+
publication: (parent: import("../model/List").List) => string[] | null;
|
|
11
|
+
publishReference: (parent: import("../model/List").List) => string | null;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const resolvers: {
|
|
2
2
|
Teaser: {
|
|
3
|
-
url: (parent: import("../model/
|
|
4
|
-
type: (parent: import("../model/
|
|
5
|
-
metaLink: (parent: import("../model/
|
|
6
|
-
metaAltLink: (parent: import("../model/
|
|
7
|
-
metaPrefixText: (parent: import("../model/
|
|
3
|
+
url: (parent: import("../model/Content").Content, args: Partial<import("../generated").TeaserUrlArgs>) => Promise<string>;
|
|
4
|
+
type: (parent: import("../model/Content").Content) => string;
|
|
5
|
+
metaLink: (parent: import("../model/Content").Content) => Promise<import("../model/Concept").Concept | import("../model/Content").Content | null>;
|
|
6
|
+
metaAltLink: (parent: import("../model/Content").Content) => Promise<import("../model/Concept").Concept | null>;
|
|
7
|
+
metaPrefixText: (parent: import("../model/Content").Content) => Promise<string | null>;
|
|
8
8
|
metaSuffixText: () => null;
|
|
9
|
-
image: (parent: import("../model/
|
|
10
|
-
indicators(parent: import("../model/
|
|
9
|
+
image: (parent: import("../model/Content").Content) => import("../model/Image").CAPIImage | null;
|
|
10
|
+
indicators(parent: import("../model/Content").Content): {
|
|
11
11
|
accessLevel: "premium" | "subscribed" | "registered" | "free";
|
|
12
12
|
isOpinion: boolean;
|
|
13
13
|
isColumn: boolean;
|
|
@@ -15,13 +15,14 @@ declare const resolvers: {
|
|
|
15
15
|
isEditorsChoice: boolean;
|
|
16
16
|
isExclusive: boolean;
|
|
17
17
|
isScoop: boolean;
|
|
18
|
+
isFTEdit: boolean;
|
|
18
19
|
};
|
|
19
|
-
standfirst: (parent: import("../model/
|
|
20
|
-
firstPublishedDate: (parent: import("../model/
|
|
21
|
-
id: (parent: import("../model/
|
|
22
|
-
publishedDate: (parent: import("../model/
|
|
23
|
-
theme: (parent: import("../model/
|
|
24
|
-
title: (parent: import("../model/
|
|
20
|
+
standfirst: (parent: import("../model/Content").Content) => string | null;
|
|
21
|
+
firstPublishedDate: (parent: import("../model/Content").Content) => string;
|
|
22
|
+
id: (parent: import("../model/Content").Content) => string;
|
|
23
|
+
publishedDate: (parent: import("../model/Content").Content) => string;
|
|
24
|
+
theme: (parent: import("../model/Content").Content) => "special-report" | "extra" | "basic" | "extra-wide";
|
|
25
|
+
title: (parent: import("../model/Content").Content) => string;
|
|
25
26
|
};
|
|
26
27
|
TeaserIndicators: {
|
|
27
28
|
accessLevel: (parent: import("../generated").TeaserIndicators) => "premium" | "subscribed" | "registered" | "free";
|
|
@@ -31,6 +32,7 @@ declare const resolvers: {
|
|
|
31
32
|
isEditorsChoice: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
32
33
|
isExclusive: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
33
34
|
isScoop: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
35
|
+
isFTEdit: (parent: import("../generated").TeaserIndicators) => boolean | null;
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
38
|
export default resolvers;
|
package/lib/resolvers/teaser.js
CHANGED
|
@@ -23,6 +23,7 @@ const resolvers = {
|
|
|
23
23
|
isEditorsChoice: parent.isEditorsChoice(),
|
|
24
24
|
isExclusive: parent.isExclusive(),
|
|
25
25
|
isScoop: parent.isScoop(),
|
|
26
|
+
isFTEdit: parent.isFTEdit(),
|
|
26
27
|
};
|
|
27
28
|
},
|
|
28
29
|
standfirst: (parent) => parent.standfirst(),
|
|
@@ -40,6 +41,7 @@ const resolvers = {
|
|
|
40
41
|
isEditorsChoice: (parent) => parent.isEditorsChoice ?? null,
|
|
41
42
|
isExclusive: (parent) => parent.isExclusive ?? null,
|
|
42
43
|
isScoop: (parent) => parent.isScoop ?? null,
|
|
44
|
+
isFTEdit: (parent) => parent.isFTEdit ?? null,
|
|
43
45
|
},
|
|
44
46
|
};
|
|
45
47
|
exports.default = resolvers;
|
|
@@ -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,EAAE,CACf,MAAM;aACH,IAAI,EAAE;aACN,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;aACzD,KAAK,CAAC,CAAC,CAAC;QACb,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE;QACvC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;QAC7C,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE;QACnD,sEAAsE;QACtE,6DAA6D;QAC7D,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI;QAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;QACvC,UAAU,CAAC,MAAM;YACf,OAAO;gBACL,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;gBACjC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;gBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;gBAC7B,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE;gBACzC,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;gBACjC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;
|
|
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,EAAE,CACf,MAAM;aACH,IAAI,EAAE;aACN,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;aACzD,KAAK,CAAC,CAAC,CAAC;QACb,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE;QACvC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;QAC7C,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE;QACnD,sEAAsE;QACtE,6DAA6D;QAC7D,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI;QAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;QACvC,UAAU,CAAC,MAAM;YACf,OAAO;gBACL,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;gBACjC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;gBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;gBAC7B,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE;gBACzC,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;gBACjC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;gBACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC5B,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;QAC3C,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI;KAC9C;CAIF,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/queries/article.graphql
CHANGED
|
@@ -63,6 +63,7 @@ fragment Teaser on Teaser {
|
|
|
63
63
|
isEditorsChoice
|
|
64
64
|
isExclusive
|
|
65
65
|
isScoop
|
|
66
|
+
isFTEdit
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -506,6 +507,7 @@ fragment Media on Media {
|
|
|
506
507
|
|
|
507
508
|
fragment Indicators on Indicators {
|
|
508
509
|
isOpinion
|
|
510
|
+
isFTEdit
|
|
509
511
|
}
|
|
510
512
|
|
|
511
513
|
fragment BylineAuthor on AuthorReference {
|
|
@@ -649,12 +651,16 @@ fragment ArticleFields on Content {
|
|
|
649
651
|
clientName
|
|
650
652
|
indicators {
|
|
651
653
|
isPartnerContent
|
|
654
|
+
isFTEdit
|
|
652
655
|
}
|
|
653
656
|
}
|
|
654
657
|
... on Placeholder {
|
|
655
658
|
containedIn {
|
|
656
659
|
...PackageContainer
|
|
657
660
|
}
|
|
661
|
+
indicators {
|
|
662
|
+
isFTEdit
|
|
663
|
+
}
|
|
658
664
|
}
|
|
659
665
|
... on LiveBlogPost {
|
|
660
666
|
containedIn {
|
|
@@ -687,17 +693,31 @@ fragment ArticleFields on Content {
|
|
|
687
693
|
...PinnedPost
|
|
688
694
|
}
|
|
689
695
|
realtime
|
|
696
|
+
indicators {
|
|
697
|
+
isFTEdit
|
|
698
|
+
}
|
|
690
699
|
}
|
|
691
700
|
... on ContentPackage {
|
|
692
701
|
contains {
|
|
693
702
|
...Teaser
|
|
694
703
|
standfirst
|
|
695
704
|
}
|
|
705
|
+
indicators {
|
|
706
|
+
isFTEdit
|
|
707
|
+
}
|
|
696
708
|
}
|
|
697
709
|
... on Audio {
|
|
698
710
|
media {
|
|
699
711
|
...Media
|
|
700
712
|
}
|
|
713
|
+
indicators {
|
|
714
|
+
isFTEdit
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
... on Video {
|
|
718
|
+
indicators {
|
|
719
|
+
isFTEdit
|
|
720
|
+
}
|
|
701
721
|
}
|
|
702
722
|
}
|
|
703
723
|
|
|
@@ -2,7 +2,7 @@ import { Logger } from '@dotcom-reliability-kit/logger'
|
|
|
2
2
|
import { CapiDataSource } from './capi'
|
|
3
3
|
import { QueryContext } from '..'
|
|
4
4
|
import { KeyValueCache } from '@apollo/utils.keyvaluecache'
|
|
5
|
-
import {
|
|
5
|
+
import { Content } from '../model/Content'
|
|
6
6
|
import { ContentTypeSchemas } from '../model/schemas/capi/internal-content'
|
|
7
7
|
|
|
8
8
|
const logger = new Logger()
|
|
@@ -38,10 +38,10 @@ describe('CapiDataSource', () => {
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
jest
|
|
41
|
-
.spyOn(
|
|
41
|
+
.spyOn(Content, 'fromJSON')
|
|
42
42
|
.mockImplementation(
|
|
43
43
|
(content, context) =>
|
|
44
|
-
new
|
|
44
|
+
new Content(content as ContentTypeSchemas, context)
|
|
45
45
|
)
|
|
46
46
|
})
|
|
47
47
|
|
package/src/datasources/capi.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Content } from '../model/Content'
|
|
2
2
|
import { InstrumentedRESTDataSource } from './instrumented'
|
|
3
3
|
import { AugmentedRequest } from '@apollo/datasource-rest'
|
|
4
4
|
import {
|
|
5
5
|
KeyValueCache,
|
|
6
6
|
PrefixingKeyValueCache,
|
|
7
7
|
} from '@apollo/utils.keyvaluecache'
|
|
8
|
-
import {
|
|
8
|
+
import { List } from '../model/List'
|
|
9
9
|
import { Person } from '../model/Person'
|
|
10
10
|
|
|
11
11
|
const REQUEST_TIMEOUT = process.env.CAPI_DATASOURCE_REQUEST_TIMEOUT
|
|
@@ -46,10 +46,7 @@ export class CapiDataSource extends InstrumentedRESTDataSource {
|
|
|
46
46
|
request.headers['x-api-key'] = this.capiKey
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
async getContent(
|
|
50
|
-
uuid: string,
|
|
51
|
-
packageContainer?: CapiResponse
|
|
52
|
-
): Promise<CapiResponse> {
|
|
49
|
+
async getContent(uuid: string, packageContainer?: Content): Promise<Content> {
|
|
53
50
|
this.context.addSurrogateKeys([
|
|
54
51
|
{
|
|
55
52
|
prefix: 'contentPipelineArticle',
|
|
@@ -63,7 +60,7 @@ export class CapiDataSource extends InstrumentedRESTDataSource {
|
|
|
63
60
|
this.context.contentRequestedOnce = true
|
|
64
61
|
this.calls.push(uuid)
|
|
65
62
|
|
|
66
|
-
return
|
|
63
|
+
return Content.fromJSON(content, this.context, packageContainer)
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
async getPerson(uuid: string): Promise<Person> {
|
|
@@ -74,7 +71,7 @@ export class CapiDataSource extends InstrumentedRESTDataSource {
|
|
|
74
71
|
return Person.fromJson(person, this.context)
|
|
75
72
|
}
|
|
76
73
|
|
|
77
|
-
async getList(uuid: string): Promise<
|
|
74
|
+
async getList(uuid: string): Promise<List> {
|
|
78
75
|
this.context.addSurrogateKeys([
|
|
79
76
|
{
|
|
80
77
|
prefix: 'contentPipelineList',
|
|
@@ -83,7 +80,7 @@ export class CapiDataSource extends InstrumentedRESTDataSource {
|
|
|
83
80
|
])
|
|
84
81
|
|
|
85
82
|
const list = await this.get(`lists/${uuid}`)
|
|
86
|
-
return
|
|
83
|
+
return List.fromJSON(list, this.context)
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
// replicates the logic implicit in PrefixingKeyValueCache to
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Content } from '../model/Content'
|
|
2
2
|
import { baseCapiObject } from './capiObject'
|
|
3
3
|
import cloneDeep from 'clone-deep'
|
|
4
4
|
import { QueryContext } from '..'
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
capi: {
|
|
19
19
|
getContent: (id: string) =>
|
|
20
20
|
Promise.resolve(
|
|
21
|
-
new
|
|
21
|
+
new Content(
|
|
22
22
|
cloneDeep({
|
|
23
23
|
...baseCapiObject,
|
|
24
24
|
id,
|
package/src/generated/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
|
2
2
|
import type { Concept as ConceptModel } from '../model/Concept';
|
|
3
3
|
import type { Person as PersonModel } from '../model/Person';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { List as ListModel } from '../model/List';
|
|
5
|
+
import type { Content as ContentModel } from '../model/Content';
|
|
6
6
|
import type { Image as ImageModel } from '../model/Image';
|
|
7
7
|
import type { Clip as ClipModel } from '../model/Clip';
|
|
8
8
|
import type { Picture as PictureModel } from '../model/Picture';
|
|
@@ -168,6 +168,8 @@ export type Audio = Content & {
|
|
|
168
168
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
169
169
|
/** The unique identifier of the article - a uuid or a url. */
|
|
170
170
|
readonly id: Scalars['ID']['output'];
|
|
171
|
+
/** An object of several flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
172
|
+
readonly indicators?: Maybe<Indicators>;
|
|
171
173
|
/** The concept to use for instant alert CTAs. */
|
|
172
174
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
173
175
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
@@ -558,6 +560,8 @@ export type ContentPackage = Content & {
|
|
|
558
560
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
559
561
|
/** The unique identifier of the article - a uuid or a url. */
|
|
560
562
|
readonly id: Scalars['ID']['output'];
|
|
563
|
+
/** An object of several flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
564
|
+
readonly indicators?: Maybe<Indicators>;
|
|
561
565
|
/** The concept to use for instant alert CTAs. */
|
|
562
566
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
563
567
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
@@ -1050,6 +1054,8 @@ export type ImageWideSourceSetArgs = {
|
|
|
1050
1054
|
};
|
|
1051
1055
|
|
|
1052
1056
|
export type Indicators = {
|
|
1057
|
+
/** Whether the article is included in an FT Edit editorial curation. */
|
|
1058
|
+
readonly isFTEdit?: Maybe<Scalars['Boolean']['output']>;
|
|
1053
1059
|
/** Whether the content is an opinion piece. */
|
|
1054
1060
|
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1055
1061
|
/** Whether the content is Commercial Partner Content. */
|
|
@@ -1121,6 +1127,8 @@ export type LiveBlogPackage = Content & {
|
|
|
1121
1127
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
1122
1128
|
/** The unique identifier of the article - a uuid or a url. */
|
|
1123
1129
|
readonly id: Scalars['ID']['output'];
|
|
1130
|
+
/** An object of flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
1131
|
+
readonly indicators?: Maybe<Indicators>;
|
|
1124
1132
|
/** The concept to use for instant alert CTAs. */
|
|
1125
1133
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
1126
1134
|
/** The child articles of this live blog package. */
|
|
@@ -1220,7 +1228,7 @@ export type LiveBlogPost = Content & {
|
|
|
1220
1228
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
1221
1229
|
/** The unique identifier of the article - a uuid or a url. */
|
|
1222
1230
|
readonly id: Scalars['ID']['output'];
|
|
1223
|
-
/** An object indicating
|
|
1231
|
+
/** An object of several flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
1224
1232
|
readonly indicators?: Maybe<Indicators>;
|
|
1225
1233
|
/** The concept to use for instant alert CTAs. */
|
|
1226
1234
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
@@ -1481,6 +1489,8 @@ export type Placeholder = Content & {
|
|
|
1481
1489
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
1482
1490
|
/** The unique identifier of the article - a uuid or a url. */
|
|
1483
1491
|
readonly id: Scalars['ID']['output'];
|
|
1492
|
+
/** An object of several flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
1493
|
+
readonly indicators?: Maybe<Indicators>;
|
|
1484
1494
|
/** The concept to use for instant alert CTAs. */
|
|
1485
1495
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
1486
1496
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
@@ -1718,6 +1728,8 @@ export type TeaserIndicators = {
|
|
|
1718
1728
|
readonly isEditorsChoice?: Maybe<Scalars['Boolean']['output']>;
|
|
1719
1729
|
/** Whether the teaser is exclusive. */
|
|
1720
1730
|
readonly isExclusive?: Maybe<Scalars['Boolean']['output']>;
|
|
1731
|
+
/** Whether the article is included in an FT Edit editorial curation. */
|
|
1732
|
+
readonly isFTEdit?: Maybe<Scalars['Boolean']['output']>;
|
|
1721
1733
|
/** Whether the teaser is an opinion piece. */
|
|
1722
1734
|
readonly isOpinion?: Maybe<Scalars['Boolean']['output']>;
|
|
1723
1735
|
/** Whether the teaser is a podcast. */
|
|
@@ -1844,6 +1856,8 @@ export type Video = Content & {
|
|
|
1844
1856
|
readonly firstPublishedDate: Scalars['String']['output'];
|
|
1845
1857
|
/** The unique identifier of the article - a uuid or a url. */
|
|
1846
1858
|
readonly id: Scalars['ID']['output'];
|
|
1859
|
+
/** An object of several flags indicating the nature of the content, eg. if it's in an FT Edit edition */
|
|
1860
|
+
readonly indicators?: Maybe<Indicators>;
|
|
1847
1861
|
/** The concept to use for instant alert CTAs. */
|
|
1848
1862
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
1849
1863
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
@@ -1967,13 +1981,13 @@ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs
|
|
|
1967
1981
|
|
|
1968
1982
|
/** Mapping of union types */
|
|
1969
1983
|
export type ResolversUnionTypes<RefType extends Record<string, unknown>> = ResolversObject<{
|
|
1970
|
-
MetaLink: ( ConceptModel ) | (
|
|
1984
|
+
MetaLink: ( ConceptModel ) | ( ContentModel );
|
|
1971
1985
|
}>;
|
|
1972
1986
|
|
|
1973
1987
|
/** Mapping of interface types */
|
|
1974
1988
|
export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = ResolversObject<{
|
|
1975
1989
|
ConceptInterface: ( ConceptModel ) | ( ConceptModel );
|
|
1976
|
-
Content: (
|
|
1990
|
+
Content: ( ContentModel ) | ( ContentModel ) | ( ContentModel ) | ( ContentModel ) | ( ContentModel ) | ( ContentModel ) | ( ContentModel );
|
|
1977
1991
|
Image: ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel ) | ( ImageModel );
|
|
1978
1992
|
Picture: ( PictureModel ) | ( PictureModel ) | ( PictureModel );
|
|
1979
1993
|
Reference: ( ReferenceWithCAPIData<AuthorNode> ) | ( ReferenceWithCAPIData<ClipSetNode|OldClipNode> ) | ( ReferenceWithCAPIData<ContentTree.CustomCodeComponent> ) | ( ReferenceWithCAPIData<ContentTree.Flourish> ) | ( ReferenceWithCAPIData<ContentTree.ImageSet> ) | ( ReferenceWithCAPIData<ContentTree.LayoutImage> ) | ( ReferenceWithCAPIData<ContentTree.ImageSet> ) | ( ReferenceWithCAPIData<RawImageNode> ) | ( ReferenceWithCAPIData<ContentTree.Recommended> ) | ( ReferenceWithCAPIData<ContentTree.ScrollyImage> ) | ( ReferenceWithCAPIData<ContentTree.Tweet> ) | ( ReferenceWithCAPIData<VideoNode> );
|
|
@@ -1991,8 +2005,8 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1991
2005
|
Accessibility: ResolverTypeWrapper<Omit<Accessibility, 'transcript'> & { transcript: Maybe<ResolversTypes['RichText']> }>;
|
|
1992
2006
|
AltStandfirst: ResolverTypeWrapper<AltStandfirst>;
|
|
1993
2007
|
AltTitle: ResolverTypeWrapper<AltTitle>;
|
|
1994
|
-
Article: ResolverTypeWrapper<
|
|
1995
|
-
Audio: ResolverTypeWrapper<
|
|
2008
|
+
Article: ResolverTypeWrapper<ContentModel>;
|
|
2009
|
+
Audio: ResolverTypeWrapper<ContentModel>;
|
|
1996
2010
|
Author: ResolverTypeWrapper<ConceptModel>;
|
|
1997
2011
|
AuthorReference: ResolverTypeWrapper<ReferenceWithCAPIData<AuthorNode>>;
|
|
1998
2012
|
BasicTopper: ResolverTypeWrapper<TopperModel>;
|
|
@@ -2009,7 +2023,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
2009
2023
|
Content: ResolverTypeWrapper<ResolversInterfaceTypes<ResolversTypes>['Content']>;
|
|
2010
2024
|
ContentConnection: ResolverTypeWrapper<Omit<ContentConnection, 'edges'> & { edges: ReadonlyArray<Maybe<ResolversTypes['ContentEdge']>> }>;
|
|
2011
2025
|
ContentEdge: ResolverTypeWrapper<Omit<ContentEdge, 'node'> & { node: Maybe<ResolversTypes['Content']> }>;
|
|
2012
|
-
ContentPackage: ResolverTypeWrapper<
|
|
2026
|
+
ContentPackage: ResolverTypeWrapper<ContentModel>;
|
|
2013
2027
|
ContentType: ResolverTypeWrapper<Scalars['ContentType']['output']>;
|
|
2014
2028
|
CustomCodeComponent: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.CustomCodeComponent>>;
|
|
2015
2029
|
DeepLandscapeTopper: ResolverTypeWrapper<TopperModel>;
|
|
@@ -2041,10 +2055,10 @@ export type ResolversTypes = ResolversObject<{
|
|
|
2041
2055
|
LayoutHint: ResolverTypeWrapper<Scalars['LayoutHint']['output']>;
|
|
2042
2056
|
LayoutImage: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.LayoutImage>>;
|
|
2043
2057
|
LeadFlourish: ResolverTypeWrapper<LeadFlourishModel>;
|
|
2044
|
-
List: ResolverTypeWrapper<
|
|
2058
|
+
List: ResolverTypeWrapper<ListModel>;
|
|
2045
2059
|
ListType: ResolverTypeWrapper<Scalars['ListType']['output']>;
|
|
2046
|
-
LiveBlogPackage: ResolverTypeWrapper<
|
|
2047
|
-
LiveBlogPost: ResolverTypeWrapper<
|
|
2060
|
+
LiveBlogPackage: ResolverTypeWrapper<ContentModel>;
|
|
2061
|
+
LiveBlogPost: ResolverTypeWrapper<ContentModel>;
|
|
2048
2062
|
MainImage: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.ImageSet>>;
|
|
2049
2063
|
Media: ResolverTypeWrapper<Media>;
|
|
2050
2064
|
MetaLink: ResolverTypeWrapper<ResolversUnionTypes<ResolversTypes>['MetaLink']>;
|
|
@@ -2058,7 +2072,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
2058
2072
|
PictureFullBleed: ResolverTypeWrapper<PictureModel>;
|
|
2059
2073
|
PictureInline: ResolverTypeWrapper<PictureModel>;
|
|
2060
2074
|
PictureStandard: ResolverTypeWrapper<PictureModel>;
|
|
2061
|
-
Placeholder: ResolverTypeWrapper<
|
|
2075
|
+
Placeholder: ResolverTypeWrapper<ContentModel>;
|
|
2062
2076
|
PodcastTopper: ResolverTypeWrapper<TopperModel>;
|
|
2063
2077
|
Query: ResolverTypeWrapper<{}>;
|
|
2064
2078
|
RawImage: ResolverTypeWrapper<ReferenceWithCAPIData<RawImageNode>>;
|
|
@@ -2071,7 +2085,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
2071
2085
|
String: ResolverTypeWrapper<Scalars['String']['output']>;
|
|
2072
2086
|
StructuredContent: ResolverTypeWrapper<Omit<StructuredContent, 'references'> & { references: ReadonlyArray<ResolversTypes['Reference']> }>;
|
|
2073
2087
|
TableOfContents: ResolverTypeWrapper<TableOfContents>;
|
|
2074
|
-
Teaser: ResolverTypeWrapper<
|
|
2088
|
+
Teaser: ResolverTypeWrapper<ContentModel>;
|
|
2075
2089
|
TeaserIndicators: ResolverTypeWrapper<TeaserIndicators>;
|
|
2076
2090
|
Topper: ResolverTypeWrapper<TopperModel>;
|
|
2077
2091
|
TopperBackgroundColour: ResolverTypeWrapper<Scalars['TopperBackgroundColour']['output']>;
|
|
@@ -2082,7 +2096,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
2082
2096
|
TopperWithPackage: ResolverTypeWrapper<TopperModel>;
|
|
2083
2097
|
TopperWithTheme: ResolverTypeWrapper<TopperModel>;
|
|
2084
2098
|
Tweet: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.Tweet>>;
|
|
2085
|
-
Video: ResolverTypeWrapper<
|
|
2099
|
+
Video: ResolverTypeWrapper<ContentModel>;
|
|
2086
2100
|
VideoReference: ResolverTypeWrapper<ReferenceWithCAPIData<VideoNode>>;
|
|
2087
2101
|
}>;
|
|
2088
2102
|
|
|
@@ -2092,8 +2106,8 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2092
2106
|
Accessibility: Omit<Accessibility, 'transcript'> & { transcript: Maybe<ResolversParentTypes['RichText']> };
|
|
2093
2107
|
AltStandfirst: AltStandfirst;
|
|
2094
2108
|
AltTitle: AltTitle;
|
|
2095
|
-
Article:
|
|
2096
|
-
Audio:
|
|
2109
|
+
Article: ContentModel;
|
|
2110
|
+
Audio: ContentModel;
|
|
2097
2111
|
Author: ConceptModel;
|
|
2098
2112
|
AuthorReference: ReferenceWithCAPIData<AuthorNode>;
|
|
2099
2113
|
BasicTopper: TopperModel;
|
|
@@ -2110,7 +2124,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2110
2124
|
Content: ResolversInterfaceTypes<ResolversParentTypes>['Content'];
|
|
2111
2125
|
ContentConnection: Omit<ContentConnection, 'edges'> & { edges: ReadonlyArray<Maybe<ResolversParentTypes['ContentEdge']>> };
|
|
2112
2126
|
ContentEdge: Omit<ContentEdge, 'node'> & { node: Maybe<ResolversParentTypes['Content']> };
|
|
2113
|
-
ContentPackage:
|
|
2127
|
+
ContentPackage: ContentModel;
|
|
2114
2128
|
ContentType: Scalars['ContentType']['output'];
|
|
2115
2129
|
CustomCodeComponent: ReferenceWithCAPIData<ContentTree.CustomCodeComponent>;
|
|
2116
2130
|
DeepLandscapeTopper: TopperModel;
|
|
@@ -2142,10 +2156,10 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2142
2156
|
LayoutHint: Scalars['LayoutHint']['output'];
|
|
2143
2157
|
LayoutImage: ReferenceWithCAPIData<ContentTree.LayoutImage>;
|
|
2144
2158
|
LeadFlourish: LeadFlourishModel;
|
|
2145
|
-
List:
|
|
2159
|
+
List: ListModel;
|
|
2146
2160
|
ListType: Scalars['ListType']['output'];
|
|
2147
|
-
LiveBlogPackage:
|
|
2148
|
-
LiveBlogPost:
|
|
2161
|
+
LiveBlogPackage: ContentModel;
|
|
2162
|
+
LiveBlogPost: ContentModel;
|
|
2149
2163
|
MainImage: ReferenceWithCAPIData<ContentTree.ImageSet>;
|
|
2150
2164
|
Media: Media;
|
|
2151
2165
|
MetaLink: ResolversUnionTypes<ResolversParentTypes>['MetaLink'];
|
|
@@ -2159,7 +2173,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2159
2173
|
PictureFullBleed: PictureModel;
|
|
2160
2174
|
PictureInline: PictureModel;
|
|
2161
2175
|
PictureStandard: PictureModel;
|
|
2162
|
-
Placeholder:
|
|
2176
|
+
Placeholder: ContentModel;
|
|
2163
2177
|
PodcastTopper: TopperModel;
|
|
2164
2178
|
Query: {};
|
|
2165
2179
|
RawImage: ReferenceWithCAPIData<RawImageNode>;
|
|
@@ -2172,7 +2186,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2172
2186
|
String: Scalars['String']['output'];
|
|
2173
2187
|
StructuredContent: Omit<StructuredContent, 'references'> & { references: ReadonlyArray<ResolversParentTypes['Reference']> };
|
|
2174
2188
|
TableOfContents: TableOfContents;
|
|
2175
|
-
Teaser:
|
|
2189
|
+
Teaser: ContentModel;
|
|
2176
2190
|
TeaserIndicators: TeaserIndicators;
|
|
2177
2191
|
Topper: TopperModel;
|
|
2178
2192
|
TopperBackgroundColour: Scalars['TopperBackgroundColour']['output'];
|
|
@@ -2183,7 +2197,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
2183
2197
|
TopperWithPackage: TopperModel;
|
|
2184
2198
|
TopperWithTheme: TopperModel;
|
|
2185
2199
|
Tweet: ReferenceWithCAPIData<ContentTree.Tweet>;
|
|
2186
|
-
Video:
|
|
2200
|
+
Video: ContentModel;
|
|
2187
2201
|
VideoReference: ReferenceWithCAPIData<VideoNode>;
|
|
2188
2202
|
}>;
|
|
2189
2203
|
|
|
@@ -2255,6 +2269,7 @@ export type AudioResolvers<ContextType = QueryContext, ParentType extends Resolv
|
|
|
2255
2269
|
editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2256
2270
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2257
2271
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2272
|
+
indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
|
|
2258
2273
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2259
2274
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2260
2275
|
media: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Media']>>>, ParentType, ContextType>;
|
|
@@ -2459,6 +2474,7 @@ export type ContentPackageResolvers<ContextType = QueryContext, ParentType exten
|
|
|
2459
2474
|
editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2460
2475
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2461
2476
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2477
|
+
indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
|
|
2462
2478
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2463
2479
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2464
2480
|
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
@@ -2730,6 +2746,7 @@ export type ImageWideResolvers<ContextType = QueryContext, ParentType extends Re
|
|
|
2730
2746
|
}>;
|
|
2731
2747
|
|
|
2732
2748
|
export type IndicatorsResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Indicators'] = ResolversParentTypes['Indicators']> = ResolversObject<{
|
|
2749
|
+
isFTEdit: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2733
2750
|
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2734
2751
|
isPartnerContent: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2735
2752
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
@@ -2788,6 +2805,7 @@ export type LiveBlogPackageResolvers<ContextType = QueryContext, ParentType exte
|
|
|
2788
2805
|
editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2789
2806
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2790
2807
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2808
|
+
indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
|
|
2791
2809
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2792
2810
|
liveBlogPosts: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Content']>>>, ParentType, ContextType, Partial<LiveBlogPackageLiveBlogPostsArgs>>;
|
|
2793
2811
|
liveBlogPostsConnection: Resolver<Maybe<ResolversTypes['ContentConnection']>, ParentType, ContextType, Partial<LiveBlogPackageLiveBlogPostsConnectionArgs>>;
|
|
@@ -2974,6 +2992,7 @@ export type PlaceholderResolvers<ContextType = QueryContext, ParentType extends
|
|
|
2974
2992
|
editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2975
2993
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2976
2994
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2995
|
+
indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
|
|
2977
2996
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2978
2997
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2979
2998
|
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
@@ -3103,6 +3122,7 @@ export type TeaserIndicatorsResolvers<ContextType = QueryContext, ParentType ext
|
|
|
3103
3122
|
isColumn: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3104
3123
|
isEditorsChoice: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3105
3124
|
isExclusive: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3125
|
+
isFTEdit: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3106
3126
|
isOpinion: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3107
3127
|
isPodcast: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3108
3128
|
isScoop: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
@@ -3189,6 +3209,7 @@ export type VideoResolvers<ContextType = QueryContext, ParentType extends Resolv
|
|
|
3189
3209
|
editorialDesk: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
3190
3210
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
3191
3211
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
3212
|
+
indicators: Resolver<Maybe<ResolversTypes['Indicators']>, ParentType, ContextType>;
|
|
3192
3213
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
3193
3214
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
3194
3215
|
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
package/src/model/Byline.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Author as AuthorNode,
|
|
6
6
|
} from '../resolvers/content-tree/Workarounds'
|
|
7
7
|
import updateTreeWithReferenceIds from '../resolvers/content-tree/updateTreeWithReferenceIds'
|
|
8
|
-
import {
|
|
8
|
+
import { Content } from './Content'
|
|
9
9
|
|
|
10
10
|
export class Byline {
|
|
11
11
|
static normaliseQuotes(str: string) {
|
|
@@ -16,7 +16,7 @@ export class Byline {
|
|
|
16
16
|
private byline: string,
|
|
17
17
|
private vanity: boolean,
|
|
18
18
|
private authors: Concept[],
|
|
19
|
-
private contentApiData?:
|
|
19
|
+
private contentApiData?: Content
|
|
20
20
|
) {}
|
|
21
21
|
|
|
22
22
|
async buildBylineTree() {
|