triangle-types 1.0.0
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/index.d.ts +59 -0
- package/dist/src/index.js +59 -0
- package/dist/src/types/APIError.d.ts +4 -0
- package/dist/src/types/APIError.js +19 -0
- package/dist/src/types/State.d.ts +8 -0
- package/dist/src/types/State.js +210 -0
- package/dist/src/types/User.d.ts +7 -0
- package/dist/src/types/User.js +20 -0
- package/dist/src/types/federal_congress/FederalCongressBill.d.ts +18 -0
- package/dist/src/types/federal_congress/FederalCongressBill.js +44 -0
- package/dist/src/types/federal_congress/FederalCongressBillDocument.d.ts +20 -0
- package/dist/src/types/federal_congress/FederalCongressBillDocument.js +49 -0
- package/dist/src/types/federal_dockets/FederalDocket.d.ts +9 -0
- package/dist/src/types/federal_dockets/FederalDocket.js +25 -0
- package/dist/src/types/federal_dockets/FederalDocketAgency.d.ts +8 -0
- package/dist/src/types/federal_dockets/FederalDocketAgency.js +22 -0
- package/dist/src/types/federal_dockets/FederalDocketComment.d.ts +30 -0
- package/dist/src/types/federal_dockets/FederalDocketComment.js +86 -0
- package/dist/src/types/federal_dockets/FederalDocketCommentAttachment.d.ts +9 -0
- package/dist/src/types/federal_dockets/FederalDocketCommentAttachment.js +25 -0
- package/dist/src/types/federal_dockets/FederalDocketDocument.d.ts +27 -0
- package/dist/src/types/federal_dockets/FederalDocketDocument.js +74 -0
- package/dist/src/types/federal_elections/FederalElection.d.ts +27 -0
- package/dist/src/types/federal_elections/FederalElection.js +86 -0
- package/dist/src/types/federal_elections/FederalElectionCandidate.d.ts +40 -0
- package/dist/src/types/federal_elections/FederalElectionCandidate.js +105 -0
- package/dist/src/types/federal_elections/FederalElectionCandidateCommittee.d.ts +7 -0
- package/dist/src/types/federal_elections/FederalElectionCandidateCommittee.js +32 -0
- package/dist/src/types/federal_elections/FederalElectionCommittee.d.ts +27 -0
- package/dist/src/types/federal_elections/FederalElectionCommittee.js +68 -0
- package/dist/src/types/federal_elections/FederalElectionDonation.d.ts +29 -0
- package/dist/src/types/federal_elections/FederalElectionDonation.js +82 -0
- package/dist/src/types/federal_elections/FederalElectionF1File.d.ts +18 -0
- package/dist/src/types/federal_elections/FederalElectionF1File.js +48 -0
- package/dist/src/types/federal_elections/FederalElectionF24File.d.ts +12 -0
- package/dist/src/types/federal_elections/FederalElectionF24File.js +32 -0
- package/dist/src/types/federal_elections/FederalElectionF2File.d.ts +15 -0
- package/dist/src/types/federal_elections/FederalElectionF2File.js +39 -0
- package/dist/src/types/federal_elections/FederalElectionF3File.d.ts +13 -0
- package/dist/src/types/federal_elections/FederalElectionF3File.js +37 -0
- package/dist/src/types/federal_elections/FederalElectionFile.d.ts +15 -0
- package/dist/src/types/federal_elections/FederalElectionFile.js +33 -0
- package/dist/src/types/federal_elections/FederalElectionFileExpenditure.d.ts +28 -0
- package/dist/src/types/federal_elections/FederalElectionFileExpenditure.js +70 -0
- package/dist/src/types/federal_elections/FormTypeID.d.ts +9 -0
- package/dist/src/types/federal_elections/FormTypeID.js +17 -0
- package/dist/src/types/federal_lobby/FederalLobbyAgency.d.ts +6 -0
- package/dist/src/types/federal_lobby/FederalLobbyAgency.js +16 -0
- package/dist/src/types/federal_lobby/FederalLobbyClient.d.ts +15 -0
- package/dist/src/types/federal_lobby/FederalLobbyClient.js +43 -0
- package/dist/src/types/federal_lobby/FederalLobbyDocument.d.ts +66 -0
- package/dist/src/types/federal_lobby/FederalLobbyDocument.js +190 -0
- package/dist/src/types/federal_lobby/FederalLobbyDocumentInterest.d.ts +18 -0
- package/dist/src/types/federal_lobby/FederalLobbyDocumentInterest.js +50 -0
- package/dist/src/types/federal_lobby/FederalLobbyLobbyist.d.ts +12 -0
- package/dist/src/types/federal_lobby/FederalLobbyLobbyist.js +34 -0
- package/dist/src/types/federal_lobby/FederalLobbyRegistrant.d.ts +20 -0
- package/dist/src/types/federal_lobby/FederalLobbyRegistrant.js +58 -0
- package/dist/src/types/federal_register/FederalRegisterAgency.d.ts +13 -0
- package/dist/src/types/federal_register/FederalRegisterAgency.js +37 -0
- package/dist/src/types/federal_register/FederalRegisterDocument.d.ts +21 -0
- package/dist/src/types/federal_register/FederalRegisterDocument.js +56 -0
- package/dist/src/types/federal_rules/FederalRuleSection.d.ts +13 -0
- package/dist/src/types/federal_rules/FederalRuleSection.js +37 -0
- package/dist/src/types/federal_rules/FederalRuleTitle.d.ts +8 -0
- package/dist/src/types/federal_rules/FederalRuleTitle.js +22 -0
- package/dist/src/types/press/PressArticle.d.ts +12 -0
- package/dist/src/types/press/PressArticle.js +34 -0
- package/dist/src/types/press/PressArticleTag.d.ts +16 -0
- package/dist/src/types/press/PressArticleTag.js +40 -0
- package/dist/src/types/state_permits/AR/ARStateFacility.d.ts +7 -0
- package/dist/src/types/state_permits/AR/ARStateFacility.js +15 -0
- package/dist/src/types/state_permits/AR/ARStatePermit.d.ts +8 -0
- package/dist/src/types/state_permits/AR/ARStatePermit.js +18 -0
- package/dist/src/types/state_permits/AR/ARStatePermitDocument.d.ts +9 -0
- package/dist/src/types/state_permits/AR/ARStatePermitDocument.js +21 -0
- package/dist/src/types/state_permits/KY/KYStateFacility.d.ts +7 -0
- package/dist/src/types/state_permits/KY/KYStateFacility.js +15 -0
- package/dist/src/types/state_permits/KY/KYStatePermit.d.ts +7 -0
- package/dist/src/types/state_permits/KY/KYStatePermit.js +15 -0
- package/dist/src/types/state_permits/KY/KYStatePermitDocument.d.ts +8 -0
- package/dist/src/types/state_permits/KY/KYStatePermitDocument.js +18 -0
- package/dist/src/types/state_permits/NC/NCStateFacility.d.ts +8 -0
- package/dist/src/types/state_permits/NC/NCStateFacility.js +18 -0
- package/dist/src/types/state_permits/NC/NCStatePermit.d.ts +7 -0
- package/dist/src/types/state_permits/NC/NCStatePermit.js +15 -0
- package/dist/src/types/state_permits/NC/NCStatePermitDocument.d.ts +8 -0
- package/dist/src/types/state_permits/NC/NCStatePermitDocument.js +18 -0
- package/dist/src/types/state_permits/StateFacility.d.ts +20 -0
- package/dist/src/types/state_permits/StateFacility.js +49 -0
- package/dist/src/types/state_permits/StatePermit.d.ts +27 -0
- package/dist/src/types/state_permits/StatePermit.js +69 -0
- package/dist/src/types/state_permits/StatePermitDocument.d.ts +37 -0
- package/dist/src/types/state_permits/StatePermitDocument.js +95 -0
- package/dist/src/types/state_permits/StatePermitDocumentSource.d.ts +48 -0
- package/dist/src/types/state_permits/StatePermitDocumentSource.js +123 -0
- package/dist/src/types/state_permits/StatePermitDocumentSourcePollutant.d.ts +35 -0
- package/dist/src/types/state_permits/StatePermitDocumentSourcePollutant.js +90 -0
- package/dist/src/types/state_permits/TN/TNStateFacility.d.ts +7 -0
- package/dist/src/types/state_permits/TN/TNStateFacility.js +15 -0
- package/dist/src/types/state_permits/TN/TNStatePermit.d.ts +8 -0
- package/dist/src/types/state_permits/TN/TNStatePermit.js +18 -0
- package/dist/src/types/state_permits/TN/TNStatePermitDocument.d.ts +8 -0
- package/dist/src/types/state_permits/TN/TNStatePermitDocument.js +18 -0
- package/dist/src/types/state_permits/WI/WIStatePermit.d.ts +8 -0
- package/dist/src/types/state_permits/WI/WIStatePermit.js +18 -0
- package/dist/src/types/state_permits/WI/WIStatePermitDocument.d.ts +7 -0
- package/dist/src/types/state_permits/WI/WIStatePermitDocument.js +15 -0
- package/dist/src/types/twitter/TwitterTweet.d.ts +21 -0
- package/dist/src/types/twitter/TwitterTweet.js +61 -0
- package/dist/src/types/twitter/TwitterUser.d.ts +17 -0
- package/dist/src/types/twitter/TwitterUser.js +49 -0
- package/dist/src/types/twitter/TwitterUserTag.d.ts +13 -0
- package/dist/src/types/twitter/TwitterUserTag.js +31 -0
- package/dist/src/types/youtube/YoutubeChannel.d.ts +6 -0
- package/dist/src/types/youtube/YoutubeChannel.js +16 -0
- package/dist/src/types/youtube/YoutubeVideo.d.ts +18 -0
- package/dist/src/types/youtube/YoutubeVideo.js +46 -0
- package/dist/src/types/youtube/YoutubeVideoTag.d.ts +15 -0
- package/dist/src/types/youtube/YoutubeVideoTag.js +37 -0
- package/package.json +25 -0
- package/src/index.ts +72 -0
- package/src/types/APIError.ts +21 -0
- package/src/types/State.ts +219 -0
- package/src/types/User.ts +24 -0
- package/src/types/federal_congress/FederalCongressBill.ts +53 -0
- package/src/types/federal_congress/FederalCongressBillDocument.ts +60 -0
- package/src/types/federal_dockets/FederalDocket.ts +29 -0
- package/src/types/federal_dockets/FederalDocketAgency.ts +26 -0
- package/src/types/federal_dockets/FederalDocketComment.ts +96 -0
- package/src/types/federal_dockets/FederalDocketCommentAttachment.ts +29 -0
- package/src/types/federal_dockets/FederalDocketDocument.ts +82 -0
- package/src/types/federal_elections/FederalElection.ts +105 -0
- package/src/types/federal_elections/FederalElectionCandidate.ts +124 -0
- package/src/types/federal_elections/FederalElectionCandidateCommittee.ts +40 -0
- package/src/types/federal_elections/FederalElectionCommittee.ts +83 -0
- package/src/types/federal_elections/FederalElectionDonation.ts +88 -0
- package/src/types/federal_elections/FederalElectionF1File.ts +53 -0
- package/src/types/federal_elections/FederalElectionF24File.ts +37 -0
- package/src/types/federal_elections/FederalElectionF2File.ts +44 -0
- package/src/types/federal_elections/FederalElectionF3File.ts +42 -0
- package/src/types/federal_elections/FederalElectionFile.ts +43 -0
- package/src/types/federal_elections/FederalElectionFileExpenditure.ts +82 -0
- package/src/types/federal_elections/FormTypeID.ts +28 -0
- package/src/types/federal_lobby/FederalLobbyAgency.ts +20 -0
- package/src/types/federal_lobby/FederalLobbyClient.ts +47 -0
- package/src/types/federal_lobby/FederalLobbyDocument.ts +209 -0
- package/src/types/federal_lobby/FederalLobbyDocumentInterest.ts +60 -0
- package/src/types/federal_lobby/FederalLobbyLobbyist.ts +38 -0
- package/src/types/federal_lobby/FederalLobbyRegistrant.ts +62 -0
- package/src/types/federal_register/FederalRegisterAgency.ts +41 -0
- package/src/types/federal_register/FederalRegisterDocument.ts +64 -0
- package/src/types/federal_rules/FederalRuleSection.ts +42 -0
- package/src/types/federal_rules/FederalRuleTitle.ts +26 -0
- package/src/types/press/PressArticle.ts +38 -0
- package/src/types/press/PressArticleTag.ts +51 -0
- package/src/types/state_permits/AR/ARStateFacility.ts +21 -0
- package/src/types/state_permits/AR/ARStatePermit.ts +24 -0
- package/src/types/state_permits/AR/ARStatePermitDocument.ts +27 -0
- package/src/types/state_permits/KY/KYStateFacility.ts +22 -0
- package/src/types/state_permits/KY/KYStatePermit.ts +21 -0
- package/src/types/state_permits/KY/KYStatePermitDocument.ts +24 -0
- package/src/types/state_permits/NC/NCStateFacility.ts +24 -0
- package/src/types/state_permits/NC/NCStatePermit.ts +22 -0
- package/src/types/state_permits/NC/NCStatePermitDocument.ts +24 -0
- package/src/types/state_permits/StateFacility.ts +60 -0
- package/src/types/state_permits/StatePermit.ts +85 -0
- package/src/types/state_permits/StatePermitDocument.ts +118 -0
- package/src/types/state_permits/StatePermitDocumentSource.ts +146 -0
- package/src/types/state_permits/StatePermitDocumentSourcePollutant.ts +108 -0
- package/src/types/state_permits/TN/TNStateFacility.ts +21 -0
- package/src/types/state_permits/TN/TNStatePermit.ts +24 -0
- package/src/types/state_permits/TN/TNStatePermitDocument.ts +24 -0
- package/src/types/state_permits/WI/WIStatePermit.ts +24 -0
- package/src/types/state_permits/WI/WIStatePermitDocument.ts +21 -0
- package/src/types/twitter/TwitterTweet.ts +66 -0
- package/src/types/twitter/TwitterUser.ts +53 -0
- package/src/types/twitter/TwitterUserTag.ts +42 -0
- package/src/types/youtube/YoutubeChannel.ts +20 -0
- package/src/types/youtube/YoutubeVideo.ts +57 -0
- package/src/types/youtube/YoutubeVideoTag.ts +48 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export class TwitterUser {
|
|
2
|
+
twitter_user_id;
|
|
3
|
+
username;
|
|
4
|
+
name;
|
|
5
|
+
url;
|
|
6
|
+
description;
|
|
7
|
+
location;
|
|
8
|
+
create_time;
|
|
9
|
+
affiliated_twitter_user_id;
|
|
10
|
+
is_protected;
|
|
11
|
+
is_parody;
|
|
12
|
+
subscription_type_id;
|
|
13
|
+
verification_type_id;
|
|
14
|
+
entities;
|
|
15
|
+
constructor(twitter_user) {
|
|
16
|
+
if (!TwitterUser.is(twitter_user)) {
|
|
17
|
+
throw Error("Invalid input.");
|
|
18
|
+
}
|
|
19
|
+
this.twitter_user_id = twitter_user.twitter_user_id;
|
|
20
|
+
this.username = twitter_user.username;
|
|
21
|
+
this.name = twitter_user.name;
|
|
22
|
+
this.url = twitter_user.url;
|
|
23
|
+
this.description = twitter_user.description;
|
|
24
|
+
this.location = twitter_user.location;
|
|
25
|
+
this.create_time = twitter_user.create_time;
|
|
26
|
+
this.affiliated_twitter_user_id = twitter_user.affiliated_twitter_user_id;
|
|
27
|
+
this.is_protected = twitter_user.is_protected;
|
|
28
|
+
this.is_parody = twitter_user.is_parody;
|
|
29
|
+
this.subscription_type_id = twitter_user.subscription_type_id;
|
|
30
|
+
this.verification_type_id = twitter_user.verification_type_id;
|
|
31
|
+
this.entities = twitter_user.entities;
|
|
32
|
+
}
|
|
33
|
+
static is(twitter_user) {
|
|
34
|
+
return (twitter_user !== undefined &&
|
|
35
|
+
typeof twitter_user.twitter_user_id === "string" &&
|
|
36
|
+
typeof twitter_user.username === "string" &&
|
|
37
|
+
typeof twitter_user.name === "string" &&
|
|
38
|
+
typeof twitter_user.url === "string" &&
|
|
39
|
+
typeof twitter_user.description === "string" &&
|
|
40
|
+
(twitter_user.location === undefined || typeof twitter_user.location === "string") &&
|
|
41
|
+
typeof twitter_user.create_time === "string" &&
|
|
42
|
+
(twitter_user.affiliated_twitter_user_id === undefined || typeof twitter_user.affiliated_twitter_user_id == "string") &&
|
|
43
|
+
typeof twitter_user.is_protected === "boolean" &&
|
|
44
|
+
typeof twitter_user.is_parody === "boolean" &&
|
|
45
|
+
typeof twitter_user.subscription_type_id === "string" &&
|
|
46
|
+
typeof twitter_user.verification_type_id === "string" &&
|
|
47
|
+
(twitter_user.entities === undefined || typeof twitter_user.entities === "string"));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TwitterUser } from "./TwitterUser.js";
|
|
2
|
+
export declare class TwitterUserTag {
|
|
3
|
+
readonly twitter_user_id: string;
|
|
4
|
+
readonly tag_id: string;
|
|
5
|
+
readonly [x: string]: any;
|
|
6
|
+
constructor(twitter_user_tag: TwitterUserTag);
|
|
7
|
+
static is(twitter_user_tag: any): twitter_user_tag is TwitterUserTag;
|
|
8
|
+
}
|
|
9
|
+
export declare class TwitterUserTagAux extends TwitterUserTag {
|
|
10
|
+
readonly twitter_user: TwitterUser;
|
|
11
|
+
constructor(twitter_user_tag: any);
|
|
12
|
+
static is(twitter_user_tag: any): twitter_user_tag is TwitterUserTagAux;
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TwitterUser } from "./TwitterUser.js";
|
|
2
|
+
export class TwitterUserTag {
|
|
3
|
+
twitter_user_id;
|
|
4
|
+
tag_id;
|
|
5
|
+
constructor(twitter_user_tag) {
|
|
6
|
+
if (!TwitterUserTag.is(twitter_user_tag)) {
|
|
7
|
+
throw Error("Invalid input.");
|
|
8
|
+
}
|
|
9
|
+
this.twitter_user_id = twitter_user_tag.twitter_user_id;
|
|
10
|
+
this.tag_id = twitter_user_tag.tag_id;
|
|
11
|
+
}
|
|
12
|
+
static is(twitter_user_tag) {
|
|
13
|
+
return (twitter_user_tag !== undefined &&
|
|
14
|
+
typeof twitter_user_tag.twitter_user_id === "string" &&
|
|
15
|
+
typeof twitter_user_tag.tag_id === "string");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export class TwitterUserTagAux extends TwitterUserTag {
|
|
19
|
+
twitter_user;
|
|
20
|
+
constructor(twitter_user_tag) {
|
|
21
|
+
if (!TwitterUserTagAux.is(twitter_user_tag)) {
|
|
22
|
+
throw Error("Invalid input.");
|
|
23
|
+
}
|
|
24
|
+
super(twitter_user_tag);
|
|
25
|
+
this.twitter_user = twitter_user_tag.twitter_user;
|
|
26
|
+
}
|
|
27
|
+
static is(twitter_user_tag) {
|
|
28
|
+
return (TwitterUserTag.is(twitter_user_tag) &&
|
|
29
|
+
TwitterUser.is(twitter_user_tag.twitter_user));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class YoutubeChannel {
|
|
2
|
+
youtube_channel_id;
|
|
3
|
+
name;
|
|
4
|
+
constructor(youtube_channel) {
|
|
5
|
+
if (!YoutubeChannel.is(youtube_channel)) {
|
|
6
|
+
throw Error("Invalid input.");
|
|
7
|
+
}
|
|
8
|
+
this.youtube_channel_id = youtube_channel.youtube_channel_id;
|
|
9
|
+
this.name = youtube_channel.name;
|
|
10
|
+
}
|
|
11
|
+
static is(youtube_channel) {
|
|
12
|
+
return (youtube_channel !== undefined &&
|
|
13
|
+
typeof youtube_channel.youtube_channel_id === "string" &&
|
|
14
|
+
typeof youtube_channel.name === "string");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { YoutubeChannel } from "./YoutubeChannel.js";
|
|
2
|
+
export declare class YoutubeVideo {
|
|
3
|
+
readonly youtube_video_id: string;
|
|
4
|
+
readonly youtube_channel_id: string;
|
|
5
|
+
readonly publish_time: string;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
readonly s3_id?: string;
|
|
10
|
+
readonly [x: string]: any;
|
|
11
|
+
constructor(youtube_video: YoutubeVideo);
|
|
12
|
+
static is(youtube_video: any): youtube_video is YoutubeVideo;
|
|
13
|
+
}
|
|
14
|
+
export declare class YoutubeVideoAux extends YoutubeVideo {
|
|
15
|
+
readonly youtube_channel: YoutubeChannel;
|
|
16
|
+
constructor(youtube_video: any);
|
|
17
|
+
static is(youtube_video: any): youtube_video is YoutubeVideoAux;
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { YoutubeChannel } from "./YoutubeChannel.js";
|
|
2
|
+
export class YoutubeVideo {
|
|
3
|
+
youtube_video_id;
|
|
4
|
+
youtube_channel_id;
|
|
5
|
+
publish_time;
|
|
6
|
+
title;
|
|
7
|
+
description;
|
|
8
|
+
duration;
|
|
9
|
+
s3_id;
|
|
10
|
+
constructor(youtube_video) {
|
|
11
|
+
if (!YoutubeVideo.is(youtube_video)) {
|
|
12
|
+
throw Error("Invalid input.");
|
|
13
|
+
}
|
|
14
|
+
this.youtube_video_id = youtube_video.youtube_video_id;
|
|
15
|
+
this.youtube_channel_id = youtube_video.youtube_channel_id;
|
|
16
|
+
this.publish_time = youtube_video.publish_time;
|
|
17
|
+
this.title = youtube_video.title;
|
|
18
|
+
this.description = youtube_video.description;
|
|
19
|
+
this.duration = youtube_video.duration;
|
|
20
|
+
this.s3_id = youtube_video.s3_id;
|
|
21
|
+
}
|
|
22
|
+
static is(youtube_video) {
|
|
23
|
+
return (youtube_video !== undefined &&
|
|
24
|
+
typeof youtube_video.youtube_video_id === "string" &&
|
|
25
|
+
typeof youtube_video.youtube_channel_id === "string" &&
|
|
26
|
+
typeof youtube_video.publish_time === "string" &&
|
|
27
|
+
typeof youtube_video.title === "string" &&
|
|
28
|
+
typeof youtube_video.description === "string" &&
|
|
29
|
+
(youtube_video.duration === undefined || typeof youtube_video.duration === "number" && !isNaN(youtube_video.duration)) &&
|
|
30
|
+
(youtube_video.s3_id === undefined || typeof youtube_video.s3_id === "string"));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export class YoutubeVideoAux extends YoutubeVideo {
|
|
34
|
+
youtube_channel;
|
|
35
|
+
constructor(youtube_video) {
|
|
36
|
+
if (!YoutubeVideoAux.is(youtube_video)) {
|
|
37
|
+
throw Error("Invalid input.");
|
|
38
|
+
}
|
|
39
|
+
super(youtube_video);
|
|
40
|
+
this.youtube_channel = youtube_video.youtube_channel;
|
|
41
|
+
}
|
|
42
|
+
static is(youtube_video) {
|
|
43
|
+
return (YoutubeVideo.is(youtube_video) &&
|
|
44
|
+
YoutubeChannel.is(youtube_video.youtube_channel));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { YoutubeVideoAux } from "./YoutubeVideo.js";
|
|
2
|
+
export declare class YoutubeVideoTag {
|
|
3
|
+
readonly youtube_video_id: string;
|
|
4
|
+
readonly tag_id: string;
|
|
5
|
+
readonly publish_time: string;
|
|
6
|
+
readonly relevance?: string;
|
|
7
|
+
readonly [x: string]: any;
|
|
8
|
+
constructor(youtube_video_tag: YoutubeVideoTag);
|
|
9
|
+
static is(youtube_video_tag: any): youtube_video_tag is YoutubeVideoTag;
|
|
10
|
+
}
|
|
11
|
+
export declare class YoutubeVideoTagAux extends YoutubeVideoTag {
|
|
12
|
+
readonly youtube_video: YoutubeVideoAux;
|
|
13
|
+
constructor(youtube_video_tag: any);
|
|
14
|
+
static is(youtube_video_tag: any): youtube_video_tag is YoutubeVideoTagAux;
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { YoutubeVideoAux } from "./YoutubeVideo.js";
|
|
2
|
+
export class YoutubeVideoTag {
|
|
3
|
+
youtube_video_id;
|
|
4
|
+
tag_id;
|
|
5
|
+
publish_time;
|
|
6
|
+
relevance;
|
|
7
|
+
constructor(youtube_video_tag) {
|
|
8
|
+
if (!YoutubeVideoTag.is(youtube_video_tag)) {
|
|
9
|
+
throw Error("Invalid input.");
|
|
10
|
+
}
|
|
11
|
+
this.youtube_video_id = youtube_video_tag.youtube_video_id;
|
|
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;
|
|
15
|
+
}
|
|
16
|
+
static is(youtube_video_tag) {
|
|
17
|
+
return (youtube_video_tag !== undefined &&
|
|
18
|
+
typeof youtube_video_tag.youtube_video_id === "string" &&
|
|
19
|
+
typeof youtube_video_tag.tag_id === "string" &&
|
|
20
|
+
typeof youtube_video_tag.publish_time === "string" &&
|
|
21
|
+
(youtube_video_tag.relevance === undefined || typeof youtube_video_tag.relevance === "string"));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class YoutubeVideoTagAux extends YoutubeVideoTag {
|
|
25
|
+
youtube_video;
|
|
26
|
+
constructor(youtube_video_tag) {
|
|
27
|
+
if (!YoutubeVideoTagAux.is(youtube_video_tag)) {
|
|
28
|
+
throw Error("Invalid input.");
|
|
29
|
+
}
|
|
30
|
+
super(youtube_video_tag);
|
|
31
|
+
this.youtube_video = youtube_video_tag.youtube_video;
|
|
32
|
+
}
|
|
33
|
+
static is(youtube_video_tag) {
|
|
34
|
+
return (YoutubeVideoTag.is(youtube_video_tag) &&
|
|
35
|
+
YoutubeVideoAux.is(youtube_video_tag.youtube_video));
|
|
36
|
+
}
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "triangle-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/src/index.js",
|
|
5
|
+
"types": "dist/src/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
8
|
+
"build": "tsc && tsc-alias"
|
|
9
|
+
},
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"description": "",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@eslint/js": "^9.39.2",
|
|
16
|
+
"@types/node": "^26.0.1",
|
|
17
|
+
"eslint": "^9.39.2",
|
|
18
|
+
"globals": "^17.3.0",
|
|
19
|
+
"jiti": "^2.6.1",
|
|
20
|
+
"tsc-alias": "^1.8.16",
|
|
21
|
+
"tsx": "^4.21.0",
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"typescript-eslint": "^8.55.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export * from "./types/APIError"
|
|
2
|
+
export * from "./types/State"
|
|
3
|
+
export * from "./types/User"
|
|
4
|
+
|
|
5
|
+
export * from "./types/press/PressArticle"
|
|
6
|
+
export * from "./types/press/PressArticleTag"
|
|
7
|
+
export * from "./types/twitter/TwitterTweet"
|
|
8
|
+
export * from "./types/twitter/TwitterUser"
|
|
9
|
+
export * from "./types/twitter/TwitterUserTag"
|
|
10
|
+
export * from "./types/youtube/YoutubeChannel"
|
|
11
|
+
export * from "./types/youtube/YoutubeVideo"
|
|
12
|
+
export * from "./types/youtube/YoutubeVideoTag"
|
|
13
|
+
|
|
14
|
+
export * from "./types/federal_elections/FederalElection"
|
|
15
|
+
export * from "./types/federal_elections/FederalElectionCommittee"
|
|
16
|
+
export * from "./types/federal_elections/FederalElectionCandidate"
|
|
17
|
+
export * from "./types/federal_elections/FederalElectionCandidateCommittee"
|
|
18
|
+
export * from "./types/federal_elections/FederalElectionFileExpenditure"
|
|
19
|
+
export * from "./types/federal_elections/FederalElectionDonation"
|
|
20
|
+
export * from "./types/federal_elections/FederalElectionFile"
|
|
21
|
+
export * from "./types/federal_elections/FederalElectionF1File"
|
|
22
|
+
export * from "./types/federal_elections/FederalElectionF2File"
|
|
23
|
+
export * from "./types/federal_elections/FederalElectionF3File"
|
|
24
|
+
export * from "./types/federal_elections/FederalElectionF24File"
|
|
25
|
+
export * from "./types/federal_elections/FormTypeID"
|
|
26
|
+
|
|
27
|
+
export * from "./types/federal_lobby/FederalLobbyAgency"
|
|
28
|
+
export * from "./types/federal_lobby/FederalLobbyRegistrant"
|
|
29
|
+
export * from "./types/federal_lobby/FederalLobbyClient"
|
|
30
|
+
export * from "./types/federal_lobby/FederalLobbyLobbyist"
|
|
31
|
+
export * from "./types/federal_lobby/FederalLobbyDocument"
|
|
32
|
+
export * from "./types/federal_lobby/FederalLobbyDocumentInterest"
|
|
33
|
+
|
|
34
|
+
export * from "./types/federal_congress/FederalCongressBill"
|
|
35
|
+
export * from "./types/federal_congress/FederalCongressBillDocument"
|
|
36
|
+
|
|
37
|
+
export * from "./types/federal_register/FederalRegisterAgency"
|
|
38
|
+
export * from "./types/federal_register/FederalRegisterDocument"
|
|
39
|
+
|
|
40
|
+
export * from "./types/federal_dockets/FederalDocketAgency"
|
|
41
|
+
export * from "./types/federal_dockets/FederalDocket"
|
|
42
|
+
export * from "./types/federal_dockets/FederalDocketDocument"
|
|
43
|
+
export * from "./types/federal_dockets/FederalDocketComment"
|
|
44
|
+
export * from "./types/federal_dockets/FederalDocketCommentAttachment"
|
|
45
|
+
|
|
46
|
+
export * from "./types/federal_rules/FederalRuleTitle"
|
|
47
|
+
export * from "./types/federal_rules/FederalRuleSection"
|
|
48
|
+
|
|
49
|
+
export * from "./types/state_permits/StateFacility"
|
|
50
|
+
export * from "./types/state_permits/StatePermit"
|
|
51
|
+
export * from "./types/state_permits/StatePermitDocument"
|
|
52
|
+
export * from "./types/state_permits/StatePermitDocumentSource"
|
|
53
|
+
export * from "./types/state_permits/StatePermitDocumentSourcePollutant"
|
|
54
|
+
|
|
55
|
+
export * from "./types/state_permits/AR/ARStateFacility"
|
|
56
|
+
export * from "./types/state_permits/AR/ARStatePermit"
|
|
57
|
+
export * from "./types/state_permits/AR/ARStatePermitDocument"
|
|
58
|
+
|
|
59
|
+
export * from "./types/state_permits/KY/KYStateFacility"
|
|
60
|
+
export * from "./types/state_permits/KY/KYStatePermit"
|
|
61
|
+
export * from "./types/state_permits/KY/KYStatePermitDocument"
|
|
62
|
+
|
|
63
|
+
export * from "./types/state_permits/NC/NCStateFacility"
|
|
64
|
+
export * from "./types/state_permits/NC/NCStatePermit"
|
|
65
|
+
export * from "./types/state_permits/NC/NCStatePermitDocument"
|
|
66
|
+
|
|
67
|
+
export * from "./types/state_permits/TN/TNStateFacility"
|
|
68
|
+
export * from "./types/state_permits/TN/TNStatePermit"
|
|
69
|
+
export * from "./types/state_permits/TN/TNStatePermitDocument"
|
|
70
|
+
|
|
71
|
+
export * from "./types/state_permits/WI/WIStatePermit"
|
|
72
|
+
export * from "./types/state_permits/WI/WIStatePermitDocument"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const default_messages_by_status : Record<number, string> = {
|
|
2
|
+
400 : "Bad Request",
|
|
3
|
+
401 : "Unauthorized",
|
|
4
|
+
403 : "Forbidden",
|
|
5
|
+
404 : "Not Found",
|
|
6
|
+
405 : "Method Not Allowed",
|
|
7
|
+
500 : "Internal Server Error",
|
|
8
|
+
504 : "Gateway Timeout",
|
|
9
|
+
600 : "Failed to Parse Output"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export class APIError extends Error {
|
|
14
|
+
status : number
|
|
15
|
+
constructor(status : number, message?: string) {
|
|
16
|
+
const default_message = default_messages_by_status[status]
|
|
17
|
+
super(message !== undefined ? message : default_message !== undefined ? default_message : "Error")
|
|
18
|
+
this.name = "APIError"
|
|
19
|
+
this.status = status
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export const state_ids = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"] as const
|
|
2
|
+
|
|
3
|
+
export type StateID = typeof state_ids[number]
|
|
4
|
+
|
|
5
|
+
export function is_state_id(state_id : any) : state_id is StateID {
|
|
6
|
+
return state_ids.includes(state_id)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface State {
|
|
10
|
+
state_id : StateID,
|
|
11
|
+
name : string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const states_by_state_id : Record<StateID, State> = {
|
|
15
|
+
AL : {
|
|
16
|
+
state_id : "AL",
|
|
17
|
+
name : "Alabama"
|
|
18
|
+
},
|
|
19
|
+
AK : {
|
|
20
|
+
state_id : "AK",
|
|
21
|
+
name : "Alaska"
|
|
22
|
+
},
|
|
23
|
+
AZ : {
|
|
24
|
+
state_id : "AZ",
|
|
25
|
+
name : "Arizona"
|
|
26
|
+
},
|
|
27
|
+
AR : {
|
|
28
|
+
state_id : "AR",
|
|
29
|
+
name : "Arkansas"
|
|
30
|
+
},
|
|
31
|
+
CA : {
|
|
32
|
+
state_id : "CA",
|
|
33
|
+
name : "California"
|
|
34
|
+
},
|
|
35
|
+
CO : {
|
|
36
|
+
state_id : "CO",
|
|
37
|
+
name : "Colorado"
|
|
38
|
+
},
|
|
39
|
+
CT : {
|
|
40
|
+
state_id : "CT",
|
|
41
|
+
name : "Connecticut"
|
|
42
|
+
},
|
|
43
|
+
DC : {
|
|
44
|
+
state_id : "DC",
|
|
45
|
+
name : "Washington D.C."
|
|
46
|
+
},
|
|
47
|
+
DE : {
|
|
48
|
+
state_id : "DE",
|
|
49
|
+
name : "Delaware"
|
|
50
|
+
},
|
|
51
|
+
FL : {
|
|
52
|
+
state_id : "FL",
|
|
53
|
+
name : "Florida"
|
|
54
|
+
},
|
|
55
|
+
GA : {
|
|
56
|
+
state_id : "GA",
|
|
57
|
+
name : "Georgia"
|
|
58
|
+
},
|
|
59
|
+
HI : {
|
|
60
|
+
state_id : "HI",
|
|
61
|
+
name : "Hawaii"
|
|
62
|
+
},
|
|
63
|
+
ID : {
|
|
64
|
+
state_id : "ID",
|
|
65
|
+
name : "Idaho"
|
|
66
|
+
},
|
|
67
|
+
IL : {
|
|
68
|
+
state_id : "IL",
|
|
69
|
+
name : "Illinois"
|
|
70
|
+
},
|
|
71
|
+
IN : {
|
|
72
|
+
state_id : "IN",
|
|
73
|
+
name : "Indiana"
|
|
74
|
+
},
|
|
75
|
+
IA : {
|
|
76
|
+
state_id : "IA",
|
|
77
|
+
name : "Iowa"
|
|
78
|
+
},
|
|
79
|
+
KS : {
|
|
80
|
+
state_id : "KS",
|
|
81
|
+
name : "Kansas"
|
|
82
|
+
},
|
|
83
|
+
KY : {
|
|
84
|
+
state_id : "KY",
|
|
85
|
+
name : "Kentucky"
|
|
86
|
+
},
|
|
87
|
+
LA : {
|
|
88
|
+
state_id : "LA",
|
|
89
|
+
name : "Louisiana"
|
|
90
|
+
},
|
|
91
|
+
ME : {
|
|
92
|
+
state_id : "ME",
|
|
93
|
+
name : "Maine"
|
|
94
|
+
},
|
|
95
|
+
MD : {
|
|
96
|
+
state_id : "MD",
|
|
97
|
+
name : "Maryland"
|
|
98
|
+
},
|
|
99
|
+
MA : {
|
|
100
|
+
state_id : "MA",
|
|
101
|
+
name : "Massachusetts"
|
|
102
|
+
},
|
|
103
|
+
MI : {
|
|
104
|
+
state_id : "MI",
|
|
105
|
+
name : "Michigan"
|
|
106
|
+
},
|
|
107
|
+
MN : {
|
|
108
|
+
state_id : "MN",
|
|
109
|
+
name : "Minnesota"
|
|
110
|
+
},
|
|
111
|
+
MS : {
|
|
112
|
+
state_id : "MS",
|
|
113
|
+
name : "Mississippi"
|
|
114
|
+
},
|
|
115
|
+
MO : {
|
|
116
|
+
state_id : "MO",
|
|
117
|
+
name : "Missouri"
|
|
118
|
+
},
|
|
119
|
+
MT : {
|
|
120
|
+
state_id : "MT",
|
|
121
|
+
name : "Montana"
|
|
122
|
+
},
|
|
123
|
+
NE : {
|
|
124
|
+
state_id : "NE",
|
|
125
|
+
name : "Nebraska"
|
|
126
|
+
},
|
|
127
|
+
NV : {
|
|
128
|
+
state_id : "NV",
|
|
129
|
+
name : "Nevada"
|
|
130
|
+
},
|
|
131
|
+
NH : {
|
|
132
|
+
state_id : "NH",
|
|
133
|
+
name : "New Hampshire"
|
|
134
|
+
},
|
|
135
|
+
NJ : {
|
|
136
|
+
state_id : "NJ",
|
|
137
|
+
name : "New Jersey"
|
|
138
|
+
},
|
|
139
|
+
NM : {
|
|
140
|
+
state_id : "NM",
|
|
141
|
+
name : "New Mexico"
|
|
142
|
+
},
|
|
143
|
+
NY : {
|
|
144
|
+
state_id : "NY",
|
|
145
|
+
name : "New York"
|
|
146
|
+
},
|
|
147
|
+
NC : {
|
|
148
|
+
state_id : "NC",
|
|
149
|
+
name : "North Carolina"
|
|
150
|
+
},
|
|
151
|
+
ND : {
|
|
152
|
+
state_id : "ND",
|
|
153
|
+
name : "North Dakota"
|
|
154
|
+
},
|
|
155
|
+
OH : {
|
|
156
|
+
state_id : "OH",
|
|
157
|
+
name : "Ohio"
|
|
158
|
+
},
|
|
159
|
+
OK : {
|
|
160
|
+
state_id : "OK",
|
|
161
|
+
name : "Oklahoma"
|
|
162
|
+
},
|
|
163
|
+
OR : {
|
|
164
|
+
state_id : "OR",
|
|
165
|
+
name : "Oregon"
|
|
166
|
+
},
|
|
167
|
+
PA : {
|
|
168
|
+
state_id : "PA",
|
|
169
|
+
name : "Pennsylvania"
|
|
170
|
+
},
|
|
171
|
+
RI : {
|
|
172
|
+
state_id : "RI",
|
|
173
|
+
name : "Rhode Island"
|
|
174
|
+
},
|
|
175
|
+
SC : {
|
|
176
|
+
state_id : "SC",
|
|
177
|
+
name : "South Carolina"
|
|
178
|
+
},
|
|
179
|
+
SD : {
|
|
180
|
+
state_id : "SD",
|
|
181
|
+
name : "South Dakota"
|
|
182
|
+
},
|
|
183
|
+
TN : {
|
|
184
|
+
state_id : "TN",
|
|
185
|
+
name : "Tennessee"
|
|
186
|
+
},
|
|
187
|
+
TX : {
|
|
188
|
+
state_id : "TX",
|
|
189
|
+
name : "Texas"
|
|
190
|
+
},
|
|
191
|
+
UT : {
|
|
192
|
+
state_id : "UT",
|
|
193
|
+
name : "Utah"
|
|
194
|
+
},
|
|
195
|
+
VT : {
|
|
196
|
+
state_id : "VT",
|
|
197
|
+
name : "Vermont"
|
|
198
|
+
},
|
|
199
|
+
VA : {
|
|
200
|
+
state_id : "VA",
|
|
201
|
+
name : "Virginia"
|
|
202
|
+
},
|
|
203
|
+
WA : {
|
|
204
|
+
state_id : "WA",
|
|
205
|
+
name : "Washington"
|
|
206
|
+
},
|
|
207
|
+
WV : {
|
|
208
|
+
state_id : "WV",
|
|
209
|
+
name : "West Virginia"
|
|
210
|
+
},
|
|
211
|
+
WI : {
|
|
212
|
+
state_id : "WI",
|
|
213
|
+
name : "Wisconsin"
|
|
214
|
+
},
|
|
215
|
+
WY : {
|
|
216
|
+
state_id : "WY",
|
|
217
|
+
name : "Wyoming"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class User {
|
|
2
|
+
readonly user_id : string
|
|
3
|
+
readonly email : string
|
|
4
|
+
readonly is_admin_elections : boolean
|
|
5
|
+
// readonly [x : string] : any
|
|
6
|
+
|
|
7
|
+
constructor(user : User) {
|
|
8
|
+
if (!User.is(user)) {
|
|
9
|
+
throw Error("Invalid Input.")
|
|
10
|
+
}
|
|
11
|
+
this.user_id = user.user_id
|
|
12
|
+
this.email = user.email
|
|
13
|
+
this.is_admin_elections = user.is_admin_elections
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static is(user : any) : user is User {
|
|
17
|
+
return (
|
|
18
|
+
user !== undefined &&
|
|
19
|
+
typeof user.user_id === "string" &&
|
|
20
|
+
typeof user.email === "string" &&
|
|
21
|
+
typeof user.is_admin_elections === "boolean"
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const federal_congress_bill_types = ["HR", "S", "HJRES", "SJRES", "HCONRES", "SCONRES", "HRES", "SRES"] as const
|
|
2
|
+
|
|
3
|
+
export type FederalCongressBillTypeID = typeof federal_congress_bill_types[number]
|
|
4
|
+
|
|
5
|
+
export function is_federal_congress_bill_type_id(federal_congress_bill_type_id : any) : federal_congress_bill_type_id is FederalCongressBillTypeID {
|
|
6
|
+
return federal_congress_bill_types.includes(federal_congress_bill_type_id)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class FederalCongressBill {
|
|
10
|
+
readonly federal_congress_bill_id : string
|
|
11
|
+
readonly congress_id : number
|
|
12
|
+
readonly bill_type_id : FederalCongressBillTypeID
|
|
13
|
+
readonly number : number
|
|
14
|
+
readonly bill_id : string
|
|
15
|
+
readonly title : string
|
|
16
|
+
readonly modify_time : string
|
|
17
|
+
readonly intro_date : string
|
|
18
|
+
readonly policy_area_name? : string
|
|
19
|
+
readonly sponsor_federal_congress_member_ids? : string[]
|
|
20
|
+
|
|
21
|
+
constructor(federal_congress_bill : any) {
|
|
22
|
+
if (!FederalCongressBill.is(federal_congress_bill)) {
|
|
23
|
+
throw Error("Invalid input.")
|
|
24
|
+
}
|
|
25
|
+
this.federal_congress_bill_id = federal_congress_bill.federal_congress_bill_id
|
|
26
|
+
this.congress_id = federal_congress_bill.congress_id
|
|
27
|
+
this.bill_type_id = federal_congress_bill.bill_type_id
|
|
28
|
+
this.number = federal_congress_bill.number
|
|
29
|
+
this.bill_id = federal_congress_bill.bill_id
|
|
30
|
+
this.title = federal_congress_bill.title
|
|
31
|
+
this.modify_time = federal_congress_bill.modify_time
|
|
32
|
+
this.intro_date = federal_congress_bill.intro_date
|
|
33
|
+
this.policy_area_name = federal_congress_bill.policy_area_name
|
|
34
|
+
this.sponsor_federal_congress_member_ids = federal_congress_bill.sponsor_federal_congress_member_ids
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static is(federal_congress_bill : any) : federal_congress_bill is FederalCongressBill {
|
|
38
|
+
return (
|
|
39
|
+
federal_congress_bill !== undefined &&
|
|
40
|
+
typeof federal_congress_bill.federal_congress_bill_id === "string" &&
|
|
41
|
+
typeof federal_congress_bill.congress_id === "number" &&
|
|
42
|
+
is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
|
|
43
|
+
typeof federal_congress_bill.number === "number" &&
|
|
44
|
+
typeof federal_congress_bill.bill_id === "string" &&
|
|
45
|
+
typeof federal_congress_bill.title === "string" &&
|
|
46
|
+
typeof federal_congress_bill.modify_time === "string" &&
|
|
47
|
+
typeof federal_congress_bill.intro_date === "string" &&
|
|
48
|
+
(federal_congress_bill.policy_area_name === undefined || typeof federal_congress_bill.policy_area_name === "string") &&
|
|
49
|
+
(federal_congress_bill.sponsor_federal_congress_member_ids === undefined || Array.isArray(federal_congress_bill.sponsor_federal_congress_member_ids) && federal_congress_bill.sponsor_federal_congress_member_ids.map((sponsor_federal_congress_member_id : any) => typeof sponsor_federal_congress_member_id === "string"))
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|