Skip to content

Commit

Permalink
feat(Video Type) add new props & make non null props required
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainPetit1 committed Oct 29, 2024
1 parent 2ddda10 commit b89effd
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,69 @@ export interface Video {
/**
* When an webhook was created, presented in ISO-8601 format.
*/
createdAt?: Date;
createdAt: Date;
/**
* The title of the video content.
*/
title: string;
/**
* A description for the video content.
*/
description?: string;
description: string;
/**
* The date and time the API created the video. Date and time are provided using ISO-8601 UTC format.
*/
publishedAt?: string;
publishedAt: Date;
/**
* The date and time the video was updated. Date and time are provided using ISO-8601 UTC format.
*/
updatedAt?: Date;
updatedAt: Date;
/**
* The date and time the video was discarded. Date and time are provided using ISO-8601 UTC format.
*/
discardedAt?: Date;
/**
* The date and time the video will be permanently deleted. Date and time are provided using ISO-8601 UTC format.
*/
deletesAt?: Date;
/**
* Returns `true` for videos you discarded.
*/
discarded: boolean;
/**
* Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
*/
language?: Intl.Locale;
/**
* Returns the origin of the last update on the video's `language` attribute.
*/
languageOrigin?: LanguageOrigin;
/**
* One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.
*/
tags?: Array<string>;
tags: Array<string>;
/**
* 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.
*/
metadata?: Array<Metadata>;
source?: VideoSource;
assets?: VideoAssets;
metadata: Array<Metadata>;
source: VideoSource;
assets: VideoAssets;
/**
* The id of the player that will be applied on the video.
*/
playerId?: string;
/**
* Defines if the content is publicly reachable or if a unique token is needed for each play session.
*/
_public?: boolean;
_public: boolean;
/**
* Defines if video is panoramic.
*/
panoramic?: boolean;
panoramic: boolean;
/**
* This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.
*/
mp4Support?: boolean;
mp4Support: boolean;
}
interface Metadata {
/**
Expand Down Expand Up @@ -106,3 +126,8 @@ interface VideoAssets {
*/
mp4?: string;
}

enum LanguageOrigin {
api = 'api',
auto = 'auto',
}

0 comments on commit b89effd

Please sign in to comment.