triangle-types 1.0.197 → 1.0.198

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.
@@ -12,6 +12,7 @@ export declare class TwitterUser {
12
12
  readonly subscription_type_id: string;
13
13
  readonly verification_type_id: string;
14
14
  readonly entities?: string;
15
+ readonly scout_id?: string;
15
16
  constructor(twitter_user: TwitterUser);
16
17
  static is(twitter_user: any): twitter_user is TwitterUser;
17
18
  }
@@ -12,6 +12,7 @@ export class TwitterUser {
12
12
  subscription_type_id;
13
13
  verification_type_id;
14
14
  entities;
15
+ scout_id;
15
16
  constructor(twitter_user) {
16
17
  if (!TwitterUser.is(twitter_user)) {
17
18
  throw Error("Invalid input.");
@@ -29,6 +30,7 @@ export class TwitterUser {
29
30
  this.subscription_type_id = twitter_user.subscription_type_id;
30
31
  this.verification_type_id = twitter_user.verification_type_id;
31
32
  this.entities = twitter_user.entities;
33
+ this.scout_id = twitter_user.scout_id;
32
34
  }
33
35
  static is(twitter_user) {
34
36
  return (twitter_user !== undefined &&
@@ -44,6 +46,7 @@ export class TwitterUser {
44
46
  typeof twitter_user.is_parody === "boolean" &&
45
47
  typeof twitter_user.subscription_type_id === "string" &&
46
48
  typeof twitter_user.verification_type_id === "string" &&
47
- (twitter_user.entities === undefined || typeof twitter_user.entities === "string"));
49
+ (twitter_user.entities === undefined || typeof twitter_user.entities === "string") &&
50
+ (twitter_user.scout_id === undefined || typeof twitter_user.scout_id === "string"));
48
51
  }
49
52
  }
@@ -1,6 +1,7 @@
1
1
  export declare class YoutubeChannel {
2
2
  readonly youtube_channel_id: string;
3
3
  readonly name: string;
4
+ readonly scout_id?: string;
4
5
  constructor(youtube_channel: YoutubeChannel);
5
6
  static is(youtube_channel: any): youtube_channel is YoutubeChannel;
6
7
  }
@@ -1,16 +1,19 @@
1
1
  export class YoutubeChannel {
2
2
  youtube_channel_id;
3
3
  name;
4
+ scout_id;
4
5
  constructor(youtube_channel) {
5
6
  if (!YoutubeChannel.is(youtube_channel)) {
6
7
  throw Error("Invalid input.");
7
8
  }
8
9
  this.youtube_channel_id = youtube_channel.youtube_channel_id;
9
10
  this.name = youtube_channel.name;
11
+ this.scout_id = youtube_channel.scout_id;
10
12
  }
11
13
  static is(youtube_channel) {
12
14
  return (youtube_channel !== undefined &&
13
15
  typeof youtube_channel.youtube_channel_id === "string" &&
14
- typeof youtube_channel.name === "string");
16
+ typeof youtube_channel.name === "string" &&
17
+ (youtube_channel.scout_id === undefined || typeof youtube_channel.scout_id === "string"));
15
18
  }
16
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.197",
3
+ "version": "1.0.198",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -12,6 +12,7 @@ export class TwitterUser {
12
12
  readonly subscription_type_id : string
13
13
  readonly verification_type_id : string
14
14
  readonly entities? : string
15
+ readonly scout_id? : string
15
16
 
16
17
  constructor(twitter_user : TwitterUser) {
17
18
  if (!TwitterUser.is(twitter_user)) {
@@ -30,6 +31,7 @@ export class TwitterUser {
30
31
  this.subscription_type_id = twitter_user.subscription_type_id
31
32
  this.verification_type_id = twitter_user.verification_type_id
32
33
  this.entities = twitter_user.entities
34
+ this.scout_id = twitter_user.scout_id
33
35
  }
34
36
 
35
37
  static is(twitter_user : any) : twitter_user is TwitterUser {
@@ -47,7 +49,8 @@ export class TwitterUser {
47
49
  typeof twitter_user.is_parody === "boolean" &&
48
50
  typeof twitter_user.subscription_type_id === "string" &&
49
51
  typeof twitter_user.verification_type_id === "string" &&
50
- (twitter_user.entities === undefined || typeof twitter_user.entities === "string")
52
+ (twitter_user.entities === undefined || typeof twitter_user.entities === "string") &&
53
+ (twitter_user.scout_id === undefined || typeof twitter_user.scout_id === "string")
51
54
  )
52
55
  }
53
56
  }
@@ -1,6 +1,7 @@
1
1
  export class YoutubeChannel {
2
2
  readonly youtube_channel_id : string
3
3
  readonly name : string
4
+ readonly scout_id? : string
4
5
 
5
6
  constructor(youtube_channel : YoutubeChannel) {
6
7
  if (!YoutubeChannel.is(youtube_channel)) {
@@ -8,13 +9,15 @@ export class YoutubeChannel {
8
9
  }
9
10
  this.youtube_channel_id = youtube_channel.youtube_channel_id
10
11
  this.name = youtube_channel.name
12
+ this.scout_id = youtube_channel.scout_id
11
13
  }
12
14
 
13
15
  static is(youtube_channel : any) : youtube_channel is YoutubeChannel {
14
16
  return (
15
17
  youtube_channel !== undefined &&
16
18
  typeof youtube_channel.youtube_channel_id === "string" &&
17
- typeof youtube_channel.name === "string"
19
+ typeof youtube_channel.name === "string" &&
20
+ (youtube_channel.scout_id === undefined || typeof youtube_channel.scout_id === "string")
18
21
  )
19
22
  }
20
23
  }