@financial-times/cp-content-pipeline-schema 2.10.0 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.10.2](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v2.10.1...cp-content-pipeline-schema-v2.10.2) (2024-06-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * recursively get PrefixingKeyValueCache prefixes ([bd68a64](https://github.com/Financial-Times/cp-content-pipeline/commit/bd68a643357cdfcf7ed79342efcfdab18487e331))
9
+
10
+ ## [2.10.1](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v2.10.0...cp-content-pipeline-schema-v2.10.1) (2024-06-03)
11
+
12
+
13
+ ### Reverts
14
+
15
+ * don't use package.json exports for schema ([d73f6b2](https://github.com/Financial-Times/cp-content-pipeline/commit/d73f6b2600e3c01b258fccf75923e0c2ef155f5c))
16
+
3
17
  ## [2.10.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v2.9.2...cp-content-pipeline-schema-v2.10.0) (2024-05-28)
4
18
 
5
19
 
@@ -14,4 +14,5 @@ export declare class CapiDataSource extends InstrumentedRESTDataSource {
14
14
  willSendRequest(path: string, request: AugmentedRequest): void;
15
15
  getContent(uuid: string, packageContainer?: CapiResponse): Promise<CapiResponse>;
16
16
  getPerson(uuid: string): Promise<CapiPerson>;
17
+ getHTTPCacheKeyForContent(uuid: string): Promise<string>;
17
18
  }
@@ -4,6 +4,13 @@ exports.CapiDataSource = void 0;
4
4
  const CapiResponse_1 = require("../model/CapiResponse");
5
5
  const instrumented_1 = require("./instrumented");
6
6
  const REQUEST_TIMEOUT = 5000; // 5 seconds
7
+ const isPrefixing = (cache) => 'prefix' in cache;
8
+ function getWrappedCacheKey(cache) {
9
+ if (isPrefixing(cache)) {
10
+ return getWrappedCacheKey(cache['wrapped']) + cache['prefix'];
11
+ }
12
+ return '';
13
+ }
7
14
  class CapiDataSource extends instrumented_1.InstrumentedRESTDataSource {
8
15
  constructor() {
9
16
  super(...arguments);
@@ -42,6 +49,16 @@ class CapiDataSource extends instrumented_1.InstrumentedRESTDataSource {
42
49
  cacheOptions: { ttl: this.peopleCacheTTL },
43
50
  });
44
51
  }
52
+ // replicates the logic implicit in PrefixingKeyValueCache to
53
+ // construct a cache key for an article used to purge Redis
54
+ async getHTTPCacheKeyForContent(uuid) {
55
+ const dummyRequest = {
56
+ params: new URLSearchParams(),
57
+ headers: {},
58
+ };
59
+ const cacheKey = this.cacheKeyFor(await this.resolveURL(`internalcontent/${uuid}`, dummyRequest));
60
+ return `${getWrappedCacheKey(this.httpCache['keyValueCache'])}${cacheKey}`;
61
+ }
45
62
  }
46
63
  exports.CapiDataSource = CapiDataSource;
47
64
  //# sourceMappingURL=capi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capi.js","sourceRoot":"","sources":["../../src/datasources/capi.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AACpD,iDAA2D;AAI3D,MAAM,eAAe,GAAG,IAAI,CAAA,CAAC,YAAY;AAEzC,MAAa,cAAe,SAAQ,yCAA0B;IAA9D;;QACE,YAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,uBAAuB,CAAA;QACzD,YAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAA;QACxC,oBAAe,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB;YAC7C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;YACzC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAA,CAAC,UAAU;QACnC,mBAAc,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB;YAC3C,CAAC,CAAC,QAAQ,CAAC,OAAO,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AAE;YAC7B,OAAO,EAAE,EAAE;SACZ,CAAA;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAC/B,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,EAAE,EAAE,YAAY,CAAC,CAC/D,CAAA;QAED,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAA;IAC5E,CAAC;CACF;AAjED,wCAiEC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const logger_1 = require("@dotcom-reliability-kit/logger");
4
+ const capi_1 = require("./capi");
5
+ const CapiResponse_1 = require("../model/CapiResponse");
6
+ const logger = new logger_1.Logger();
7
+ const metrics = { count: jest.fn() };
8
+ describe('CapiDataSource', () => {
9
+ describe('cache keys', () => {
10
+ it('should return the same cache key that it actually stored in the cache', async () => {
11
+ const id = '00000000-0000-0000-0000-000000000000';
12
+ const cache = {
13
+ get: jest.fn(),
14
+ set: jest.fn(),
15
+ delete: jest.fn(),
16
+ };
17
+ const capi = new capi_1.CapiDataSource({
18
+ cache,
19
+ context: {
20
+ versions: { api: '1.0.0', schema: '1.0.0' },
21
+ logger,
22
+ metrics,
23
+ },
24
+ });
25
+ jest.spyOn(global, 'fetch').mockResolvedValue(new Response(JSON.stringify({ id }), {
26
+ headers: new Headers([['content-type', 'application/json']]),
27
+ }));
28
+ jest
29
+ .spyOn(CapiResponse_1.CapiResponse, 'fromJSON')
30
+ .mockImplementation((content, context) => new CapiResponse_1.CapiResponse(content, context));
31
+ await capi.getContent(id);
32
+ expect(cache.set).toBeCalled();
33
+ await expect(capi.getHTTPCacheKeyForContent(id)).resolves.toBe(cache.set.mock.lastCall?.[0]);
34
+ });
35
+ });
36
+ afterAll(() => {
37
+ jest.resetAllMocks();
38
+ });
39
+ });
40
+ //# sourceMappingURL=capi.test.js.map
@@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C,CAC3D,CAAA;YAEH,MAAM,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;YAEzB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;YAC9B,MAAM,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAC5D,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAC7B,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,11 +1,50 @@
1
- export declare const articleSchema: import("zod").ZodObject<{
2
- id: import("zod").ZodString;
3
- type: import("zod").ZodOptional<import("zod").ZodString>;
4
- types: import("zod").ZodArray<import("zod").ZodString, "many">;
5
- standfirst: import("zod").ZodOptional<import("zod").ZodString>;
1
+ export declare const articleSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<Pick<{
6
2
  title: import("zod").ZodString;
7
- publishedDate: import("zod").ZodString;
8
- annotations: import("zod").ZodArray<import("zod").ZodObject<{
3
+ standfirst: import("zod").ZodOptional<import("zod").ZodString>;
4
+ byline: import("zod").ZodOptional<import("zod").ZodString>;
5
+ bodyXML: import("zod").ZodString;
6
+ summary: import("zod").ZodObject<{
7
+ bodyXML: import("zod").ZodString;
8
+ }, "strip", import("zod").ZodTypeAny, {
9
+ bodyXML: string;
10
+ }, {
11
+ bodyXML: string;
12
+ }>;
13
+ alternativeTitles: import("zod").ZodOptional<import("zod").ZodObject<{
14
+ promotionalTitle: import("zod").ZodString;
15
+ }, "strip", import("zod").ZodTypeAny, {
16
+ promotionalTitle: string;
17
+ }, {
18
+ promotionalTitle: string;
19
+ }>>;
20
+ alternativeStandfirsts: import("zod").ZodOptional<import("zod").ZodObject<{
21
+ promotionalStandfirst: import("zod").ZodOptional<import("zod").ZodString>;
22
+ }, "strip", import("zod").ZodTypeAny, {
23
+ promotionalStandfirst?: string | undefined;
24
+ }, {
25
+ promotionalStandfirst?: string | undefined;
26
+ }>>;
27
+ pinnedPosts: import("zod").ZodArray<import("zod").ZodString, "many">;
28
+ contains: import("zod").ZodArray<import("zod").ZodObject<{
29
+ id: import("zod").ZodString;
30
+ apiUrl: import("zod").ZodString;
31
+ }, "strip", import("zod").ZodTypeAny, {
32
+ id: string;
33
+ apiUrl: string;
34
+ }, {
35
+ id: string;
36
+ apiUrl: string;
37
+ }>, "many">;
38
+ design: import("zod").ZodObject<{
39
+ theme: import("zod").ZodUnion<[import("zod").ZodLiteral<"special-report">, import("zod").ZodLiteral<"extra">, import("zod").ZodLiteral<"basic">, import("zod").ZodLiteral<"extra-wide">]>;
40
+ }, "strip", import("zod").ZodTypeAny, {
41
+ theme: "special-report" | "extra" | "basic" | "extra-wide";
42
+ }, {
43
+ theme: "special-report" | "extra" | "basic" | "extra-wide";
44
+ }>;
45
+ }, "standfirst" | "title" | "byline" | "bodyXML" | "alternativeTitles" | "alternativeStandfirsts">, Pick<{
46
+ id: import("zod").ZodString;
47
+ annotations: import("zod").ZodArray<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9
48
  id: import("zod").ZodString;
10
49
  apiUrl: import("zod").ZodString;
11
50
  directType: import("zod").ZodString;
@@ -13,8 +52,9 @@ export declare const articleSchema: import("zod").ZodObject<{
13
52
  type: import("zod").ZodOptional<import("zod").ZodString>;
14
53
  types: import("zod").ZodArray<import("zod").ZodString, "many">;
15
54
  headshot: import("zod").ZodOptional<import("zod").ZodString>;
55
+ }, {
16
56
  predicate: import("zod").ZodString;
17
- }, "strip", import("zod").ZodTypeAny, {
57
+ }>, "strip", import("zod").ZodTypeAny, {
18
58
  id: string;
19
59
  apiUrl: string;
20
60
  directType: string;
@@ -35,6 +75,8 @@ export declare const articleSchema: import("zod").ZodObject<{
35
75
  }>, "many">;
36
76
  webUrl: import("zod").ZodOptional<import("zod").ZodString>;
37
77
  canonicalWebUrl: import("zod").ZodOptional<import("zod").ZodString>;
78
+ type: import("zod").ZodOptional<import("zod").ZodString>;
79
+ types: import("zod").ZodArray<import("zod").ZodString, "many">;
38
80
  standout: import("zod").ZodOptional<import("zod").ZodObject<{
39
81
  editorsChoice: import("zod").ZodBoolean;
40
82
  exclusive: import("zod").ZodBoolean;
@@ -48,7 +90,9 @@ export declare const articleSchema: import("zod").ZodObject<{
48
90
  exclusive: boolean;
49
91
  scoop: boolean;
50
92
  }>>;
93
+ publishedDate: import("zod").ZodString;
51
94
  firstPublishedDate: import("zod").ZodString;
95
+ realtime: import("zod").ZodBoolean;
52
96
  editorialDesk: import("zod").ZodOptional<import("zod").ZodString>;
53
97
  accessLevel: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"premium">, import("zod").ZodLiteral<"subscribed">, import("zod").ZodLiteral<"registered">, import("zod").ZodLiteral<"free">]>>;
54
98
  canBeSyndicated: import("zod").ZodUnion<[import("zod").ZodLiteral<"yes">, import("zod").ZodLiteral<"no">, import("zod").ZodLiteral<"verify">, import("zod").ZodLiteral<"withContributorPayment">, import("zod").ZodLiteral<"unknown">]>;
@@ -95,22 +139,17 @@ export declare const articleSchema: import("zod").ZodObject<{
95
139
  id: string;
96
140
  apiUrl: string;
97
141
  }>, "many">>;
98
- byline: import("zod").ZodOptional<import("zod").ZodString>;
99
- bodyXML: import("zod").ZodString;
100
- alternativeTitles: import("zod").ZodOptional<import("zod").ZodObject<{
101
- promotionalTitle: import("zod").ZodString;
142
+ tableOfContents: import("zod").ZodOptional<import("zod").ZodObject<{
143
+ labelType: import("zod").ZodString;
144
+ sequence: import("zod").ZodString;
102
145
  }, "strip", import("zod").ZodTypeAny, {
103
- promotionalTitle: string;
146
+ labelType: string;
147
+ sequence: string;
104
148
  }, {
105
- promotionalTitle: string;
106
- }>>;
107
- alternativeStandfirsts: import("zod").ZodOptional<import("zod").ZodObject<{
108
- promotionalStandfirst: import("zod").ZodOptional<import("zod").ZodString>;
109
- }, "strip", import("zod").ZodTypeAny, {
110
- promotionalStandfirst?: string | undefined;
111
- }, {
112
- promotionalStandfirst?: string | undefined;
149
+ labelType: string;
150
+ sequence: string;
113
151
  }>>;
152
+ }, "id" | "type" | "types" | "publishedDate" | "annotations" | "webUrl" | "canonicalWebUrl" | "standout" | "firstPublishedDate" | "editorialDesk" | "accessLevel" | "canBeSyndicated" | "canBeDistributed" | "topper" | "comments" | "containedIn">>, Pick<{
114
153
  mainImage: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
115
154
  id: import("zod").ZodString;
116
155
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/ImageSet">;
@@ -161,8 +200,9 @@ export declare const articleSchema: import("zod").ZodObject<{
161
200
  maxDisplayWidth?: string | undefined;
162
201
  pixelWidth?: number | undefined;
163
202
  pixelHeight?: number | undefined;
164
- }>, import("zod").ZodObject<{
203
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
165
204
  id: import("zod").ZodString;
205
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Image">;
166
206
  format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"standardInline">, import("zod").ZodLiteral<"mobile">, import("zod").ZodLiteral<"desktop">, import("zod").ZodLiteral<"standard">, import("zod").ZodLiteral<"square">, import("zod").ZodLiteral<"ftEditSquare">, import("zod").ZodLiteral<"wide">, import("zod").ZodLiteral<"portrait">, import("zod").ZodLiteral<"landscape">]>>;
167
207
  title: import("zod").ZodOptional<import("zod").ZodString>;
168
208
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -178,8 +218,9 @@ export declare const articleSchema: import("zod").ZodObject<{
178
218
  maxDisplayWidth: import("zod").ZodOptional<import("zod").ZodString>;
179
219
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
180
220
  pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
221
+ }, {
181
222
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Graphic">;
182
- }, "strip", import("zod").ZodTypeAny, {
223
+ }>, "strip", import("zod").ZodTypeAny, {
183
224
  id: string;
184
225
  type: "http://www.ft.com/ontology/content/Graphic";
185
226
  binaryUrl: string;
@@ -320,8 +361,9 @@ export declare const articleSchema: import("zod").ZodObject<{
320
361
  maxDisplayWidth?: string | undefined;
321
362
  pixelWidth?: number | undefined;
322
363
  pixelHeight?: number | undefined;
323
- }>, import("zod").ZodObject<{
364
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
324
365
  id: import("zod").ZodString;
366
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Image">;
325
367
  format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"standardInline">, import("zod").ZodLiteral<"mobile">, import("zod").ZodLiteral<"desktop">, import("zod").ZodLiteral<"standard">, import("zod").ZodLiteral<"square">, import("zod").ZodLiteral<"ftEditSquare">, import("zod").ZodLiteral<"wide">, import("zod").ZodLiteral<"portrait">, import("zod").ZodLiteral<"landscape">]>>;
326
368
  title: import("zod").ZodOptional<import("zod").ZodString>;
327
369
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -337,8 +379,9 @@ export declare const articleSchema: import("zod").ZodObject<{
337
379
  maxDisplayWidth: import("zod").ZodOptional<import("zod").ZodString>;
338
380
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
339
381
  pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
382
+ }, {
340
383
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Graphic">;
341
- }, "strip", import("zod").ZodTypeAny, {
384
+ }>, "strip", import("zod").ZodTypeAny, {
342
385
  id: string;
343
386
  type: "http://www.ft.com/ontology/content/Graphic";
344
387
  binaryUrl: string;
@@ -416,8 +459,9 @@ export declare const articleSchema: import("zod").ZodObject<{
416
459
  maxDisplayWidth?: string | undefined;
417
460
  pixelWidth?: number | undefined;
418
461
  pixelHeight?: number | undefined;
419
- }>, import("zod").ZodObject<{
462
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
420
463
  id: import("zod").ZodString;
464
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Image">;
421
465
  format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"standardInline">, import("zod").ZodLiteral<"mobile">, import("zod").ZodLiteral<"desktop">, import("zod").ZodLiteral<"standard">, import("zod").ZodLiteral<"square">, import("zod").ZodLiteral<"ftEditSquare">, import("zod").ZodLiteral<"wide">, import("zod").ZodLiteral<"portrait">, import("zod").ZodLiteral<"landscape">]>>;
422
466
  title: import("zod").ZodOptional<import("zod").ZodString>;
423
467
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -433,8 +477,9 @@ export declare const articleSchema: import("zod").ZodObject<{
433
477
  maxDisplayWidth: import("zod").ZodOptional<import("zod").ZodString>;
434
478
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
435
479
  pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
480
+ }, {
436
481
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Graphic">;
437
- }, "strip", import("zod").ZodTypeAny, {
482
+ }>, "strip", import("zod").ZodTypeAny, {
438
483
  id: string;
439
484
  type: "http://www.ft.com/ontology/content/Graphic";
440
485
  binaryUrl: string;
@@ -672,8 +717,9 @@ export declare const articleSchema: import("zod").ZodObject<{
672
717
  maxDisplayWidth?: string | undefined;
673
718
  pixelWidth?: number | undefined;
674
719
  pixelHeight?: number | undefined;
675
- }>, import("zod").ZodObject<{
720
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
676
721
  id: import("zod").ZodString;
722
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Image">;
677
723
  format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"standardInline">, import("zod").ZodLiteral<"mobile">, import("zod").ZodLiteral<"desktop">, import("zod").ZodLiteral<"standard">, import("zod").ZodLiteral<"square">, import("zod").ZodLiteral<"ftEditSquare">, import("zod").ZodLiteral<"wide">, import("zod").ZodLiteral<"portrait">, import("zod").ZodLiteral<"landscape">]>>;
678
724
  title: import("zod").ZodOptional<import("zod").ZodString>;
679
725
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -689,8 +735,9 @@ export declare const articleSchema: import("zod").ZodObject<{
689
735
  maxDisplayWidth: import("zod").ZodOptional<import("zod").ZodString>;
690
736
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
691
737
  pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
738
+ }, {
692
739
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Graphic">;
693
- }, "strip", import("zod").ZodTypeAny, {
740
+ }>, "strip", import("zod").ZodTypeAny, {
694
741
  id: string;
695
742
  type: "http://www.ft.com/ontology/content/Graphic";
696
743
  binaryUrl: string;
@@ -801,20 +848,20 @@ export declare const articleSchema: import("zod").ZodObject<{
801
848
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
802
849
  videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
803
850
  }, "strip", import("zod").ZodTypeAny, {
804
- audioCodec?: string | undefined;
805
851
  binaryUrl?: string | undefined;
852
+ pixelWidth?: number | undefined;
853
+ pixelHeight?: number | undefined;
854
+ audioCodec?: string | undefined;
806
855
  duration?: number | undefined;
807
856
  mediaType?: string | undefined;
808
- pixelHeight?: number | undefined;
809
- pixelWidth?: number | undefined;
810
857
  videoCodec?: string | undefined;
811
858
  }, {
812
- audioCodec?: string | undefined;
813
859
  binaryUrl?: string | undefined;
860
+ pixelWidth?: number | undefined;
861
+ pixelHeight?: number | undefined;
862
+ audioCodec?: string | undefined;
814
863
  duration?: number | undefined;
815
864
  mediaType?: string | undefined;
816
- pixelHeight?: number | undefined;
817
- pixelWidth?: number | undefined;
818
865
  videoCodec?: string | undefined;
819
866
  }>, "many">;
820
867
  poster: import("zod").ZodOptional<import("zod").ZodObject<{
@@ -867,8 +914,9 @@ export declare const articleSchema: import("zod").ZodObject<{
867
914
  maxDisplayWidth?: string | undefined;
868
915
  pixelWidth?: number | undefined;
869
916
  pixelHeight?: number | undefined;
870
- }>, import("zod").ZodObject<{
917
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
871
918
  id: import("zod").ZodString;
919
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Image">;
872
920
  format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"standardInline">, import("zod").ZodLiteral<"mobile">, import("zod").ZodLiteral<"desktop">, import("zod").ZodLiteral<"standard">, import("zod").ZodLiteral<"square">, import("zod").ZodLiteral<"ftEditSquare">, import("zod").ZodLiteral<"wide">, import("zod").ZodLiteral<"portrait">, import("zod").ZodLiteral<"landscape">]>>;
873
921
  title: import("zod").ZodOptional<import("zod").ZodString>;
874
922
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -884,8 +932,9 @@ export declare const articleSchema: import("zod").ZodObject<{
884
932
  maxDisplayWidth: import("zod").ZodOptional<import("zod").ZodString>;
885
933
  pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
886
934
  pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
935
+ }, {
887
936
  type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/Graphic">;
888
- }, "strip", import("zod").ZodTypeAny, {
937
+ }>, "strip", import("zod").ZodTypeAny, {
889
938
  id: string;
890
939
  type: "http://www.ft.com/ontology/content/Graphic";
891
940
  binaryUrl: string;
@@ -985,12 +1034,12 @@ export declare const articleSchema: import("zod").ZodObject<{
985
1034
  id: string;
986
1035
  type: "http://www.ft.com/ontology/content/Clip";
987
1036
  dataSource: {
988
- audioCodec?: string | undefined;
989
1037
  binaryUrl?: string | undefined;
1038
+ pixelWidth?: number | undefined;
1039
+ pixelHeight?: number | undefined;
1040
+ audioCodec?: string | undefined;
990
1041
  duration?: number | undefined;
991
1042
  mediaType?: string | undefined;
992
- pixelHeight?: number | undefined;
993
- pixelWidth?: number | undefined;
994
1043
  videoCodec?: string | undefined;
995
1044
  }[];
996
1045
  format?: "standardInline" | "mobile" | undefined;
@@ -1032,12 +1081,12 @@ export declare const articleSchema: import("zod").ZodObject<{
1032
1081
  id: string;
1033
1082
  type: "http://www.ft.com/ontology/content/Clip";
1034
1083
  dataSource: {
1035
- audioCodec?: string | undefined;
1036
1084
  binaryUrl?: string | undefined;
1085
+ pixelWidth?: number | undefined;
1086
+ pixelHeight?: number | undefined;
1087
+ audioCodec?: string | undefined;
1037
1088
  duration?: number | undefined;
1038
1089
  mediaType?: string | undefined;
1039
- pixelHeight?: number | undefined;
1040
- pixelWidth?: number | undefined;
1041
1090
  videoCodec?: string | undefined;
1042
1091
  }[];
1043
1092
  format?: "standardInline" | "mobile" | undefined;
@@ -1117,12 +1166,12 @@ export declare const articleSchema: import("zod").ZodObject<{
1117
1166
  id: string;
1118
1167
  type: "http://www.ft.com/ontology/content/Clip";
1119
1168
  dataSource: {
1120
- audioCodec?: string | undefined;
1121
1169
  binaryUrl?: string | undefined;
1170
+ pixelWidth?: number | undefined;
1171
+ pixelHeight?: number | undefined;
1172
+ audioCodec?: string | undefined;
1122
1173
  duration?: number | undefined;
1123
1174
  mediaType?: string | undefined;
1124
- pixelHeight?: number | undefined;
1125
- pixelWidth?: number | undefined;
1126
1175
  videoCodec?: string | undefined;
1127
1176
  }[];
1128
1177
  format?: "standardInline" | "mobile" | undefined;
@@ -1161,9 +1210,9 @@ export declare const articleSchema: import("zod").ZodObject<{
1161
1210
  description?: string | undefined;
1162
1211
  } | undefined;
1163
1212
  }[];
1213
+ description?: string | undefined;
1164
1214
  caption?: string | undefined;
1165
1215
  dataCopyright?: string | undefined;
1166
- description?: string | undefined;
1167
1216
  displayTitle?: string | undefined;
1168
1217
  contentWarning?: string[] | undefined;
1169
1218
  noAudio?: boolean | undefined;
@@ -1184,12 +1233,12 @@ export declare const articleSchema: import("zod").ZodObject<{
1184
1233
  id: string;
1185
1234
  type: "http://www.ft.com/ontology/content/Clip";
1186
1235
  dataSource: {
1187
- audioCodec?: string | undefined;
1188
1236
  binaryUrl?: string | undefined;
1237
+ pixelWidth?: number | undefined;
1238
+ pixelHeight?: number | undefined;
1239
+ audioCodec?: string | undefined;
1189
1240
  duration?: number | undefined;
1190
1241
  mediaType?: string | undefined;
1191
- pixelHeight?: number | undefined;
1192
- pixelWidth?: number | undefined;
1193
1242
  videoCodec?: string | undefined;
1194
1243
  }[];
1195
1244
  format?: "standardInline" | "mobile" | undefined;
@@ -1228,9 +1277,9 @@ export declare const articleSchema: import("zod").ZodObject<{
1228
1277
  description?: string | undefined;
1229
1278
  } | undefined;
1230
1279
  }[];
1280
+ description?: string | undefined;
1231
1281
  caption?: string | undefined;
1232
1282
  dataCopyright?: string | undefined;
1233
- description?: string | undefined;
1234
1283
  displayTitle?: string | undefined;
1235
1284
  contentWarning?: string[] | undefined;
1236
1285
  noAudio?: boolean | undefined;
@@ -1245,7 +1294,23 @@ export declare const articleSchema: import("zod").ZodObject<{
1245
1294
  transcript?: string | undefined;
1246
1295
  } | undefined;
1247
1296
  }>]>, "many">>;
1248
- }, "strip", import("zod").ZodTypeAny, {
1297
+ dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1298
+ binaryUrl: import("zod").ZodString;
1299
+ duration: import("zod").ZodNumber;
1300
+ filesize: import("zod").ZodNumber;
1301
+ mediaType: import("zod").ZodString;
1302
+ }, "strip", import("zod").ZodTypeAny, {
1303
+ binaryUrl: string;
1304
+ duration: number;
1305
+ mediaType: string;
1306
+ filesize: number;
1307
+ }, {
1308
+ binaryUrl: string;
1309
+ duration: number;
1310
+ mediaType: string;
1311
+ filesize: number;
1312
+ }>, "many">>;
1313
+ }, "mainImage" | "leadImages" | "alternativeImages" | "leadFlourish" | "embeds">>, "strip", import("zod").ZodTypeAny, {
1249
1314
  id: string;
1250
1315
  types: string[];
1251
1316
  title: string;
@@ -1455,12 +1520,12 @@ export declare const articleSchema: import("zod").ZodObject<{
1455
1520
  id: string;
1456
1521
  type: "http://www.ft.com/ontology/content/Clip";
1457
1522
  dataSource: {
1458
- audioCodec?: string | undefined;
1459
1523
  binaryUrl?: string | undefined;
1524
+ pixelWidth?: number | undefined;
1525
+ pixelHeight?: number | undefined;
1526
+ audioCodec?: string | undefined;
1460
1527
  duration?: number | undefined;
1461
1528
  mediaType?: string | undefined;
1462
- pixelHeight?: number | undefined;
1463
- pixelWidth?: number | undefined;
1464
1529
  videoCodec?: string | undefined;
1465
1530
  }[];
1466
1531
  format?: "standardInline" | "mobile" | undefined;
@@ -1499,9 +1564,9 @@ export declare const articleSchema: import("zod").ZodObject<{
1499
1564
  description?: string | undefined;
1500
1565
  } | undefined;
1501
1566
  }[];
1567
+ description?: string | undefined;
1502
1568
  caption?: string | undefined;
1503
1569
  dataCopyright?: string | undefined;
1504
- description?: string | undefined;
1505
1570
  displayTitle?: string | undefined;
1506
1571
  contentWarning?: string[] | undefined;
1507
1572
  noAudio?: boolean | undefined;
@@ -1726,12 +1791,12 @@ export declare const articleSchema: import("zod").ZodObject<{
1726
1791
  id: string;
1727
1792
  type: "http://www.ft.com/ontology/content/Clip";
1728
1793
  dataSource: {
1729
- audioCodec?: string | undefined;
1730
1794
  binaryUrl?: string | undefined;
1795
+ pixelWidth?: number | undefined;
1796
+ pixelHeight?: number | undefined;
1797
+ audioCodec?: string | undefined;
1731
1798
  duration?: number | undefined;
1732
1799
  mediaType?: string | undefined;
1733
- pixelHeight?: number | undefined;
1734
- pixelWidth?: number | undefined;
1735
1800
  videoCodec?: string | undefined;
1736
1801
  }[];
1737
1802
  format?: "standardInline" | "mobile" | undefined;
@@ -1770,9 +1835,9 @@ export declare const articleSchema: import("zod").ZodObject<{
1770
1835
  description?: string | undefined;
1771
1836
  } | undefined;
1772
1837
  }[];
1838
+ description?: string | undefined;
1773
1839
  caption?: string | undefined;
1774
1840
  dataCopyright?: string | undefined;
1775
- description?: string | undefined;
1776
1841
  displayTitle?: string | undefined;
1777
1842
  contentWarning?: string[] | undefined;
1778
1843
  noAudio?: boolean | undefined;