Skip to content

Commit b89effd

Browse files
committed
feat(Video Type) add new props & make non null props required
1 parent 2ddda10 commit b89effd

File tree

1 file changed

+36
-11
lines changed

1 file changed

+36
-11
lines changed

src/types.ts

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,69 @@ export interface Video {
1111
/**
1212
* When an webhook was created, presented in ISO-8601 format.
1313
*/
14-
createdAt?: Date;
14+
createdAt: Date;
1515
/**
1616
* The title of the video content.
1717
*/
1818
title: string;
1919
/**
2020
* A description for the video content.
2121
*/
22-
description?: string;
22+
description: string;
2323
/**
2424
* The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.
2525
*/
26-
publishedAt?: string;
26+
publishedAt: Date;
2727
/**
2828
* The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.
2929
*/
30-
updatedAt?: Date;
30+
updatedAt: Date;
31+
/**
32+
* The date and time the video was discarded. Date and time are provided using ISO-8601 UTC format.
33+
*/
34+
discardedAt?: Date;
35+
/**
36+
* The date and time the video will be permanently deleted. Date and time are provided using ISO-8601 UTC format.
37+
*/
38+
deletesAt?: Date;
39+
/**
40+
* Returns `true` for videos you discarded.
41+
*/
42+
discarded: boolean;
43+
/**
44+
* Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
45+
*/
46+
language?: Intl.Locale;
47+
/**
48+
* Returns the origin of the last update on the video's `language` attribute.
49+
*/
50+
languageOrigin?: LanguageOrigin;
3151
/**
3252
* One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.
3353
*/
34-
tags?: Array<string>;
54+
tags: Array<string>;
3555
/**
3656
* Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video.
3757
*/
38-
metadata?: Array<Metadata>;
39-
source?: VideoSource;
40-
assets?: VideoAssets;
58+
metadata: Array<Metadata>;
59+
source: VideoSource;
60+
assets: VideoAssets;
4161
/**
4262
* The id of the player that will be applied on the video.
4363
*/
4464
playerId?: string;
4565
/**
4666
* Defines if the content is publicly reachable or if a unique token is needed for each play session.
4767
*/
48-
_public?: boolean;
68+
_public: boolean;
4969
/**
5070
* Defines if video is panoramic.
5171
*/
52-
panoramic?: boolean;
72+
panoramic: boolean;
5373
/**
5474
* This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.
5575
*/
56-
mp4Support?: boolean;
76+
mp4Support: boolean;
5777
}
5878
interface Metadata {
5979
/**
@@ -106,3 +126,8 @@ interface VideoAssets {
106126
*/
107127
mp4?: string;
108128
}
129+
130+
enum LanguageOrigin {
131+
api = 'api',
132+
auto = 'auto',
133+
}

0 commit comments

Comments
 (0)