@financial-times/cp-content-pipeline-schema 3.18.0 → 3.19.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 +7 -0
- package/lib/generated/index.d.ts +9 -0
- package/lib/helpers/qualityWorkaround.d.ts +2 -0
- package/lib/helpers/qualityWorkaround.js +37 -0
- package/lib/helpers/qualityWorkaround.js.map +1 -0
- package/lib/model/Clip.d.ts +1 -17
- package/lib/model/Clip.js +27 -8
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Clip.test.js +77 -0
- package/lib/model/Clip.test.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +18 -0
- package/lib/model/schemas/capi/audio.d.ts +14 -0
- package/lib/model/schemas/capi/base-schema.d.ts +42 -0
- package/lib/model/schemas/capi/base-schema.js +2 -0
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +14 -0
- package/lib/model/schemas/capi/custom-code-component.d.ts +18 -0
- package/lib/model/schemas/capi/index.d.ts +96 -0
- package/lib/model/schemas/capi/live-blog-package.d.ts +18 -0
- package/lib/model/schemas/capi/placeholder.d.ts +18 -0
- package/lib/model/schemas/capi/video.d.ts +14 -0
- package/lib/resolvers/clip.d.ts +4 -9
- package/lib/resolvers/clip.js +3 -0
- package/lib/resolvers/clip.js.map +1 -1
- package/lib/resolvers/index.d.ts +4 -9
- package/lib/types/clip.d.ts +21 -0
- package/lib/types/clip.js +3 -0
- package/lib/types/clip.js.map +1 -0
- package/package.json +1 -1
- package/queries/article.graphql +3 -0
- package/src/generated/index.ts +9 -0
- package/src/helpers/qualityWorkaround.ts +44 -0
- package/src/model/Clip.test.ts +95 -0
- package/src/model/Clip.ts +33 -27
- package/src/model/schemas/capi/base-schema.ts +2 -0
- package/src/resolvers/clip.ts +3 -0
- package/src/types/clip.ts +23 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/clip.graphql +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.19.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.18.0...cp-content-pipeline-schema-v3.19.0) (2025-11-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* ci-3111 media queries on clips sources ([856bd45](https://github.com/Financial-Times/cp-content-pipeline/commit/856bd457ba6dc56f292c6a31e0edfe3f29b4a904))
|
|
9
|
+
|
|
3
10
|
## [3.18.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.17.0...cp-content-pipeline-schema-v3.18.0) (2025-11-06)
|
|
4
11
|
|
|
5
12
|
|
package/lib/generated/index.d.ts
CHANGED
|
@@ -423,6 +423,8 @@ export type ClipSource = {
|
|
|
423
423
|
readonly audioCodec?: Maybe<Scalars['String']['output']>;
|
|
424
424
|
/** The url of the clip source, eg. 'https://next-media-api.ft.com/renditions/16868569859480/0x0.mp3'. */
|
|
425
425
|
readonly binaryUrl: Scalars['String']['output'];
|
|
426
|
+
/** The encoding settings intention for the video media */
|
|
427
|
+
readonly dppx?: Maybe<Scalars['Int']['output']>;
|
|
426
428
|
/** The duration of the clip in milliseconds. */
|
|
427
429
|
readonly duration?: Maybe<Scalars['Int']['output']>;
|
|
428
430
|
/** The media type eg. video/mp4. */
|
|
@@ -431,6 +433,10 @@ export type ClipSource = {
|
|
|
431
433
|
readonly pixelHeight?: Maybe<Scalars['Int']['output']>;
|
|
432
434
|
/** The width of the clip in pixels. */
|
|
433
435
|
readonly pixelWidth?: Maybe<Scalars['Int']['output']>;
|
|
436
|
+
/** The width of the source immediately narrower than this one. */
|
|
437
|
+
readonly previousSourceWidth?: Maybe<Scalars['Int']['output']>;
|
|
438
|
+
/** The encoding quality of the video media */
|
|
439
|
+
readonly quality?: Maybe<Scalars['String']['output']>;
|
|
434
440
|
/** The video encoding format of the source, eg. h264. */
|
|
435
441
|
readonly videoCodec?: Maybe<Scalars['String']['output']>;
|
|
436
442
|
};
|
|
@@ -2264,10 +2270,13 @@ export type ClipSetResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2264
2270
|
export type ClipSourceResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['ClipSource'] = ResolversParentTypes['ClipSource']> = ResolversObject<{
|
|
2265
2271
|
audioCodec: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2266
2272
|
binaryUrl: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2273
|
+
dppx: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2267
2274
|
duration: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2268
2275
|
mediaType: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2269
2276
|
pixelHeight: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2270
2277
|
pixelWidth: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2278
|
+
previousSourceWidth: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2279
|
+
quality: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2271
2280
|
videoCodec: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2272
2281
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2273
2282
|
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = qualityWorkaround;
|
|
4
|
+
// possible output sizes are set in https://github.com/Financial-Times/ip-ovide/tree/main/common/n-zencoder/src/profiles
|
|
5
|
+
const dimensions = new Map([
|
|
6
|
+
[1920, 1080],
|
|
7
|
+
[1280, 720],
|
|
8
|
+
[960, 540],
|
|
9
|
+
[640, 360],
|
|
10
|
+
[480, 270],
|
|
11
|
+
]);
|
|
12
|
+
// utility to extract width from filename pattern like /640x360.mp4
|
|
13
|
+
function getDimensionsFromFilename(url) {
|
|
14
|
+
// regex: get the first set of digits after a "/" and before "x", followed by 1+ digits, followed by ".mp" and 1 digit, then end of string.
|
|
15
|
+
const widthRegex = /\/(\d+)x(\d+)\.mp\d$/i;
|
|
16
|
+
const widthMatch = url.match(widthRegex);
|
|
17
|
+
return [
|
|
18
|
+
parseInt(widthMatch?.[1] ?? '0', 10),
|
|
19
|
+
parseInt(widthMatch?.[2] ?? '0', 10),
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
function qualityWorkaround(dataSource) {
|
|
23
|
+
return dataSource.map((source) => {
|
|
24
|
+
const originalDimensions = getDimensionsFromFilename(source.binaryUrl ?? '');
|
|
25
|
+
if (originalDimensions[0] === 0) {
|
|
26
|
+
// this will apply to audio files
|
|
27
|
+
return source;
|
|
28
|
+
}
|
|
29
|
+
const smallerDimension = Math.min(...originalDimensions);
|
|
30
|
+
source.quality = `${Array.from(dimensions.values()).includes(smallerDimension)
|
|
31
|
+
? smallerDimension
|
|
32
|
+
: dimensions.get(smallerDimension)}p`;
|
|
33
|
+
source.dppx = smallerDimension >= 1080 ? 2 : 1;
|
|
34
|
+
return source;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=qualityWorkaround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualityWorkaround.js","sourceRoot":"","sources":["../../src/helpers/qualityWorkaround.ts"],"names":[],"mappings":";;AAwBA,oCAmBC;AAvCD,wHAAwH;AACxH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,CAAC,IAAI,EAAE,IAAI,CAAC;IACZ,CAAC,IAAI,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAA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
|
|
2
2
|
import { LiteralUnionScalarValues } from '../resolvers/literal-union';
|
|
3
3
|
import { ClipFormat } from '../resolvers/scalars';
|
|
4
4
|
import { QueryContext } from '..';
|
|
5
|
-
type ClipSource
|
|
6
|
-
binaryUrl: string;
|
|
7
|
-
mediaType: string;
|
|
8
|
-
audioCodec?: string;
|
|
9
|
-
duration?: number;
|
|
10
|
-
pixelHeight?: number;
|
|
11
|
-
pixelWidth?: number;
|
|
12
|
-
videoCodec?: string;
|
|
13
|
-
};
|
|
14
|
-
interface ClipVideo {
|
|
15
|
-
id(): string;
|
|
16
|
-
type(): string;
|
|
17
|
-
format(): LiteralUnionScalarValues<typeof ClipFormat>;
|
|
18
|
-
poster(): string;
|
|
19
|
-
dataSource(): ClipSource[];
|
|
20
|
-
}
|
|
5
|
+
import type { ClipSource, ClipVideo } from '../types/clip';
|
|
21
6
|
export declare class Clip implements ClipVideo {
|
|
22
7
|
private clip;
|
|
23
8
|
private context;
|
|
@@ -29,4 +14,3 @@ export declare class Clip implements ClipVideo {
|
|
|
29
14
|
dataSource(): ClipSource[];
|
|
30
15
|
poster(): string;
|
|
31
16
|
}
|
|
32
|
-
export {};
|
package/lib/model/Clip.js
CHANGED
|
@@ -8,6 +8,7 @@ const metadata_1 = require("../helpers/metadata");
|
|
|
8
8
|
const literal_union_1 = require("../resolvers/literal-union");
|
|
9
9
|
const scalars_1 = require("../resolvers/scalars");
|
|
10
10
|
const imageService_1 = __importDefault(require("../helpers/imageService"));
|
|
11
|
+
const qualityWorkaround_1 = __importDefault(require("../helpers/qualityWorkaround"));
|
|
11
12
|
class Clip {
|
|
12
13
|
clip;
|
|
13
14
|
context;
|
|
@@ -39,17 +40,35 @@ class Clip {
|
|
|
39
40
|
}
|
|
40
41
|
return 'standard-inline';
|
|
41
42
|
}
|
|
43
|
+
// apply 'quality' workaround
|
|
44
|
+
// order sources by width and then quality
|
|
45
|
+
// get the min width from the first previous more narrow item
|
|
42
46
|
dataSource() {
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
// create a copy of the array so we don't modify the original data
|
|
48
|
+
let dataSource = this.clip.dataSource.map((src) => ({
|
|
49
|
+
...src,
|
|
50
|
+
}));
|
|
51
|
+
dataSource = (0, qualityWorkaround_1.default)(dataSource);
|
|
52
|
+
dataSource = dataSource.sort((a, b) => {
|
|
53
|
+
const widthDiff = (b.pixelWidth ?? 0) - (a.pixelWidth ?? 0);
|
|
54
|
+
if (widthDiff !== 0) {
|
|
55
|
+
return widthDiff;
|
|
47
56
|
}
|
|
48
|
-
|
|
49
|
-
return 1;
|
|
50
|
-
}
|
|
51
|
-
return 0;
|
|
57
|
+
return (b?.dppx ?? 0) - (a?.dppx ?? 0);
|
|
52
58
|
});
|
|
59
|
+
// get the min width from the previous item if it has pixelWidth set, checking it is not the same as pixelWidth as the current item
|
|
60
|
+
for (let i = 0; i < dataSource.length; i++) {
|
|
61
|
+
let next = 1;
|
|
62
|
+
let minWidth = dataSource[i + next]?.pixelWidth;
|
|
63
|
+
while (typeof minWidth !== 'undefined' &&
|
|
64
|
+
minWidth === dataSource[i]?.pixelWidth) {
|
|
65
|
+
next++;
|
|
66
|
+
minWidth = dataSource[i + next]?.pixelWidth;
|
|
67
|
+
}
|
|
68
|
+
if (minWidth && dataSource[i]) {
|
|
69
|
+
dataSource[i].previousSourceWidth = minWidth;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
53
72
|
return dataSource;
|
|
54
73
|
}
|
|
55
74
|
poster() {
|
package/lib/model/Clip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAEjD,8DAGmC;AACnC,kDAAiD;AACjD,2EAAqD;
|
|
1
|
+
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAEjD,8DA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AC,EAAE,SAAS,CAAA;QACnD,OAAO,GAAG;YACR,CAAC,CAAC,IAAA,sBAAe,EAAC;gBACd,GAAG;gBACH,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;gBACnC,KAAK,EACH,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG;aACrE,CAAC;YACJ,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;CACF;AAzFD,oBAyFC"}
|
package/lib/model/Clip.test.js
CHANGED
|
@@ -4,6 +4,41 @@ const Clip_1 = require("./Clip");
|
|
|
4
4
|
const mockContext = {
|
|
5
5
|
systemCode: 'cp-content-pipeline',
|
|
6
6
|
};
|
|
7
|
+
const mockDataSources = [
|
|
8
|
+
{
|
|
9
|
+
audioCodec: 'mp3',
|
|
10
|
+
binaryUrl: 'https://clips.ft.com/someguid/0x0.mp3',
|
|
11
|
+
duration: 21720,
|
|
12
|
+
mediaType: 'audio/mpeg',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
audioCodec: 'aac',
|
|
16
|
+
binaryUrl: 'https://clips.ft.com/someguid/640x360.mp4',
|
|
17
|
+
duration: 21684,
|
|
18
|
+
mediaType: 'video/mp4',
|
|
19
|
+
pixelHeight: 360,
|
|
20
|
+
pixelWidth: 640,
|
|
21
|
+
videoCodec: 'h264',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
audioCodec: 'aac',
|
|
25
|
+
binaryUrl: 'https://clips.ft.com/someguid/1280x720.mp4',
|
|
26
|
+
duration: 21684,
|
|
27
|
+
mediaType: 'video/mp4',
|
|
28
|
+
pixelHeight: 720,
|
|
29
|
+
pixelWidth: 1280,
|
|
30
|
+
videoCodec: 'h264',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
audioCodec: 'aac',
|
|
34
|
+
binaryUrl: 'https://clips.ft.com/someguid/1920x1080.mp4',
|
|
35
|
+
duration: 21684,
|
|
36
|
+
mediaType: 'video/mp4',
|
|
37
|
+
pixelHeight: 720,
|
|
38
|
+
pixelWidth: 1280,
|
|
39
|
+
videoCodec: 'h264',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
7
42
|
describe('Clip', () => {
|
|
8
43
|
describe('poster', () => {
|
|
9
44
|
it('uses the Origami Image Service when a url is provided', () => {
|
|
@@ -141,5 +176,47 @@ describe('Clip', () => {
|
|
|
141
176
|
expect(clip.poster()).toContain('width=1200');
|
|
142
177
|
});
|
|
143
178
|
});
|
|
179
|
+
describe('datasources', () => {
|
|
180
|
+
it('creates a quality value and dppx value based on the width in the URL when quality is not provided', () => {
|
|
181
|
+
const clip = new Clip_1.Clip({
|
|
182
|
+
id: 'http://api.ft.com/things/1234',
|
|
183
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
184
|
+
dataSource: mockDataSources,
|
|
185
|
+
}, mockContext);
|
|
186
|
+
const dataSource = clip.dataSource();
|
|
187
|
+
expect(dataSource).toHaveLength(4);
|
|
188
|
+
expect(dataSource?.[0]?.quality).toBe('1080p');
|
|
189
|
+
expect(dataSource?.[0]?.dppx).toBe(2);
|
|
190
|
+
expect(dataSource?.[1]?.quality).toBe('720p');
|
|
191
|
+
expect(dataSource?.[2]?.quality).toBe('360p');
|
|
192
|
+
expect(dataSource?.[3]?.quality).toBeUndefined();
|
|
193
|
+
});
|
|
194
|
+
it('orders the data sources by width and then dppx', () => {
|
|
195
|
+
const clip = new Clip_1.Clip({
|
|
196
|
+
id: 'http://api.ft.com/things/1234',
|
|
197
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
198
|
+
dataSource: mockDataSources,
|
|
199
|
+
}, mockContext);
|
|
200
|
+
const dataSource = clip.dataSource();
|
|
201
|
+
expect(dataSource).toHaveLength(4);
|
|
202
|
+
expect(dataSource?.[0]?.binaryUrl).toBe('https://clips.ft.com/someguid/1920x1080.mp4');
|
|
203
|
+
expect(dataSource?.[1]?.binaryUrl).toBe('https://clips.ft.com/someguid/1280x720.mp4');
|
|
204
|
+
expect(dataSource?.[2]?.binaryUrl).toBe('https://clips.ft.com/someguid/640x360.mp4');
|
|
205
|
+
expect(dataSource?.[3]?.binaryUrl).toBe('https://clips.ft.com/someguid/0x0.mp3');
|
|
206
|
+
});
|
|
207
|
+
it('sets the previousSourceWidth to the next most narrow source', () => {
|
|
208
|
+
const clip = new Clip_1.Clip({
|
|
209
|
+
id: 'http://api.ft.com/things/1234',
|
|
210
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
211
|
+
dataSource: mockDataSources,
|
|
212
|
+
}, mockContext);
|
|
213
|
+
const dataSource = clip.dataSource();
|
|
214
|
+
expect(dataSource).toHaveLength(4);
|
|
215
|
+
expect(dataSource?.[0]?.previousSourceWidth).toBe(640);
|
|
216
|
+
expect(dataSource?.[1]?.previousSourceWidth).toBe(640);
|
|
217
|
+
expect(dataSource?.[2]?.previousSourceWidth).toBeUndefined();
|
|
218
|
+
expect(dataSource?.[3]?.previousSourceWidth).toBeUndefined();
|
|
219
|
+
});
|
|
220
|
+
});
|
|
144
221
|
});
|
|
145
222
|
//# sourceMappingURL=Clip.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clip.test.js","sourceRoot":"","sources":["../../src/model/Clip.test.ts"],"names":[],"mappings":";;AACA,iCAA6B;AAC7B,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,qBAAqB;CACP,CAAA;AAE5B,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;YAC/D,MAAM,IAAI,GAAG,IAAI,WAAI,CACnB;gBACE,EAAE,EAAE,+BAA+B;gBACnC,IAAI,EAAE,yCAAyC;gBAC/C,UAAU,EAAE,CAAC,EAAE,CAAC;gBAChB,MAAM,EAA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SAAS,CAAC,CAAC,IAAI,CACrC,uCAAuC,CACxC,CAAA;QACH,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;YACrE,MAAM,IAAI,GAAG,IAAI,WAAI,CACnB;gBACE,EAAE,EAAE,+BAA+B;gBACnC,IAAI,EAAE,yCAAyC;gBAC/C,UAAU,EAAE,eAAe;aAC5B,EACD,WAAW,CACZ,CAAA;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;YACpC,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;YAClC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACtD,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACtD,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,aAAa,EAAE,CAAA;YAC5D,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,aAAa,EAAE,CAAA;QAC9D,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -853,6 +853,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
853
853
|
pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
854
854
|
pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
855
855
|
videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
|
|
856
|
+
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
857
|
+
dppx: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
856
858
|
}, "strip", import("zod").ZodTypeAny, {
|
|
857
859
|
binaryUrl?: string | undefined;
|
|
858
860
|
pixelWidth?: number | undefined;
|
|
@@ -861,6 +863,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
861
863
|
duration?: number | undefined;
|
|
862
864
|
mediaType?: string | undefined;
|
|
863
865
|
videoCodec?: string | undefined;
|
|
866
|
+
quality?: string | undefined;
|
|
867
|
+
dppx?: number | undefined;
|
|
864
868
|
}, {
|
|
865
869
|
binaryUrl?: string | undefined;
|
|
866
870
|
pixelWidth?: number | undefined;
|
|
@@ -869,6 +873,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
869
873
|
duration?: number | undefined;
|
|
870
874
|
mediaType?: string | undefined;
|
|
871
875
|
videoCodec?: string | undefined;
|
|
876
|
+
quality?: string | undefined;
|
|
877
|
+
dppx?: number | undefined;
|
|
872
878
|
}>, "many">;
|
|
873
879
|
poster: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
874
880
|
id: import("zod").ZodString;
|
|
@@ -1046,6 +1052,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1046
1052
|
duration?: number | undefined;
|
|
1047
1053
|
mediaType?: string | undefined;
|
|
1048
1054
|
videoCodec?: string | undefined;
|
|
1055
|
+
quality?: string | undefined;
|
|
1056
|
+
dppx?: number | undefined;
|
|
1049
1057
|
}[];
|
|
1050
1058
|
format?: "standardInline" | "mobile" | undefined;
|
|
1051
1059
|
poster?: {
|
|
@@ -1093,6 +1101,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1093
1101
|
duration?: number | undefined;
|
|
1094
1102
|
mediaType?: string | undefined;
|
|
1095
1103
|
videoCodec?: string | undefined;
|
|
1104
|
+
quality?: string | undefined;
|
|
1105
|
+
dppx?: number | undefined;
|
|
1096
1106
|
}[];
|
|
1097
1107
|
format?: "standardInline" | "mobile" | undefined;
|
|
1098
1108
|
poster?: {
|
|
@@ -1179,6 +1189,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1179
1189
|
duration?: number | undefined;
|
|
1180
1190
|
mediaType?: string | undefined;
|
|
1181
1191
|
videoCodec?: string | undefined;
|
|
1192
|
+
quality?: string | undefined;
|
|
1193
|
+
dppx?: number | undefined;
|
|
1182
1194
|
}[];
|
|
1183
1195
|
format?: "standardInline" | "mobile" | undefined;
|
|
1184
1196
|
poster?: {
|
|
@@ -1247,6 +1259,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1247
1259
|
duration?: number | undefined;
|
|
1248
1260
|
mediaType?: string | undefined;
|
|
1249
1261
|
videoCodec?: string | undefined;
|
|
1262
|
+
quality?: string | undefined;
|
|
1263
|
+
dppx?: number | undefined;
|
|
1250
1264
|
}[];
|
|
1251
1265
|
format?: "standardInline" | "mobile" | undefined;
|
|
1252
1266
|
poster?: {
|
|
@@ -1736,6 +1750,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1736
1750
|
duration?: number | undefined;
|
|
1737
1751
|
mediaType?: string | undefined;
|
|
1738
1752
|
videoCodec?: string | undefined;
|
|
1753
|
+
quality?: string | undefined;
|
|
1754
|
+
dppx?: number | undefined;
|
|
1739
1755
|
}[];
|
|
1740
1756
|
format?: "standardInline" | "mobile" | undefined;
|
|
1741
1757
|
poster?: {
|
|
@@ -2028,6 +2044,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
2028
2044
|
duration?: number | undefined;
|
|
2029
2045
|
mediaType?: string | undefined;
|
|
2030
2046
|
videoCodec?: string | undefined;
|
|
2047
|
+
quality?: string | undefined;
|
|
2048
|
+
dppx?: number | undefined;
|
|
2031
2049
|
}[];
|
|
2032
2050
|
format?: "standardInline" | "mobile" | undefined;
|
|
2033
2051
|
poster?: {
|
|
@@ -853,6 +853,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
853
853
|
pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
854
854
|
pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
855
855
|
videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
|
|
856
|
+
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
857
|
+
dppx: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
856
858
|
}, "strip", import("zod").ZodTypeAny, {
|
|
857
859
|
binaryUrl?: string | undefined;
|
|
858
860
|
pixelWidth?: number | undefined;
|
|
@@ -861,6 +863,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
861
863
|
duration?: number | undefined;
|
|
862
864
|
mediaType?: string | undefined;
|
|
863
865
|
videoCodec?: string | undefined;
|
|
866
|
+
quality?: string | undefined;
|
|
867
|
+
dppx?: number | undefined;
|
|
864
868
|
}, {
|
|
865
869
|
binaryUrl?: string | undefined;
|
|
866
870
|
pixelWidth?: number | undefined;
|
|
@@ -869,6 +873,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
869
873
|
duration?: number | undefined;
|
|
870
874
|
mediaType?: string | undefined;
|
|
871
875
|
videoCodec?: string | undefined;
|
|
876
|
+
quality?: string | undefined;
|
|
877
|
+
dppx?: number | undefined;
|
|
872
878
|
}>, "many">;
|
|
873
879
|
poster: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
874
880
|
id: import("zod").ZodString;
|
|
@@ -1046,6 +1052,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1046
1052
|
duration?: number | undefined;
|
|
1047
1053
|
mediaType?: string | undefined;
|
|
1048
1054
|
videoCodec?: string | undefined;
|
|
1055
|
+
quality?: string | undefined;
|
|
1056
|
+
dppx?: number | undefined;
|
|
1049
1057
|
}[];
|
|
1050
1058
|
format?: "standardInline" | "mobile" | undefined;
|
|
1051
1059
|
poster?: {
|
|
@@ -1093,6 +1101,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1093
1101
|
duration?: number | undefined;
|
|
1094
1102
|
mediaType?: string | undefined;
|
|
1095
1103
|
videoCodec?: string | undefined;
|
|
1104
|
+
quality?: string | undefined;
|
|
1105
|
+
dppx?: number | undefined;
|
|
1096
1106
|
}[];
|
|
1097
1107
|
format?: "standardInline" | "mobile" | undefined;
|
|
1098
1108
|
poster?: {
|
|
@@ -1179,6 +1189,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1179
1189
|
duration?: number | undefined;
|
|
1180
1190
|
mediaType?: string | undefined;
|
|
1181
1191
|
videoCodec?: string | undefined;
|
|
1192
|
+
quality?: string | undefined;
|
|
1193
|
+
dppx?: number | undefined;
|
|
1182
1194
|
}[];
|
|
1183
1195
|
format?: "standardInline" | "mobile" | undefined;
|
|
1184
1196
|
poster?: {
|
|
@@ -1247,6 +1259,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1247
1259
|
duration?: number | undefined;
|
|
1248
1260
|
mediaType?: string | undefined;
|
|
1249
1261
|
videoCodec?: string | undefined;
|
|
1262
|
+
quality?: string | undefined;
|
|
1263
|
+
dppx?: number | undefined;
|
|
1250
1264
|
}[];
|
|
1251
1265
|
format?: "standardInline" | "mobile" | undefined;
|
|
1252
1266
|
poster?: {
|
|
@@ -719,6 +719,8 @@ export declare const Clip: z.ZodObject<{
|
|
|
719
719
|
pixelHeight: z.ZodOptional<z.ZodNumber>;
|
|
720
720
|
pixelWidth: z.ZodOptional<z.ZodNumber>;
|
|
721
721
|
videoCodec: z.ZodOptional<z.ZodString>;
|
|
722
|
+
quality: z.ZodOptional<z.ZodString>;
|
|
723
|
+
dppx: z.ZodOptional<z.ZodNumber>;
|
|
722
724
|
}, "strip", z.ZodTypeAny, {
|
|
723
725
|
binaryUrl?: string | undefined;
|
|
724
726
|
pixelWidth?: number | undefined;
|
|
@@ -727,6 +729,8 @@ export declare const Clip: z.ZodObject<{
|
|
|
727
729
|
duration?: number | undefined;
|
|
728
730
|
mediaType?: string | undefined;
|
|
729
731
|
videoCodec?: string | undefined;
|
|
732
|
+
quality?: string | undefined;
|
|
733
|
+
dppx?: number | undefined;
|
|
730
734
|
}, {
|
|
731
735
|
binaryUrl?: string | undefined;
|
|
732
736
|
pixelWidth?: number | undefined;
|
|
@@ -735,6 +739,8 @@ export declare const Clip: z.ZodObject<{
|
|
|
735
739
|
duration?: number | undefined;
|
|
736
740
|
mediaType?: string | undefined;
|
|
737
741
|
videoCodec?: string | undefined;
|
|
742
|
+
quality?: string | undefined;
|
|
743
|
+
dppx?: number | undefined;
|
|
738
744
|
}>, "many">;
|
|
739
745
|
poster: z.ZodOptional<z.ZodObject<{
|
|
740
746
|
id: z.ZodString;
|
|
@@ -912,6 +918,8 @@ export declare const Clip: z.ZodObject<{
|
|
|
912
918
|
duration?: number | undefined;
|
|
913
919
|
mediaType?: string | undefined;
|
|
914
920
|
videoCodec?: string | undefined;
|
|
921
|
+
quality?: string | undefined;
|
|
922
|
+
dppx?: number | undefined;
|
|
915
923
|
}[];
|
|
916
924
|
format?: "standardInline" | "mobile" | undefined;
|
|
917
925
|
poster?: {
|
|
@@ -959,6 +967,8 @@ export declare const Clip: z.ZodObject<{
|
|
|
959
967
|
duration?: number | undefined;
|
|
960
968
|
mediaType?: string | undefined;
|
|
961
969
|
videoCodec?: string | undefined;
|
|
970
|
+
quality?: string | undefined;
|
|
971
|
+
dppx?: number | undefined;
|
|
962
972
|
}[];
|
|
963
973
|
format?: "standardInline" | "mobile" | undefined;
|
|
964
974
|
poster?: {
|
|
@@ -1011,6 +1021,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1011
1021
|
pixelHeight: z.ZodOptional<z.ZodNumber>;
|
|
1012
1022
|
pixelWidth: z.ZodOptional<z.ZodNumber>;
|
|
1013
1023
|
videoCodec: z.ZodOptional<z.ZodString>;
|
|
1024
|
+
quality: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
dppx: z.ZodOptional<z.ZodNumber>;
|
|
1014
1026
|
}, "strip", z.ZodTypeAny, {
|
|
1015
1027
|
binaryUrl?: string | undefined;
|
|
1016
1028
|
pixelWidth?: number | undefined;
|
|
@@ -1019,6 +1031,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1019
1031
|
duration?: number | undefined;
|
|
1020
1032
|
mediaType?: string | undefined;
|
|
1021
1033
|
videoCodec?: string | undefined;
|
|
1034
|
+
quality?: string | undefined;
|
|
1035
|
+
dppx?: number | undefined;
|
|
1022
1036
|
}, {
|
|
1023
1037
|
binaryUrl?: string | undefined;
|
|
1024
1038
|
pixelWidth?: number | undefined;
|
|
@@ -1027,6 +1041,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1027
1041
|
duration?: number | undefined;
|
|
1028
1042
|
mediaType?: string | undefined;
|
|
1029
1043
|
videoCodec?: string | undefined;
|
|
1044
|
+
quality?: string | undefined;
|
|
1045
|
+
dppx?: number | undefined;
|
|
1030
1046
|
}>, "many">;
|
|
1031
1047
|
poster: z.ZodOptional<z.ZodObject<{
|
|
1032
1048
|
id: z.ZodString;
|
|
@@ -1204,6 +1220,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1204
1220
|
duration?: number | undefined;
|
|
1205
1221
|
mediaType?: string | undefined;
|
|
1206
1222
|
videoCodec?: string | undefined;
|
|
1223
|
+
quality?: string | undefined;
|
|
1224
|
+
dppx?: number | undefined;
|
|
1207
1225
|
}[];
|
|
1208
1226
|
format?: "standardInline" | "mobile" | undefined;
|
|
1209
1227
|
poster?: {
|
|
@@ -1251,6 +1269,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1251
1269
|
duration?: number | undefined;
|
|
1252
1270
|
mediaType?: string | undefined;
|
|
1253
1271
|
videoCodec?: string | undefined;
|
|
1272
|
+
quality?: string | undefined;
|
|
1273
|
+
dppx?: number | undefined;
|
|
1254
1274
|
}[];
|
|
1255
1275
|
format?: "standardInline" | "mobile" | undefined;
|
|
1256
1276
|
poster?: {
|
|
@@ -1337,6 +1357,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1337
1357
|
duration?: number | undefined;
|
|
1338
1358
|
mediaType?: string | undefined;
|
|
1339
1359
|
videoCodec?: string | undefined;
|
|
1360
|
+
quality?: string | undefined;
|
|
1361
|
+
dppx?: number | undefined;
|
|
1340
1362
|
}[];
|
|
1341
1363
|
format?: "standardInline" | "mobile" | undefined;
|
|
1342
1364
|
poster?: {
|
|
@@ -1405,6 +1427,8 @@ export declare const ClipSet: z.ZodObject<{
|
|
|
1405
1427
|
duration?: number | undefined;
|
|
1406
1428
|
mediaType?: string | undefined;
|
|
1407
1429
|
videoCodec?: string | undefined;
|
|
1430
|
+
quality?: string | undefined;
|
|
1431
|
+
dppx?: number | undefined;
|
|
1408
1432
|
}[];
|
|
1409
1433
|
format?: "standardInline" | "mobile" | undefined;
|
|
1410
1434
|
poster?: {
|
|
@@ -2855,6 +2879,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
2855
2879
|
pixelHeight: z.ZodOptional<z.ZodNumber>;
|
|
2856
2880
|
pixelWidth: z.ZodOptional<z.ZodNumber>;
|
|
2857
2881
|
videoCodec: z.ZodOptional<z.ZodString>;
|
|
2882
|
+
quality: z.ZodOptional<z.ZodString>;
|
|
2883
|
+
dppx: z.ZodOptional<z.ZodNumber>;
|
|
2858
2884
|
}, "strip", z.ZodTypeAny, {
|
|
2859
2885
|
binaryUrl?: string | undefined;
|
|
2860
2886
|
pixelWidth?: number | undefined;
|
|
@@ -2863,6 +2889,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
2863
2889
|
duration?: number | undefined;
|
|
2864
2890
|
mediaType?: string | undefined;
|
|
2865
2891
|
videoCodec?: string | undefined;
|
|
2892
|
+
quality?: string | undefined;
|
|
2893
|
+
dppx?: number | undefined;
|
|
2866
2894
|
}, {
|
|
2867
2895
|
binaryUrl?: string | undefined;
|
|
2868
2896
|
pixelWidth?: number | undefined;
|
|
@@ -2871,6 +2899,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
2871
2899
|
duration?: number | undefined;
|
|
2872
2900
|
mediaType?: string | undefined;
|
|
2873
2901
|
videoCodec?: string | undefined;
|
|
2902
|
+
quality?: string | undefined;
|
|
2903
|
+
dppx?: number | undefined;
|
|
2874
2904
|
}>, "many">;
|
|
2875
2905
|
poster: z.ZodOptional<z.ZodObject<{
|
|
2876
2906
|
id: z.ZodString;
|
|
@@ -3048,6 +3078,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3048
3078
|
duration?: number | undefined;
|
|
3049
3079
|
mediaType?: string | undefined;
|
|
3050
3080
|
videoCodec?: string | undefined;
|
|
3081
|
+
quality?: string | undefined;
|
|
3082
|
+
dppx?: number | undefined;
|
|
3051
3083
|
}[];
|
|
3052
3084
|
format?: "standardInline" | "mobile" | undefined;
|
|
3053
3085
|
poster?: {
|
|
@@ -3095,6 +3127,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3095
3127
|
duration?: number | undefined;
|
|
3096
3128
|
mediaType?: string | undefined;
|
|
3097
3129
|
videoCodec?: string | undefined;
|
|
3130
|
+
quality?: string | undefined;
|
|
3131
|
+
dppx?: number | undefined;
|
|
3098
3132
|
}[];
|
|
3099
3133
|
format?: "standardInline" | "mobile" | undefined;
|
|
3100
3134
|
poster?: {
|
|
@@ -3181,6 +3215,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3181
3215
|
duration?: number | undefined;
|
|
3182
3216
|
mediaType?: string | undefined;
|
|
3183
3217
|
videoCodec?: string | undefined;
|
|
3218
|
+
quality?: string | undefined;
|
|
3219
|
+
dppx?: number | undefined;
|
|
3184
3220
|
}[];
|
|
3185
3221
|
format?: "standardInline" | "mobile" | undefined;
|
|
3186
3222
|
poster?: {
|
|
@@ -3249,6 +3285,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3249
3285
|
duration?: number | undefined;
|
|
3250
3286
|
mediaType?: string | undefined;
|
|
3251
3287
|
videoCodec?: string | undefined;
|
|
3288
|
+
quality?: string | undefined;
|
|
3289
|
+
dppx?: number | undefined;
|
|
3252
3290
|
}[];
|
|
3253
3291
|
format?: "standardInline" | "mobile" | undefined;
|
|
3254
3292
|
poster?: {
|
|
@@ -3686,6 +3724,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3686
3724
|
duration?: number | undefined;
|
|
3687
3725
|
mediaType?: string | undefined;
|
|
3688
3726
|
videoCodec?: string | undefined;
|
|
3727
|
+
quality?: string | undefined;
|
|
3728
|
+
dppx?: number | undefined;
|
|
3689
3729
|
}[];
|
|
3690
3730
|
format?: "standardInline" | "mobile" | undefined;
|
|
3691
3731
|
poster?: {
|
|
@@ -3926,6 +3966,8 @@ export declare const baseMediaSchema: z.ZodObject<{
|
|
|
3926
3966
|
duration?: number | undefined;
|
|
3927
3967
|
mediaType?: string | undefined;
|
|
3928
3968
|
videoCodec?: string | undefined;
|
|
3969
|
+
quality?: string | undefined;
|
|
3970
|
+
dppx?: number | undefined;
|
|
3929
3971
|
}[];
|
|
3930
3972
|
format?: "standardInline" | "mobile" | undefined;
|
|
3931
3973
|
poster?: {
|
|
@@ -94,6 +94,8 @@ const ClipSource = zod_1.z.object({
|
|
|
94
94
|
pixelHeight: zod_1.z.number().optional(),
|
|
95
95
|
pixelWidth: zod_1.z.number().optional(),
|
|
96
96
|
videoCodec: zod_1.z.string().optional(),
|
|
97
|
+
quality: zod_1.z.string().optional(),
|
|
98
|
+
dppx: zod_1.z.number().optional(),
|
|
97
99
|
});
|
|
98
100
|
exports.Clip = zod_1.z.object({
|
|
99
101
|
id: zod_1.z.string(),
|