triangle-types 1.0.196 → 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.
@@ -5,6 +5,7 @@ export declare class FederalCongressMember {
5
5
  readonly name_reverse: string;
6
6
  readonly name_prefix?: string;
7
7
  readonly name_first: string;
8
+ readonly name_middle?: string;
8
9
  readonly name_last: string;
9
10
  readonly birth_year: number;
10
11
  readonly chamber_id: string;
@@ -5,6 +5,7 @@ export class FederalCongressMember {
5
5
  name_reverse;
6
6
  name_prefix;
7
7
  name_first;
8
+ name_middle;
8
9
  name_last;
9
10
  birth_year;
10
11
  chamber_id;
@@ -24,6 +25,7 @@ export class FederalCongressMember {
24
25
  this.name_reverse = federal_congress_member.name_reverse;
25
26
  this.name_prefix = federal_congress_member.name_prefix;
26
27
  this.name_first = federal_congress_member.name_first;
28
+ this.name_middle = federal_congress_member.name_middle;
27
29
  this.name_last = federal_congress_member.name_last;
28
30
  this.birth_year = federal_congress_member.birth_year;
29
31
  this.chamber_id = federal_congress_member.chamber_id;
@@ -42,6 +44,7 @@ export class FederalCongressMember {
42
44
  typeof federal_congress_member.name_reverse === "string" &&
43
45
  (federal_congress_member.name_prefix === undefined || typeof federal_congress_member.name_prefix === "string") &&
44
46
  typeof federal_congress_member.name_first === "string" &&
47
+ (federal_congress_member.name_middle === undefined || typeof federal_congress_member.name_middle === "string") &&
45
48
  typeof federal_congress_member.name_last === "string" &&
46
49
  typeof federal_congress_member.birth_year === "number" && !isNaN(federal_congress_member.birth_year) &&
47
50
  is_state_id(federal_congress_member.state_id) &&
@@ -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.196",
3
+ "version": "1.0.198",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -6,6 +6,7 @@ export class FederalCongressMember {
6
6
  readonly name_reverse : string
7
7
  readonly name_prefix? : string
8
8
  readonly name_first : string
9
+ readonly name_middle? : string
9
10
  readonly name_last : string
10
11
  readonly birth_year : number
11
12
  readonly chamber_id : string
@@ -27,6 +28,7 @@ export class FederalCongressMember {
27
28
  this.name_reverse = federal_congress_member.name_reverse
28
29
  this.name_prefix = federal_congress_member.name_prefix
29
30
  this.name_first = federal_congress_member.name_first
31
+ this.name_middle = federal_congress_member.name_middle
30
32
  this.name_last = federal_congress_member.name_last
31
33
  this.birth_year = federal_congress_member.birth_year
32
34
  this.chamber_id = federal_congress_member.chamber_id
@@ -47,6 +49,7 @@ export class FederalCongressMember {
47
49
  typeof federal_congress_member.name_reverse === "string" &&
48
50
  (federal_congress_member.name_prefix === undefined || typeof federal_congress_member.name_prefix === "string") &&
49
51
  typeof federal_congress_member.name_first === "string" &&
52
+ (federal_congress_member.name_middle === undefined || typeof federal_congress_member.name_middle === "string") &&
50
53
  typeof federal_congress_member.name_last === "string" &&
51
54
  typeof federal_congress_member.birth_year === "number" && !isNaN(federal_congress_member.birth_year) &&
52
55
  is_state_id(federal_congress_member.state_id) &&
@@ -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
  }