triangle-types 1.0.221 → 1.0.223
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/dist/src/types/youtube/YoutubeVideo.d.ts +2 -2
- package/dist/src/types/youtube/YoutubeVideo.js +6 -6
- package/dist/src/types/youtube/YoutubeVideoTag.d.ts +2 -2
- package/dist/src/types/youtube/YoutubeVideoTag.js +5 -5
- package/package.json +1 -1
- package/src/types/youtube/YoutubeVideo.ts +6 -6
- package/src/types/youtube/YoutubeVideoTag.ts +5 -5
|
@@ -2,11 +2,11 @@ import { YoutubeChannel } from "./YoutubeChannel.js";
|
|
|
2
2
|
export declare class YoutubeVideo {
|
|
3
3
|
readonly youtube_video_id: string;
|
|
4
4
|
readonly youtube_channel_id: string;
|
|
5
|
-
readonly
|
|
5
|
+
readonly time: string;
|
|
6
6
|
readonly title: string;
|
|
7
7
|
readonly description: string;
|
|
8
8
|
readonly duration?: number;
|
|
9
|
-
readonly
|
|
9
|
+
readonly s3_id_json?: string;
|
|
10
10
|
readonly [x: string]: any;
|
|
11
11
|
constructor(youtube_video: YoutubeVideo);
|
|
12
12
|
static is(youtube_video: any): youtube_video is YoutubeVideo;
|
|
@@ -2,32 +2,32 @@ import { YoutubeChannel } from "./YoutubeChannel.js";
|
|
|
2
2
|
export class YoutubeVideo {
|
|
3
3
|
youtube_video_id;
|
|
4
4
|
youtube_channel_id;
|
|
5
|
-
|
|
5
|
+
time;
|
|
6
6
|
title;
|
|
7
7
|
description;
|
|
8
8
|
duration;
|
|
9
|
-
|
|
9
|
+
s3_id_json;
|
|
10
10
|
constructor(youtube_video) {
|
|
11
11
|
if (!YoutubeVideo.is(youtube_video)) {
|
|
12
12
|
throw Error("Invalid input.");
|
|
13
13
|
}
|
|
14
14
|
this.youtube_video_id = youtube_video.youtube_video_id;
|
|
15
15
|
this.youtube_channel_id = youtube_video.youtube_channel_id;
|
|
16
|
-
this.
|
|
16
|
+
this.time = youtube_video.time;
|
|
17
17
|
this.title = youtube_video.title;
|
|
18
18
|
this.description = youtube_video.description;
|
|
19
19
|
this.duration = youtube_video.duration;
|
|
20
|
-
this.
|
|
20
|
+
this.s3_id_json = youtube_video.s3_id_json;
|
|
21
21
|
}
|
|
22
22
|
static is(youtube_video) {
|
|
23
23
|
return (youtube_video !== undefined &&
|
|
24
24
|
typeof youtube_video.youtube_video_id === "string" &&
|
|
25
25
|
typeof youtube_video.youtube_channel_id === "string" &&
|
|
26
|
-
typeof youtube_video.
|
|
26
|
+
typeof youtube_video.time === "string" &&
|
|
27
27
|
typeof youtube_video.title === "string" &&
|
|
28
28
|
typeof youtube_video.description === "string" &&
|
|
29
29
|
(youtube_video.duration === undefined || typeof youtube_video.duration === "number" && !isNaN(youtube_video.duration)) &&
|
|
30
|
-
(youtube_video.
|
|
30
|
+
(youtube_video.s3_id_json === undefined || typeof youtube_video.s3_id_json === "string"));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export class YoutubeVideoAux extends YoutubeVideo {
|
|
@@ -2,8 +2,8 @@ import { YoutubeVideoAux } from "./YoutubeVideo.js";
|
|
|
2
2
|
export declare class YoutubeVideoTag {
|
|
3
3
|
readonly youtube_video_id: string;
|
|
4
4
|
readonly tag_id: string;
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly time: string;
|
|
6
|
+
readonly is_relevant?: boolean;
|
|
7
7
|
readonly [x: string]: any;
|
|
8
8
|
constructor(youtube_video_tag: YoutubeVideoTag);
|
|
9
9
|
static is(youtube_video_tag: any): youtube_video_tag is YoutubeVideoTag;
|
|
@@ -2,23 +2,23 @@ import { YoutubeVideoAux } from "./YoutubeVideo.js";
|
|
|
2
2
|
export class YoutubeVideoTag {
|
|
3
3
|
youtube_video_id;
|
|
4
4
|
tag_id;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
time;
|
|
6
|
+
is_relevant;
|
|
7
7
|
constructor(youtube_video_tag) {
|
|
8
8
|
if (!YoutubeVideoTag.is(youtube_video_tag)) {
|
|
9
9
|
throw Error("Invalid input.");
|
|
10
10
|
}
|
|
11
11
|
this.youtube_video_id = youtube_video_tag.youtube_video_id;
|
|
12
12
|
this.tag_id = youtube_video_tag.tag_id;
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
13
|
+
this.time = youtube_video_tag.time;
|
|
14
|
+
this.is_relevant = youtube_video_tag.is_relevant;
|
|
15
15
|
}
|
|
16
16
|
static is(youtube_video_tag) {
|
|
17
17
|
return (youtube_video_tag !== undefined &&
|
|
18
18
|
typeof youtube_video_tag.youtube_video_id === "string" &&
|
|
19
19
|
typeof youtube_video_tag.tag_id === "string" &&
|
|
20
20
|
typeof youtube_video_tag.publish_time === "string" &&
|
|
21
|
-
(youtube_video_tag.
|
|
21
|
+
(youtube_video_tag.is_relevant === undefined || typeof youtube_video_tag.relevance === "boolean"));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export class YoutubeVideoTagAux extends YoutubeVideoTag {
|
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@ import { YoutubeChannel } from "./YoutubeChannel"
|
|
|
3
3
|
export class YoutubeVideo {
|
|
4
4
|
readonly youtube_video_id : string
|
|
5
5
|
readonly youtube_channel_id : string
|
|
6
|
-
readonly
|
|
6
|
+
readonly time : string
|
|
7
7
|
readonly title : string
|
|
8
8
|
readonly description : string
|
|
9
9
|
readonly duration? : number
|
|
10
|
-
readonly
|
|
10
|
+
readonly s3_id_json? : string
|
|
11
11
|
readonly [x : string] : any
|
|
12
12
|
|
|
13
13
|
constructor(youtube_video : YoutubeVideo) {
|
|
@@ -16,11 +16,11 @@ export class YoutubeVideo {
|
|
|
16
16
|
}
|
|
17
17
|
this.youtube_video_id = youtube_video.youtube_video_id
|
|
18
18
|
this.youtube_channel_id = youtube_video.youtube_channel_id
|
|
19
|
-
this.
|
|
19
|
+
this.time = youtube_video.time
|
|
20
20
|
this.title = youtube_video.title
|
|
21
21
|
this.description = youtube_video.description
|
|
22
22
|
this.duration = youtube_video.duration
|
|
23
|
-
this.
|
|
23
|
+
this.s3_id_json = youtube_video.s3_id_json
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
static is(youtube_video : any) : youtube_video is YoutubeVideo {
|
|
@@ -28,11 +28,11 @@ export class YoutubeVideo {
|
|
|
28
28
|
youtube_video !== undefined &&
|
|
29
29
|
typeof youtube_video.youtube_video_id === "string" &&
|
|
30
30
|
typeof youtube_video.youtube_channel_id === "string" &&
|
|
31
|
-
typeof youtube_video.
|
|
31
|
+
typeof youtube_video.time === "string" &&
|
|
32
32
|
typeof youtube_video.title === "string" &&
|
|
33
33
|
typeof youtube_video.description === "string" &&
|
|
34
34
|
(youtube_video.duration === undefined || typeof youtube_video.duration === "number" && !isNaN(youtube_video.duration)) &&
|
|
35
|
-
(youtube_video.
|
|
35
|
+
(youtube_video.s3_id_json === undefined || typeof youtube_video.s3_id_json === "string")
|
|
36
36
|
)
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -3,8 +3,8 @@ import { YoutubeVideoAux } from "./YoutubeVideo"
|
|
|
3
3
|
export class YoutubeVideoTag {
|
|
4
4
|
readonly youtube_video_id : string
|
|
5
5
|
readonly tag_id : string
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly time : string
|
|
7
|
+
readonly is_relevant? : boolean
|
|
8
8
|
readonly [x : string] : any
|
|
9
9
|
|
|
10
10
|
constructor(youtube_video_tag : YoutubeVideoTag) {
|
|
@@ -13,8 +13,8 @@ export class YoutubeVideoTag {
|
|
|
13
13
|
}
|
|
14
14
|
this.youtube_video_id = youtube_video_tag.youtube_video_id
|
|
15
15
|
this.tag_id = youtube_video_tag.tag_id
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
16
|
+
this.time = youtube_video_tag.time
|
|
17
|
+
this.is_relevant = youtube_video_tag.is_relevant
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
static is(youtube_video_tag : any) : youtube_video_tag is YoutubeVideoTag {
|
|
@@ -23,7 +23,7 @@ export class YoutubeVideoTag {
|
|
|
23
23
|
typeof youtube_video_tag.youtube_video_id === "string" &&
|
|
24
24
|
typeof youtube_video_tag.tag_id === "string" &&
|
|
25
25
|
typeof youtube_video_tag.publish_time === "string" &&
|
|
26
|
-
(youtube_video_tag.
|
|
26
|
+
(youtube_video_tag.is_relevant === undefined || typeof youtube_video_tag.relevance === "boolean")
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
}
|