@financial-times/cp-content-pipeline-schema 1.8.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/lib/generated/index.d.ts +10 -6
- package/lib/model/Clip.d.ts +2 -1
- package/lib/model/Clip.js +17 -2
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Clip.test.d.ts +1 -0
- package/lib/model/Clip.test.js +156 -0
- package/lib/model/Clip.test.js.map +1 -0
- package/lib/resolvers/content-tree/references/ClipSet.d.ts +2 -1
- package/lib/resolvers/content-tree/references/ClipSet.js +14 -2
- package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -1
- package/lib/resolvers/index.d.ts +1 -1
- package/lib/resolvers/scalars.d.ts +2 -2
- package/lib/resolvers/scalars.js +1 -1
- package/lib/resolvers/scalars.js.map +1 -1
- package/package.json +1 -1
- package/queries/article.graphql +10 -1
- package/src/generated/index.ts +5 -5
- package/src/model/Clip.test.ts +154 -0
- package/src/model/Clip.ts +16 -2
- package/src/resolvers/content-tree/references/ClipSet.ts +14 -2
- package/src/resolvers/scalars.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/clip.graphql +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v2.0.0...cp-content-pipeline-schema-v2.0.1) (2024-02-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* use Origami Image Service for poster and fallback image for Clips ([68e75c3](https://github.com/Financial-Times/cp-content-pipeline/commit/68e75c3ebfa5b3afaa96c0375499aec5e904f2b5))
|
|
9
|
+
|
|
10
|
+
## [2.0.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v1.8.6...cp-content-pipeline-schema-v2.0.0) (2024-01-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* transcript as structured element, remove xmldom, fix old clips
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* transcript as structured element, remove xmldom, fix old clips ([94c488c](https://github.com/Financial-Times/cp-content-pipeline/commit/94c488cab569cfc1a3eb73a756e489322512cde0))
|
|
20
|
+
|
|
3
21
|
## [1.8.6](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v1.8.5...cp-content-pipeline-schema-v1.8.6) (2024-01-22)
|
|
4
22
|
|
|
5
23
|
|
package/lib/generated/index.d.ts
CHANGED
|
@@ -94,8 +94,8 @@ export type Scalars = {
|
|
|
94
94
|
output: 'special-report' | 'extra' | 'basic' | 'extra-wide';
|
|
95
95
|
};
|
|
96
96
|
RichTextSource: {
|
|
97
|
-
input: 'standfirst' | 'summary' | 'bodyXML';
|
|
98
|
-
output: 'standfirst' | 'summary' | 'bodyXML';
|
|
97
|
+
input: 'standfirst' | 'summary' | 'bodyXML' | 'transcript';
|
|
98
|
+
output: 'standfirst' | 'summary' | 'bodyXML' | 'transcript';
|
|
99
99
|
};
|
|
100
100
|
TopperBackgroundColour: {
|
|
101
101
|
input: 'paper' | 'wheat' | 'white' | 'black' | 'claret' | 'oxford' | 'slate' | 'crimson' | 'sky' | 'matisse';
|
|
@@ -104,7 +104,7 @@ export type Scalars = {
|
|
|
104
104
|
};
|
|
105
105
|
export type Accessibility = {
|
|
106
106
|
readonly captions?: Maybe<ReadonlyArray<Maybe<Caption>>>;
|
|
107
|
-
readonly transcript?: Maybe<
|
|
107
|
+
readonly transcript?: Maybe<RichText>;
|
|
108
108
|
};
|
|
109
109
|
export type AltStandfirst = {
|
|
110
110
|
readonly promotionalStandfirst?: Maybe<Scalars['String']['output']>;
|
|
@@ -1110,7 +1110,9 @@ export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = R
|
|
|
1110
1110
|
/** Mapping between all available schema types and the resolvers types */
|
|
1111
1111
|
export type ResolversTypes = ResolversObject<{
|
|
1112
1112
|
AccessLevel: ResolverTypeWrapper<Scalars['AccessLevel']['output']>;
|
|
1113
|
-
Accessibility: ResolverTypeWrapper<Accessibility
|
|
1113
|
+
Accessibility: ResolverTypeWrapper<Omit<Accessibility, 'transcript'> & {
|
|
1114
|
+
transcript?: Maybe<ResolversTypes['RichText']>;
|
|
1115
|
+
}>;
|
|
1114
1116
|
AltStandfirst: ResolverTypeWrapper<AltStandfirst>;
|
|
1115
1117
|
AltTitle: ResolverTypeWrapper<AltTitle>;
|
|
1116
1118
|
Article: ResolverTypeWrapper<CapiResponse>;
|
|
@@ -1242,7 +1244,9 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1242
1244
|
/** Mapping between all available schema types and the resolvers parents */
|
|
1243
1245
|
export type ResolversParentTypes = ResolversObject<{
|
|
1244
1246
|
AccessLevel: Scalars['AccessLevel']['output'];
|
|
1245
|
-
Accessibility: Accessibility
|
|
1247
|
+
Accessibility: Omit<Accessibility, 'transcript'> & {
|
|
1248
|
+
transcript?: Maybe<ResolversParentTypes['RichText']>;
|
|
1249
|
+
};
|
|
1246
1250
|
AltStandfirst: AltStandfirst;
|
|
1247
1251
|
AltTitle: AltTitle;
|
|
1248
1252
|
Article: CapiResponse;
|
|
@@ -1376,7 +1380,7 @@ export interface AccessLevelScalarConfig extends GraphQLScalarTypeConfig<Resolve
|
|
|
1376
1380
|
}
|
|
1377
1381
|
export type AccessibilityResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Accessibility'] = ResolversParentTypes['Accessibility']> = ResolversObject<{
|
|
1378
1382
|
captions?: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Caption']>>>, ParentType, ContextType>;
|
|
1379
|
-
transcript?: Resolver<Maybe<ResolversTypes['
|
|
1383
|
+
transcript?: Resolver<Maybe<ResolversTypes['RichText']>, ParentType, ContextType>;
|
|
1380
1384
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
1381
1385
|
}>;
|
|
1382
1386
|
export type AltStandfirstResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['AltStandfirst'] = ResolversParentTypes['AltStandfirst']> = ResolversObject<{
|
package/lib/model/Clip.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export interface ClipVideo {
|
|
|
19
19
|
}
|
|
20
20
|
export declare class Clip implements ClipVideo {
|
|
21
21
|
private clip;
|
|
22
|
-
|
|
22
|
+
private layout?;
|
|
23
|
+
constructor(clip: ClipMetadata, layout?: string | undefined);
|
|
23
24
|
type(): string;
|
|
24
25
|
id(): string;
|
|
25
26
|
format(): LiteralUnionScalarValues<typeof ClipFormat>;
|
package/lib/model/Clip.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Clip = void 0;
|
|
4
7
|
const metadata_1 = require("../helpers/metadata");
|
|
5
8
|
const literal_union_1 = require("../resolvers/literal-union");
|
|
6
9
|
const scalars_1 = require("../resolvers/scalars");
|
|
10
|
+
const imageService_1 = __importDefault(require("../helpers/imageService"));
|
|
7
11
|
class Clip {
|
|
8
|
-
constructor(clip) {
|
|
12
|
+
constructor(clip, layout) {
|
|
9
13
|
this.clip = clip;
|
|
14
|
+
this.layout = layout;
|
|
10
15
|
}
|
|
11
16
|
type() {
|
|
12
17
|
return 'clip';
|
|
@@ -44,7 +49,17 @@ class Clip {
|
|
|
44
49
|
return dataSource;
|
|
45
50
|
}
|
|
46
51
|
poster() {
|
|
47
|
-
|
|
52
|
+
const mapSizes = {
|
|
53
|
+
'in-line': 700,
|
|
54
|
+
'mid-grid': 900,
|
|
55
|
+
'full-grid': 1200,
|
|
56
|
+
};
|
|
57
|
+
const url = this.clip.poster?.members[0].binaryUrl;
|
|
58
|
+
return url ? (0, imageService_1.default)({
|
|
59
|
+
url,
|
|
60
|
+
systemCode: 'cp-content-pipeline',
|
|
61
|
+
width: this.layout && mapSizes[this.layout] ? mapSizes[this.layout] : 700,
|
|
62
|
+
}) : '';
|
|
48
63
|
}
|
|
49
64
|
}
|
|
50
65
|
exports.Clip = Clip;
|
package/lib/model/Clip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAEjD,8DAGmC;AACnC,kDAAiD;AACjD,2EAAqD;AAoBrD,MAAa,IAAI;IACf,YAAoB,IAAkB,EAAU,MAAe;QAA3C,SAAI,GAAJ,IAAI,CAAc;QAAU,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;IAEnE,IAAI;QACF,OAAO,MAAM,CAAA;IACf,CAAC;IAED,EAAE;QACA,MAAM,IAAI,GAAG,IAAA,sBAAW,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,qCAAqC,CAAC,CAAA;SACtE;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACpB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA;YAEnC,IAAI,UAAU,KAAK,gBAAgB,EAAE;gBACnC,OAAO,iBAAiB,CAAA;aACzB;YAED,IAAI,IAAA,sCAAsB,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,oBAA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"__esModule", { value: true });
|
|
3
|
+
const Clip_1 = require("./Clip");
|
|
4
|
+
describe('Clip', () => {
|
|
5
|
+
describe('poster', () => {
|
|
6
|
+
it('uses the Origami Image Service when a url is provided', () => {
|
|
7
|
+
const clip = new Clip_1.Clip({
|
|
8
|
+
id: 'http://api.ft.com/things/1234',
|
|
9
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
10
|
+
dataSource: [
|
|
11
|
+
{},
|
|
12
|
+
],
|
|
13
|
+
poster: {
|
|
14
|
+
id: 'http://api.ft.com/things/1234',
|
|
15
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
16
|
+
members: [
|
|
17
|
+
{
|
|
18
|
+
id: 'http://api.ft.com/things/1234',
|
|
19
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
20
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
expect(clip.poster()).toContain('https://www.ft.com/__origami/service/image/v2/images/raw/');
|
|
26
|
+
expect(clip.poster()).toContain('source=cp-content-pipeline&fit=scale-down&quality=highest');
|
|
27
|
+
});
|
|
28
|
+
it('returns an empty string if an image url is not provided', () => {
|
|
29
|
+
const clip = new Clip_1.Clip({
|
|
30
|
+
id: 'http://api.ft.com/things/1234',
|
|
31
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
32
|
+
dataSource: [
|
|
33
|
+
{},
|
|
34
|
+
],
|
|
35
|
+
poster: {
|
|
36
|
+
id: 'http://api.ft.com/things/1234',
|
|
37
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
38
|
+
members: [
|
|
39
|
+
{
|
|
40
|
+
id: 'http://api.ft.com/things/1234',
|
|
41
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
42
|
+
binaryUrl: '',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
expect(clip.poster()).toEqual('');
|
|
48
|
+
});
|
|
49
|
+
it('uses a default width if a layout is not provided', () => {
|
|
50
|
+
const clip = new Clip_1.Clip({
|
|
51
|
+
id: 'http://api.ft.com/things/1234',
|
|
52
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
53
|
+
dataSource: [
|
|
54
|
+
{},
|
|
55
|
+
],
|
|
56
|
+
poster: {
|
|
57
|
+
id: 'http://api.ft.com/things/1234',
|
|
58
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
59
|
+
members: [
|
|
60
|
+
{
|
|
61
|
+
id: 'http://api.ft.com/things/1234',
|
|
62
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
63
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
expect(clip.poster()).toContain('width=700');
|
|
69
|
+
});
|
|
70
|
+
it('uses a default width if a layout is not supported', () => {
|
|
71
|
+
const clip = new Clip_1.Clip({
|
|
72
|
+
id: 'http://api.ft.com/things/1234',
|
|
73
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
74
|
+
dataSource: [
|
|
75
|
+
{},
|
|
76
|
+
],
|
|
77
|
+
poster: {
|
|
78
|
+
id: 'http://api.ft.com/things/1234',
|
|
79
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
80
|
+
members: [
|
|
81
|
+
{
|
|
82
|
+
id: 'http://api.ft.com/things/1234',
|
|
83
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
84
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
}, 'I-dont-exist');
|
|
89
|
+
expect(clip.poster()).toEqual('https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Fvideo.ft.com%2F1234.jpg?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1');
|
|
90
|
+
});
|
|
91
|
+
it('generates an image with the appropriate width for a `in-line` layout', () => {
|
|
92
|
+
const clip = new Clip_1.Clip({
|
|
93
|
+
id: 'http://api.ft.com/things/1234',
|
|
94
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
95
|
+
dataSource: [
|
|
96
|
+
{},
|
|
97
|
+
],
|
|
98
|
+
poster: {
|
|
99
|
+
id: 'http://api.ft.com/things/1234',
|
|
100
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
101
|
+
members: [
|
|
102
|
+
{
|
|
103
|
+
id: 'http://api.ft.com/things/1234',
|
|
104
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
105
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
}, 'in-line');
|
|
110
|
+
expect(clip.poster()).toContain('width=700');
|
|
111
|
+
});
|
|
112
|
+
it('generates an image with the appropriate width for a `mid-grid` layout', () => {
|
|
113
|
+
const clip = new Clip_1.Clip({
|
|
114
|
+
id: 'http://api.ft.com/things/1234',
|
|
115
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
116
|
+
dataSource: [
|
|
117
|
+
{},
|
|
118
|
+
],
|
|
119
|
+
poster: {
|
|
120
|
+
id: 'http://api.ft.com/things/1234',
|
|
121
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
122
|
+
members: [
|
|
123
|
+
{
|
|
124
|
+
id: 'http://api.ft.com/things/1234',
|
|
125
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
126
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
}, 'mid-grid');
|
|
131
|
+
expect(clip.poster()).toContain('width=900');
|
|
132
|
+
});
|
|
133
|
+
it('generates an image with the appropriate width for a `full-grid` layout', () => {
|
|
134
|
+
const clip = new Clip_1.Clip({
|
|
135
|
+
id: 'http://api.ft.com/things/1234',
|
|
136
|
+
type: "http://www.ft.com/ontology/content/Clip",
|
|
137
|
+
dataSource: [
|
|
138
|
+
{},
|
|
139
|
+
],
|
|
140
|
+
poster: {
|
|
141
|
+
id: 'http://api.ft.com/things/1234',
|
|
142
|
+
type: 'http://www.ft.com/ontology/content/ImageSet',
|
|
143
|
+
members: [
|
|
144
|
+
{
|
|
145
|
+
id: 'http://api.ft.com/things/1234',
|
|
146
|
+
type: 'http://www.ft.com/ontology/content/Image',
|
|
147
|
+
binaryUrl: 'http://video.ft.com/1234.jpg',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
}, 'full-grid');
|
|
152
|
+
expect(clip.poster()).toContain('width=1200');
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
//# sourceMappingURL=Clip.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Clip.test.js","sourceRoot":"","sources":["../../src/model/Clip.test.ts"],"names":[],"mappings":";;AAAA,iCAA8B;AAE9B,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IAClB,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;YAC7D,MAAM,IAAI,GAAG,IAAI,WAAI,CAAC;gBAClB,EAAE,EAAE,+BAA+B;gBACnC,IAAI,EAAE,yCAAyC;gBAC/C,UAAU,EAAE;oBACR,EAAE;iBACL;gBACD,MAAM,EAAE;oBACJ,EAAE,EAAE,+BAA+B;oBACnC,IAAI,EAAE,6CAA6C;oBACnD,OAAO,EAAE;wBACL;4BACI,EAAE,EAAE,+BAA+B;4BACnC,IAAI,EAAE,0CAA0C;4BAChD,SAAS,EAAE,8BAA8B;yBAC5C;qBACJ;iBACJ;aACJ,CAAC,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,2DAA2D,CAAC,CAAC;YAC7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BAA+B;4BACnC,IAAI,EAAE,0CAA0C;4BAChD,SAAS,EAAE,8BAA8B;yBAC5C;qBACJ;iBACJ;aACJ,EAAE,UAAU,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;YAC9E,MAAM,IAAI,GAAG,IAAI,WAAI,CAAC;gBAClB,EAAE,EAAE,+BAA+B;gBACnC,IAAI,EAAE,yCAAyC;gBAC/C,UAAU,EAAE;oBACR,EAAE;iBACL;gBACD,MAAM,EAAE;oBACJ,EAAE,EAAE,+BAA+B;oBACnC,IAAI,EAAE,6CAA6C;oBACnD,OAAO,EAAE;wBACL;4BACI,EAAE,EAAE,+BAA+B;4BACnC,IAAI,EAAE,0CAA0C;4BAChD,SAAS,EAAE,8BAA8B;yBAC5C;qBACJ;iBACJ;aACJ,EAAE,WAAW,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClipSet as ClipSetWorkaroundContentTree, OldClip as OldClipContentTree } from '../Workarounds';
|
|
2
2
|
import { Clip } from '../../../model/Clip';
|
|
3
|
+
import { RichText } from '../../../model/RichText';
|
|
3
4
|
import { ReferenceWithCAPIData } from '.';
|
|
4
5
|
export declare const ClipSet: {
|
|
5
6
|
id: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
@@ -10,11 +11,11 @@ export declare const ClipSet: {
|
|
|
10
11
|
dataLayout: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
11
12
|
caption: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
12
13
|
accessibility: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => {
|
|
14
|
+
transcript: RichText | null;
|
|
13
15
|
captions?: {
|
|
14
16
|
mediaType?: string | undefined;
|
|
15
17
|
url?: string | undefined;
|
|
16
18
|
}[] | undefined;
|
|
17
|
-
transcript?: string | undefined;
|
|
18
19
|
} | null;
|
|
19
20
|
description: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
20
21
|
credits: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClipSet = void 0;
|
|
4
4
|
const metadata_1 = require("../../../helpers/metadata");
|
|
5
5
|
const Clip_1 = require("../../../model/Clip");
|
|
6
|
+
const RichText_1 = require("../../../model/RichText");
|
|
6
7
|
function getClipSet(parent) {
|
|
7
8
|
const clipSets = parent.contentApiData
|
|
8
9
|
?.embeds()
|
|
@@ -25,7 +26,18 @@ exports.ClipSet = {
|
|
|
25
26
|
dataLayout: (parent) => parent.reference.dataLayout,
|
|
26
27
|
caption: (parent) => parent.reference.caption ??
|
|
27
28
|
getClipSet(parent)?.caption,
|
|
28
|
-
accessibility: (parent) =>
|
|
29
|
+
accessibility: (parent) => {
|
|
30
|
+
const accessibility = getClipSet(parent)?.accessibility;
|
|
31
|
+
if (accessibility) {
|
|
32
|
+
return {
|
|
33
|
+
...accessibility,
|
|
34
|
+
transcript: accessibility.transcript
|
|
35
|
+
? new RichText_1.RichText('transcript', accessibility.transcript)
|
|
36
|
+
: null,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
},
|
|
29
41
|
description: (parent) => parent.reference.description ??
|
|
30
42
|
getClipSet(parent)?.description,
|
|
31
43
|
credits: (parent) => parent.reference.credits ??
|
|
@@ -38,7 +50,7 @@ exports.ClipSet = {
|
|
|
38
50
|
async clips(parent) {
|
|
39
51
|
const clipSet = getClipSet(parent);
|
|
40
52
|
return clipSet && clipSet.members && clipSet.members.length > 0
|
|
41
|
-
? clipSet.members.map((clip) => new Clip_1.Clip(clip))
|
|
53
|
+
? clipSet.members.map((clip) => new Clip_1.Clip(clip, parent.reference.dataLayout))
|
|
42
54
|
: null;
|
|
43
55
|
},
|
|
44
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipSet.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/ClipSet.ts"],"names":[],"mappings":";;;AAKA,wDAAuD;AACvD,8CAA0C;
|
|
1
|
+
{"version":3,"file":"ClipSet.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/ClipSet.ts"],"names":[],"mappings":";;;AAKA,wDAAuD;AACvD,8CAA0C;AAC1C,sDAAkD;AAIlD,SAAS,UAAU,CACjB,MAEC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAc;QACpC,EAAE,MAAM,EAAE;QACV,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAErD,CAAA;IAEN,MAAM,IAAI,GAAG,IAAA,sBAAW,EACtB,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,UAAU;QAClC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QACrB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CACzB,CAAA;IACD,MAAM,OAAO,GAAG,QAAQ,EAAE,IAAI,CAC5B,CAAC,KAAkB,EAAE,EAAE,CAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CACvD,CAAA;IAED,OAAO,OAAsB,CAAA;AAC/B,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,yEAAyE;IACzE,E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MAAM,CAAC,SAAgC,CAAC,OAAO;QAChD,UAAU,CAAC,MAAM,CAAC,EAAE,aAAa;IACnC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,IAAI,IAAI;IAClE,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,cAAc,IAAI,IAAI;IACtE,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,IAAI;IACtD,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,IAAI,IAAI;IAC1D,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,aAAa,IAAI,IAAI;IACpE,KAAK,CAAC,KAAK,CAAC,MAAM;QAChB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;QAElC,OAAO,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YAC7D,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,WAAI,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAC5E,CAAC,CAAC,IAAI,CAAA;IACV,CAAC;CACyB,CAAA"}
|
package/lib/resolvers/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ declare const resolvers: {
|
|
|
57
57
|
AccessLevel: import("./literal-union").LiteralUnionScalar<["premium", "subscribed", "registered", "free"]>;
|
|
58
58
|
CanBeSyndicated: import("./literal-union").LiteralUnionScalar<["yes", "no", "verify", "withContributorPayment", "unknown"]>;
|
|
59
59
|
ImageType: import("./literal-union").LiteralUnionScalar<["image", "graphic"]>;
|
|
60
|
-
RichTextSource: import("./literal-union").LiteralUnionScalar<["standfirst", "summary", "bodyXML"]>;
|
|
60
|
+
RichTextSource: import("./literal-union").LiteralUnionScalar<["standfirst", "summary", "bodyXML", "transcript"]>;
|
|
61
61
|
ContentType: import("./literal-union").LiteralUnionScalar<["Article", "Placeholder", "Video", "Audio", "LiveBlogPackage", "LiveBlogPost", "ContentPackage", "Content", "MediaResource"]>;
|
|
62
62
|
RichText: {
|
|
63
63
|
raw(parent: import("../model/RichText").RichText): string | null;
|
|
@@ -7,7 +7,7 @@ export declare const AccessLevel: LiteralUnionScalar<["premium", "subscribed", "
|
|
|
7
7
|
export declare const CanBeSyndicated: LiteralUnionScalar<["yes", "no", "verify", "withContributorPayment", "unknown"]>;
|
|
8
8
|
export declare const ImageType: LiteralUnionScalar<["image", "graphic"]>;
|
|
9
9
|
export declare const ClipFormat: LiteralUnionScalar<["standard-inline", "mobile"]>;
|
|
10
|
-
export declare const RichTextSource: LiteralUnionScalar<["standfirst", "summary", "bodyXML"]>;
|
|
10
|
+
export declare const RichTextSource: LiteralUnionScalar<["standfirst", "summary", "bodyXML", "transcript"]>;
|
|
11
11
|
export declare const ContentType: LiteralUnionScalar<["Article", "Placeholder", "Video", "Audio", "LiveBlogPackage", "LiveBlogPost", "ContentPackage", "Content", "MediaResource"]>;
|
|
12
12
|
declare const resolvers: {
|
|
13
13
|
ClipFormat: LiteralUnionScalar<["standard-inline", "mobile"]>;
|
|
@@ -18,7 +18,7 @@ declare const resolvers: {
|
|
|
18
18
|
AccessLevel: LiteralUnionScalar<["premium", "subscribed", "registered", "free"]>;
|
|
19
19
|
CanBeSyndicated: LiteralUnionScalar<["yes", "no", "verify", "withContributorPayment", "unknown"]>;
|
|
20
20
|
ImageType: LiteralUnionScalar<["image", "graphic"]>;
|
|
21
|
-
RichTextSource: LiteralUnionScalar<["standfirst", "summary", "bodyXML"]>;
|
|
21
|
+
RichTextSource: LiteralUnionScalar<["standfirst", "summary", "bodyXML", "transcript"]>;
|
|
22
22
|
ContentType: LiteralUnionScalar<["Article", "Placeholder", "Video", "Audio", "LiveBlogPackage", "LiveBlogPost", "ContentPackage", "Content", "MediaResource"]>;
|
|
23
23
|
};
|
|
24
24
|
export default resolvers;
|
package/lib/resolvers/scalars.js
CHANGED
|
@@ -64,7 +64,7 @@ exports.ClipFormat = new literal_union_1.LiteralUnionScalar({
|
|
|
64
64
|
});
|
|
65
65
|
exports.RichTextSource = new literal_union_1.LiteralUnionScalar({
|
|
66
66
|
name: 'RichTextSource',
|
|
67
|
-
values: ['standfirst', 'summary', 'bodyXML'],
|
|
67
|
+
values: ['standfirst', 'summary', 'bodyXML', 'transcript'],
|
|
68
68
|
});
|
|
69
69
|
exports.ContentType = new literal_union_1.LiteralUnionScalar({
|
|
70
70
|
name: 'ContentType',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalars.js","sourceRoot":"","sources":["../../src/resolvers/scalars.ts"],"names":[],"mappings":";;;AAAA,mDAAoD;AAEvC,QAAA,WAAW,GAAG,IAAI,kCAAkB,CAY/C;IACA,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE;QACN,UAAU;QACV,iBAAiB;QACjB,SAAS;QACT,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,eAAe;QACf,UAAU;QACV,WAAW;KACZ;CACF,CAAC,CAAA;AAEW,QAAA,aAAa,GAAG,IAAI,kCAAkB,CAEjD;IACA,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC;CAC3D,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,IAAI,kCAAkB,CAa1D;IACA,IAAI,EAAE,wBAAwB;IAC9B,MAAM,EAAE;QACN,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,SAAS;QACT,KAAK;QACL,SAAS;KACV;CACF,CAAC,CAAA;AAEW,QAAA,mBAAm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AAgB;IACtB,MAAM,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC;CAC3D,CAAC,CAAA;AAEW,QAAA,WAAW,GAAG,IAAI,kCAAkB,CAY/C;IACA,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE;QACN,SAAS;QACT,aAAa;QACb,OAAO;QACP,OAAO;QACP,iBAAiB;QACjB,cAAc;QACd,gBAAgB;QAChB,SAAS;QACT,eAAe;KAChB;CACF,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG;IAChB,UAAU,EAAV,kBAAU;IACV,WAAW,EAAX,mBAAW;IACX,aAAa,EAAb,qBAAa;IACb,sBAAsB,EAAtB,8BAAsB;IACtB,mBAAmB,EAAnB,2BAAmB;IACnB,WAAW,EAAX,mBAAW;IACX,eAAe,EAAf,uBAAe;IACf,SAAS,EAAT,iBAAS;IACT,cAAc,EAAd,sBAAc;IACd,WAAW,EAAX,mBAAW;CACZ,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/queries/article.graphql
CHANGED
|
@@ -319,6 +319,13 @@ fragment Clip on Clip {
|
|
|
319
319
|
poster
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
fragment Transcript on RichText {
|
|
323
|
+
source
|
|
324
|
+
structured {
|
|
325
|
+
...StructuredTree
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
322
329
|
fragment ClipSet on ClipSet {
|
|
323
330
|
type
|
|
324
331
|
autoplay
|
|
@@ -343,7 +350,9 @@ fragment ClipSet on ClipSet {
|
|
|
343
350
|
url
|
|
344
351
|
mediaType
|
|
345
352
|
}
|
|
346
|
-
transcript
|
|
353
|
+
transcript {
|
|
354
|
+
...Transcript
|
|
355
|
+
}
|
|
347
356
|
}
|
|
348
357
|
}
|
|
349
358
|
|
package/src/generated/index.ts
CHANGED
|
@@ -35,13 +35,13 @@ export type Scalars = {
|
|
|
35
35
|
ImageType: { input: 'image' | 'graphic'; output: 'image' | 'graphic'; }
|
|
36
36
|
JSON: { input: any; output: any; }
|
|
37
37
|
PackageDesign: { input: 'special-report' | 'extra' | 'basic' | 'extra-wide'; output: 'special-report' | 'extra' | 'basic' | 'extra-wide'; }
|
|
38
|
-
RichTextSource: { input: 'standfirst' | 'summary' | 'bodyXML'; output: 'standfirst' | 'summary' | 'bodyXML'; }
|
|
38
|
+
RichTextSource: { input: 'standfirst' | 'summary' | 'bodyXML' | 'transcript'; output: 'standfirst' | 'summary' | 'bodyXML' | 'transcript'; }
|
|
39
39
|
TopperBackgroundColour: { input: 'paper' | 'wheat' | 'white' | 'black' | 'claret' | 'oxford' | 'slate' | 'crimson' | 'sky' | 'matisse'; output: 'paper' | 'wheat' | 'white' | 'black' | 'claret' | 'oxford' | 'slate' | 'crimson' | 'sky' | 'matisse'; }
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export type Accessibility = {
|
|
43
43
|
readonly captions?: Maybe<ReadonlyArray<Maybe<Caption>>>;
|
|
44
|
-
readonly transcript?: Maybe<
|
|
44
|
+
readonly transcript?: Maybe<RichText>;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export type AltStandfirst = {
|
|
@@ -1080,7 +1080,7 @@ export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = R
|
|
|
1080
1080
|
/** Mapping between all available schema types and the resolvers types */
|
|
1081
1081
|
export type ResolversTypes = ResolversObject<{
|
|
1082
1082
|
AccessLevel: ResolverTypeWrapper<Scalars['AccessLevel']['output']>;
|
|
1083
|
-
Accessibility: ResolverTypeWrapper<Accessibility>;
|
|
1083
|
+
Accessibility: ResolverTypeWrapper<Omit<Accessibility, 'transcript'> & { transcript?: Maybe<ResolversTypes['RichText']> }>;
|
|
1084
1084
|
AltStandfirst: ResolverTypeWrapper<AltStandfirst>;
|
|
1085
1085
|
AltTitle: ResolverTypeWrapper<AltTitle>;
|
|
1086
1086
|
Article: ResolverTypeWrapper<CapiResponse>;
|
|
@@ -1165,7 +1165,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1165
1165
|
/** Mapping between all available schema types and the resolvers parents */
|
|
1166
1166
|
export type ResolversParentTypes = ResolversObject<{
|
|
1167
1167
|
AccessLevel: Scalars['AccessLevel']['output'];
|
|
1168
|
-
Accessibility: Accessibility;
|
|
1168
|
+
Accessibility: Omit<Accessibility, 'transcript'> & { transcript?: Maybe<ResolversParentTypes['RichText']> };
|
|
1169
1169
|
AltStandfirst: AltStandfirst;
|
|
1170
1170
|
AltTitle: AltTitle;
|
|
1171
1171
|
Article: CapiResponse;
|
|
@@ -1253,7 +1253,7 @@ export interface AccessLevelScalarConfig extends GraphQLScalarTypeConfig<Resolve
|
|
|
1253
1253
|
|
|
1254
1254
|
export type AccessibilityResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Accessibility'] = ResolversParentTypes['Accessibility']> = ResolversObject<{
|
|
1255
1255
|
captions?: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Caption']>>>, ParentType, ContextType>;
|
|
1256
|
-
transcript?: Resolver<Maybe<ResolversTypes['
|
|
1256
|
+
transcript?: Resolver<Maybe<ResolversTypes['RichText']>, ParentType, ContextType>;
|
|
1257
1257
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
1258
1258
|
}>;
|
|
1259
1259
|
|