triangle-types 1.0.222 → 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.
@@ -2,7 +2,7 @@ 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 publish_time: string;
5
+ readonly time: string;
6
6
  readonly title: string;
7
7
  readonly description: string;
8
8
  readonly duration?: number;
@@ -2,7 +2,7 @@ import { YoutubeChannel } from "./YoutubeChannel.js";
2
2
  export class YoutubeVideo {
3
3
  youtube_video_id;
4
4
  youtube_channel_id;
5
- publish_time;
5
+ time;
6
6
  title;
7
7
  description;
8
8
  duration;
@@ -13,7 +13,7 @@ export class YoutubeVideo {
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.publish_time = youtube_video.publish_time;
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;
@@ -23,7 +23,7 @@ export class YoutubeVideo {
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.publish_time === "string" &&
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)) &&
@@ -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 publish_time: string;
6
- readonly relevance?: string;
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
- publish_time;
6
- relevance;
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.publish_time = youtube_video_tag.publish_time;
14
- this.relevance = youtube_video_tag.relevance;
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.relevance === undefined || typeof youtube_video_tag.relevance === "string"));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.222",
3
+ "version": "1.0.223",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ 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 publish_time : string
6
+ readonly time : string
7
7
  readonly title : string
8
8
  readonly description : string
9
9
  readonly duration? : number
@@ -16,7 +16,7 @@ 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.publish_time = youtube_video.publish_time
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
@@ -28,7 +28,7 @@ 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.publish_time === "string" &&
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)) &&
@@ -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 publish_time : string
7
- readonly relevance? : string
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.publish_time = youtube_video_tag.publish_time
17
- this.relevance = youtube_video_tag.relevance
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.relevance === undefined || typeof youtube_video_tag.relevance === "string")
26
+ (youtube_video_tag.is_relevant === undefined || typeof youtube_video_tag.relevance === "boolean")
27
27
  )
28
28
  }
29
29
  }