@financial-times/cp-content-pipeline-schema 3.3.1 → 3.4.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 +15 -0
- package/lib/fixtures/dummyContext.js +7 -0
- package/lib/fixtures/dummyContext.js.map +1 -1
- package/lib/generated/index.d.ts +20 -5
- package/lib/model/CapiResponse.js +16 -1
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/CapiResponse.test.js +14 -0
- package/lib/model/CapiResponse.test.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +5 -0
- package/lib/model/schemas/capi/audio.d.ts +3 -0
- package/lib/model/schemas/capi/base-schema.d.ts +8 -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 +3 -0
- package/lib/model/schemas/capi/custom-code-component.d.ts +5 -0
- package/lib/model/schemas/capi/index.d.ts +24 -0
- package/lib/model/schemas/capi/live-blog-package.d.ts +5 -0
- package/lib/model/schemas/capi/placeholder.d.ts +5 -0
- package/lib/model/schemas/capi/video.d.ts +3 -0
- package/lib/resolvers/content-tree/references/ClipSet.d.ts +1 -0
- package/lib/resolvers/content-tree/references/ClipSet.js +1 -0
- package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -1
- package/lib/resolvers/index.d.ts +4 -1
- package/lib/resolvers/topper.d.ts +4 -1
- package/lib/resolvers/topper.js +4 -0
- package/lib/resolvers/topper.js.map +1 -1
- package/package.json +1 -1
- package/queries/article.graphql +1 -0
- package/src/fixtures/dummyContext.ts +8 -1
- package/src/generated/index.ts +20 -5
- package/src/model/CapiResponse.test.ts +19 -0
- package/src/model/CapiResponse.ts +17 -1
- package/src/model/schemas/capi/base-schema.ts +1 -0
- package/src/resolvers/content-tree/references/ClipSet.ts +1 -0
- package/src/resolvers/topper.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/references/clipSet.graphql +3 -0
- package/typedefs/topper.graphql +13 -1
|
@@ -1139,6 +1139,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
1139
1139
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
1140
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1141
1141
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1142
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1142
1143
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
1143
1144
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1144
1145
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1224,6 +1225,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
1224
1225
|
caption?: string | undefined;
|
|
1225
1226
|
dataCopyright?: string | undefined;
|
|
1226
1227
|
displayTitle?: string | undefined;
|
|
1228
|
+
systemTitle?: string | undefined;
|
|
1227
1229
|
contentWarning?: string[] | undefined;
|
|
1228
1230
|
noAudio?: boolean | undefined;
|
|
1229
1231
|
source?: string | undefined;
|
|
@@ -1291,6 +1293,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
1291
1293
|
caption?: string | undefined;
|
|
1292
1294
|
dataCopyright?: string | undefined;
|
|
1293
1295
|
displayTitle?: string | undefined;
|
|
1296
|
+
systemTitle?: string | undefined;
|
|
1294
1297
|
contentWarning?: string[] | undefined;
|
|
1295
1298
|
noAudio?: boolean | undefined;
|
|
1296
1299
|
source?: string | undefined;
|
|
@@ -1768,6 +1771,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
1768
1771
|
caption?: string | undefined;
|
|
1769
1772
|
dataCopyright?: string | undefined;
|
|
1770
1773
|
displayTitle?: string | undefined;
|
|
1774
|
+
systemTitle?: string | undefined;
|
|
1771
1775
|
contentWarning?: string[] | undefined;
|
|
1772
1776
|
noAudio?: boolean | undefined;
|
|
1773
1777
|
source?: string | undefined;
|
|
@@ -2050,6 +2054,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
2050
2054
|
caption?: string | undefined;
|
|
2051
2055
|
dataCopyright?: string | undefined;
|
|
2052
2056
|
displayTitle?: string | undefined;
|
|
2057
|
+
systemTitle?: string | undefined;
|
|
2053
2058
|
contentWarning?: string[] | undefined;
|
|
2054
2059
|
noAudio?: boolean | undefined;
|
|
2055
2060
|
source?: string | undefined;
|
|
@@ -3216,6 +3221,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
3216
3221
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3217
3222
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3218
3223
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3224
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3219
3225
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
3220
3226
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3221
3227
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -3301,6 +3307,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
3301
3307
|
caption?: string | undefined;
|
|
3302
3308
|
dataCopyright?: string | undefined;
|
|
3303
3309
|
displayTitle?: string | undefined;
|
|
3310
|
+
systemTitle?: string | undefined;
|
|
3304
3311
|
contentWarning?: string[] | undefined;
|
|
3305
3312
|
noAudio?: boolean | undefined;
|
|
3306
3313
|
source?: string | undefined;
|
|
@@ -3368,6 +3375,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
3368
3375
|
caption?: string | undefined;
|
|
3369
3376
|
dataCopyright?: string | undefined;
|
|
3370
3377
|
displayTitle?: string | undefined;
|
|
3378
|
+
systemTitle?: string | undefined;
|
|
3371
3379
|
contentWarning?: string[] | undefined;
|
|
3372
3380
|
noAudio?: boolean | undefined;
|
|
3373
3381
|
source?: string | undefined;
|
|
@@ -3827,6 +3835,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
3827
3835
|
caption?: string | undefined;
|
|
3828
3836
|
dataCopyright?: string | undefined;
|
|
3829
3837
|
displayTitle?: string | undefined;
|
|
3838
|
+
systemTitle?: string | undefined;
|
|
3830
3839
|
contentWarning?: string[] | undefined;
|
|
3831
3840
|
noAudio?: boolean | undefined;
|
|
3832
3841
|
source?: string | undefined;
|
|
@@ -4091,6 +4100,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
4091
4100
|
caption?: string | undefined;
|
|
4092
4101
|
dataCopyright?: string | undefined;
|
|
4093
4102
|
displayTitle?: string | undefined;
|
|
4103
|
+
systemTitle?: string | undefined;
|
|
4094
4104
|
contentWarning?: string[] | undefined;
|
|
4095
4105
|
noAudio?: boolean | undefined;
|
|
4096
4106
|
source?: string | undefined;
|
|
@@ -5257,6 +5267,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
5257
5267
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5258
5268
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5259
5269
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5270
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5260
5271
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
5261
5272
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
5262
5273
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -5342,6 +5353,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
5342
5353
|
caption?: string | undefined;
|
|
5343
5354
|
dataCopyright?: string | undefined;
|
|
5344
5355
|
displayTitle?: string | undefined;
|
|
5356
|
+
systemTitle?: string | undefined;
|
|
5345
5357
|
contentWarning?: string[] | undefined;
|
|
5346
5358
|
noAudio?: boolean | undefined;
|
|
5347
5359
|
source?: string | undefined;
|
|
@@ -5409,6 +5421,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
5409
5421
|
caption?: string | undefined;
|
|
5410
5422
|
dataCopyright?: string | undefined;
|
|
5411
5423
|
displayTitle?: string | undefined;
|
|
5424
|
+
systemTitle?: string | undefined;
|
|
5412
5425
|
contentWarning?: string[] | undefined;
|
|
5413
5426
|
noAudio?: boolean | undefined;
|
|
5414
5427
|
source?: string | undefined;
|
|
@@ -6962,6 +6975,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
6962
6975
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6963
6976
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6964
6977
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6978
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6965
6979
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6966
6980
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
6967
6981
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -7047,6 +7061,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
7047
7061
|
caption?: string | undefined;
|
|
7048
7062
|
dataCopyright?: string | undefined;
|
|
7049
7063
|
displayTitle?: string | undefined;
|
|
7064
|
+
systemTitle?: string | undefined;
|
|
7050
7065
|
contentWarning?: string[] | undefined;
|
|
7051
7066
|
noAudio?: boolean | undefined;
|
|
7052
7067
|
source?: string | undefined;
|
|
@@ -7114,6 +7129,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
7114
7129
|
caption?: string | undefined;
|
|
7115
7130
|
dataCopyright?: string | undefined;
|
|
7116
7131
|
displayTitle?: string | undefined;
|
|
7132
|
+
systemTitle?: string | undefined;
|
|
7117
7133
|
contentWarning?: string[] | undefined;
|
|
7118
7134
|
noAudio?: boolean | undefined;
|
|
7119
7135
|
source?: string | undefined;
|
|
@@ -8777,6 +8793,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
8777
8793
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8778
8794
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8779
8795
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8796
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8780
8797
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
8781
8798
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
8782
8799
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -8862,6 +8879,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
8862
8879
|
caption?: string | undefined;
|
|
8863
8880
|
dataCopyright?: string | undefined;
|
|
8864
8881
|
displayTitle?: string | undefined;
|
|
8882
|
+
systemTitle?: string | undefined;
|
|
8865
8883
|
contentWarning?: string[] | undefined;
|
|
8866
8884
|
noAudio?: boolean | undefined;
|
|
8867
8885
|
source?: string | undefined;
|
|
@@ -8929,6 +8947,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
8929
8947
|
caption?: string | undefined;
|
|
8930
8948
|
dataCopyright?: string | undefined;
|
|
8931
8949
|
displayTitle?: string | undefined;
|
|
8950
|
+
systemTitle?: string | undefined;
|
|
8932
8951
|
contentWarning?: string[] | undefined;
|
|
8933
8952
|
noAudio?: boolean | undefined;
|
|
8934
8953
|
source?: string | undefined;
|
|
@@ -9263,6 +9282,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
9263
9282
|
caption?: string | undefined;
|
|
9264
9283
|
dataCopyright?: string | undefined;
|
|
9265
9284
|
displayTitle?: string | undefined;
|
|
9285
|
+
systemTitle?: string | undefined;
|
|
9266
9286
|
contentWarning?: string[] | undefined;
|
|
9267
9287
|
noAudio?: boolean | undefined;
|
|
9268
9288
|
source?: string | undefined;
|
|
@@ -9402,6 +9422,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
9402
9422
|
caption?: string | undefined;
|
|
9403
9423
|
dataCopyright?: string | undefined;
|
|
9404
9424
|
displayTitle?: string | undefined;
|
|
9425
|
+
systemTitle?: string | undefined;
|
|
9405
9426
|
contentWarning?: string[] | undefined;
|
|
9406
9427
|
noAudio?: boolean | undefined;
|
|
9407
9428
|
source?: string | undefined;
|
|
@@ -10576,6 +10597,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
10576
10597
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10577
10598
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10578
10599
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10600
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10579
10601
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
10580
10602
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
10581
10603
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -10661,6 +10683,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
10661
10683
|
caption?: string | undefined;
|
|
10662
10684
|
dataCopyright?: string | undefined;
|
|
10663
10685
|
displayTitle?: string | undefined;
|
|
10686
|
+
systemTitle?: string | undefined;
|
|
10664
10687
|
contentWarning?: string[] | undefined;
|
|
10665
10688
|
noAudio?: boolean | undefined;
|
|
10666
10689
|
source?: string | undefined;
|
|
@@ -10728,6 +10751,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
|
|
|
10728
10751
|
caption?: string | undefined;
|
|
10729
10752
|
dataCopyright?: string | undefined;
|
|
10730
10753
|
displayTitle?: string | undefined;
|
|
10754
|
+
systemTitle?: string | undefined;
|
|
10731
10755
|
contentWarning?: string[] | undefined;
|
|
10732
10756
|
noAudio?: boolean | undefined;
|
|
10733
10757
|
source?: string | undefined;
|
|
@@ -1137,6 +1137,7 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
|
|
|
1137
1137
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1138
1138
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1139
1139
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
1141
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
1141
1142
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1142
1143
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1222,6 +1223,7 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
|
|
|
1222
1223
|
caption?: string | undefined;
|
|
1223
1224
|
dataCopyright?: string | undefined;
|
|
1224
1225
|
displayTitle?: string | undefined;
|
|
1226
|
+
systemTitle?: string | undefined;
|
|
1225
1227
|
contentWarning?: string[] | undefined;
|
|
1226
1228
|
noAudio?: boolean | undefined;
|
|
1227
1229
|
source?: string | undefined;
|
|
@@ -1289,6 +1291,7 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
|
|
|
1289
1291
|
caption?: string | undefined;
|
|
1290
1292
|
dataCopyright?: string | undefined;
|
|
1291
1293
|
displayTitle?: string | undefined;
|
|
1294
|
+
systemTitle?: string | undefined;
|
|
1292
1295
|
contentWarning?: string[] | undefined;
|
|
1293
1296
|
noAudio?: boolean | undefined;
|
|
1294
1297
|
source?: string | undefined;
|
|
@@ -1748,6 +1751,7 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
|
|
|
1748
1751
|
caption?: string | undefined;
|
|
1749
1752
|
dataCopyright?: string | undefined;
|
|
1750
1753
|
displayTitle?: string | undefined;
|
|
1754
|
+
systemTitle?: string | undefined;
|
|
1751
1755
|
contentWarning?: string[] | undefined;
|
|
1752
1756
|
noAudio?: boolean | undefined;
|
|
1753
1757
|
source?: string | undefined;
|
|
@@ -2012,6 +2016,7 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
|
|
|
2012
2016
|
caption?: string | undefined;
|
|
2013
2017
|
dataCopyright?: string | undefined;
|
|
2014
2018
|
displayTitle?: string | undefined;
|
|
2019
|
+
systemTitle?: string | undefined;
|
|
2015
2020
|
contentWarning?: string[] | undefined;
|
|
2016
2021
|
noAudio?: boolean | undefined;
|
|
2017
2022
|
source?: string | undefined;
|
|
@@ -1137,6 +1137,7 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
|
|
|
1137
1137
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1138
1138
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1139
1139
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
1141
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
1141
1142
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1142
1143
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1222,6 +1223,7 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
|
|
|
1222
1223
|
caption?: string | undefined;
|
|
1223
1224
|
dataCopyright?: string | undefined;
|
|
1224
1225
|
displayTitle?: string | undefined;
|
|
1226
|
+
systemTitle?: string | undefined;
|
|
1225
1227
|
contentWarning?: string[] | undefined;
|
|
1226
1228
|
noAudio?: boolean | undefined;
|
|
1227
1229
|
source?: string | undefined;
|
|
@@ -1289,6 +1291,7 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
|
|
|
1289
1291
|
caption?: string | undefined;
|
|
1290
1292
|
dataCopyright?: string | undefined;
|
|
1291
1293
|
displayTitle?: string | undefined;
|
|
1294
|
+
systemTitle?: string | undefined;
|
|
1292
1295
|
contentWarning?: string[] | undefined;
|
|
1293
1296
|
noAudio?: boolean | undefined;
|
|
1294
1297
|
source?: string | undefined;
|
|
@@ -1766,6 +1769,7 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
|
|
|
1766
1769
|
caption?: string | undefined;
|
|
1767
1770
|
dataCopyright?: string | undefined;
|
|
1768
1771
|
displayTitle?: string | undefined;
|
|
1772
|
+
systemTitle?: string | undefined;
|
|
1769
1773
|
contentWarning?: string[] | undefined;
|
|
1770
1774
|
noAudio?: boolean | undefined;
|
|
1771
1775
|
source?: string | undefined;
|
|
@@ -2048,6 +2052,7 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
|
|
|
2048
2052
|
caption?: string | undefined;
|
|
2049
2053
|
dataCopyright?: string | undefined;
|
|
2050
2054
|
displayTitle?: string | undefined;
|
|
2055
|
+
systemTitle?: string | undefined;
|
|
2051
2056
|
contentWarning?: string[] | undefined;
|
|
2052
2057
|
noAudio?: boolean | undefined;
|
|
2053
2058
|
source?: string | undefined;
|
|
@@ -1137,6 +1137,7 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
|
|
|
1137
1137
|
dataCopyright: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1138
1138
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1139
1139
|
displayTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
|
+
systemTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
1141
|
contentWarning: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
1141
1142
|
noAudio: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1142
1143
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1222,6 +1223,7 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
|
|
|
1222
1223
|
caption?: string | undefined;
|
|
1223
1224
|
dataCopyright?: string | undefined;
|
|
1224
1225
|
displayTitle?: string | undefined;
|
|
1226
|
+
systemTitle?: string | undefined;
|
|
1225
1227
|
contentWarning?: string[] | undefined;
|
|
1226
1228
|
noAudio?: boolean | undefined;
|
|
1227
1229
|
source?: string | undefined;
|
|
@@ -1289,6 +1291,7 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
|
|
|
1289
1291
|
caption?: string | undefined;
|
|
1290
1292
|
dataCopyright?: string | undefined;
|
|
1291
1293
|
displayTitle?: string | undefined;
|
|
1294
|
+
systemTitle?: string | undefined;
|
|
1292
1295
|
contentWarning?: string[] | undefined;
|
|
1293
1296
|
noAudio?: boolean | undefined;
|
|
1294
1297
|
source?: string | undefined;
|
|
@@ -20,6 +20,7 @@ export declare const ClipSet: {
|
|
|
20
20
|
description: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
21
21
|
credits: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string;
|
|
22
22
|
displayTitle: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string | null;
|
|
23
|
+
systemTitle: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string | null;
|
|
23
24
|
contentWarning: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string[] | null;
|
|
24
25
|
source: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string | null;
|
|
25
26
|
subtitle: (parent: ReferenceWithCAPIData<OldClipContentTree | ClipSetWorkaroundContentTree>) => string | null;
|
|
@@ -43,6 +43,7 @@ exports.ClipSet = {
|
|
|
43
43
|
credits: (parent) => parent.reference.credits ??
|
|
44
44
|
getClipSet(parent)?.dataCopyright,
|
|
45
45
|
displayTitle: (parent) => getClipSet(parent)?.displayTitle || null,
|
|
46
|
+
systemTitle: (parent) => getClipSet(parent)?.systemTitle || null,
|
|
46
47
|
contentWarning: (parent) => getClipSet(parent)?.contentWarning || null,
|
|
47
48
|
source: (parent) => getClipSet(parent)?.source || null,
|
|
48
49
|
subtitle: (parent) => getClipSet(parent)?.subtitle || null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipSet.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/ClipSet.ts"],"names":[],"mappings":";;;AAIA,wDAAuD;AACvD,8CAA0C;AAC1C,sDAAkD;AAQlD,SAAS,UAAU,CACjB,MAEC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAc;QACpC,EAAE,MAAM,EAAE;QACV,EAAE,MAAM,CACN,CAAC,QAAQ,EAAE,EAAE,CACX,QAAQ,CAAC,IAAI,KAAK,4CAA4C,CACjE,CAAA;IAEH,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,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA;IAEzE,OAAO,OAAO,CAAA;AAChB,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,yEAAyE;IACzE,EAAE,EAAE,CAAC,MAAM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Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<boolean>>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
|
197
197
|
};
|
|
198
198
|
PartnerContentTopper: {
|
|
199
|
-
|
|
199
|
+
isLargeHeadline: (topper: import("../model/Topper").Topper) => boolean;
|
|
200
|
+
layout: (topper: import("../model/Topper").Topper) => string;
|
|
201
|
+
fallbackImage: (topper: import("../model/Topper").Topper) => import("../model/Image").CAPIImage | null;
|
|
202
|
+
images: (topper: import("../model/Topper").Topper) => import("../model/Image").CAPIImage[];
|
|
200
203
|
__resolveType?: import("../generated").TypeResolveFn<"DeepPortraitTopper" | "DeepLandscapeTopper" | "SplitTextTopper" | "FullBleedTopper" | "PodcastTopper" | "OpinionTopper" | "BrandedTopper" | "BasicTopper" | "TopperWithFlourish" | "PartnerContentTopper", import("../model/Topper").Topper, import("..").QueryContext> | undefined;
|
|
201
204
|
backgroundBox: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<boolean>>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
|
202
205
|
backgroundColour: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<"paper" | "wheat" | "white" | "black" | "claret" | "oxford" | "slate" | "crimson" | "sky" | "matisse">>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
|
@@ -166,7 +166,10 @@ declare const resolvers: {
|
|
|
166
166
|
textShadow: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<boolean>>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
|
167
167
|
};
|
|
168
168
|
PartnerContentTopper: {
|
|
169
|
-
|
|
169
|
+
isLargeHeadline: (topper: import("../model/Topper").Topper) => boolean;
|
|
170
|
+
layout: (topper: import("../model/Topper").Topper) => string;
|
|
171
|
+
fallbackImage: (topper: import("../model/Topper").Topper) => import("../model/Image").CAPIImage | null;
|
|
172
|
+
images: (topper: import("../model/Topper").Topper) => import("../model/Image").CAPIImage[];
|
|
170
173
|
__resolveType?: import("../generated").TypeResolveFn<"DeepPortraitTopper" | "DeepLandscapeTopper" | "SplitTextTopper" | "FullBleedTopper" | "PodcastTopper" | "OpinionTopper" | "BrandedTopper" | "BasicTopper" | "TopperWithFlourish" | "PartnerContentTopper", import("../model/Topper").Topper, import("..").QueryContext> | undefined;
|
|
171
174
|
backgroundBox: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<boolean>>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
|
172
175
|
backgroundColour: import("../generated").Resolver<import("../generated").Maybe<import("../generated").ResolverTypeWrapper<"paper" | "wheat" | "white" | "black" | "claret" | "oxford" | "slate" | "crimson" | "sky" | "matisse">>, import("../model/Topper").Topper, import("..").QueryContext, {}>;
|
package/lib/resolvers/topper.js
CHANGED
|
@@ -99,6 +99,10 @@ const resolvers = {
|
|
|
99
99
|
},
|
|
100
100
|
PartnerContentTopper: {
|
|
101
101
|
...topperResolvers,
|
|
102
|
+
isLargeHeadline: (topper) => topper.isLargeHeadline(),
|
|
103
|
+
layout: (topper) => topper.layout(),
|
|
104
|
+
fallbackImage: (topper) => topper.fallbackImage(),
|
|
105
|
+
images: (topper) => topper.images(),
|
|
102
106
|
},
|
|
103
107
|
};
|
|
104
108
|
exports.default = resolvers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topper.js","sourceRoot":"","sources":["../../src/resolvers/topper.ts"],"names":[],"mappings":";;AAmBA,MAAM,eAAe,GAAoB;IACvC,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;IACjD,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE;IACvD,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE;IACnD,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,mBAA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E,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK;QACzC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE;QAC/C,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE;QACrD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;QACnC,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;QACjD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;KACpC;IAED,oBAAoB,EAAE;QACpB,GAAG,eAAe;QAClB,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE;QACrD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;QACnC,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;QACjD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;KACpC;CAkBF,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/queries/article.graphql
CHANGED
|
@@ -4,7 +4,7 @@ import cloneDeep from 'clone-deep'
|
|
|
4
4
|
import { QueryContext } from '..'
|
|
5
5
|
const now = Date.now()
|
|
6
6
|
|
|
7
|
-
const addSurrogateKeys = (ids: {prefix: string
|
|
7
|
+
const addSurrogateKeys = (ids: { prefix: string; id: string }[]) => {
|
|
8
8
|
const keys = []
|
|
9
9
|
keys.push(...ids)
|
|
10
10
|
}
|
|
@@ -31,4 +31,11 @@ export default {
|
|
|
31
31
|
),
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
+
logger: {
|
|
35
|
+
debug: jest.fn(),
|
|
36
|
+
error: jest.fn(),
|
|
37
|
+
fatal: jest.fn(),
|
|
38
|
+
info: jest.fn(),
|
|
39
|
+
warn: jest.fn(),
|
|
40
|
+
},
|
|
34
41
|
} as unknown as QueryContext
|
package/src/generated/index.ts
CHANGED
|
@@ -361,6 +361,8 @@ export type ClipSet = Reference & {
|
|
|
361
361
|
readonly source?: Maybe<Scalars['String']['output']>;
|
|
362
362
|
/** The subtitle of the clip set. */
|
|
363
363
|
readonly subtitle?: Maybe<Scalars['String']['output']>;
|
|
364
|
+
/** The title to be used internally for the clip set. */
|
|
365
|
+
readonly systemTitle?: Maybe<Scalars['String']['output']>;
|
|
364
366
|
/** The type of the clip set, eg. 'video'. */
|
|
365
367
|
readonly type: Scalars['String']['output'];
|
|
366
368
|
};
|
|
@@ -1310,21 +1312,29 @@ export type OpinionTopperHeadshotArgs = {
|
|
|
1310
1312
|
width?: InputMaybe<Scalars['Int']['input']>;
|
|
1311
1313
|
};
|
|
1312
1314
|
|
|
1313
|
-
export type PartnerContentTopper = Topper & {
|
|
1315
|
+
export type PartnerContentTopper = Topper & TopperWithImages & TopperWithTheme & {
|
|
1314
1316
|
/** Whether the topper should have a background box. */
|
|
1315
1317
|
readonly backgroundBox?: Maybe<Scalars['Boolean']['output']>;
|
|
1316
1318
|
/** The background colour of the topper. */
|
|
1317
1319
|
readonly backgroundColour?: Maybe<Scalars['TopperBackgroundColour']['output']>;
|
|
1318
1320
|
/** The concept object to be displayed, eg. {'type': 'TOPIC', 'prefLabel': 'Non-dom tax status', ...}. */
|
|
1319
1321
|
readonly displayConcept?: Maybe<Concept>;
|
|
1322
|
+
/** A fallback image to be used if the 'images' are not availableimages: [Image!]!. */
|
|
1323
|
+
readonly fallbackImage?: Maybe<Image>;
|
|
1320
1324
|
/** The variant of the follow button to be displayed on the topper. */
|
|
1321
1325
|
readonly followButtonVariant?: Maybe<Scalars['FollowButtonVariant']['output']>;
|
|
1322
1326
|
/** The concept object of the genre, eg. {'type': 'GENRE', 'prefLabel': 'Opinion', ...}. */
|
|
1323
1327
|
readonly genreConcept?: Maybe<Concept>;
|
|
1324
1328
|
/** The headline text of the topper. */
|
|
1325
1329
|
readonly headline: Scalars['String']['output'];
|
|
1330
|
+
/** An array of images to be displayed on the topper. */
|
|
1331
|
+
readonly images: ReadonlyArray<Image>;
|
|
1326
1332
|
/** An abstract syntax tree of the introduction text. */
|
|
1327
1333
|
readonly intro?: Maybe<RichText>;
|
|
1334
|
+
/** Whether the headline should be large. */
|
|
1335
|
+
readonly isLargeHeadline?: Maybe<Scalars['Boolean']['output']>;
|
|
1336
|
+
/** The layout of the topper, eg. 'split-text-left'. */
|
|
1337
|
+
readonly layout?: Maybe<Scalars['String']['output']>;
|
|
1328
1338
|
/** Whether the topper should have a text shadow. */
|
|
1329
1339
|
readonly textShadow?: Maybe<Scalars['Boolean']['output']>;
|
|
1330
1340
|
};
|
|
@@ -1939,9 +1949,9 @@ export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = R
|
|
|
1939
1949
|
Topper: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1940
1950
|
TopperWithBrand: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1941
1951
|
TopperWithHeadshot: ( TopperModel ) | ( TopperModel );
|
|
1942
|
-
TopperWithImages: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1952
|
+
TopperWithImages: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1943
1953
|
TopperWithPackage: ( TopperModel );
|
|
1944
|
-
TopperWithTheme: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1954
|
+
TopperWithTheme: ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel ) | ( TopperModel );
|
|
1945
1955
|
}>;
|
|
1946
1956
|
|
|
1947
1957
|
/** Mapping between all available schema types and the resolvers types */
|
|
@@ -2314,6 +2324,7 @@ export type ClipSetResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2314
2324
|
publishedDate: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2315
2325
|
source: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2316
2326
|
subtitle: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2327
|
+
systemTitle: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2317
2328
|
type: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2318
2329
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2319
2330
|
}>;
|
|
@@ -2836,10 +2847,14 @@ export type PartnerContentTopperResolvers<ContextType = QueryContext, ParentType
|
|
|
2836
2847
|
backgroundBox: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2837
2848
|
backgroundColour: Resolver<Maybe<ResolversTypes['TopperBackgroundColour']>, ParentType, ContextType>;
|
|
2838
2849
|
displayConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2850
|
+
fallbackImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2839
2851
|
followButtonVariant: Resolver<Maybe<ResolversTypes['FollowButtonVariant']>, ParentType, ContextType>;
|
|
2840
2852
|
genreConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2841
2853
|
headline: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2854
|
+
images: Resolver<ReadonlyArray<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2842
2855
|
intro: Resolver<Maybe<ResolversTypes['RichText']>, ParentType, ContextType>;
|
|
2856
|
+
isLargeHeadline: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2857
|
+
layout: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2843
2858
|
textShadow: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2844
2859
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2845
2860
|
}>;
|
|
@@ -3089,7 +3104,7 @@ export type TopperWithHeadshotResolvers<ContextType = QueryContext, ParentType e
|
|
|
3089
3104
|
}>;
|
|
3090
3105
|
|
|
3091
3106
|
export type TopperWithImagesResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['TopperWithImages'] = ResolversParentTypes['TopperWithImages']> = ResolversObject<{
|
|
3092
|
-
__resolveType?: TypeResolveFn<'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'SplitTextTopper', ParentType, ContextType>;
|
|
3107
|
+
__resolveType?: TypeResolveFn<'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'PartnerContentTopper' | 'SplitTextTopper', ParentType, ContextType>;
|
|
3093
3108
|
fallbackImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
3094
3109
|
images: Resolver<ReadonlyArray<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
3095
3110
|
}>;
|
|
@@ -3100,7 +3115,7 @@ export type TopperWithPackageResolvers<ContextType = QueryContext, ParentType ex
|
|
|
3100
3115
|
}>;
|
|
3101
3116
|
|
|
3102
3117
|
export type TopperWithThemeResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['TopperWithTheme'] = ResolversParentTypes['TopperWithTheme']> = ResolversObject<{
|
|
3103
|
-
__resolveType?: TypeResolveFn<'BrandedTopper' | 'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'OpinionTopper' | 'PodcastTopper' | 'SplitTextTopper' | 'TopperWithFlourish', ParentType, ContextType>;
|
|
3118
|
+
__resolveType?: TypeResolveFn<'BrandedTopper' | 'DeepLandscapeTopper' | 'DeepPortraitTopper' | 'FullBleedTopper' | 'OpinionTopper' | 'PartnerContentTopper' | 'PodcastTopper' | 'SplitTextTopper' | 'TopperWithFlourish', ParentType, ContextType>;
|
|
3104
3119
|
isLargeHeadline: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
3105
3120
|
layout: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
3106
3121
|
}>;
|
|
@@ -2,6 +2,7 @@ import { CapiResponse } from './CapiResponse'
|
|
|
2
2
|
import { baseCapiObject } from '../fixtures/capiObject'
|
|
3
3
|
import cloneDeep from 'clone-deep'
|
|
4
4
|
import context from '../fixtures/dummyContext'
|
|
5
|
+
import TimeoutError from '../helpers/timeout-error'
|
|
5
6
|
|
|
6
7
|
describe('CAPI response', () => {
|
|
7
8
|
describe('Content ID', () => {
|
|
@@ -128,4 +129,22 @@ describe('CAPI response', () => {
|
|
|
128
129
|
expect(capiResponse.isPartnerContent()).toBe(false)
|
|
129
130
|
})
|
|
130
131
|
})
|
|
132
|
+
|
|
133
|
+
describe('Graceful timeouts', () => {
|
|
134
|
+
test('should be able to return limited Person data if CAPI Person API times out', async () => {
|
|
135
|
+
const article = cloneDeep(baseCapiObject)
|
|
136
|
+
const authorAnnotation = article.annotations[2]!
|
|
137
|
+
|
|
138
|
+
const timingOutContext = cloneDeep(context)
|
|
139
|
+
timingOutContext.dataSources.capi.getPerson = () =>
|
|
140
|
+
Promise.reject(new TimeoutError(0))
|
|
141
|
+
const capiResponse = new CapiResponse(article, timingOutContext)
|
|
142
|
+
|
|
143
|
+
const authors = await capiResponse.authors()
|
|
144
|
+
const primaryAuthor = await capiResponse.primaryAuthor()
|
|
145
|
+
|
|
146
|
+
expect(authors[0]).toEqual(primaryAuthor)
|
|
147
|
+
expect(primaryAuthor?.['person'].id).toBe(authorAnnotation.id)
|
|
148
|
+
})
|
|
149
|
+
})
|
|
131
150
|
})
|
|
@@ -301,7 +301,23 @@ export class CapiResponse {
|
|
|
301
301
|
})[0]
|
|
302
302
|
|
|
303
303
|
if (primaryAuthor) {
|
|
304
|
-
|
|
304
|
+
try {
|
|
305
|
+
return await this.context.dataSources.capi.getPerson(
|
|
306
|
+
primaryAuthor.uuid()
|
|
307
|
+
)
|
|
308
|
+
} catch (error) {
|
|
309
|
+
if (isError(error)) {
|
|
310
|
+
this.context.logger.warn({
|
|
311
|
+
event: 'RECOVERABLE_ERROR',
|
|
312
|
+
error: new OperationalError({
|
|
313
|
+
message: `Error fetching CAPI Person for primary author ${primaryAuthor.prefLabel()}`,
|
|
314
|
+
code: 'PRIMARY_AUTHOR_PERSON_FETCH_ERROR',
|
|
315
|
+
cause: error,
|
|
316
|
+
}),
|
|
317
|
+
})
|
|
318
|
+
}
|
|
319
|
+
return Person.fromConcept(primaryAuthor, this.context)
|
|
320
|
+
}
|
|
305
321
|
}
|
|
306
322
|
|
|
307
323
|
return null
|
|
@@ -123,6 +123,7 @@ export const ClipSet = z.object({
|
|
|
123
123
|
dataCopyright: z.string().optional(),
|
|
124
124
|
description: z.string().optional(),
|
|
125
125
|
displayTitle: z.string().optional(),
|
|
126
|
+
systemTitle: z.string().optional(),
|
|
126
127
|
contentWarning: z.string().array().optional(),
|
|
127
128
|
noAudio: z.boolean().optional(),
|
|
128
129
|
source: z.string().optional(),
|
|
@@ -67,6 +67,7 @@ export const ClipSet = {
|
|
|
67
67
|
(parent.reference as OldClipContentTree).credits ??
|
|
68
68
|
getClipSet(parent)?.dataCopyright,
|
|
69
69
|
displayTitle: (parent) => getClipSet(parent)?.displayTitle || null,
|
|
70
|
+
systemTitle: (parent) => getClipSet(parent)?.systemTitle || null,
|
|
70
71
|
contentWarning: (parent) => getClipSet(parent)?.contentWarning || null,
|
|
71
72
|
source: (parent) => getClipSet(parent)?.source || null,
|
|
72
73
|
subtitle: (parent) => getClipSet(parent)?.subtitle || null,
|
package/src/resolvers/topper.ts
CHANGED
|
@@ -132,6 +132,10 @@ const resolvers = {
|
|
|
132
132
|
|
|
133
133
|
PartnerContentTopper: {
|
|
134
134
|
...topperResolvers,
|
|
135
|
+
isLargeHeadline: (topper) => topper.isLargeHeadline(),
|
|
136
|
+
layout: (topper) => topper.layout(),
|
|
137
|
+
fallbackImage: (topper) => topper.fallbackImage(),
|
|
138
|
+
images: (topper) => topper.images(),
|
|
135
139
|
},
|
|
136
140
|
} satisfies {
|
|
137
141
|
Topper: TopperResolvers
|