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,108 @@
|
|
|
1
|
+
import { is_state_id, StateID } from "../State"
|
|
2
|
+
|
|
3
|
+
export class StatePermitDocumentSourcePollutant {
|
|
4
|
+
readonly state_permit_document_source_pollutant_id : string
|
|
5
|
+
readonly state_id : StateID
|
|
6
|
+
readonly state_permit_id : string
|
|
7
|
+
readonly state_permit_document_id : string
|
|
8
|
+
readonly state_permit_document_source_id : string
|
|
9
|
+
readonly pollutant_id : string
|
|
10
|
+
readonly [x : string] : any
|
|
11
|
+
|
|
12
|
+
constructor(state_permit_document_source_pollutant : StatePermitDocumentSourcePollutant) {
|
|
13
|
+
if (!StatePermitDocumentSourcePollutant.is(state_permit_document_source_pollutant)) {
|
|
14
|
+
throw Error("Invalid input.")
|
|
15
|
+
}
|
|
16
|
+
this.state_permit_document_source_pollutant_id = state_permit_document_source_pollutant.state_permit_document_source_pollutant_id
|
|
17
|
+
this.state_id = state_permit_document_source_pollutant.state_id
|
|
18
|
+
this.state_permit_id = state_permit_document_source_pollutant.state_permit_id
|
|
19
|
+
this.state_permit_document_id = state_permit_document_source_pollutant.state_permit_document_id
|
|
20
|
+
this.state_permit_document_source_id = state_permit_document_source_pollutant.state_permit_document_source_id
|
|
21
|
+
this.pollutant_id = state_permit_document_source_pollutant.pollutant_id
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static is(state_permit_document_source_pollutant : any) : state_permit_document_source_pollutant is StatePermitDocumentSourcePollutant {
|
|
25
|
+
return (
|
|
26
|
+
state_permit_document_source_pollutant !== undefined &&
|
|
27
|
+
typeof state_permit_document_source_pollutant.state_permit_document_source_pollutant_id === "string" &&
|
|
28
|
+
is_state_id(state_permit_document_source_pollutant.state_id) &&
|
|
29
|
+
typeof state_permit_document_source_pollutant.state_permit_id === "string" &&
|
|
30
|
+
typeof state_permit_document_source_pollutant.state_permit_document_id === "string" &&
|
|
31
|
+
typeof state_permit_document_source_pollutant.state_permit_document_source_id === "string" &&
|
|
32
|
+
typeof state_permit_document_source_pollutant.pollutant_id === "string"
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class StateAirPermitDocumentSourcePollutant extends StatePermitDocumentSourcePollutant {
|
|
38
|
+
readonly TPY_text : string
|
|
39
|
+
readonly TPY? : number
|
|
40
|
+
readonly TPY_global_rank? : number
|
|
41
|
+
readonly TPY_global_total? : number
|
|
42
|
+
readonly TPY_local_rank? : number
|
|
43
|
+
readonly TPY_local_total? : number
|
|
44
|
+
readonly LBPH_text : string
|
|
45
|
+
readonly LBPH? : number
|
|
46
|
+
readonly LBPH_global_rank? : number
|
|
47
|
+
readonly LBPH_global_total? : number
|
|
48
|
+
readonly LBPH_local_rank? : number
|
|
49
|
+
readonly LBPH_local_total? : number
|
|
50
|
+
readonly [x : string] : any
|
|
51
|
+
|
|
52
|
+
constructor(state_permit_document_source_pollutant : StateAirPermitDocumentSourcePollutant) {
|
|
53
|
+
if (!StateAirPermitDocumentSourcePollutant.is(state_permit_document_source_pollutant)) {
|
|
54
|
+
throw Error("Invalid input.")
|
|
55
|
+
}
|
|
56
|
+
super(state_permit_document_source_pollutant)
|
|
57
|
+
this.TPY_text = state_permit_document_source_pollutant.TPY_text
|
|
58
|
+
this.TPY = state_permit_document_source_pollutant.TPY
|
|
59
|
+
this.TPY_global_rank = state_permit_document_source_pollutant.TPY_global_rank
|
|
60
|
+
this.TPY_global_total = state_permit_document_source_pollutant.TPY_global_total
|
|
61
|
+
this.TPY_local_rank = state_permit_document_source_pollutant.TPY_local_rank
|
|
62
|
+
this.TPY_local_total = state_permit_document_source_pollutant.TPY_local_total
|
|
63
|
+
this.LBPH_text = state_permit_document_source_pollutant.LBPH_text
|
|
64
|
+
this.LBPH = state_permit_document_source_pollutant.LBPH
|
|
65
|
+
this.LBPH_global_rank = state_permit_document_source_pollutant.LBPH_global_rank
|
|
66
|
+
this.LBPH_global_total = state_permit_document_source_pollutant.LBPH_global_total
|
|
67
|
+
this.LBPH_local_rank = state_permit_document_source_pollutant.LBPH_local_rank
|
|
68
|
+
this.LBPH_local_total = state_permit_document_source_pollutant.LBPH_local_total
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static is(state_permit_document_source_pollutant : any) : state_permit_document_source_pollutant is StateAirPermitDocumentSourcePollutant {
|
|
72
|
+
return (
|
|
73
|
+
StatePermitDocumentSourcePollutant.is(state_permit_document_source_pollutant) &&
|
|
74
|
+
typeof state_permit_document_source_pollutant.TPY_text === "string" &&
|
|
75
|
+
(state_permit_document_source_pollutant.TPY === undefined || typeof state_permit_document_source_pollutant.TPY === "number" && !isNaN(state_permit_document_source_pollutant.TPY)) &&
|
|
76
|
+
(state_permit_document_source_pollutant.TPY_global_rank === undefined || typeof state_permit_document_source_pollutant.TPY_global_rank === "number" && !isNaN(state_permit_document_source_pollutant.TPY_global_rank)) &&
|
|
77
|
+
(state_permit_document_source_pollutant.TPY_global_total === undefined || typeof state_permit_document_source_pollutant.TPY_global_total === "number" && !isNaN(state_permit_document_source_pollutant.TPY_global_total)) &&
|
|
78
|
+
(state_permit_document_source_pollutant.TPY_local_rank === undefined || typeof state_permit_document_source_pollutant.TPY_local_rank === "number" && !isNaN(state_permit_document_source_pollutant.TPY_local_rank)) &&
|
|
79
|
+
(state_permit_document_source_pollutant.TPY_local_total === undefined || typeof state_permit_document_source_pollutant.TPY_local_total === "number" && !isNaN(state_permit_document_source_pollutant.TPY_local_total)) &&
|
|
80
|
+
typeof state_permit_document_source_pollutant.LBPH_text === "string" &&
|
|
81
|
+
(state_permit_document_source_pollutant.LBPH === undefined || typeof state_permit_document_source_pollutant.LBPH === "number" && !isNaN(state_permit_document_source_pollutant.LBPH)) &&
|
|
82
|
+
(state_permit_document_source_pollutant.LBPH_global_rank === undefined || typeof state_permit_document_source_pollutant.LBPH_global_rank === "number" && !isNaN(state_permit_document_source_pollutant.LBPH_global_rank)) &&
|
|
83
|
+
(state_permit_document_source_pollutant.LBPH_global_total === undefined || typeof state_permit_document_source_pollutant.LBPH_global_total === "number" && !isNaN(state_permit_document_source_pollutant.LBPH_global_total)) &&
|
|
84
|
+
(state_permit_document_source_pollutant.LBPH_local_rank === undefined || typeof state_permit_document_source_pollutant.LBPH_local_rank === "number" && !isNaN(state_permit_document_source_pollutant.LBPH_local_rank)) &&
|
|
85
|
+
(state_permit_document_source_pollutant.LBPH_local_total === undefined || typeof state_permit_document_source_pollutant.LBPH_local_total === "number" && !isNaN(state_permit_document_source_pollutant.LBPH_local_total))
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export class StateWaterPermitDocumentSourcePollutant extends StatePermitDocumentSourcePollutant {
|
|
91
|
+
readonly freq? : string
|
|
92
|
+
readonly [x : string] : any
|
|
93
|
+
|
|
94
|
+
constructor(state_permit_document_source_pollutant : StateWaterPermitDocumentSourcePollutant) {
|
|
95
|
+
if (!StateWaterPermitDocumentSourcePollutant.is(state_permit_document_source_pollutant)) {
|
|
96
|
+
throw Error("Invalid input.")
|
|
97
|
+
}
|
|
98
|
+
super(state_permit_document_source_pollutant)
|
|
99
|
+
this.freq = state_permit_document_source_pollutant.freq
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static is(state_permit_document_source_pollutant : any) : state_permit_document_source_pollutant is StateWaterPermitDocumentSourcePollutant {
|
|
103
|
+
return (
|
|
104
|
+
StatePermitDocumentSourcePollutant.is(state_permit_document_source_pollutant) &&
|
|
105
|
+
(state_permit_document_source_pollutant.freq === undefined || typeof state_permit_document_source_pollutant.freq === "string")
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StateFacility } from "../StateFacility"
|
|
2
|
+
|
|
3
|
+
export class TNStateFacility extends StateFacility {
|
|
4
|
+
readonly state_id : "TN"
|
|
5
|
+
readonly [x : string] : any
|
|
6
|
+
|
|
7
|
+
constructor(state_facility : TNStateFacility) {
|
|
8
|
+
if (!TNStateFacility.is(state_facility)) {
|
|
9
|
+
throw Error("Invalid input.")
|
|
10
|
+
}
|
|
11
|
+
super(state_facility)
|
|
12
|
+
this.state_id = state_facility.state_id
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static is(state_facility : any) : state_facility is TNStateFacility {
|
|
16
|
+
return (
|
|
17
|
+
StateFacility.is(state_facility) &&
|
|
18
|
+
state_facility.state_id === "TN"
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StatePermit } from "../StatePermit"
|
|
2
|
+
|
|
3
|
+
export class TNStatePermit extends StatePermit {
|
|
4
|
+
readonly state_id : "TN"
|
|
5
|
+
readonly effective_date? : string
|
|
6
|
+
readonly [x : string] : any
|
|
7
|
+
|
|
8
|
+
constructor(state_permit : TNStatePermit) {
|
|
9
|
+
if (!TNStatePermit.is(state_permit)) {
|
|
10
|
+
throw Error("Invalid input.")
|
|
11
|
+
}
|
|
12
|
+
super(state_permit)
|
|
13
|
+
this.state_id = state_permit.state_id
|
|
14
|
+
this.effective_date = state_permit.effective_date
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static is(state_permit : any) : state_permit is TNStatePermit {
|
|
18
|
+
return (
|
|
19
|
+
StatePermit.is(state_permit) &&
|
|
20
|
+
state_permit.state_id === "TN" &&
|
|
21
|
+
(state_permit.effective_date === undefined || typeof state_permit.effective_date === "string")
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StatePermitDocument } from "../StatePermitDocument"
|
|
2
|
+
|
|
3
|
+
export class TNStatePermitDocument extends StatePermitDocument {
|
|
4
|
+
readonly state_id : "TN"
|
|
5
|
+
readonly date : string
|
|
6
|
+
readonly [x : string] : any
|
|
7
|
+
|
|
8
|
+
constructor(state_permit : TNStatePermitDocument) {
|
|
9
|
+
if (!TNStatePermitDocument.is(state_permit)) {
|
|
10
|
+
throw Error("Invalid input.")
|
|
11
|
+
}
|
|
12
|
+
super(state_permit)
|
|
13
|
+
this.state_id = state_permit.state_id
|
|
14
|
+
this.date = state_permit.date
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static is(state_permit : any) : state_permit is TNStatePermitDocument {
|
|
18
|
+
return (
|
|
19
|
+
StatePermitDocument.is(state_permit) &&
|
|
20
|
+
state_permit.state_id === "TN" &&
|
|
21
|
+
typeof state_permit.date === "string"
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StatePermit } from "../StatePermit"
|
|
2
|
+
|
|
3
|
+
export class WIStatePermit extends StatePermit {
|
|
4
|
+
readonly state_id : "WI"
|
|
5
|
+
readonly seq_id : string
|
|
6
|
+
readonly [x : string] : any
|
|
7
|
+
|
|
8
|
+
constructor(state_permit : WIStatePermit) {
|
|
9
|
+
if (!WIStatePermit.is(state_permit)) {
|
|
10
|
+
throw Error("Invalid input.")
|
|
11
|
+
}
|
|
12
|
+
super(state_permit)
|
|
13
|
+
this.state_id = state_permit.state_id
|
|
14
|
+
this.seq_id = state_permit.seq_id
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static is(state_permit : any) : state_permit is WIStatePermit {
|
|
18
|
+
return (
|
|
19
|
+
StatePermit.is(state_permit) &&
|
|
20
|
+
state_permit.state_id === "WI" &&
|
|
21
|
+
typeof state_permit.seq_id === "string"
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StatePermitDocument } from "../StatePermitDocument"
|
|
2
|
+
|
|
3
|
+
export class WIStatePermitDocument extends StatePermitDocument {
|
|
4
|
+
readonly state_id : "WI"
|
|
5
|
+
readonly [x : string] : any
|
|
6
|
+
|
|
7
|
+
constructor(state_permit : WIStatePermitDocument) {
|
|
8
|
+
if (!WIStatePermitDocument.is(state_permit)) {
|
|
9
|
+
throw Error("Invalid input.")
|
|
10
|
+
}
|
|
11
|
+
super(state_permit)
|
|
12
|
+
this.state_id = state_permit.state_id
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static is(state_permit : any) : state_permit is WIStatePermitDocument {
|
|
16
|
+
return (
|
|
17
|
+
StatePermitDocument.is(state_permit) &&
|
|
18
|
+
state_permit.state_id === "WI"
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export class TwitterTweet {
|
|
2
|
+
readonly twitter_tweet_id : string
|
|
3
|
+
readonly twitter_user_id : string
|
|
4
|
+
readonly publish_time : string
|
|
5
|
+
readonly supreme_twitter_tweet_id : string
|
|
6
|
+
readonly draft_twitter_tweet_ids : string[]
|
|
7
|
+
readonly community_id? : string
|
|
8
|
+
readonly is_sensitive : boolean
|
|
9
|
+
readonly is_sponsored : boolean
|
|
10
|
+
readonly lang_id : string
|
|
11
|
+
readonly references_json : string
|
|
12
|
+
readonly geo_json? : string
|
|
13
|
+
readonly text : string
|
|
14
|
+
readonly content_json? : string
|
|
15
|
+
readonly media_json? : string
|
|
16
|
+
readonly attachments_json? : string
|
|
17
|
+
readonly entities_json? : string
|
|
18
|
+
readonly reply_settings_type_id : string
|
|
19
|
+
|
|
20
|
+
constructor(twitter_tweet : TwitterTweet) {
|
|
21
|
+
if (!TwitterTweet.is(twitter_tweet)) {
|
|
22
|
+
throw Error("Invalid input.")
|
|
23
|
+
}
|
|
24
|
+
this.twitter_tweet_id = twitter_tweet.twitter_tweet_id
|
|
25
|
+
this.twitter_user_id = twitter_tweet.twitter_user_id
|
|
26
|
+
this.publish_time = twitter_tweet.publish_time
|
|
27
|
+
this.supreme_twitter_tweet_id = twitter_tweet.supreme_twitter_tweet_id
|
|
28
|
+
this.draft_twitter_tweet_ids = twitter_tweet.draft_twitter_tweet_ids
|
|
29
|
+
this.community_id = twitter_tweet.community_id
|
|
30
|
+
this.is_sensitive = twitter_tweet.is_sensitive
|
|
31
|
+
this.is_sponsored = twitter_tweet.is_sponsored
|
|
32
|
+
this.lang_id = twitter_tweet.lang_id
|
|
33
|
+
this.references_json = twitter_tweet.references_json
|
|
34
|
+
this.geo_json = twitter_tweet.geo_json
|
|
35
|
+
this.text = twitter_tweet.text
|
|
36
|
+
this.content_json = twitter_tweet.content_json
|
|
37
|
+
this.media_json = twitter_tweet.media_json
|
|
38
|
+
this.attachments_json = twitter_tweet.attachments_json
|
|
39
|
+
this.entities_json = twitter_tweet.entities_json
|
|
40
|
+
this.reply_settings_type_id = twitter_tweet.reply_settings_type_id
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static is(twitter_tweet : any) : twitter_tweet is TwitterTweet {
|
|
44
|
+
return (
|
|
45
|
+
twitter_tweet !== undefined &&
|
|
46
|
+
typeof twitter_tweet.twitter_tweet_id === "string" &&
|
|
47
|
+
typeof twitter_tweet.twitter_user_id === "string" &&
|
|
48
|
+
typeof twitter_tweet.publish_time === "string" &&
|
|
49
|
+
typeof twitter_tweet.supreme_twitter_tweet_id === "string" &&
|
|
50
|
+
Array.isArray(twitter_tweet.draft_twitter_tweet_ids) && twitter_tweet.draft_twitter_tweet_ids.every((draft_twitter_tweet_id : any) => typeof draft_twitter_tweet_id === "string") &&
|
|
51
|
+
(twitter_tweet.community_id === undefined || typeof twitter_tweet.community_id === "string") &&
|
|
52
|
+
typeof twitter_tweet.is_sensitive === "boolean" &&
|
|
53
|
+
typeof twitter_tweet.is_sponsored === "boolean" &&
|
|
54
|
+
typeof twitter_tweet.lang_id === "string" &&
|
|
55
|
+
typeof twitter_tweet.references_json === "string" &&
|
|
56
|
+
(twitter_tweet.geo_json === undefined || typeof twitter_tweet.geo_json === "string") &&
|
|
57
|
+
typeof twitter_tweet.text === "string" &&
|
|
58
|
+
(twitter_tweet.content_json === undefined || typeof twitter_tweet.content_json === "string") &&
|
|
59
|
+
(twitter_tweet.media_json === undefined || typeof twitter_tweet.media_json === "string") &&
|
|
60
|
+
(twitter_tweet.attachments_json === undefined || typeof twitter_tweet.attachments_json === "string") &&
|
|
61
|
+
(twitter_tweet.entities_json === undefined || typeof twitter_tweet.entities_json === "string") &&
|
|
62
|
+
typeof twitter_tweet.reply_settings_type_id === "string"
|
|
63
|
+
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export class TwitterUser {
|
|
2
|
+
readonly twitter_user_id : string
|
|
3
|
+
readonly username : string
|
|
4
|
+
readonly name : string
|
|
5
|
+
readonly url : string
|
|
6
|
+
readonly description : string
|
|
7
|
+
readonly location : string
|
|
8
|
+
readonly create_time : string
|
|
9
|
+
readonly affiliated_twitter_user_id? : string
|
|
10
|
+
readonly is_protected : boolean
|
|
11
|
+
readonly is_parody : boolean
|
|
12
|
+
readonly subscription_type_id : string
|
|
13
|
+
readonly verification_type_id : string
|
|
14
|
+
readonly entities? : string
|
|
15
|
+
|
|
16
|
+
constructor(twitter_user : TwitterUser) {
|
|
17
|
+
if (!TwitterUser.is(twitter_user)) {
|
|
18
|
+
throw Error("Invalid input.")
|
|
19
|
+
}
|
|
20
|
+
this.twitter_user_id = twitter_user.twitter_user_id
|
|
21
|
+
this.username = twitter_user.username
|
|
22
|
+
this.name = twitter_user.name
|
|
23
|
+
this.url = twitter_user.url
|
|
24
|
+
this.description = twitter_user.description
|
|
25
|
+
this.location = twitter_user.location
|
|
26
|
+
this.create_time = twitter_user.create_time
|
|
27
|
+
this.affiliated_twitter_user_id = twitter_user.affiliated_twitter_user_id
|
|
28
|
+
this.is_protected = twitter_user.is_protected
|
|
29
|
+
this.is_parody = twitter_user.is_parody
|
|
30
|
+
this.subscription_type_id = twitter_user.subscription_type_id
|
|
31
|
+
this.verification_type_id = twitter_user.verification_type_id
|
|
32
|
+
this.entities = twitter_user.entities
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static is(twitter_user : any) : twitter_user is TwitterUser {
|
|
36
|
+
return (
|
|
37
|
+
twitter_user !== undefined &&
|
|
38
|
+
typeof twitter_user.twitter_user_id === "string" &&
|
|
39
|
+
typeof twitter_user.username === "string" &&
|
|
40
|
+
typeof twitter_user.name === "string" &&
|
|
41
|
+
typeof twitter_user.url === "string" &&
|
|
42
|
+
typeof twitter_user.description === "string" &&
|
|
43
|
+
(twitter_user.location === undefined || typeof twitter_user.location === "string") &&
|
|
44
|
+
typeof twitter_user.create_time === "string" &&
|
|
45
|
+
(twitter_user.affiliated_twitter_user_id === undefined || typeof twitter_user.affiliated_twitter_user_id == "string") &&
|
|
46
|
+
typeof twitter_user.is_protected === "boolean" &&
|
|
47
|
+
typeof twitter_user.is_parody === "boolean" &&
|
|
48
|
+
typeof twitter_user.subscription_type_id === "string" &&
|
|
49
|
+
typeof twitter_user.verification_type_id === "string" &&
|
|
50
|
+
(twitter_user.entities === undefined || typeof twitter_user.entities === "string")
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TwitterUser } from "./TwitterUser"
|
|
2
|
+
|
|
3
|
+
export class TwitterUserTag {
|
|
4
|
+
readonly twitter_user_id : string
|
|
5
|
+
readonly tag_id : string
|
|
6
|
+
readonly [x : string] : any
|
|
7
|
+
|
|
8
|
+
constructor(twitter_user_tag : TwitterUserTag) {
|
|
9
|
+
if (!TwitterUserTag.is(twitter_user_tag)) {
|
|
10
|
+
throw Error("Invalid input.")
|
|
11
|
+
}
|
|
12
|
+
this.twitter_user_id = twitter_user_tag.twitter_user_id
|
|
13
|
+
this.tag_id = twitter_user_tag.tag_id
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static is(twitter_user_tag : any) : twitter_user_tag is TwitterUserTag {
|
|
17
|
+
return (
|
|
18
|
+
twitter_user_tag !== undefined &&
|
|
19
|
+
typeof twitter_user_tag.twitter_user_id === "string" &&
|
|
20
|
+
typeof twitter_user_tag.tag_id === "string"
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class TwitterUserTagAux extends TwitterUserTag {
|
|
26
|
+
readonly twitter_user : TwitterUser
|
|
27
|
+
|
|
28
|
+
constructor(twitter_user_tag : any) {
|
|
29
|
+
if (!TwitterUserTagAux.is(twitter_user_tag)) {
|
|
30
|
+
throw Error("Invalid input.")
|
|
31
|
+
}
|
|
32
|
+
super(twitter_user_tag)
|
|
33
|
+
this.twitter_user = twitter_user_tag.twitter_user
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static is(twitter_user_tag : any) : twitter_user_tag is TwitterUserTagAux {
|
|
37
|
+
return (
|
|
38
|
+
TwitterUserTag.is(twitter_user_tag) &&
|
|
39
|
+
TwitterUser.is(twitter_user_tag.twitter_user)
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class YoutubeChannel {
|
|
2
|
+
readonly youtube_channel_id : string
|
|
3
|
+
readonly name : string
|
|
4
|
+
|
|
5
|
+
constructor(youtube_channel : YoutubeChannel) {
|
|
6
|
+
if (!YoutubeChannel.is(youtube_channel)) {
|
|
7
|
+
throw Error("Invalid input.")
|
|
8
|
+
}
|
|
9
|
+
this.youtube_channel_id = youtube_channel.youtube_channel_id
|
|
10
|
+
this.name = youtube_channel.name
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static is(youtube_channel : any) : youtube_channel is YoutubeChannel {
|
|
14
|
+
return (
|
|
15
|
+
youtube_channel !== undefined &&
|
|
16
|
+
typeof youtube_channel.youtube_channel_id === "string" &&
|
|
17
|
+
typeof youtube_channel.name === "string"
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { YoutubeChannel } from "./YoutubeChannel"
|
|
2
|
+
|
|
3
|
+
export class YoutubeVideo {
|
|
4
|
+
readonly youtube_video_id : string
|
|
5
|
+
readonly youtube_channel_id : string
|
|
6
|
+
readonly publish_time : string
|
|
7
|
+
readonly title : string
|
|
8
|
+
readonly description : string
|
|
9
|
+
readonly duration? : number
|
|
10
|
+
readonly s3_id? : string
|
|
11
|
+
readonly [x : string] : any
|
|
12
|
+
|
|
13
|
+
constructor(youtube_video : YoutubeVideo) {
|
|
14
|
+
if (!YoutubeVideo.is(youtube_video)) {
|
|
15
|
+
throw Error("Invalid input.")
|
|
16
|
+
}
|
|
17
|
+
this.youtube_video_id = youtube_video.youtube_video_id
|
|
18
|
+
this.youtube_channel_id = youtube_video.youtube_channel_id
|
|
19
|
+
this.publish_time = youtube_video.publish_time
|
|
20
|
+
this.title = youtube_video.title
|
|
21
|
+
this.description = youtube_video.description
|
|
22
|
+
this.duration = youtube_video.duration
|
|
23
|
+
this.s3_id = youtube_video.s3_id
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static is(youtube_video : any) : youtube_video is YoutubeVideo {
|
|
27
|
+
return (
|
|
28
|
+
youtube_video !== undefined &&
|
|
29
|
+
typeof youtube_video.youtube_video_id === "string" &&
|
|
30
|
+
typeof youtube_video.youtube_channel_id === "string" &&
|
|
31
|
+
typeof youtube_video.publish_time === "string" &&
|
|
32
|
+
typeof youtube_video.title === "string" &&
|
|
33
|
+
typeof youtube_video.description === "string" &&
|
|
34
|
+
(youtube_video.duration === undefined || typeof youtube_video.duration === "number" && !isNaN(youtube_video.duration)) &&
|
|
35
|
+
(youtube_video.s3_id === undefined || typeof youtube_video.s3_id === "string")
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class YoutubeVideoAux extends YoutubeVideo {
|
|
41
|
+
readonly youtube_channel : YoutubeChannel
|
|
42
|
+
|
|
43
|
+
constructor(youtube_video : any) {
|
|
44
|
+
if (!YoutubeVideoAux.is(youtube_video)) {
|
|
45
|
+
throw Error("Invalid input.")
|
|
46
|
+
}
|
|
47
|
+
super(youtube_video)
|
|
48
|
+
this.youtube_channel = youtube_video.youtube_channel
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static is(youtube_video : any) : youtube_video is YoutubeVideoAux {
|
|
52
|
+
return (
|
|
53
|
+
YoutubeVideo.is(youtube_video) &&
|
|
54
|
+
YoutubeChannel.is(youtube_video.youtube_channel)
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { YoutubeVideoAux } from "./YoutubeVideo"
|
|
2
|
+
|
|
3
|
+
export class YoutubeVideoTag {
|
|
4
|
+
readonly youtube_video_id : string
|
|
5
|
+
readonly tag_id : string
|
|
6
|
+
readonly publish_time : string
|
|
7
|
+
readonly relevance? : string
|
|
8
|
+
readonly [x : string] : any
|
|
9
|
+
|
|
10
|
+
constructor(youtube_video_tag : YoutubeVideoTag) {
|
|
11
|
+
if (!YoutubeVideoTag.is(youtube_video_tag)) {
|
|
12
|
+
throw Error("Invalid input.")
|
|
13
|
+
}
|
|
14
|
+
this.youtube_video_id = youtube_video_tag.youtube_video_id
|
|
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
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static is(youtube_video_tag : any) : youtube_video_tag is YoutubeVideoTag {
|
|
21
|
+
return (
|
|
22
|
+
youtube_video_tag !== undefined &&
|
|
23
|
+
typeof youtube_video_tag.youtube_video_id === "string" &&
|
|
24
|
+
typeof youtube_video_tag.tag_id === "string" &&
|
|
25
|
+
typeof youtube_video_tag.publish_time === "string" &&
|
|
26
|
+
(youtube_video_tag.relevance === undefined || typeof youtube_video_tag.relevance === "string")
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class YoutubeVideoTagAux extends YoutubeVideoTag {
|
|
32
|
+
readonly youtube_video : YoutubeVideoAux
|
|
33
|
+
|
|
34
|
+
constructor(youtube_video_tag : any) {
|
|
35
|
+
if (!YoutubeVideoTagAux.is(youtube_video_tag)) {
|
|
36
|
+
throw Error("Invalid input.")
|
|
37
|
+
}
|
|
38
|
+
super(youtube_video_tag)
|
|
39
|
+
this.youtube_video = youtube_video_tag.youtube_video
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static is(youtube_video_tag : any) : youtube_video_tag is YoutubeVideoTagAux {
|
|
43
|
+
return (
|
|
44
|
+
YoutubeVideoTag.is(youtube_video_tag) &&
|
|
45
|
+
YoutubeVideoAux.is(youtube_video_tag.youtube_video)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./dist",
|
|
4
|
+
|
|
5
|
+
// Treat files as modules even if it doesn't use import/export
|
|
6
|
+
"moduleDetection": "force",
|
|
7
|
+
|
|
8
|
+
// Ignore module structure
|
|
9
|
+
"module" : "esnext",
|
|
10
|
+
"target" : "es2022",
|
|
11
|
+
"noImplicitAny" : true,
|
|
12
|
+
"noImplicitReturns" : true,
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"declaration": true,
|
|
15
|
+
// Allow JS files to be imported from TS and vice versa
|
|
16
|
+
"allowJs": true,
|
|
17
|
+
"strict" : true,
|
|
18
|
+
// Use correct ESM import behavior
|
|
19
|
+
"esModuleInterop": true,
|
|
20
|
+
"resolveJsonModule": true,
|
|
21
|
+
// Disallow features that require cross-file awareness
|
|
22
|
+
"isolatedModules": true,
|
|
23
|
+
"lib": ["es2022"],
|
|
24
|
+
"rootDir": "./",
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
"maxNodeModuleJsDepth": 0,
|
|
27
|
+
"types": ["node"]
|
|
28
|
+
},
|
|
29
|
+
"tsc-alias": {
|
|
30
|
+
"resolveFullPaths": true,
|
|
31
|
+
"verbose": false
|
|
32
|
+
},
|
|
33
|
+
"include" : ["src/**/*"]
|
|
34
|
+
}
|